@microsoft/generator-sharepoint 1.17.4 → 1.18.0-beta.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 +3 -3
- package/lib/common/BaseGenerator.d.ts.map +1 -1
- package/lib/common/BaseGenerator.js +4 -4
- package/lib/common/ConfigJsonManager.d.ts +4 -4
- package/lib/common/ConfigJsonManager.d.ts.map +1 -1
- package/lib/common/ConfigJsonManager.js +1 -3
- package/lib/common/JsonManager.d.ts +2 -2
- package/lib/common/JsonManager.d.ts.map +1 -1
- package/lib/common/JsonManager.js +4 -4
- package/lib/common/PackageJsonManager.d.ts +2 -2
- package/lib/common/PackageJsonManager.d.ts.map +1 -1
- package/lib/common/PackageSolutionJsonManager.d.ts +3 -3
- package/lib/common/PackageSolutionJsonManager.d.ts.map +1 -1
- package/lib/common/ServeJsonManager.d.ts +2 -2
- package/lib/common/ServeJsonManager.d.ts.map +1 -1
- package/lib/common/TeamsManifestJsonManager.d.ts +1 -1
- package/lib/common/TeamsManifestJsonManager.d.ts.map +1 -1
- package/lib/common/YeomanConfiguration.d.ts +1 -1
- package/lib/common/YeomanConfiguration.d.ts.map +1 -1
- package/lib/common/YeomanConfiguration.js +1 -1
- package/lib/common/bundles-versions.json +1 -1
- package/lib/common/dependencies.json +61 -62
- package/lib/common/utilities.d.ts +2 -2
- package/lib/common/utilities.d.ts.map +1 -1
- package/lib/common/utilities.js +4 -2
- package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.d.ts +18 -0
- package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.d.ts.map +1 -0
- package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.js +57 -0
- package/lib/generators/adaptiveCardExtension/index.d.ts +7 -13
- package/lib/generators/adaptiveCardExtension/index.d.ts.map +1 -1
- package/lib/generators/adaptiveCardExtension/index.js +29 -52
- package/lib/generators/app/index.d.ts +1 -1
- package/lib/generators/app/index.d.ts.map +1 -1
- package/lib/generators/app/index.js +4 -0
- package/lib/generators/applicationCustomizer/index.d.ts +3 -3
- package/lib/generators/applicationCustomizer/index.d.ts.map +1 -1
- package/lib/generators/applicationCustomizer/index.js +5 -5
- 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 +5 -5
- package/lib/generators/commandSet/templates/none/{componentClassName}.ts +3 -3
- package/lib/generators/component/BaseComponentGenerator.d.ts +3 -3
- package/lib/generators/component/BaseComponentGenerator.d.ts.map +1 -1
- package/lib/generators/component/BaseComponentGenerator.js +4 -2
- package/lib/generators/component/index.d.ts +2 -2
- package/lib/generators/component/index.d.ts.map +1 -1
- package/lib/generators/component/index.js +2 -2
- package/lib/generators/extension/BaseExtensionGenerator.d.ts +1 -1
- package/lib/generators/extension/BaseExtensionGenerator.d.ts.map +1 -1
- package/lib/generators/extension/index.d.ts +4 -4
- package/lib/generators/extension/index.d.ts.map +1 -1
- package/lib/generators/extension/index.js +2 -2
- 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 +5 -5
- package/lib/generators/fieldCustomizer/templates/minimal/{componentClassName}.ts +1 -1
- package/lib/generators/fieldCustomizer/templates/none/{componentClassName}.ts +1 -1
- package/lib/generators/fieldCustomizer/templates/react/{componentClassName}.ts +1 -1
- package/lib/generators/formCustomizer/index.d.ts +2 -2
- package/lib/generators/formCustomizer/index.d.ts.map +1 -1
- package/lib/generators/formCustomizer/index.js +6 -6
- package/lib/generators/genericAdaptiveCardExtension/index.d.ts +21 -0
- package/lib/generators/genericAdaptiveCardExtension/index.d.ts.map +1 -0
- package/lib/generators/genericAdaptiveCardExtension/index.js +111 -0
- package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/basicCardView/CardView.ts +9 -2
- package/lib/generators/genericAdaptiveCardExtension/templates/genericCardView/CardView.ts +51 -0
- package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/imageCardView/CardView.ts +9 -2
- package/lib/generators/genericAdaptiveCardExtension/templates/manifestTemplate/componentsTemplate/{componentClassName}.manifest.json +27 -0
- package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/none/quickView/QuickView.ts +7 -4
- package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/none/{componentClassName}.ts +3 -1
- package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/primaryTextCardView/CardView.ts +9 -2
- 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 +5 -5
- package/lib/generators/searchAdaptiveCardExtension/index.d.ts +19 -0
- package/lib/generators/searchAdaptiveCardExtension/index.d.ts.map +1 -0
- package/lib/generators/searchAdaptiveCardExtension/index.js +83 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/base/assets/MicrosoftLogo.png +0 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/base/loc/en-us.js +12 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/base/loc/mystring.d.ts +15 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/none/cardView/CardView.ts +64 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/none/quickView/ItemQuickView.ts +28 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/none/quickView/SearchResultsQuickView.ts +30 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/none/quickView/template/ItemQuickViewTemplate.json +28 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/none/quickView/template/SearchResultsQuickViewTemplate.json +27 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/none/{componentClassName}.manifest.json +27 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/none/{componentClassName}.ts +83 -0
- package/lib/generators/searchAdaptiveCardExtension/templates/none/{componentName}PropertyPane.ts +23 -0
- 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 +5 -5
- package/lib/generators/solution/index.d.ts +1 -1
- package/lib/generators/solution/index.d.ts.map +1 -1
- package/lib/generators/solution/index.js +8 -6
- 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 +5 -5
- package/lib/generators/webpart/templates/none/{componentClassName}.ts +2 -2
- package/lib/generators/webpart/templates/react/components/{componentName}.tsx +1 -1
- package/lib/generators/webpart/templates/react/{componentClassName}.ts +1 -1
- package/package.json +6 -5
- /package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/base/assets/MicrosoftLogo.png +0 -0
- /package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/base/loc/en-us.js +0 -0
- /package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/base/loc/mystring.d.ts +0 -0
- /package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/manifestTemplate/baseTemplate/{componentClassName}.manifest.json +0 -0
- /package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/manifestTemplate/imageTemplate/{componentClassName}.manifest.json +0 -0
- /package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/none/quickView/template/QuickViewTemplate.json +0 -0
- /package/lib/generators/{adaptiveCardExtension → genericAdaptiveCardExtension}/templates/none/{componentName}PropertyPane.ts +0 -0
|
@@ -48,12 +48,12 @@ class FieldCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
48
48
|
}
|
|
49
49
|
async prompting() {
|
|
50
50
|
this.ensureCorrectFolder();
|
|
51
|
-
if (this.
|
|
51
|
+
if (this._shouldExecute()) {
|
|
52
52
|
await super.prompting();
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
configuring() {
|
|
56
|
-
if (this.
|
|
56
|
+
if (this._shouldExecute()) {
|
|
57
57
|
super.configuring();
|
|
58
58
|
this.ensureDependencyGroup('fieldCustomizer');
|
|
59
59
|
this.context.fieldId = Utils.generateGuid();
|
|
@@ -71,7 +71,7 @@ class FieldCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
writing() {
|
|
74
|
-
if (this.
|
|
74
|
+
if (this._shouldExecute()) {
|
|
75
75
|
super.writing(false);
|
|
76
76
|
const dest = this._getOutputFolder(this.context.componentNameCamelCase);
|
|
77
77
|
const template = this.context.template;
|
|
@@ -86,7 +86,7 @@ class FieldCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
install() {
|
|
89
|
-
if (this.
|
|
89
|
+
if (this._shouldExecute()) {
|
|
90
90
|
super.install();
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -96,7 +96,7 @@ class FieldCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
96
96
|
includeClientSideInstances() {
|
|
97
97
|
return false;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
_shouldExecute() {
|
|
100
100
|
return (this.config.get('environment') === 'spo' &&
|
|
101
101
|
this.config.get('componentType') === 'extension' &&
|
|
102
102
|
this.config.get('extensionType') === 'FieldCustomizer');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Log } from '@microsoft/sp-core-library';
|
|
2
2
|
import {
|
|
3
3
|
BaseFieldCustomizer,
|
|
4
|
-
IFieldCustomizerCellEventParameters
|
|
4
|
+
type IFieldCustomizerCellEventParameters
|
|
5
5
|
} from '@microsoft/sp-listview-extensibility';
|
|
6
6
|
|
|
7
7
|
import * as strings from '<%= componentStrings %>';
|
|
@@ -4,7 +4,7 @@ import * as ReactDOM from 'react-dom';
|
|
|
4
4
|
import { Log } from '@microsoft/sp-core-library';
|
|
5
5
|
import {
|
|
6
6
|
BaseFieldCustomizer,
|
|
7
|
-
IFieldCustomizerCellEventParameters
|
|
7
|
+
type IFieldCustomizerCellEventParameters
|
|
8
8
|
} from '@microsoft/sp-listview-extensibility';
|
|
9
9
|
|
|
10
10
|
import * as strings from '<%= componentStrings %>';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBaseOptions, BaseGenerator, AvailableTemplates } from '../../common/BaseGenerator';
|
|
1
|
+
import type { IBaseOptions, BaseGenerator, AvailableTemplates } from '../../common/BaseGenerator';
|
|
2
2
|
import * as BaseExtension from '../extension/BaseExtensionGenerator';
|
|
3
3
|
export interface IFormCustomizerOptions extends BaseExtension.IBaseExtensionOptions {
|
|
4
4
|
}
|
|
@@ -19,6 +19,6 @@ export declare class FormCustomizerGenerator extends BaseExtension.BaseExtension
|
|
|
19
19
|
protected constructor(args: string | string[], options: IFormCustomizerOptions);
|
|
20
20
|
protected addFeature(): void;
|
|
21
21
|
protected includeClientSideInstances(): boolean;
|
|
22
|
-
private
|
|
22
|
+
private _shouldExecute;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/formCustomizer/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/formCustomizer/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAIlG,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,MAAM,WAAW,sBAAuB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AACtF,MAAM,WAAW,sBAAuB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAEtF,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,MAAM,EAChF,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,YAAY,GACpB,IAAI,CAEN;AAED,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,MAAM,EAClF,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC3C,IAAI,CAEN;AAED,qBAAa,uBAAwB,SAAQ,aAAa,CAAC,sBAAsB,CAC/E,sBAAsB,EACtB,sBAAsB,CACvB;IACC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAqB;IAC5D,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAoB;IACvD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAqB;IAEvE,YAAY,IAAI,IAAI;IAIpB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ1B,WAAW,IAAI,IAAI;IAgDnB,OAAO,IAAI,IAAI;IAgBf,OAAO,IAAI,IAAI;IAMf,GAAG,IAAI,IAAI;IAIlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,sBAAsB;IAK9E,SAAS,CAAC,UAAU,IAAI,IAAI;IAY5B,SAAS,CAAC,0BAA0B,IAAI,OAAO;IAI/C,OAAO,CAAC,cAAc;CAOvB"}
|
|
@@ -49,13 +49,13 @@ class FormCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
49
49
|
}
|
|
50
50
|
prompting() {
|
|
51
51
|
this.ensureCorrectFolder();
|
|
52
|
-
if (!this.
|
|
52
|
+
if (!this._shouldExecute()) {
|
|
53
53
|
return Promise.resolve();
|
|
54
54
|
}
|
|
55
55
|
return super.prompting();
|
|
56
56
|
}
|
|
57
57
|
configuring() {
|
|
58
|
-
if (this.
|
|
58
|
+
if (this._shouldExecute()) {
|
|
59
59
|
super.configuring();
|
|
60
60
|
this.ensureDependencyGroup('formCustomizer');
|
|
61
61
|
// New Form
|
|
@@ -99,7 +99,7 @@ class FormCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
writing() {
|
|
102
|
-
if (this.
|
|
102
|
+
if (this._shouldExecute()) {
|
|
103
103
|
super.writing(false);
|
|
104
104
|
const dest = this._getOutputFolder(this.context.componentNameCamelCase);
|
|
105
105
|
const template = this.context.template;
|
|
@@ -111,7 +111,7 @@ class FormCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
install() {
|
|
114
|
-
if (this.
|
|
114
|
+
if (this._shouldExecute()) {
|
|
115
115
|
super.install();
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -119,7 +119,7 @@ class FormCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
119
119
|
super.end();
|
|
120
120
|
}
|
|
121
121
|
addFeature() {
|
|
122
|
-
if (this.
|
|
122
|
+
if (this._shouldExecute() && !this.hasElementsXml()) {
|
|
123
123
|
const solutionName = YeomanConfiguration_1.YeomanConfiguration.libraryName;
|
|
124
124
|
this.packageSolutionJson.addFeature(Utils.generateGuid(), `${solutionName} Feature`, `The feature that activates elements of the ${solutionName} solution.`, false);
|
|
125
125
|
}
|
|
@@ -127,7 +127,7 @@ class FormCustomizerGenerator extends BaseExtension.BaseExtensionGenerator {
|
|
|
127
127
|
includeClientSideInstances() {
|
|
128
128
|
return false;
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
_shouldExecute() {
|
|
131
131
|
return (this.config.get('environment') === 'spo' &&
|
|
132
132
|
this.config.get('componentType') === 'extension' &&
|
|
133
133
|
this.config.get('extensionType') === 'FormCustomizer');
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IBaseOptions, BaseGenerator } from '../../common/BaseGenerator';
|
|
2
|
+
import { BaseACEGenerator, type IBaseACEContext, type IBaseACEOptions } from '../adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator';
|
|
3
|
+
export interface IGenericACEOptions extends IBaseACEOptions {
|
|
4
|
+
}
|
|
5
|
+
export interface IGenericACEContext extends IBaseACEContext {
|
|
6
|
+
}
|
|
7
|
+
export declare function composeWith<TOptions extends IBaseOptions, TContext extends object>(base: BaseGenerator<TOptions, TContext>, options: IBaseOptions): void;
|
|
8
|
+
export declare function defineOptions<TOptions extends IBaseOptions, TContext extends object>(generator: BaseGenerator<TOptions, TContext>): void;
|
|
9
|
+
export declare class GenericAdaptiveCardExtensionGenerator extends BaseACEGenerator<IGenericACEOptions, IGenericACEContext> {
|
|
10
|
+
initializing(): void;
|
|
11
|
+
prompting(): Promise<void>;
|
|
12
|
+
configuring(): void;
|
|
13
|
+
writing(): void;
|
|
14
|
+
install(): void;
|
|
15
|
+
end(): void;
|
|
16
|
+
protected constructor(args: string | string[], options: IGenericACEOptions);
|
|
17
|
+
private _shouldExecute;
|
|
18
|
+
private _getTemplatePath;
|
|
19
|
+
private _getManifestTemplatePath;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/genericAdaptiveCardExtension/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,EACL,gBAAgB,EAEhB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,6DAA6D,CAAC;AAErE,MAAM,WAAW,kBAAmB,SAAQ,eAAe;CAAG;AAE9D,MAAM,WAAW,kBAAmB,SAAQ,eAAe;CAAG;AAE9D,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,MAAM,EAChF,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,YAAY,GACpB,IAAI,CAEN;AAED,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,MAAM,EAClF,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC3C,IAAI,CAEN;AAED,qBAAa,qCAAsC,SAAQ,gBAAgB,CACzE,kBAAkB,EAClB,kBAAkB,CACnB;IACQ,YAAY,IAAI,IAAI;IAId,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhC,WAAW,IAAI,IAAI;IAMnB,OAAO,IAAI,IAAI;IAkBf,OAAO,IAAI,IAAI;IAMf,GAAG,IAAI,IAAI;IAIlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,kBAAkB;IAK1E,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,wBAAwB;CAUjC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.GenericAdaptiveCardExtensionGenerator = exports.defineOptions = exports.composeWith = void 0;
|
|
27
|
+
const path = __importStar(require("path"));
|
|
28
|
+
const Utils = __importStar(require("../../common/utilities"));
|
|
29
|
+
const BaseAdaptiveCardExtensionGenerator_1 = require("../adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator");
|
|
30
|
+
function composeWith(base, options) {
|
|
31
|
+
Utils.compose(path.basename(__dirname), base, options);
|
|
32
|
+
}
|
|
33
|
+
exports.composeWith = composeWith;
|
|
34
|
+
function defineOptions(generator) {
|
|
35
|
+
/* no-op */
|
|
36
|
+
}
|
|
37
|
+
exports.defineOptions = defineOptions;
|
|
38
|
+
class GenericAdaptiveCardExtensionGenerator extends BaseAdaptiveCardExtensionGenerator_1.BaseACEGenerator {
|
|
39
|
+
initializing() {
|
|
40
|
+
/* no-op */
|
|
41
|
+
}
|
|
42
|
+
async prompting() {
|
|
43
|
+
this.ensureCorrectFolder();
|
|
44
|
+
if (this._shouldExecute()) {
|
|
45
|
+
await super.prompting();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
configuring() {
|
|
49
|
+
if (this._shouldExecute()) {
|
|
50
|
+
super.configuring();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
writing() {
|
|
54
|
+
if (this._shouldExecute()) {
|
|
55
|
+
super.writing(true);
|
|
56
|
+
// copy view template
|
|
57
|
+
this.copyTemplate(this._getTemplatePath(this.config.get('aceTemplateType')), this.destinationPath(`src/adaptiveCardExtensions/${this.context.componentNameCamelCase}/cardView`));
|
|
58
|
+
// copy manifest.json path
|
|
59
|
+
this.copyTemplate(this._getManifestTemplatePath(this.config.get('aceTemplateType')), this.destinationPath(`src/adaptiveCardExtensions/${this.context.componentNameCamelCase}`));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
install() {
|
|
63
|
+
if (this._shouldExecute()) {
|
|
64
|
+
super.install();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
end() {
|
|
68
|
+
super.end();
|
|
69
|
+
}
|
|
70
|
+
constructor(args, options) {
|
|
71
|
+
super(args, options);
|
|
72
|
+
defineOptions(this);
|
|
73
|
+
}
|
|
74
|
+
_shouldExecute() {
|
|
75
|
+
return (this.config.get('environment') === 'spo' &&
|
|
76
|
+
this.config.get('componentType') === 'adaptiveCardExtension' &&
|
|
77
|
+
this.config.get('isDomainIsolated') === false &&
|
|
78
|
+
['Basic', 'Image', 'PrimaryText', 'Generic'].indexOf(this.config.get('aceTemplateType')) !== -1);
|
|
79
|
+
}
|
|
80
|
+
_getTemplatePath(templateType) {
|
|
81
|
+
switch (templateType) {
|
|
82
|
+
case 'Image':
|
|
83
|
+
return this.templatePath('./imageCardView/');
|
|
84
|
+
case 'PrimaryText':
|
|
85
|
+
return this.templatePath('./primaryTextCardView/');
|
|
86
|
+
case 'Basic':
|
|
87
|
+
return this.templatePath('./basicCardView/');
|
|
88
|
+
case 'Generic':
|
|
89
|
+
return this.templatePath('./genericCardView/');
|
|
90
|
+
default:
|
|
91
|
+
throw new Error(`Invalid template type '${templateType}'`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
_getManifestTemplatePath(templateType) {
|
|
95
|
+
switch (templateType) {
|
|
96
|
+
case 'Image':
|
|
97
|
+
return this.templatePath('./manifestTemplate/imageTemplate/');
|
|
98
|
+
case 'Generic':
|
|
99
|
+
return this.templatePath('./manifestTemplate/componentsTemplate/');
|
|
100
|
+
default:
|
|
101
|
+
return this.templatePath('./manifestTemplate/baseTemplate/');
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.GenericAdaptiveCardExtensionGenerator = GenericAdaptiveCardExtensionGenerator;
|
|
106
|
+
// Yeoman expects exports of this type, which overrides the TS exports above
|
|
107
|
+
// Ensure that anything marked as export above is also listed here
|
|
108
|
+
module.exports = GenericAdaptiveCardExtensionGenerator;
|
|
109
|
+
module.exports.defineOptions = defineOptions;
|
|
110
|
+
module.exports.composeWith = composeWith;
|
|
111
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -6,9 +6,16 @@ import {
|
|
|
6
6
|
ICardButton
|
|
7
7
|
} from '@microsoft/sp-adaptive-card-extension-base';
|
|
8
8
|
import * as strings from '<%= componentStrings %>';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
I<%= componentClassName %>Props,
|
|
11
|
+
I<%= componentClassName %>State,
|
|
12
|
+
QUICK_VIEW_REGISTRY_ID
|
|
13
|
+
} from '../<%= componentClassName %>';
|
|
10
14
|
|
|
11
|
-
export class CardView extends BaseBasicCardView<
|
|
15
|
+
export class CardView extends BaseBasicCardView<
|
|
16
|
+
I<%= componentClassName %>Props,
|
|
17
|
+
I<%= componentClassName %>State
|
|
18
|
+
> {
|
|
12
19
|
public get cardButtons(): [ICardButton] | [ICardButton, ICardButton] | undefined {
|
|
13
20
|
return [
|
|
14
21
|
{
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseComponentsCardView,
|
|
3
|
+
ComponentsCardViewParameters,
|
|
4
|
+
BasicCardView,
|
|
5
|
+
IExternalLinkCardAction,
|
|
6
|
+
IQuickViewCardAction
|
|
7
|
+
} from '@microsoft/sp-adaptive-card-extension-base';
|
|
8
|
+
import * as strings from '<%= componentStrings %>';
|
|
9
|
+
import {
|
|
10
|
+
I<%= componentClassName %>Props,
|
|
11
|
+
I<%= componentClassName %>State,
|
|
12
|
+
QUICK_VIEW_REGISTRY_ID
|
|
13
|
+
} from '../<%= componentClassName %>';
|
|
14
|
+
|
|
15
|
+
export class CardView extends BaseComponentsCardView<
|
|
16
|
+
I<%= componentClassName %>Props,
|
|
17
|
+
I<%= componentClassName %>State,
|
|
18
|
+
ComponentsCardViewParameters
|
|
19
|
+
> {
|
|
20
|
+
public get cardViewParameters(): ComponentsCardViewParameters {
|
|
21
|
+
return BasicCardView({
|
|
22
|
+
cardBar: {
|
|
23
|
+
componentName: 'cardBar',
|
|
24
|
+
title: this.properties.title
|
|
25
|
+
},
|
|
26
|
+
header: {
|
|
27
|
+
componentName: 'text',
|
|
28
|
+
text: strings.PrimaryText
|
|
29
|
+
},
|
|
30
|
+
footer: {
|
|
31
|
+
componentName: 'cardButton',
|
|
32
|
+
title: strings.QuickViewButton,
|
|
33
|
+
action: {
|
|
34
|
+
type: 'QuickView',
|
|
35
|
+
parameters: {
|
|
36
|
+
view: QUICK_VIEW_REGISTRY_ID
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public get onCardSelection(): IQuickViewCardAction | IExternalLinkCardAction | undefined {
|
|
44
|
+
return {
|
|
45
|
+
type: 'ExternalLink',
|
|
46
|
+
parameters: {
|
|
47
|
+
target: 'https://www.bing.com'
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -6,9 +6,16 @@ import {
|
|
|
6
6
|
ICardButton
|
|
7
7
|
} from '@microsoft/sp-adaptive-card-extension-base';
|
|
8
8
|
import * as strings from '<%= componentStrings %>';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
I<%= componentClassName %>Props,
|
|
11
|
+
I<%= componentClassName %>State,
|
|
12
|
+
QUICK_VIEW_REGISTRY_ID
|
|
13
|
+
} from '../<%= componentClassName %>';
|
|
10
14
|
|
|
11
|
-
export class CardView extends BaseImageCardView<
|
|
15
|
+
export class CardView extends BaseImageCardView<
|
|
16
|
+
I<%= componentClassName %>Props,
|
|
17
|
+
I<%= componentClassName %>State
|
|
18
|
+
> {
|
|
12
19
|
/**
|
|
13
20
|
* Buttons will not be visible if card size is 'Medium' with Image Card View.
|
|
14
21
|
* It will support up to two buttons for 'Large' card size.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/spfx/adaptive-card-extension-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
|
+
"preconfiguredEntries": [{
|
|
17
|
+
"groupId": "bd067b1e-3ad5-4d5d-a5fe-505f07d7f59c", // Dashboard
|
|
18
|
+
"group": { "default": "Dashboard" },
|
|
19
|
+
"title": { "default": "<%= componentNameUnescaped %>" },
|
|
20
|
+
"description": { "default": "<%= componentDescription %>" },
|
|
21
|
+
"iconImageUrl": "https://res.cdn.office.net/files/fabric-cdn-prod_20230308.001/assets/brand-icons/product-monoline/svg/vivaconnections_32x1.svg",
|
|
22
|
+
"properties": {
|
|
23
|
+
"title": "<%= componentNameUnescaped %>"
|
|
24
|
+
},
|
|
25
|
+
"cardSize": "Large"
|
|
26
|
+
}]
|
|
27
|
+
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { ISPFxAdaptiveCard,
|
|
1
|
+
import { ISPFxAdaptiveCard, BaseAdaptiveCardQuickView } from '@microsoft/sp-adaptive-card-extension-base';
|
|
2
2
|
import * as strings from '<%= componentStrings %>';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
I<%= componentClassName %>Props,
|
|
5
|
+
I<%= componentClassName %>State
|
|
6
|
+
} from '../<%= componentClassName %>';
|
|
4
7
|
|
|
5
8
|
export interface IQuickViewData {
|
|
6
9
|
subTitle: string;
|
|
7
10
|
title: string;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
|
-
export class QuickView extends
|
|
13
|
+
export class QuickView extends BaseAdaptiveCardQuickView<
|
|
11
14
|
I<%= componentClassName %>Props,
|
|
12
15
|
I<%= componentClassName %>State,
|
|
13
16
|
IQuickViewData
|
|
@@ -22,4 +25,4 @@ export class QuickView extends BaseAdaptiveCardView<
|
|
|
22
25
|
public get template(): ISPFxAdaptiveCard {
|
|
23
26
|
return require('./template/QuickViewTemplate.json');
|
|
24
27
|
}
|
|
25
|
-
}
|
|
28
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPropertyPaneConfiguration } from '@microsoft/sp-property-pane';
|
|
1
|
+
import type { IPropertyPaneConfiguration } from '@microsoft/sp-property-pane';
|
|
2
2
|
import { BaseAdaptiveCardExtension } from '@microsoft/sp-adaptive-card-extension-base';
|
|
3
3
|
import { CardView } from './cardView/CardView';
|
|
4
4
|
import { QuickView } from './quickView/QuickView';
|
|
@@ -23,7 +23,9 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
|
|
|
23
23
|
public onInit(): Promise<void> {
|
|
24
24
|
this.state = { };
|
|
25
25
|
|
|
26
|
+
// registers the card view to be shown in a dashboard
|
|
26
27
|
this.cardNavigator.register(CARD_VIEW_REGISTRY_ID, () => new CardView());
|
|
28
|
+
// registers the quick view to open via QuickView action
|
|
27
29
|
this.quickViewNavigator.register(QUICK_VIEW_REGISTRY_ID, () => new QuickView());
|
|
28
30
|
|
|
29
31
|
return Promise.resolve();
|
|
@@ -6,9 +6,16 @@ import {
|
|
|
6
6
|
ICardButton
|
|
7
7
|
} from '@microsoft/sp-adaptive-card-extension-base';
|
|
8
8
|
import * as strings from '<%= componentStrings %>';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
I<%= componentClassName %>Props,
|
|
11
|
+
I<%= componentClassName %>State,
|
|
12
|
+
QUICK_VIEW_REGISTRY_ID
|
|
13
|
+
} from '../<%= componentClassName %>';
|
|
10
14
|
|
|
11
|
-
export class CardView extends BasePrimaryTextCardView<
|
|
15
|
+
export class CardView extends BasePrimaryTextCardView<
|
|
16
|
+
I<%= componentClassName %>Props,
|
|
17
|
+
I<%= componentClassName %>State
|
|
18
|
+
> {
|
|
12
19
|
public get cardButtons(): [ICardButton] | [ICardButton, ICardButton] | undefined {
|
|
13
20
|
return [
|
|
14
21
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBaseOptions, BaseGenerator, AvailableTemplates } from '../../common/BaseGenerator';
|
|
1
|
+
import type { IBaseOptions, BaseGenerator, AvailableTemplates } from '../../common/BaseGenerator';
|
|
2
2
|
import * as BaseComponent from '../component/BaseComponentGenerator';
|
|
3
3
|
export interface ILibraryOptions extends BaseComponent.IBaseComponentOptions {
|
|
4
4
|
}
|
|
@@ -18,6 +18,6 @@ export declare class LibraryGenerator extends BaseComponent.BaseComponentGenerat
|
|
|
18
18
|
install(): void;
|
|
19
19
|
end(): void;
|
|
20
20
|
protected constructor(args: string | string[], options: ILibraryOptions);
|
|
21
|
-
private
|
|
21
|
+
private _shouldExecute;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/library/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/library/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAElG,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,MAAM,WAAW,eAAgB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAE/E,MAAM,WAAW,eAAgB,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAE/E,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,MAAM,EAChF,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,YAAY,GACpB,IAAI,CAEN;AAED,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,MAAM,EAClF,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC3C,IAAI,CAEN;AAED,qBAAa,gBAAiB,SAAQ,aAAa,CAAC,sBAAsB,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1G,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAa;IACpD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAa;IAChD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAM;IAC/D,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAe;IAE7C,YAAY,IAAI,IAAI;IAId,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhC,WAAW,IAAI,IAAI;IAiBnB,OAAO,IAAI,IAAI;IAOf,OAAO,IAAI,IAAI;IAMf,GAAG,IAAI,IAAI;IAIlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe;IAKvE,OAAO,CAAC,cAAc;CAGvB"}
|
|
@@ -49,12 +49,12 @@ class LibraryGenerator extends BaseComponent.BaseComponentGenerator {
|
|
|
49
49
|
}
|
|
50
50
|
async prompting() {
|
|
51
51
|
this.ensureCorrectFolder();
|
|
52
|
-
if (this.
|
|
52
|
+
if (this._shouldExecute()) {
|
|
53
53
|
await super.prompting();
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
configuring() {
|
|
57
|
-
if (this.
|
|
57
|
+
if (this._shouldExecute()) {
|
|
58
58
|
const bundleEntry = {
|
|
59
59
|
components: [
|
|
60
60
|
{
|
|
@@ -69,20 +69,20 @@ class LibraryGenerator extends BaseComponent.BaseComponentGenerator {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
writing() {
|
|
72
|
-
if (this.
|
|
72
|
+
if (this._shouldExecute()) {
|
|
73
73
|
super.writing(true);
|
|
74
74
|
this.copyTemplate(this.templatePath('./index/'), this.destinationPath('./src'));
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
install() {
|
|
78
|
-
if (this.
|
|
78
|
+
if (this._shouldExecute()) {
|
|
79
79
|
super.install();
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
end() {
|
|
83
83
|
super.end();
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
_shouldExecute() {
|
|
86
86
|
return this.config.get('environment') === 'spo' && this.config.get('componentType') === 'library';
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IBaseOptions, BaseGenerator } from '../../common/BaseGenerator';
|
|
2
|
+
import { BaseACEGenerator, type IBaseACEContext, type IBaseACEOptions } from '../adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator';
|
|
3
|
+
export interface ISearchACEOptions extends IBaseACEOptions {
|
|
4
|
+
}
|
|
5
|
+
export interface ISearchACEContext extends IBaseACEContext {
|
|
6
|
+
}
|
|
7
|
+
export declare function composeWith<TOptions extends IBaseOptions, TContext extends object>(base: BaseGenerator<TOptions, TContext>, options: IBaseOptions): void;
|
|
8
|
+
export declare function defineOptions<TOptions extends IBaseOptions, TContext extends object>(generator: BaseGenerator<TOptions, TContext>): void;
|
|
9
|
+
export declare class SearchAdaptiveCardExtensionGenerator extends BaseACEGenerator<ISearchACEOptions, ISearchACEContext> {
|
|
10
|
+
initializing(): void;
|
|
11
|
+
prompting(): Promise<void>;
|
|
12
|
+
configuring(): void;
|
|
13
|
+
writing(): void;
|
|
14
|
+
install(): void;
|
|
15
|
+
end(): void;
|
|
16
|
+
protected constructor(args: string | string[], options: ISearchACEOptions);
|
|
17
|
+
private _shouldExecute;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/searchAdaptiveCardExtension/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,6DAA6D,CAAC;AAErE,MAAM,WAAW,iBAAkB,SAAQ,eAAe;CAAG;AAE7D,MAAM,WAAW,iBAAkB,SAAQ,eAAe;CAAG;AAE7D,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,MAAM,EAChF,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACvC,OAAO,EAAE,YAAY,GACpB,IAAI,CAEN;AAED,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,MAAM,EAClF,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC3C,IAAI,CAEN;AAED,qBAAa,oCAAqC,SAAQ,gBAAgB,CACxE,iBAAiB,EACjB,iBAAiB,CAClB;IACQ,YAAY,IAAI,IAAI;IAId,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhC,WAAW,IAAI,IAAI;IAMnB,OAAO,IAAI,IAAI;IAMf,OAAO,IAAI,IAAI;IAMf,GAAG,IAAI,IAAI;IAIlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,iBAAiB;IAKzE,OAAO,CAAC,cAAc;CAQvB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SearchAdaptiveCardExtensionGenerator = exports.defineOptions = exports.composeWith = void 0;
|
|
27
|
+
const path = __importStar(require("path"));
|
|
28
|
+
const Utils = __importStar(require("../../common/utilities"));
|
|
29
|
+
const BaseAdaptiveCardExtensionGenerator_1 = require("../adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator");
|
|
30
|
+
function composeWith(base, options) {
|
|
31
|
+
Utils.compose(path.basename(__dirname), base, options);
|
|
32
|
+
}
|
|
33
|
+
exports.composeWith = composeWith;
|
|
34
|
+
function defineOptions(generator) {
|
|
35
|
+
/* no-op */
|
|
36
|
+
}
|
|
37
|
+
exports.defineOptions = defineOptions;
|
|
38
|
+
class SearchAdaptiveCardExtensionGenerator extends BaseAdaptiveCardExtensionGenerator_1.BaseACEGenerator {
|
|
39
|
+
initializing() {
|
|
40
|
+
/* no-op */
|
|
41
|
+
}
|
|
42
|
+
async prompting() {
|
|
43
|
+
this.ensureCorrectFolder();
|
|
44
|
+
if (this._shouldExecute()) {
|
|
45
|
+
await super.prompting();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
configuring() {
|
|
49
|
+
if (this._shouldExecute()) {
|
|
50
|
+
super.configuring();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
writing() {
|
|
54
|
+
if (this._shouldExecute()) {
|
|
55
|
+
super.writing(true);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
install() {
|
|
59
|
+
if (this._shouldExecute()) {
|
|
60
|
+
super.install();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
end() {
|
|
64
|
+
super.end();
|
|
65
|
+
}
|
|
66
|
+
constructor(args, options) {
|
|
67
|
+
super(args, options);
|
|
68
|
+
defineOptions(this);
|
|
69
|
+
}
|
|
70
|
+
_shouldExecute() {
|
|
71
|
+
return (this.config.get('environment') === 'spo' &&
|
|
72
|
+
this.config.get('componentType') === 'adaptiveCardExtension' &&
|
|
73
|
+
this.config.get('isDomainIsolated') === false &&
|
|
74
|
+
this.config.get('aceTemplateType') === 'Search');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.SearchAdaptiveCardExtensionGenerator = SearchAdaptiveCardExtensionGenerator;
|
|
78
|
+
// Yeoman expects exports of this type, which overrides the TS exports above
|
|
79
|
+
// Ensure that anything marked as export above is also listed here
|
|
80
|
+
module.exports = SearchAdaptiveCardExtensionGenerator;
|
|
81
|
+
module.exports.defineOptions = defineOptions;
|
|
82
|
+
module.exports.composeWith = composeWith;
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
define([], function() {
|
|
2
|
+
return {
|
|
3
|
+
"PropertyPaneDescription": "Write 1-3 sentences describing the functionality of this component.",
|
|
4
|
+
"TitleFieldLabel": "Card title",
|
|
5
|
+
"Title": "Megan Bowen",
|
|
6
|
+
"SubTitle": "Marketing Manager",
|
|
7
|
+
"PrimaryText": "Look for people within the company",
|
|
8
|
+
"Suggested": "Suggested",
|
|
9
|
+
"SearchAction": "Search",
|
|
10
|
+
"Placeholder": "Search"
|
|
11
|
+
}
|
|
12
|
+
});
|