@claspo/common 7.3.1-dev.4 → 7.4.0-nonlinear

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 (224) hide show
  1. package/{out/document → document}/Document.interface.d.ts +2 -0
  2. package/document/ViewNavigationGraph.d.ts +42 -0
  3. package/document/ViewNavigationGraph.js +1 -0
  4. package/package.json +2 -2
  5. package/velocity/SysVelocityRenderer.js +1 -0
  6. package/coverage/lcov-report/block-navigation.js +0 -87
  7. package/coverage/lcov-report/prettify.js +0 -2
  8. package/coverage/lcov-report/sorter.js +0 -196
  9. package/jest.config.ts +0 -204
  10. package/out/package.json +0 -50
  11. package/out/velocity/SysVelocityRenderer.js +0 -1
  12. package/src/DefaultEventEmitter.test.ts +0 -84
  13. package/src/DefaultEventEmitter.ts +0 -96
  14. package/src/HttpAbortableLoader.ts +0 -35
  15. package/src/InAppLayoutType.ts +0 -6
  16. package/src/LayoutType.ts +0 -18
  17. package/src/PrizePool.interface.ts +0 -32
  18. package/src/RenderMode.ts +0 -10
  19. package/src/UuidGenerator.ts +0 -16
  20. package/src/WidgetInitConfig.interface.ts +0 -163
  21. package/src/WidgetType.ts +0 -18
  22. package/src/action/type.ts +0 -7
  23. package/src/async/createAsyncIterator.ts +0 -33
  24. package/src/async/debounce.ts +0 -28
  25. package/src/async/timeout.ts +0 -3
  26. package/src/component-manifest/ComponentManifest.interface.ts +0 -160
  27. package/src/component-manifest/ContextMenuManifest.interface.ts +0 -52
  28. package/src/component-manifest/DisplayCondition.interface.ts +0 -65
  29. package/src/component-manifest/FloatingControlManifest.interface.ts +0 -89
  30. package/src/component-manifest/PropPathCondition.interface.ts +0 -4
  31. package/src/component-manifest/PropertyPaneManifest.interface.ts +0 -614
  32. package/src/converter/time/TimeConverter.spec.ts +0 -11
  33. package/src/converter/time/TimeUnit.spec.ts +0 -12
  34. package/src/converter/time/TimeUnit.ts +0 -34
  35. package/src/converter/time/TimerConverter.ts +0 -29
  36. package/src/document/ComponentInsertType.ts +0 -6
  37. package/src/document/Document.interface.ts +0 -625
  38. package/src/document/DocumentCssVarsReplace.test.ts +0 -2947
  39. package/src/document/DocumentCssVarsReplace.ts +0 -31
  40. package/src/document/DocumentUtils.test.ts +0 -595
  41. package/src/document/DocumentUtils.ts +0 -194
  42. package/src/document/hidden-fields.interface.ts +0 -54
  43. package/src/dom/ViewportSize.ts +0 -61
  44. package/src/dom/copyToClipboard.ts +0 -17
  45. package/src/dom/getMostNestedNode.ts +0 -9
  46. package/src/dom/insertHtmlIntoElement.ts +0 -36
  47. package/src/dom/sanitizeHTML.test.ts +0 -59
  48. package/src/dom/sanitizeHTML.ts +0 -78
  49. package/src/element/BaseElementInViewportHandler.ts +0 -41
  50. package/src/element/CssVarsOperations.ts +0 -37
  51. package/src/element/ThemeCssVars.ts +0 -28
  52. package/src/element/recursiveFindParentNodeByAttribute.test.ts +0 -63
  53. package/src/element/recursiveFindParentNodeByAttribute.ts +0 -25
  54. package/src/flat.ts +0 -16
  55. package/src/handler/HandlerTypes.ts +0 -4
  56. package/src/math/RandomDistributor.test.ts +0 -35
  57. package/src/math/RandomDistributor.ts +0 -58
  58. package/src/math/sum.ts +0 -3
  59. package/src/network/HttpClient.ts +0 -28
  60. package/src/network/HttpStatus.ts +0 -4
  61. package/src/object/isDictionary.test.ts +0 -24
  62. package/src/object/isDictionary.ts +0 -13
  63. package/src/object/omitKeys.test.ts +0 -19
  64. package/src/object/omitKeys.ts +0 -20
  65. package/src/storage/BaseCachingStorage.test.ts +0 -70
  66. package/src/storage/BaseCachingStorage.ts +0 -37
  67. package/src/storage/CachingCookieStorage.test.ts +0 -75
  68. package/src/storage/CachingCookieStorage.ts +0 -36
  69. package/src/storage/CachingLocalStorage.test.ts +0 -59
  70. package/src/storage/CachingLocalStorage.ts +0 -34
  71. package/src/storage/getCookie.test.ts +0 -53
  72. package/src/storage/getCookie.ts +0 -10
  73. package/src/storage/setCookie.test.ts +0 -97
  74. package/src/storage/setCookie.ts +0 -49
  75. package/src/theme/theme.utils.ts +0 -50
  76. package/src/url/sanitizeUrl.test.ts +0 -62
  77. package/src/url/sanitizeUrl.ts +0 -51
  78. package/src/utils/CaseTransformer.test.ts +0 -16
  79. package/src/utils/CaseTransformer.ts +0 -10
  80. package/src/utils/NullishCoalescingOperator.ts +0 -3
  81. package/src/utils/NumericDecline.ts +0 -25
  82. package/src/utils/addEventListener.ts +0 -23
  83. package/src/utils/allSettled.ts +0 -6
  84. package/src/utils/checkTimeZone.spec.ts +0 -18
  85. package/src/utils/checkTimeZone.ts +0 -6
  86. package/src/utils/deviceUtils.ts +0 -12
  87. package/src/utils/flatMap.test.ts +0 -21
  88. package/src/utils/flatMap.ts +0 -3
  89. package/src/utils/fromEntries.ts +0 -6
  90. package/src/utils/generateRandomNumber.test.ts +0 -23
  91. package/src/utils/generateRandomNumber.ts +0 -3
  92. package/src/utils/objectSort.ts +0 -41
  93. package/src/utils/orientationUtils.ts +0 -18
  94. package/src/velocity/SysVelocityContext.spec.ts +0 -88
  95. package/src/velocity/SysVelocityContext.ts +0 -129
  96. package/src/velocity/SysVelocityRenderer.spec.ts +0 -36
  97. package/src/velocity/SysVelocityRenderer.ts +0 -11
  98. package/test/__mocks/jestGlobalMocks.js +0 -1887
  99. /package/{out/DefaultEventEmitter.d.ts → DefaultEventEmitter.d.ts} +0 -0
  100. /package/{out/DefaultEventEmitter.js → DefaultEventEmitter.js} +0 -0
  101. /package/{out/HttpAbortableLoader.d.ts → HttpAbortableLoader.d.ts} +0 -0
  102. /package/{out/HttpAbortableLoader.js → HttpAbortableLoader.js} +0 -0
  103. /package/{out/InAppLayoutType.d.ts → InAppLayoutType.d.ts} +0 -0
  104. /package/{out/InAppLayoutType.js → InAppLayoutType.js} +0 -0
  105. /package/{out/LayoutType.d.ts → LayoutType.d.ts} +0 -0
  106. /package/{out/LayoutType.js → LayoutType.js} +0 -0
  107. /package/{out/PrizePool.interface.d.ts → PrizePool.interface.d.ts} +0 -0
  108. /package/{out/PrizePool.interface.js → PrizePool.interface.js} +0 -0
  109. /package/{out/RenderMode.d.ts → RenderMode.d.ts} +0 -0
  110. /package/{out/RenderMode.js → RenderMode.js} +0 -0
  111. /package/{out/UuidGenerator.d.ts → UuidGenerator.d.ts} +0 -0
  112. /package/{out/UuidGenerator.js → UuidGenerator.js} +0 -0
  113. /package/{out/WidgetInitConfig.interface.d.ts → WidgetInitConfig.interface.d.ts} +0 -0
  114. /package/{out/WidgetInitConfig.interface.js → WidgetInitConfig.interface.js} +0 -0
  115. /package/{out/WidgetType.d.ts → WidgetType.d.ts} +0 -0
  116. /package/{out/WidgetType.js → WidgetType.js} +0 -0
  117. /package/{out/action → action}/type.d.ts +0 -0
  118. /package/{out/action → action}/type.js +0 -0
  119. /package/{out/async → async}/createAsyncIterator.d.ts +0 -0
  120. /package/{out/async → async}/createAsyncIterator.js +0 -0
  121. /package/{out/async → async}/debounce.d.ts +0 -0
  122. /package/{out/async → async}/debounce.js +0 -0
  123. /package/{out/async → async}/timeout.d.ts +0 -0
  124. /package/{out/async → async}/timeout.js +0 -0
  125. /package/{out/component-manifest → component-manifest}/ComponentManifest.interface.d.ts +0 -0
  126. /package/{out/component-manifest → component-manifest}/ComponentManifest.interface.js +0 -0
  127. /package/{out/component-manifest → component-manifest}/ContextMenuManifest.interface.d.ts +0 -0
  128. /package/{out/component-manifest → component-manifest}/ContextMenuManifest.interface.js +0 -0
  129. /package/{out/component-manifest → component-manifest}/DisplayCondition.interface.d.ts +0 -0
  130. /package/{out/component-manifest → component-manifest}/DisplayCondition.interface.js +0 -0
  131. /package/{out/component-manifest → component-manifest}/FloatingControlManifest.interface.d.ts +0 -0
  132. /package/{out/component-manifest → component-manifest}/FloatingControlManifest.interface.js +0 -0
  133. /package/{out/component-manifest → component-manifest}/PropPathCondition.interface.d.ts +0 -0
  134. /package/{out/component-manifest → component-manifest}/PropPathCondition.interface.js +0 -0
  135. /package/{out/component-manifest → component-manifest}/PropertyPaneManifest.interface.d.ts +0 -0
  136. /package/{out/component-manifest → component-manifest}/PropertyPaneManifest.interface.js +0 -0
  137. /package/{out/converter → converter}/time/TimeUnit.d.ts +0 -0
  138. /package/{out/converter → converter}/time/TimeUnit.js +0 -0
  139. /package/{out/converter → converter}/time/TimerConverter.d.ts +0 -0
  140. /package/{out/converter → converter}/time/TimerConverter.js +0 -0
  141. /package/{out/document → document}/ComponentInsertType.d.ts +0 -0
  142. /package/{out/document → document}/ComponentInsertType.js +0 -0
  143. /package/{out/document → document}/Document.interface.js +0 -0
  144. /package/{out/document → document}/DocumentCssVarsReplace.d.ts +0 -0
  145. /package/{out/document → document}/DocumentCssVarsReplace.js +0 -0
  146. /package/{out/document → document}/DocumentUtils.d.ts +0 -0
  147. /package/{out/document → document}/DocumentUtils.js +0 -0
  148. /package/{out/document → document}/hidden-fields.interface.d.ts +0 -0
  149. /package/{out/document → document}/hidden-fields.interface.js +0 -0
  150. /package/{out/dom → dom}/ViewportSize.d.ts +0 -0
  151. /package/{out/dom → dom}/ViewportSize.js +0 -0
  152. /package/{out/dom → dom}/copyToClipboard.d.ts +0 -0
  153. /package/{out/dom → dom}/copyToClipboard.js +0 -0
  154. /package/{out/dom → dom}/getMostNestedNode.d.ts +0 -0
  155. /package/{out/dom → dom}/getMostNestedNode.js +0 -0
  156. /package/{out/dom → dom}/insertHtmlIntoElement.d.ts +0 -0
  157. /package/{out/dom → dom}/insertHtmlIntoElement.js +0 -0
  158. /package/{out/dom → dom}/sanitizeHTML.d.ts +0 -0
  159. /package/{out/dom → dom}/sanitizeHTML.js +0 -0
  160. /package/{out/element → element}/BaseElementInViewportHandler.d.ts +0 -0
  161. /package/{out/element → element}/BaseElementInViewportHandler.js +0 -0
  162. /package/{out/element → element}/CssVarsOperations.d.ts +0 -0
  163. /package/{out/element → element}/CssVarsOperations.js +0 -0
  164. /package/{out/element → element}/ThemeCssVars.d.ts +0 -0
  165. /package/{out/element → element}/ThemeCssVars.js +0 -0
  166. /package/{out/element → element}/recursiveFindParentNodeByAttribute.d.ts +0 -0
  167. /package/{out/element → element}/recursiveFindParentNodeByAttribute.js +0 -0
  168. /package/{out/flat.d.ts → flat.d.ts} +0 -0
  169. /package/{out/flat.js → flat.js} +0 -0
  170. /package/{out/handler → handler}/HandlerTypes.d.ts +0 -0
  171. /package/{out/handler → handler}/HandlerTypes.js +0 -0
  172. /package/{out/math → math}/RandomDistributor.d.ts +0 -0
  173. /package/{out/math → math}/RandomDistributor.js +0 -0
  174. /package/{out/math → math}/sum.d.ts +0 -0
  175. /package/{out/math → math}/sum.js +0 -0
  176. /package/{out/network → network}/HttpClient.d.ts +0 -0
  177. /package/{out/network → network}/HttpClient.js +0 -0
  178. /package/{out/network → network}/HttpStatus.d.ts +0 -0
  179. /package/{out/network → network}/HttpStatus.js +0 -0
  180. /package/{out/object → object}/isDictionary.d.ts +0 -0
  181. /package/{out/object → object}/isDictionary.js +0 -0
  182. /package/{out/object → object}/omitKeys.d.ts +0 -0
  183. /package/{out/object → object}/omitKeys.js +0 -0
  184. /package/{out/storage → storage}/BaseCachingStorage.d.ts +0 -0
  185. /package/{out/storage → storage}/BaseCachingStorage.js +0 -0
  186. /package/{out/storage → storage}/CachingCookieStorage.d.ts +0 -0
  187. /package/{out/storage → storage}/CachingCookieStorage.js +0 -0
  188. /package/{out/storage → storage}/CachingLocalStorage.d.ts +0 -0
  189. /package/{out/storage → storage}/CachingLocalStorage.js +0 -0
  190. /package/{out/storage → storage}/getCookie.d.ts +0 -0
  191. /package/{out/storage → storage}/getCookie.js +0 -0
  192. /package/{out/storage → storage}/setCookie.d.ts +0 -0
  193. /package/{out/storage → storage}/setCookie.js +0 -0
  194. /package/{out/theme → theme}/theme.utils.d.ts +0 -0
  195. /package/{out/theme → theme}/theme.utils.js +0 -0
  196. /package/{out/url → url}/sanitizeUrl.d.ts +0 -0
  197. /package/{out/url → url}/sanitizeUrl.js +0 -0
  198. /package/{out/utils → utils}/CaseTransformer.d.ts +0 -0
  199. /package/{out/utils → utils}/CaseTransformer.js +0 -0
  200. /package/{out/utils → utils}/NullishCoalescingOperator.d.ts +0 -0
  201. /package/{out/utils → utils}/NullishCoalescingOperator.js +0 -0
  202. /package/{out/utils → utils}/NumericDecline.d.ts +0 -0
  203. /package/{out/utils → utils}/NumericDecline.js +0 -0
  204. /package/{out/utils → utils}/addEventListener.d.ts +0 -0
  205. /package/{out/utils → utils}/addEventListener.js +0 -0
  206. /package/{out/utils → utils}/allSettled.d.ts +0 -0
  207. /package/{out/utils → utils}/allSettled.js +0 -0
  208. /package/{out/utils → utils}/checkTimeZone.d.ts +0 -0
  209. /package/{out/utils → utils}/checkTimeZone.js +0 -0
  210. /package/{out/utils → utils}/deviceUtils.d.ts +0 -0
  211. /package/{out/utils → utils}/deviceUtils.js +0 -0
  212. /package/{out/utils → utils}/flatMap.d.ts +0 -0
  213. /package/{out/utils → utils}/flatMap.js +0 -0
  214. /package/{out/utils → utils}/fromEntries.d.ts +0 -0
  215. /package/{out/utils → utils}/fromEntries.js +0 -0
  216. /package/{out/utils → utils}/generateRandomNumber.d.ts +0 -0
  217. /package/{out/utils → utils}/generateRandomNumber.js +0 -0
  218. /package/{out/utils → utils}/objectSort.d.ts +0 -0
  219. /package/{out/utils → utils}/objectSort.js +0 -0
  220. /package/{out/utils → utils}/orientationUtils.d.ts +0 -0
  221. /package/{out/utils → utils}/orientationUtils.js +0 -0
  222. /package/{out/velocity → velocity}/SysVelocityContext.d.ts +0 -0
  223. /package/{out/velocity → velocity}/SysVelocityContext.js +0 -0
  224. /package/{out/velocity → velocity}/SysVelocityRenderer.d.ts +0 -0
@@ -1,160 +0,0 @@
1
- import {ClBaseComponentI, ClBaseComponentPropsI, ClComponentType} from '../document/Document.interface';
2
- import {BaseContextMenuManifestModelI} from './ContextMenuManifest.interface';
3
- import {BaseFloatingControlManifestModelI} from './FloatingControlManifest.interface';
4
- import {PropertyPaneManifestI} from './PropertyPaneManifest.interface';
5
-
6
- /**
7
- * Component manifest defining component configuration, properties, and editor controls.
8
- */
9
- export interface ComponentManifestI {
10
- /** Component name for registration */
11
- name: string;
12
- /** Component type identifier */
13
- componentType: ClComponentType;
14
- /** Component version */
15
- version: string;
16
- /** Context menu configuration for editor */
17
- contextMenuModel: BaseContextMenuManifestModelI[];
18
- /** Floating controls configuration for editor */
19
- floatingControlsModel: BaseFloatingControlManifestModelI[];
20
- /** Property pane configuration for editor */
21
- propertyPaneModel: PropertyPaneManifestI;
22
- /** Component event definitions
23
- * @internal
24
- * */
25
- events: any;
26
- /** Default component properties */
27
- props: ClBaseComponentPropsI;
28
- /** Component metadata for editor display */
29
- metaDescription: ComponentManifestMetaDescriptionI;
30
- /** Property pane for i18n settings */
31
- i18nPropertyPaneModel?: PropertyPaneManifestI;
32
- /** Property paths that support internationalization for multilingual content.
33
- * The editor extracts values from these paths and sends them to an AI-based translator.
34
- * The renderer then replaces the original values with the translated results using the same paths.
35
- * @example
36
- * [
37
- * "content,label",
38
- * "control,options,[id],label"
39
- * ]
40
- *
41
- * Note: [id] extracts all object keys
42
- * */
43
- i18nPropPaths?: string[];
44
- /** If true, clicking current component focuses it's parent component */
45
- focusParentOnClick?: boolean;
46
- /** If true, prevents drag operations for current component */
47
- preventDraggable?: boolean;
48
- /** If true, removes children when component is removed */
49
- recursiveRemove?: boolean;
50
- /** Translation strings by language. Used by components (e.g. error messages).
51
- * @example
52
- * {
53
- * "en": {
54
- * "control,validation,validationErrors,REQUIRED": "Required field",
55
- * },
56
- * */
57
- i18n?: ComponentManifestTranslationI;
58
- /** Default child components */
59
- children?: ClBaseComponentI[];
60
- /** Field mapping types that component can handle */
61
- mappingTypes?: ManifestMappingType[];
62
- /** Element names that can receive focus and should be highlighted by the editor */
63
- focusableElements?: string[];
64
- /** Auto-contrast configuration for color adjustments */
65
- autoContrast?: AutoContrastI[];
66
- /** If true, keeps general tab open until user interacts */
67
- keepGeneralTabOpenUntilInteracted?: boolean;
68
- /** If true, component can be started externally */
69
- isExternalStartCapable?: boolean;
70
- /** If true, waits for resources to load before showing */
71
- waitForResourcesLoad?: boolean;
72
- /** Paths to properties containing resource URLs
73
- * @internal
74
- * */
75
- resourcesPropPaths?: string[][];
76
- /** @internal */
77
- syncEnabled?: boolean;
78
- /** @internal */
79
- stylesImitationEnabled?: boolean;
80
- /** Opens ClPropertyPaneManifestModelName.COMPONENT_OPTIONS when a component is added to the widget */
81
- showComponentOptionsPropertyPaneOnInsert?: boolean;
82
- /** Opens ClPropertyPaneManifestModelName.INTEGRATION_FIELD_MAPPING when a component is added to the widget */
83
- showIntegrationFieldMappingPropertyPaneOnInsert?: boolean;
84
- }
85
-
86
- /**
87
- * Field mapping types for integration field configuration.
88
- */
89
- export enum ManifestMappingType {
90
- TEXT = 'TEXT',
91
- TEXT_AREA = 'TEXT_AREA',
92
- INTEGER = 'INTEGER',
93
- FLOAT = 'FLOAT',
94
- SELECT = 'SELECT',
95
- CHECKBOX_LIST = 'CHECKBOX_LIST',
96
- CHECKBOX = 'CHECKBOX',
97
- DATE = 'DATE',
98
- DATE_TIME = 'DATE_TIME',
99
- }
100
-
101
- /**
102
- * Translation strings organized by language code.
103
- */
104
- export interface ComponentManifestTranslationI {
105
- [languageCode: string]: ComponentManifestTranslationItemI;
106
- }
107
-
108
- /**
109
- * Translation items mapping property paths to translated values.
110
- */
111
- export interface ComponentManifestTranslationItemI {
112
- [propPath: string]: string;
113
- }
114
-
115
- /**
116
- * Component metadata for editor display and sorting.
117
- */
118
- export interface ComponentManifestMetaDescriptionI {
119
- /** Display labels by language */
120
- label: ComponentManifestDescriptionLabelItemI;
121
- /** Sort weight for ordering in component list */
122
- sortWeight?: number;
123
- /** Icon identifier for component */
124
- icon?: string;
125
- }
126
-
127
- /**
128
- * Component labels by language code.
129
- */
130
- export interface ComponentManifestDescriptionLabelItemI {
131
- [languageCode: string]: string;
132
- }
133
-
134
- /**
135
- * Auto-contrast configuration for automatic color adjustments.
136
- */
137
- export interface AutoContrastI {
138
- /** Master color source */
139
- master: AutoContrastMemberI;
140
- /** Slave color to adjust */
141
- slave: AutoContrastMemberI;
142
- /** Property path to enabled flag */
143
- enabledPropPath: string[];
144
- }
145
-
146
- /**
147
- * Member of an auto-contrast pair.
148
- */
149
- export interface AutoContrastMemberI {
150
- /** Target element name */
151
- element: string;
152
- /** Element property name */
153
- elementProp?: string;
154
- /** Element sub-property name */
155
- elementSubProp?: string;
156
- /** Alternative property path */
157
- propPath?: string[];
158
- /** If true, color is dimmed */
159
- dimmed?: boolean | null;
160
- }
@@ -1,52 +0,0 @@
1
- import {ClComponentType} from '../document/Document.interface';
2
-
3
- /**
4
- * Base interface for context menu manifest items.
5
- */
6
- export interface BaseContextMenuManifestModelI {
7
- /** Item type (group or control) */
8
- type: ContextMenuManifestModelType;
9
- /** Predefined control name */
10
- name?: ContextMenuManifestModelName;
11
- /** Property path in component model */
12
- propPath?: string[];
13
- /** Target element name */
14
- element?: string;
15
- /** Element property name */
16
- elementProp?: string;
17
- /** Element sub-property name */
18
- elementSubProp?: string;
19
- /** Child menu items */
20
- children?: BaseContextMenuManifestModelI[];
21
- }
22
-
23
- /**
24
- * Context menu item types.
25
- */
26
- export enum ContextMenuManifestModelType {
27
- /** Group container for menu items */
28
- GROUP = 'GROUP',
29
- /** Individual control item */
30
- CONTROL = 'CONTROL',
31
- }
32
-
33
- /**
34
- * Predefined context menu control names.
35
- */
36
- export enum ContextMenuManifestModelName {
37
- FOCUS_PARENT_COMPONENT = 'FOCUS_PARENT_COMPONENT',
38
- COMPONENT_OPERATIONS = 'COMPONENT_OPERATIONS',
39
- BRING_BACK_FORWARD = 'BRING_BACK_FORWARD',
40
- }
41
-
42
- export interface GroupContextMenuManifestModelI extends BaseContextMenuManifestModelI {
43
- children: BaseContextMenuManifestModelI[];
44
- }
45
-
46
- export interface FocusParentComponentContextMenuManifestModelI extends BaseContextMenuManifestModelI {
47
- params?: FocusParentComponentContextMenuManifestParamsI;
48
- }
49
-
50
- export interface FocusParentComponentContextMenuManifestParamsI {
51
- hideForEntryType: ClComponentType;
52
- }
@@ -1,65 +0,0 @@
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
-
6
- /** Callback that determines whether a property pane control should be displayed */
7
- export type DisplayConditionCallbackI = (sdk: DisplayConditionSdkI) => boolean;
8
-
9
- /**
10
- * SDK provided to display condition callbacks, giving access to
11
- * widget context, component data, and document utilities.
12
- */
13
- export interface DisplayConditionSdkI {
14
- /** Current widget type (e.g., popup, embedded) */
15
- widgetType: WidgetType;
16
- /** Current layout type */
17
- layoutType: LayoutType;
18
- /** Facade for the currently selected component */
19
- component: DisplayConditionComponentFacadeI;
20
- /** Editor configuration object */
21
- editorConfig: any;
22
- /** The component view (tree node) being evaluated */
23
- componentView: ClBaseComponentI;
24
- /** All views (pages) in the document */
25
- views: ClBaseComponentI[];
26
- /** All registered component manifests */
27
- manifests: ComponentManifestI[];
28
- /** Utility methods for querying the document tree */
29
- documentUtils: DisplayConditionDocumentUtilsServiceI;
30
- }
31
-
32
- /**
33
- * Read-only facade exposing component metadata and navigation
34
- * within display condition callbacks.
35
- */
36
- export interface DisplayConditionComponentFacadeI {
37
- /** Unique component identifier */
38
- id: string;
39
- /** Component type (e.g., button, input) */
40
- type: ClComponentType;
41
- /** Position path in the component tree */
42
- path: number[];
43
- /** Whether the component is a floating element */
44
- floating: boolean;
45
- /** Returns the component's props */
46
- getProps: () => ClBaseComponentPropsI;
47
- /** Returns the component's child components */
48
- getChildren: () => ClBaseComponentI[];
49
- /** Returns the parent component facade, or null if root */
50
- getParent: () => DisplayConditionComponentFacadeI | null;
51
- }
52
-
53
- /**
54
- * Utility service for searching and querying components within the document tree.
55
- */
56
- export interface DisplayConditionDocumentUtilsServiceI {
57
- /** Finds components matching any of the given types */
58
- findComponentsByTypes(componentsTree: ClBaseComponentI[], types: ClComponentType[]): ClBaseComponentI[];
59
- /** Finds components matching the given name */
60
- findComponentsByName(componentsTree: ClBaseComponentI[], name: string): ClBaseComponentI[];
61
- /** Finds components matching any of the given names */
62
- findComponentsByNames(componentsTree: ClBaseComponentI[], names: string[]): ClBaseComponentI[];
63
- /** Returns external start-gaming components based on manifest configuration */
64
- getExternalStartGamingComponents(componentsTree: ClBaseComponentI[], manifests: ComponentManifestI[]): ClBaseComponentI[];
65
- }
@@ -1,89 +0,0 @@
1
- import {PropPathConditionCallbackI} from './PropPathCondition.interface';
2
-
3
- /**
4
- * Base interface for floating control manifest items.
5
- * Floating controls appear around selected components in the editor.
6
- */
7
- export interface BaseFloatingControlManifestModelI {
8
- type: FloatingControlManifestModelType;
9
- name?: FloatingControlManifestModelName;
10
- propPath?: string[];
11
- element?: string;
12
- elementProp?: string;
13
- elementSubProp?: string;
14
- /** Callback that dynamically resolves the property path based on component context */
15
- propPathCondition?: PropPathConditionCallbackI;
16
- /** Child controls */
17
- children?: BaseFloatingControlManifestModelI[];
18
- /** Control-specific parameters */
19
- params?: any;
20
- }
21
-
22
- /**
23
- * Floating control item types.
24
- */
25
- export enum FloatingControlManifestModelType {
26
- /** Group container for controls */
27
- GROUP = 'GROUP',
28
- /** Individual control */
29
- CONTROL = 'CONTROL',
30
- }
31
-
32
- /**
33
- * Predefined floating control names.
34
- */
35
- export enum FloatingControlManifestModelName {
36
- SIZE = 'SIZE',
37
- MARGIN = 'MARGIN',
38
- PARENT_ALIGNMENT = 'PARENT_ALIGNMENT',
39
- CONTAINER_PADDING = 'CONTAINER_PADDING',
40
- SLIDES_MANAGEMENT = 'SLIDES_MANAGEMENT',
41
- COLUMNS_PROPORTIONS = 'COLUMNS_PROPORTIONS',
42
- VIEW_SWITCHER = 'VIEW_SWITCHER',
43
- ROTATION = 'ROTATION',
44
- }
45
-
46
- export interface GroupFloatingControlManifestModelI extends BaseFloatingControlManifestModelI {
47
- children: BaseFloatingControlManifestModelI[];
48
- }
49
-
50
- export interface SizeFloatingControlManifestModelI extends BaseFloatingControlManifestModelI {
51
- params?: {
52
- width?: SizeDimensionFloatingControlManifestParamsI;
53
- height?: SizeDimensionFloatingControlManifestParamsI;
54
- rotation?: RotationFloatingControlManifestParamsI;
55
- };
56
- }
57
-
58
- export interface SizeDimensionFloatingControlManifestParamsI {
59
- hide?: boolean;
60
- getValueFromElement?: string;
61
- minValue?: number;
62
- element?: string;
63
- elementProp?: string;
64
- propPath?: string;
65
- }
66
-
67
- export interface RotationFloatingControlManifestParamsI {
68
- element?: string;
69
- elementProp?: string;
70
- }
71
-
72
- export interface ColumnsProportionsFloatingControlManifestModelI extends BaseFloatingControlManifestModelI {
73
- params?: ColumnsProportionsFloatingControlManifestParamsI;
74
- }
75
-
76
- export interface ColumnsProportionsFloatingControlManifestParamsI {
77
- parent?: boolean;
78
- }
79
-
80
- export interface ViewSwitcherFloatingControlsManifestModelI extends BaseFloatingControlManifestModelI {
81
- params: {
82
- views: ViewSwitcherFloatingControlsManifestViewI[];
83
- }
84
- }
85
-
86
- export interface ViewSwitcherFloatingControlsManifestViewI {
87
- label: string;
88
- value: string;
89
- }
@@ -1,4 +0,0 @@
1
- import {DisplayConditionSdkI} from './DisplayCondition.interface';
2
-
3
- /** Callback that dynamically resolves the property path for a control based on component context */
4
- export type PropPathConditionCallbackI = (sdk: DisplayConditionSdkI) => object;