@microsoft/generator-sharepoint 1.15.0-beta.1 → 1.15.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/lib/common/YeomanConfiguration.d.ts +2 -0
  2. package/lib/common/YeomanConfiguration.d.ts.map +1 -1
  3. package/lib/common/YeomanConfiguration.js +8 -1
  4. package/lib/common/dependencies.json +71 -47
  5. package/lib/common/spsay.d.ts +1 -1
  6. package/lib/common/spsay.d.ts.map +1 -1
  7. package/lib/common/spsay.js +9 -9
  8. package/lib/generators/adaptiveCardExtension/templates/none/quickView/QuickView.ts +1 -1
  9. package/lib/generators/app/index.d.ts.map +1 -1
  10. package/lib/generators/app/index.js +4 -1
  11. package/lib/generators/commandSet/templates/none/{componentClassName}.ts +1 -1
  12. package/lib/generators/extension/BaseExtensionGenerator.d.ts +2 -1
  13. package/lib/generators/extension/BaseExtensionGenerator.d.ts.map +1 -1
  14. package/lib/generators/extension/BaseExtensionGenerator.js +8 -3
  15. package/lib/generators/extension/index.d.ts +2 -1
  16. package/lib/generators/extension/index.d.ts.map +1 -1
  17. package/lib/generators/extension/index.js +7 -1
  18. package/lib/generators/fieldCustomizer/templates/minimal/{componentClassName}.module.scss +1 -1
  19. package/lib/generators/fieldCustomizer/templates/minimal/{componentClassName}.ts +1 -1
  20. package/lib/generators/fieldCustomizer/templates/none/{componentClassName}.module.scss +1 -1
  21. package/lib/generators/fieldCustomizer/templates/none/{componentClassName}.ts +1 -1
  22. package/lib/generators/fieldCustomizer/templates/react/components/{componentName}.module.scss +1 -1
  23. package/lib/generators/fieldCustomizer/templates/react/components/{componentName}.tsx +1 -1
  24. package/lib/generators/formCustomizer/index.d.ts +24 -0
  25. package/lib/generators/formCustomizer/index.d.ts.map +1 -0
  26. package/lib/generators/formCustomizer/index.js +141 -0
  27. package/lib/generators/formCustomizer/templates/base/{componentClassName}.manifest.json +17 -0
  28. package/lib/generators/formCustomizer/templates/loc/en-us.js +7 -0
  29. package/lib/generators/formCustomizer/templates/loc/myStrings.d.ts +10 -0
  30. package/lib/generators/formCustomizer/templates/none/{componentClassName}.module.scss +5 -0
  31. package/lib/generators/formCustomizer/templates/none/{componentClassName}.ts +53 -0
  32. package/lib/generators/formCustomizer/templates/react/components/{componentName}.module.scss +5 -0
  33. package/lib/generators/formCustomizer/templates/react/components/{componentName}.tsx +28 -0
  34. package/lib/generators/formCustomizer/templates/react/{componentClassName}.ts +65 -0
  35. package/lib/generators/solution/index.js +1 -0
  36. package/lib/generators/solution/templates/base/.vscode/settings.json +13 -0
  37. package/lib/generators/webpart/templates/none/{componentClassName}.ts +6 -3
  38. package/lib/generators/webpart/templates/react/{componentClassName}.ts +6 -3
  39. package/package.json +2 -2
@@ -19,5 +19,7 @@ export declare class YeomanConfiguration {
19
19
  static set environment(value: 'spo');
20
20
  static get packageManager(): 'npm' | 'pnpm' | 'yarn';
21
21
  static set packageManager(value: 'npm' | 'pnpm' | 'yarn');
22
+ static get useHeft(): boolean;
23
+ static set useHeft(value: boolean);
22
24
  }
23
25
  //# sourceMappingURL=YeomanConfiguration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"YeomanConfiguration.d.ts","sourceRoot":"","sources":["../../src/common/YeomanConfiguration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,CAAC;CAC5B;AAYD;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,CAA2B;WAElC,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,GAAG,IAAI;IAI3E,WAAkB,WAAW,IAAI,MAAM,CAEtC;IACD,WAAkB,WAAW,CAAC,KAAK,EAAE,MAAM,EAE1C;IAED,WAAkB,OAAO,IAAI,MAAM,CAElC;IACD,WAAkB,OAAO,CAAC,KAAK,EAAE,MAAM,EAEtC;IAED,WAAkB,SAAS,IAAI,MAAM,CAEpC;IACD,WAAkB,SAAS,CAAC,KAAK,EAAE,MAAM,EAExC;IAED,WAAkB,WAAW,IAAI,KAAK,CAErC;IAED,WAAkB,WAAW,CAAC,KAAK,EAAE,KAAK,EAEzC;IAED,WAAkB,cAAc,IAAI,KAAK,GAAG,MAAM,GAAG,MAAM,CAE1D;IAED,WAAkB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,EAE9D;CACF"}
1
+ {"version":3,"file":"YeomanConfiguration.d.ts","sourceRoot":"","sources":["../../src/common/YeomanConfiguration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,CAAC;CAC5B;AAaD;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,CAA2B;WAElC,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,GAAG,IAAI;IAI3E,WAAkB,WAAW,IAAI,MAAM,CAEtC;IACD,WAAkB,WAAW,CAAC,KAAK,EAAE,MAAM,EAE1C;IAED,WAAkB,OAAO,IAAI,MAAM,CAElC;IACD,WAAkB,OAAO,CAAC,KAAK,EAAE,MAAM,EAEtC;IAED,WAAkB,SAAS,IAAI,MAAM,CAEpC;IACD,WAAkB,SAAS,CAAC,KAAK,EAAE,MAAM,EAExC;IAED,WAAkB,WAAW,IAAI,KAAK,CAErC;IAED,WAAkB,WAAW,CAAC,KAAK,EAAE,KAAK,EAEzC;IAED,WAAkB,cAAc,IAAI,KAAK,GAAG,MAAM,GAAG,MAAM,CAE1D;IAED,WAAkB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,EAE9D;IAED,WAAkB,OAAO,IAAI,OAAO,CAEnC;IAED,WAAkB,OAAO,CAAC,KAAK,EAAE,OAAO,EAEvC;CACF"}
@@ -8,7 +8,8 @@ const _strings = {
8
8
  version: 'version',
9
9
  libraryId: 'libraryId',
10
10
  environment: 'environment',
11
- packageManager: 'packageManager'
11
+ packageManager: 'packageManager',
12
+ useHeft: 'useHeft'
12
13
  };
13
14
  /**
14
15
  * This class wraps an untyped property bag with types for
@@ -48,6 +49,12 @@ class YeomanConfiguration {
48
49
  static set packageManager(value) {
49
50
  YeomanConfiguration._store.set(_strings.packageManager, value);
50
51
  }
52
+ static get useHeft() {
53
+ return YeomanConfiguration._store.get(_strings.useHeft);
54
+ }
55
+ static set useHeft(value) {
56
+ YeomanConfiguration._store.set(_strings.useHeft, value);
57
+ }
51
58
  }
52
59
  exports.YeomanConfiguration = YeomanConfiguration;
53
60
  //# sourceMappingURL=YeomanConfiguration.js.map
@@ -2,30 +2,30 @@
2
2
  "adaptiveCardExtension": {
3
3
  "standard": {
4
4
  "dependencies": {
5
- "@microsoft/sp-core-library": "1.15.0-beta.1",
6
- "@microsoft/sp-property-pane": "1.15.0-beta.1",
7
- "@microsoft/sp-adaptive-card-extension-base": "1.15.0-beta.1"
5
+ "@microsoft/sp-core-library": "1.15.0-beta.6",
6
+ "@microsoft/sp-property-pane": "1.15.0-beta.6",
7
+ "@microsoft/sp-adaptive-card-extension-base": "1.15.0-beta.6"
8
8
  },
9
9
  "devDependencies": {
10
- "@microsoft/sp-module-interfaces": "1.15.0-beta.1"
10
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
11
11
  }
12
12
  },
13
13
  "plusBeta": {
14
14
  "dependencies": {
15
- "@microsoft/sp-core-library": "1.15.0-beta.1",
16
- "@microsoft/sp-property-pane": "1.15.0-beta.1",
17
- "@microsoft/sp-adaptive-card-extension-base": "1.15.0-beta.1"
15
+ "@microsoft/sp-core-library": "1.15.0-beta.6",
16
+ "@microsoft/sp-property-pane": "1.15.0-beta.6",
17
+ "@microsoft/sp-adaptive-card-extension-base": "1.15.0-beta.6"
18
18
  },
19
19
  "devDependencies": {
20
- "@microsoft/sp-module-interfaces": "1.15.0-beta.1"
20
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
21
21
  }
22
22
  }
23
23
  },
24
24
  "applicationCustomizer": {
25
25
  "standard": {
26
26
  "dependencies": {
27
- "@microsoft/sp-dialog": "1.15.0-beta.1",
28
- "@microsoft/sp-application-base": "1.15.0-beta.1"
27
+ "@microsoft/sp-dialog": "1.15.0-beta.6",
28
+ "@microsoft/sp-application-base": "1.15.0-beta.6"
29
29
  }
30
30
  },
31
31
  "plusBeta": null
@@ -33,8 +33,8 @@
33
33
  "applicationCustomizerPlusBeta": {
34
34
  "standard": {
35
35
  "dependencies": {
36
- "@microsoft/sp-dialog": "1.15.0-beta.1",
37
- "@microsoft/sp-application-base": "1.15.0-beta.1"
36
+ "@microsoft/sp-dialog": "1.15.0-beta.6",
37
+ "@microsoft/sp-application-base": "1.15.0-beta.6"
38
38
  }
39
39
  },
40
40
  "plusBeta": null
@@ -42,8 +42,8 @@
42
42
  "commandSet": {
43
43
  "standard": {
44
44
  "dependencies": {
45
- "@microsoft/sp-listview-extensibility": "1.15.0-beta.1",
46
- "@microsoft/sp-dialog": "1.15.0-beta.1"
45
+ "@microsoft/sp-listview-extensibility": "1.15.0-beta.6",
46
+ "@microsoft/sp-dialog": "1.15.0-beta.6"
47
47
  }
48
48
  },
49
49
  "plusBeta": null
@@ -51,8 +51,8 @@
51
51
  "commandSetPlusBeta": {
52
52
  "standard": {
53
53
  "dependencies": {
54
- "@microsoft/sp-listview-extensibility": "1.15.0-beta.1",
55
- "@microsoft/sp-dialog": "1.15.0-beta.1"
54
+ "@microsoft/sp-listview-extensibility": "1.15.0-beta.6",
55
+ "@microsoft/sp-dialog": "1.15.0-beta.6"
56
56
  }
57
57
  },
58
58
  "plusBeta": null
@@ -60,27 +60,27 @@
60
60
  "extension": {
61
61
  "standard": {
62
62
  "dependencies": {
63
- "@microsoft/sp-core-library": "1.15.0-beta.1",
64
- "@microsoft/decorators": "1.15.0-beta.1"
63
+ "@microsoft/sp-core-library": "1.15.0-beta.6",
64
+ "@microsoft/decorators": "1.15.0-beta.6"
65
65
  },
66
66
  "devDependencies": {
67
- "@microsoft/sp-module-interfaces": "1.15.0-beta.1"
67
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
68
68
  }
69
69
  },
70
70
  "plusBeta": {
71
71
  "dependencies": {
72
- "@microsoft/sp-core-library": "1.15.0-beta.1",
73
- "@microsoft/decorators": "1.15.0-beta.1"
72
+ "@microsoft/sp-core-library": "1.15.0-beta.6",
73
+ "@microsoft/decorators": "1.15.0-beta.6"
74
74
  },
75
75
  "devDependencies": {
76
- "@microsoft/sp-module-interfaces": "1.15.0-beta.1"
76
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
77
77
  }
78
78
  }
79
79
  },
80
80
  "fieldCustomizer": {
81
81
  "standard": {
82
82
  "dependencies": {
83
- "@microsoft/sp-listview-extensibility": "1.15.0-beta.1"
83
+ "@microsoft/sp-listview-extensibility": "1.15.0-beta.6"
84
84
  }
85
85
  },
86
86
  "plusBeta": null
@@ -88,7 +88,7 @@
88
88
  "fieldCustomizerPlusBeta": {
89
89
  "standard": {
90
90
  "dependencies": {
91
- "@microsoft/sp-listview-extensibility": "1.15.0-beta.1"
91
+ "@microsoft/sp-listview-extensibility": "1.15.0-beta.6"
92
92
  }
93
93
  },
94
94
  "plusBeta": null
@@ -97,13 +97,13 @@
97
97
  "standard": {
98
98
  "dependencies": {},
99
99
  "devDependencies": {
100
- "@microsoft/sp-module-interfaces": "1.15.0-beta.1"
100
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
101
101
  }
102
102
  },
103
103
  "plusBeta": {
104
104
  "dependencies": {},
105
105
  "devDependencies": {
106
- "@microsoft/sp-module-interfaces": "1.15.0-beta.1"
106
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
107
107
  }
108
108
  }
109
109
  },
@@ -112,7 +112,7 @@
112
112
  "dependencies": {
113
113
  "react": "16.13.1",
114
114
  "react-dom": "16.13.1",
115
- "office-ui-fabric-react": "7.181.1"
115
+ "office-ui-fabric-react": "7.183.1"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@types/react": "16.9.51",
@@ -124,7 +124,7 @@
124
124
  "searchQueryModifier": {
125
125
  "standard": {
126
126
  "dependencies": {
127
- "@microsoft/sp-search-extensibility": "1.15.0-beta.1"
127
+ "@microsoft/sp-search-extensibility": "1.15.0-beta.6"
128
128
  }
129
129
  },
130
130
  "plusBeta": null
@@ -132,7 +132,7 @@
132
132
  "searchQueryModifierPlusBeta": {
133
133
  "standard": {
134
134
  "dependencies": {
135
- "@microsoft/sp-search-extensibility": "1.15.0-beta.1"
135
+ "@microsoft/sp-search-extensibility": "1.15.0-beta.6"
136
136
  }
137
137
  },
138
138
  "plusBeta": null
@@ -140,38 +140,38 @@
140
140
  "webpart": {
141
141
  "standard": {
142
142
  "dependencies": {
143
- "@microsoft/sp-core-library": "1.15.0-beta.1",
144
- "@microsoft/sp-property-pane": "1.15.0-beta.1",
145
- "@microsoft/sp-webpart-base": "1.15.0-beta.1",
146
- "@microsoft/sp-lodash-subset": "1.15.0-beta.1",
147
- "@microsoft/sp-office-ui-fabric-core": "1.15.0-beta.1"
143
+ "@microsoft/sp-core-library": "1.15.0-beta.6",
144
+ "@microsoft/sp-property-pane": "1.15.0-beta.6",
145
+ "@microsoft/sp-webpart-base": "1.15.0-beta.6",
146
+ "@microsoft/sp-lodash-subset": "1.15.0-beta.6",
147
+ "@microsoft/sp-office-ui-fabric-core": "1.15.0-beta.6"
148
148
  },
149
149
  "devDependencies": {
150
- "@microsoft/sp-module-interfaces": "1.15.0-beta.1"
150
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
151
151
  }
152
152
  },
153
153
  "plusBeta": {
154
154
  "dependencies": {
155
- "@microsoft/sp-core-library": "1.15.0-beta.1",
156
- "@microsoft/sp-property-pane": "1.15.0-beta.1",
157
- "@microsoft/sp-webpart-base": "1.15.0-beta.1",
158
- "@microsoft/sp-lodash-subset": "1.15.0-beta.1",
159
- "@microsoft/sp-office-ui-fabric-core": "1.15.0-beta.1"
155
+ "@microsoft/sp-core-library": "1.15.0-beta.6",
156
+ "@microsoft/sp-property-pane": "1.15.0-beta.6",
157
+ "@microsoft/sp-webpart-base": "1.15.0-beta.6",
158
+ "@microsoft/sp-lodash-subset": "1.15.0-beta.6",
159
+ "@microsoft/sp-office-ui-fabric-core": "1.15.0-beta.6"
160
160
  },
161
161
  "devDependencies": {
162
- "@microsoft/sp-module-interfaces": "1.15.0-beta.1"
162
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
163
163
  }
164
164
  }
165
165
  },
166
166
  "useHeft": {
167
167
  "standard": {
168
168
  "dependencies": {
169
- "tslib": "1.13.0"
169
+ "tslib": "2.3.1"
170
170
  },
171
171
  "devDependencies": {
172
172
  "@microsoft/rush-stack-compiler-3.9": "0.4.47",
173
- "@microsoft/sp-tslint-rules": "1.15.0-beta.1",
174
- "@microsoft/spfx-web-build-rig": "1.15.0-beta.1",
173
+ "@microsoft/sp-tslint-rules": "1.15.0-beta.6",
174
+ "@microsoft/spfx-web-build-rig": "1.15.0-beta.6",
175
175
  "@rushstack/heft": "0.44.2",
176
176
  "@types/webpack-env": "~1.15.2"
177
177
  }
@@ -181,17 +181,41 @@
181
181
  "useGulp": {
182
182
  "standard": {
183
183
  "dependencies": {
184
- "tslib": "1.13.0"
184
+ "tslib": "2.3.1"
185
185
  },
186
186
  "devDependencies": {
187
187
  "@microsoft/rush-stack-compiler-3.9": "0.4.47",
188
- "@microsoft/sp-tslint-rules": "1.15.0-beta.1",
189
- "@microsoft/sp-build-web": "1.15.0-beta.1",
188
+ "@microsoft/sp-tslint-rules": "1.15.0-beta.6",
189
+ "@microsoft/sp-build-web": "1.15.0-beta.6",
190
190
  "@types/webpack-env": "~1.15.2",
191
191
  "ajv": "^6.12.5",
192
192
  "gulp": "4.0.2"
193
193
  }
194
194
  },
195
195
  "plusBeta": null
196
+ },
197
+ "formCustomizer": {
198
+ "standard": {
199
+ "dependencies": {
200
+ "@microsoft/sp-core-library": "1.15.0-beta.6",
201
+ "@microsoft/sp-listview-extensibility": "1.15.0-beta.6",
202
+ "@microsoft/sp-lodash-subset": "1.15.0-beta.6",
203
+ "@microsoft/sp-office-ui-fabric-core": "1.15.0-beta.6"
204
+ },
205
+ "devDependencies": {
206
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
207
+ }
208
+ },
209
+ "plusBeta": {
210
+ "dependencies": {
211
+ "@microsoft/sp-core-library": "1.15.0-beta.6",
212
+ "@microsoft/sp-listview-extensibility": "1.15.0-beta.6",
213
+ "@microsoft/sp-lodash-subset": "1.15.0-beta.6",
214
+ "@microsoft/sp-office-ui-fabric-core": "1.15.0-beta.6"
215
+ },
216
+ "devDependencies": {
217
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.6"
218
+ }
219
+ }
196
220
  }
197
221
  }
@@ -1,2 +1,2 @@
1
- export default function spsay(solutionName: string): string;
1
+ export default function spsay(solutionName: string, useHeft: boolean): string;
2
2
  //# sourceMappingURL=spsay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spsay.d.ts","sourceRoot":"","sources":["../../src/common/spsay.ts"],"names":[],"mappings":"AAuDA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAK1D"}
1
+ {"version":3,"file":"spsay.d.ts","sourceRoot":"","sources":["../../src/common/spsay.ts"],"names":[],"mappings":"AAuDA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAK5E"}
@@ -22,16 +22,16 @@ function times(n, character) {
22
22
  function space(n) {
23
23
  return times(n, ' ');
24
24
  }
25
- function getWords(solutionName) {
25
+ function getWords(solutionName, useHeft) {
26
26
  const words = [
27
- 'Congratulations!',
28
- 'Solution ' + solutionName + ' is created.',
29
- 'Run gulp serve to play with it!'
27
+ `Congratulations!`,
28
+ `Solution ${solutionName} is created.`,
29
+ `Run ${useHeft ? 'npm run start' : 'gulp serve'} to play with it!`
30
30
  ];
31
31
  const colorWords = [
32
- 'Congratulations!',
33
- 'Solution ' + colors_1.default.cyan(solutionName) + ' is created.',
34
- 'Run ' + colors_1.default.yellow('gulp serve') + ' to play with it!'
32
+ `Congratulations!`,
33
+ `Solution ${colors_1.default.cyan(solutionName)} is created.`,
34
+ `Run ${colors_1.default.yellow(useHeft ? 'npm run start' : 'gulp serve')} to play with it!`
35
35
  ];
36
36
  const maxLength = Math.max.apply(undefined, words.map((word) => word.length));
37
37
  const formatted = colorWords.map((word, index) => {
@@ -46,9 +46,9 @@ function getWords(solutionName) {
46
46
  .concat(["'" + times(maxLength + 4, '-') + "'"]);
47
47
  return wrapped;
48
48
  }
49
- function spsay(solutionName) {
49
+ function spsay(solutionName, useHeft) {
50
50
  const colorLogo = logo.map((line) => colors_1.default.cyan(line));
51
- const words = getWords(solutionName);
51
+ const words = getWords(solutionName, useHeft);
52
52
  const lines = lodash.zip(colorLogo, words).map((parts) => parts.join(''));
53
53
  return '\n' + lines.join('\n') + '\n';
54
54
  }
@@ -15,7 +15,7 @@ export class QuickView extends BaseAdaptiveCardView<
15
15
  public get data(): IQuickViewData {
16
16
  return {
17
17
  subTitle: strings.SubTitle,
18
- title: strings.Title,
18
+ title: strings.Title
19
19
  };
20
20
  }
21
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/app/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAIzE,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAY1C,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,WACf,SAAQ,YAAY,EAClB,QAAQ,CAAC,gBAAgB,EACzB,SAAS,CAAC,yBAAyB;CAAG;AAE1C,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACjE,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,WAAW,GACnB,IAAI,CAEN"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/app/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAIzE,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAa1C,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,WACf,SAAQ,YAAY,EAClB,QAAQ,CAAC,gBAAgB,EACzB,SAAS,CAAC,yBAAyB;CAAG;AAE1C,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACjE,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,WAAW,GACnB,IAAI,CAEN"}
@@ -40,6 +40,7 @@ const FieldCustomizer = __importStar(require("../fieldCustomizer"));
40
40
  const CommandSet = __importStar(require("../commandSet"));
41
41
  const SearchQueryModifier = __importStar(require("../searchQueryModifier"));
42
42
  const ApplicationCustomizer = __importStar(require("../applicationCustomizer"));
43
+ const FormCustomizer = __importStar(require("../formCustomizer"));
43
44
  const VERSION = require('../../../package.json').version;
44
45
  function composeWith(base, options) {
45
46
  Utils.compose(path.basename(__dirname), base, options);
@@ -145,6 +146,7 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
145
146
  CommandSet.composeWith(this, baseOption);
146
147
  SearchQueryModifier.composeWith(this, baseOption);
147
148
  ApplicationCustomizer.composeWith(this, baseOption);
149
+ FormCustomizer.composeWith(this, baseOption);
148
150
  }
149
151
  prompting() {
150
152
  // Configure the solution root folder before other composition.
@@ -164,7 +166,8 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
164
166
  }
165
167
  end() {
166
168
  const libraryName = YeomanConfiguration_1.YeomanConfiguration.libraryName;
167
- this.log((0, spsay_1.default)(libraryName));
169
+ const useHeft = YeomanConfiguration_1.YeomanConfiguration.useHeft;
170
+ this.log((0, spsay_1.default)(libraryName, useHeft));
168
171
  }
169
172
  _provideRetirementNote() {
170
173
  this.log(colors_1.default.bold(`See ${colors_1.default.underline(colors_1.default.blue('https://aka.ms/spfx-yeoman-info'))} for more information on how to use this generator.`));
@@ -55,7 +55,7 @@ export default class <%= componentClassName %> extends BaseListViewCommandSet<I<
55
55
  const compareOneCommand: Command = this.tryGetCommand('COMMAND_1');
56
56
  if (compareOneCommand) {
57
57
  // This command should be hidden unless exactly one row is selected.
58
- compareOneCommand.visible = this.context.listView.selectedRows.length === 1;
58
+ compareOneCommand.visible = this.context.listView.selectedRows!.length === 1;
59
59
  }
60
60
 
61
61
  // TODO: Add your logic here
@@ -1,6 +1,6 @@
1
1
  import { BaseGenerator, IBaseOptions } from '../../common/BaseGenerator';
2
2
  import * as BaseComponent from '../component/BaseComponentGenerator';
3
- export declare type AvailableExtensions = 'ApplicationCustomizer' | 'CommandSet' | 'FieldCustomizer' | 'SearchQueryModifier';
3
+ export declare type AvailableExtensions = 'ApplicationCustomizer' | 'CommandSet' | 'FieldCustomizer' | 'SearchQueryModifier' | 'FormCustomizer';
4
4
  export interface IBaseExtensionOptions extends BaseComponent.IBaseComponentOptions {
5
5
  }
6
6
  export interface IBaseExtensionContext extends BaseComponent.IBaseComponentContext {
@@ -12,6 +12,7 @@ export declare abstract class BaseExtensionGenerator<IOptions extends IBaseExten
12
12
  writing(shouldCopy?: boolean): void;
13
13
  install(): void;
14
14
  protected abstract includeClientSideInstances(): boolean;
15
+ protected addFeature(): void;
15
16
  protected hasElementsXml(): boolean;
16
17
  private _getFeatureFrameworkDocsUrl;
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BaseExtensionGenerator.d.ts","sourceRoot":"","sources":["../../../src/generators/extension/BaseExtensionGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,oBAAY,mBAAmB,GAC3B,uBAAuB,GACvB,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,qBAAsB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AACrF,MAAM,WAAW,qBAAsB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAErF,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACnE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAC5C,IAAI,GAAE,MAAoB,GACzB,IAAI,CAEN;AAED,8BAAsB,sBAAsB,CAC1C,QAAQ,SAAS,qBAAqB,EACtC,QAAQ,SAAS,qBAAqB,CACtC,SAAQ,aAAa,CAAC,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAChE,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAgB;IAE9C,WAAW,IAAI,IAAI;IAQnB,OAAO,CAAC,UAAU,GAAE,OAAc,GAAG,IAAI;IAoBzC,OAAO,IAAI,IAAI;IAItB,SAAS,CAAC,QAAQ,CAAC,0BAA0B,IAAI,OAAO;IAExD,SAAS,CAAC,cAAc,IAAI,OAAO;IAKnC,OAAO,CAAC,2BAA2B;CAgBpC"}
1
+ {"version":3,"file":"BaseExtensionGenerator.d.ts","sourceRoot":"","sources":["../../../src/generators/extension/BaseExtensionGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,oBAAY,mBAAmB,GAC3B,uBAAuB,GACvB,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,GACrB,gBAAgB,CAAC;AAErB,MAAM,WAAW,qBAAsB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AACrF,MAAM,WAAW,qBAAsB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAErF,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACnE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAC5C,IAAI,GAAE,MAAoB,GACzB,IAAI,CAEN;AAED,8BAAsB,sBAAsB,CAC1C,QAAQ,SAAS,qBAAqB,EACtC,QAAQ,SAAS,qBAAqB,CACtC,SAAQ,aAAa,CAAC,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAChE,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAgB;IAE9C,WAAW,IAAI,IAAI;IAMnB,OAAO,CAAC,UAAU,GAAE,OAAc,GAAG,IAAI;IAoBzC,OAAO,IAAI,IAAI;IAItB,SAAS,CAAC,QAAQ,CAAC,0BAA0B,IAAI,OAAO;IAExD,SAAS,CAAC,UAAU,IAAI,IAAI;IAM5B,SAAS,CAAC,cAAc,IAAI,OAAO;IAKnC,OAAO,CAAC,2BAA2B;CAkBpC"}
@@ -40,9 +40,7 @@ class BaseExtensionGenerator extends BaseComponent.BaseComponentGenerator {
40
40
  configuring() {
41
41
  super.configuring();
42
42
  this.ensureDependencyGroup('extension');
43
- if (!this.hasElementsXml()) {
44
- this.packageSolutionJson.addExtensionFeature(Utils.generateGuid(), this.includeClientSideInstances());
45
- }
43
+ this.addFeature();
46
44
  }
47
45
  writing(shouldCopy = true) {
48
46
  super.writing(shouldCopy);
@@ -62,6 +60,11 @@ class BaseExtensionGenerator extends BaseComponent.BaseComponentGenerator {
62
60
  install() {
63
61
  super.install();
64
62
  }
63
+ addFeature() {
64
+ if (!this.hasElementsXml()) {
65
+ this.packageSolutionJson.addExtensionFeature(Utils.generateGuid(), this.includeClientSideInstances());
66
+ }
67
+ }
65
68
  hasElementsXml() {
66
69
  const elementsXmlPath = path.join(this.destinationRoot(), 'sharepoint', 'assets', 'elements.xml');
67
70
  return node_core_library_1.FileSystem.exists(elementsXmlPath);
@@ -77,6 +80,8 @@ class BaseExtensionGenerator extends BaseComponent.BaseComponentGenerator {
77
80
  return 'https://aka.ms/spfx/extensions/tutorial/helloworld3';
78
81
  case 'SearchQueryModifier':
79
82
  return 'https://aka.ms/spfx/extensions/search';
83
+ case 'FormCustomizer':
84
+ return ''; // TODO: add form customizer docs url
80
85
  default:
81
86
  return '';
82
87
  }
@@ -3,7 +3,8 @@ import * as ApplicationCustomizer from '../applicationCustomizer';
3
3
  import * as CommandSet from '../commandSet';
4
4
  import * as FieldCustomizer from '../fieldCustomizer';
5
5
  import * as BaseExtension from './BaseExtensionGenerator';
6
- export interface IExtensionOptions extends FieldCustomizer.IFieldCustomizerOptions, CommandSet.ICommandSetOptions, ApplicationCustomizer.IApplicationCustomizerOptions {
6
+ import * as FormCustomizer from '../formCustomizer';
7
+ export interface IExtensionOptions extends FieldCustomizer.IFieldCustomizerOptions, CommandSet.ICommandSetOptions, ApplicationCustomizer.IApplicationCustomizerOptions, FormCustomizer.IFormCustomizerOptions {
7
8
  extensionType: BaseExtension.AvailableExtensions;
8
9
  }
9
10
  export declare function defineOptions<TOptions extends IBaseOptions, TContext>(generator: BaseGenerator<TOptions, TContext>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/extension/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEzE,OAAO,KAAK,qBAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAE1D,MAAM,WAAW,iBACf,SAAQ,eAAe,CAAC,uBAAuB,EAC7C,UAAU,CAAC,kBAAkB,EAC7B,qBAAqB,CAAC,6BAA6B;IACrD,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;CAClD;AAED,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACnE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC3C,IAAI,CAON;AAED,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACjE,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,YAAY,GACpB,IAAI,CAEN;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,aAAa,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAClF,SAAgB,YAAY,EAAE,MAAM,CAAyB;IAEtD,YAAY,IAAI,IAAI;IAId,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyDhC,WAAW,IAAI,IAAI;IAGnB,OAAO,IAAI,IAAI;IAGf,OAAO,IAAI,IAAI;IAGf,GAAG,IAAI,IAAI;IAIlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,iBAAiB;IAIzE,OAAO,CAAC,aAAa;CAGtB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/extension/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEzE,OAAO,KAAK,qBAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,iBACf,SAAQ,eAAe,CAAC,uBAAuB,EAC7C,UAAU,CAAC,kBAAkB,EAC7B,qBAAqB,CAAC,6BAA6B,EACnD,cAAc,CAAC,sBAAsB;IACvC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;CAClD;AAED,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACnE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC3C,IAAI,CAQN;AAED,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACjE,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,YAAY,GACpB,IAAI,CAEN;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,aAAa,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAClF,SAAgB,YAAY,EAAE,MAAM,CAAyB;IAEtD,YAAY,IAAI,IAAI;IAId,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA8DhC,WAAW,IAAI,IAAI;IAGnB,OAAO,IAAI,IAAI;IAGf,OAAO,IAAI,IAAI;IAGf,GAAG,IAAI,IAAI;IAIlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,iBAAiB;IAIzE,OAAO,CAAC,aAAa;CAGtB"}
@@ -29,11 +29,13 @@ const BaseGenerator_1 = require("../../common/BaseGenerator");
29
29
  const Utils = __importStar(require("../../common/utilities"));
30
30
  const CommandSet = __importStar(require("../commandSet"));
31
31
  const FieldCustomizer = __importStar(require("../fieldCustomizer"));
32
+ const FormCustomizer = __importStar(require("../formCustomizer"));
32
33
  function defineOptions(generator) {
33
34
  FieldCustomizer.defineOptions(generator);
34
35
  CommandSet.defineOptions(generator);
36
+ FormCustomizer.defineOptions(generator);
35
37
  generator.option('extension-type', {
36
- description: `The type of extension. Currently "ApplicationCustomizer", "FieldCustomizer", "ListViewCommandSet", or "SearchQueryModifier" (beta)`,
38
+ description: `The type of extension. Currently "ApplicationCustomizer", "FieldCustomizer", "ListViewCommandSet", "FormCustomizer", or "SearchQueryModifier" (beta)`,
37
39
  type: String
38
40
  });
39
41
  }
@@ -70,6 +72,10 @@ class ExtensionSelectorGenerator extends BaseGenerator_1.BaseGenerator {
70
72
  {
71
73
  name: 'ListView Command Set',
72
74
  value: 'ListViewCommandSet'
75
+ },
76
+ {
77
+ name: 'Form Customizer',
78
+ value: 'FormCustomizer'
73
79
  }
74
80
  ];
75
81
  if (this.config.get('plusBeta') === true) {
@@ -1,3 +1,3 @@
1
- .<%= componentName %> {
1
+ .<%= componentNameCamelCase %> {
2
2
  color: inherit;
3
3
  }
@@ -20,7 +20,7 @@ export default class <%= componentClassName %>
20
20
  }
21
21
 
22
22
  public onRenderCell(event: IFieldCustomizerCellEventParameters): void {
23
- event.domElement.classList.add(styles.<%= componentName %>);
23
+ event.domElement.classList.add(styles.<%= componentNameCamelCase %>);
24
24
  }
25
25
 
26
26
  public onDisposeCell(event: IFieldCustomizerCellEventParameters): void {
@@ -1,4 +1,4 @@
1
- .<%= componentName %> {
1
+ .<%= componentNameCamelCase %> {
2
2
  background-color: "[theme:themePrimary, default:#0078d4]";
3
3
  color: "[theme:white, default:#ffffff]";
4
4
  text-align: center;
@@ -37,7 +37,7 @@ export default class <%= componentClassName %>
37
37
 
38
38
  event.domElement.innerText = text;
39
39
 
40
- event.domElement.classList.add(styles.<%= componentName %>);
40
+ event.domElement.classList.add(styles.<%= componentNameCamelCase %>);
41
41
  }
42
42
 
43
43
  public onDisposeCell(event: IFieldCustomizerCellEventParameters): void {
@@ -1,4 +1,4 @@
1
- .<%= componentName %> {
1
+ .<%= componentNameCamelCase %> {
2
2
  background-color: "[theme:themePrimary, default:#0078d4]";
3
3
  color: "[theme:white, default:#ffffff]";
4
4
  text-align: center;
@@ -20,7 +20,7 @@ export default class <%= componentName %> extends React.Component<I<%= component
20
20
 
21
21
  public render(): React.ReactElement<{}> {
22
22
  return (
23
- <div className={styles.<%= componentName %>}>
23
+ <div className={styles.<%= componentNameCamelCase %>}>
24
24
  { this.props.text }
25
25
  </div>
26
26
  );
@@ -0,0 +1,24 @@
1
+ import { IBaseOptions, BaseGenerator, AvailableTemplates } from '../../common/BaseGenerator';
2
+ import * as BaseExtension from '../extension/BaseExtensionGenerator';
3
+ export interface IFormCustomizerOptions extends BaseExtension.IBaseExtensionOptions {
4
+ }
5
+ export interface IFormCustomizerContext extends BaseExtension.IBaseExtensionContext {
6
+ }
7
+ export declare function composeWith<TOptions extends IBaseOptions, TContext>(base: BaseGenerator<TOptions, TContext>, options: IBaseOptions): void;
8
+ export declare function defineOptions<TOptions extends IBaseOptions, TContext>(generator: BaseGenerator<TOptions, TContext>): void;
9
+ export declare class FormCustomizerGenerator extends BaseExtension.BaseExtensionGenerator<IFormCustomizerOptions, IFormCustomizerContext> {
10
+ protected readonly friendlyName: string;
11
+ protected readonly codeName: string;
12
+ protected readonly allowedTemplates: AvailableTemplates[];
13
+ initializing(): void;
14
+ prompting(): Promise<void>;
15
+ configuring(): void;
16
+ writing(): void;
17
+ install(): void;
18
+ end(): void;
19
+ protected constructor(args: string | string[], options: IFormCustomizerOptions);
20
+ protected addFeature(): void;
21
+ protected includeClientSideInstances(): boolean;
22
+ private shouldExecute;
23
+ }
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/formCustomizer/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAI7F,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,MAAM,WAAW,sBAAuB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AACtF,MAAM,WAAW,sBAAuB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAEtF,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACjE,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,YAAY,GACpB,IAAI,CAEN;AAED,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACnE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC3C,IAAI,CAEN;AAED,qBAAa,uBAAwB,SAAQ,aAAa,CAAC,sBAAsB,CAC/E,sBAAsB,EACtB,sBAAsB,CACvB;IACC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAqB;IAC5D,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAoB;IACvD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAqB;IAEvE,YAAY,IAAI,IAAI;IAIpB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ1B,WAAW,IAAI,IAAI;IAmDnB,OAAO,IAAI,IAAI;IAgBf,OAAO,IAAI,IAAI;IAMf,GAAG,IAAI,IAAI;IAIlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,sBAAsB;IAK9E,SAAS,CAAC,UAAU,IAAI,IAAI;IAY5B,SAAS,CAAC,0BAA0B,IAAI,OAAO;IAI/C,OAAO,CAAC,aAAa;CAOtB"}
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.FormCustomizerGenerator = exports.defineOptions = exports.composeWith = void 0;
23
+ const path = __importStar(require("path"));
24
+ const Utils = __importStar(require("../../common/utilities"));
25
+ const YeomanConfiguration_1 = require("../../common/YeomanConfiguration");
26
+ const BaseExtension = __importStar(require("../extension/BaseExtensionGenerator"));
27
+ function composeWith(base, options) {
28
+ Utils.compose(path.basename(__dirname), base, options);
29
+ }
30
+ exports.composeWith = composeWith;
31
+ function defineOptions(generator) {
32
+ BaseExtension.defineOptions(generator, 'Form Customizer');
33
+ }
34
+ exports.defineOptions = defineOptions;
35
+ class FormCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
36
+ constructor(args, options) {
37
+ super(args, options);
38
+ this.friendlyName = 'Form Customizer';
39
+ this.codeName = 'FormCustomizer';
40
+ this.allowedTemplates = ['react', 'none'];
41
+ defineOptions(this);
42
+ }
43
+ initializing() {
44
+ /* no-op */
45
+ }
46
+ prompting() {
47
+ this.ensureCorrectFolder();
48
+ if (!this.shouldExecute()) {
49
+ return Promise.resolve();
50
+ }
51
+ return super.prompting();
52
+ }
53
+ configuring() {
54
+ if (this.shouldExecute()) {
55
+ super.configuring();
56
+ this.ensureDependencyGroup('formCustomizer');
57
+ // New Form
58
+ this.serveJson.addConfiguration(`${this.context.componentNameCamelCase}_NewForm`, {
59
+ pageUrl: 'https://contoso.sharepoint.com/sites/mySite/_layouts/15/SPListForm.aspx',
60
+ formCustomizer: {
61
+ componentId: this.context.componentId,
62
+ PageType: 8,
63
+ RootFolder: '/sites/mySite/Lists/MyList',
64
+ ContentTypeID: '0x0100',
65
+ properties: {
66
+ sampleText: 'Value'
67
+ }
68
+ }
69
+ });
70
+ // Edit Form
71
+ this.serveJson.addConfiguration(`${this.context.componentNameCamelCase}_EditForm`, {
72
+ pageUrl: 'https://contoso.sharepoint.com/sites/mySite/_layouts/15/SPListForm.aspx',
73
+ formCustomizer: {
74
+ componentId: this.context.componentId,
75
+ PageType: 6,
76
+ RootFolder: '/sites/mySite/Lists/MyList',
77
+ ContentTypeID: '0x0100',
78
+ ID: 1,
79
+ properties: {
80
+ sampleText: 'Value'
81
+ }
82
+ }
83
+ });
84
+ // View Form
85
+ this.serveJson.addConfiguration(`${this.context.componentNameCamelCase}_ViewForm`, {
86
+ pageUrl: 'https://contoso.sharepoint.com/sites/mySite/_layouts/15/SPListForm.aspx',
87
+ formCustomizer: {
88
+ componentId: this.context.componentId,
89
+ PageType: 4,
90
+ RootFolder: '/sites/mySite/Lists/MyList',
91
+ ContentTypeID: '0x0100',
92
+ ID: 1,
93
+ properties: {
94
+ sampleText: 'Value'
95
+ }
96
+ }
97
+ });
98
+ }
99
+ }
100
+ writing() {
101
+ if (this.shouldExecute()) {
102
+ super.writing(false);
103
+ const dest = this._getOutputFolder(this.context.componentNameCamelCase);
104
+ const template = this.context.template;
105
+ this.copyTemplate(path.join(this.sourceRoot(), template), dest);
106
+ if (template !== 'minimal') {
107
+ this.copyTemplate(path.join(this.sourceRoot(), 'loc'), path.join(dest, 'loc'));
108
+ }
109
+ this.copyTemplate(path.join(this.sourceRoot(), 'base'), dest);
110
+ }
111
+ }
112
+ install() {
113
+ if (this.shouldExecute()) {
114
+ super.install();
115
+ }
116
+ }
117
+ end() {
118
+ /* no-op */
119
+ }
120
+ addFeature() {
121
+ if (!this.hasElementsXml()) {
122
+ const solutionName = YeomanConfiguration_1.YeomanConfiguration.libraryName;
123
+ this.packageSolutionJson.addFeature(Utils.generateGuid(), `${solutionName} Feature`, `The feature that activates elements of the ${solutionName} solution.`, false);
124
+ }
125
+ }
126
+ includeClientSideInstances() {
127
+ return false;
128
+ }
129
+ shouldExecute() {
130
+ return (this.config.get('environment') === 'spo' &&
131
+ this.config.get('componentType') === 'extension' &&
132
+ this.config.get('extensionType') === 'FormCustomizer');
133
+ }
134
+ }
135
+ exports.FormCustomizerGenerator = FormCustomizerGenerator;
136
+ // Yeoman expects exports of this type, which overrides the TS exports above
137
+ // Ensure that anything marked as export above is also listed here
138
+ module.exports = FormCustomizerGenerator;
139
+ module.exports.defineOptions = defineOptions;
140
+ module.exports.composeWith = composeWith;
141
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-extension-manifest.schema.json",
3
+
4
+ "id": "<%= componentId %>",
5
+ "alias": "<%= componentAlias %>",
6
+ "componentType": "Extension",
7
+ "extensionType": "FormCustomizer",
8
+
9
+ // The "*" signifies that the version should be taken from the package.json
10
+ "version": "*",
11
+ "manifestVersion": 2,
12
+
13
+ // If true, the component can only be installed on sites where Custom Script is allowed.
14
+ // Components that allow authors to embed arbitrary script code should set this to true.
15
+ // https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
16
+ "requiresCustomScript": false
17
+ }
@@ -0,0 +1,7 @@
1
+ define([], function() {
2
+ return {
3
+ "Save": "Save",
4
+ "Cancel": "Cancel",
5
+ "Close": "Close"
6
+ }
7
+ });
@@ -0,0 +1,10 @@
1
+ declare interface I<%= componentStrings %> {
2
+ Save: string;
3
+ Cancel: string;
4
+ Close: string;
5
+ }
6
+
7
+ declare module '<%= componentStrings %>' {
8
+ const strings: I<%= componentStrings %>;
9
+ export = strings;
10
+ }
@@ -0,0 +1,5 @@
1
+ .<%= componentNameCamelCase %> {
2
+ background-color: "[theme:white, default:#ffffff]";
3
+ color: "[theme:themePrimary, default:#0078d4]";
4
+ padding: 0.5rem;
5
+ }
@@ -0,0 +1,53 @@
1
+ import { Log } from '@microsoft/sp-core-library';
2
+ import {
3
+ BaseFormCustomizer
4
+ } from '@microsoft/sp-listview-extensibility';
5
+
6
+ import * as strings from '<%= componentStrings %>';
7
+ import styles from './<%= componentClassName %>.module.scss';
8
+
9
+ /**
10
+ * If your form customizer uses the ClientSideComponentProperties JSON input,
11
+ * it will be deserialized into the BaseExtension.properties object.
12
+ * You can define an interface to describe it.
13
+ */
14
+ export interface I<%= componentClassName %>Properties {
15
+ // This is an example; replace with your own property
16
+ sampleText?: string;
17
+ }
18
+
19
+ const LOG_SOURCE: string = '<%= componentClassName %>';
20
+
21
+ export default class <%= componentClassName %>
22
+ extends BaseFormCustomizer<I<%= componentClassName %>Properties> {
23
+
24
+ public onInit(): Promise<void> {
25
+ // Add your custom initialization to this method. The framework will wait
26
+ // for the returned promise to resolve before rendering the form.
27
+ Log.info(LOG_SOURCE, 'Activated <%= componentClassName %> with properties:');
28
+ Log.info(LOG_SOURCE, JSON.stringify(this.properties, undefined, 2));
29
+ return Promise.resolve();
30
+ }
31
+
32
+ public render(): void {
33
+ // Use this method to perform your custom rendering.
34
+ this.domElement.innerHTML = `<div class="${ styles.<%= componentNameCamelCase %> }"></div>`;
35
+ }
36
+
37
+ public onDispose(): void {
38
+ // This method should be used to free any resources that were allocated during rendering.
39
+ super.onDispose();
40
+ }
41
+
42
+ private _onSave = (): void => {
43
+
44
+ // You MUST call this.formSaved() after you save the form.
45
+ this.formSaved();
46
+ }
47
+
48
+ private _onClose = (): void => {
49
+
50
+ // You MUST call this.formClosed() after you close the form.
51
+ this.formClosed();
52
+ }
53
+ }
@@ -0,0 +1,5 @@
1
+ .<%= componentNameCamelCase %> {
2
+ background-color: "[theme:white, default:#ffffff]";
3
+ color: "[theme:themePrimary, default:#0078d4]";
4
+ padding: 0.5rem;
5
+ }
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import { Log, FormDisplayMode } from '@microsoft/sp-core-library';
3
+ import { FormCustomizerContext } from '@microsoft/sp-listview-extensibility';
4
+
5
+ import styles from './<%= componentName %>.module.scss';
6
+
7
+ export interface I<%= componentName %>Props {
8
+ context: FormCustomizerContext;
9
+ displayMode: FormDisplayMode;
10
+ onSave: () => void;
11
+ onClose: () => void;
12
+ }
13
+
14
+ const LOG_SOURCE: string = '<%= componentName %>';
15
+
16
+ export default class <%= componentName %> extends React.Component<I<%= componentName %>Props, {}> {
17
+ public componentDidMount(): void {
18
+ Log.info(LOG_SOURCE, 'React Element: <%= componentName %> mounted');
19
+ }
20
+
21
+ public componentWillUnmount(): void {
22
+ Log.info(LOG_SOURCE, 'React Element: <%= componentName %> unmounted');
23
+ }
24
+
25
+ public render(): React.ReactElement<{}> {
26
+ return <div className={styles.<%= componentNameCamelCase %>}></div>;
27
+ }
28
+ }
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+ import * as ReactDOM from 'react-dom';
3
+
4
+ import { Log } from '@microsoft/sp-core-library';
5
+ import {
6
+ BaseFormCustomizer
7
+ } from '@microsoft/sp-listview-extensibility';
8
+
9
+ import * as strings from '<%= componentStrings %>';
10
+ import <%= componentName %>, { I<%= componentName %>Props } from './components/<%= componentName %>';
11
+
12
+ /**
13
+ * If your field customizer uses the ClientSideComponentProperties JSON input,
14
+ * it will be deserialized into the BaseExtension.properties object.
15
+ * You can define an interface to describe it.
16
+ */
17
+ export interface I<%= componentClassName %>Properties {
18
+ // This is an example; replace with your own property
19
+ sampleText?: string;
20
+ }
21
+
22
+ const LOG_SOURCE: string = '<%= componentClassName %>';
23
+
24
+ export default class <%= componentClassName %>
25
+ extends BaseFormCustomizer<I<%= componentClassName %>Properties> {
26
+
27
+ public onInit(): Promise<void> {
28
+ // Add your custom initialization to this method. The framework will wait
29
+ // for the returned promise to resolve before rendering the form.
30
+ Log.info(LOG_SOURCE, 'Activated <%= componentClassName %> with properties:');
31
+ Log.info(LOG_SOURCE, JSON.stringify(this.properties, undefined, 2));
32
+ return Promise.resolve();
33
+ }
34
+
35
+ public render(): void {
36
+ // Use this method to perform your custom rendering.
37
+
38
+ const <%= componentNameCamelCase %>: React.ReactElement<{}> =
39
+ React.createElement(<%= componentName %>, {
40
+ context: this.context,
41
+ displayMode: this.displayMode,
42
+ onSave: this._onSave,
43
+ onClose: this._onClose
44
+ } as I<%= componentName %>Props);
45
+
46
+ ReactDOM.render(<%= componentNameCamelCase %>, this.domElement);
47
+ }
48
+
49
+ public onDispose(): void {
50
+ // This method should be used to free any resources that were allocated during rendering.
51
+ ReactDOM.unmountComponentAtNode(this.domElement);
52
+ super.onDispose();
53
+ }
54
+
55
+ private _onSave = (): void => {
56
+
57
+ // You MUST call this.formSaved() after you save the form.
58
+ this.formSaved();
59
+ }
60
+
61
+ private _onClose = (): void => {
62
+ // You MUST call this.formClosed() after you close the form.
63
+ this.formClosed();
64
+ }
65
+ }
@@ -150,6 +150,7 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
150
150
  YeomanConfiguration_1.YeomanConfiguration.environment = environment;
151
151
  YeomanConfiguration_1.YeomanConfiguration.packageManager =
152
152
  this.config.get('packageManager') || YeomanConfiguration_1.YeomanConfiguration.packageManager || 'npm';
153
+ YeomanConfiguration_1.YeomanConfiguration.useHeft = !!useHeft;
153
154
  this.config.set('solutionName', solutionName);
154
155
  this.config.set('useHeft', useHeft);
155
156
  this.config.set('environment', environment);
@@ -0,0 +1,13 @@
1
+ // Place your settings in this file to overwrite default and user settings.
2
+ {
3
+ // Configure glob patterns for excluding files and folders in the file explorer.
4
+ "files.exclude": {
5
+ "**/.git": true,
6
+ "**/.DS_Store": true,
7
+ "**/bower_components": true,
8
+ "**/coverage": true,
9
+ "**/lib-amd": true,
10
+ "src/**/*.scss.ts": true
11
+ },
12
+ "typescript.tsdk": ".\\node_modules\\typescript\\lib"
13
+ }
@@ -72,9 +72,12 @@ export default class <%= componentClassName %> extends BaseClientSideWebPart<I<%
72
72
  const {
73
73
  semanticColors
74
74
  } = currentTheme;
75
- this.domElement.style.setProperty('--bodyText', semanticColors.bodyText);
76
- this.domElement.style.setProperty('--link', semanticColors.link);
77
- this.domElement.style.setProperty('--linkHovered', semanticColors.linkHovered);
75
+
76
+ if (semanticColors) {
77
+ this.domElement.style.setProperty('--bodyText', semanticColors.bodyText || null);
78
+ this.domElement.style.setProperty('--link', semanticColors.link || null);
79
+ this.domElement.style.setProperty('--linkHovered', semanticColors.linkHovered || null);
80
+ }
78
81
 
79
82
  }
80
83
 
@@ -59,9 +59,12 @@ export default class <%= componentClassName %> extends BaseClientSideWebPart<I<%
59
59
  const {
60
60
  semanticColors
61
61
  } = currentTheme;
62
- this.domElement.style.setProperty('--bodyText', semanticColors.bodyText);
63
- this.domElement.style.setProperty('--link', semanticColors.link);
64
- this.domElement.style.setProperty('--linkHovered', semanticColors.linkHovered);
62
+
63
+ if (semanticColors) {
64
+ this.domElement.style.setProperty('--bodyText', semanticColors.bodyText || null);
65
+ this.domElement.style.setProperty('--link', semanticColors.link || null);
66
+ this.domElement.style.setProperty('--linkHovered', semanticColors.linkHovered || null);
67
+ }
65
68
 
66
69
  }
67
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/generator-sharepoint",
3
- "version": "1.15.0-beta.1",
3
+ "version": "1.15.0-beta.6",
4
4
  "description": "Yeoman generator for the SharePoint Framework",
5
5
  "scripts": {},
6
6
  "engines": {
@@ -13,7 +13,7 @@
13
13
  "homepage": "http://aka.ms/spfx",
14
14
  "main": "lib/generators/app/index.js",
15
15
  "dependencies": {
16
- "@microsoft/spfx-heft-plugins": "1.15.0-beta.1",
16
+ "@microsoft/spfx-heft-plugins": "1.15.0-beta.6",
17
17
  "@rushstack/node-core-library": "3.45.0",
18
18
  "colors": "~1.2.1",
19
19
  "lodash": "4.17.21",