@claspo/common 7.3.1-dev.4 → 7.3.2

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 (228) hide show
  1. package/{out/component-manifest → component-manifest}/PropertyPaneManifest.interface.d.ts +7 -0
  2. package/component-manifest/PropertyPaneManifest.interface.js +1 -0
  3. package/{out/document → document}/Document.interface.d.ts +7 -0
  4. package/document/autofill.interface.d.ts +6 -0
  5. package/document/autofill.interface.js +1 -0
  6. package/document/hidden-fields.interface.d.ts +15 -0
  7. package/document/hidden-fields.interface.js +1 -0
  8. package/document/source.interface.d.ts +32 -0
  9. package/package.json +2 -2
  10. package/velocity/SysVelocityRenderer.js +1 -0
  11. package/coverage/lcov-report/block-navigation.js +0 -87
  12. package/coverage/lcov-report/prettify.js +0 -2
  13. package/coverage/lcov-report/sorter.js +0 -196
  14. package/jest.config.ts +0 -204
  15. package/out/component-manifest/PropertyPaneManifest.interface.js +0 -1
  16. package/out/document/hidden-fields.interface.d.ts +0 -46
  17. package/out/package.json +0 -50
  18. package/out/velocity/SysVelocityRenderer.js +0 -1
  19. package/src/DefaultEventEmitter.test.ts +0 -84
  20. package/src/DefaultEventEmitter.ts +0 -96
  21. package/src/HttpAbortableLoader.ts +0 -35
  22. package/src/InAppLayoutType.ts +0 -6
  23. package/src/LayoutType.ts +0 -18
  24. package/src/PrizePool.interface.ts +0 -32
  25. package/src/RenderMode.ts +0 -10
  26. package/src/UuidGenerator.ts +0 -16
  27. package/src/WidgetInitConfig.interface.ts +0 -163
  28. package/src/WidgetType.ts +0 -18
  29. package/src/action/type.ts +0 -7
  30. package/src/async/createAsyncIterator.ts +0 -33
  31. package/src/async/debounce.ts +0 -28
  32. package/src/async/timeout.ts +0 -3
  33. package/src/component-manifest/ComponentManifest.interface.ts +0 -160
  34. package/src/component-manifest/ContextMenuManifest.interface.ts +0 -52
  35. package/src/component-manifest/DisplayCondition.interface.ts +0 -65
  36. package/src/component-manifest/FloatingControlManifest.interface.ts +0 -89
  37. package/src/component-manifest/PropPathCondition.interface.ts +0 -4
  38. package/src/component-manifest/PropertyPaneManifest.interface.ts +0 -614
  39. package/src/converter/time/TimeConverter.spec.ts +0 -11
  40. package/src/converter/time/TimeUnit.spec.ts +0 -12
  41. package/src/converter/time/TimeUnit.ts +0 -34
  42. package/src/converter/time/TimerConverter.ts +0 -29
  43. package/src/document/ComponentInsertType.ts +0 -6
  44. package/src/document/Document.interface.ts +0 -625
  45. package/src/document/DocumentCssVarsReplace.test.ts +0 -2947
  46. package/src/document/DocumentCssVarsReplace.ts +0 -31
  47. package/src/document/DocumentUtils.test.ts +0 -595
  48. package/src/document/DocumentUtils.ts +0 -194
  49. package/src/document/hidden-fields.interface.ts +0 -54
  50. package/src/dom/ViewportSize.ts +0 -61
  51. package/src/dom/copyToClipboard.ts +0 -17
  52. package/src/dom/getMostNestedNode.ts +0 -9
  53. package/src/dom/insertHtmlIntoElement.ts +0 -36
  54. package/src/dom/sanitizeHTML.test.ts +0 -59
  55. package/src/dom/sanitizeHTML.ts +0 -78
  56. package/src/element/BaseElementInViewportHandler.ts +0 -41
  57. package/src/element/CssVarsOperations.ts +0 -37
  58. package/src/element/ThemeCssVars.ts +0 -28
  59. package/src/element/recursiveFindParentNodeByAttribute.test.ts +0 -63
  60. package/src/element/recursiveFindParentNodeByAttribute.ts +0 -25
  61. package/src/flat.ts +0 -16
  62. package/src/handler/HandlerTypes.ts +0 -4
  63. package/src/math/RandomDistributor.test.ts +0 -35
  64. package/src/math/RandomDistributor.ts +0 -58
  65. package/src/math/sum.ts +0 -3
  66. package/src/network/HttpClient.ts +0 -28
  67. package/src/network/HttpStatus.ts +0 -4
  68. package/src/object/isDictionary.test.ts +0 -24
  69. package/src/object/isDictionary.ts +0 -13
  70. package/src/object/omitKeys.test.ts +0 -19
  71. package/src/object/omitKeys.ts +0 -20
  72. package/src/storage/BaseCachingStorage.test.ts +0 -70
  73. package/src/storage/BaseCachingStorage.ts +0 -37
  74. package/src/storage/CachingCookieStorage.test.ts +0 -75
  75. package/src/storage/CachingCookieStorage.ts +0 -36
  76. package/src/storage/CachingLocalStorage.test.ts +0 -59
  77. package/src/storage/CachingLocalStorage.ts +0 -34
  78. package/src/storage/getCookie.test.ts +0 -53
  79. package/src/storage/getCookie.ts +0 -10
  80. package/src/storage/setCookie.test.ts +0 -97
  81. package/src/storage/setCookie.ts +0 -49
  82. package/src/theme/theme.utils.ts +0 -50
  83. package/src/url/sanitizeUrl.test.ts +0 -62
  84. package/src/url/sanitizeUrl.ts +0 -51
  85. package/src/utils/CaseTransformer.test.ts +0 -16
  86. package/src/utils/CaseTransformer.ts +0 -10
  87. package/src/utils/NullishCoalescingOperator.ts +0 -3
  88. package/src/utils/NumericDecline.ts +0 -25
  89. package/src/utils/addEventListener.ts +0 -23
  90. package/src/utils/allSettled.ts +0 -6
  91. package/src/utils/checkTimeZone.spec.ts +0 -18
  92. package/src/utils/checkTimeZone.ts +0 -6
  93. package/src/utils/deviceUtils.ts +0 -12
  94. package/src/utils/flatMap.test.ts +0 -21
  95. package/src/utils/flatMap.ts +0 -3
  96. package/src/utils/fromEntries.ts +0 -6
  97. package/src/utils/generateRandomNumber.test.ts +0 -23
  98. package/src/utils/generateRandomNumber.ts +0 -3
  99. package/src/utils/objectSort.ts +0 -41
  100. package/src/utils/orientationUtils.ts +0 -18
  101. package/src/velocity/SysVelocityContext.spec.ts +0 -88
  102. package/src/velocity/SysVelocityContext.ts +0 -129
  103. package/src/velocity/SysVelocityRenderer.spec.ts +0 -36
  104. package/src/velocity/SysVelocityRenderer.ts +0 -11
  105. package/test/__mocks/jestGlobalMocks.js +0 -1887
  106. /package/{out/DefaultEventEmitter.d.ts → DefaultEventEmitter.d.ts} +0 -0
  107. /package/{out/DefaultEventEmitter.js → DefaultEventEmitter.js} +0 -0
  108. /package/{out/HttpAbortableLoader.d.ts → HttpAbortableLoader.d.ts} +0 -0
  109. /package/{out/HttpAbortableLoader.js → HttpAbortableLoader.js} +0 -0
  110. /package/{out/InAppLayoutType.d.ts → InAppLayoutType.d.ts} +0 -0
  111. /package/{out/InAppLayoutType.js → InAppLayoutType.js} +0 -0
  112. /package/{out/LayoutType.d.ts → LayoutType.d.ts} +0 -0
  113. /package/{out/LayoutType.js → LayoutType.js} +0 -0
  114. /package/{out/PrizePool.interface.d.ts → PrizePool.interface.d.ts} +0 -0
  115. /package/{out/PrizePool.interface.js → PrizePool.interface.js} +0 -0
  116. /package/{out/RenderMode.d.ts → RenderMode.d.ts} +0 -0
  117. /package/{out/RenderMode.js → RenderMode.js} +0 -0
  118. /package/{out/UuidGenerator.d.ts → UuidGenerator.d.ts} +0 -0
  119. /package/{out/UuidGenerator.js → UuidGenerator.js} +0 -0
  120. /package/{out/WidgetInitConfig.interface.d.ts → WidgetInitConfig.interface.d.ts} +0 -0
  121. /package/{out/WidgetInitConfig.interface.js → WidgetInitConfig.interface.js} +0 -0
  122. /package/{out/WidgetType.d.ts → WidgetType.d.ts} +0 -0
  123. /package/{out/WidgetType.js → WidgetType.js} +0 -0
  124. /package/{out/action → action}/type.d.ts +0 -0
  125. /package/{out/action → action}/type.js +0 -0
  126. /package/{out/async → async}/createAsyncIterator.d.ts +0 -0
  127. /package/{out/async → async}/createAsyncIterator.js +0 -0
  128. /package/{out/async → async}/debounce.d.ts +0 -0
  129. /package/{out/async → async}/debounce.js +0 -0
  130. /package/{out/async → async}/timeout.d.ts +0 -0
  131. /package/{out/async → async}/timeout.js +0 -0
  132. /package/{out/component-manifest → component-manifest}/ComponentManifest.interface.d.ts +0 -0
  133. /package/{out/component-manifest → component-manifest}/ComponentManifest.interface.js +0 -0
  134. /package/{out/component-manifest → component-manifest}/ContextMenuManifest.interface.d.ts +0 -0
  135. /package/{out/component-manifest → component-manifest}/ContextMenuManifest.interface.js +0 -0
  136. /package/{out/component-manifest → component-manifest}/DisplayCondition.interface.d.ts +0 -0
  137. /package/{out/component-manifest → component-manifest}/DisplayCondition.interface.js +0 -0
  138. /package/{out/component-manifest → component-manifest}/FloatingControlManifest.interface.d.ts +0 -0
  139. /package/{out/component-manifest → component-manifest}/FloatingControlManifest.interface.js +0 -0
  140. /package/{out/component-manifest → component-manifest}/PropPathCondition.interface.d.ts +0 -0
  141. /package/{out/component-manifest → component-manifest}/PropPathCondition.interface.js +0 -0
  142. /package/{out/converter → converter}/time/TimeUnit.d.ts +0 -0
  143. /package/{out/converter → converter}/time/TimeUnit.js +0 -0
  144. /package/{out/converter → converter}/time/TimerConverter.d.ts +0 -0
  145. /package/{out/converter → converter}/time/TimerConverter.js +0 -0
  146. /package/{out/document → document}/ComponentInsertType.d.ts +0 -0
  147. /package/{out/document → document}/ComponentInsertType.js +0 -0
  148. /package/{out/document → document}/Document.interface.js +0 -0
  149. /package/{out/document → document}/DocumentCssVarsReplace.d.ts +0 -0
  150. /package/{out/document → document}/DocumentCssVarsReplace.js +0 -0
  151. /package/{out/document → document}/DocumentUtils.d.ts +0 -0
  152. /package/{out/document → document}/DocumentUtils.js +0 -0
  153. /package/{out/document/hidden-fields.interface.js → document/source.interface.js} +0 -0
  154. /package/{out/dom → dom}/ViewportSize.d.ts +0 -0
  155. /package/{out/dom → dom}/ViewportSize.js +0 -0
  156. /package/{out/dom → dom}/copyToClipboard.d.ts +0 -0
  157. /package/{out/dom → dom}/copyToClipboard.js +0 -0
  158. /package/{out/dom → dom}/getMostNestedNode.d.ts +0 -0
  159. /package/{out/dom → dom}/getMostNestedNode.js +0 -0
  160. /package/{out/dom → dom}/insertHtmlIntoElement.d.ts +0 -0
  161. /package/{out/dom → dom}/insertHtmlIntoElement.js +0 -0
  162. /package/{out/dom → dom}/sanitizeHTML.d.ts +0 -0
  163. /package/{out/dom → dom}/sanitizeHTML.js +0 -0
  164. /package/{out/element → element}/BaseElementInViewportHandler.d.ts +0 -0
  165. /package/{out/element → element}/BaseElementInViewportHandler.js +0 -0
  166. /package/{out/element → element}/CssVarsOperations.d.ts +0 -0
  167. /package/{out/element → element}/CssVarsOperations.js +0 -0
  168. /package/{out/element → element}/ThemeCssVars.d.ts +0 -0
  169. /package/{out/element → element}/ThemeCssVars.js +0 -0
  170. /package/{out/element → element}/recursiveFindParentNodeByAttribute.d.ts +0 -0
  171. /package/{out/element → element}/recursiveFindParentNodeByAttribute.js +0 -0
  172. /package/{out/flat.d.ts → flat.d.ts} +0 -0
  173. /package/{out/flat.js → flat.js} +0 -0
  174. /package/{out/handler → handler}/HandlerTypes.d.ts +0 -0
  175. /package/{out/handler → handler}/HandlerTypes.js +0 -0
  176. /package/{out/math → math}/RandomDistributor.d.ts +0 -0
  177. /package/{out/math → math}/RandomDistributor.js +0 -0
  178. /package/{out/math → math}/sum.d.ts +0 -0
  179. /package/{out/math → math}/sum.js +0 -0
  180. /package/{out/network → network}/HttpClient.d.ts +0 -0
  181. /package/{out/network → network}/HttpClient.js +0 -0
  182. /package/{out/network → network}/HttpStatus.d.ts +0 -0
  183. /package/{out/network → network}/HttpStatus.js +0 -0
  184. /package/{out/object → object}/isDictionary.d.ts +0 -0
  185. /package/{out/object → object}/isDictionary.js +0 -0
  186. /package/{out/object → object}/omitKeys.d.ts +0 -0
  187. /package/{out/object → object}/omitKeys.js +0 -0
  188. /package/{out/storage → storage}/BaseCachingStorage.d.ts +0 -0
  189. /package/{out/storage → storage}/BaseCachingStorage.js +0 -0
  190. /package/{out/storage → storage}/CachingCookieStorage.d.ts +0 -0
  191. /package/{out/storage → storage}/CachingCookieStorage.js +0 -0
  192. /package/{out/storage → storage}/CachingLocalStorage.d.ts +0 -0
  193. /package/{out/storage → storage}/CachingLocalStorage.js +0 -0
  194. /package/{out/storage → storage}/getCookie.d.ts +0 -0
  195. /package/{out/storage → storage}/getCookie.js +0 -0
  196. /package/{out/storage → storage}/setCookie.d.ts +0 -0
  197. /package/{out/storage → storage}/setCookie.js +0 -0
  198. /package/{out/theme → theme}/theme.utils.d.ts +0 -0
  199. /package/{out/theme → theme}/theme.utils.js +0 -0
  200. /package/{out/url → url}/sanitizeUrl.d.ts +0 -0
  201. /package/{out/url → url}/sanitizeUrl.js +0 -0
  202. /package/{out/utils → utils}/CaseTransformer.d.ts +0 -0
  203. /package/{out/utils → utils}/CaseTransformer.js +0 -0
  204. /package/{out/utils → utils}/NullishCoalescingOperator.d.ts +0 -0
  205. /package/{out/utils → utils}/NullishCoalescingOperator.js +0 -0
  206. /package/{out/utils → utils}/NumericDecline.d.ts +0 -0
  207. /package/{out/utils → utils}/NumericDecline.js +0 -0
  208. /package/{out/utils → utils}/addEventListener.d.ts +0 -0
  209. /package/{out/utils → utils}/addEventListener.js +0 -0
  210. /package/{out/utils → utils}/allSettled.d.ts +0 -0
  211. /package/{out/utils → utils}/allSettled.js +0 -0
  212. /package/{out/utils → utils}/checkTimeZone.d.ts +0 -0
  213. /package/{out/utils → utils}/checkTimeZone.js +0 -0
  214. /package/{out/utils → utils}/deviceUtils.d.ts +0 -0
  215. /package/{out/utils → utils}/deviceUtils.js +0 -0
  216. /package/{out/utils → utils}/flatMap.d.ts +0 -0
  217. /package/{out/utils → utils}/flatMap.js +0 -0
  218. /package/{out/utils → utils}/fromEntries.d.ts +0 -0
  219. /package/{out/utils → utils}/fromEntries.js +0 -0
  220. /package/{out/utils → utils}/generateRandomNumber.d.ts +0 -0
  221. /package/{out/utils → utils}/generateRandomNumber.js +0 -0
  222. /package/{out/utils → utils}/objectSort.d.ts +0 -0
  223. /package/{out/utils → utils}/objectSort.js +0 -0
  224. /package/{out/utils → utils}/orientationUtils.d.ts +0 -0
  225. /package/{out/utils → utils}/orientationUtils.js +0 -0
  226. /package/{out/velocity → velocity}/SysVelocityContext.d.ts +0 -0
  227. /package/{out/velocity → velocity}/SysVelocityContext.js +0 -0
  228. /package/{out/velocity → velocity}/SysVelocityRenderer.d.ts +0 -0
@@ -1,614 +0,0 @@
1
- import {ClBaseComponentI, ClComponentType, ClDocumentActionType} from '../document/Document.interface';
2
- import {DisplayConditionCallbackI} from './DisplayCondition.interface';
3
- import {PropPathConditionCallbackI} from './PropPathCondition.interface';
4
-
5
- /**
6
- * Property pane manifest defining editor panel structure.
7
- */
8
- export interface PropertyPaneManifestI {
9
- /** Content tab controls */
10
- content: BasePropertyPaneManifestModelI[];
11
- /** General/style tab controls */
12
- general?: BasePropertyPaneManifestModelI[];
13
- /** Header controls */
14
- header?: BasePropertyPaneManifestModelI[];
15
- }
16
-
17
- /**
18
- * Base interface for property pane controls and groups.
19
- */
20
- export interface BasePropertyPaneManifestModelI {
21
- type: PropertyPaneManifestModelType;
22
- /** only CONTROL type requires this field */
23
- name?: ClPropertyPaneManifestModelName;
24
- /** propPath is used to specify full path to the prop
25
- * unline combination of element, elementProp and optional elementSubProp
26
- * */
27
- propPath?: string[];
28
- element?: string;
29
- elementProp?: string;
30
- elementSubProp?: string;
31
- /** @internal */
32
- elementSubProps?: string[];
33
- /** Callback that dynamically resolves the property path based on component context */
34
- propPathCondition?: PropPathConditionCallbackI;
35
- params?: any;
36
- /** Callback that determines whether this control should be visible in the property pane */
37
- displayCondition?: DisplayConditionCallbackI;
38
- /** @internal */
39
- hideSyncSelect?: boolean;
40
- /** @internal */
41
- syncSelectDisplayCondition?: DisplayConditionCallbackI;
42
- /** @internal */
43
- syncSelectOptions?: Array<string | null>;
44
- /** @internal */
45
- label?: string;
46
- /** @internal */
47
- disableControlIfPropPathIsFalsy?: string[];
48
- /** @internal */
49
- disableControlIfPropPathMatchValue?: DisableControlIfPropPathMatchValueParamsI;
50
- /** @internal */
51
- disableValidation?: boolean;
52
- /** only GROUP type requires this field */
53
- children?: BasePropertyPaneManifestModelI[];
54
- /** Preprocesses value before passing to control and postprocesses value before assigning it back.
55
- * @example
56
- * transformers: [{name: 'px'}]
57
- * // Strips 'px' when passing to control: '10px' -> '10'
58
- * // Appends 'px' when receiving from control: '40' -> '40px'
59
- */
60
- valueTransformers?: ValueTransformerConfig[];
61
- /** @internal */
62
- mode?: string;
63
- /**
64
- * Restricts the visibility of this property pane control to only appear
65
- * when one of the specified component elements is focused.
66
- * Each string corresponds to a `cl-element` attribute value within the component.
67
- * @example
68
- * displayForFocusedElement: ['button']
69
- * // Control is visible only when the element with cl-element="button" is focused
70
- * @example
71
- * displayForFocusedElement: ['title', 'subtitle']
72
- * // Control is visible when either the "title" or "subtitle" element is focused
73
- */
74
- displayForFocusedElement?: string[]
75
- }
76
-
77
- export interface DisableControlIfPropPathMatchValueParamsI {
78
- propPath: string[];
79
- value: any;
80
- }
81
-
82
- export interface ValueTransformerConfig<TParams = undefined> {
83
- name: ValueTransformerName;
84
- params?: TParams;
85
- }
86
-
87
- export enum ValueTransformerName {
88
- PIXELS = 'px',
89
- }
90
-
91
- export enum PropertyPaneManifestModelType {
92
- CONTROL = 'CONTROL',
93
- TEXT = 'TEXT',
94
- GROUP = 'GROUP',
95
- }
96
-
97
- export enum ClPropertyPaneManifestModelName {
98
- SIZE = 'SIZE',
99
- INDENTATION = 'INDENTATION',
100
- ALIGNMENT = 'ALIGNMENT',
101
- BACKGROUND = 'BACKGROUND',
102
- /** @internal */
103
- BACKDROP_FILTER = 'BACKDROP_FILTER',
104
- /** @internal */
105
- BACKGROUND_MARKER_SELECTED = 'BACKGROUND_MARKER_SELECTED',
106
- BORDERS = 'BORDERS',
107
- BOX_SHADOW = 'BOX_SHADOW',
108
- BORDER_RADIUS = 'BORDER_RADIUS',
109
- TEXT_PARAMS = 'TEXT_PARAMS',
110
- TEXT_INPUT = 'TEXT_INPUT',
111
- SWITCH = 'SWITCH',
112
- /** @internal */
113
- SWITCH_WITH_INPUT = 'SWITCH_WITH_INPUT',
114
- INPUT_VALIDATION = 'INPUT_VALIDATION',
115
- INPUT_LABEL = 'INPUT_LABEL',
116
- /** @internal */
117
- TEXT_COLOR = 'TEXT_COLOR',
118
- SELECT = 'SELECT',
119
- RADIO_BUTTONS = 'RADIO_BUTTONS',
120
- IMAGE_SOURCES = 'IMAGE_SOURCES',
121
- COUNTRY_PHONE_SELECT = 'COUNTRY_PHONE_SELECT',
122
- HOVER_ANIMATION = 'HOVER_ANIMATION',
123
- ACTIONS = 'ACTIONS',
124
- /** @internal */
125
- NPS_ACTIONS = 'NPS_ACTIONS',
126
- DATEPICKER = 'DATEPICKER',
127
- /** @internal */
128
- DATEPICKER_COUNTDOWN_TIMER = 'DATEPICKER_COUNTDOWN_TIMER',
129
- DISPLAY = 'DISPLAY',
130
- COMPONENT_OPTIONS = 'COMPONENT_OPTIONS',
131
- COLOR_SELECT = 'COLOR_SELECT',
132
- /** @internal */
133
- FLOATING_COMPONENT_POSITION = 'FLOATING_COMPONENT_POSITION',
134
- /** @internal */
135
- LOOP_ANIMATION = 'LOOP_ANIMATION',
136
- VIDEO_URL = 'VIDEO_URL',
137
- VIDEO_CUSTOM_COVER = 'VIDEO_CUSTOM_COVER',
138
- /** @internal */
139
- WIDGET_LAYOUT_SELECT = 'WIDGET_LAYOUT_SELECT',
140
- /** @internal */
141
- MULTIPLE_INPUT_SIZE = 'MULTIPLE_INPUT_SIZE',
142
- DATE_FORMAT = 'DATE_FORMAT',
143
- /** @internal */
144
- ICON = 'ICON',
145
- /** @internal */
146
- PROMOCODE_ICON = 'PROMOCODE_ICON',
147
- ICON_SELECT = 'ICON_SELECT',
148
- /** @internal */
149
- TEXT_VISIBILITY = 'TEXT_VISIBILITY',
150
- /** @internal */
151
- SLIDER_SETTINGS = 'SLIDER_SETTINGS',
152
- /** @internal */
153
- SLIDER_MANAGE_SLIDES = 'SLIDER_MANAGE_SLIDES',
154
- /** @internal */
155
- SLIDER_MODES = 'SLIDER_MODES',
156
- /** @internal */
157
- SLIDER_NAVIGATION_BUTTONS = 'SLIDER_NAVIGATION_BUTTONS',
158
- /** @internal */
159
- SLIDER_INDICATION = 'SLIDER_INDICATION',
160
- /** @internal */
161
- SLIDER_SLIDESHOW_ANIMATION = 'SLIDER_SLIDESHOW_ANIMATION',
162
- INTEGRATION_FIELD_MAPPING = 'INTEGRATION_FIELD_MAPPING',
163
- /** @internal */
164
- SUPPORTED_LANGUAGES = 'SUPPORTED_LANGUAGES',
165
- LIST_POSITION = 'LIST_POSITION',
166
- /** @internal */
167
- SOCIAL_ICON_SIZE = 'SOCIAL_ICON_SIZE',
168
- /** @internal */
169
- SOCIAL_TYPE_AND_ICON_SELECT = 'SOCIAL_TYPE_AND_ICON_SELECT',
170
- /** @internal */
171
- COLUMNS = 'COLUMNS',
172
- INSERT_BLOCK = 'INSERT_BLOCK',
173
- NUMBER_INPUT = 'NUMBER_INPUT',
174
- PRIZE_SETTINGS = 'PRIZE_SETTINGS',
175
- /** @internal */
176
- ROOT_COMPONENT_SELECT = 'ROOT_COMPONENT_SELECT',
177
- /** @internal */
178
- FEEDBACK_TYPE = 'FEEDBACK_TYPE',
179
- /** @internal */
180
- FEEDBACK_ICONS_SELECT = 'FEEDBACK_ICONS_SELECT',
181
- /** @internal */
182
- FEEDBACK_ACTIONS = 'FEEDBACK_ACTIONS',
183
- /** @internal */
184
- FLOATING_BOX_POSITION = 'FLOATING_BOX_POSITION',
185
- /** @internal */
186
- OVERLAY_POSITION = 'OVERLAY_POSITION',
187
- /** @internal */
188
- OVERLAY_BACKGROUND = 'OVERLAY_BACKGROUND',
189
- /** @internal */
190
- OVERLAY_BACKDROP_FILTER = 'OVERLAY_BACKDROP_FILTER',
191
- /** @internal */
192
- WIDGET_THEME_SELECT = 'WIDGET_THEME_SELECT',
193
- }
194
-
195
- /** @noInheritDoc */
196
- export interface GroupPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
197
- children: BasePropertyPaneManifestModelI[];
198
- }
199
-
200
- /** @noInheritDoc */
201
- export interface BorderPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
202
- params?: BorderPropertyPaneManifestParamsI;
203
- }
204
-
205
- export interface BorderPropertyPaneManifestParamsI {
206
- minValue?: number;
207
- maxValue?: number;
208
- hideAdditionalParams?: boolean;
209
- label?: string;
210
- }
211
-
212
- /** @noInheritDoc */
213
- export interface BoxShadowPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
214
- params?: BoxShadowPropertyPaneManifestParamsI;
215
- }
216
-
217
- export interface BoxShadowPropertyPaneManifestParamsI {
218
- label?: string;
219
- }
220
-
221
- /** @noInheritDoc */
222
- export interface BackgroundPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
223
- params?: BackgroundPropertyPaneManifestParamsI;
224
- }
225
-
226
- export interface BackgroundPropertyPaneManifestParamsI {
227
- label?: string;
228
- onlyColorSelection?: boolean;
229
- disableGradientSelection?: boolean;
230
- hideSwitch?: boolean;
231
- property?: string;
232
- disabledColor?: string;
233
- }
234
-
235
- /** @noInheritDoc */
236
- export interface TabPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
237
- children: BasePropertyPaneManifestModelI[];
238
- params: TabPropertyPaneManifestParamsI;
239
- }
240
-
241
- export interface TabPropertyPaneManifestParamsI {
242
- label: string;
243
- type?: TabPropertyPaneManifestType;
244
- }
245
-
246
- export enum TabPropertyPaneManifestType {
247
- DESKTOP_STYLES = 'DESKTOP_STYLES',
248
- MOBILE_STYLES = 'MOBILE_STYLES',
249
- }
250
-
251
- /** @noInheritDoc */
252
- export interface TextPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
253
- params: TextPropertyPaneManifestParamsI;
254
- }
255
-
256
- export interface TextPropertyPaneManifestParamsI {
257
- text: string;
258
- translateParams?: object;
259
- type?: TextPropertyPaneManifestParamsType;
260
- styles?: string[],
261
- classes?: string[],
262
- }
263
-
264
- export enum TextPropertyPaneManifestParamsType {
265
- PRIMARY = 'PRIMARY',
266
- SECONDARY = 'SECONDARY',
267
- }
268
-
269
- /** @noInheritDoc */
270
- export interface SizePropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
271
- params: {[key: string]: SizePropertyPaneManifestParamsI}; // key is property name
272
- }
273
-
274
- export interface SizePropertyPaneManifestParamsI {
275
- options: SizePropertyPaneOption[];
276
- minValue?: number;
277
- element?: string;
278
- elementProp?: string;
279
- propPath?: string;
280
- }
281
-
282
- export enum SizePropertyPaneOption {
283
- FIXED = 'fixed',
284
- FILL = 'fill',
285
- HUG = 'hug',
286
- }
287
-
288
- /** @noInheritDoc */
289
- export interface IndentationPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
290
- params: IndentationPropertyPaneManifestParamsI;
291
- }
292
-
293
- export interface IndentationPropertyPaneManifestParamsI {
294
- indentationType: IndentationPropertyPaneManifestType;
295
- horizontalOnly?: boolean;
296
- }
297
-
298
- export enum IndentationPropertyPaneManifestType {
299
- PADDING = 'PADDING',
300
- MARGIN = 'MARGIN',
301
- }
302
-
303
- /** @noInheritDoc */
304
- export interface HoverAnimationPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
305
- params?: HoverAnimationPropertyPaneManifestParamsI;
306
- }
307
-
308
- export interface HoverAnimationPropertyPaneManifestParamsI {
309
- /** Adding this field enables the display of animation controls */
310
- animationTypeProp?: {elementProp?: string, propPath?: string[]};
311
- }
312
-
313
- /** @noInheritDoc */
314
- export interface ColorSelectPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
315
- params: ColorSelectPropertyPaneManifestParamsI;
316
- }
317
-
318
- export interface ColorSelectPropertyPaneManifestParamsI {
319
- label?: string;
320
- validators?: BaseInputValidatorsI;
321
- }
322
-
323
- export interface BaseInputValidatorsI {
324
- required: boolean;
325
- min?: number;
326
- max?: number;
327
- }
328
-
329
- /** @noInheritDoc */
330
- export interface TextInputPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
331
- params: TextInputPropertyPaneManifestParamsI;
332
- }
333
-
334
- export interface TextInputPropertyPaneManifestParamsI {
335
- label?: string;
336
- subLabel?: string;
337
- description?: string;
338
- placeholder?: string;
339
- tooltip?: string;
340
- validators?: BaseInputValidatorsI;
341
- defaultValue?: any;
342
- }
343
-
344
- /** @internal */
345
- export interface VideoUrlPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
346
- params: VideoUrlPropertyPaneManifestParamsI;
347
- }
348
-
349
- /** @internal */
350
- export interface VideoUrlPropertyPaneManifestParamsI {
351
- label?: string;
352
- description?: string;
353
- placeholder?: string;
354
- validators?: BaseInputValidatorsI;
355
- }
356
-
357
- /** @internal */
358
- export interface TextColorPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
359
- params: TextColorPropertyPaneManifestParamsI;
360
- }
361
-
362
- export interface TextColorPropertyPaneManifestParamsI {
363
- label?: string;
364
- mode?: string;
365
- }
366
-
367
- /** @noInheritDoc */
368
- export interface SwitchPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
369
- params: SwitchPropertyPaneManifestParamsI;
370
- }
371
-
372
- export interface SwitchPropertyPaneManifestParamsI {
373
- label: string;
374
- description?: string;
375
- tooltip?: string;
376
- getValueMapper?: object;
377
- setValueMapper?: object;
378
- boldLabel?: boolean;
379
- }
380
-
381
- /** @noInheritDoc */
382
- export interface SwitchWithInputPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
383
- params: SwitchWithInputPropertyPaneManifestParamsI;
384
- }
385
-
386
- export interface SwitchWithInputPropertyPaneManifestParamsI {
387
- label: string;
388
- switchPropPath: string[];
389
- inputPropPath: string[];
390
- unitMeasure?: string;
391
- minValue?: number;
392
- maxValue?: number;
393
- switchOnDependantSwitchByPropPath?: string[];
394
- switchOffDependantSwitchByPropPath?: string[];
395
- }
396
-
397
- /** @noInheritDoc */
398
- export interface DisplayPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
399
- params: DisplayPropertyPaneManifestParamsI;
400
- }
401
-
402
- export interface DisplayPropertyPaneManifestParamsI {
403
- label: string;
404
- description?: string;
405
- displayPropertyValue?: string;
406
- }
407
-
408
- /** @noInheritDoc */
409
- export interface InputValidationPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
410
- params: ValidationPropertyPaneManifestParamsI;
411
- }
412
-
413
- export interface ValidationPropertyPaneManifestParamsI {
414
- validationPropPath: string[];
415
- /** @internal */
416
- fieldTypePropPath: string[];
417
- required: boolean;
418
- /** @internal */
419
- options: SelectOptionI[];
420
- /** @internal */
421
- validationErrors: any;
422
- }
423
-
424
- export interface SelectOptionI {
425
- label: string;
426
- value: any;
427
- }
428
-
429
- /** @noInheritDoc */
430
- export interface SelectPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
431
- params: SelectPropertyPaneManifestParamsI;
432
- }
433
-
434
- export interface SelectPropertyPaneManifestParamsI {
435
- label: string;
436
- options?: SelectOptionI[];
437
- getOptions?: GetSelectOptionsCallbackI;
438
- overlayWidth?: number;
439
- defaultValue?: any;
440
- }
441
-
442
- export type GetSelectOptionsCallbackI = (sdk: {componentModel: ClBaseComponentI}) => SelectOptionI[];
443
-
444
- /** @noInheritDoc */
445
- export interface TextStylesPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
446
- params: TextStylesPropertyPaneManifestParamsI[];
447
- }
448
-
449
- export interface TextStylesPropertyPaneManifestParamsI {
450
- label?: string;
451
- element?: string;
452
- showPlaceholderControl?: boolean;
453
- hideTextAlign?: boolean;
454
- hideStyleSelect?: boolean;
455
- hideFontSize?: boolean;
456
- fontSizePlaceholder?: string;
457
- hideTextShadow?: boolean;
458
- hideLetterSpacing?: boolean;
459
- }
460
-
461
- /** @noInheritDoc */
462
- export interface RadioButtonsPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
463
- params: RadioButtonsPropertyPaneManifestParamsI;
464
- }
465
-
466
- export interface RadioButtonsPropertyPaneManifestParamsI {
467
- label: string;
468
- options: SelectOptionI[];
469
- reactToAnyStateChanges?: boolean;
470
- }
471
-
472
- /** @noInheritDoc */
473
- export interface OptionsPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
474
- params: OptionsPropertyPaneManifestParamsI;
475
- }
476
-
477
- export interface OptionsPropertyPaneManifestParamsI {
478
- header?: string;
479
- tooltip?: string;
480
- origin?: boolean;
481
- optionsPropPath: string[];
482
- optionsAlphabeticSortPropPath: string[];
483
- integrationNamePropPath: string[];
484
- actionParams?: OptionsPropertyPaneActionParamsI;
485
- }
486
-
487
- export interface OptionsPropertyPaneActionParamsI {
488
- getRelativeSelector: (optionId: string) => string;
489
- getOptionIdFromRelativeSelector: (selector: string) => string;
490
- availableActions?: ClDocumentActionType[];
491
- }
492
-
493
- /** @noInheritDoc */
494
- export interface DatepickerPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
495
- params: DatepickerPropertyPaneManifestParamsI;
496
- }
497
-
498
- export interface DatepickerPropertyPaneManifestParamsI {
499
- label: string;
500
- showTime?: boolean;
501
- placeholder?: boolean;
502
- minDate?: string;
503
- rawDate?: boolean;
504
- }
505
-
506
- /** @internal */
507
- export interface FloatingBoxPositionPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
508
- params: FloatingBoxPositionPropertyPaneManifestParamsI;
509
- }
510
-
511
- /** @internal */
512
- export interface FloatingBoxPositionPropertyPaneManifestParamsI {
513
- showAllControls?: boolean;
514
- syncEnvSettingsUntilExplicitlyChanged?: boolean;
515
- userActivityKey?: string;
516
- }
517
-
518
- /** @noInheritDoc */
519
- export interface FloatingComponentPositionPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
520
- params: FloatingComponentPositionPropertyPaneManifestParamsI;
521
- }
522
-
523
- export interface FloatingComponentPositionPropertyPaneManifestParamsI {
524
- label: string;
525
- x: number;
526
- y: number;
527
- }
528
-
529
- /** @internal */
530
- export interface LoopAnimationPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
531
- params: LoopAnimationPropertyPaneManifestParamsI;
532
- }
533
-
534
- /** @internal */
535
- export interface LoopAnimationPropertyPaneManifestParamsI {
536
- label: string;
537
- }
538
-
539
- /** @noInheritDoc */
540
- export interface ActionsPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
541
- params: ActionsPropertyPaneManifestParamsI;
542
- }
543
-
544
- export interface ActionsPropertyPaneManifestParamsI {
545
- /** @internal */
546
- showTitleCondition?: DisplayConditionCallbackI;
547
- /** @internal */
548
- hideSubmitActionCondition?: DisplayConditionCallbackI;
549
- /** @internal */
550
- hideGoToViewActionCondition?: DisplayConditionCallbackI;
551
- /** @internal */
552
- showRunGameActionCondition?: DisplayConditionCallbackI;
553
- origin?: boolean;
554
- }
555
-
556
- /** @noInheritDoc */
557
- export interface IntegrationFieldMappingPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
558
- params: IntegrationFieldMappingPropertyPaneManifestParamsI;
559
- }
560
-
561
- export interface IntegrationFieldMappingPropertyPaneManifestParamsI {
562
- namePropPath: string[];
563
- integrationNamePropPath: string[];
564
- groupNamePropPath: string[];
565
- fieldNamePropPath: string[];
566
- fieldTypePropPath: string[];
567
- validationPropPath: string[];
568
- placeholderPropPath: string[];
569
- labelPropPath: string[];
570
- optionsPropPath: string[];
571
- }
572
-
573
- /** @noInheritDoc */
574
- export interface InsertBlockPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
575
- params: InsertBlockPropertyPaneManifestParamsI[];
576
- }
577
-
578
- export interface InsertBlockPropertyPaneManifestParamsI {
579
- element: string;
580
- label: string;
581
- isLinkAvailable: boolean;
582
- origin: boolean;
583
- }
584
-
585
- /** @noInheritDoc */
586
- export interface IconSelectPaneManifestModelI extends BasePropertyPaneManifestModelI {
587
- params: IconSelectPaneManifestParamsI;
588
- }
589
-
590
- export interface IconSelectPaneManifestParamsI {
591
- options: IconSelectOptionForPropertyPaneManifestI[];
592
- label?: string;
593
- excludeImageTypes?: string[];
594
- enableCustomIcons?: boolean;
595
- colorPickerEnabled?: boolean;
596
- storageType?: string;
597
- }
598
-
599
- export interface IconSelectOptionForPropertyPaneManifestI {
600
- icon: string;
601
- value: any;
602
- inlineSvg?: boolean;
603
- }
604
-
605
- /** @noInheritDoc */
606
- export interface PrizeSettingsPropertyPaneManifestModelI extends BasePropertyPaneManifestModelI {
607
- params?: PrizeSettingsPropertyPaneManifestParamsI;
608
- }
609
-
610
- export interface PrizeSettingsPropertyPaneManifestParamsI {
611
- minOptions?: number;
612
- linkedGamifiedComponentType?: ClComponentType | null;
613
- prizeImageEnabled?: boolean;
614
- }
@@ -1,11 +0,0 @@
1
- import TimerConverter from "./TimerConverter";
2
- import TimeUnit from "./TimeUnit";
3
-
4
- describe('TimerConverter', function () {
5
- it('should convert from SECOND to MILLISECOND', function () {
6
- const result = TimerConverter.convert(TimeUnit.SECOND, TimeUnit.MILLISECOND, 11);
7
-
8
- expect(result).toBe(11000);
9
-
10
- });
11
- });
@@ -1,12 +0,0 @@
1
- import TimeUnit from './TimeUnit';
2
-
3
-
4
- describe('TimeUnit', function () {
5
- it('should get key', function () {
6
- expect(TimeUnit.DAY).toEqual('DAY');
7
- });
8
-
9
- it('should get all keys', function () {
10
- expect(TimeUnit.getAll()).toEqual(['MILLISECOND', 'SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK']);
11
- });
12
- });
@@ -1,34 +0,0 @@
1
- /**
2
- * TimeUnit object representing time units.
3
- * @namespace
4
- * @property {string} MILLISECOND - Time unit equal to one thousandth of a second.
5
- * @property {string} SECOND - Time unit equal to one second.
6
- * @property {string} MINUTE - Time unit equal to one minute.
7
- * @property {string} HOUR - Time unit equal to one hour.
8
- * @property {string} DAY - Time unit equal to one day.
9
- * @property {string} WEEK - Time unit equal to one week.
10
- */
11
- const TimeUnit = {
12
- MILLISECOND: 'MILLISECOND',
13
- SECOND: 'SECOND',
14
- MINUTE: 'MINUTE',
15
- HOUR: 'HOUR',
16
- DAY: 'DAY',
17
- WEEK: 'WEEK',
18
-
19
-
20
- /**
21
- * Returns all the keys of the TimeUnit object as an array of strings, excluding 'getAll'.
22
- * @method
23
- * @memberof TimeUnit
24
- * @returns {Array<string>} An array of keys of TimeUnit object.
25
- */
26
- getAll: function(): string[] {
27
- return Object.keys(this).filter(key => key !== 'getAll');
28
- }
29
- } as const;
30
-
31
- export type TimeUnitKey = Exclude<keyof typeof TimeUnit, 'getAll'>;
32
- export type TimeUnitValue = typeof TimeUnit[TimeUnitKey];
33
-
34
- export default TimeUnit;
@@ -1,29 +0,0 @@
1
- import TimeUnit, { TimeUnitValue } from "./TimeUnit";
2
-
3
- type TimeUnitMapper = Record<TimeUnitValue, (v: number) => number>;
4
-
5
- export default class TimerConverter {
6
- static toMsMapper: TimeUnitMapper = {
7
- [TimeUnit.MILLISECOND]: (v: number): number => v,
8
- [TimeUnit.SECOND]: (v: number): number => v * 1000,
9
- [TimeUnit.MINUTE]: (v: number): number => v * 60000,
10
- [TimeUnit.HOUR]: (v: number): number => v * 3600000,
11
- [TimeUnit.DAY]: (v: number): number => v * 86400000,
12
- [TimeUnit.WEEK]: (v: number): number => v * 604800000,
13
- }
14
-
15
- static fromMsMapper: TimeUnitMapper = {
16
- [TimeUnit.MILLISECOND]: (v: number): number => v,
17
- [TimeUnit.SECOND]: (v: number): number => v / 1000,
18
- [TimeUnit.MINUTE]: (v: number): number => v / 60000,
19
- [TimeUnit.HOUR]: (v: number): number => v / 3600000,
20
- [TimeUnit.DAY]: (v: number): number => v / 86400000,
21
- [TimeUnit.WEEK]: (v: number): number => v / 604800000,
22
- }
23
-
24
- static convert(fromUnit: TimeUnitValue, toUnit: TimeUnitValue, value: number): number {
25
- const ms = TimerConverter.toMsMapper[fromUnit](value);
26
-
27
- return TimerConverter.fromMsMapper[toUnit](ms);
28
- }
29
- }
@@ -1,6 +0,0 @@
1
- export enum ComponentInsertType {
2
- BEFORE = 'BEFORE',
3
- AFTER = 'AFTER',
4
- INSIDE = 'INSIDE',
5
- INSTEAD = 'INSTEAD',
6
- }