sp-dev-fx-webparts icon indicating copy to clipboard operation
sp-dev-fx-webparts copied to clipboard

added New webpart sample

Open siddharth-vaghasia opened this issue 3 years ago • 3 comments

Q A
New sample? yes

What's in this Pull Request?

Added new utility web part. A react-based SPFx utility web part that will help admins/user(s) to associate and remove the association of the list form customizer extension to a particular list.

siddharth-vaghasia avatar Sep 04 '22 05:09 siddharth-vaghasia

Thank you @siddharth-vaghasia !

Would you mind taking a look at these linting errors please?

[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\ReactAddformcustomizertolistWebPart.ts(8,33): error @typescript-eslint/no-unused-vars: 'WebPartContext' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\ReactAddformcustomizertolistWebPart.ts(42,25): error @microsoft/spfx/no-async-await: Usage of "async" has overhead when using in older browsers.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\IReactAddformcustomizertolistProps.ts(1,10): error @typescript-eslint/no-unused-vars: 'WebPartContext' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\IReactAddformcustomizertolistProps.ts(9,12): error @typescript-eslint/no-explicit-any: Unexpected any. Specify a different type.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(4,10): error @typescript-eslint/no-unused-vars: 'escape' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(6,16): error @typescript-eslint/no-unused-vars: 'SPFx' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(9,10): error @typescript-eslint/no-unused-vars: 'IItemUpdateResult' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(10,17): error @typescript-eslint/no-unused-vars: 'PrimaryButton' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(14,46): error @typescript-eslint/no-unused-vars: 'SPHttpClientConfiguration' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(14,73): error @typescript-eslint/no-unused-vars: 'ISPHttpClientOptions' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(23,10): error @typescript-eslint/no-unused-vars: 'ITextFieldProps' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(27,10): error @typescript-eslint/no-unused-vars: 'useBoolean' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(27,22): error @typescript-eslint/no-unused-vars: 'useId' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(28,10): error @typescript-eslint/no-unused-vars: 'FontIcon' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(28,20): error @typescript-eslint/no-unused-vars: 'IIconStyles' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(31,17): error @typescript-eslint/no-unused-vars: 'IImageProps' is defined but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(34,7): error @typescript-eslint/typedef: Expected iconClass to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(34,7): error @typescript-eslint/no-unused-vars: 'iconClass' is assigned a value but never used.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(51,7): error @typescript-eslint/typedef: Expected iconProps to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(53,7): error @typescript-eslint/typedef: Expected modelProps to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(61,3): error @typescript-eslint/typedef: Expected LOG_SOURCE to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(61,11): error @typescript-eslint/naming-convention: Class Property name `LOG_SOURCE` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(64,3): error @typescript-eslint/typedef: Expected dialogContentProps to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(64,11): error @typescript-eslint/naming-convention: Class Property name `dialogContentProps` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(69,3): error @typescript-eslint/explicit-member-accessibility: Missing accessibility modifier on method definition constructor.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(119,19): error react/jsx-no-bind: JSX props should not use arrow functions
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(143,21): error react/jsx-no-bind: JSX props should not use arrow functions
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(185,31): error no-useless-concat: Unexpected string concatenation of literals.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(192,21): error react/self-closing-comp: Empty components are self-closing
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(193,56): error react/no-unescaped-entities: `'` can be escaped with `'`, `‘`, `'`, `’`.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(193,76): error react/no-unescaped-entities: `'` can be escaped with `'`, `‘`, `'`, `’`.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(201,15): error react/jsx-no-bind: JSX props should not use arrow functions
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(240,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(240,11): error @typescript-eslint/naming-convention: Class Method name `toggleHideDialog` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(245,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(245,11): error @typescript-eslint/naming-convention: Class Method name `toggleIsCalloutVisible` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(250,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(250,11): error @typescript-eslint/naming-convention: Class Method name `handleCustomSiteUrlChange` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(250,40): error @typescript-eslint/no-explicit-any: Unexpected any. Specify a different type.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(253,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(253,11): error @typescript-eslint/naming-convention: Class Method name `handleCCIDChange` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(253,31): error @typescript-eslint/no-explicit-any: Unexpected any. Specify a different type.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(257,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(257,11): error @typescript-eslint/naming-convention: Class Method name `onListPickerChange` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(261,7): error @typescript-eslint/no-floating-promises: Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(269,30): error @microsoft/spfx/no-async-await: Usage of "async" has overhead when using in older browsers.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(272,7): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(274,13): error @typescript-eslint/typedef: Expected web to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(275,13): error @typescript-eslint/typedef: Expected list to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(278,18): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(279,9): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(279,13): error @typescript-eslint/typedef: Expected id to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(290,11): error @typescript-eslint/naming-convention: Class Method name `CTTypeChanged` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(295,11): error @typescript-eslint/naming-convention: Class Method name `reloadWebpart` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(315,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(315,17): error @typescript-eslint/naming-convention: Class Method name `addFormCustomizer` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(315,34): error @microsoft/spfx/no-async-await: Usage of "async" has overhead when using in older browsers.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(316,5): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(316,9): error @typescript-eslint/typedef: Expected isValid to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(322,9): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(322,13): error @typescript-eslint/typedef: Expected result to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(352,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(352,11): error @typescript-eslint/naming-convention: Class Method name `validedFormFields` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(353,5): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(353,9): error @typescript-eslint/typedef: Expected isFormValid to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(364,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(364,17): error @typescript-eslint/naming-convention: Class Method name `removeFormCustomizer` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(364,37): error @microsoft/spfx/no-async-await: Usage of "async" has overhead when using in older browsers.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(365,5): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(365,9): error @typescript-eslint/typedef: Expected isValid to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(370,9): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(370,13): error @typescript-eslint/typedef: Expected result to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(400,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(400,17): error @typescript-eslint/naming-convention: Class Method name `addremoveFormCustomizer` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(400,40): error @microsoft/spfx/no-async-await: Usage of "async" has overhead when using in older browsers.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(401,11): error @typescript-eslint/typedef: Expected web to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(403,11): error @typescript-eslint/typedef: Expected ctUrl to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(404,9): error @typescript-eslint/typedef: Expected bodyObject to have a type annotation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(404,9): error prefer-const: 'bodyObject' is never reassigned. Use 'const' instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(407,7): error no-unused-expressions: Expected an assignment or function call and instead saw an expression.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(407,19): error eqeqeq: Expected '===' and instead saw '=='.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(407,41): error dot-notation: ["NewFormClientSideComponentId"] is better written in dot notation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(407,117): error dot-notation: ["NewFormClientSideComponentId"] is better written in dot notation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(410,7): error no-unused-expressions: Expected an assignment or function call and instead saw an expression.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(410,19): error eqeqeq: Expected '===' and instead saw '=='.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(410,41): error dot-notation: ["EditFormClientSideComponentId"] is better written in dot notation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(410,118): error dot-notation: ["EditFormClientSideComponentId"] is better written in dot notation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(413,7): error no-unused-expressions: Expected an assignment or function call and instead saw an expression.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(413,19): error eqeqeq: Expected '===' and instead saw '=='.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(413,41): error dot-notation: ["DisplayFormClientSideComponentId"] is better written in dot notation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(413,121): error dot-notation: ["DisplayFormClientSideComponentId"] is better written in dot notation.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(427,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(427,11): error @typescript-eslint/naming-convention: Class Method name `onCustomSiteUrlChange` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(431,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(431,11): error @typescript-eslint/naming-convention: Class Method name `onNewFormChange` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(434,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(434,11): error @typescript-eslint/naming-convention: Class Method name `onEditFormChange` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(438,3): error @typescript-eslint/explicit-function-return-type: Missing return type on function.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\components\ReactAddformcustomizertolist.tsx(438,11): error @typescript-eslint/naming-convention: Class Method name `onViewFormChange` must have one leading underscore(s).
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\pnpjsConfig.ts(11,1): error no-var: Unexpected var, use let or const instead.
[00:04:46] Warning - lint - src\webparts\reactAddformcustomizertolist\pnpjsConfig.ts(14,31): error eqeqeq: Expected '!==' and instead saw '!='.

hugoabernier avatar Sep 06 '22 04:09 hugoabernier

thanks, @hugoabernier - will do..!

siddharth-vaghasia avatar Sep 06 '22 04:09 siddharth-vaghasia

@hugoabernier - Can you please check latest commit, fixed all these warnings..

siddharth-vaghasia avatar Sep 16 '22 14:09 siddharth-vaghasia

Thank you @siddharth-vaghasia! Would you like to demo this on the November 17th community call?

hugoabernier avatar Oct 24 '22 13:10 hugoabernier

Hi @hugoabernier - Yes.. I can demo this on Nov 17th Call.

siddharth-vaghasia avatar Nov 01 '22 16:11 siddharth-vaghasia

Perfect, @siddharth-vaghasia , you are confirmed on the agenda! Looking forward to your demo!

hugoabernier avatar Nov 08 '22 04:11 hugoabernier