@microsoft/generator-sharepoint 1.13.0-beta.22 → 1.13.1
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/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 +4 -0
- package/lib/generators/adaptiveCardExtension/index.d.ts.map +1 -1
- package/lib/generators/adaptiveCardExtension/index.js +19 -8
- 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 +1 -1
- package/lib/generators/adaptiveCardExtension/templates/manifestTemplate/imageTemplate/{componentClassName}.manifest.json +30 -0
- package/lib/generators/app/index.js +14 -0
- 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/fieldCustomizer/templates/none/{componentClassName}.ts +1 -1
- package/lib/generators/fieldCustomizer/templates/react/components/{componentName}.tsx +1 -1
- package/lib/generators/solution/index.d.ts.map +1 -1
- package/lib/generators/solution/index.js +24 -79
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@microsoft/sp-core-library": "1.13.
|
|
4
|
-
"@microsoft/sp-property-pane": "1.13.
|
|
5
|
-
"@microsoft/sp-adaptive-card-extension-base": "1.13.
|
|
3
|
+
"@microsoft/sp-core-library": "1.13.1",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.13.1",
|
|
5
|
+
"@microsoft/sp-adaptive-card-extension-base": "1.13.1"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@microsoft/sp-build-web": "1.13.
|
|
9
|
-
"@microsoft/sp-tslint-rules": "1.13.
|
|
10
|
-
"@microsoft/sp-module-interfaces": "1.13.
|
|
8
|
+
"@microsoft/sp-build-web": "1.13.1",
|
|
9
|
+
"@microsoft/sp-tslint-rules": "1.13.1",
|
|
10
|
+
"@microsoft/sp-module-interfaces": "1.13.1",
|
|
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.13.
|
|
4
|
-
"@microsoft/sp-property-pane": "1.13.
|
|
5
|
-
"@microsoft/sp-adaptive-card-extension-base": "1.13.
|
|
3
|
+
"@microsoft/sp-core-library": "1.13.1",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.13.1",
|
|
5
|
+
"@microsoft/sp-adaptive-card-extension-base": "1.13.1"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@microsoft/sp-build-web": "1.13.
|
|
9
|
-
"@microsoft/sp-tslint-rules": "1.13.
|
|
10
|
-
"@microsoft/sp-module-interfaces": "1.13.
|
|
8
|
+
"@microsoft/sp-build-web": "1.13.1",
|
|
9
|
+
"@microsoft/sp-tslint-rules": "1.13.1",
|
|
10
|
+
"@microsoft/sp-module-interfaces": "1.13.1",
|
|
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.13.
|
|
4
|
-
"@microsoft/decorators": "1.13.
|
|
3
|
+
"@microsoft/sp-core-library": "1.13.1",
|
|
4
|
+
"@microsoft/decorators": "1.13.1"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@microsoft/sp-build-web": "1.13.
|
|
8
|
-
"@microsoft/sp-tslint-rules": "1.13.
|
|
9
|
-
"@microsoft/sp-module-interfaces": "1.13.
|
|
7
|
+
"@microsoft/sp-build-web": "1.13.1",
|
|
8
|
+
"@microsoft/sp-tslint-rules": "1.13.1",
|
|
9
|
+
"@microsoft/sp-module-interfaces": "1.13.1",
|
|
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.13.
|
|
4
|
-
"@microsoft/decorators": "1.13.
|
|
3
|
+
"@microsoft/sp-core-library": "1.13.1",
|
|
4
|
+
"@microsoft/decorators": "1.13.1"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@microsoft/sp-build-web": "1.13.
|
|
8
|
-
"@microsoft/sp-tslint-rules": "1.13.
|
|
9
|
-
"@microsoft/sp-module-interfaces": "1.13.
|
|
7
|
+
"@microsoft/sp-build-web": "1.13.1",
|
|
8
|
+
"@microsoft/sp-tslint-rules": "1.13.1",
|
|
9
|
+
"@microsoft/sp-module-interfaces": "1.13.1",
|
|
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.13.
|
|
5
|
-
"@microsoft/sp-tslint-rules": "1.13.
|
|
6
|
-
"@microsoft/sp-module-interfaces": "1.13.
|
|
4
|
+
"@microsoft/sp-build-web": "1.13.1",
|
|
5
|
+
"@microsoft/sp-tslint-rules": "1.13.1",
|
|
6
|
+
"@microsoft/sp-module-interfaces": "1.13.1",
|
|
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.13.
|
|
5
|
-
"@microsoft/sp-tslint-rules": "1.13.
|
|
6
|
-
"@microsoft/sp-module-interfaces": "1.13.
|
|
4
|
+
"@microsoft/sp-build-web": "1.13.1",
|
|
5
|
+
"@microsoft/sp-tslint-rules": "1.13.1",
|
|
6
|
+
"@microsoft/sp-module-interfaces": "1.13.1",
|
|
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.13.
|
|
4
|
-
"@microsoft/sp-property-pane": "1.13.
|
|
5
|
-
"@microsoft/sp-webpart-base": "1.13.
|
|
6
|
-
"@microsoft/sp-lodash-subset": "1.13.
|
|
7
|
-
"@microsoft/sp-office-ui-fabric-core": "1.13.
|
|
3
|
+
"@microsoft/sp-core-library": "1.13.1",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.13.1",
|
|
5
|
+
"@microsoft/sp-webpart-base": "1.13.1",
|
|
6
|
+
"@microsoft/sp-lodash-subset": "1.13.1",
|
|
7
|
+
"@microsoft/sp-office-ui-fabric-core": "1.13.1"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@microsoft/sp-build-web": "1.13.
|
|
11
|
-
"@microsoft/sp-tslint-rules": "1.13.
|
|
12
|
-
"@microsoft/sp-module-interfaces": "1.13.
|
|
10
|
+
"@microsoft/sp-build-web": "1.13.1",
|
|
11
|
+
"@microsoft/sp-tslint-rules": "1.13.1",
|
|
12
|
+
"@microsoft/sp-module-interfaces": "1.13.1",
|
|
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.13.
|
|
4
|
-
"@microsoft/sp-property-pane": "1.13.
|
|
5
|
-
"@microsoft/sp-webpart-base": "1.13.
|
|
6
|
-
"@microsoft/sp-lodash-subset": "1.13.
|
|
7
|
-
"@microsoft/sp-office-ui-fabric-core": "1.13.
|
|
3
|
+
"@microsoft/sp-core-library": "1.13.1",
|
|
4
|
+
"@microsoft/sp-property-pane": "1.13.1",
|
|
5
|
+
"@microsoft/sp-webpart-base": "1.13.1",
|
|
6
|
+
"@microsoft/sp-lodash-subset": "1.13.1",
|
|
7
|
+
"@microsoft/sp-office-ui-fabric-core": "1.13.1"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@microsoft/sp-build-web": "1.13.
|
|
11
|
-
"@microsoft/sp-tslint-rules": "1.13.
|
|
12
|
-
"@microsoft/sp-module-interfaces": "1.13.
|
|
10
|
+
"@microsoft/sp-build-web": "1.13.1",
|
|
11
|
+
"@microsoft/sp-tslint-rules": "1.13.1",
|
|
12
|
+
"@microsoft/sp-module-interfaces": "1.13.1",
|
|
13
13
|
"@microsoft/rush-stack-compiler-3.9": "0.4.47"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IBaseOptions, BaseGenerator, AvailableFrameworks } 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
|
}
|
|
@@ -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,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE9F,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,MAAM,WAAW,WAAY,SAAQ,aAAa,CAAC,qBAAqB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/adaptiveCardExtension/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE9F,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,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,iBAAiB,EAAE,mBAAmB,EAAE,CAAM;IACjE,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAA4B;IAE1D,YAAY,IAAI,IAAI;IAIpB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyC1B,WAAW,IAAI,IAAI;IAQnB,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"}
|
|
@@ -69,19 +69,19 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
69
69
|
return this.prompt([
|
|
70
70
|
{
|
|
71
71
|
type: 'list',
|
|
72
|
-
name: '
|
|
72
|
+
name: 'aceTemplateType',
|
|
73
73
|
default: 'PrimaryText',
|
|
74
|
-
when: () => !this.config.get('
|
|
74
|
+
when: () => !this.config.get('aceTemplateType'),
|
|
75
75
|
message: 'Which template do you want to use?',
|
|
76
76
|
choices
|
|
77
77
|
}
|
|
78
78
|
]).then((answers) => {
|
|
79
|
-
const templateType = answers.
|
|
79
|
+
const templateType = answers.aceTemplateType || this.config.get('aceTemplateType');
|
|
80
80
|
if (!(templateType === 'Basic' || templateType === 'Image' || templateType === 'PrimaryText')) {
|
|
81
|
-
this.log(colors_1.default.red(`Invalid
|
|
81
|
+
this.log(colors_1.default.red(`Invalid template type: '${templateType}'`));
|
|
82
82
|
}
|
|
83
83
|
else {
|
|
84
|
-
this.config.set('
|
|
84
|
+
this.config.set('aceTemplateType', templateType);
|
|
85
85
|
}
|
|
86
86
|
return super.prompting();
|
|
87
87
|
});
|
|
@@ -90,12 +90,16 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
90
90
|
if (this.shouldExecute()) {
|
|
91
91
|
super.configuring();
|
|
92
92
|
this.ensureDependencyGroup('adaptiveCardExtension');
|
|
93
|
+
this.serveJson.setUpForWebParts();
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
writing() {
|
|
96
97
|
if (this.shouldExecute()) {
|
|
97
98
|
super.writing(true);
|
|
98
|
-
|
|
99
|
+
// copy view template
|
|
100
|
+
this.copyTemplate(this._getTemplatePath(this.config.get('aceTemplateType')), this.destinationPath(`src/adaptiveCardExtensions/${this.context.componentNameCamelCase}/cardView`));
|
|
101
|
+
// copy manifest.json path
|
|
102
|
+
this.copyTemplate(this._getManifestTemplatePath(this.config.get('aceTemplateType')), this.destinationPath(`src/adaptiveCardExtensions/${this.context.componentNameCamelCase}`));
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
105
|
install() {
|
|
@@ -109,8 +113,7 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
109
113
|
shouldExecute() {
|
|
110
114
|
return (this.config.get('environment') === 'spo' &&
|
|
111
115
|
this.config.get('componentType') === 'adaptiveCardExtension' &&
|
|
112
|
-
this.config.get('isDomainIsolated') === false
|
|
113
|
-
this.config.get('plusBeta') === true);
|
|
116
|
+
this.config.get('isDomainIsolated') === false);
|
|
114
117
|
}
|
|
115
118
|
_getTemplatePath(templateType) {
|
|
116
119
|
switch (templateType) {
|
|
@@ -122,6 +125,14 @@ class AdaptiveCardExtensionGenerator extends BaseComponent.BaseComponentGenerato
|
|
|
122
125
|
return this.templatePath('./basicCardView/');
|
|
123
126
|
}
|
|
124
127
|
}
|
|
128
|
+
_getManifestTemplatePath(templateType) {
|
|
129
|
+
if (templateType === 'Image') {
|
|
130
|
+
return this.templatePath('./manifestTemplate/imageTemplate');
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
return this.templatePath('./manifestTemplate/baseTemplate');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
125
136
|
}
|
|
126
137
|
exports.AdaptiveCardExtensionGenerator = AdaptiveCardExtensionGenerator;
|
|
127
138
|
// 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
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// Components that allow authors to embed arbitrary script code should set this to true.
|
|
13
13
|
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
|
|
14
14
|
"requiresCustomScript": false,
|
|
15
|
-
"supportedHosts": ["Dashboard"
|
|
15
|
+
"supportedHosts": ["Dashboard"],
|
|
16
16
|
"supportsThemeVariants": true,
|
|
17
17
|
"preconfiguredEntries": [{
|
|
18
18
|
"groupId": "bd067b1e-3ad5-4d5d-a5fe-505f07d7f59c", // Dashboard
|
|
@@ -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,6 +61,14 @@ 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
|
}
|
|
@@ -88,6 +96,12 @@ class AppGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
88
96
|
else {
|
|
89
97
|
this.config.set('extensionType', undefined);
|
|
90
98
|
}
|
|
99
|
+
if (this.options.aceTemplateType !== undefined) {
|
|
100
|
+
this.config.set('aceTemplateType', this.options.aceTemplateType);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.config.set('aceTemplateType', undefined);
|
|
104
|
+
}
|
|
91
105
|
if (this.options.framework !== undefined) {
|
|
92
106
|
this.config.set('framework', this.options.framework);
|
|
93
107
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IBaseOptions, BaseGenerator } from '../../common/BaseGenerator';
|
|
2
2
|
import * as Webpart from '../webpart';
|
|
3
3
|
import * as Extension from '../extension';
|
|
4
|
-
|
|
4
|
+
import * as AdaptiveCardExtension from '../adaptiveCardExtension';
|
|
5
|
+
export interface IComponentSelectorOptions extends Webpart.IWebpartOptions, Extension.IExtensionOptions, AdaptiveCardExtension.IACEOptions {
|
|
5
6
|
componentType: 'webpart' | 'extension' | 'library' | 'adaptiveCardExtension';
|
|
6
7
|
}
|
|
7
8
|
export declare function composeWith<TOptions extends IBaseOptions, TContext>(base: BaseGenerator<TOptions, TContext>, options: IBaseOptions): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/component/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGzE,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/component/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGzE,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,qBAAqB,MAAM,0BAA0B,CAAC;AAGlE,MAAM,WAAW,yBACf,SAAQ,OAAO,CAAC,eAAe,EAC7B,SAAS,CAAC,iBAAiB,EAC3B,qBAAqB,CAAC,WAAW;IACnC,aAAa,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,uBAAuB,CAAC;CAC9E;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,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,EACnE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC3C,IAAI,CAUN;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,aAAa,CAAC,yBAAyB,EAAE,EAAE,CAAC;IAC1F,SAAgB,YAAY,EAAE,MAAM,CAAyB;IAEtD,YAAY,IAAI,IAAI;IAIpB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAgE1B,WAAW,IAAI,IAAI;IAGnB,OAAO,IAAI,IAAI;IAGf,OAAO,IAAI,IAAI;IAGf,GAAG,IAAI,IAAI;IAIlB,OAAO,CAAC,aAAa;CAGtB"}
|
|
@@ -84,14 +84,12 @@ class ComponentSelectorGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
84
84
|
{
|
|
85
85
|
name: 'Library',
|
|
86
86
|
value: 'library'
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (this.config.get('plusBeta') === true) {
|
|
90
|
-
choices.push({
|
|
87
|
+
},
|
|
88
|
+
{
|
|
91
89
|
name: 'Adaptive Card Extension',
|
|
92
90
|
value: 'adaptiveCardExtension'
|
|
93
|
-
}
|
|
94
|
-
|
|
91
|
+
}
|
|
92
|
+
];
|
|
95
93
|
}
|
|
96
94
|
return this.prompt([
|
|
97
95
|
{
|
|
@@ -24,7 +24,7 @@ export default class <%= componentName %> extends React.Component<I<%= component
|
|
|
24
24
|
@override
|
|
25
25
|
public render(): React.ReactElement<{}> {
|
|
26
26
|
return (
|
|
27
|
-
<div className={styles
|
|
27
|
+
<div className={styles.<%= componentName %>}>
|
|
28
28
|
{ this.props.text }
|
|
29
29
|
</div>
|
|
30
30
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/solution/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/solution/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAIzE,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,KAAK,CAAC;IACnB,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACxC,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,WAAW,EAAE,MAAM,CAAiD;IACpE,SAAS,EAAE,MAAM,CAAC;CACnB;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,wBAAgB,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,IAAI,CA8BhG"}
|
|
@@ -20,9 +20,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.defineOptions = exports.composeWith = void 0;
|
|
23
|
-
const child_process = __importStar(require("child_process"));
|
|
24
23
|
const lodash = __importStar(require("lodash"));
|
|
25
|
-
const os = __importStar(require("os"));
|
|
26
24
|
const path = __importStar(require("path"));
|
|
27
25
|
const Utils = __importStar(require("../../common/utilities"));
|
|
28
26
|
const BaseGenerator_1 = require("../../common/BaseGenerator");
|
|
@@ -88,101 +86,47 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
88
86
|
type: 'list',
|
|
89
87
|
name: 'environment',
|
|
90
88
|
when: () => !this.config.get('environment'),
|
|
91
|
-
message: 'Only SharePoint Online (latest) is supported. For earlier versions of SharePoint (2016 and 2019) please use the 1.
|
|
89
|
+
message: 'Only SharePoint Online (latest) is supported. For earlier versions of SharePoint (2016 and 2019) please use the 1.4.1 version of the generator.',
|
|
92
90
|
default: 'spo',
|
|
93
91
|
choices: [{ name: 'SharePoint Online only (latest)', value: 'spo' }]
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
type: 'list',
|
|
97
|
-
name: 'whichFolder',
|
|
98
|
-
default: 'current',
|
|
99
|
-
when: () => !this.config.get('solutionName'),
|
|
100
|
-
message: 'Where do you want to place the files?',
|
|
101
|
-
choices: [
|
|
102
|
-
{
|
|
103
|
-
name: 'Use the current folder',
|
|
104
|
-
value: 'current'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: 'Create a subfolder with solution name',
|
|
108
|
-
value: 'subdir'
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
92
|
}
|
|
112
93
|
])
|
|
113
94
|
.then((answers) => {
|
|
114
|
-
let missingPackageManagerError = '';
|
|
115
95
|
if (!this.config.get('environment')) {
|
|
116
96
|
this.config.set('environment', answers.environment);
|
|
117
97
|
}
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
case 'pnpm':
|
|
127
|
-
missingPackageManagerError =
|
|
128
|
-
'The "pnpm" tool was not found in your system path.' +
|
|
129
|
-
os.EOL +
|
|
130
|
-
"If you haven't installed it, please visit https://pnpm.js.org for installation instructions.";
|
|
131
|
-
break;
|
|
132
|
-
case 'yarn':
|
|
133
|
-
missingPackageManagerError =
|
|
134
|
-
'The "yarn" tool was not found in your system path.' +
|
|
135
|
-
os.EOL +
|
|
136
|
-
"If you haven't installed it, please visit https://yarnpkg.com/ for installation instructions.";
|
|
137
|
-
break;
|
|
138
|
-
default:
|
|
139
|
-
throw new Error(`The package manager specified on the command line must be one of: "npm", "pnpm" or "yarn"`);
|
|
140
|
-
}
|
|
141
|
-
// Before proceeding, make sure the chosen package manager is actually installed
|
|
142
|
-
if (!this.options['skip-install']) {
|
|
143
|
-
try {
|
|
144
|
-
// We use execSync() instead of spawnSync() because we're capturing the output
|
|
145
|
-
const foundVersion = child_process
|
|
146
|
-
.execSync(`${packageManager} -v`, { stdio: ['ignore', 'pipe', 'ignore'] }) // (ignore stderr but not stdout)
|
|
147
|
-
.toString()
|
|
148
|
-
.trim();
|
|
149
|
-
// Normally the package managers just print a SemVer pattern and exit
|
|
150
|
-
if (foundVersion.length < 1 || foundVersion.length > 20) {
|
|
151
|
-
throw new Error('Unrecognized output from command');
|
|
152
|
-
}
|
|
153
|
-
this.log(`Found ${packageManager} version ${foundVersion}`);
|
|
98
|
+
const environment = this.config.get('environment');
|
|
99
|
+
const solutionName = this.config.get('solutionName');
|
|
100
|
+
// allows to set --skip-feature-deployment false
|
|
101
|
+
let skipFeatureDeployment = undefined;
|
|
102
|
+
const skipFeatureDeploymentConfig = this.config.get('skipFeatureDeployment');
|
|
103
|
+
if (skipFeatureDeploymentConfig !== undefined) {
|
|
104
|
+
if (typeof skipFeatureDeploymentConfig === 'string') {
|
|
105
|
+
skipFeatureDeployment = skipFeatureDeploymentConfig.toLowerCase() === 'true';
|
|
154
106
|
}
|
|
155
|
-
|
|
156
|
-
|
|
107
|
+
else {
|
|
108
|
+
skipFeatureDeployment = skipFeatureDeploymentConfig;
|
|
157
109
|
}
|
|
158
110
|
}
|
|
159
|
-
const environment = this.config.get('environment');
|
|
160
|
-
const solutionName = this.config.get('solutionName');
|
|
161
|
-
const skipFeatureDeployment = this.config.get('skipFeatureDeployment');
|
|
162
111
|
const componentType = this.config.get('componentType');
|
|
163
112
|
const extensionType = this.config.get('extensionType');
|
|
164
113
|
const framework = this.config.get('framework');
|
|
165
114
|
const componentName = this.config.get('componentName');
|
|
166
115
|
const componentDescription = this.config.get('componentDescription');
|
|
167
116
|
const isCreatingSolution = this.config.get('isCreatingSolution');
|
|
168
|
-
|
|
117
|
+
// allows to set --is-domain-isolated false
|
|
118
|
+
let isDomainIsolated = undefined;
|
|
119
|
+
const isDomainIsolatedConfig = this.config.get('isDomainIsolated');
|
|
120
|
+
if (isDomainIsolatedConfig !== undefined) {
|
|
121
|
+
if (typeof isDomainIsolatedConfig === 'string') {
|
|
122
|
+
isDomainIsolated = isDomainIsolatedConfig.toLowerCase() === 'true';
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
isDomainIsolated = isDomainIsolatedConfig;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
169
128
|
const isPlusBeta = this.config.get('plusBeta');
|
|
170
|
-
// Use a sub-dir if they pass solutionName in via option
|
|
171
129
|
this.context.solutionName = this.config.get('solutionName') || answers.solutionName;
|
|
172
|
-
const shouldUseSubDir = answers.whichFolder === 'subdir' || !!this.config.get('solutionName');
|
|
173
|
-
if (shouldUseSubDir) {
|
|
174
|
-
this.config.set('whichFolder', 'subdir');
|
|
175
|
-
// All the sub generators currently point to the config in the root folder
|
|
176
|
-
// so we need to set the values to point at the new .yo-rc file.
|
|
177
|
-
this.destinationRoot(this.destinationPath(this.context.solutionName));
|
|
178
|
-
}
|
|
179
|
-
// Yeoman uses the destinationRoot at the time of instantiation when determining
|
|
180
|
-
// where to write the .yo-rc file, however we want to change the destinationRoot
|
|
181
|
-
// after. Once we change the destinationRoot, the base class instantiates a new
|
|
182
|
-
// storage object. We have a helper class using the storage object, so we need
|
|
183
|
-
// to reset it to use the new object.
|
|
184
|
-
// tslint:disable-next-line:no-string-literal
|
|
185
|
-
YeomanConfiguration_1.YeomanConfiguration.setStore(this['config']);
|
|
186
130
|
this.context.libraryName = lodash.kebabCase(this.context.solutionName);
|
|
187
131
|
this.context.libraryId = Utils.generateGuid();
|
|
188
132
|
// store some variables
|
|
@@ -190,7 +134,8 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
190
134
|
YeomanConfiguration_1.YeomanConfiguration.libraryName = this.context.libraryName;
|
|
191
135
|
YeomanConfiguration_1.YeomanConfiguration.libraryId = this.context.libraryId;
|
|
192
136
|
YeomanConfiguration_1.YeomanConfiguration.environment = environment;
|
|
193
|
-
YeomanConfiguration_1.YeomanConfiguration.packageManager =
|
|
137
|
+
YeomanConfiguration_1.YeomanConfiguration.packageManager =
|
|
138
|
+
this.config.get('packageManager') || YeomanConfiguration_1.YeomanConfiguration.packageManager || 'npm';
|
|
194
139
|
this.config.set('solutionName', solutionName);
|
|
195
140
|
this.config.set('skipFeatureDeployment', skipFeatureDeployment);
|
|
196
141
|
this.config.set('componentType', componentType);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/generator-sharepoint",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.1",
|
|
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.13.
|
|
16
|
+
"@microsoft/spfx-heft-plugins": "1.13.1",
|
|
17
17
|
"@rushstack/node-core-library": "3.40.0",
|
|
18
18
|
"colors": "~1.2.1",
|
|
19
19
|
"lodash": "4.17.21",
|