@claspo/common 7.0.6 → 7.0.8
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/component-manifest/ComponentManifest.interface.d.ts +0 -9
- package/component-manifest/DisplayCondition.interface.d.ts +30 -0
- package/component-manifest/DisplayCondition.interface.js +1 -0
- package/component-manifest/FloatingControlManifest.interface.d.ts +2 -1
- package/component-manifest/PropPathCondition.interface.d.ts +2 -0
- package/component-manifest/PropPathCondition.interface.js +1 -0
- package/component-manifest/PropertyPaneManifest.interface.d.ts +15 -9
- package/package.json +1 -1
|
@@ -21,15 +21,6 @@ export interface ComponentManifestI {
|
|
|
21
21
|
children?: ClBaseComponentI[];
|
|
22
22
|
mappingTypes?: ManifestMappingType[];
|
|
23
23
|
focusableElements?: string[];
|
|
24
|
-
actionsConditions?: {
|
|
25
|
-
remove?: string;
|
|
26
|
-
replace?: string;
|
|
27
|
-
cut?: string;
|
|
28
|
-
copy?: string;
|
|
29
|
-
duplicate?: string;
|
|
30
|
-
paste?: string;
|
|
31
|
-
move?: string;
|
|
32
|
-
};
|
|
33
24
|
autoContrast?: AutoContrastI[];
|
|
34
25
|
keepGeneralTabOpenUntilInteracted?: boolean;
|
|
35
26
|
isExternalStartCapable?: boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { WidgetType } from '../WidgetType';
|
|
2
|
+
import { LayoutType } from '../LayoutType';
|
|
3
|
+
import { ClBaseComponentI, ClBaseComponentPropsI, ClComponentType } from '../document/Document.interface';
|
|
4
|
+
import { ComponentManifestI } from './ComponentManifest.interface';
|
|
5
|
+
export type DisplayConditionCallbackI = (sdk: DisplayConditionSdkI) => boolean;
|
|
6
|
+
export interface DisplayConditionSdkI {
|
|
7
|
+
widgetType: WidgetType;
|
|
8
|
+
layoutType: LayoutType;
|
|
9
|
+
component: DisplayConditionComponentFacadeI;
|
|
10
|
+
editorConfig: any;
|
|
11
|
+
componentView: ClBaseComponentI;
|
|
12
|
+
views: ClBaseComponentI[];
|
|
13
|
+
manifests: ComponentManifestI[];
|
|
14
|
+
documentUtils: DisplayConditionDocumentUtilsServiceI;
|
|
15
|
+
}
|
|
16
|
+
export interface DisplayConditionComponentFacadeI {
|
|
17
|
+
id: string;
|
|
18
|
+
type: ClComponentType;
|
|
19
|
+
path: number[];
|
|
20
|
+
floating: boolean;
|
|
21
|
+
getProps: () => ClBaseComponentPropsI;
|
|
22
|
+
getChildren: () => ClBaseComponentI[];
|
|
23
|
+
getParent: () => DisplayConditionComponentFacadeI | null;
|
|
24
|
+
}
|
|
25
|
+
export interface DisplayConditionDocumentUtilsServiceI {
|
|
26
|
+
findComponentsByTypes(componentsTree: ClBaseComponentI[], types: ClComponentType[]): ClBaseComponentI[];
|
|
27
|
+
findComponentsByName(componentsTree: ClBaseComponentI[], name: string): ClBaseComponentI[];
|
|
28
|
+
findComponentsByNames(componentsTree: ClBaseComponentI[], names: string[]): ClBaseComponentI[];
|
|
29
|
+
getExternalStartGamingComponents(componentsTree: ClBaseComponentI[], manifests: ComponentManifestI[]): ClBaseComponentI[];
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PropPathConditionCallbackI } from './PropPathCondition.interface';
|
|
1
2
|
export interface BaseFloatingControlManifestModelI {
|
|
2
3
|
type: FloatingControlManifestModelType;
|
|
3
4
|
name?: FloatingControlManifestModelName;
|
|
@@ -5,7 +6,7 @@ export interface BaseFloatingControlManifestModelI {
|
|
|
5
6
|
element?: string;
|
|
6
7
|
elementProp?: string;
|
|
7
8
|
elementSubProp?: string;
|
|
8
|
-
propPathCondition?:
|
|
9
|
+
propPathCondition?: PropPathConditionCallbackI;
|
|
9
10
|
children?: BaseFloatingControlManifestModelI[];
|
|
10
11
|
params?: any;
|
|
11
12
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { ClComponentType } from '../document/Document.interface';
|
|
1
|
+
import { ClBaseComponentI, ClComponentType } from '../document/Document.interface';
|
|
2
|
+
import { DisplayConditionCallbackI } from './DisplayCondition.interface';
|
|
3
|
+
import { PropPathConditionCallbackI } from './PropPathCondition.interface';
|
|
2
4
|
export interface PropertyPaneManifestI {
|
|
3
5
|
content: BasePropertyPaneManifestModelI[];
|
|
4
6
|
general?: BasePropertyPaneManifestModelI[];
|
|
@@ -12,11 +14,11 @@ export interface BasePropertyPaneManifestModelI {
|
|
|
12
14
|
elementProp?: string;
|
|
13
15
|
elementSubProp?: string;
|
|
14
16
|
elementSubProps?: string[];
|
|
15
|
-
propPathCondition?:
|
|
17
|
+
propPathCondition?: PropPathConditionCallbackI;
|
|
16
18
|
params?: any;
|
|
17
|
-
displayCondition?:
|
|
19
|
+
displayCondition?: DisplayConditionCallbackI;
|
|
18
20
|
hideSyncSelect?: boolean;
|
|
19
|
-
syncSelectDisplayCondition?:
|
|
21
|
+
syncSelectDisplayCondition?: DisplayConditionCallbackI;
|
|
20
22
|
syncSelectOptions?: Array<string | null>;
|
|
21
23
|
label?: string;
|
|
22
24
|
disableControlIfPropPathIsFalsy?: string[];
|
|
@@ -289,10 +291,14 @@ export interface SelectPropertyPaneManifestModelI extends BasePropertyPaneManife
|
|
|
289
291
|
}
|
|
290
292
|
export interface SelectPropertyPaneManifestParamsI {
|
|
291
293
|
label: string;
|
|
292
|
-
options
|
|
294
|
+
options?: SelectOptionI[];
|
|
295
|
+
getOptions?: GetSelectOptionsCallbackI;
|
|
293
296
|
overlayWidth?: number;
|
|
294
297
|
defaultValue?: any;
|
|
295
298
|
}
|
|
299
|
+
export type GetSelectOptionsCallbackI = (sdk: {
|
|
300
|
+
componentModel: ClBaseComponentI;
|
|
301
|
+
}) => SelectOptionI[];
|
|
296
302
|
export interface TextStylesPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
|
|
297
303
|
params: TextStylesPropertyPaneManifestParamsI[];
|
|
298
304
|
}
|
|
@@ -362,10 +368,10 @@ export interface ActionsPropertyPaneManifestModelI extends BasePropertyPaneManif
|
|
|
362
368
|
params: ActionsPropertyPaneManifestParamsI;
|
|
363
369
|
}
|
|
364
370
|
export interface ActionsPropertyPaneManifestParamsI {
|
|
365
|
-
showTitleCondition?:
|
|
366
|
-
hideSubmitActionCondition?:
|
|
367
|
-
hideGoToViewActionCondition?:
|
|
368
|
-
showRunGameActionCondition?:
|
|
371
|
+
showTitleCondition?: DisplayConditionCallbackI;
|
|
372
|
+
hideSubmitActionCondition?: DisplayConditionCallbackI;
|
|
373
|
+
hideGoToViewActionCondition?: DisplayConditionCallbackI;
|
|
374
|
+
showRunGameActionCondition?: DisplayConditionCallbackI;
|
|
369
375
|
origin?: boolean;
|
|
370
376
|
}
|
|
371
377
|
export interface IntegrationFieldMappingPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
|