@microsoft/sp-module-interfaces 1.21.0-beta.0 → 1.21.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/dist/index-internal-beta.d.ts +15 -3
- package/dist/index-internal-public.d.ts +47 -2
- package/dist/index-internal.d.ts +15 -3
- package/lib-commonjs/index.js +31 -29
- package/lib-commonjs/manifestHelpers.js +22 -19
- package/lib-commonjs/manifestSchemaValidator.js +70 -84
- package/lib-commonjs/manifestSchemas/IAdaptiveCardExtensionManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideApplicationManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideAssemblyManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideComponentLoaderConfiguration.js +11 -3
- package/lib-commonjs/manifestSchemas/IClientSideComponentManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideExtensionManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideLibraryManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideManifestBase.js +10 -3
- package/lib-commonjs/manifestSchemas/IClientSideMultiVersionManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideWebPartManifest.js +62 -67
- package/lib-commonjs/manifestSchemas/ICommandSetExtensionManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IPrefabAppManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/ManifestType.js +18 -13
- package/lib-commonjs/manifestSchemas/examples/application_1.manifest.js +24 -6
- package/lib-commonjs/manifestSchemas/examples/application_2.manifest.js +28 -7
- package/lib-commonjs/manifestSchemas/examples/application_3.manifest.js +22 -5
- package/lib-commonjs/manifestSchemas/examples/assembly_1.manifest.js +18 -4
- package/lib-commonjs/manifestSchemas/examples/commandSet_1.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/extension_1.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/extension_2.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/extension_3.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/extension_4.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/library_1.manifest.js +18 -4
- package/lib-commonjs/manifestSchemas/examples/multi-version_1.manifest.js +24 -6
- package/lib-commonjs/manifestSchemas/examples/prefab_1.manifest.js +27 -7
- package/lib-commonjs/manifestSchemas/examples/prefab_2.manifest.js +61 -9
- package/lib-commonjs/manifestSchemas/examples/prefabapp.manifest.json +37 -3
- package/lib-commonjs/manifestSchemas/examples/webpart_1.manifest.js +24 -6
- package/lib-commonjs/manifestSchemas/examples/webpart_2.manifest.js +47 -12
- package/lib-commonjs/manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json +107 -3
- package/{lib-commonjs → lib-dts}/manifestSchemaValidator.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideWebPartManifest.d.ts +1 -3
- package/lib-dts/manifestSchemas/IPrefabAppManifest.d.ts +255 -0
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_2.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_3.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/assembly_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/commandSet_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_2.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_3.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_4.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/library_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/multi-version_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/prefab_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/prefab_2.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/webpart_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/webpart_2.manifest.d.ts +1 -1
- package/{dist → lib-dts}/tsdoc-metadata.json +1 -1
- package/lib-esm/index.js +15 -0
- package/lib-esm/manifestHelpers.js +21 -0
- package/lib-esm/manifestSchemaValidator.js +135 -0
- package/lib-esm/manifestSchemas/IAdaptiveCardExtensionManifest.js +9 -0
- package/lib-esm/manifestSchemas/IClientSideApplicationManifest.js +5 -0
- package/lib-esm/manifestSchemas/IClientSideAssemblyManifest.js +7 -0
- package/lib-esm/manifestSchemas/IClientSideComponentLoaderConfiguration.js +17 -0
- package/lib-esm/manifestSchemas/IClientSideComponentManifest.js +27 -0
- package/lib-esm/manifestSchemas/IClientSideExtensionManifest.js +7 -0
- package/lib-esm/manifestSchemas/IClientSideLibraryManifest.js +7 -0
- package/lib-esm/manifestSchemas/IClientSideManifestBase.js +7 -0
- package/lib-esm/manifestSchemas/IClientSideMultiVersionManifest.js +25 -0
- package/lib-esm/manifestSchemas/IClientSideWebPartManifest.js +62 -0
- package/lib-esm/manifestSchemas/ICommandSetExtensionManifest.js +8 -0
- package/lib-esm/manifestSchemas/IPrefabAppManifest.js +7 -0
- package/lib-esm/manifestSchemas/ManifestType.js +15 -0
- package/lib-esm/manifestSchemas/examples/application.manifest.json +346 -0
- package/lib-esm/manifestSchemas/examples/application_1.manifest.js +344 -0
- package/lib-esm/manifestSchemas/examples/application_2.manifest.js +47 -0
- package/lib-esm/manifestSchemas/examples/application_3.manifest.js +42 -0
- package/lib-esm/manifestSchemas/examples/assembly.manifest.json +331 -0
- package/lib-esm/manifestSchemas/examples/assembly_1.manifest.js +336 -0
- package/lib-esm/manifestSchemas/examples/commandSet_1.manifest.js +42 -0
- package/lib-esm/manifestSchemas/examples/commandset.manifest.json +38 -0
- package/lib-esm/manifestSchemas/examples/extension.manifest.json +20 -0
- package/lib-esm/manifestSchemas/examples/extension_1.manifest.js +25 -0
- package/lib-esm/manifestSchemas/examples/extension_2.manifest.js +24 -0
- package/lib-esm/manifestSchemas/examples/extension_3.manifest.js +23 -0
- package/lib-esm/manifestSchemas/examples/extension_4.manifest.js +23 -0
- package/lib-esm/manifestSchemas/examples/library.manifest.json +330 -0
- package/lib-esm/manifestSchemas/examples/library_1.manifest.js +335 -0
- package/lib-esm/manifestSchemas/examples/multi-version_1.manifest.js +673 -0
- package/lib-esm/manifestSchemas/examples/multi-version_1.manifest.json +336 -0
- package/lib-esm/manifestSchemas/examples/prefab_1.manifest.js +344 -0
- package/lib-esm/manifestSchemas/examples/prefab_2.manifest.js +381 -0
- package/lib-esm/manifestSchemas/examples/prefabapp.manifest.json +379 -0
- package/lib-esm/manifestSchemas/examples/webpart.manifest.json +380 -0
- package/lib-esm/manifestSchemas/examples/webpart_1.manifest.js +350 -0
- package/lib-esm/manifestSchemas/examples/webpart_2.manifest.js +388 -0
- package/lib-esm/manifestSchemas/jsonSchemas/adaptive-card-extension-manifest.schema.json +230 -0
- package/lib-esm/manifestSchemas/jsonSchemas/any-value.schema.json +8 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-application-manifest.schema.json +138 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-assembly-manifest.schema.json +45 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-component-loader-configuration.schema.json +273 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-component-manifest.schema.json +131 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-extension-manifest.schema.json +61 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-library-manifest.schema.json +39 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-manifest-base.schema.json +25 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-multi-version-manifest.schema.json +118 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-web-part-manifest.schema.json +348 -0
- package/lib-esm/manifestSchemas/jsonSchemas/command-set-extension-manifest.schema.json +81 -0
- package/lib-esm/manifestSchemas/jsonSchemas/guid.schema.json +6 -0
- package/lib-esm/manifestSchemas/jsonSchemas/localized-string.schema.json +33 -0
- package/lib-esm/manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json +176 -0
- package/lib-esm/manifestSchemas/jsonSchemas/semver.schema.json +8 -0
- package/lib-esm/manifestSchemas/remote/draft-04.schema.json +137 -0
- package/lib-esm/manifestSchemas/remote/site-design-script-actions.schema.json +1158 -0
- package/package.json +27 -7
- package/lib-commonjs/index.d.ts.map +0 -1
- package/lib-commonjs/manifestHelpers.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemaValidator.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IAdaptiveCardExtensionManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideApplicationManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideAssemblyManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideComponentLoaderConfiguration.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideComponentManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideExtensionManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideLibraryManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideManifestBase.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideMultiVersionManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideWebPartManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/ICommandSetExtensionManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IPrefabAppManifest.d.ts +0 -76
- package/lib-commonjs/manifestSchemas/IPrefabAppManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/ManifestType.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/application_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/application_2.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/application_3.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/assembly_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/commandSet_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/extension_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/extension_2.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/extension_3.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/extension_4.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/library_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/multi-version_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/prefab_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/prefab_2.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/webpart_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/webpart_2.manifest.d.ts.map +0 -1
- /package/{lib-commonjs → lib-dts}/index.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestHelpers.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IAdaptiveCardExtensionManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideApplicationManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideAssemblyManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideComponentLoaderConfiguration.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideComponentManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideExtensionManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideLibraryManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideManifestBase.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideMultiVersionManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/ICommandSetExtensionManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/ManifestType.d.ts +0 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import type { IClientSideComponentManifest, ILocalizedString } from './IClientSideComponentManifest';
|
|
2
|
+
/**
|
|
3
|
+
* This is the manifest for a PREFAB application.
|
|
4
|
+
*
|
|
5
|
+
* @alpha
|
|
6
|
+
*/
|
|
7
|
+
export interface IPrefabAppManifest extends IClientSideComponentManifest {
|
|
8
|
+
/**
|
|
9
|
+
* Title of the application as a dictionary of locale keys to title values. This value will be
|
|
10
|
+
* displayed to the user in the (page creation) interface.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
*
|
|
14
|
+
* Supported values: a dictionary of locale keys to strings. Should always have a 'default' key.
|
|
15
|
+
*
|
|
16
|
+
* Example: `"My Application"`
|
|
17
|
+
*
|
|
18
|
+
* ```
|
|
19
|
+
* {
|
|
20
|
+
* "default": "My Application"
|
|
21
|
+
* "en-us": "My Application",
|
|
22
|
+
* "fr-fr": "Ma demande",
|
|
23
|
+
* "zh": "我的應用程式"
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
title: ILocalizedString;
|
|
28
|
+
/**
|
|
29
|
+
* Description of the application represented as a dictionary of locale keys to description values.
|
|
30
|
+
* This value will be displayed to the user in the (page creation) interface.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
*
|
|
34
|
+
* Supported values: a dictionary of locale keys to strings. Should always have a 'default' key.
|
|
35
|
+
*
|
|
36
|
+
* Examples:
|
|
37
|
+
*
|
|
38
|
+
* ```
|
|
39
|
+
* "An application for searching for things."
|
|
40
|
+
* ```
|
|
41
|
+
* or
|
|
42
|
+
* ```
|
|
43
|
+
* {
|
|
44
|
+
* "default": "An application for searching for things.",
|
|
45
|
+
* "en-us": "An application for searching for things.",
|
|
46
|
+
* "fr-fr": "Une demande pour la recherche de choses.",
|
|
47
|
+
* "zh": "申請尋找的東西。"
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
description: ILocalizedString;
|
|
52
|
+
/**
|
|
53
|
+
* Specifies if there is a FCR (Finish Run Configuration) available for the app. True if no FCE is available.
|
|
54
|
+
*/
|
|
55
|
+
isConfigured: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Describes how the PREFAB app can be installed: NewSite or ExistingSite. If omitted the app supports both.
|
|
58
|
+
*/
|
|
59
|
+
appInstallationTypes?: Array<'NewSite' | 'ExistingSite'>;
|
|
60
|
+
/**
|
|
61
|
+
* Site Script actions.
|
|
62
|
+
*
|
|
63
|
+
* @remarks - See https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json for a list of actions.
|
|
64
|
+
* - The `onInstall` actions will be run when the app is installed on a site.
|
|
65
|
+
* - The `onDemand` actions will not run automatically, but can be referenced by an App developer.
|
|
66
|
+
*/
|
|
67
|
+
actions?: Record<string, PrefabAppSiteScript>;
|
|
68
|
+
/**
|
|
69
|
+
* Links to be rendered in the suite nav site settings menu for the PREFAB App.
|
|
70
|
+
*/
|
|
71
|
+
siteSettingsLinks?: IPrefabAppSiteSettingsLink[];
|
|
72
|
+
/**
|
|
73
|
+
* Toolbox entries for the PREFAB app.
|
|
74
|
+
*/
|
|
75
|
+
toolboxEntries?: IPrefabAppToolboxEntry[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Available types of Site Scripts.
|
|
79
|
+
* - onInstall - Site Script that will be applied when the app is installed.
|
|
80
|
+
* - onDemand - Site Script that will be applied on demand by a PREFAB developer.
|
|
81
|
+
*
|
|
82
|
+
* @alpha
|
|
83
|
+
*/
|
|
84
|
+
export type SiteScriptType = 'onInstall' | 'onDemand';
|
|
85
|
+
/**
|
|
86
|
+
* Base definition for Site Script.
|
|
87
|
+
*
|
|
88
|
+
* @alpha
|
|
89
|
+
*/
|
|
90
|
+
export interface IPrefabAppSiteScriptBase {
|
|
91
|
+
/**
|
|
92
|
+
* The type of the Site Script.
|
|
93
|
+
*/
|
|
94
|
+
type: SiteScriptType;
|
|
95
|
+
/**
|
|
96
|
+
* Actions to run as part of the Site Script.
|
|
97
|
+
* @remarks - See https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json for a list of actions.
|
|
98
|
+
*/
|
|
99
|
+
actions: ISiteScriptActionBase[];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Site Script that will be applied when the app is installed.
|
|
103
|
+
*
|
|
104
|
+
* @alpha
|
|
105
|
+
*/
|
|
106
|
+
export interface IPrefabAppOnInstallSiteScript extends IPrefabAppSiteScriptBase {
|
|
107
|
+
/**
|
|
108
|
+
* The type of the Site Script - onInstall.
|
|
109
|
+
*/
|
|
110
|
+
type: 'onInstall';
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Site Script that will be applied by a PREFAB developer.
|
|
114
|
+
*
|
|
115
|
+
* @alpha
|
|
116
|
+
*/
|
|
117
|
+
export interface IPrefabAppOnDemandSiteScript extends IPrefabAppSiteScriptBase {
|
|
118
|
+
/**
|
|
119
|
+
* The type of the Site Script - onUpdate.
|
|
120
|
+
*/
|
|
121
|
+
type: 'onDemand';
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Site Script that will be applied when the app is installed or on demand by a PREFAB app developer.
|
|
125
|
+
*
|
|
126
|
+
* @alpha
|
|
127
|
+
*/
|
|
128
|
+
export type PrefabAppSiteScript = IPrefabAppOnInstallSiteScript | IPrefabAppOnDemandSiteScript;
|
|
129
|
+
/**
|
|
130
|
+
* Base definition for Site Script action.
|
|
131
|
+
*
|
|
132
|
+
* @alpha
|
|
133
|
+
*/
|
|
134
|
+
export interface ISiteScriptActionBase {
|
|
135
|
+
verb: string;
|
|
136
|
+
[key: string]: any;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Represents an item that should be rendered in the suite nav site settings menu.
|
|
140
|
+
*
|
|
141
|
+
* @alpha
|
|
142
|
+
*/
|
|
143
|
+
export interface IPrefabAppSiteSettingsLink {
|
|
144
|
+
/**
|
|
145
|
+
* The unique identifier of the route to be rendered when the settings link is selected.
|
|
146
|
+
*/
|
|
147
|
+
viewId: string;
|
|
148
|
+
/**
|
|
149
|
+
* Text of the link represented as a dictionary of locale keys to title values. This value will be displayed to the user in the suite nav site settings menu.
|
|
150
|
+
*
|
|
151
|
+
* @remarks
|
|
152
|
+
* This text should be used in the suite nav site settings menu.
|
|
153
|
+
*
|
|
154
|
+
* Supported values: a dictionary of locale keys to strings. Should always have a `'default'` key.
|
|
155
|
+
*
|
|
156
|
+
* Example: `"My App Settings"`
|
|
157
|
+
* ```
|
|
158
|
+
* {
|
|
159
|
+
* "default": "My App Settings",
|
|
160
|
+
* "en-us": "My App Settings",
|
|
161
|
+
* "fr-fr": "Mes paramètres d'application",
|
|
162
|
+
* "zh": "我的應用程式設定"
|
|
163
|
+
* }
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
*/
|
|
167
|
+
text: ILocalizedString;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* This interface specifies the set of that can be provided by a PREFAB developer if the application should be available in the modern SharePoint toolbox.
|
|
171
|
+
*
|
|
172
|
+
* @alpha
|
|
173
|
+
*/
|
|
174
|
+
export interface IPrefabAppToolboxEntry {
|
|
175
|
+
/**
|
|
176
|
+
* The unique identifier of the route to be rendered if the entry is added to the page.
|
|
177
|
+
*/
|
|
178
|
+
viewId: string;
|
|
179
|
+
/**
|
|
180
|
+
* Title of the PREFAB entry represented as a single a dictionary of locale keys to title values. This
|
|
181
|
+
* value will be displayed to the user in the toolbox.
|
|
182
|
+
*
|
|
183
|
+
* @remarks
|
|
184
|
+
* This title should be used in the Toolbox and other display areas.
|
|
185
|
+
*
|
|
186
|
+
* Usage: display the name of the PREFAB route in the toolbox, and the page.
|
|
187
|
+
*
|
|
188
|
+
* Supported values: a dictionary of locale keys to strings. Should always have a `'default'` key.
|
|
189
|
+
*
|
|
190
|
+
* Example: `"My PREFAB App"`
|
|
191
|
+
* ```
|
|
192
|
+
* {
|
|
193
|
+
* "default": "My PREFAB App"
|
|
194
|
+
* "en-us": "My PREFAB App",
|
|
195
|
+
* "fr-fr": "My PREFAB App",
|
|
196
|
+
* "zh": "我的 PREFAB 應用程式"
|
|
197
|
+
* }
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
title: ILocalizedString;
|
|
201
|
+
/**
|
|
202
|
+
* Description of the PREFAB entry represented as a dictionary of locale keys to description values. This
|
|
203
|
+
* value will be displayed to the user in the toolbox. This description should be used in the Toolbox tooltip and
|
|
204
|
+
* other display areas.
|
|
205
|
+
*
|
|
206
|
+
* @remarks
|
|
207
|
+
*
|
|
208
|
+
* Usage: display the description of the PREFAB route in the toolbox tooltip, and the page.
|
|
209
|
+
*
|
|
210
|
+
* Supported values: a dictionary of locale keys to strings. Should always have a `'default'` key.
|
|
211
|
+
*
|
|
212
|
+
* Example: `"A tool for displaying neat information."`
|
|
213
|
+
*
|
|
214
|
+
* ```
|
|
215
|
+
* {
|
|
216
|
+
* "default": "A tool for displaying neat information.",
|
|
217
|
+
* "en-us": "A tool for displaying neat information.",
|
|
218
|
+
* "fr-fr": "Un outil d'affichage des informations soignées.",
|
|
219
|
+
* "zh": "用於顯示整潔資訊的工具。"
|
|
220
|
+
* }
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
description: ILocalizedString;
|
|
224
|
+
/**
|
|
225
|
+
* The icon for the PREFAB entry, to be displayed in the toolbox, represented as a character name in the
|
|
226
|
+
* Office 365 icon font file.
|
|
227
|
+
*
|
|
228
|
+
* @remarks
|
|
229
|
+
* The icon font is specified here: {@link https://aka.ms/uifabric-icons} If this field has
|
|
230
|
+
* a value, the {@link IPrefabAppToolboxEntry.iconImageUrl} field will be ignored.
|
|
231
|
+
*
|
|
232
|
+
* Supported values: Any character name in the Office 365 Icon Font.
|
|
233
|
+
*
|
|
234
|
+
* Example: "graph"
|
|
235
|
+
*/
|
|
236
|
+
officeFabricIconFontName?: string;
|
|
237
|
+
/**
|
|
238
|
+
* The icon for the PREFAB app, to be displayed in the toolbox, represented as image URL. The image at the
|
|
239
|
+
* URL must be exactly 40x28 px (SPPPLAT VSO#218660 to fix the size of the icon image).
|
|
240
|
+
*
|
|
241
|
+
* @remarks
|
|
242
|
+
* If the {@link IPrefabAppToolboxEntry.officeFabricIconFontName} field does not have a value,
|
|
243
|
+
* this field must have a value. This value can be an absolute URL (e.g. `"http://example.com/icons/my-icon.png"`) or
|
|
244
|
+
* a relative file path (e.g. `"./icons/my-icon.png"`). In the latter case, the path will be resolved relative to
|
|
245
|
+
* the folder containing the input manifest. The icon file will be copied to the deployment folder like an asset,
|
|
246
|
+
* and the output manifest's iconImageUrl will be replaced with a URL relative to the URL used to load all other
|
|
247
|
+
* assets (the loaderConfig.internalModuleBaseUrls property).
|
|
248
|
+
*
|
|
249
|
+
* Supported values: Any absolute URL.
|
|
250
|
+
*
|
|
251
|
+
* Example: `"https://contoso.akamaihd.net/files/myPREFABIcon.png"`
|
|
252
|
+
*/
|
|
253
|
+
iconImageUrl?: string;
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=IPrefabAppManifest.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IClientSideMultiVersionManifest } from '../IClientSideMultiVersionManifest';
|
|
2
2
|
import type { IClientSideLibraryManifest } from '../IClientSideLibraryManifest';
|
|
3
3
|
declare const multiVersionManifest: IClientSideMultiVersionManifest<IClientSideLibraryManifest>;
|
|
4
|
-
export
|
|
4
|
+
export default multiVersionManifest;
|
|
5
5
|
//# sourceMappingURL=multi-version_1.manifest.d.ts.map
|
package/lib-esm/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './manifestSchemas/IClientSideApplicationManifest';
|
|
2
|
+
export * from './manifestSchemas/IClientSideAssemblyManifest';
|
|
3
|
+
export * from './manifestSchemas/IClientSideComponentLoaderConfiguration';
|
|
4
|
+
export * from './manifestSchemas/IClientSideComponentManifest';
|
|
5
|
+
export * from './manifestSchemas/IClientSideExtensionManifest';
|
|
6
|
+
export * from './manifestSchemas/IClientSideLibraryManifest';
|
|
7
|
+
export * from './manifestSchemas/IClientSideManifestBase';
|
|
8
|
+
export * from './manifestSchemas/IClientSideMultiVersionManifest';
|
|
9
|
+
export * from './manifestSchemas/IClientSideWebPartManifest';
|
|
10
|
+
export * from './manifestSchemas/ICommandSetExtensionManifest';
|
|
11
|
+
export * from './manifestSchemas/ManifestType';
|
|
12
|
+
export * from './manifestSchemas/IAdaptiveCardExtensionManifest';
|
|
13
|
+
export * from './manifestSchemas/IPrefabAppManifest';
|
|
14
|
+
|
|
15
|
+
//#sourceMappingUrl=./index.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifies if a component manifest is a multi-version manifest.
|
|
3
|
+
* @param manifest - The manifest for a component, which may have multiple versions
|
|
4
|
+
* @returns If the manifest has multiple versions
|
|
5
|
+
*/ export function isMultiVersionManifest(manifest) {
|
|
6
|
+
return !!manifest.versions;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @param config - The module loader configuration for the module.
|
|
10
|
+
* @returns If the module loads as a localized path.
|
|
11
|
+
*/ export function isLocalizedPath(config) {
|
|
12
|
+
return config.type === 'localizedPath';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @param config - The module loader configuration for the module.
|
|
16
|
+
* @returns If the module loads as a non-localized path.
|
|
17
|
+
*/ export function isPath(config) {
|
|
18
|
+
return config.type === 'path';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#sourceMappingUrl=./manifestHelpers.js.map
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import ZSchema from 'z-schema';
|
|
2
|
+
import { FileSystem } from '@rushstack/node-core-library';
|
|
3
|
+
// Discover the schema files
|
|
4
|
+
const schemasDirectory = `${__dirname}/manifestSchemas/jsonSchemas`;
|
|
5
|
+
const schemaFiles = FileSystem.readFolderItemNames(schemasDirectory);
|
|
6
|
+
const schemas = schemaFiles.map((schemaFile)=>require(`${schemasDirectory}/${schemaFile}`));
|
|
7
|
+
import manifestSchema from './manifestSchemas/jsonSchemas/client-side-component-manifest.schema.json';
|
|
8
|
+
import applicationSchema from './manifestSchemas/jsonSchemas/client-side-application-manifest.schema.json';
|
|
9
|
+
import prefabAppSchema from './manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json';
|
|
10
|
+
import webPartSchema from './manifestSchemas/jsonSchemas/client-side-web-part-manifest.schema.json';
|
|
11
|
+
import commandSetSchema from './manifestSchemas/jsonSchemas/command-set-extension-manifest.schema.json';
|
|
12
|
+
import extensionSchema from './manifestSchemas/jsonSchemas/client-side-extension-manifest.schema.json';
|
|
13
|
+
import librarySchema from './manifestSchemas/jsonSchemas/client-side-library-manifest.schema.json';
|
|
14
|
+
import assemblySchema from './manifestSchemas/jsonSchemas/client-side-assembly-manifest.schema.json';
|
|
15
|
+
import multiVersionSchema from './manifestSchemas/jsonSchemas/client-side-multi-version-manifest.schema.json';
|
|
16
|
+
// local copy of site scripts schema and draft-07 schema
|
|
17
|
+
import siteScriptsSchema from './manifestSchemas/remote/site-design-script-actions.schema.json';
|
|
18
|
+
import draft04Schema from './manifestSchemas/remote/draft-04.schema.json';
|
|
19
|
+
const SITE_SCRIPTS_SCHEMA_URL = 'https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json';
|
|
20
|
+
const DRAFT_07_SCHEMA_URL = 'http://json-schema.org/draft-07/schema#';
|
|
21
|
+
const siteScriptsSchemaPromise = fetch(SITE_SCRIPTS_SCHEMA_URL).then((response)=>{
|
|
22
|
+
return response.text();
|
|
23
|
+
}).catch((error)=>{
|
|
24
|
+
// eslint-disable-next-line no-console
|
|
25
|
+
console.error(`Failed to fetch remote schema: ${error}`);
|
|
26
|
+
// fallback to local copy
|
|
27
|
+
return JSON.stringify(siteScriptsSchema);
|
|
28
|
+
});
|
|
29
|
+
export const zSchemaOptions = {
|
|
30
|
+
breakOnFirstError: true,
|
|
31
|
+
forceAdditional: true,
|
|
32
|
+
forceItems: true,
|
|
33
|
+
forceMaxLength: false,
|
|
34
|
+
forceProperties: false,
|
|
35
|
+
noExtraKeywords: true,
|
|
36
|
+
noTypeless: true,
|
|
37
|
+
noEmptyStrings: true
|
|
38
|
+
};
|
|
39
|
+
const schemaValidator = new ZSchema(zSchemaOptions);
|
|
40
|
+
const draft07ValidationOptions = {
|
|
41
|
+
strictMode: false,
|
|
42
|
+
ignoreUnresolvableReferences: true,
|
|
43
|
+
ignoreUnknownFormats: true
|
|
44
|
+
};
|
|
45
|
+
//
|
|
46
|
+
// this one is needed for the site scripts reference.
|
|
47
|
+
// We're faking draft-07 schema with draft-04 schema as z-schema doesn't support draft-07
|
|
48
|
+
//
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
+
schemaValidator.setRemoteReference(DRAFT_07_SCHEMA_URL, draft04Schema, draft07ValidationOptions);
|
|
51
|
+
siteScriptsSchemaPromise.then((remoteSchema)=>{
|
|
52
|
+
// ZSchema typedef doesn't contain setRemoteReference method. But it does exist in the implementation and referenced in the documentation.
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
+
schemaValidator.setRemoteReference(SITE_SCRIPTS_SCHEMA_URL, JSON.parse(remoteSchema), {
|
|
55
|
+
strictMode: false,
|
|
56
|
+
ignoreUnresolvableReferences: true
|
|
57
|
+
});
|
|
58
|
+
schemaValidator.validateSchema(schemas);
|
|
59
|
+
}).catch((error)=>{
|
|
60
|
+
// swallowing the error here
|
|
61
|
+
});
|
|
62
|
+
class ManifestValidator {
|
|
63
|
+
static registerRemoteSchemaReferences() {
|
|
64
|
+
return siteScriptsSchemaPromise.then(()=>{
|
|
65
|
+
// no-op;
|
|
66
|
+
}).catch(()=>{
|
|
67
|
+
// no-op;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
static validateApplicationManifest(manifest) {
|
|
71
|
+
return ManifestValidator._validateManifest(manifest, applicationSchema);
|
|
72
|
+
}
|
|
73
|
+
static validatePrefabAppManifest(manifest) {
|
|
74
|
+
return ManifestValidator._validateManifest(manifest, prefabAppSchema);
|
|
75
|
+
}
|
|
76
|
+
static validateCommandSetManifest(manifest) {
|
|
77
|
+
return ManifestValidator._validateManifest(manifest, commandSetSchema);
|
|
78
|
+
}
|
|
79
|
+
static validateExtensionManifest(manifest) {
|
|
80
|
+
return ManifestValidator._validateManifest(manifest, extensionSchema);
|
|
81
|
+
}
|
|
82
|
+
static validateWebPartManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
83
|
+
manifest) {
|
|
84
|
+
return ManifestValidator._validateManifest(manifest, webPartSchema);
|
|
85
|
+
}
|
|
86
|
+
static validateLibraryManifest(manifest) {
|
|
87
|
+
return ManifestValidator._validateManifest(manifest, librarySchema);
|
|
88
|
+
}
|
|
89
|
+
static validateAssemblyManifest(manifest) {
|
|
90
|
+
return ManifestValidator._validateManifest(manifest, assemblySchema);
|
|
91
|
+
}
|
|
92
|
+
static validateMultiVersionManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
|
+
manifest) {
|
|
94
|
+
return ManifestValidator._validateManifest(manifest, multiVersionSchema);
|
|
95
|
+
}
|
|
96
|
+
static validateManifest(manifest) {
|
|
97
|
+
return ManifestValidator._validateManifest(manifest, manifestSchema);
|
|
98
|
+
}
|
|
99
|
+
static extractInnerErrorMessages(errors) {
|
|
100
|
+
const printZSchemaError = (error)=>{
|
|
101
|
+
let innerErrors = [];
|
|
102
|
+
(error.inner || []).forEach((innerErr)=>{
|
|
103
|
+
innerErrors = innerErrors.concat(printZSchemaError(innerErr));
|
|
104
|
+
});
|
|
105
|
+
return [
|
|
106
|
+
`(${error.path}) ${error.message}`
|
|
107
|
+
].concat(innerErrors);
|
|
108
|
+
};
|
|
109
|
+
let errorList = [];
|
|
110
|
+
errors.map((error)=>{
|
|
111
|
+
errorList = errorList.concat(printZSchemaError(error));
|
|
112
|
+
});
|
|
113
|
+
return errorList;
|
|
114
|
+
}
|
|
115
|
+
static getFormattedErrorMessage(errors) {
|
|
116
|
+
return this.extractInnerErrorMessages(errors).join('\n');
|
|
117
|
+
}
|
|
118
|
+
static _validateManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
119
|
+
manifest, schema) {
|
|
120
|
+
if (!schema) {
|
|
121
|
+
throw new Error('Unable to find the manifest schema.');
|
|
122
|
+
}
|
|
123
|
+
if (typeof manifest === 'string') {
|
|
124
|
+
manifest = JSON.parse(manifest);
|
|
125
|
+
}
|
|
126
|
+
const result = schemaValidator.validate(manifest, schema);
|
|
127
|
+
return {
|
|
128
|
+
result: result,
|
|
129
|
+
errors: schemaValidator.getLastErrors() || []
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export { ManifestValidator as default };
|
|
134
|
+
|
|
135
|
+
//#sourceMappingUrl=./manifestSchemaValidator.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This interface specifies the set of properties that can be pre-configured by a AdaptiveCardExtension developer. Each
|
|
3
|
+
* pre-configured instance of the AdaptiveCardExtension will need a copy of these properties. Organization admins and
|
|
4
|
+
* content authors can modify these properties on a need basis.
|
|
5
|
+
*
|
|
6
|
+
* @beta
|
|
7
|
+
*/ export { };
|
|
8
|
+
|
|
9
|
+
//#sourceMappingUrl=./IAdaptiveCardExtensionManifest.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This interface describes how a client-side component is to be loaded and initialized by a SharePoint client
|
|
3
|
+
* framework. It contains all data for loading an entrypoint script and its dependency scripts.
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
*/ /**
|
|
7
|
+
* This is the interface for a script module with the "localizedPath" type.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Modules of this type must be provided by the component developer. These script resources are similar to those of
|
|
11
|
+
* the "path" type, but they may be present at a number of different paths, to be selected by the user's locale.
|
|
12
|
+
* Paths in this module type are loaded exactly the same way as "internal" modules are.
|
|
13
|
+
*
|
|
14
|
+
* @beta
|
|
15
|
+
*/ export { };
|
|
16
|
+
|
|
17
|
+
//#sourceMappingUrl=./IClientSideComponentLoaderConfiguration.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All client-side components built on the SharePoint framework need a valid component manifest. This interface
|
|
3
|
+
* represents properties that are required by all types of client-side components like Applications and Web Parts.
|
|
4
|
+
* Component specific manifests will extend this interface to add properties required by that component type.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
*
|
|
8
|
+
* The schema of this manifest is owned and versioned by Microsoft. Following rules should be followed while changing
|
|
9
|
+
* this schema. This set of rules can also be called the "manifest upgrade rules".
|
|
10
|
+
*
|
|
11
|
+
* - For minor changes, new properties can be added to this schema in a backwards-compatible way. i.e. the code
|
|
12
|
+
* that processes the manifest should be able to handle the absence of those new properties.
|
|
13
|
+
*
|
|
14
|
+
* - Try to model your changes as minor SemVer increments. Major version changes should be avoided because they
|
|
15
|
+
* impose a migration cost on developers.
|
|
16
|
+
*
|
|
17
|
+
* - The `'manifestVersion'` should be bumped for all small or big changes.
|
|
18
|
+
*
|
|
19
|
+
* @privateRemarks
|
|
20
|
+
*
|
|
21
|
+
* This schema should be at all times kept in sync with the server-side code file
|
|
22
|
+
* SPClientSideComponentManifest.cs.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/ export { };
|
|
26
|
+
|
|
27
|
+
//#sourceMappingUrl=./IClientSideComponentManifest.js.map
|