@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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare interface I<%= componentStrings %> {
|
|
2
|
+
PropertyPaneDescription: string;
|
|
3
|
+
TitleFieldLabel: string;
|
|
4
|
+
Title: string;
|
|
5
|
+
SubTitle: string;
|
|
6
|
+
PrimaryText: string;
|
|
7
|
+
Suggested: string;
|
|
8
|
+
SearchAction: string;
|
|
9
|
+
Placeholder: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '<%= componentStrings %>' {
|
|
13
|
+
const strings: I<%= componentStrings %>;
|
|
14
|
+
export = strings;
|
|
15
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseComponentsCardView,
|
|
3
|
+
ISearchCardViewParameters,
|
|
4
|
+
SearchCardView,
|
|
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
|
+
SEARCH_RESULTS_QUICK_VIEW_REGISTRY_ID,
|
|
13
|
+
ITEM_QUICK_VIEW_REGISTRY_ID,
|
|
14
|
+
SEARCH_BOX_ID
|
|
15
|
+
} from '../<%= componentClassName %>';
|
|
16
|
+
|
|
17
|
+
export class CardView extends BaseComponentsCardView<
|
|
18
|
+
I<%= componentClassName %>Props,
|
|
19
|
+
I<%= componentClassName %>State,
|
|
20
|
+
ISearchCardViewParameters
|
|
21
|
+
> {
|
|
22
|
+
public get cardViewParameters(): ISearchCardViewParameters {
|
|
23
|
+
return SearchCardView({
|
|
24
|
+
cardBar: {
|
|
25
|
+
componentName: 'cardBar',
|
|
26
|
+
title: this.properties.title
|
|
27
|
+
},
|
|
28
|
+
header: {
|
|
29
|
+
componentName: 'text',
|
|
30
|
+
text: strings.PrimaryText
|
|
31
|
+
},
|
|
32
|
+
body: {
|
|
33
|
+
componentName: 'searchBox',
|
|
34
|
+
placeholder: strings.Placeholder,
|
|
35
|
+
id: SEARCH_BOX_ID,
|
|
36
|
+
button: {
|
|
37
|
+
action: {
|
|
38
|
+
type: 'QuickView',
|
|
39
|
+
parameters: {
|
|
40
|
+
view: SEARCH_RESULTS_QUICK_VIEW_REGISTRY_ID
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
footer: {
|
|
46
|
+
componentName: 'searchFooter',
|
|
47
|
+
title: strings.Suggested,
|
|
48
|
+
imageInitials: 'MB',
|
|
49
|
+
text: strings.Title,
|
|
50
|
+
secondaryText: strings.SubTitle,
|
|
51
|
+
onSelection: {
|
|
52
|
+
type: 'QuickView',
|
|
53
|
+
parameters: {
|
|
54
|
+
view: ITEM_QUICK_VIEW_REGISTRY_ID
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public get onCardSelection(): IQuickViewCardAction | IExternalLinkCardAction | undefined {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ISPFxAdaptiveCard, BaseAdaptiveCardQuickView } from '@microsoft/sp-adaptive-card-extension-base';
|
|
2
|
+
import * as strings from '<%= componentStrings %>';
|
|
3
|
+
import {
|
|
4
|
+
I<%= componentClassName %>Props,
|
|
5
|
+
I<%= componentClassName %>State
|
|
6
|
+
} from '../<%= componentClassName %>';
|
|
7
|
+
|
|
8
|
+
export interface IItemQuickViewData {
|
|
9
|
+
subTitle: string;
|
|
10
|
+
title: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class ItemQuickView extends BaseAdaptiveCardQuickView<
|
|
14
|
+
I<%= componentClassName %>Props,
|
|
15
|
+
I<%= componentClassName %>State,
|
|
16
|
+
IItemQuickViewData
|
|
17
|
+
> {
|
|
18
|
+
public get data(): IItemQuickViewData {
|
|
19
|
+
return {
|
|
20
|
+
subTitle: strings.SubTitle,
|
|
21
|
+
title: strings.Title
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public get template(): ISPFxAdaptiveCard {
|
|
26
|
+
return require('./template/ItemQuickViewTemplate.json');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ISPFxAdaptiveCard, BaseAdaptiveCardQuickView } from '@microsoft/sp-adaptive-card-extension-base';
|
|
2
|
+
import * as strings from '<%= componentStrings %>';
|
|
3
|
+
import {
|
|
4
|
+
I<%= componentClassName %>Props,
|
|
5
|
+
I<%= componentClassName %>State
|
|
6
|
+
} from '../<%= componentClassName %>';
|
|
7
|
+
|
|
8
|
+
export interface ISearchResultsQuickViewData {
|
|
9
|
+
searchActionTitle: string;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
queryString: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class SearchResultsQuickView extends BaseAdaptiveCardQuickView<
|
|
15
|
+
I<%= componentClassName %>Props,
|
|
16
|
+
I<%= componentClassName %>State,
|
|
17
|
+
ISearchResultsQuickViewData
|
|
18
|
+
> {
|
|
19
|
+
public get data(): ISearchResultsQuickViewData {
|
|
20
|
+
return {
|
|
21
|
+
searchActionTitle: strings.SearchAction,
|
|
22
|
+
placeholder: strings.Placeholder,
|
|
23
|
+
queryString: this.state.queryString || ''
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public get template(): ISPFxAdaptiveCard {
|
|
28
|
+
return require('./template/SearchResultsQuickViewTemplate.json');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "http://adaptivecards.io/schemas/adaptive-card.json",
|
|
3
|
+
"type": "AdaptiveCard",
|
|
4
|
+
"version": "1.5",
|
|
5
|
+
"body": [
|
|
6
|
+
{
|
|
7
|
+
"type": "TextBlock",
|
|
8
|
+
"weight": "Bolder",
|
|
9
|
+
"text": "${title}"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "ColumnSet",
|
|
13
|
+
"columns": [
|
|
14
|
+
{
|
|
15
|
+
"type": "Column",
|
|
16
|
+
"items": [
|
|
17
|
+
{
|
|
18
|
+
"type": "TextBlock",
|
|
19
|
+
"weight": "Bolder",
|
|
20
|
+
"text": "${subTitle}",
|
|
21
|
+
"wrap": true
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "http://adaptivecards.io/schemas/adaptive-card.json",
|
|
3
|
+
"type": "AdaptiveCard",
|
|
4
|
+
"version": "1.5",
|
|
5
|
+
"body": [
|
|
6
|
+
{
|
|
7
|
+
"type": "Input.Text",
|
|
8
|
+
"id": "filterByName",
|
|
9
|
+
"inlineAction": {
|
|
10
|
+
"type": "Action.Submit",
|
|
11
|
+
"title": "${searchActionTitle}",
|
|
12
|
+
"data": {
|
|
13
|
+
"id": "search"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"value": "${queryString}",
|
|
17
|
+
"placeholder": "${placeholder}"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "TextBlock",
|
|
21
|
+
"text": "Add markup to display the results",
|
|
22
|
+
"size": "normal",
|
|
23
|
+
"separator": true,
|
|
24
|
+
"spacing": "extraLarge"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
package/lib/generators/searchAdaptiveCardExtension/templates/none/{componentClassName}.manifest.json
ADDED
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { IPropertyPaneConfiguration } from '@microsoft/sp-property-pane';
|
|
2
|
+
import {
|
|
3
|
+
BaseAdaptiveCardExtension,
|
|
4
|
+
type IOnBeforeActionArguments,
|
|
5
|
+
type IQuickViewActionArguments
|
|
6
|
+
} from '@microsoft/sp-adaptive-card-extension-base';
|
|
7
|
+
import { CardView } from './cardView/CardView';
|
|
8
|
+
import { <%= componentName %>PropertyPane } from './<%= componentName %>PropertyPane';
|
|
9
|
+
|
|
10
|
+
export interface I<%= componentClassName %>Props {
|
|
11
|
+
title: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface I<%= componentClassName %>State {
|
|
15
|
+
queryString?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const CARD_VIEW_REGISTRY_ID: string = '<%= componentName %>_CARD_VIEW';
|
|
19
|
+
export const SEARCH_RESULTS_QUICK_VIEW_REGISTRY_ID: string = '<%= componentName %>_SEARCH_RESULTS_QUICK_VIEW';
|
|
20
|
+
export const ITEM_QUICK_VIEW_REGISTRY_ID: string = '<%= componentName %>_ITEM_QUICK_VIEW';
|
|
21
|
+
export const SEARCH_BOX_ID: string = 'searchBox';
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export default class <%= componentClassName %> extends BaseAdaptiveCardExtension<
|
|
25
|
+
I<%= componentClassName %>Props,
|
|
26
|
+
I<%= componentClassName %>State
|
|
27
|
+
> {
|
|
28
|
+
private _deferredPropertyPane: <%= componentName %>PropertyPane;
|
|
29
|
+
|
|
30
|
+
public onInit(): Promise<void> {
|
|
31
|
+
this.state = { };
|
|
32
|
+
|
|
33
|
+
// registers the card view to be shown in a dashboard
|
|
34
|
+
this.cardNavigator.register(CARD_VIEW_REGISTRY_ID, () => new CardView());
|
|
35
|
+
// registers the defer-loaded quick view to show search results
|
|
36
|
+
this.quickViewNavigator.register(SEARCH_RESULTS_QUICK_VIEW_REGISTRY_ID, () => {
|
|
37
|
+
return import(/* webpackChunkName: '<%= componentName %>-search-results-qv'*/ './quickView/SearchResultsQuickView')
|
|
38
|
+
.then(module => new module.SearchResultsQuickView());
|
|
39
|
+
});
|
|
40
|
+
// registers the defer-loaded quick view to show single search item details
|
|
41
|
+
this.quickViewNavigator.register(ITEM_QUICK_VIEW_REGISTRY_ID, () => {
|
|
42
|
+
return import(/* webpackChunkName: '<%= componentName %>-item-qv'*/ './quickView/ItemQuickView')
|
|
43
|
+
.then(module => new module.ItemQuickView());
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return Promise.resolve();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public onBeforeAction(action: IOnBeforeActionArguments): void {
|
|
50
|
+
if (action.type === 'QuickView') {
|
|
51
|
+
//
|
|
52
|
+
// for the QuickView action we can get search query from the data property.
|
|
53
|
+
// it allows to display the same query string in the quick view's text input.
|
|
54
|
+
//
|
|
55
|
+
const quickViewActionArguments: IQuickViewActionArguments = action as IQuickViewActionArguments;
|
|
56
|
+
if (quickViewActionArguments.viewId === SEARCH_RESULTS_QUICK_VIEW_REGISTRY_ID) {
|
|
57
|
+
this.setState({
|
|
58
|
+
queryString: quickViewActionArguments.data && quickViewActionArguments.data[SEARCH_BOX_ID]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
protected loadPropertyPaneResources(): Promise<void> {
|
|
65
|
+
return import(
|
|
66
|
+
/* webpackChunkName: '<%= componentName %>-property-pane'*/
|
|
67
|
+
'./<%= componentName %>PropertyPane'
|
|
68
|
+
)
|
|
69
|
+
.then(
|
|
70
|
+
(component) => {
|
|
71
|
+
this._deferredPropertyPane = new component.<%= componentName %>PropertyPane();
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
protected renderCard(): string | undefined {
|
|
77
|
+
return CARD_VIEW_REGISTRY_ID;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
|
|
81
|
+
return this._deferredPropertyPane?.getPropertyPaneConfiguration();
|
|
82
|
+
}
|
|
83
|
+
}
|
package/lib/generators/searchAdaptiveCardExtension/templates/none/{componentName}PropertyPane.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IPropertyPaneConfiguration, PropertyPaneTextField } from '@microsoft/sp-property-pane';
|
|
2
|
+
import * as strings from '<%= componentStrings %>';
|
|
3
|
+
|
|
4
|
+
export class <%= componentName %>PropertyPane {
|
|
5
|
+
public getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
|
|
6
|
+
return {
|
|
7
|
+
pages: [
|
|
8
|
+
{
|
|
9
|
+
header: { description: strings.PropertyPaneDescription },
|
|
10
|
+
groups: [
|
|
11
|
+
{
|
|
12
|
+
groupFields: [
|
|
13
|
+
PropertyPaneTextField('title', {
|
|
14
|
+
label: strings.TitleFieldLabel
|
|
15
|
+
})
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -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 ISearchQueryModifierOptions extends BaseExtension.IBaseExtensionOptions {
|
|
4
4
|
}
|
|
@@ -18,6 +18,6 @@ export declare class SearchQueryModifierGenerator extends BaseExtension.BaseExte
|
|
|
18
18
|
end(): void;
|
|
19
19
|
protected constructor(args: string | string[], options: ISearchQueryModifierOptions);
|
|
20
20
|
protected includeClientSideInstances(): boolean;
|
|
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/searchQueryModifier/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/searchQueryModifier/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGlG,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,MAAM,WAAW,2BAA4B,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAC3F,MAAM,WAAW,2BAA4B,SAAQ,aAAa,CAAC,qBAAqB;CAAG;AAE3F,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,4BAA6B,SAAQ,aAAa,CAAC,sBAAsB,CACpF,2BAA2B,EAC3B,2BAA2B,CAC5B;IACC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAA2B;IAClE,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAyB;IAC5D,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAM;IAExD,YAAY,IAAI,IAAI;IAId,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhC,WAAW,IAAI,IAAI;IAmBnB,OAAO,IAAI,IAAI;IAMf,OAAO,IAAI,IAAI;IAMf,GAAG,IAAI,IAAI;IAIlB,SAAS,aAAa,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,2BAA2B;IAKnF,SAAS,CAAC,0BAA0B,IAAI,OAAO;IAI/C,OAAO,CAAC,cAAc;CAOvB"}
|
|
@@ -48,12 +48,12 @@ class SearchQueryModifierGenerator 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('searchQueryModifier');
|
|
59
59
|
this.serveJson.addConfiguration(this.context.componentNameCamelCase, {
|
|
@@ -70,12 +70,12 @@ class SearchQueryModifierGenerator extends BaseExtension.BaseExtensionGenerator
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
writing() {
|
|
73
|
-
if (this.
|
|
73
|
+
if (this._shouldExecute()) {
|
|
74
74
|
super.writing();
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
install() {
|
|
78
|
-
if (this.
|
|
78
|
+
if (this._shouldExecute()) {
|
|
79
79
|
super.install();
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -85,7 +85,7 @@ class SearchQueryModifierGenerator extends BaseExtension.BaseExtensionGenerator
|
|
|
85
85
|
includeClientSideInstances() {
|
|
86
86
|
return true;
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
_shouldExecute() {
|
|
89
89
|
return (this.config.get('environment') === 'spo' &&
|
|
90
90
|
this.config.get('componentType') === 'extension' &&
|
|
91
91
|
this.config.get('extensionType') === 'SearchQueryModifier');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseGenerator, IBaseOptions } from '../../common/BaseGenerator';
|
|
1
|
+
import { BaseGenerator, type IBaseOptions } from '../../common/BaseGenerator';
|
|
2
2
|
export interface ISolutionOptions extends IBaseOptions {
|
|
3
3
|
solutionName: string;
|
|
4
4
|
solutionShortDescription: string;
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/solution/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI9E,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,CAAC;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,KAAK,CAAC;IACnB,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACxC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,WAAW,EAAE,MAAM,CAAiD;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,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,SAAS,EAAE,aAAa,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,IAAI,CAkChG"}
|
|
@@ -68,7 +68,7 @@ function defineOptions(generator) {
|
|
|
68
68
|
}
|
|
69
69
|
exports.defineOptions = defineOptions;
|
|
70
70
|
class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
|
|
71
|
-
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
72
|
constructor(args, options) {
|
|
73
73
|
super(args, options);
|
|
74
74
|
this.allowEmptyPackageJson = true;
|
|
@@ -79,7 +79,7 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
79
79
|
/* no-op */
|
|
80
80
|
}
|
|
81
81
|
async prompting() {
|
|
82
|
-
if (!this.
|
|
82
|
+
if (!this._shouldExecute()) {
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
const answers = await this.prompt([
|
|
@@ -173,7 +173,7 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
173
173
|
this.packageSolutionJson.setUpSolution(this.context);
|
|
174
174
|
}
|
|
175
175
|
configuring() {
|
|
176
|
-
if (this.
|
|
176
|
+
if (this._shouldExecute()) {
|
|
177
177
|
const packageJsonTemplate = this.context.useHeft
|
|
178
178
|
? require('./heft.package.json')
|
|
179
179
|
: require('./non-heft.package.json');
|
|
@@ -201,7 +201,8 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
writing() {
|
|
204
|
-
if (this.
|
|
204
|
+
if (this._shouldExecute()) {
|
|
205
|
+
// eslint-disable-next-line no-console
|
|
205
206
|
console.log();
|
|
206
207
|
super.writing(false);
|
|
207
208
|
const dest = this.destinationRoot();
|
|
@@ -219,7 +220,8 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
install() {
|
|
222
|
-
if (this.
|
|
223
|
+
if (this._shouldExecute()) {
|
|
224
|
+
// eslint-disable-next-line no-console
|
|
223
225
|
console.log();
|
|
224
226
|
this.tryInstall();
|
|
225
227
|
}
|
|
@@ -227,7 +229,7 @@ class SolutionGenerator extends BaseGenerator_1.BaseGenerator {
|
|
|
227
229
|
end() {
|
|
228
230
|
/* no-op */
|
|
229
231
|
}
|
|
230
|
-
|
|
232
|
+
_shouldExecute() {
|
|
231
233
|
return this.config.get('isCreatingSolution');
|
|
232
234
|
}
|
|
233
235
|
}
|
|
@@ -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 IWebpartOptions extends BaseComponent.IBaseComponentOptions {
|
|
4
4
|
}
|
|
@@ -18,6 +18,6 @@ export declare class WebpartGenerator extends BaseComponent.BaseComponentGenerat
|
|
|
18
18
|
install(): void;
|
|
19
19
|
end(): void;
|
|
20
20
|
protected constructor(args: string | string[], options: IWebpartOptions);
|
|
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/webpart/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/webpart/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,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,CAAc;IACrD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAa;IAChD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAwB;IACjF,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAc;IAE5C,YAAY,IAAI,IAAI;IAId,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhC,WAAW,IAAI,IAAI;IAenB,OAAO,IAAI,IAAI;IA0Bf,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"}
|
|
@@ -50,12 +50,12 @@ class WebpartGenerator extends BaseComponent.BaseComponentGenerator {
|
|
|
50
50
|
}
|
|
51
51
|
async prompting() {
|
|
52
52
|
this.ensureCorrectFolder();
|
|
53
|
-
if (this.
|
|
53
|
+
if (this._shouldExecute()) {
|
|
54
54
|
await super.prompting();
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
configuring() {
|
|
58
|
-
if (this.
|
|
58
|
+
if (this._shouldExecute()) {
|
|
59
59
|
super.configuring();
|
|
60
60
|
this.ensureDependencyGroup('webpart');
|
|
61
61
|
this.serveJson.setUpForWebParts();
|
|
@@ -64,7 +64,7 @@ class WebpartGenerator extends BaseComponent.BaseComponentGenerator {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
writing() {
|
|
67
|
-
if (this.
|
|
67
|
+
if (this._shouldExecute()) {
|
|
68
68
|
super.writing(false);
|
|
69
69
|
const dest = this._getOutputFolder(this.context.componentNameCamelCase);
|
|
70
70
|
const template = this.context.template;
|
|
@@ -79,14 +79,14 @@ class WebpartGenerator extends BaseComponent.BaseComponentGenerator {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
install() {
|
|
82
|
-
if (this.
|
|
82
|
+
if (this._shouldExecute()) {
|
|
83
83
|
super.install();
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
end() {
|
|
87
87
|
super.end();
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
_shouldExecute() {
|
|
90
90
|
return this.config.get('environment') === 'spo' && this.config.get('componentType') === 'webpart';
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Version } from '@microsoft/sp-core-library';
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
3
|
IPropertyPaneConfiguration,
|
|
4
4
|
PropertyPaneTextField
|
|
5
5
|
} from '@microsoft/sp-property-pane';
|
|
6
6
|
import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base';
|
|
7
|
-
import { IReadonlyTheme } from '@microsoft/sp-component-base';
|
|
7
|
+
import type { IReadonlyTheme } from '@microsoft/sp-component-base';
|
|
8
8
|
import { escape } from '@microsoft/sp-lodash-subset';
|
|
9
9
|
|
|
10
10
|
import styles from './<%= componentClassName %>.module.scss';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import styles from './<%= componentName %>.module.scss';
|
|
3
|
-
import { I<%= componentName %>Props } from './I<%= componentName %>Props';
|
|
3
|
+
import type { I<%= componentName %>Props } from './I<%= componentName %>Props';
|
|
4
4
|
import { escape } from '@microsoft/sp-lodash-subset';
|
|
5
5
|
|
|
6
6
|
export default class <%= componentName %> extends React.Component<I<%= componentName %>Props, {}> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/generator-sharepoint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0-beta.2",
|
|
4
4
|
"description": "Yeoman generator for the SharePoint Framework",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.13.0 <17.0.0"
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
"homepage": "http://aka.ms/spfx",
|
|
13
13
|
"main": "lib/generators/app/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@rushstack/node-core-library": "3.
|
|
15
|
+
"@rushstack/node-core-library": "3.59.4",
|
|
16
16
|
"colors": "~1.2.1",
|
|
17
17
|
"lodash": "4.17.21",
|
|
18
18
|
"update-notifier": "5.1.0",
|
|
19
19
|
"uuid": "~3.1.0",
|
|
20
20
|
"yeoman-generator": "5.6.1",
|
|
21
21
|
"yosay": "2.0.2",
|
|
22
|
-
"@microsoft/spfx-heft-plugins": "1.
|
|
22
|
+
"@microsoft/spfx-heft-plugins": "1.18.0-beta.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@microsoft/rush-lib": "5.
|
|
26
|
-
"@rushstack/heft": "0.
|
|
25
|
+
"@microsoft/rush-lib": "5.100.1",
|
|
26
|
+
"@rushstack/heft": "0.50.6",
|
|
27
27
|
"@types/inquirer": "7.3.1",
|
|
28
28
|
"@types/lodash": "4.14.117",
|
|
29
29
|
"@types/mem-fs-editor": "7.0.1",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@types/uuid": "3.0.0",
|
|
32
32
|
"@types/yeoman-generator": "5.2.10",
|
|
33
33
|
"@types/yosay": "2.0.0",
|
|
34
|
+
"eslint": "8.7.0",
|
|
34
35
|
"@odsp-web-tools/internal-node-rig": "0.1.0"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|