@claspo/common 7.0.6 → 7.0.8-alt.0

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.
@@ -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?: string;
9
+ propPathCondition?: PropPathConditionCallbackI;
9
10
  children?: BaseFloatingControlManifestModelI[];
10
11
  params?: any;
11
12
  }
@@ -0,0 +1,2 @@
1
+ import { DisplayConditionSdkI } from './DisplayCondition.interface';
2
+ export type PropPathConditionCallbackI = (sdk: DisplayConditionSdkI) => object;
@@ -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?: string;
17
+ propPathCondition?: PropPathConditionCallbackI;
16
18
  params?: any;
17
- displayCondition?: string;
19
+ displayCondition?: DisplayConditionCallbackI;
18
20
  hideSyncSelect?: boolean;
19
- syncSelectDisplayCondition?: string;
21
+ syncSelectDisplayCondition?: DisplayConditionCallbackI;
20
22
  syncSelectOptions?: Array<string | null>;
21
23
  label?: string;
22
24
  disableControlIfPropPathIsFalsy?: string[];
@@ -219,6 +221,7 @@ export interface TextInputPropertyPaneManifestParamsI {
219
221
  subLabel?: string;
220
222
  description?: string;
221
223
  placeholder?: string;
224
+ tooltip?: string;
222
225
  validators?: BaseInputValidatorsI;
223
226
  defaultValue?: any;
224
227
  }
@@ -289,10 +292,14 @@ export interface SelectPropertyPaneManifestModelI extends BasePropertyPaneManife
289
292
  }
290
293
  export interface SelectPropertyPaneManifestParamsI {
291
294
  label: string;
292
- options: SelectOptionI[];
295
+ options?: SelectOptionI[];
296
+ getOptions?: GetSelectOptionsCallbackI;
293
297
  overlayWidth?: number;
294
298
  defaultValue?: any;
295
299
  }
300
+ export type GetSelectOptionsCallbackI = (sdk: {
301
+ componentModel: ClBaseComponentI;
302
+ }) => SelectOptionI[];
296
303
  export interface TextStylesPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
297
304
  params: TextStylesPropertyPaneManifestParamsI[];
298
305
  }
@@ -362,10 +369,10 @@ export interface ActionsPropertyPaneManifestModelI extends BasePropertyPaneManif
362
369
  params: ActionsPropertyPaneManifestParamsI;
363
370
  }
364
371
  export interface ActionsPropertyPaneManifestParamsI {
365
- showTitleCondition?: string;
366
- hideSubmitActionCondition?: string;
367
- hideGoToViewActionCondition?: string;
368
- showRunGameActionCondition?: string;
372
+ showTitleCondition?: DisplayConditionCallbackI;
373
+ hideSubmitActionCondition?: DisplayConditionCallbackI;
374
+ hideGoToViewActionCondition?: DisplayConditionCallbackI;
375
+ showRunGameActionCondition?: DisplayConditionCallbackI;
369
376
  origin?: boolean;
370
377
  }
371
378
  export interface IntegrationFieldMappingPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claspo/common",
3
- "version": "7.0.6",
3
+ "version": "7.0.8-alt.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "engines": {