@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,625 +0,0 @@
1
- import {AnyHiddenFieldSharedI} from './hidden-fields.interface';
2
-
3
- /**
4
- * Root document structure containing views and shared configuration.
5
- */
6
- export interface ClDocumentI {
7
- /** Array of view components (pages/screens) */
8
- views: ClBaseComponentI[];
9
- /** Shared document configuration and styling */
10
- shared: ClDocumentSharedI;
11
- }
12
-
13
- /**
14
- * Base interface for all component models in the document tree.
15
- */
16
- export interface ClBaseComponentI {
17
- /** Unique component identifier */
18
- id: string;
19
- /** Position path in the component tree (array of indices) */
20
- path: number[];
21
- /** Component type identifier */
22
- type: ClComponentType;
23
- /** Component version string */
24
- version: string;
25
- /** Component properties and configuration */
26
- props: ClBaseComponentPropsI;
27
- /** Component name for registration */
28
- name: string;
29
- /** Display label (used for views) */
30
- label?: string;
31
- /** Child components */
32
- children?: ClBaseComponentI[];
33
- /** @internal Runtime reference to the rendered component instance */
34
- componentRef?: any;
35
- /** If true, clicking focuses the parent instead */
36
- focusParentOnClick?: boolean;
37
- /** If true, prevents drag-and-drop on this component */
38
- preventDraggable?: boolean;
39
- /** If true, removing this component removes children recursively */
40
- recursiveRemove?: boolean;
41
- }
42
-
43
- /**
44
- * Enumeration of component types in the widget system.
45
- */
46
- export enum ClComponentType {
47
- VIEW = 'VIEW',
48
- CONTAINER = 'CONTAINER',
49
- TEXT = 'TEXT',
50
- INPUT = 'INPUT',
51
- BUTTON = 'BUTTON',
52
- IMAGE = 'IMAGE',
53
- CONSENT = 'CONSENT',
54
- COUNTDOWN_TIMER = 'COUNTDOWN_TIMER',
55
- PROMO_CODE = 'PROMO_CODE',
56
- MULTIPLE_INPUT = 'MULTIPLE_INPUT',
57
- VIDEO = 'VIDEO',
58
- SLIDER = 'SLIDER',
59
- SLIDE = 'SLIDE',
60
- SOCIAL = 'SOCIAL',
61
- COLUMNS = 'COLUMNS',
62
- COLUMN = 'COLUMN',
63
- PRIZE_BASED_GAMING = 'PRIZE_BASED_GAMING',
64
- }
65
-
66
- /**
67
- * Component properties interface with styling, handlers, and content.
68
- */
69
- export interface ClBaseComponentPropsI {
70
- /** Platform-specific styles (desktop/mobile) */
71
- adaptiveStyles?: BaseComponentAdaptiveStylesI;
72
- /** Environment-independent styles */
73
- styles?: ClBaseComponentElementParamsI[];
74
- /** Event handlers attached to the component */
75
- handlers?: ClDocumentHandlerI[];
76
- /** Content configuration (text, images, etc.) */
77
- content?: any;
78
- /** Form control configuration */
79
- control?: any;
80
- /** If true, component responds to viewport changes
81
- * @internal
82
- * */
83
- isResponsive?: boolean;
84
- /** If true, alignment options are restricted */
85
- isAlignRestricted?: boolean;
86
- /** If true, component floats above other content */
87
- floating?: boolean;
88
- }
89
-
90
- /**
91
- * Platform-specific style configurations.
92
- */
93
- export interface BaseComponentAdaptiveStylesI {
94
- /** Desktop viewport styles */
95
- desktop: ClBaseComponentElementParamsI[];
96
- /** Mobile viewport styles */
97
- mobile: ClBaseComponentElementParamsI[];
98
- }
99
-
100
- /**
101
- * Element styling parameters for a single element within a component.
102
- */
103
- export interface ClBaseComponentElementParamsI {
104
- /** Element identifier (e.g., 'host', 'button', 'label') */
105
- element: string;
106
- /** CSS style properties */
107
- styleAttributes: ClComponentStyleAttributesI;
108
- /** Styles applied on hover */
109
- hoverStyleAttributes?: ClComponentStyleAttributesI;
110
- /** Type of hover animation */
111
- hoverAnimationType?: string;
112
- /** Styles for placeholder text (inputs) */
113
- placeholderStyleAttributes?: ClComponentStyleAttributesI;
114
- /** Styles for list markers */
115
- markerStyleAttributes?: ClComponentStyleAttributesI;
116
- /** Additional element parameters */
117
- params?: any;
118
- /** CSS class names to apply */
119
- classes?: string;
120
- }
121
-
122
- /**
123
- * Map of CSS style property names to values.
124
- */
125
- export interface ClComponentStyleAttributesI {
126
- [key: string]: string;
127
- }
128
-
129
- /**
130
- * Event handler configuration for a component.
131
- */
132
- export interface ClDocumentHandlerI {
133
- /** Type of event to handle */
134
- type: ClDocumentHandlerType;
135
- /** Actions to execute when event fires */
136
- actions: ClDocumentActionI[];
137
- /** Optional CSS selector for targeting child elements */
138
- relativeSelector?: string;
139
- }
140
-
141
- /**
142
- * Enumeration of handler event types.
143
- */
144
- export enum ClDocumentHandlerType {
145
- CLICK = 'CLICK',
146
- }
147
-
148
- /**
149
- * Action configuration for event handlers.
150
- * @typeParam T - Type of action parameters
151
- */
152
- export interface ClDocumentActionI<T = any> {
153
- /** Action type identifier */
154
- type: ClDocumentActionType;
155
- /** Action-specific parameters */
156
- params?: T;
157
- }
158
-
159
- /**
160
- * Enumeration of available action types.
161
- */
162
- export enum ClDocumentActionType {
163
- SHOW_WIDGET = 'SHOW_WIDGET',
164
- OPEN_LINK = 'OPEN_LINK',
165
- SUBSCRIBE_CONTACT = 'SUBSCRIBE_CONTACT',
166
- REQUEST = 'REQUEST',
167
- CLOSE_WIDGET = 'CLOSE_WIDGET',
168
- GO_TO_VIEW = 'GO_TO_VIEW',
169
- GO_TO_PREVIOUS_VIEW = 'GO_TO_PREVIOUS_VIEW',
170
- GO_TO_NEXT_VIEW = 'GO_TO_NEXT_VIEW',
171
- CLICK = 'CLICK'
172
- }
173
-
174
- /**
175
- * Union type of all possible action parameter types.
176
- */
177
- export type ClDocumentActionParams = ClDocumentOpenLinkActionParamsI |
178
- ClDocumentGoToViewActionParamsI |
179
- ClDocumentGoToNextViewActionParamsI |
180
- ClDocumentGoToPreviousViewActionParamsI |
181
- ClDocumentCloseWidgetActionParamsI |
182
- ClDocumentShowWidgetActionParamsI |
183
- ClDocumentRequestActionParamsI;
184
-
185
- /**
186
- * Parameters for the OPEN_LINK action.
187
- */
188
- export interface ClDocumentOpenLinkActionParamsI {
189
- /** URL to open */
190
- link: string;
191
- /** Target window for the link */
192
- target: ClDocumentOpenLinkActionTarget;
193
- /** If true, merge tags in the URL are processed */
194
- tagsEnabled: boolean;
195
- /** Additional tracking parameters */
196
- trackClickParams?: { [key: string]: string };
197
- /** Custom data to pass with the action */
198
- customData?: string;
199
- /** If true, counts as a conversion/target action */
200
- countAsTargetAction?: boolean;
201
- }
202
-
203
- /**
204
- * Link target options.
205
- */
206
- export enum ClDocumentOpenLinkActionTarget {
207
- /** Open in same window */
208
- SELF = '_self',
209
- /** Open in new tab/window */
210
- BLANK = '_blank',
211
- }
212
-
213
- /**
214
- * Parameters for navigating to a specific view.
215
- */
216
- export interface ClDocumentGoToViewActionParamsI {
217
- /** Target view identifier */
218
- viewId: string;
219
- /** If true, tracks the navigation click */
220
- trackClick?: boolean;
221
- /** Additional tracking parameters */
222
- trackClickParams?: { [key: string]: string };
223
- /** If true, counts as a conversion/target action */
224
- countAsTargetAction?: boolean;
225
- }
226
-
227
- /**
228
- * Parameters for navigating to the next view.
229
- */
230
- export interface ClDocumentGoToNextViewActionParamsI {
231
- /** If true, tracks the navigation click */
232
- trackClick?: boolean;
233
- /** Additional tracking parameters */
234
- trackClickParams?: { [key: string]: string };
235
- }
236
-
237
- /**
238
- * Parameters for navigating to the previous view.
239
- */
240
- export interface ClDocumentGoToPreviousViewActionParamsI {
241
- /** If true, tracks the navigation click */
242
- trackClick?: boolean;
243
- /** Additional tracking parameters */
244
- trackClickParams?: { [key: string]: string };
245
- /** If true, counts as a conversion/target action */
246
- countAsTargetAction?: boolean;
247
- }
248
-
249
- /**
250
- * Parameters for closing the widget.
251
- */
252
- export interface ClDocumentCloseWidgetActionParamsI {
253
- /** Additional tracking parameters */
254
- trackClickParams?: { [key: string]: string };
255
- /** If true, counts as a conversion/target action */
256
- countAsTargetAction?: boolean;
257
- }
258
-
259
- /**
260
- * Parameters for showing another widget.
261
- */
262
- export interface ClDocumentShowWidgetActionParamsI {
263
- /** Variant ID of the widget to show */
264
- variantId?: number;
265
- /** If true, closes current widget when showing the new one */
266
- closeWidget?: boolean;
267
- /** If true, counts as a conversion/target action */
268
- countAsTargetAction?: boolean;
269
- }
270
-
271
- /**
272
- * Parameters for the request/submit action.
273
- */
274
- export interface ClDocumentRequestActionParamsI {
275
- /** If true, counts as a conversion/target action */
276
- countAsTargetAction?: boolean;
277
- }
278
-
279
- export enum DefaultSchemaTokens {
280
- ACCENT = 'accent',
281
- }
282
-
283
- export type ThemeColorSchemaI = Record<string, string>;
284
-
285
- export interface ThemeI {
286
- schema: ThemeColorSchemaI;
287
- }
288
-
289
- /**
290
- * Shared document configuration applied across all views.
291
- */
292
- export interface ClDocumentSharedI {
293
- /** Font family for headers */
294
- headerFontFamily: string;
295
- /** Font family for body text */
296
- textFontFamily: string;
297
- /** Predefined text style classes */
298
- textClasses: { [key: string]: ClDocumentSharedTextClassI };
299
- /** Google Fonts to load */
300
- googleFonts: string[];
301
- /** Floating box layout configuration */
302
- floatingBox?: ClFloatingBoxParamsI;
303
- /** Floating bar layout configuration */
304
- floatingBar?: ClFloatingBarParamsI;
305
- /** Launcher configuration */
306
- launcher?: ClLauncherParamsI;
307
- /** Dialog/modal configuration */
308
- dialog?: ClDialogParamsI;
309
- /** Close button configuration */
310
- closeIcon?: ClCloseButtonParamsI;
311
- /** Active color schema name */
312
- colorSchemaName?: string;
313
- /** CSS custom properties (variables) */
314
- cssVars?: ClDocumentCssVarsI;
315
- /** Actual rendered sizes per view */
316
- actualSize?: ClDocumentActualSizeI[];
317
- /** Link styling parameters */
318
- linkParams?: ClDocumentLinkParamsI;
319
- /** Breakpoint width for mobile/desktop switch */
320
- mobileBreakpointWidth?: number;
321
- /** CSS z-index for the widget */
322
- zIndex?: number;
323
- /** Theme configuration */
324
- theme?: ThemeI;
325
- /** Apply styles and positions to the content inside an overlay. */
326
- overlay?: ClDocumentOverlayI;
327
- /** Hidden form fields whose values are resolved at runtime from a configured source (such as static value, data layer, URL, etc.) and submitted with the form. */
328
- hiddenFields?: AnyHiddenFieldSharedI[];
329
- /** Post-submit behavior: either run a configured action, or navigate to a view based on the backend response. */
330
- submitActionParams?: ClSubmitActionParamsI;
331
- }
332
-
333
- export interface ClSubmitActionParamsI {
334
- successViewId?: string | null;
335
- errorViewId?: string | null;
336
- alreadySubscribedViewId?: string | null;
337
- runAction?: ClDocumentActionI | null;
338
- }
339
-
340
- export interface ClDocumentOverlayI {
341
- /** Desktop positioning */
342
- desktop: ClDocumentOverlayEnvironmentParamsI;
343
- /** Mobile positioning */
344
- mobile: ClDocumentOverlayEnvironmentParamsI;
345
- /** Overlay styles */
346
- styles: ClDocumentOverlayStylesI;
347
- }
348
-
349
- export interface ClDocumentOverlayEnvironmentParamsI {
350
- /** Vertical position */
351
- verticalPosition: ClWidgetVerticalPosition;
352
- /** Horizontal position */
353
- horizontalPosition: ClWidgetHorizontalPosition;
354
- /** Vertical offset from position */
355
- verticalOffset: string;
356
- /** Horizontal offset from position */
357
- horizontalOffset: string;
358
- }
359
-
360
- export interface ClDocumentOverlayStylesI {
361
- /** Background color, gradient or image */
362
- background: string;
363
- /** Background blur or similar effects */
364
- backdropFilter: string;
365
- /** Whether the background image is sourced from an external URL */
366
- externalBackgroundUrlSource?: boolean;
367
- }
368
-
369
- /**
370
- * Dialog/modal background configuration.
371
- */
372
- export interface ClDialogParamsI {
373
- /** Background color or style */
374
- background: string;
375
- }
376
-
377
- /**
378
- * Shared text style class definition.
379
- */
380
- export interface ClDocumentSharedTextClassI {
381
- /** Unique class identifier */
382
- id: string;
383
- /** Display name of the class */
384
- name: string;
385
- /** If true, this is a header style */
386
- isHeader: boolean;
387
- /** CSS style attributes */
388
- styleAttributes: any;
389
- /** Placeholder text styles */
390
- placeholderStyleAttributes?: any;
391
- }
392
-
393
- /**
394
- * Floating box positioning parameters.
395
- */
396
- export interface ClFloatingBoxParamsI {
397
- /** Vertical position on desktop */
398
- verticalPosition: ClWidgetVerticalPosition;
399
- /** Horizontal position on desktop */
400
- horizontalPosition: ClWidgetHorizontalPosition;
401
- /** Vertical offset from position */
402
- verticalOffset: string;
403
- /** Horizontal offset from position */
404
- horizontalOffset: string;
405
- /** Mobile-specific positioning */
406
- mobile: ClFloatingBoxEnvironmentParamsI;
407
- }
408
-
409
- /**
410
- * Vertical position options for widgets.
411
- */
412
- export enum ClWidgetVerticalPosition {
413
- TOP = 'TOP',
414
- CENTER = 'CENTER',
415
- BOTTOM = 'BOTTOM',
416
- }
417
-
418
- /**
419
- * Horizontal position options for widgets.
420
- */
421
- export enum ClWidgetHorizontalPosition {
422
- LEFT = 'LEFT',
423
- CENTER = 'CENTER',
424
- RIGHT = 'RIGHT',
425
- }
426
-
427
- /**
428
- * Environment-specific floating box positioning.
429
- */
430
- export interface ClFloatingBoxEnvironmentParamsI {
431
- /** Vertical position */
432
- verticalPosition: ClWidgetVerticalPosition;
433
- /** Horizontal position */
434
- horizontalPosition: ClWidgetHorizontalPosition;
435
- /** Vertical offset from position */
436
- verticalOffset: string;
437
- /** Horizontal offset from position */
438
- horizontalOffset: string;
439
- }
440
-
441
- /**
442
- * Floating bar positioning parameters.
443
- */
444
- export interface ClFloatingBarParamsI {
445
- /** Desktop positioning */
446
- desktop: ClFloatingBarEnvironmentParamsI;
447
- /** Mobile positioning */
448
- mobile: ClFloatingBarEnvironmentParamsI;
449
- }
450
-
451
- /**
452
- * Environment-specific floating bar positioning.
453
- */
454
- export interface ClFloatingBarEnvironmentParamsI {
455
- /** Vertical position */
456
- verticalPosition: ClWidgetVerticalPosition;
457
- /** Horizontal position */
458
- horizontalPosition: ClWidgetHorizontalPosition;
459
- /** Vertical offset from position */
460
- verticalOffset: string;
461
- /** Horizontal offset from position */
462
- horizontalOffset: string;
463
- }
464
-
465
- /**
466
- * Launcher widget configuration.
467
- */
468
- export interface ClLauncherParamsI {
469
- /** Desktop positioning */
470
- desktop: ClLauncherEnvironmentParamsI;
471
- /** Mobile positioning */
472
- mobile: ClLauncherEnvironmentParamsI;
473
- /** Entry animation configuration */
474
- entryAnimation: ClLauncherEntryAnimationI;
475
- /** Loop animation configuration */
476
- loopAnimation: ClLoopAnimationI;
477
- }
478
-
479
- /**
480
- * Environment-specific launcher positioning.
481
- */
482
- export interface ClLauncherEnvironmentParamsI {
483
- /** Vertical position */
484
- verticalPosition: ClWidgetVerticalPosition;
485
- /** Horizontal position */
486
- horizontalPosition: ClWidgetHorizontalPosition;
487
- /** Vertical offset from position */
488
- verticalOffset: string;
489
- /** Horizontal offset from position */
490
- horizontalOffset: string;
491
- }
492
-
493
- /**
494
- * Launcher entry animation configuration.
495
- */
496
- export interface ClLauncherEntryAnimationI {
497
- /** Animation type or null for no animation */
498
- type: ClLauncherEntryAnimationType | null;
499
- }
500
-
501
- /**
502
- * Launcher entry animation types.
503
- */
504
- export enum ClLauncherEntryAnimationType {
505
- SLIDE_TO_TOP = 'SLIDE_TO_TOP',
506
- SLIDE_TO_BOTTOM = 'SLIDE_TO_BOTTOM',
507
- SLIDE_TO_LEFT = 'SLIDE_TO_LEFT',
508
- SLIDE_TO_RIGHT = 'SLIDE_TO_RIGHT',
509
- }
510
-
511
- /**
512
- * Loop animation configuration.
513
- */
514
- export interface ClLoopAnimationI {
515
- /** Animation type or null for no animation */
516
- type: ClLoopAnimationType | null;
517
- /** Animation-specific parameters */
518
- params?: any;
519
- }
520
-
521
- /**
522
- * Available loop animation types.
523
- */
524
- export enum ClLoopAnimationType {
525
- PULSE = 'PULSE',
526
- VIBRATE = 'VIBRATE',
527
- WOBBLE = 'WOBBLE',
528
- SHAKE = 'SHAKE',
529
- JELLO = 'JELLO',
530
- BOUNCE = 'BOUNCE',
531
- BLINK = 'BLINK',
532
- FLICKER = 'FLICKER',
533
- PING = 'PING',
534
- }
535
-
536
- /**
537
- * Close button configuration.
538
- */
539
- export interface ClCloseButtonParamsI {
540
- /** Desktop close button settings */
541
- desktop?: ClCloseButtonEnvironmentParamsI;
542
- /** Mobile close button settings */
543
- mobile?: ClCloseButtonEnvironmentParamsI;
544
- /** View IDs where close button should be shown */
545
- showOnViews?: string[];
546
- /** If true, close button is enabled */
547
- enabled?: boolean;
548
- }
549
-
550
- /**
551
- * Environment-specific close button configuration.
552
- */
553
- export interface ClCloseButtonEnvironmentParamsI extends ClIconEnvironmentParamsI {
554
- /** Vertical offset from position */
555
- verticalOffset: string;
556
- /** Horizontal offset from position */
557
- horizontalOffset: string;
558
- /** Button width */
559
- width: string;
560
- /** Button height */
561
- height: string;
562
- /** Horizontal position */
563
- horizontalPosition: ClCloseButtonHorizontalPosition;
564
- }
565
-
566
- /**
567
- * Icon configuration for buttons.
568
- */
569
- export interface ClIconEnvironmentParamsI {
570
- /** Icon content (index for default, URL for custom) */
571
- content: string;
572
- /** If true, uses a default icon */
573
- defaultIcon: boolean;
574
- /** Icon color */
575
- color?: string;
576
- /** Icon size */
577
- size?: number;
578
- }
579
-
580
- /**
581
- * Close button horizontal position options.
582
- */
583
- export enum ClCloseButtonHorizontalPosition {
584
- LEFT = 'LEFT',
585
- RIGHT = 'RIGHT',
586
- }
587
-
588
- /**
589
- * CSS custom properties (variables) map.
590
- */
591
- export interface ClDocumentCssVarsI {
592
- [key: string]: string;
593
- }
594
-
595
- /**
596
- * Actual rendered size of a view.
597
- */
598
- export interface ClDocumentActualSizeI {
599
- /** View identifier */
600
- viewId: string;
601
- /** Desktop dimensions */
602
- desktop: ClDocumentEnvironmentActualSize;
603
- /** Mobile dimensions */
604
- mobile: ClDocumentEnvironmentActualSize;
605
- }
606
-
607
- /**
608
- * Environment-specific actual size dimensions.
609
- */
610
- export interface ClDocumentEnvironmentActualSize {
611
- /** Width value */
612
- width: string;
613
- /** Height value */
614
- height: string;
615
- }
616
-
617
- /**
618
- * Link styling parameters.
619
- */
620
- export interface ClDocumentLinkParamsI {
621
- /** Link color */
622
- color?: string;
623
- /** If true, removes underline from links */
624
- removeUnderline?: boolean;
625
- }