@microsoft/sp-module-interfaces 1.22.0-beta.1 → 1.22.0-beta.3

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.
@@ -265,6 +265,8 @@ export declare interface IAdaptiveCardExtensionManifestEntry<TProperties> {
265
265
  properties: TProperties;
266
266
  }
267
267
 
268
+ /* Excluded from this release type: IAIProperties */
269
+
268
270
  /* Excluded from this release type: ICapabilityCollection */
269
271
 
270
272
  /* Excluded from this release type: IClientSideApplicationManifest */
@@ -658,6 +660,7 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
658
660
  */
659
661
  supportsThemeVariants?: boolean;
660
662
  /* Excluded from this release type: useFallbackWhenPropertiesUpdatedExternally */
663
+ /* Excluded from this release type: idleLoadComponents */
661
664
  /**
662
665
  * A Web Part can have pre-configured properties like the title, description, toolbox group name and Web
663
666
  * Part specific custom properties. And there can be multiple instances of these pre-configured properties.
@@ -748,6 +751,7 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
748
751
  * Ensure this remains up to date with IFlexibleControlSizingData in FlexibleControl.types.ts
749
752
  */
750
753
  flexibleLayoutSizing?: IFlexibleLayoutSizing;
754
+ /* Excluded from this release type: aiProperties */
751
755
  }
752
756
 
753
757
  /**
@@ -1004,6 +1008,8 @@ export declare interface ICommandSetExtensionManifest extends IClientSideExtensi
1004
1008
  };
1005
1009
  }
1006
1010
 
1011
+ /* Excluded from this release type: _IComponentFallbackVersion */
1012
+
1007
1013
  /**
1008
1014
  * This is the interface for a script module with the "component" type. Modules of this type will be provided via
1009
1015
  * manifests. In order for the dependency to be loaded, the manifest must be available on the site.
@@ -1048,6 +1054,7 @@ export declare interface IComponentModuleConfiguration extends IModuleConfigurat
1048
1054
  * Example: `"https://code.jquery.com/jquery-2.2.4.min.js"`
1049
1055
  */
1050
1056
  failoverPath?: string | IIntegrityPath;
1057
+ /* Excluded from this release type: fallbackVersion */
1051
1058
  }
1052
1059
 
1053
1060
  /**
@@ -1070,6 +1077,12 @@ export declare interface IFlexibleLayoutSizing {
1070
1077
  defaultRowHeight?: number;
1071
1078
  }
1072
1079
 
1080
+ /* Excluded from this release type: _IFlightedComponent */
1081
+
1082
+ /* Excluded from this release type: _IFlightOrKillSwitch */
1083
+
1084
+ /* Excluded from this release type: _IIdleLoadComponent */
1085
+
1073
1086
  /**
1074
1087
  * A path with the subresource integrity hash of the resource.
1075
1088
  *
@@ -1086,6 +1099,8 @@ export declare interface IIntegrityPath {
1086
1099
  integrity?: string;
1087
1100
  }
1088
1101
 
1102
+ /* Excluded from this release type: _IKillSwitchComponent */
1103
+
1089
1104
  /**
1090
1105
  * This is the interface for a script module with the "localizedPath" type.
1091
1106
  *
@@ -1231,6 +1246,8 @@ export declare interface IModuleConfigurationBase {
1231
1246
  shouldNotPreload?: boolean;
1232
1247
  }
1233
1248
 
1249
+ /* Excluded from this release type: _IOperatorOrSwitch */
1250
+
1234
1251
  /**
1235
1252
  * This is the interface for a script module with the "path" type. Modules of this type must be provided by the
1236
1253
  * component developer.
@@ -15,6 +15,8 @@ export declare type ExtensionType = 'Unknown' | 'ApplicationCustomizer' | 'Field
15
15
 
16
16
  /* Excluded from this release type: IAdaptiveCardExtensionManifestEntry */
17
17
 
18
+ /* Excluded from this release type: IAIProperties */
19
+
18
20
  /* Excluded from this release type: ICapabilityCollection */
19
21
 
20
22
  /* Excluded from this release type: IClientSideApplicationManifest */
@@ -283,6 +285,7 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
283
285
  */
284
286
  supportsThemeVariants?: boolean;
285
287
  /* Excluded from this release type: useFallbackWhenPropertiesUpdatedExternally */
288
+ /* Excluded from this release type: idleLoadComponents */
286
289
  /**
287
290
  * A Web Part can have pre-configured properties like the title, description, toolbox group name and Web
288
291
  * Part specific custom properties. And there can be multiple instances of these pre-configured properties.
@@ -373,6 +376,7 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
373
376
  * Ensure this remains up to date with IFlexibleControlSizingData in FlexibleControl.types.ts
374
377
  */
375
378
  flexibleLayoutSizing?: IFlexibleLayoutSizing;
379
+ /* Excluded from this release type: aiProperties */
376
380
  }
377
381
 
378
382
  /**
@@ -596,6 +600,8 @@ export declare interface ICommandSetExtensionManifest extends IClientSideExtensi
596
600
  };
597
601
  }
598
602
 
603
+ /* Excluded from this release type: _IComponentFallbackVersion */
604
+
599
605
  /* Excluded from this release type: IComponentModuleConfiguration */
600
606
 
601
607
  /**
@@ -618,8 +624,16 @@ export declare interface IFlexibleLayoutSizing {
618
624
  defaultRowHeight?: number;
619
625
  }
620
626
 
627
+ /* Excluded from this release type: _IFlightedComponent */
628
+
629
+ /* Excluded from this release type: _IFlightOrKillSwitch */
630
+
631
+ /* Excluded from this release type: _IIdleLoadComponent */
632
+
621
633
  /* Excluded from this release type: IIntegrityPath */
622
634
 
635
+ /* Excluded from this release type: _IKillSwitchComponent */
636
+
623
637
  /* Excluded from this release type: ILocalizedPathModuleConfiguration */
624
638
 
625
639
  /**
@@ -672,6 +686,8 @@ export declare interface ILocalizedString {
672
686
 
673
687
  /* Excluded from this release type: IModuleConfigurationBase */
674
688
 
689
+ /* Excluded from this release type: _IOperatorOrSwitch */
690
+
675
691
  /* Excluded from this release type: IPathModuleConfiguration */
676
692
 
677
693
  /* Excluded from this release type: IPrefabAppManifest */
@@ -265,6 +265,8 @@ export declare interface IAdaptiveCardExtensionManifestEntry<TProperties> {
265
265
  properties: TProperties;
266
266
  }
267
267
 
268
+ /* Excluded from this release type: IAIProperties */
269
+
268
270
  /* Excluded from this release type: ICapabilityCollection */
269
271
 
270
272
  /* Excluded from this release type: IClientSideApplicationManifest */
@@ -658,6 +660,7 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
658
660
  */
659
661
  supportsThemeVariants?: boolean;
660
662
  /* Excluded from this release type: useFallbackWhenPropertiesUpdatedExternally */
663
+ /* Excluded from this release type: idleLoadComponents */
661
664
  /**
662
665
  * A Web Part can have pre-configured properties like the title, description, toolbox group name and Web
663
666
  * Part specific custom properties. And there can be multiple instances of these pre-configured properties.
@@ -748,6 +751,7 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
748
751
  * Ensure this remains up to date with IFlexibleControlSizingData in FlexibleControl.types.ts
749
752
  */
750
753
  flexibleLayoutSizing?: IFlexibleLayoutSizing;
754
+ /* Excluded from this release type: aiProperties */
751
755
  }
752
756
 
753
757
  /**
@@ -1004,6 +1008,8 @@ export declare interface ICommandSetExtensionManifest extends IClientSideExtensi
1004
1008
  };
1005
1009
  }
1006
1010
 
1011
+ /* Excluded from this release type: _IComponentFallbackVersion */
1012
+
1007
1013
  /**
1008
1014
  * This is the interface for a script module with the "component" type. Modules of this type will be provided via
1009
1015
  * manifests. In order for the dependency to be loaded, the manifest must be available on the site.
@@ -1048,6 +1054,7 @@ export declare interface IComponentModuleConfiguration extends IModuleConfigurat
1048
1054
  * Example: `"https://code.jquery.com/jquery-2.2.4.min.js"`
1049
1055
  */
1050
1056
  failoverPath?: string | IIntegrityPath;
1057
+ /* Excluded from this release type: fallbackVersion */
1051
1058
  }
1052
1059
 
1053
1060
  /**
@@ -1070,6 +1077,12 @@ export declare interface IFlexibleLayoutSizing {
1070
1077
  defaultRowHeight?: number;
1071
1078
  }
1072
1079
 
1080
+ /* Excluded from this release type: _IFlightedComponent */
1081
+
1082
+ /* Excluded from this release type: _IFlightOrKillSwitch */
1083
+
1084
+ /* Excluded from this release type: _IIdleLoadComponent */
1085
+
1073
1086
  /**
1074
1087
  * A path with the subresource integrity hash of the resource.
1075
1088
  *
@@ -1086,6 +1099,8 @@ export declare interface IIntegrityPath {
1086
1099
  integrity?: string;
1087
1100
  }
1088
1101
 
1102
+ /* Excluded from this release type: _IKillSwitchComponent */
1103
+
1089
1104
  /**
1090
1105
  * This is the interface for a script module with the "localizedPath" type.
1091
1106
  *
@@ -1231,6 +1246,8 @@ export declare interface IModuleConfigurationBase {
1231
1246
  shouldNotPreload?: boolean;
1232
1247
  }
1233
1248
 
1249
+ /* Excluded from this release type: _IOperatorOrSwitch */
1250
+
1234
1251
  /**
1235
1252
  * This is the interface for a script module with the "path" type. Modules of this type must be provided by the
1236
1253
  * component developer.
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  _export_star(require("./manifestSchemas/IClientSideApplicationManifest"), exports);
6
6
  _export_star(require("./manifestSchemas/IClientSideAssemblyManifest"), exports);
7
- _export_star(require("./manifestSchemas/IClientSideComponentLoaderConfiguration"), exports);
8
7
  _export_star(require("./manifestSchemas/IClientSideComponentManifest"), exports);
9
8
  _export_star(require("./manifestSchemas/IClientSideExtensionManifest"), exports);
10
9
  _export_star(require("./manifestSchemas/IClientSideLibraryManifest"), exports);
@@ -323,6 +323,68 @@
323
323
  "path": "nonAmdB.js",
324
324
  "globalName": "nonAmdB",
325
325
  "globalDependencies": ["nonAmdB"]
326
+ },
327
+ "fallbackFlighted": {
328
+ "type": "component",
329
+ "version": "1.2.3",
330
+ "id": "00000000-0000-0000-0000-000000000000",
331
+ "fallbackVersion": {
332
+ "version": "0.0.1",
333
+ "condition": {
334
+ "switchType": "flight",
335
+ "id": 12345
336
+ }
337
+ }
338
+ },
339
+ "fallbackKillSwitched": {
340
+ "type": "component",
341
+ "version": "1.2.3",
342
+ "id": "00000000-0000-0000-0000-000000000000",
343
+ "fallbackVersion": {
344
+ "version": "0.0.1",
345
+ "condition": {
346
+ "switchType": "killswitch",
347
+ "id": "00000000-0000-0000-0000-000000000000"
348
+ }
349
+ }
350
+ },
351
+ "fallbackComplexExpression": {
352
+ "type": "component",
353
+ "version": "1.2.3",
354
+ "id": "00000000-0000-0000-0000-000000000000",
355
+ "fallbackVersion": {
356
+ "version": "0.0.1",
357
+ "condition": {
358
+ "xor": [
359
+ {
360
+ "or": [
361
+ {
362
+ "switchType": "flight",
363
+ "id": 12345
364
+ },
365
+ {
366
+ "not": {
367
+ "switchType": "killswitch",
368
+ "id": "00000000-0000-0000-0000-000000000000"
369
+ }
370
+ }
371
+ ]
372
+ },
373
+ {
374
+ "and": [
375
+ {
376
+ "switchType": "flight",
377
+ "id": 67890
378
+ },
379
+ {
380
+ "switchType": "killswitch",
381
+ "id": "11111111-1111-1111-1111-111111111111"
382
+ }
383
+ ]
384
+ }
385
+ ]
386
+ }
387
+ }
326
388
  }
327
389
  }
328
390
  },
@@ -338,6 +338,68 @@ const webpartManifest = {
338
338
  globalDependencies: [
339
339
  'nonAmdB'
340
340
  ]
341
+ },
342
+ fallbackFlighted: {
343
+ type: 'component',
344
+ version: '1.2.3',
345
+ id: '00000000-0000-0000-0000-000000000000',
346
+ fallbackVersion: {
347
+ version: '0.0.1',
348
+ condition: {
349
+ switchType: 'flight',
350
+ id: 12345
351
+ }
352
+ }
353
+ },
354
+ fallbackKillSwitched: {
355
+ type: 'component',
356
+ version: '1.2.3',
357
+ id: '00000000-0000-0000-0000-000000000000',
358
+ fallbackVersion: {
359
+ version: '0.0.1',
360
+ condition: {
361
+ switchType: 'killswitch',
362
+ id: '00000000-0000-0000-0000-000000000000'
363
+ }
364
+ }
365
+ },
366
+ fallbackComplexExpression: {
367
+ type: 'component',
368
+ version: '1.2.3',
369
+ id: '00000000-0000-0000-0000-000000000000',
370
+ fallbackVersion: {
371
+ version: '0.0.1',
372
+ condition: {
373
+ xor: [
374
+ {
375
+ or: [
376
+ {
377
+ switchType: 'flight',
378
+ id: 12345
379
+ },
380
+ {
381
+ not: {
382
+ switchType: 'killswitch',
383
+ id: '00000000-0000-0000-0000-000000000000'
384
+ }
385
+ }
386
+ ]
387
+ },
388
+ {
389
+ and: [
390
+ {
391
+ switchType: 'flight',
392
+ id: 67890
393
+ },
394
+ {
395
+ switchType: 'killswitch',
396
+ id: '11111111-1111-1111-1111-111111111111'
397
+ }
398
+ ]
399
+ }
400
+ ]
401
+ }
402
+ }
341
403
  }
342
404
  }
343
405
  },
@@ -337,6 +337,68 @@ const webpartManifest = {
337
337
  globalDependencies: [
338
338
  'nonAmdB'
339
339
  ]
340
+ },
341
+ fallbackFlighted: {
342
+ type: 'component',
343
+ version: '1.2.3',
344
+ id: '00000000-0000-0000-0000-000000000000',
345
+ fallbackVersion: {
346
+ version: '0.0.1',
347
+ condition: {
348
+ switchType: 'flight',
349
+ id: 12345
350
+ }
351
+ }
352
+ },
353
+ fallbackKillSwitched: {
354
+ type: 'component',
355
+ version: '1.2.3',
356
+ id: '00000000-0000-0000-0000-000000000000',
357
+ fallbackVersion: {
358
+ version: '0.0.1',
359
+ condition: {
360
+ switchType: 'killswitch',
361
+ id: '00000000-0000-0000-0000-000000000000'
362
+ }
363
+ }
364
+ },
365
+ fallbackComplexExpression: {
366
+ type: 'component',
367
+ version: '1.2.3',
368
+ id: '00000000-0000-0000-0000-000000000000',
369
+ fallbackVersion: {
370
+ version: '0.0.1',
371
+ condition: {
372
+ xor: [
373
+ {
374
+ or: [
375
+ {
376
+ switchType: 'flight',
377
+ id: 12345
378
+ },
379
+ {
380
+ not: {
381
+ switchType: 'killswitch',
382
+ id: '00000000-0000-0000-0000-000000000000'
383
+ }
384
+ }
385
+ ]
386
+ },
387
+ {
388
+ and: [
389
+ {
390
+ switchType: 'flight',
391
+ id: 67890
392
+ },
393
+ {
394
+ switchType: 'killswitch',
395
+ id: '11111111-1111-1111-1111-111111111111'
396
+ }
397
+ ]
398
+ }
399
+ ]
400
+ }
401
+ }
340
402
  }
341
403
  }
342
404
  },
@@ -105,7 +105,8 @@
105
105
  "shouldNotPreload": { "$ref": "any-value.schema.json" },
106
106
  "version": { "$ref": "any-value.schema.json" },
107
107
  "id": { "$ref": "any-value.schema.json" },
108
- "failoverPath": { "$ref": "any-value.schema.json" }
108
+ "failoverPath": { "$ref": "any-value.schema.json" },
109
+ "fallbackVersion": { "$ref": "any-value.schema.json" }
109
110
  },
110
111
  "additionalProperties": false
111
112
  },
@@ -145,6 +146,10 @@
145
146
  "title": "Failover Path",
146
147
  "description": "A path to the framework-supplied module in case the framework fails to load the requested version. This must be either a fully-qualified URL, or a path under the paths specified in the \"internalModuleBaseUrls\" field. If this field is not specified and the version is not available in the framework runtime, the closest matching version of the module will be provided instead.",
147
148
  "$ref": "#/definitions/path"
149
+ },
150
+
151
+ "fallbackVersion": {
152
+ "$ref": "component-fallback-version.schema.json"
148
153
  }
149
154
  },
150
155
  "additionalProperties": true
@@ -166,6 +166,65 @@
166
166
  }
167
167
  },
168
168
  "additionalProperties": false
169
+ },
170
+ "idleLoadComponents": {
171
+ "description": "A list of components that can be loaded on idle for performance optimization. These components generally used to support rendering the web part.",
172
+ "type": "array",
173
+ "items": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "properties": {
177
+ "displayMode": {
178
+ "type": "string",
179
+ "enum": ["edit", "read"]
180
+ },
181
+ "priority": {
182
+ "type": "string",
183
+ "enum": ["high", "low"]
184
+ },
185
+ "componentId": {
186
+ "type": "string"
187
+ }
188
+ },
189
+ "required": ["priority", "componentId"]
190
+ }
191
+ },
192
+ "aiProperties": {
193
+ "type": "object",
194
+ "title": "References to AI properties and mapping definitions.",
195
+ "description": "Supports definition of web part AI properties and its mapping with existing property bag",
196
+ "required": ["structure", "mapping"],
197
+ "properties": {
198
+ "structure": {
199
+ "type": "object",
200
+ "title": "AI properties structure",
201
+ "description": "The structure of AI properties for the web part.",
202
+ "additionalProperties": false,
203
+ "required": ["id"],
204
+ "properties": {
205
+ "id": {
206
+ "type": "string",
207
+ "description": "The identifier for the AI properties structure.",
208
+ "pattern": "^\\$[^:]+:.+;$"
209
+ }
210
+ }
211
+ },
212
+ "mapping": {
213
+ "type": "object",
214
+ "title": "AI properties mapping",
215
+ "description": "The mapping of AI properties to existing property bag.",
216
+ "additionalProperties": false,
217
+ "required": ["id"],
218
+ "properties": {
219
+ "id": {
220
+ "type": "string",
221
+ "description": "The identifier for the AI properties mapping.",
222
+ "pattern": "^\\$[^:]+:.+;$"
223
+ }
224
+ }
225
+ }
226
+ },
227
+ "additionalProperties": false
169
228
  }
170
229
  },
171
230
  "additionalProperties": false
@@ -0,0 +1,106 @@
1
+ {
2
+ "id": "component-fallback-version.schema.json",
3
+ "title": "Component Fallback Version",
4
+ "description": "Represents a fallback version of a component that can be used under certain logical conditions, including flight and killswitch checks.",
5
+ "type": "object",
6
+ "required": ["version", "condition"],
7
+ "properties": {
8
+ "version": {
9
+ "description": "The version of the component to be used as a fallback.",
10
+ "oneOf": [{ "$ref": "semver.schema.json" }]
11
+ },
12
+ "condition": {
13
+ "description": "The condition under which the fallback version should be used. Supports logical operators and flight/killswitch checks.",
14
+ "$ref": "#/definitions/operatorOrSwitch"
15
+ }
16
+ },
17
+ "definitions": {
18
+ "operatorOrSwitch": {
19
+ "oneOf": [
20
+ {
21
+ "type": "object",
22
+ "required": ["and"],
23
+ "properties": {
24
+ "and": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "items": { "$ref": "#/definitions/operatorOrSwitch" }
28
+ }
29
+ },
30
+ "additionalProperties": false
31
+ },
32
+ {
33
+ "type": "object",
34
+ "required": ["or"],
35
+ "properties": {
36
+ "or": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "items": { "$ref": "#/definitions/operatorOrSwitch" }
40
+ }
41
+ },
42
+ "additionalProperties": false
43
+ },
44
+ {
45
+ "type": "object",
46
+ "required": ["xor"],
47
+ "properties": {
48
+ "xor": {
49
+ "type": "array",
50
+ "minItems": 2,
51
+ "maxItems": 2,
52
+ "items": { "$ref": "#/definitions/operatorOrSwitch" }
53
+ }
54
+ },
55
+ "additionalProperties": false
56
+ },
57
+ {
58
+ "type": "object",
59
+ "required": ["not"],
60
+ "properties": {
61
+ "not": { "$ref": "#/definitions/operatorOrSwitch" }
62
+ },
63
+ "additionalProperties": false
64
+ },
65
+ { "$ref": "#/definitions/flightOrKillSwitch" }
66
+ ]
67
+ },
68
+ "flightOrKillSwitch": {
69
+ "oneOf": [
70
+ {
71
+ "type": "object",
72
+ "required": ["switchType", "id"],
73
+ "properties": {
74
+ "switchType": {
75
+ "type": "string",
76
+ "enum": ["flight"],
77
+ "description": "Indicates this is a flight check."
78
+ },
79
+ "id": {
80
+ "type": "integer",
81
+ "description": "The numeric ID of the flight."
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ },
86
+ {
87
+ "type": "object",
88
+ "required": ["switchType", "id"],
89
+ "properties": {
90
+ "switchType": {
91
+ "type": "string",
92
+ "enum": ["killswitch"],
93
+ "description": "Indicates this is a killswitch check."
94
+ },
95
+ "id": {
96
+ "$ref": "guid.schema.json",
97
+ "description": "The GUID of the killswitch."
98
+ }
99
+ },
100
+ "additionalProperties": false
101
+ }
102
+ ]
103
+ }
104
+ },
105
+ "additionalProperties": false
106
+ }
@@ -1,6 +1,6 @@
1
1
  export * from './manifestSchemas/IClientSideApplicationManifest';
2
2
  export * from './manifestSchemas/IClientSideAssemblyManifest';
3
- export * from './manifestSchemas/IClientSideComponentLoaderConfiguration';
3
+ export type { IClientSideComponentLoaderConfiguration, IModuleConfiguration, IIntegrityPath, IModuleConfigurationBase, IComponentModuleConfiguration, IPathModuleConfiguration, ILocalizedPathModuleConfiguration, IComponentFallbackVersion as _IComponentFallbackVersion, IOperatorOrSwitch as _IOperatorOrSwitch, IFlightOrKillSwitch as _IFlightOrKillSwitch, IFlightedComponent as _IFlightedComponent, IKillSwitchComponent as _IKillSwitchComponent } from './manifestSchemas/IClientSideComponentLoaderConfiguration';
4
4
  export * from './manifestSchemas/IClientSideComponentManifest';
5
5
  export * from './manifestSchemas/IClientSideExtensionManifest';
6
6
  export * from './manifestSchemas/IClientSideLibraryManifest';
@@ -211,6 +211,82 @@ export interface IComponentModuleConfiguration extends IModuleConfigurationBase
211
211
  * Example: `"https://code.jquery.com/jquery-2.2.4.min.js"`
212
212
  */
213
213
  failoverPath?: string | IIntegrityPath;
214
+ /**
215
+ * Used to specify an alternative version of the dependency to be used, under certain conditions.
216
+ * @internal
217
+ */
218
+ fallbackVersion?: IComponentFallbackVersion;
219
+ }
220
+ /**
221
+ * @internal
222
+ * Represents a fallback version of a component that can be used under certain conditions.
223
+ *
224
+ * @remarks
225
+ * This field is used to specify an alternative version of the dependency to load, provided certain conditions are met.
226
+ * The conditions are specified using the `condition` field, which allows an expression to be defined. This supports the following:
227
+ * - AND
228
+ * - OR
229
+ * - NOT
230
+ * - XOR
231
+ * - Flight checks
232
+ * - Killswitch checks
233
+ *
234
+ * This field should only be used if the component has a multi-version manifest.
235
+ */
236
+ export interface IComponentFallbackVersion {
237
+ /**
238
+ * @internal
239
+ * The version of the component to be used as a fallback.
240
+ *
241
+ * @remarks
242
+ * This should be a string representing a semantic version.
243
+ */
244
+ version: string;
245
+ /**
246
+ * @internal
247
+ * The condition under which the fallback version should be used.
248
+ *
249
+ * @remarks
250
+ * This condition is expressed as a logical operator or switch, which can include AND, OR, NOT, XOR,
251
+ * Flight checks, and KillSwitch checks. The condition must evaluate to true for the fallback version to be used.
252
+ */
253
+ condition: IOperatorOrSwitch;
254
+ }
255
+ /**
256
+ * @internal
257
+ * Represents the logical operators used in the flighted manifest configuration.
258
+ */
259
+ export type IOperatorOrSwitch = {
260
+ and: IOperatorOrSwitch[];
261
+ } | {
262
+ or: IOperatorOrSwitch[];
263
+ } | {
264
+ xor: [IOperatorOrSwitch, IOperatorOrSwitch];
265
+ } | {
266
+ not: IOperatorOrSwitch;
267
+ } | IFlightOrKillSwitch;
268
+ /**
269
+ * @internal
270
+ * Represents a flighted component or a kill switch component.
271
+ * This type is used to define components that can be toggled on or off
272
+ * based on certain conditions in the configuration.
273
+ */
274
+ export type IFlightOrKillSwitch = IFlightedComponent | IKillSwitchComponent;
275
+ /**
276
+ * @internal
277
+ * Represents a Flight check definition.
278
+ */
279
+ export interface IFlightedComponent {
280
+ switchType: 'flight';
281
+ id: number;
282
+ }
283
+ /**
284
+ * @internal
285
+ * Represents a Kill Switch check definition.
286
+ */
287
+ export interface IKillSwitchComponent {
288
+ switchType: 'killswitch';
289
+ id: string;
214
290
  }
215
291
  /**
216
292
  * This is the interface for a script module with the "path" type. Modules of this type must be provided by the
@@ -109,6 +109,26 @@ export interface IClientSideWebPartManifest<TProperties> extends IClientSideComp
109
109
  * logic, then it is recommended to override onAfterPropertiesUpdatedExternally.
110
110
  */
111
111
  useFallbackWhenPropertiesUpdatedExternally?: boolean;
112
+ /**
113
+ * A list of components that can be loaded on idle for performance optimization. These components generally used to support
114
+ * rendering the web part.
115
+ *
116
+ * @internal
117
+ *
118
+ * @privateRemarks
119
+ * Note: All top level JavaScript logic for the loaded component will be run upon loading the component.
120
+ * If the component exports a default function, it will be called.
121
+ *
122
+ * example:
123
+ * ```
124
+ * idleLoadComponents: [{
125
+ * displayMode: 'edit' | 'read' | 'all',
126
+ * priority: 'high' | 'low',
127
+ * componentId: 'abc5-...',
128
+ * }];
129
+ * ```
130
+ */
131
+ idleLoadComponents?: _IIdleLoadComponent[];
112
132
  /**
113
133
  * A Web Part can have pre-configured properties like the title, description, toolbox group name and Web
114
134
  * Part specific custom properties. And there can be multiple instances of these pre-configured properties.
@@ -204,6 +224,34 @@ export interface IClientSideWebPartManifest<TProperties> extends IClientSideComp
204
224
  * Ensure this remains up to date with IFlexibleControlSizingData in FlexibleControl.types.ts
205
225
  */
206
226
  flexibleLayoutSizing?: IFlexibleLayoutSizing;
227
+ /**
228
+ * @alpha
229
+ * Optional AI properties for the web part including the structure of AI properties and the mapping between
230
+ * AI properties and the web part property bag.
231
+ * If provided, AI scenarios like LLM agent in SharePoint Pages will be able to interact with the web part. For example,
232
+ * Creating a web part, modifying existing web part, better understanding of the web part's data structure, etc.
233
+ */
234
+ aiProperties?: IAIProperties;
235
+ }
236
+ /**
237
+ * @internal
238
+ * Definition: A component that can be loaded in the background to improve performance.
239
+ */
240
+ export interface _IIdleLoadComponent {
241
+ /**
242
+ * The display mode in which the component should be loaded.
243
+ * If not specified, the component will be loaded in all display modes.
244
+ */
245
+ displayMode?: 'edit' | 'read';
246
+ /**
247
+ * The priority of the component to be loaded.
248
+ * High priority components will be loaded before low priority components.
249
+ */
250
+ priority: 'high' | 'low';
251
+ /**
252
+ * Manifest ID of the component to be loaded.
253
+ */
254
+ componentId: string;
207
255
  }
208
256
  /**
209
257
  * Flexible layout sizing data
@@ -501,4 +549,36 @@ export interface ICapabilityCollection {
501
549
  */
502
550
  AuthenticationModel?: Array<'OpenIDConnect' | 'Federated'>;
503
551
  }
552
+ /**
553
+ * @alpha
554
+ * Defines the AI properties for the web part, including their structure and the mapping to the web part's property bag.
555
+ * When provided, AI scenarios such as an LLM agent in SharePoint Pages can interact with the web part,
556
+ * e.g., creating it, modifying it, or understanding its data structure.
557
+ */
558
+ export interface IAIProperties {
559
+ /**
560
+ * The structure of AI properties for the web part.
561
+ */
562
+ structure: {
563
+ /**
564
+ * A free-form nested object not intended for direct use by web part developers.
565
+ * It is interpreted internally by the system based on the conversion logic
566
+ * between web part AI properties and JSON.
567
+ * The contract for this structure is internal and not exposed to developers.
568
+ */
569
+ [key: string]: unknown;
570
+ };
571
+ /**
572
+ * The mapping of AI properties to existing property bag.
573
+ */
574
+ mapping: {
575
+ /**
576
+ * A free-form nested object not intended for direct use by web part developers.
577
+ * It is interpreted internally by the system based on the conversion logic
578
+ * between web part AI properties and JSON.
579
+ * The contract for this structure is internal and not exposed to developers.
580
+ */
581
+ [key: string]: unknown;
582
+ };
583
+ }
504
584
  //# sourceMappingURL=IClientSideWebPartManifest.d.ts.map
package/lib-esm/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from './manifestSchemas/IClientSideApplicationManifest';
2
2
  export * from './manifestSchemas/IClientSideAssemblyManifest';
3
- export * from './manifestSchemas/IClientSideComponentLoaderConfiguration';
4
3
  export * from './manifestSchemas/IClientSideComponentManifest';
5
4
  export * from './manifestSchemas/IClientSideExtensionManifest';
6
5
  export * from './manifestSchemas/IClientSideLibraryManifest';
@@ -323,6 +323,68 @@
323
323
  "path": "nonAmdB.js",
324
324
  "globalName": "nonAmdB",
325
325
  "globalDependencies": ["nonAmdB"]
326
+ },
327
+ "fallbackFlighted": {
328
+ "type": "component",
329
+ "version": "1.2.3",
330
+ "id": "00000000-0000-0000-0000-000000000000",
331
+ "fallbackVersion": {
332
+ "version": "0.0.1",
333
+ "condition": {
334
+ "switchType": "flight",
335
+ "id": 12345
336
+ }
337
+ }
338
+ },
339
+ "fallbackKillSwitched": {
340
+ "type": "component",
341
+ "version": "1.2.3",
342
+ "id": "00000000-0000-0000-0000-000000000000",
343
+ "fallbackVersion": {
344
+ "version": "0.0.1",
345
+ "condition": {
346
+ "switchType": "killswitch",
347
+ "id": "00000000-0000-0000-0000-000000000000"
348
+ }
349
+ }
350
+ },
351
+ "fallbackComplexExpression": {
352
+ "type": "component",
353
+ "version": "1.2.3",
354
+ "id": "00000000-0000-0000-0000-000000000000",
355
+ "fallbackVersion": {
356
+ "version": "0.0.1",
357
+ "condition": {
358
+ "xor": [
359
+ {
360
+ "or": [
361
+ {
362
+ "switchType": "flight",
363
+ "id": 12345
364
+ },
365
+ {
366
+ "not": {
367
+ "switchType": "killswitch",
368
+ "id": "00000000-0000-0000-0000-000000000000"
369
+ }
370
+ }
371
+ ]
372
+ },
373
+ {
374
+ "and": [
375
+ {
376
+ "switchType": "flight",
377
+ "id": 67890
378
+ },
379
+ {
380
+ "switchType": "killswitch",
381
+ "id": "11111111-1111-1111-1111-111111111111"
382
+ }
383
+ ]
384
+ }
385
+ ]
386
+ }
387
+ }
326
388
  }
327
389
  }
328
390
  },
@@ -328,6 +328,68 @@ const webpartManifest = {
328
328
  globalDependencies: [
329
329
  'nonAmdB'
330
330
  ]
331
+ },
332
+ fallbackFlighted: {
333
+ type: 'component',
334
+ version: '1.2.3',
335
+ id: '00000000-0000-0000-0000-000000000000',
336
+ fallbackVersion: {
337
+ version: '0.0.1',
338
+ condition: {
339
+ switchType: 'flight',
340
+ id: 12345
341
+ }
342
+ }
343
+ },
344
+ fallbackKillSwitched: {
345
+ type: 'component',
346
+ version: '1.2.3',
347
+ id: '00000000-0000-0000-0000-000000000000',
348
+ fallbackVersion: {
349
+ version: '0.0.1',
350
+ condition: {
351
+ switchType: 'killswitch',
352
+ id: '00000000-0000-0000-0000-000000000000'
353
+ }
354
+ }
355
+ },
356
+ fallbackComplexExpression: {
357
+ type: 'component',
358
+ version: '1.2.3',
359
+ id: '00000000-0000-0000-0000-000000000000',
360
+ fallbackVersion: {
361
+ version: '0.0.1',
362
+ condition: {
363
+ xor: [
364
+ {
365
+ or: [
366
+ {
367
+ switchType: 'flight',
368
+ id: 12345
369
+ },
370
+ {
371
+ not: {
372
+ switchType: 'killswitch',
373
+ id: '00000000-0000-0000-0000-000000000000'
374
+ }
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ and: [
380
+ {
381
+ switchType: 'flight',
382
+ id: 67890
383
+ },
384
+ {
385
+ switchType: 'killswitch',
386
+ id: '11111111-1111-1111-1111-111111111111'
387
+ }
388
+ ]
389
+ }
390
+ ]
391
+ }
392
+ }
331
393
  }
332
394
  }
333
395
  },
@@ -327,6 +327,68 @@ const webpartManifest = {
327
327
  globalDependencies: [
328
328
  'nonAmdB'
329
329
  ]
330
+ },
331
+ fallbackFlighted: {
332
+ type: 'component',
333
+ version: '1.2.3',
334
+ id: '00000000-0000-0000-0000-000000000000',
335
+ fallbackVersion: {
336
+ version: '0.0.1',
337
+ condition: {
338
+ switchType: 'flight',
339
+ id: 12345
340
+ }
341
+ }
342
+ },
343
+ fallbackKillSwitched: {
344
+ type: 'component',
345
+ version: '1.2.3',
346
+ id: '00000000-0000-0000-0000-000000000000',
347
+ fallbackVersion: {
348
+ version: '0.0.1',
349
+ condition: {
350
+ switchType: 'killswitch',
351
+ id: '00000000-0000-0000-0000-000000000000'
352
+ }
353
+ }
354
+ },
355
+ fallbackComplexExpression: {
356
+ type: 'component',
357
+ version: '1.2.3',
358
+ id: '00000000-0000-0000-0000-000000000000',
359
+ fallbackVersion: {
360
+ version: '0.0.1',
361
+ condition: {
362
+ xor: [
363
+ {
364
+ or: [
365
+ {
366
+ switchType: 'flight',
367
+ id: 12345
368
+ },
369
+ {
370
+ not: {
371
+ switchType: 'killswitch',
372
+ id: '00000000-0000-0000-0000-000000000000'
373
+ }
374
+ }
375
+ ]
376
+ },
377
+ {
378
+ and: [
379
+ {
380
+ switchType: 'flight',
381
+ id: 67890
382
+ },
383
+ {
384
+ switchType: 'killswitch',
385
+ id: '11111111-1111-1111-1111-111111111111'
386
+ }
387
+ ]
388
+ }
389
+ ]
390
+ }
391
+ }
330
392
  }
331
393
  }
332
394
  },
@@ -105,7 +105,8 @@
105
105
  "shouldNotPreload": { "$ref": "any-value.schema.json" },
106
106
  "version": { "$ref": "any-value.schema.json" },
107
107
  "id": { "$ref": "any-value.schema.json" },
108
- "failoverPath": { "$ref": "any-value.schema.json" }
108
+ "failoverPath": { "$ref": "any-value.schema.json" },
109
+ "fallbackVersion": { "$ref": "any-value.schema.json" }
109
110
  },
110
111
  "additionalProperties": false
111
112
  },
@@ -145,6 +146,10 @@
145
146
  "title": "Failover Path",
146
147
  "description": "A path to the framework-supplied module in case the framework fails to load the requested version. This must be either a fully-qualified URL, or a path under the paths specified in the \"internalModuleBaseUrls\" field. If this field is not specified and the version is not available in the framework runtime, the closest matching version of the module will be provided instead.",
147
148
  "$ref": "#/definitions/path"
149
+ },
150
+
151
+ "fallbackVersion": {
152
+ "$ref": "component-fallback-version.schema.json"
148
153
  }
149
154
  },
150
155
  "additionalProperties": true
@@ -166,6 +166,65 @@
166
166
  }
167
167
  },
168
168
  "additionalProperties": false
169
+ },
170
+ "idleLoadComponents": {
171
+ "description": "A list of components that can be loaded on idle for performance optimization. These components generally used to support rendering the web part.",
172
+ "type": "array",
173
+ "items": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "properties": {
177
+ "displayMode": {
178
+ "type": "string",
179
+ "enum": ["edit", "read"]
180
+ },
181
+ "priority": {
182
+ "type": "string",
183
+ "enum": ["high", "low"]
184
+ },
185
+ "componentId": {
186
+ "type": "string"
187
+ }
188
+ },
189
+ "required": ["priority", "componentId"]
190
+ }
191
+ },
192
+ "aiProperties": {
193
+ "type": "object",
194
+ "title": "References to AI properties and mapping definitions.",
195
+ "description": "Supports definition of web part AI properties and its mapping with existing property bag",
196
+ "required": ["structure", "mapping"],
197
+ "properties": {
198
+ "structure": {
199
+ "type": "object",
200
+ "title": "AI properties structure",
201
+ "description": "The structure of AI properties for the web part.",
202
+ "additionalProperties": false,
203
+ "required": ["id"],
204
+ "properties": {
205
+ "id": {
206
+ "type": "string",
207
+ "description": "The identifier for the AI properties structure.",
208
+ "pattern": "^\\$[^:]+:.+;$"
209
+ }
210
+ }
211
+ },
212
+ "mapping": {
213
+ "type": "object",
214
+ "title": "AI properties mapping",
215
+ "description": "The mapping of AI properties to existing property bag.",
216
+ "additionalProperties": false,
217
+ "required": ["id"],
218
+ "properties": {
219
+ "id": {
220
+ "type": "string",
221
+ "description": "The identifier for the AI properties mapping.",
222
+ "pattern": "^\\$[^:]+:.+;$"
223
+ }
224
+ }
225
+ }
226
+ },
227
+ "additionalProperties": false
169
228
  }
170
229
  },
171
230
  "additionalProperties": false
@@ -0,0 +1,106 @@
1
+ {
2
+ "id": "component-fallback-version.schema.json",
3
+ "title": "Component Fallback Version",
4
+ "description": "Represents a fallback version of a component that can be used under certain logical conditions, including flight and killswitch checks.",
5
+ "type": "object",
6
+ "required": ["version", "condition"],
7
+ "properties": {
8
+ "version": {
9
+ "description": "The version of the component to be used as a fallback.",
10
+ "oneOf": [{ "$ref": "semver.schema.json" }]
11
+ },
12
+ "condition": {
13
+ "description": "The condition under which the fallback version should be used. Supports logical operators and flight/killswitch checks.",
14
+ "$ref": "#/definitions/operatorOrSwitch"
15
+ }
16
+ },
17
+ "definitions": {
18
+ "operatorOrSwitch": {
19
+ "oneOf": [
20
+ {
21
+ "type": "object",
22
+ "required": ["and"],
23
+ "properties": {
24
+ "and": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "items": { "$ref": "#/definitions/operatorOrSwitch" }
28
+ }
29
+ },
30
+ "additionalProperties": false
31
+ },
32
+ {
33
+ "type": "object",
34
+ "required": ["or"],
35
+ "properties": {
36
+ "or": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "items": { "$ref": "#/definitions/operatorOrSwitch" }
40
+ }
41
+ },
42
+ "additionalProperties": false
43
+ },
44
+ {
45
+ "type": "object",
46
+ "required": ["xor"],
47
+ "properties": {
48
+ "xor": {
49
+ "type": "array",
50
+ "minItems": 2,
51
+ "maxItems": 2,
52
+ "items": { "$ref": "#/definitions/operatorOrSwitch" }
53
+ }
54
+ },
55
+ "additionalProperties": false
56
+ },
57
+ {
58
+ "type": "object",
59
+ "required": ["not"],
60
+ "properties": {
61
+ "not": { "$ref": "#/definitions/operatorOrSwitch" }
62
+ },
63
+ "additionalProperties": false
64
+ },
65
+ { "$ref": "#/definitions/flightOrKillSwitch" }
66
+ ]
67
+ },
68
+ "flightOrKillSwitch": {
69
+ "oneOf": [
70
+ {
71
+ "type": "object",
72
+ "required": ["switchType", "id"],
73
+ "properties": {
74
+ "switchType": {
75
+ "type": "string",
76
+ "enum": ["flight"],
77
+ "description": "Indicates this is a flight check."
78
+ },
79
+ "id": {
80
+ "type": "integer",
81
+ "description": "The numeric ID of the flight."
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ },
86
+ {
87
+ "type": "object",
88
+ "required": ["switchType", "id"],
89
+ "properties": {
90
+ "switchType": {
91
+ "type": "string",
92
+ "enum": ["killswitch"],
93
+ "description": "Indicates this is a killswitch check."
94
+ },
95
+ "id": {
96
+ "$ref": "guid.schema.json",
97
+ "description": "The GUID of the killswitch."
98
+ }
99
+ },
100
+ "additionalProperties": false
101
+ }
102
+ ]
103
+ }
104
+ },
105
+ "additionalProperties": false
106
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/sp-module-interfaces",
3
- "version": "1.22.0-beta.1",
3
+ "version": "1.22.0-beta.3",
4
4
  "description": "SharePoint Framework module interfaces",
5
5
  "license": "https://aka.ms/spfx/license",
6
6
  "homepage": "http://aka.ms/spfx",
@@ -34,11 +34,11 @@
34
34
  "tsdocFlavor": "AEDoc"
35
35
  },
36
36
  "dependencies": {
37
- "@rushstack/node-core-library": "5.13.1",
37
+ "@rushstack/node-core-library": "5.14.0",
38
38
  "z-schema": "6.0.2"
39
39
  },
40
40
  "devDependencies": {
41
- "@rushstack/heft": "0.73.6",
41
+ "@rushstack/heft": "0.74.3",
42
42
  "eslint": "8.57.1",
43
43
  "@msinternal/internal-no-asset-postprocess-node-rig": "0.1.0"
44
44
  },