@microsoft/generator-sharepoint 1.13.0 → 1.14.0-rc.2
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.
- package/lib/common/BaseGenerator.d.ts +2 -2
- package/lib/common/BaseGenerator.d.ts.map +1 -1
- package/lib/common/PackageSolutionJsonManager.d.ts +6 -0
- package/lib/common/PackageSolutionJsonManager.d.ts.map +1 -1
- package/lib/common/PackageSolutionJsonManager.js +57 -16
- package/lib/common/dependency/adaptiveCardExtension/firstParty.json +6 -6
- package/lib/common/dependency/adaptiveCardExtension/firstPartyPlusBeta.json +6 -6
- package/lib/common/dependency/applicationCustomizer.json +2 -2
- package/lib/common/dependency/applicationCustomizerPlusBeta.json +2 -2
- package/lib/common/dependency/commandSet.json +2 -2
- package/lib/common/dependency/commandSetPlusBeta.json +2 -2
- package/lib/common/dependency/extension/firstParty.json +5 -5
- package/lib/common/dependency/extension/firstPartyPlusBeta.json +5 -5
- package/lib/common/dependency/fieldCustomizer.json +1 -1
- package/lib/common/dependency/fieldCustomizerPlusBeta.json +1 -1
- package/lib/common/dependency/library/firstParty.json +3 -3
- package/lib/common/dependency/library/firstPartyPlusBeta.json +3 -3
- package/lib/common/dependency/searchQueryModifier.json +1 -1
- package/lib/common/dependency/searchQueryModifierPlusBeta.json +1 -1
- package/lib/common/dependency/webpart/firstParty.json +8 -8
- package/lib/common/dependency/webpart/firstPartyPlusBeta.json +8 -8
- package/lib/generators/adaptiveCardExtension/index.d.ts +2 -2
- package/lib/generators/adaptiveCardExtension/index.d.ts.map +1 -1
- package/lib/generators/adaptiveCardExtension/index.js +4 -1
- package/lib/generators/adaptiveCardExtension/templates/base/loc/en-us.js +5 -8
- package/lib/generators/adaptiveCardExtension/templates/base/loc/mystring.d.ts +1 -4
- package/lib/generators/adaptiveCardExtension/templates/basicCardView/CardView.ts +2 -1
- package/lib/generators/adaptiveCardExtension/templates/imageCardView/CardView.ts +2 -1
- package/lib/generators/adaptiveCardExtension/templates/manifestTemplate/baseTemplate/{componentClassName}.manifest.json +1 -3
- package/lib/generators/adaptiveCardExtension/templates/none/quickView/QuickView.ts +0 -2
- package/lib/generators/adaptiveCardExtension/templates/none/quickView/template/QuickViewTemplate.json +0 -5
- package/lib/generators/adaptiveCardExtension/templates/none/{componentClassName}.ts +1 -14
- package/lib/generators/adaptiveCardExtension/templates/none/{componentName}PropertyPane.ts +0 -8
- package/lib/generators/adaptiveCardExtension/templates/primaryTextCardView/CardView.ts +2 -1
- package/lib/generators/app/index.js +30 -5
- package/lib/generators/applicationCustomizer/index.d.ts +2 -2
- package/lib/generators/applicationCustomizer/index.d.ts.map +1 -1
- package/lib/generators/applicationCustomizer/index.js +1 -1
- package/lib/generators/applicationCustomizer/templates/none/{componentClassName}.ts +0 -2
- package/lib/generators/commandSet/index.d.ts +2 -2
- package/lib/generators/commandSet/index.d.ts.map +1 -1
- package/lib/generators/commandSet/index.js +1 -1
- package/lib/generators/commandSet/templates/none/{componentClassName}.ts +0 -4
- package/lib/generators/component/BaseComponentGenerator.d.ts +8 -4
- package/lib/generators/component/BaseComponentGenerator.d.ts.map +1 -1
- package/lib/generators/component/BaseComponentGenerator.js +22 -22
- package/lib/generators/component/index.d.ts.map +1 -1
- package/lib/generators/extension/BaseExtensionGenerator.d.ts +2 -1
- package/lib/generators/extension/BaseExtensionGenerator.d.ts.map +1 -1
- package/lib/generators/extension/BaseExtensionGenerator.js +25 -0
- package/lib/generators/fieldCustomizer/index.d.ts +2 -2
- package/lib/generators/fieldCustomizer/index.d.ts.map +1 -1
- package/lib/generators/fieldCustomizer/index.js +12 -2
- package/lib/generators/fieldCustomizer/templates/{base/loc → loc}/en-us.js +0 -0
- package/lib/generators/fieldCustomizer/templates/{base/loc → loc}/myStrings.d.ts +0 -0
- package/lib/generators/fieldCustomizer/templates/minimal/loc/en-us.js +4 -0
- package/lib/generators/fieldCustomizer/templates/minimal/loc/myStrings.d.ts +7 -0
- package/lib/generators/fieldCustomizer/templates/minimal/{componentClassName}.module.scss +3 -0
- package/lib/generators/fieldCustomizer/templates/minimal/{componentClassName}.ts +29 -0
- package/lib/generators/fieldCustomizer/templates/none/{componentClassName}.ts +0 -4
- package/lib/generators/fieldCustomizer/templates/react/components/{componentName}.tsx +0 -4
- package/lib/generators/fieldCustomizer/templates/react/{componentClassName}.ts +0 -4
- package/lib/generators/library/index.d.ts +2 -2
- package/lib/generators/library/index.d.ts.map +1 -1
- package/lib/generators/library/index.js +1 -1
- package/lib/generators/searchQueryModifier/index.d.ts +2 -2
- package/lib/generators/searchQueryModifier/index.d.ts.map +1 -1
- package/lib/generators/searchQueryModifier/index.js +1 -1
- package/lib/generators/searchQueryModifier/templates/none/{componentClassName}.ts +0 -3
- package/lib/generators/solution/index.d.ts +1 -0
- package/lib/generators/solution/index.d.ts.map +1 -1
- package/lib/generators/solution/index.js +18 -90
- package/lib/generators/solution/templates/base/.vscode/launch.json +1 -5
- package/lib/generators/webpart/index.d.ts +2 -2
- package/lib/generators/webpart/index.d.ts.map +1 -1
- package/lib/generators/webpart/index.js +13 -5
- package/lib/generators/webpart/templates/assets/welcome-dark.png +0 -0
- package/lib/generators/webpart/templates/assets/welcome-light.png +0 -0
- package/lib/generators/webpart/templates/loc/en-us.js +11 -0
- package/lib/generators/webpart/templates/{base/loc → loc}/mystrings.d.ts +4 -0
- package/lib/generators/webpart/templates/minimal/loc/en-us.js +4 -0
- package/lib/generators/webpart/templates/minimal/loc/mystrings.d.ts +7 -0
- package/lib/generators/webpart/templates/minimal/{componentClassName}.module.scss +3 -0
- package/lib/generators/webpart/templates/minimal/{componentClassName}.ts +22 -0
- package/lib/generators/webpart/templates/none/{componentClassName}.module.scss +22 -62
- package/lib/generators/webpart/templates/none/{componentClassName}.ts +57 -14
- package/lib/generators/webpart/templates/react/components/I{componentName}Props.ts +4 -0
- package/lib/generators/webpart/templates/react/components/{componentName}.module.scss +23 -63
- package/lib/generators/webpart/templates/react/components/{componentName}.tsx +31 -13
- package/lib/generators/webpart/templates/react/{componentClassName}.ts +38 -1
- package/package.json +3 -3
- package/lib/generators/solution/templates/base/.vscode/extensions.json +0 -5
- package/lib/generators/webpart/templates/base/loc/en-us.js +0 -7
- package/lib/generators/webpart/templates/officeAddin/initial.outlookManifest.xml +0 -91
|
@@ -5,8 +5,8 @@ import { PackageJsonManager } from './PackageJsonManager';
|
|
|
5
5
|
import { ConfigJsonManager } from './ConfigJsonManager';
|
|
6
6
|
import { ServeJsonManager } from './ServeJsonManager';
|
|
7
7
|
import { PackageSolutionJsonManager } from './PackageSolutionJsonManager';
|
|
8
|
-
export declare type
|
|
9
|
-
export declare type DependencyGroups = 'react' | 'none' | 'extension' | 'webpart' | 'applicationCustomizer' | 'fieldCustomizer' | 'commandSet' | 'searchQueryModifier' | 'library' | 'adaptiveCardExtension';
|
|
8
|
+
export declare type AvailableTemplates = 'react' | 'none' | 'minimal';
|
|
9
|
+
export declare type DependencyGroups = 'react' | 'none' | 'minimal' | 'extension' | 'webpart' | 'applicationCustomizer' | 'fieldCustomizer' | 'commandSet' | 'searchQueryModifier' | 'library' | 'adaptiveCardExtension';
|
|
10
10
|
export interface IBaseOptions {
|
|
11
11
|
'skip-install': boolean;
|
|
12
12
|
plusbeta: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseGenerator.d.ts","sourceRoot":"","sources":["../../src/common/BaseGenerator.ts"],"names":[],"mappings":"AAGA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E,o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
11
|
setUpSolution(solutionContext: ISolutionContext): void;
|
|
12
12
|
addExtensionFeature(featureId: string, includeClientSideInstance: boolean): void;
|
|
13
|
+
addFeature(featureId: string, title: string, description: string, includeAssets: boolean, includeClientSideInstance?: boolean): void;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the existing feature that doesn't have componentIds.
|
|
16
|
+
* We can use the same feature to add additional elements
|
|
17
|
+
*/
|
|
18
|
+
private _tryGetFeatureToReuse;
|
|
13
19
|
}
|
|
14
20
|
//# sourceMappingURL=PackageSolutionJsonManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageSolutionJsonManager.d.ts","sourceRoot":"","sources":["../../src/common/PackageSolutionJsonManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAuB,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,0BAA2B,SAAQ,WAAW,CAAC,gBAAgB,CAAC;IAC3E,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAA6B;WAExC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;WAqBxC,KAAK,IAAI,IAAI;IAI3B,WAAkB,QAAQ,IAAI,0BAA0B,CAEvD;IAEM,wBAAwB,IAAI,OAAO;IAQnC,aAAa,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"PackageSolutionJsonManager.d.ts","sourceRoot":"","sources":["../../src/common/PackageSolutionJsonManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAuB,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,0BAA2B,SAAQ,WAAW,CAAC,gBAAgB,CAAC;IAC3E,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAA6B;WAExC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;WAqBxC,KAAK,IAAI,IAAI;IAI3B,WAAkB,QAAQ,IAAI,0BAA0B,CAEvD;IAEM,wBAAwB,IAAI,OAAO;IAQnC,aAAa,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI;IA4CtD,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,yBAAyB,EAAE,OAAO,GAAG,IAAI;IAUhF,UAAU,CACf,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,OAAO,EACtB,yBAAyB,GAAE,OAAe,GACzC,IAAI;IAkDP;;;OAGG;IACH,OAAO,CAAC,qBAAqB;CAW9B"}
|
|
@@ -63,31 +63,72 @@ class PackageSolutionJsonManager extends JsonManager_1.JsonManager {
|
|
|
63
63
|
data.paths = {
|
|
64
64
|
zippedPackage: `solution/${solutionContext.libraryName}.sppkg`
|
|
65
65
|
};
|
|
66
|
+
data.solution.metadata = {
|
|
67
|
+
shortDescription: {
|
|
68
|
+
default: solutionContext.solutionShortDescription
|
|
69
|
+
},
|
|
70
|
+
longDescription: {
|
|
71
|
+
default: solutionContext.solutionShortDescription
|
|
72
|
+
},
|
|
73
|
+
screenshotPaths: [],
|
|
74
|
+
videoUrl: '',
|
|
75
|
+
categories: []
|
|
76
|
+
};
|
|
66
77
|
}
|
|
67
78
|
addExtensionFeature(featureId, includeClientSideInstance) {
|
|
79
|
+
this.addFeature(featureId, 'Application Extension - Deployment of custom action', 'Deploys a custom action with ClientSideComponentId association', true, includeClientSideInstance);
|
|
80
|
+
}
|
|
81
|
+
addFeature(featureId, title, description, includeAssets, includeClientSideInstance = false) {
|
|
68
82
|
const solution = this.data.solution;
|
|
69
83
|
if (!solution) {
|
|
70
84
|
// This should never happened as the solution has been set up
|
|
71
85
|
return;
|
|
72
86
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
let feature = this._tryGetFeatureToReuse(solution);
|
|
88
|
+
const isAddingFeature = !feature;
|
|
89
|
+
if (!feature) {
|
|
90
|
+
// we could use isAddingFeature flag but it leads to 'possibly undefined' error when using feature below
|
|
91
|
+
if (!solution.features) {
|
|
92
|
+
solution.features = [];
|
|
93
|
+
}
|
|
94
|
+
feature = {
|
|
95
|
+
title: title,
|
|
96
|
+
description: description,
|
|
97
|
+
id: featureId,
|
|
98
|
+
version: '1.0.0.0'
|
|
99
|
+
};
|
|
80
100
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
id: featureId,
|
|
85
|
-
version: '1.0.0.0',
|
|
86
|
-
assets: {
|
|
87
|
-
elementManifests: manifests
|
|
101
|
+
if (includeAssets) {
|
|
102
|
+
if (!feature.assets) {
|
|
103
|
+
feature.assets = {};
|
|
88
104
|
}
|
|
89
|
-
|
|
90
|
-
|
|
105
|
+
let manifests = feature.assets.elementManifests;
|
|
106
|
+
if (!manifests) {
|
|
107
|
+
manifests = feature.assets.elementManifests = ['elements.xml'];
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
if (manifests.indexOf('elements.xml') === -1) {
|
|
111
|
+
manifests.push('elements.xml');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (includeClientSideInstance && manifests.indexOf('ClientSideInstance.xml') === -1) {
|
|
115
|
+
manifests.push('ClientSideInstance.xml');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (isAddingFeature) {
|
|
119
|
+
solution.features.push(feature);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Returns the existing feature that doesn't have componentIds.
|
|
124
|
+
* We can use the same feature to add additional elements
|
|
125
|
+
*/
|
|
126
|
+
_tryGetFeatureToReuse(solution) {
|
|
127
|
+
if (!solution.features) {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
const noComponendIdsFeatures = solution.features.filter((feature) => !feature.componentIds || !feature.componentIds.length);
|
|
131
|
+
return noComponendIdsFeatures.length ? noComponendIdsFeatures[0] : undefined;
|
|
91
132
|
}
|
|
92
133
|
}
|
|
93
134
|
exports.PackageSolutionJsonManager = PackageSolutionJsonManager;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@microsoft/sp-core-library": "1.
|
|
4
|
-
"@microsoft/sp-property-pane": "1.
|
|
5
|
-
"@microsoft/sp-adaptive-card-extension-base": "1.
|
|
3
|
+
"@microsoft/sp-core-library": "1.14.0-rc.2",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.14.0-rc.2",
|
|
5
|
+
"@microsoft/sp-adaptive-card-extension-base": "1.14.0-rc.2"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@microsoft/sp-build-web": "1.
|
|
9
|
-
"@microsoft/sp-tslint-rules": "1.
|
|
10
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
8
|
+
"@microsoft/sp-build-web": "1.14.0-rc.2",
|
|
9
|
+
"@microsoft/sp-tslint-rules": "1.14.0-rc.2",
|
|
10
|
+
"@microsoft/sp-module-interfaces": "1.14.0-rc.2",
|
|
11
11
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@microsoft/sp-core-library": "1.
|
|
4
|
-
"@microsoft/sp-property-pane": "1.
|
|
5
|
-
"@microsoft/sp-adaptive-card-extension-base": "1.
|
|
3
|
+
"@microsoft/sp-core-library": "1.14.0-rc.2",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.14.0-rc.2",
|
|
5
|
+
"@microsoft/sp-adaptive-card-extension-base": "1.14.0-rc.2"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@microsoft/sp-build-web": "1.
|
|
9
|
-
"@microsoft/sp-tslint-rules": "1.
|
|
10
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
8
|
+
"@microsoft/sp-build-web": "1.14.0-rc.2",
|
|
9
|
+
"@microsoft/sp-tslint-rules": "1.14.0-rc.2",
|
|
10
|
+
"@microsoft/sp-module-interfaces": "1.14.0-rc.2",
|
|
11
11
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@microsoft/sp-core-library": "1.
|
|
4
|
-
"@microsoft/decorators": "1.
|
|
3
|
+
"@microsoft/sp-core-library": "1.14.0-rc.2",
|
|
4
|
+
"@microsoft/decorators": "1.14.0-rc.2"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@microsoft/sp-build-web": "1.
|
|
8
|
-
"@microsoft/sp-tslint-rules": "1.
|
|
9
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
7
|
+
"@microsoft/sp-build-web": "1.14.0-rc.2",
|
|
8
|
+
"@microsoft/sp-tslint-rules": "1.14.0-rc.2",
|
|
9
|
+
"@microsoft/sp-module-interfaces": "1.14.0-rc.2",
|
|
10
10
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@microsoft/sp-core-library": "1.
|
|
4
|
-
"@microsoft/decorators": "1.
|
|
3
|
+
"@microsoft/sp-core-library": "1.14.0-rc.2",
|
|
4
|
+
"@microsoft/decorators": "1.14.0-rc.2"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@microsoft/sp-build-web": "1.
|
|
8
|
-
"@microsoft/sp-tslint-rules": "1.
|
|
9
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
7
|
+
"@microsoft/sp-build-web": "1.14.0-rc.2",
|
|
8
|
+
"@microsoft/sp-tslint-rules": "1.14.0-rc.2",
|
|
9
|
+
"@microsoft/sp-module-interfaces": "1.14.0-rc.2",
|
|
10
10
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {},
|
|
3
3
|
"devDependencies": {
|
|
4
|
-
"@microsoft/sp-build-web": "1.
|
|
5
|
-
"@microsoft/sp-tslint-rules": "1.
|
|
6
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
4
|
+
"@microsoft/sp-build-web": "1.14.0-rc.2",
|
|
5
|
+
"@microsoft/sp-tslint-rules": "1.14.0-rc.2",
|
|
6
|
+
"@microsoft/sp-module-interfaces": "1.14.0-rc.2",
|
|
7
7
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {},
|
|
3
3
|
"devDependencies": {
|
|
4
|
-
"@microsoft/sp-build-web": "1.
|
|
5
|
-
"@microsoft/sp-tslint-rules": "1.
|
|
6
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
4
|
+
"@microsoft/sp-build-web": "1.14.0-rc.2",
|
|
5
|
+
"@microsoft/sp-tslint-rules": "1.14.0-rc.2",
|
|
6
|
+
"@microsoft/sp-module-interfaces": "1.14.0-rc.2",
|
|
7
7
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@microsoft/sp-core-library": "1.
|
|
4
|
-
"@microsoft/sp-property-pane": "1.
|
|
5
|
-
"@microsoft/sp-webpart-base": "1.
|
|
6
|
-
"@microsoft/sp-lodash-subset": "1.
|
|
7
|
-
"@microsoft/sp-office-ui-fabric-core": "1.
|
|
3
|
+
"@microsoft/sp-core-library": "1.14.0-rc.2",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.14.0-rc.2",
|
|
5
|
+
"@microsoft/sp-webpart-base": "1.14.0-rc.2",
|
|
6
|
+
"@microsoft/sp-lodash-subset": "1.14.0-rc.2",
|
|
7
|
+
"@microsoft/sp-office-ui-fabric-core": "1.14.0-rc.2"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@microsoft/sp-build-web": "1.
|
|
11
|
-
"@microsoft/sp-tslint-rules": "1.
|
|
12
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
10
|
+
"@microsoft/sp-build-web": "1.14.0-rc.2",
|
|
11
|
+
"@microsoft/sp-tslint-rules": "1.14.0-rc.2",
|
|
12
|
+
"@microsoft/sp-module-interfaces": "1.14.0-rc.2",
|
|
13
13
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@microsoft/sp-core-library": "1.
|
|
4
|
-
"@microsoft/sp-property-pane": "1.
|
|
5
|
-
"@microsoft/sp-webpart-base": "1.
|
|
6
|
-
"@microsoft/sp-lodash-subset": "1.
|
|
7
|
-
"@microsoft/sp-office-ui-fabric-core": "1.
|
|
3
|
+
"@microsoft/sp-core-library": "1.14.0-rc.2",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.14.0-rc.2",
|
|
5
|
+
"@microsoft/sp-webpart-base": "1.14.0-rc.2",
|
|
6
|
+
"@microsoft/sp-lodash-subset": "1.14.0-rc.2",
|
|
7
|
+
"@microsoft/sp-office-ui-fabric-core": "1.14.0-rc.2"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@microsoft/sp-build-web": "1.
|
|
11
|
-
"@microsoft/sp-tslint-rules": "1.
|
|
12
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
10
|
+
"@microsoft/sp-build-web": "1.14.0-rc.2",
|
|
11
|
+
"@microsoft/sp-tslint-rules": "1.14.0-rc.2",
|
|
12
|
+
"@microsoft/sp-module-interfaces": "1.14.0-rc.2",
|
|
13
13
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBaseOptions, BaseGenerator,
|
|
1
|
+
import { IBaseOptions, BaseGenerator, AvailableTemplates } from '../../common/BaseGenerator';
|
|
2
2
|
import * as BaseComponent from '../component/BaseComponentGenerator';
|
|
3
3
|
declare type IACETemplateType = 'Image' | 'PrimaryText' | 'Basic';
|
|
4
4
|
export interface IACEOptions extends BaseComponent.IBaseComponentOptions {
|
|
@@ -11,7 +11,7 @@ export declare function defineOptions<TOptions extends IBaseOptions, TContext>(g
|
|
|
11
11
|
export declare class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerator<IACEOptions, IACEContext> {
|
|
12
12
|
protected readonly friendlyName: string;
|
|
13
13
|
protected readonly codeName: string;
|
|
14
|
-
protected readonly
|
|
14
|
+
protected readonly allowedTemplates: AvailableTemplates[];
|
|
15
15
|
protected readonly folderName: string;
|
|
16
16
|
initializing(): void;
|
|
17
17
|
prompting(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/adaptiveCardExtension/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAA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IlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW;IAKnE,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,wBAAwB;CAOjC"}
|
|
@@ -27,6 +27,7 @@ const path = __importStar(require("path"));
|
|
|
27
27
|
const colors_1 = __importDefault(require("colors"));
|
|
28
28
|
const Utils = __importStar(require("../../common/utilities"));
|
|
29
29
|
const BaseComponent = __importStar(require("../component/BaseComponentGenerator"));
|
|
30
|
+
const YeomanConfiguration_1 = require("../../common/YeomanConfiguration");
|
|
30
31
|
function composeWith(base, options) {
|
|
31
32
|
Utils.compose(path.basename(__dirname), base, options);
|
|
32
33
|
}
|
|
@@ -40,7 +41,7 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
40
41
|
super(args, options);
|
|
41
42
|
this.friendlyName = 'Adaptive Card Extension';
|
|
42
43
|
this.codeName = 'AdaptiveCardExtension';
|
|
43
|
-
this.
|
|
44
|
+
this.allowedTemplates = [];
|
|
44
45
|
this.folderName = 'adaptiveCardExtensions';
|
|
45
46
|
defineOptions(this);
|
|
46
47
|
}
|
|
@@ -90,6 +91,8 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
90
91
|
if (this.shouldExecute()) {
|
|
91
92
|
super.configuring();
|
|
92
93
|
this.ensureDependencyGroup('adaptiveCardExtension');
|
|
94
|
+
const solutionName = YeomanConfiguration_1.YeomanConfiguration.libraryName;
|
|
95
|
+
this.packageSolutionJson.addFeature(Utils.generateGuid(), `${solutionName} Feature`, `The feature that activates elements of the ${solutionName} solution.`, false);
|
|
93
96
|
this.serveJson.setUpForWebParts();
|
|
94
97
|
}
|
|
95
98
|
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
define([], function() {
|
|
2
2
|
return {
|
|
3
|
-
"PropertyPaneDescription": "
|
|
4
|
-
"
|
|
5
|
-
"DescriptionFieldLabel": "Description Field",
|
|
6
|
-
"TitleFieldLabel": "Card Title",
|
|
7
|
-
"IconPropertyFieldLabel": "Card Icon",
|
|
3
|
+
"PropertyPaneDescription": "Write 1-3 sentences describing the functionality of this component.",
|
|
4
|
+
"TitleFieldLabel": "Card title",
|
|
8
5
|
"Title": "Adaptive Card Extension",
|
|
9
|
-
"SubTitle": "Quick
|
|
10
|
-
"Description": "Create your SPFx Adaptive Card Extension solution!",
|
|
6
|
+
"SubTitle": "Quick view",
|
|
11
7
|
"PrimaryText": "SPFx Adaptive Card Extension",
|
|
12
|
-
"
|
|
8
|
+
"Description": "Create your SPFx Adaptive Card Extension solution!",
|
|
9
|
+
"QuickViewButton": "Quick view"
|
|
13
10
|
}
|
|
14
11
|
});
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
declare interface I<%= componentStrings %> {
|
|
2
2
|
PropertyPaneDescription: string;
|
|
3
|
-
BasicGroupName: string;
|
|
4
|
-
DescriptionFieldLabel: string;
|
|
5
3
|
TitleFieldLabel: string;
|
|
6
|
-
IconPropertyFieldLabel: string;
|
|
7
4
|
Title: string;
|
|
8
5
|
SubTitle: string;
|
|
9
|
-
Description: string;
|
|
10
6
|
PrimaryText: string;
|
|
7
|
+
Description: string;
|
|
11
8
|
QuickViewButton: string;
|
|
12
9
|
}
|
|
13
10
|
|
|
@@ -25,7 +25,8 @@ export class CardView extends BaseBasicCardView<I<%= componentClassName %>Props,
|
|
|
25
25
|
|
|
26
26
|
public get data(): IBasicCardParameters {
|
|
27
27
|
return {
|
|
28
|
-
primaryText: strings.PrimaryText
|
|
28
|
+
primaryText: strings.PrimaryText,
|
|
29
|
+
title: this.properties.title
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -30,7 +30,8 @@ export class CardView extends BaseImageCardView<I<%= componentClassName %>Props,
|
|
|
30
30
|
public get data(): IImageCardParameters {
|
|
31
31
|
return {
|
|
32
32
|
primaryText: strings.PrimaryText,
|
|
33
|
-
imageUrl: require('../assets/MicrosoftLogo.png')
|
|
33
|
+
imageUrl: require('../assets/MicrosoftLogo.png'),
|
|
34
|
+
title: this.properties.title
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
"description": { "default": "<%= componentDescription %>" },
|
|
22
22
|
"officeFabricIconFontName": "SharePointLogo",
|
|
23
23
|
"properties": {
|
|
24
|
-
"title": "<%= componentNameUnescaped %>"
|
|
25
|
-
"description": "<%= componentDescription %>",
|
|
26
|
-
"iconProperty": "" // Default to sharepointlogo
|
|
24
|
+
"title": "<%= componentNameUnescaped %>"
|
|
27
25
|
}
|
|
28
26
|
}]
|
|
29
27
|
}
|
|
@@ -5,7 +5,6 @@ import { I<%= componentClassName %>Props, I<%= componentClassName %>State } from
|
|
|
5
5
|
export interface IQuickViewData {
|
|
6
6
|
subTitle: string;
|
|
7
7
|
title: string;
|
|
8
|
-
description: string;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
export class QuickView extends BaseAdaptiveCardView<
|
|
@@ -17,7 +16,6 @@ export class QuickView extends BaseAdaptiveCardView<
|
|
|
17
16
|
return {
|
|
18
17
|
subTitle: strings.SubTitle,
|
|
19
18
|
title: strings.Title,
|
|
20
|
-
description: this.properties.description
|
|
21
19
|
};
|
|
22
20
|
}
|
|
23
21
|
|
|
@@ -6,12 +6,9 @@ import { <%= componentName %>PropertyPane } from './<%= componentName %>Property
|
|
|
6
6
|
|
|
7
7
|
export interface I<%= componentClassName %>Props {
|
|
8
8
|
title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
iconProperty: string;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
export interface I<%= componentClassName %>State {
|
|
14
|
-
description: string;
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
const CARD_VIEW_REGISTRY_ID: string = '<%= componentName %>_CARD_VIEW';
|
|
@@ -24,9 +21,7 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
|
|
|
24
21
|
private _deferredPropertyPane: <%= componentName %>PropertyPane | undefined;
|
|
25
22
|
|
|
26
23
|
public onInit(): Promise<void> {
|
|
27
|
-
this.state = {
|
|
28
|
-
description: this.properties.description
|
|
29
|
-
};
|
|
24
|
+
this.state = { };
|
|
30
25
|
|
|
31
26
|
this.cardNavigator.register(CARD_VIEW_REGISTRY_ID, () => new CardView());
|
|
32
27
|
this.quickViewNavigator.register(QUICK_VIEW_REGISTRY_ID, () => new QuickView());
|
|
@@ -34,14 +29,6 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
|
|
|
34
29
|
return Promise.resolve();
|
|
35
30
|
}
|
|
36
31
|
|
|
37
|
-
public get title(): string {
|
|
38
|
-
return this.properties.title;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
protected get iconProperty(): string {
|
|
42
|
-
return this.properties.iconProperty || require('./assets/SharePointLogo.svg');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
32
|
protected loadPropertyPaneResources(): Promise<void> {
|
|
46
33
|
return import(
|
|
47
34
|
/* webpackChunkName: '<%= componentName %>-property-pane'*/
|
|
@@ -9,17 +9,9 @@ export class <%= componentName %>PropertyPane {
|
|
|
9
9
|
header: { description: strings.PropertyPaneDescription },
|
|
10
10
|
groups: [
|
|
11
11
|
{
|
|
12
|
-
groupName: strings.BasicGroupName,
|
|
13
12
|
groupFields: [
|
|
14
13
|
PropertyPaneTextField('title', {
|
|
15
14
|
label: strings.TitleFieldLabel
|
|
16
|
-
}),
|
|
17
|
-
PropertyPaneTextField('iconProperty', {
|
|
18
|
-
label: strings.IconPropertyFieldLabel
|
|
19
|
-
}),
|
|
20
|
-
PropertyPaneTextField('description', {
|
|
21
|
-
label: strings.DescriptionFieldLabel,
|
|
22
|
-
multiline: true
|
|
23
15
|
})
|
|
24
16
|
]
|
|
25
17
|
}
|
|
@@ -26,7 +26,8 @@ export class CardView extends BasePrimaryTextCardView<I<%= componentClassName %>
|
|
|
26
26
|
public get data(): IPrimaryTextCardParameters {
|
|
27
27
|
return {
|
|
28
28
|
primaryText: strings.PrimaryText,
|
|
29
|
-
description:
|
|
29
|
+
description: strings.Description,
|
|
30
|
+
title: this.properties.title
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
|