@microsoft/generator-sharepoint 1.13.0-beta.24 → 1.14.0-beta.4
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 +6 -2
- package/lib/generators/adaptiveCardExtension/index.d.ts.map +1 -1
- package/lib/generators/adaptiveCardExtension/index.js +23 -9
- package/lib/generators/adaptiveCardExtension/templates/base/assets/MicrosoftLogo.png +0 -0
- package/lib/generators/adaptiveCardExtension/templates/imageCardView/CardView.ts +22 -3
- package/lib/generators/adaptiveCardExtension/templates/{base → manifestTemplate/baseTemplate}/{componentClassName}.manifest.json +0 -0
- package/lib/generators/adaptiveCardExtension/templates/manifestTemplate/imageTemplate/{componentClassName}.manifest.json +30 -0
- package/lib/generators/app/index.js +31 -4
- 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 +18 -11
- package/lib/generators/component/index.d.ts +2 -1
- package/lib/generators/component/index.d.ts.map +1 -1
- package/lib/generators/component/index.js +4 -6
- 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 +1 -5
- package/lib/generators/fieldCustomizer/templates/react/components/{componentName}.tsx +1 -5
- 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 +26 -52
- 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/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,oBAAY,
|
|
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,oBAAY,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9D,oBAAY,gBAAgB,GACxB,OAAO,GACP,MAAM,GACN,SAAS,GACT,WAAW,GACX,SAAS,GACT,uBAAuB,GACvB,iBAAiB,GACjB,YAAY,GACZ,qBAAqB,GACrB,SAAS,GACT,uBAAuB,CAAC;AAE5B,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8BAAsB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,CAAE,SAAQ,MAAM,CAAC,QAAQ,CAAC;IACnG,SAAS,CAAC,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAAiC;IACpF,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAkB;IAEtD;;OAEG;IACI,OAAO,EAAE,QAAQ,CAAC;IAEzB,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IACxC,SAAS,CAAC,qBAAqB,EAAE,OAAO,CAAS;IAEjD,SAAS,KAAK,kBAAkB,IAAI,kBAAkB,CAQrD;IAED,SAAS,KAAK,UAAU,IAAI,iBAAiB,CAK5C;IAED,SAAS,KAAK,SAAS,IAAI,gBAAgB,CAK1C;IAED,SAAS,KAAK,mBAAmB,IAAI,0BAA0B,CAK9D;IAED,OAAO,CAAC,mBAAmB,CAAyC;IAEpE,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAa/B;;;;OAIG;IAEH,yFAAyF;aACzE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAEpD,0EAA0E;aAC1D,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAEjD,gFAAgF;aAChE,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAE5C,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,CAEjC;IAEF,8EAA8E;IACvE,OAAO,CAAC,UAAU,GAAE,OAAc,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAkBhE,8CAA8C;aAC9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAE/C,8CAA8C;aAC9B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAE3C,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ;IAmChE,SAAS,CAAC,UAAU,IAAI,OAAO;IAQ/B,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAMrC,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAiD9D,OAAO,CAAC,0BAA0B;IAWlC,OAAO,CAAC,cAAc;IAiCtB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,mBAAmB;IAK3B,OAAO,KAAK,iBAAiB,GAgC5B;IAED,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;CAQ/B"}
|
|
@@ -10,5 +10,11 @@ export declare class PackageSolutionJsonManager extends JsonManager<IPackageSolu
|
|
|
10
10
|
getSkipFeatureDeployment(): boolean;
|
|
11
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-beta.4",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.14.0-beta.4",
|
|
5
|
+
"@microsoft/sp-adaptive-card-extension-base": "1.14.0-beta.4"
|
|
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-beta.4",
|
|
9
|
+
"@microsoft/sp-tslint-rules": "1.14.0-beta.4",
|
|
10
|
+
"@microsoft/sp-module-interfaces": "1.14.0-beta.4",
|
|
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-beta.4",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.14.0-beta.4",
|
|
5
|
+
"@microsoft/sp-adaptive-card-extension-base": "1.14.0-beta.4"
|
|
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-beta.4",
|
|
9
|
+
"@microsoft/sp-tslint-rules": "1.14.0-beta.4",
|
|
10
|
+
"@microsoft/sp-module-interfaces": "1.14.0-beta.4",
|
|
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-beta.4",
|
|
4
|
+
"@microsoft/decorators": "1.14.0-beta.4"
|
|
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-beta.4",
|
|
8
|
+
"@microsoft/sp-tslint-rules": "1.14.0-beta.4",
|
|
9
|
+
"@microsoft/sp-module-interfaces": "1.14.0-beta.4",
|
|
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-beta.4",
|
|
4
|
+
"@microsoft/decorators": "1.14.0-beta.4"
|
|
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-beta.4",
|
|
8
|
+
"@microsoft/sp-tslint-rules": "1.14.0-beta.4",
|
|
9
|
+
"@microsoft/sp-module-interfaces": "1.14.0-beta.4",
|
|
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-beta.4",
|
|
5
|
+
"@microsoft/sp-tslint-rules": "1.14.0-beta.4",
|
|
6
|
+
"@microsoft/sp-module-interfaces": "1.14.0-beta.4",
|
|
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-beta.4",
|
|
5
|
+
"@microsoft/sp-tslint-rules": "1.14.0-beta.4",
|
|
6
|
+
"@microsoft/sp-module-interfaces": "1.14.0-beta.4",
|
|
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-beta.4",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.14.0-beta.4",
|
|
5
|
+
"@microsoft/sp-webpart-base": "1.14.0-beta.4",
|
|
6
|
+
"@microsoft/sp-lodash-subset": "1.14.0-beta.4",
|
|
7
|
+
"@microsoft/sp-office-ui-fabric-core": "1.14.0-beta.4"
|
|
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-beta.4",
|
|
11
|
+
"@microsoft/sp-tslint-rules": "1.14.0-beta.4",
|
|
12
|
+
"@microsoft/sp-module-interfaces": "1.14.0-beta.4",
|
|
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-beta.4",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.14.0-beta.4",
|
|
5
|
+
"@microsoft/sp-webpart-base": "1.14.0-beta.4",
|
|
6
|
+
"@microsoft/sp-lodash-subset": "1.14.0-beta.4",
|
|
7
|
+
"@microsoft/sp-office-ui-fabric-core": "1.14.0-beta.4"
|
|
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-beta.4",
|
|
11
|
+
"@microsoft/sp-tslint-rules": "1.14.0-beta.4",
|
|
12
|
+
"@microsoft/sp-module-interfaces": "1.14.0-beta.4",
|
|
13
13
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { IBaseOptions, BaseGenerator,
|
|
1
|
+
import { IBaseOptions, BaseGenerator, AvailableTemplates } from '../../common/BaseGenerator';
|
|
2
2
|
import * as BaseComponent from '../component/BaseComponentGenerator';
|
|
3
|
+
declare type IACETemplateType = 'Image' | 'PrimaryText' | 'Basic';
|
|
3
4
|
export interface IACEOptions extends BaseComponent.IBaseComponentOptions {
|
|
5
|
+
aceTemplateType: IACETemplateType;
|
|
4
6
|
}
|
|
5
7
|
export interface IACEContext extends BaseComponent.IBaseComponentContext {
|
|
6
8
|
}
|
|
@@ -9,7 +11,7 @@ export declare function defineOptions<TOptions extends IBaseOptions, TContext>(g
|
|
|
9
11
|
export declare class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerator<IACEOptions, IACEContext> {
|
|
10
12
|
protected readonly friendlyName: string;
|
|
11
13
|
protected readonly codeName: string;
|
|
12
|
-
protected readonly
|
|
14
|
+
protected readonly allowedTemplates: AvailableTemplates[];
|
|
13
15
|
protected readonly folderName: string;
|
|
14
16
|
initializing(): void;
|
|
15
17
|
prompting(): Promise<void>;
|
|
@@ -20,5 +22,7 @@ export declare class AdaptiveCardExtensionGenerator extends BaseComponent.BaseCo
|
|
|
20
22
|
protected constructor(args: string | string[], options: IACEOptions);
|
|
21
23
|
private shouldExecute;
|
|
22
24
|
private _getTemplatePath;
|
|
25
|
+
private _getManifestTemplatePath;
|
|
23
26
|
}
|
|
27
|
+
export {};
|
|
24
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/adaptiveCardExtension/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/adaptiveCardExtension/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE7F,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAGrE,aAAK,gBAAgB,GAAG,OAAO,GAAG,aAAa,GAAG,OAAO,CAAC;AAC1D,MAAM,WAAW,WAAY,SAAQ,aAAa,CAAC,qBAAqB;IACtE,eAAe,EAAE,gBAAgB,CAAC;CACnC;AAED,MAAM,WAAW,WAAY,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAE3E,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,8BAA+B,SAAQ,aAAa,CAAC,sBAAsB,CACtF,WAAW,EACX,WAAW,CACZ;IACC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAA6B;IACpE,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAA2B;IAC9D,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAM;IAC/D,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAA4B;IAE1D,YAAY,IAAI,IAAI;IAIpB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyC1B,WAAW,IAAI,IAAI;IAenB,OAAO,IAAI,IAAI;IAkBf,OAAO,IAAI,IAAI;IAMf,GAAG,IAAI,IAAI;IAIlB,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
|
}
|
|
@@ -69,19 +70,19 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
69
70
|
return this.prompt([
|
|
70
71
|
{
|
|
71
72
|
type: 'list',
|
|
72
|
-
name: '
|
|
73
|
+
name: 'aceTemplateType',
|
|
73
74
|
default: 'PrimaryText',
|
|
74
|
-
when: () => !this.config.get('
|
|
75
|
+
when: () => !this.config.get('aceTemplateType'),
|
|
75
76
|
message: 'Which template do you want to use?',
|
|
76
77
|
choices
|
|
77
78
|
}
|
|
78
79
|
]).then((answers) => {
|
|
79
|
-
const templateType = answers.
|
|
80
|
+
const templateType = answers.aceTemplateType || this.config.get('aceTemplateType');
|
|
80
81
|
if (!(templateType === 'Basic' || templateType === 'Image' || templateType === 'PrimaryText')) {
|
|
81
|
-
this.log(colors_1.default.red(`Invalid
|
|
82
|
+
this.log(colors_1.default.red(`Invalid template type: '${templateType}'`));
|
|
82
83
|
}
|
|
83
84
|
else {
|
|
84
|
-
this.config.set('
|
|
85
|
+
this.config.set('aceTemplateType', templateType);
|
|
85
86
|
}
|
|
86
87
|
return super.prompting();
|
|
87
88
|
});
|
|
@@ -90,12 +91,18 @@ 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);
|
|
96
|
+
this.serveJson.setUpForWebParts();
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
writing() {
|
|
96
100
|
if (this.shouldExecute()) {
|
|
97
101
|
super.writing(true);
|
|
98
|
-
|
|
102
|
+
// copy view template
|
|
103
|
+
this.copyTemplate(this._getTemplatePath(this.config.get('aceTemplateType')), this.destinationPath(`src/adaptiveCardExtensions/${this.context.componentNameCamelCase}/cardView`));
|
|
104
|
+
// copy manifest.json path
|
|
105
|
+
this.copyTemplate(this._getManifestTemplatePath(this.config.get('aceTemplateType')), this.destinationPath(`src/adaptiveCardExtensions/${this.context.componentNameCamelCase}`));
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
install() {
|
|
@@ -109,8 +116,7 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
109
116
|
shouldExecute() {
|
|
110
117
|
return (this.config.get('environment') === 'spo' &&
|
|
111
118
|
this.config.get('componentType') === 'adaptiveCardExtension' &&
|
|
112
|
-
this.config.get('isDomainIsolated') === false
|
|
113
|
-
this.config.get('plusBeta') === true);
|
|
119
|
+
this.config.get('isDomainIsolated') === false);
|
|
114
120
|
}
|
|
115
121
|
_getTemplatePath(templateType) {
|
|
116
122
|
switch (templateType) {
|
|
@@ -122,6 +128,14 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
122
128
|
return this.templatePath('./basicCardView/');
|
|
123
129
|
}
|
|
124
130
|
}
|
|
131
|
+
_getManifestTemplatePath(templateType) {
|
|
132
|
+
if (templateType === 'Image') {
|
|
133
|
+
return this.templatePath('./manifestTemplate/imageTemplate');
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
return this.templatePath('./manifestTemplate/baseTemplate');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
125
139
|
}
|
|
126
140
|
exports.AdaptiveCardExtensionGenerator = AdaptiveCardExtensionGenerator;
|
|
127
141
|
// Yeoman expects exports of this type, which overrides the TS exports above
|
|
Binary file
|
|
@@ -2,16 +2,35 @@ import {
|
|
|
2
2
|
BaseImageCardView,
|
|
3
3
|
IImageCardParameters,
|
|
4
4
|
IExternalLinkCardAction,
|
|
5
|
-
IQuickViewCardAction
|
|
5
|
+
IQuickViewCardAction,
|
|
6
|
+
ICardButton
|
|
6
7
|
} from '@microsoft/sp-adaptive-card-extension-base';
|
|
7
8
|
import * as strings from '<%= componentStrings %>';
|
|
8
|
-
import { I<%= componentClassName %>Props, I<%= componentClassName %>State } from '../<%= componentClassName %>';
|
|
9
|
+
import { I<%= componentClassName %>Props, I<%= componentClassName %>State, QUICK_VIEW_REGISTRY_ID } from '../<%= componentClassName %>';
|
|
9
10
|
|
|
10
11
|
export class CardView extends BaseImageCardView<I<%= componentClassName %>Props, I<%= componentClassName %>State> {
|
|
12
|
+
/**
|
|
13
|
+
* Buttons will not be visible if card size is 'Medium' with Image Card View.
|
|
14
|
+
* It will support up to two buttons for 'Large' card size.
|
|
15
|
+
*/
|
|
16
|
+
public get cardButtons(): [ICardButton] | [ICardButton, ICardButton] | undefined {
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
title: strings.QuickViewButton,
|
|
20
|
+
action: {
|
|
21
|
+
type: 'QuickView',
|
|
22
|
+
parameters: {
|
|
23
|
+
view: QUICK_VIEW_REGISTRY_ID
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
|
|
11
30
|
public get data(): IImageCardParameters {
|
|
12
31
|
return {
|
|
13
32
|
primaryText: strings.PrimaryText,
|
|
14
|
-
imageUrl: '
|
|
33
|
+
imageUrl: require('../assets/MicrosoftLogo.png')
|
|
15
34
|
};
|
|
16
35
|
}
|
|
17
36
|
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
|
|
3
|
+
"id": "<%= componentId %>",
|
|
4
|
+
"alias": "<%= componentAlias %>",
|
|
5
|
+
"componentType": "AdaptiveCardExtension",
|
|
6
|
+
|
|
7
|
+
// The "*" signifies that the version should be taken from the package.json
|
|
8
|
+
"version": "*",
|
|
9
|
+
"manifestVersion": 2,
|
|
10
|
+
|
|
11
|
+
// If true, the component can only be installed on sites where Custom Script is allowed.
|
|
12
|
+
// Components that allow authors to embed arbitrary script code should set this to true.
|
|
13
|
+
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
|
|
14
|
+
"requiresCustomScript": false,
|
|
15
|
+
"supportedHosts": ["Dashboard"],
|
|
16
|
+
"supportsThemeVariants": true,
|
|
17
|
+
"preconfiguredEntries": [{
|
|
18
|
+
"groupId": "bd067b1e-3ad5-4d5d-a5fe-505f07d7f59c", // Dashboard
|
|
19
|
+
"group": { "default": "Dashboard" },
|
|
20
|
+
"title": { "default": "<%= componentNameUnescaped %>" },
|
|
21
|
+
"description": { "default": "<%= componentDescription %>" },
|
|
22
|
+
"officeFabricIconFontName": "SharePointLogo",
|
|
23
|
+
"cardSize": "Large",
|
|
24
|
+
"properties": {
|
|
25
|
+
"title": "<%= componentNameUnescaped %>",
|
|
26
|
+
"description": "<%= componentDescription %>",
|
|
27
|
+
"iconProperty": "" // Default to sharepointlogo
|
|
28
|
+
}
|
|
29
|
+
}]
|
|
30
|
+
}
|
|
@@ -61,9 +61,20 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
61
61
|
this.log(yosay('Welcome to the ' + colors_1.default.blue(`SharePoint Client-side Solution Generator@${VERSION}`)));
|
|
62
62
|
this._explainArguments();
|
|
63
63
|
this.context.creatingSolution = !YeomanConfiguration_1.YeomanConfiguration.libraryName;
|
|
64
|
+
const shouldUseSubDir = this.options.solutionName !== undefined;
|
|
65
|
+
if (shouldUseSubDir) {
|
|
66
|
+
// changing destinationRoot to the subfolder
|
|
67
|
+
this.destinationRoot(this.destinationPath(this.options.solutionName));
|
|
68
|
+
// we need to manually update cwd to point to the subfolder as this.destinationRoot() will not do it
|
|
69
|
+
this.env.cwd = this.destinationRoot();
|
|
70
|
+
this.config.set('whichFolder', 'subdir');
|
|
71
|
+
}
|
|
64
72
|
if (this.options.solutionName !== undefined) {
|
|
65
73
|
this.config.set('solutionName', this.options.solutionName);
|
|
66
74
|
}
|
|
75
|
+
if (this.options.solutionShortDescription !== undefined) {
|
|
76
|
+
this.config.set('solutionShortDescription', this.options.solutionShortDescription);
|
|
77
|
+
}
|
|
67
78
|
if (this.options.environment !== undefined) {
|
|
68
79
|
this.config.set('environment', this.options.environment);
|
|
69
80
|
}
|
|
@@ -88,8 +99,17 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
88
99
|
else {
|
|
89
100
|
this.config.set('extensionType', undefined);
|
|
90
101
|
}
|
|
102
|
+
if (this.options.aceTemplateType !== undefined) {
|
|
103
|
+
this.config.set('aceTemplateType', this.options.aceTemplateType);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
this.config.set('aceTemplateType', undefined);
|
|
107
|
+
}
|
|
91
108
|
if (this.options.framework !== undefined) {
|
|
92
|
-
this.config.set('
|
|
109
|
+
this.config.set('template', this.options.framework);
|
|
110
|
+
}
|
|
111
|
+
if (this.options.template !== undefined) {
|
|
112
|
+
this.config.set('template', this.options.template);
|
|
93
113
|
}
|
|
94
114
|
if (this.options.componentName !== undefined) {
|
|
95
115
|
this.config.set('componentName', this.options.componentName);
|
|
@@ -169,9 +189,16 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
169
189
|
const componentTypeUpper = componentType.charAt(0).toUpperCase() + componentType.slice(1);
|
|
170
190
|
if (this.options.componentName) {
|
|
171
191
|
const webpartName = colors_1.default.cyan(this.options.componentName);
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
192
|
+
let frameworkWords = this.options.template;
|
|
193
|
+
if (!frameworkWords) {
|
|
194
|
+
frameworkWords = this.options.framework;
|
|
195
|
+
}
|
|
196
|
+
if (frameworkWords) {
|
|
197
|
+
frameworkWords = ' with ' + colors_1.default.cyan(frameworkWords) + ' framework';
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
frameworkWords = '';
|
|
201
|
+
}
|
|
175
202
|
this.log(`${componentType === 'extension' ? 'An' : 'A'} ${componentType} with the name ${webpartName}` +
|
|
176
203
|
` will be added to your solution${frameworkWords}.`);
|
|
177
204
|
}
|