@qrvey/widget-configurability 0.0.0-beta.4657 → 0.0.0-beta.4707

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.
Files changed (38) hide show
  1. package/README.md +23 -1
  2. package/dist/cjs/doc/dashboard.structure.doc.js +3 -2
  3. package/dist/cjs/doc/dashboard.structure.doc.js.map +1 -1
  4. package/dist/cjs/index.js +4 -1
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/metadata/customization-docs.js +200 -0
  7. package/dist/cjs/metadata/customization-docs.js.map +1 -0
  8. package/dist/cjs/metadata/customization-metadata.js +80 -24
  9. package/dist/cjs/metadata/customization-metadata.js.map +1 -1
  10. package/dist/cjs/metadata/index.js +4 -1
  11. package/dist/cjs/metadata/index.js.map +1 -1
  12. package/dist/cjs/metadata/labels/chart-panel.defaults.js +15 -0
  13. package/dist/cjs/metadata/labels/chart-panel.defaults.js.map +1 -0
  14. package/dist/cjs/metadata/labels/chart-panel.labels.js +457 -44
  15. package/dist/cjs/metadata/labels/chart-panel.labels.js.map +1 -1
  16. package/dist/cjs/metadata/labels/dashboard.defaults.js +451 -0
  17. package/dist/cjs/metadata/labels/dashboard.defaults.js.map +1 -0
  18. package/dist/cjs/metadata/labels/dashboard.labels.js +1075 -179
  19. package/dist/cjs/metadata/labels/dashboard.labels.js.map +1 -1
  20. package/dist/cjs/metadata/labels/submodule.labels.js +11 -0
  21. package/dist/cjs/metadata/labels/submodule.labels.js.map +1 -0
  22. package/dist/cjs/structures/dashboard.structure.v1.js +5 -1
  23. package/dist/cjs/structures/dashboard.structure.v1.js.map +1 -1
  24. package/dist/cjs/structures/download-manager.structure.v1.js +1 -1
  25. package/dist/cjs/structures/download-manager.structure.v1.js.map +1 -1
  26. package/dist/cjs/structures/download-modal.structure.v1.js +13 -2
  27. package/dist/cjs/structures/download-modal.structure.v1.js.map +1 -1
  28. package/dist/cjs/utils/defaults.helpers.js +10 -0
  29. package/dist/cjs/utils/defaults.helpers.js.map +1 -1
  30. package/dist/esm/index.mjs +43 -8
  31. package/dist/esm/index.mjs.map +1 -1
  32. package/dist/esm/metadata.mjs +2129 -272
  33. package/dist/esm/metadata.mjs.map +1 -1
  34. package/dist/types/index.d.ts +9 -46
  35. package/dist/types/metadata.d.ts +74 -8
  36. package/dist/types/structure.models-BqVB4VLP.d.ts +89 -0
  37. package/package.json +1 -1
  38. package/dist/types/customization.models-CCSWjfb2.d.ts +0 -47
@@ -1,47 +1,5 @@
1
- import { W as WidgetCustomization, C as Condition, a as Widget, b as WidgetVersion, c as ConditionState } from './customization.models-CCSWjfb2.js';
2
- export { d as ConditionValue, O as Operators, e as WIDGET_STRUCTURE_SCOPE_FORMAT, f as WIDGET_STRUCTURE_SCOPE_KIND, g as WIDGET_SUBMODULE_NAMES, h as WidgetSubModuleCollection } from './customization.models-CCSWjfb2.js';
3
-
4
- type SectionValue = number | boolean | string | undefined | SectionValue[] | Record<string, unknown>;
5
- type SectionDefinition = WidgetStructure | (string | WidgetStructure)[] | undefined | boolean;
6
- interface WidgetStructure {
7
- defaults?: Record<string, SectionValue>;
8
- subModules?: Record<string, SectionValue>;
9
- [key: string]: SectionDefinition | Record<string, SectionValue> | undefined;
10
- }
11
- interface WidgetStructureRoot extends WidgetStructure {
12
- views?: Record<string, string[]>;
13
- }
14
- interface WidgetConfig {
15
- version: string;
16
- baseStructure: WidgetStructureRoot;
17
- keepInheritance?: Record<string, string>;
18
- }
19
- type ValidationFN<T = any> = (value: T) => T | undefined;
20
- type ValidationMap = Record<string, ValidationFN>;
21
- type SanitizeFn = (value: string) => string;
22
- interface StructureEngineOptions {
23
- sanitize?: SanitizeFn;
24
- viewConditionals?: boolean;
25
- }
26
- interface BuildStructureOptions extends StructureEngineOptions {
27
- validationMap?: ValidationMap;
28
- layers?: WidgetCustomization[];
29
- }
30
- interface WidgetItemCondition {
31
- effect: 'keep' | 'remove';
32
- condition: Condition;
33
- }
34
- interface WidgetViewMapItemObj {
35
- childMap?: WidgetViewMap;
36
- defaults?: Record<string, unknown>;
37
- conditions?: WidgetItemCondition[];
38
- }
39
- type WidgetViewMapItem = string | boolean | WidgetViewMapItemObj | Record<string, SectionValue>;
40
- type WidgetViewMap = Record<string, WidgetViewMapItem>;
41
- interface WidgetConditionMap {
42
- condition: Condition;
43
- map: WidgetViewMap;
44
- }
1
+ import { W as Widget, a as WidgetVersion, C as ConditionState, b as WidgetCustomization, c as WidgetViewMap, B as BuildStructureOptions, d as WidgetConfig, V as ValidationMap, S as SanitizeFn, e as WidgetStructureRoot, f as StructureEngineOptions, g as WidgetItemCondition, h as Condition } from './structure.models-BqVB4VLP.js';
2
+ export { i as ConditionValue, O as Operators, j as ValidationFN, k as WIDGET_STRUCTURE_SCOPE_FORMAT, l as WIDGET_STRUCTURE_SCOPE_KIND, m as WIDGET_SUBMODULE_NAMES, n as WidgetConditionMap, o as WidgetStructure, p as WidgetSubModuleCollection, q as WidgetViewMapItem } from './structure.models-BqVB4VLP.js';
45
3
 
46
4
  interface ScopeOptions {
47
5
  widget?: Widget;
@@ -187,6 +145,11 @@ declare function structureFromSubmodule(parent: WidgetStructureInstance, module:
187
145
 
188
146
  declare const DOWNLOAD_MODAL_V1_KEYS: readonly ["qScheduleOption", "qSubscribeOption", "qSubscribeExternalUsers", "qSubscribeBanner", "qOwnerLabel", "qSubscribeOwner", "qSubscribeOrganization", "qSubscribeMyself", "qSubscribeSpecificPeople", "qIncludeHyperlinks", "qIncludeHeader"];
189
147
  type DownloadModalKey = (typeof DOWNLOAD_MODAL_V1_KEYS)[number];
148
+ declare const DOWNLOAD_MODAL_V1_ADVANCED_SETTINGS = "qAdvancedSettings";
149
+ declare const DOWNLOAD_MODAL_V1_ADVANCED_SETTINGS_KEYS: readonly ["qPageSize", "qOrientation"];
150
+ declare const DOWNLOAD_MODAL_V1_SECTIONS: {
151
+ qAdvancedSettings: ("qPageSize" | "qOrientation")[];
152
+ };
190
153
  declare const hostKeepInheritance: (section?: string) => Record<string, string>;
191
154
  declare const DOWNLOAD_MODAL_V1_DEFAULTS: {
192
155
  subscribeMyself: boolean;
@@ -267,7 +230,7 @@ declare class BaseDashboardV1StructureDto {
267
230
  toolBar: (string | Record<string, unknown>)[];
268
231
  configPanel: boolean;
269
232
  filterPanel: FilterPanelDto;
270
- downloadModal: string[];
233
+ downloadModal: (string | Record<string, unknown>)[];
271
234
  subModules: SubModulesDto;
272
235
  }
273
236
 
@@ -287,4 +250,4 @@ declare namespace dashboard_structure_doc {
287
250
  export { dashboard_structure_doc_AssetListDto as AssetListDto, dashboard_structure_doc_BaseDashboardV1StructureDto as BaseDashboardV1StructureDto, dashboard_structure_doc_FilterPanelDto as FilterPanelDto, dashboard_structure_doc_MenuBarDto as MenuBarDto, dashboard_structure_doc_SubModulesDto as SubModulesDto, dashboard_structure_doc_ViewsDto as ViewsDto };
288
251
  }
289
252
 
290
- export { type BuildStructureOptions, CUSTOMIZATIONS_API_PATH, Condition, ConditionState, type CustomizationErrorCode, type CustomizationPath, type CustomizationValidationError, type CustomizationValidationResult, DEFAULT_CUSTOMIZATION_ID, DOWNLOAD_MODAL_V1_DEFAULTS, DOWNLOAD_MODAL_V1_KEYS, DOWNLOAD_MODAL_VALIDATOR_MAP, DX_VALIDATOR_MAP, dashboard_structure_doc as DashboardDoc, type DownloadModalKey, type LoadRemoteCustomizationOptions, type RemoteCustomizationDefinition, type RemoteCustomizationError, type RemoteCustomizationResult, type RemoteCustomizationStatus, type SanitizeFn, type ScopeOptions, type StructureEngineOptions, type StructureInput, type ValidateCustomizationOptions, type ValidationFN, type ValidationMap, Widget, type WidgetConditionMap, type WidgetConfig, WidgetCustomization, type WidgetItemCondition, type WidgetStructure, WidgetStructureInstance, type WidgetStructureRoot, type WidgetStructureScope, WidgetVersion, type WidgetViewMap, type WidgetViewMapItem, buildStructure, calculateRootDefaults, calculateViewMap, checkConditions, clearRemoteCustomizationCache, evaluateCondition, extractCustomization, formatCustomizationPath, getWidgetConfig, getWidgetStructure, hostKeepInheritance, isEmptyCustomization, isValidCustomizationId, isWidgetStructureScope, loadRemoteCustomization, remoteCustomizationLayers, scopeToCustomization, structureFrom, structureFromSubmodule, validateBoolean, validateCustomization, validateDefaults };
253
+ export { BuildStructureOptions, CUSTOMIZATIONS_API_PATH, Condition, ConditionState, type CustomizationErrorCode, type CustomizationPath, type CustomizationValidationError, type CustomizationValidationResult, DEFAULT_CUSTOMIZATION_ID, DOWNLOAD_MODAL_V1_ADVANCED_SETTINGS, DOWNLOAD_MODAL_V1_ADVANCED_SETTINGS_KEYS, DOWNLOAD_MODAL_V1_DEFAULTS, DOWNLOAD_MODAL_V1_KEYS, DOWNLOAD_MODAL_V1_SECTIONS, DOWNLOAD_MODAL_VALIDATOR_MAP, DX_VALIDATOR_MAP, dashboard_structure_doc as DashboardDoc, type DownloadModalKey, type LoadRemoteCustomizationOptions, type RemoteCustomizationDefinition, type RemoteCustomizationError, type RemoteCustomizationResult, type RemoteCustomizationStatus, SanitizeFn, type ScopeOptions, StructureEngineOptions, type StructureInput, type ValidateCustomizationOptions, ValidationMap, Widget, WidgetConfig, WidgetCustomization, WidgetItemCondition, WidgetStructureInstance, WidgetStructureRoot, type WidgetStructureScope, WidgetVersion, WidgetViewMap, buildStructure, calculateRootDefaults, calculateViewMap, checkConditions, clearRemoteCustomizationCache, evaluateCondition, extractCustomization, formatCustomizationPath, getWidgetConfig, getWidgetStructure, hostKeepInheritance, isEmptyCustomization, isValidCustomizationId, isWidgetStructureScope, loadRemoteCustomization, remoteCustomizationLayers, scopeToCustomization, structureFrom, structureFromSubmodule, validateBoolean, validateCustomization, validateDefaults };
@@ -1,14 +1,34 @@
1
- import { a as Widget, b as WidgetVersion, W as WidgetCustomization } from './customization.models-CCSWjfb2.js';
1
+ import { a as WidgetVersion, d as WidgetConfig, e as WidgetStructureRoot, V as ValidationMap, W as Widget, b as WidgetCustomization } from './structure.models-BqVB4VLP.js';
2
2
 
3
+ type CustomizationAudience = 'partner' | 'internal';
3
4
  interface CustomizationLabel {
4
5
  label: string;
5
6
  description?: string;
7
+ since?: string;
8
+ notes?: string;
9
+ audience?: CustomizationAudience;
6
10
  }
7
11
  type CustomizationLabelMap = Record<string, CustomizationLabel>;
12
+ interface CustomizationDefaultLabel {
13
+ description?: string;
14
+ since?: string;
15
+ notes?: string;
16
+ audience?: CustomizationAudience;
17
+ type?: string;
18
+ values?: readonly (string | number | boolean)[];
19
+ example?: string;
20
+ }
21
+ type CustomizationDefaultLabelMap = Record<string, CustomizationDefaultLabel>;
8
22
  interface CustomizationTarget {
9
23
  views: string[];
10
24
  subModules?: string[];
11
25
  }
26
+ type CustomizationStructureSource = WidgetConfig | WidgetStructureRoot;
27
+ interface CustomizationStructureOptions {
28
+ version?: WidgetVersion;
29
+ structure?: CustomizationStructureSource;
30
+ subModuleStructures?: Record<string, CustomizationStructureSource>;
31
+ }
12
32
  interface CustomizationTreeNode {
13
33
  key: string;
14
34
  id: string;
@@ -27,24 +47,58 @@ interface CustomizationTreeStateNode extends CustomizationTreeNode {
27
47
  lockedBy?: CustomizationLock;
28
48
  children?: CustomizationTreeStateNode[];
29
49
  }
50
+ interface CustomizationDefaultDoc {
51
+ name: string;
52
+ type?: string;
53
+ values?: readonly (string | number | boolean)[];
54
+ example?: string;
55
+ description?: string;
56
+ since?: string;
57
+ notes?: string;
58
+ audience: CustomizationAudience;
59
+ }
60
+ interface CustomizationDefaultDocEntry extends CustomizationDefaultDoc {
61
+ key: string | null;
62
+ }
63
+ interface CustomizationDocEntry {
64
+ key: string;
65
+ scope: string;
66
+ parent: string | null;
67
+ kind: 'section' | 'item' | 'subModule';
68
+ label: string;
69
+ description?: string;
70
+ since?: string;
71
+ notes?: string;
72
+ audience: CustomizationAudience;
73
+ defaults?: CustomizationDefaultDoc[];
74
+ }
75
+ interface CustomizationDocsOptions extends CustomizationStructureOptions {
76
+ views?: string[];
77
+ subModules?: string[];
78
+ validationMap?: ValidationMap;
79
+ }
30
80
 
31
81
  declare const widgetMetadata: Partial<Record<Widget, {
32
82
  labels: CustomizationLabelMap;
83
+ defaults?: CustomizationDefaultLabelMap;
33
84
  }>>;
34
85
  /**
35
- * Keys of the structure in a view (or at the root), in structure order, without the view prefix.
86
+ * Keys of the structure in a view (or at the root), in structure order, without the view prefix. Reads the structure the
87
+ * options pass, under their customization, instead of the one this package ships when they set one.
36
88
  */
37
- declare function structureKeysOf(widget: Widget, view?: string, version?: WidgetVersion): string[];
89
+ declare function structureKeysOf(widget: Widget, view?: string, version?: WidgetVersion, options?: {
90
+ structure?: CustomizationStructureSource;
91
+ customization?: WidgetCustomization;
92
+ }): string[];
38
93
  /**
39
94
  * Label of a key: full path first, then the leaf id; a humanized id when neither exists.
40
95
  */
41
96
  declare function getCustomizationLabel(widget: Widget, key: string): CustomizationLabel;
42
97
  /**
43
- * The labelled tree of a target: a widget view, or the structure of the embedded widget when subModules is set.
98
+ * The labelled tree of a target: a widget view, or the structure of the embedded widget when subModules is set. Options
99
+ * may pass the structures to read (CustomizationStructureOptions).
44
100
  */
45
- declare function getCustomizationTree(widget: Widget, target: CustomizationTarget, options?: {
46
- version?: WidgetVersion;
47
- }): CustomizationTreeNode[];
101
+ declare function getCustomizationTree(widget: Widget, target: CustomizationTarget, options?: CustomizationStructureOptions): CustomizationTreeNode[];
48
102
  /**
49
103
  * The tree with the visibility of each node for a customization, computed with the real engine. A node whose
50
104
  * visibility differs between the target views is 'mixed'; a hidden node a switch cannot bring back is locked.
@@ -56,4 +110,16 @@ declare function getCustomizationTreeState(widget: Widget, customization: Widget
56
110
  */
57
111
  declare function toggleCustomizationKey(customization: WidgetCustomization | undefined, target: CustomizationTarget, key: string, visible: boolean): WidgetCustomization;
58
112
 
59
- export { type CustomizationLabel, type CustomizationLabelMap, type CustomizationLock, type CustomizationTarget, type CustomizationTreeNode, type CustomizationTreeStateNode, getCustomizationLabel, getCustomizationTree, getCustomizationTreeState, structureKeysOf, toggleCustomizationKey, widgetMetadata };
113
+ /**
114
+ * The customization keys of a widget as flat doc entries, one per key per scope: each view of the structure, then each
115
+ * submodule of the view ('design::chartPanel') with the keys its structure resolves to inside the host. Options may pass
116
+ * the structures to document, so a host can describe the tree it shipped with instead of this package's.
117
+ */
118
+ declare function getCustomizationDocs(widget: Widget, options?: CustomizationDocsOptions): CustomizationDocEntry[];
119
+ /**
120
+ * Every documented default of a widget, with the key it belongs to: the defaults no key owns (customStyles,
121
+ * unsavedChangesBehavior) apply to the whole widget and come with a null key.
122
+ */
123
+ declare function getCustomizationDefaultDocs(widget: Widget, options?: CustomizationDocsOptions): CustomizationDefaultDocEntry[];
124
+
125
+ export { type CustomizationAudience, type CustomizationDefaultDoc, type CustomizationDefaultDocEntry, type CustomizationDefaultLabel, type CustomizationDefaultLabelMap, type CustomizationDocEntry, type CustomizationDocsOptions, type CustomizationLabel, type CustomizationLabelMap, type CustomizationLock, type CustomizationStructureOptions, type CustomizationStructureSource, type CustomizationTarget, type CustomizationTreeNode, type CustomizationTreeStateNode, getCustomizationDefaultDocs, getCustomizationDocs, getCustomizationLabel, getCustomizationTree, getCustomizationTreeState, structureKeysOf, toggleCustomizationKey, widgetMetadata };
@@ -0,0 +1,89 @@
1
+ declare enum Widget {
2
+ DASHBOARD = "dashboard",
3
+ REPORT = "report",
4
+ DOWNLOAD_MANAGER = "download-manager",
5
+ DOWNLOAD_MODAL = "download-modal",
6
+ CHART_PANEL = "chart-panel",
7
+ CHART_GALLERY = "chart-gallery",
8
+ CHART_BUILDER = "chart-builder"
9
+ }
10
+ declare const WIDGET_SUBMODULE_NAMES: Partial<Record<Widget, string>>;
11
+ declare const WIDGET_STRUCTURE_SCOPE_KIND = "qrvey.widget-structure-scope";
12
+ declare const WIDGET_STRUCTURE_SCOPE_FORMAT = 1;
13
+ declare enum WidgetVersion {
14
+ v1 = "1.0",
15
+ latest = "latest"
16
+ }
17
+
18
+ declare const allowedOperators: readonly ["=", "!=", ">", ">=", "<", "<=", "startsWith", "endsWith", "contains"];
19
+ type Operators = (typeof allowedOperators)[number];
20
+ type ConditionValue = string | number;
21
+ interface Condition {
22
+ field: string;
23
+ operator: Operators;
24
+ value: ConditionValue;
25
+ }
26
+ type ConditionState = Record<string, ConditionValue>;
27
+
28
+ interface Verbs {
29
+ remove?: string[];
30
+ keep?: string[];
31
+ reorder?: string[];
32
+ }
33
+ interface CustomizationStructure extends Verbs {
34
+ defaults?: Record<string, unknown>;
35
+ subModules?: WidgetSubModuleCollection;
36
+ }
37
+ interface Conditional extends CustomizationStructure {
38
+ condition: Condition;
39
+ }
40
+ type View = Record<string, WidgetCustomization>;
41
+ type WidgetSubModuleCollection = Record<string, WidgetCustomization>;
42
+ interface WidgetCustomization extends CustomizationStructure {
43
+ conditional?: Conditional[];
44
+ views?: View;
45
+ }
46
+
47
+ type SectionValue = number | boolean | string | undefined | SectionValue[] | Record<string, unknown>;
48
+ type SectionDefinition = WidgetStructure | (string | WidgetStructure)[] | undefined | boolean;
49
+ interface WidgetStructure {
50
+ defaults?: Record<string, SectionValue>;
51
+ subModules?: Record<string, SectionValue>;
52
+ [key: string]: SectionDefinition | Record<string, SectionValue> | undefined;
53
+ }
54
+ interface WidgetStructureRoot extends WidgetStructure {
55
+ views?: Record<string, string[]>;
56
+ }
57
+ interface WidgetConfig {
58
+ version: string;
59
+ baseStructure: WidgetStructureRoot;
60
+ keepInheritance?: Record<string, string>;
61
+ }
62
+ type ValidationFN<T = any> = (value: T) => T | undefined;
63
+ type ValidationMap = Record<string, ValidationFN>;
64
+ type SanitizeFn = (value: string) => string;
65
+ interface StructureEngineOptions {
66
+ sanitize?: SanitizeFn;
67
+ viewConditionals?: boolean;
68
+ }
69
+ interface BuildStructureOptions extends StructureEngineOptions {
70
+ validationMap?: ValidationMap;
71
+ layers?: WidgetCustomization[];
72
+ }
73
+ interface WidgetItemCondition {
74
+ effect: 'keep' | 'remove';
75
+ condition: Condition;
76
+ }
77
+ interface WidgetViewMapItemObj {
78
+ childMap?: WidgetViewMap;
79
+ defaults?: Record<string, unknown>;
80
+ conditions?: WidgetItemCondition[];
81
+ }
82
+ type WidgetViewMapItem = string | boolean | WidgetViewMapItemObj | Record<string, SectionValue>;
83
+ type WidgetViewMap = Record<string, WidgetViewMapItem>;
84
+ interface WidgetConditionMap {
85
+ condition: Condition;
86
+ map: WidgetViewMap;
87
+ }
88
+
89
+ export { type BuildStructureOptions as B, type ConditionState as C, type Operators as O, type SanitizeFn as S, type ValidationMap as V, Widget as W, WidgetVersion as a, type WidgetCustomization as b, type WidgetViewMap as c, type WidgetConfig as d, type WidgetStructureRoot as e, type StructureEngineOptions as f, type WidgetItemCondition as g, type Condition as h, type ConditionValue as i, type ValidationFN as j, WIDGET_STRUCTURE_SCOPE_FORMAT as k, WIDGET_STRUCTURE_SCOPE_KIND as l, WIDGET_SUBMODULE_NAMES as m, type WidgetConditionMap as n, type WidgetStructure as o, type WidgetSubModuleCollection as p, type WidgetViewMapItem as q };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/widget-configurability",
3
- "version": "0.0.0-beta.4657",
3
+ "version": "0.0.0-beta.4707",
4
4
  "types": "dist/types/index.d.ts",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -1,47 +0,0 @@
1
- declare enum Widget {
2
- DASHBOARD = "dashboard",
3
- REPORT = "report",
4
- DOWNLOAD_MANAGER = "download-manager",
5
- DOWNLOAD_MODAL = "download-modal",
6
- CHART_PANEL = "chart-panel",
7
- CHART_GALLERY = "chart-gallery",
8
- CHART_BUILDER = "chart-builder"
9
- }
10
- declare const WIDGET_SUBMODULE_NAMES: Partial<Record<Widget, string>>;
11
- declare const WIDGET_STRUCTURE_SCOPE_KIND = "qrvey.widget-structure-scope";
12
- declare const WIDGET_STRUCTURE_SCOPE_FORMAT = 1;
13
- declare enum WidgetVersion {
14
- v1 = "1.0",
15
- latest = "latest"
16
- }
17
-
18
- declare const allowedOperators: readonly ["=", "!=", ">", ">=", "<", "<=", "startsWith", "endsWith", "contains"];
19
- type Operators = (typeof allowedOperators)[number];
20
- type ConditionValue = string | number;
21
- interface Condition {
22
- field: string;
23
- operator: Operators;
24
- value: ConditionValue;
25
- }
26
- type ConditionState = Record<string, ConditionValue>;
27
-
28
- interface Verbs {
29
- remove?: string[];
30
- keep?: string[];
31
- reorder?: string[];
32
- }
33
- interface CustomizationStructure extends Verbs {
34
- defaults?: Record<string, unknown>;
35
- subModules?: WidgetSubModuleCollection;
36
- }
37
- interface Conditional extends CustomizationStructure {
38
- condition: Condition;
39
- }
40
- type View = Record<string, WidgetCustomization>;
41
- type WidgetSubModuleCollection = Record<string, WidgetCustomization>;
42
- interface WidgetCustomization extends CustomizationStructure {
43
- conditional?: Conditional[];
44
- views?: View;
45
- }
46
-
47
- export { type Condition as C, type Operators as O, type WidgetCustomization as W, Widget as a, WidgetVersion as b, type ConditionState as c, type ConditionValue as d, WIDGET_STRUCTURE_SCOPE_FORMAT as e, WIDGET_STRUCTURE_SCOPE_KIND as f, WIDGET_SUBMODULE_NAMES as g, type WidgetSubModuleCollection as h };