Updated sample.json and readme

This commit is contained in:
Hugo Bernier 2022-09-05 17:33:15 -04:00
parent cb7bc1dd17
commit 158decd729
5 changed files with 51 additions and 22 deletions

View File

@ -44,8 +44,8 @@ This solution enables a user to copy views from one list/library to another acro
- Clone this repository - Clone this repository
- Ensure that you are at the solution folder - Ensure that you are at the solution folder
- in the command-line run: - in the command-line run:
- **npm install** - `npm install`
- **gulp serve** - `gulp serve`
- To package and deploy: - To package and deploy:
- Use `gulp bundle --ship` & `gulp package-solution --ship` - Use `gulp bundle --ship` & `gulp package-solution --ship`
- Add the `.sppkg` to your SharePoint App Catalog - Add the `.sppkg` to your SharePoint App Catalog
@ -67,6 +67,22 @@ This solution enables a user to copy views from one list/library to another acro
> *The component uses the DOM parser to parse the ViewQuery XML, and removes any filter conditions that reference fields that are not available on the target list. The component can even clean filter queries with multiple And/Or CAML-conditions. > *The component uses the DOM parser to parse the ViewQuery XML, and removes any filter conditions that reference fields that are not available on the target list. The component can even clean filter queries with multiple And/Or CAML-conditions.
## Help
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
If you're having issues building the solution, please run [spfx doctor](https://pnp.github.io/cli-microsoft365/cmd/spfx/spfx-doctor/) from within the solution folder to diagnose incompatibility issues with your environment.
You can try looking at [issues related to this sample](https://github.com/pnp/sp-dev-fx-webparts/issues?q=label%3A%22sample%3A%20react-copy-views%22) to see if anybody else is having the same issues.
You can also try looking at [discussions related to this sample](https://github.com/pnp/sp-dev-fx-webparts/discussions?discussions_q=react-copy-views) and see what the community is saying.
If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-copy-views&template=bug-report.yml&sample=react-copy-views&authors=@martinlingstuyl&title=react-copy-views%20-%20).
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aquestion%2Csample%3A%20react-copy-views&template=question.yml&sample=react-copy-views&authors=@martinlingstuyl&title=react-copy-views%20-%20).
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-copy-views&template=suggestion.yml&sample=react-copy-views&authors=@martinlingstuyl&title=react-copy-views%20-%20).
## Disclaimer ## Disclaimer
**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** **THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

View File

@ -3,10 +3,10 @@
"name": "pnp-sp-dev-spfx-web-parts-react-copy-views", "name": "pnp-sp-dev-spfx-web-parts-react-copy-views",
"source": "pnp", "source": "pnp",
"title": "Copy Views", "title": "Copy Views",
"shortDescription": "The Copy Views soluton enables a user to copy views from one list/library to another across site collections.", "shortDescription": "The Copy Views solution enables a user to copy views from one list/library to another across site collections.",
"url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-content-query-onprem", "url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-content-query-onprem",
"longDescription": [ "longDescription": [
"The Copy Views soluton enables a user to copy views from one list/library to another across site collections. It can be used as a webpart on a page, or as a ListView Command Set extension. The user can select multiple views to copy to multiple target lists." "The Copy Views solution enables a user to copy views from one list/library to another across site collections. It can be used as a webpart on a page, or as a ListView Command Set extension. The user can select multiple views to copy to multiple target lists."
], ],
"creationDateTime": "2022-08-29", "creationDateTime": "2022-08-29",
"updateDateTime": "2022-08-29", "updateDateTime": "2022-08-29",

View File

@ -17,4 +17,7 @@ const { addFastServe } = require("spfx-fast-serve-helpers");
addFastServe(build); addFastServe(build);
/* end of fast-serve */ /* end of fast-serve */
// disable eslint
build.lintCmd.enabled = false;
build.initialize(require('gulp')); build.initialize(require('gulp'));

View File

@ -18,48 +18,49 @@
} }
.checkboxSetDefaultView { .checkboxSetDefaultView {
margin-top:10px; margin-top: 10px;
} }
.checkboxSelectionContainer { .checkboxSelectionContainer {
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
border-color:#a19f9d; border-color: #a19f9d;
height:300px; height: 300px;
padding:10px; padding: 10px;
overflow:auto; overflow: auto;
&:hover { &:hover {
border-color:#323130; border-color: #323130;
} }
} }
.SiteSuggestion { .SiteSuggestion {
padding:5px 5px; padding: 5px 5px;
text-align:left; text-align: left;
} }
.selectedSite { .selectedSite {
background:#f2f2f2; background: #f2f2f2;
padding: 0px 5px; padding: 0px 5px;
margin: 2px; margin: 2px;
line-height: 26px; line-height: 26px;
} }
.copyStatusContainer { .copyStatusContainer {
height:300px; height: 300px;
overflow-y:auto; overflow-y: auto;
overflow-x:hidden; overflow-x: hidden;
} }
.copyTaskLine { .copyTaskLine {
width:100%; width: 100%;
position:relative; position: relative;
.copyTaskIcon { .copyTaskIcon {
position:absolute; position: absolute;
right:0; right: 0;
top:0; top: 0;
} }
} }
@ -76,4 +77,13 @@
.sitePicker { .sitePicker {
visibility: inherit; visibility: inherit;
// height: 38.66px; // height: 38.66px;
}
.title {
color: "[theme:bodyText, default: #323130]";
color: var(--bodyText);
font-family: $ms-font-family-fallbacks;
-webkit-font-smoothing: antialiased;
font-size: 20px;
font-weight: 600;
} }

View File

@ -56,7 +56,7 @@ export class CopyViewsContainer extends React.Component<ICopyViewsContainerProps
const copyingDisabled = !(targetLists?.length > 0 && sourceViews?.length > 0); const copyingDisabled = !(targetLists?.length > 0 && sourceViews?.length > 0);
return <> return <>
<h1>{ !showCopyStatus ? strings.CopyViews : strings.CopyStatus }</h1> <h2 className={styles.title}>{ !showCopyStatus ? strings.CopyViews : strings.CopyStatus }</h2>
{ {
error && <MessageBar error && <MessageBar
messageBarType={MessageBarType.error} messageBarType={MessageBarType.error}