@componyx/ui 0.0.0-stage → 1.0.3

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 (169) hide show
  1. package/AppSkin/AppSkin.css +1268 -0
  2. package/AppSkin/AppSkin.js +2748 -0
  3. package/AppSkin/Themes/Default.css +241 -0
  4. package/Base/Base.js +3407 -0
  5. package/Base/ComponentIcons.css +66 -0
  6. package/Base/Font/ComponentIcons.woff +0 -0
  7. package/Base/Font/UI.woff +0 -0
  8. package/Base/Library.js +8432 -0
  9. package/Base/NavigationManager.js +462 -0
  10. package/Base/ResponsiveTemplates.js +371 -0
  11. package/Base/Sanitizer.js +288 -0
  12. package/Base/Themes/Default.css +255 -0
  13. package/Base/UI.css +618 -0
  14. package/Base/UIResourcePath.js +6 -0
  15. package/Bindary/Bindary.js +2011 -0
  16. package/Bindary/Modules/Connection.js +216 -0
  17. package/Bindary/Modules/Core.js +854 -0
  18. package/Bindary/Modules/DataUpdater.js +351 -0
  19. package/Bindary/Modules/ExpressionEngine.js +347 -0
  20. package/Bindary/Modules/ProxyManager.js +482 -0
  21. package/Bindary/Modules/Renderer.js +605 -0
  22. package/Bindary/Modules/Router.js +291 -0
  23. package/Bindary/Modules/Scroller.js +89 -0
  24. package/Bindary/Modules/Template.js +1273 -0
  25. package/BookmarkSpy/BookmarkSpy.js +430 -0
  26. package/Box/Box.css +36 -0
  27. package/Box/Box.js +1685 -0
  28. package/Button/Button.css +470 -0
  29. package/Button/Button.js +1398 -0
  30. package/Button/Themes/Default.css +200 -0
  31. package/Carousel/Carousel.css +273 -0
  32. package/Carousel/Carousel.js +607 -0
  33. package/ColorButton/ColorButton.css +39 -0
  34. package/ColorButton/ColorButton.js +336 -0
  35. package/ColorPicker/ColorPicker.css +359 -0
  36. package/ColorPicker/ColorPicker.js +972 -0
  37. package/ComboBox/ComboBox.css +357 -0
  38. package/ComboBox/ComboBox.js +2342 -0
  39. package/ComboBox/Themes/Default.css +23 -0
  40. package/DataPager/DataPager.css +72 -0
  41. package/DataPager/DataPager.js +674 -0
  42. package/DatePicker/DatePicker.css +227 -0
  43. package/DatePicker/DatePicker.js +1531 -0
  44. package/DatePicker/Themes/Default.css +26 -0
  45. package/Dialog/Dialog.css +106 -0
  46. package/Dialog/Dialog.js +572 -0
  47. package/Dialog/Themes/Default.css +10 -0
  48. package/Editor/Data/Emoji.json +8285 -0
  49. package/Editor/Data/Special.json +1042 -0
  50. package/Editor/Editor.css +1562 -0
  51. package/Editor/Editor.js +4058 -0
  52. package/Editor/Font/Editor.woff +0 -0
  53. package/Editor/Modules/ComponentFactory.js +565 -0
  54. package/Editor/Modules/ContentManager.js +748 -0
  55. package/Editor/Modules/DialogManager.js +1234 -0
  56. package/Editor/Modules/EventManager.js +458 -0
  57. package/Editor/Modules/Format.js +950 -0
  58. package/Editor/Modules/History.js +191 -0
  59. package/Editor/Modules/LayoutState.js +379 -0
  60. package/Editor/Modules/ListManager.js +296 -0
  61. package/Editor/Modules/MenuManager.js +388 -0
  62. package/Editor/Modules/NodeManager.js +681 -0
  63. package/Editor/Modules/ParagraphButtons.js +122 -0
  64. package/Editor/Modules/Resizer.js +176 -0
  65. package/Editor/Modules/SelectionRange.js +564 -0
  66. package/Editor/Modules/SourceViewBuilder.js +212 -0
  67. package/Editor/Modules/SymbolPicker.js +208 -0
  68. package/Editor/Modules/Table.js +2327 -0
  69. package/Editor/Modules/TableDialog.js +757 -0
  70. package/Editor/Modules/Toolbar.js +375 -0
  71. package/Editor/Modules/TooltipMenu.js +125 -0
  72. package/Editor/Modules/Utility.js +131 -0
  73. package/Editor/Themes/Default.css +204 -0
  74. package/FileUpload/FileUpload.css +156 -0
  75. package/FileUpload/FileUpload.js +898 -0
  76. package/FileUpload/Themes/Default.css +17 -0
  77. package/Form/Form.css +1934 -0
  78. package/Form/Form.js +4943 -0
  79. package/Form/Modules/ActionManager.js +368 -0
  80. package/Form/Modules/BuildPanelManager.js +319 -0
  81. package/Form/Modules/ComponentFactory.js +468 -0
  82. package/Form/Modules/ComponentPanel.js +265 -0
  83. package/Form/Modules/ConfigPanelManager.js +685 -0
  84. package/Form/Modules/DataObserver.js +717 -0
  85. package/Form/Modules/Databinder.js +602 -0
  86. package/Form/Modules/Draggable.js +756 -0
  87. package/Form/Modules/OptionsPanel.js +342 -0
  88. package/Form/Modules/Renderer.js +1889 -0
  89. package/Form/Modules/RuleEngine.js +585 -0
  90. package/Form/Modules/RulesPanel.js +1158 -0
  91. package/Form/Modules/Types.js +1709 -0
  92. package/Form/Modules/ValidationManager.js +194 -0
  93. package/Form/Themes/Default.css +216 -0
  94. package/FormField/FormField.css +468 -0
  95. package/FormField/FormField.js +576 -0
  96. package/FormField/Themes/Default.css +99 -0
  97. package/Grid/Grid.css +544 -0
  98. package/Grid/Grid.js +3761 -0
  99. package/Grid/Themes/Default.css +43 -0
  100. package/LICENSE +126 -0
  101. package/MaskedTextBox/MaskedTextBox.css +28 -0
  102. package/MaskedTextBox/MaskedTextBox.js +642 -0
  103. package/MaskedTextBox/Themes/Default.css +6 -0
  104. package/Menu/Menu.css +328 -0
  105. package/Menu/Menu.js +2386 -0
  106. package/Menu/Themes/Default.css +24 -0
  107. package/NumericBox/NumericBox.css +120 -0
  108. package/NumericBox/NumericBox.js +984 -0
  109. package/PanelBar/PanelBar.css +123 -0
  110. package/PanelBar/PanelBar.js +505 -0
  111. package/PanelBar/Themes/Default.css +51 -0
  112. package/PieChart/PieChart.css +95 -0
  113. package/PieChart/PieChart.js +820 -0
  114. package/PieChart/Themes/Default.css +9 -0
  115. package/README.md +178 -3
  116. package/Slider/Slider.css +348 -0
  117. package/Slider/Slider.js +1306 -0
  118. package/Slider/Themes/Default.css +44 -0
  119. package/TabStrip/TabStrip.css +52 -0
  120. package/TabStrip/TabStrip.js +362 -0
  121. package/TabStrip/Themes/Default.css +35 -0
  122. package/TimePicker/Themes/Default.css +30 -0
  123. package/TimePicker/TimePicker.css +253 -0
  124. package/TimePicker/TimePicker.js +1485 -0
  125. package/TooltipManager/Themes/Default.css +21 -0
  126. package/TooltipManager/TooltipManager.css +227 -0
  127. package/TooltipManager/TooltipManager.js +791 -0
  128. package/Validator/Validator.css +54 -0
  129. package/Validator/Validator.js +2508 -0
  130. package/componyx.html-data.json +619 -0
  131. package/index.js +27 -0
  132. package/package.json +43 -4
  133. package/types/AppSkin.d.ts +842 -0
  134. package/types/Base.d.ts +1034 -0
  135. package/types/Bindary.d.ts +1196 -0
  136. package/types/BookmarkSpy.d.ts +112 -0
  137. package/types/Box.d.ts +374 -0
  138. package/types/Button.d.ts +455 -0
  139. package/types/Carousel.d.ts +136 -0
  140. package/types/ColorButton.d.ts +120 -0
  141. package/types/ColorPicker.d.ts +225 -0
  142. package/types/ComboBox.d.ts +507 -0
  143. package/types/DataPager.d.ts +152 -0
  144. package/types/DatePicker.d.ts +354 -0
  145. package/types/Dialog.d.ts +160 -0
  146. package/types/Editor.d.ts +1289 -0
  147. package/types/FileUpload.d.ts +206 -0
  148. package/types/Form.d.ts +3078 -0
  149. package/types/FormField.d.ts +204 -0
  150. package/types/Grid.d.ts +911 -0
  151. package/types/Library.d.ts +1899 -0
  152. package/types/MaskedTextBox.d.ts +91 -0
  153. package/types/Menu.d.ts +577 -0
  154. package/types/NumericBox.d.ts +310 -0
  155. package/types/PanelBar.d.ts +223 -0
  156. package/types/PieChart.d.ts +224 -0
  157. package/types/ResponsiveTemplates.d.ts +108 -0
  158. package/types/Slider.d.ts +227 -0
  159. package/types/TabStrip.d.ts +185 -0
  160. package/types/TimePicker.d.ts +265 -0
  161. package/types/TooltipManager.d.ts +178 -0
  162. package/types/UI.d.ts +29 -0
  163. package/types/Validator.d.ts +653 -0
  164. package/types/index.d.ts +59 -0
  165. package/ui.css +11783 -0
  166. package/ui.js +79477 -0
  167. package/ui.min.css +138 -0
  168. package/ui.min.js +264 -0
  169. package/ui.min.js.map +1 -0
@@ -0,0 +1,1899 @@
1
+ declare namespace componyx
2
+ {
3
+ namespace library
4
+ {
5
+ /**
6
+ * @property enable - <p>Enables the functionality.</p>
7
+ * @property disable - <p>Disables the functionality.</p>
8
+ */
9
+ type Toggle = {
10
+ enable: (...params: any[]) => any;
11
+ disable: (...params: any[]) => any;
12
+ };
13
+ /**
14
+ * @property width - <p>The width value.</p>
15
+ * @property height - <p>The height value.</p>
16
+ */
17
+ type Dimensions = {
18
+ width: number;
19
+ height: number;
20
+ };
21
+ /**
22
+ * @property borderTop - <p>The width of the top border.</p>
23
+ * @property borderRight - <p>The width of the right border.</p>
24
+ * @property borderBottom - <p>The width of the bottom border.</p>
25
+ * @property borderLeft - <p>The width of the left border.</p>
26
+ */
27
+ type BorderSizes = {
28
+ borderTop: number;
29
+ borderRight: number;
30
+ borderBottom: number;
31
+ borderLeft: number;
32
+ };
33
+ /**
34
+ * @property paddingTop - <p>The width of the top padding.</p>
35
+ * @property paddingRight - <p>The width of the right padding.</p>
36
+ * @property paddingBottom - <p>The width of the bottom padding.</p>
37
+ * @property paddingLeft - <p>The width of the left padding.</p>
38
+ */
39
+ type PaddingSizes = {
40
+ paddingTop: number;
41
+ paddingRight: number;
42
+ paddingBottom: number;
43
+ paddingLeft: number;
44
+ };
45
+ /**
46
+ * @property width - <p>Total padding and border width.</p>
47
+ * @property height - <p>Total padding and border height.</p>
48
+ * @property borderTop - <p>The width of the top border.</p>
49
+ * @property borderRight - <p>The width of the right border.</p>
50
+ * @property borderBottom - <p>The width of the bottom border.</p>
51
+ * @property borderLeft - <p>The width of the left border.</p>
52
+ * @property paddingTop - <p>The width of the top padding.</p>
53
+ * @property paddingRight - <p>The width of the right padding.</p>
54
+ * @property paddingBottom - <p>The width of the bottom padding.</p>
55
+ * @property paddingLeft - <p>The width of the left padding.</p>
56
+ */
57
+ type BorderPaddingSizes = {
58
+ width: number;
59
+ height: number;
60
+ borderTop: number;
61
+ borderRight: number;
62
+ borderBottom: number;
63
+ borderLeft: number;
64
+ paddingTop: number;
65
+ paddingRight: number;
66
+ paddingBottom: number;
67
+ paddingLeft: number;
68
+ };
69
+ /**
70
+ * @property top - <p>The width of the top margin.</p>
71
+ * @property right - <p>The width of the right margin.</p>
72
+ * @property bottom - <p>The width of the bottom margin.</p>
73
+ * @property left - <p>The width of the left margin.</p>
74
+ * @property width - <p>The width of the left and right margin.</p>
75
+ * @property height - <p>The width of the top and bottom margin.</p>
76
+ */
77
+ type MarginSizes = {
78
+ top: number;
79
+ right: number;
80
+ bottom: number;
81
+ left: number;
82
+ width: number;
83
+ height: number;
84
+ };
85
+ /**
86
+ * @property top - <p>The top position.</p>
87
+ * @property right - <p>The right position.</p>
88
+ * @property bottom - <p>The bottom position.</p>
89
+ * @property left - <p>The left position.</p>
90
+ */
91
+ type Position = {
92
+ top: number;
93
+ right: number;
94
+ bottom: number;
95
+ left: number;
96
+ };
97
+ /**
98
+ * @property scrollTop - <p>The scroll top value.</p>
99
+ * @property scrollLeft - <p>The scroll left value.</p>
100
+ */
101
+ type ScrollPos = {
102
+ scrollTop: number;
103
+ scrollLeft: number;
104
+ };
105
+ /**
106
+ * @property dragHandle - <p>The handle which activates dragging.</p>
107
+ * @property dragGhost - <p>Visible element when dragging.</p>
108
+ * @property boundaryZone - <p>Defines the drag boundaries.</p>
109
+ * @property dropZones - <p>A static array of drop zone elements or a function that returns a list of drop zone elements where the draggable element is allowed to be dropped.</p>
110
+ * @property dropAcceptMode - <p>Defines how much overlap is required to accept the dropping.</p>
111
+ * <ul>
112
+ * <li>0: full</li>
113
+ * <li>1: half</li>
114
+ * <li>2: touch</li>
115
+ * </ul>
116
+ * @property ghostOnly - <p>Defines that only the ghost element must be visible when dragging.</p>
117
+ * @property autoGhostSize - <p>A value indicating if the element size should be applied to the ghost element.</p>
118
+ * @property allowDropOutZone - <p>A value indicating if the draggable element can be dropped outside of a drop zone.</p>
119
+ * @property moveOriginal - <p>A value indicating if the original element is moved when a drag ghost is used and the drag operation ends.</p>
120
+ * @property dragX - <p>A value indicating if horizontal dragging is allowed.</p>
121
+ * @property dragY - <p>A value indicating if vertical dragging is allowed.</p>
122
+ * @property scrollX - <p>A value indicating if the drag element activates horizontal scrolling on the boundary zone when the drag element hits the left or right of the boundary zone.</p>
123
+ * @property scrollY - <p>A value indicating if the drag element activates vertical scrolling on the boundary zone when the drag element hits the top or bottom of the boundary zone.</p>
124
+ * @property minDragX - <p>Minimum change in pixels before the horizontal dragging starts.</p>
125
+ * @property minDragY - <p>Minimum change in pixels before the vertcial dragging starts.</p>
126
+ * @property tickX - <p>Horizontal tick size.</p>
127
+ * @property tickY - <p>Vertical tick size.</p>
128
+ * @property boundaryOvershootLeft - <p>Defines how many extra pixels the boundary zone may be exceeded (or limited) on the left side.</p>
129
+ * @property boundaryOvershootRight - <p>Defines how many extra pixels the boundary zone may be exceeded (or limited) on the right side.</p>
130
+ * @property boundaryOvershootTop - <p>Defines how many extra pixels the boundary zone may be exceeded (or limited) on the top side.</p>
131
+ * @property boundaryOvershootBottom - <p>Defines how many extra pixels the boundary zone may be exceeded (or limited) on the bottom side.</p>
132
+ * @property ignoreBoundaryBorders - <p>Defines a value indicating if the borders of the boundary zone are ignored in the boundary calculations.</p>
133
+ * @property ignoreMargins - <p>Defines a value indicating if drag element margins are ignored in the boundary calculations.</p>
134
+ * @property dragClass - <p>CSS class applied to the element when dragging.</p>
135
+ * @property droppableClass - <p>CSS class applied to the element and dropzone when the element is droppable.</p>
136
+ * @property dropClass - <p>CSS class applied to the element and dropzone when the element is dropped.</p>
137
+ * @property cancelDrag - <p>A value indicating if the the drag operation is canceled before it starts. If needed, set this value in the onDragStart event.</p>
138
+ * @property onDragStart - <p>Event callback method.</p>
139
+ * @property onDrag - <p>Event callback method.</p>
140
+ * @property onDragEnd - <p>Event callback method.</p>
141
+ * @property onDroppableEnter - <p>Event callback method.</p>
142
+ * @property onDroppable - <p>Event callback method.</p>
143
+ * @property onDroppableLeave - <p>Event callback method.</p>
144
+ * @property onDrop - <p>Event callback method.</p>
145
+ */
146
+ type DraggableSettings = {
147
+ dragHandle: HTMLElement;
148
+ dragGhost: HTMLElement;
149
+ boundaryZone: HTMLElement;
150
+ dropZones: HTMLElement[] | ((...params: any[]) => any);
151
+ dropAcceptMode: number | string;
152
+ ghostOnly: boolean;
153
+ autoGhostSize: boolean;
154
+ allowDropOutZone: boolean;
155
+ moveOriginal: boolean;
156
+ dragX: boolean;
157
+ dragY: boolean;
158
+ scrollX: boolean;
159
+ scrollY: boolean;
160
+ minDragX: number;
161
+ minDragY: number;
162
+ tickX: number;
163
+ tickY: number;
164
+ boundaryOvershootLeft: number;
165
+ boundaryOvershootRight: number;
166
+ boundaryOvershootTop: number;
167
+ boundaryOvershootBottom: number;
168
+ ignoreBoundaryBorders: boolean;
169
+ ignoreMargins: boolean;
170
+ dragClass: string;
171
+ droppableClass: string;
172
+ dropClass: string;
173
+ cancelDrag: boolean;
174
+ onDragStart: (...params: any[]) => any;
175
+ onDrag: (...params: any[]) => any;
176
+ onDragEnd: (...params: any[]) => any;
177
+ onDroppableEnter: (...params: any[]) => any;
178
+ onDroppable: (...params: any[]) => any;
179
+ onDroppableLeave: (...params: any[]) => any;
180
+ onDrop: (...params: any[]) => any;
181
+ };
182
+ /**
183
+ * @property element - <p>The specified HTMLElement.</p>
184
+ * @property settings - <p>The specified settings.</p>
185
+ * @property disabled - <p>A value indicating if the draggable functionality is disabled.</p>
186
+ * @property enable - <p>Enables the specified element to be draggable.</p>
187
+ * @property disable - <p>Disables the specified element to be draggable.</p>
188
+ * @property startDrag - <p>Starts the dragging.</p>
189
+ * @property endDrag - <p>Ends the dragging.</p>
190
+ */
191
+ type DraggableController = {
192
+ element: HTMLElement;
193
+ settings: any;
194
+ disabled: boolean;
195
+ enable: (...params: any[]) => any;
196
+ disable: (...params: any[]) => any;
197
+ startDrag: (...params: any[]) => any;
198
+ endDrag: (...params: any[]) => any;
199
+ };
200
+ /**
201
+ * @property resizeHandles - <p>Resize handle object (key, value).</p>
202
+ * <ul>
203
+ * <li>key: resize direction s, e or se.</li>
204
+ * <li>value: HTMLElement.</li>
205
+ * </ul>
206
+ * @property resizeGhost - <p>Visible element when resizing.</p>
207
+ * @property boundaryZone - <p>Defines the resize boundaries.</p>
208
+ * @property defaultHandles - <p>Defines if default resize handles are applied.</p>
209
+ * @property ghostOnly - <p>Defines that only the ghost element must be visible when resizing.</p>
210
+ * @property minResizeX - <p>Minimum change in pixels before the horizontal resizing starts.</p>
211
+ * @property minResizeY - <p>Minimum change in pixels before the vertcial resizing starts.</p>
212
+ * @property tickX - <p>Horizontal tick size.</p>
213
+ * @property tickY - <p>Vertical tick size.</p>
214
+ * @property resizeClass - <p>CSS class applied to the element when resizing.</p>
215
+ * @property onResizeStart - <p>Event callback method.</p>
216
+ * @property onResize - <p>Event callback method.</p>
217
+ * @property onResizeEnd - <p>Event callback method.</p>
218
+ */
219
+ type ResizableSettings = {
220
+ resizeHandles: any;
221
+ resizeGhost: HTMLElement;
222
+ boundaryZone: HTMLElement;
223
+ defaultHandles: boolean;
224
+ ghostOnly: boolean;
225
+ minResizeX: number;
226
+ minResizeY: number;
227
+ tickX: number;
228
+ tickY: number;
229
+ resizeClass: string;
230
+ onResizeStart: (...params: any[]) => any;
231
+ onResize: (...params: any[]) => any;
232
+ onResizeEnd: (...params: any[]) => any;
233
+ };
234
+ /**
235
+ * @property element - <p>The specified HTMLElement.</p>
236
+ * @property settings - <p>The specified</p>
237
+ * @property disabled - <p>A value indicating if the resizable functionality is disabled.</p>
238
+ * @property enable - <p>Enables the specified element to be resizable.</p>
239
+ * @property disable - <p>Disables the specified element to be resizable.</p>
240
+ */
241
+ type ResizableController = {
242
+ element: HTMLElement;
243
+ settings: any;
244
+ disabled: boolean;
245
+ enable: (...params: any[]) => any;
246
+ disable: (...params: any[]) => any;
247
+ };
248
+ /**
249
+ * @property dragZone - <p>Defines the zone from where a drag select can be started.</p>
250
+ * @property selectZone - <p>Defines the zone with selectable elements.</p>
251
+ * @property include - <p>Elements to include (by default all child elements of the selectZone are included).</p>
252
+ * @property exclude - <p>Elements to exclude. Setting is ignored if elements are explicitly specified with the include setting.</p>
253
+ * @property includeTags - <p>Space separated list of tags to include. Setting is ignored if elements are explicitly specified with the include setting.</p>
254
+ * @property excludeTags - <p>Space separated list of tags to exclude. Setting is ignored if elements are explicitly specified with the include setting.</p>
255
+ * @property liveUpdate - <p>When set to true the onSelect event is fired while dragging otherwise the event is fired when the drag selection ends.</p>
256
+ * @property clearOnOutsideClick - <p>Indicates if the selection should be cleared on a click outside the dragZone.</p>
257
+ * @property toggleDragSelect - <p>Deselects the selected element(s) on a drag select.</p>
258
+ * @property toggleClickSelect - <p>Deselects the selected element(s) on a click select.</p>
259
+ * @property appendDragSelect - <p>Appends the current selection on a drag select.</p>
260
+ * @property appendClickSelect - <p>Appends the current selection on a click select.</p>
261
+ * @property shiftSelect - <p>Defines if shift key selection is enabled.</p>
262
+ * @property ctrlSelect - <p>Defines if ctrl key selection is enabled.</p>
263
+ * @property scrollOffsetX - <p>Defines the horizontal scroll offset within the dragZone.</p>
264
+ * @property scrollOffsetY - <p>Defines the vertical scroll offset within the dragZone.</p>
265
+ * @property selectMode - <ul>
266
+ * <li>0: drag_click</li>
267
+ * <li>1: drag</li>
268
+ * <li>2: click</li>
269
+ * </ul>
270
+ * @property dragSelectionClass - <p>CSS class of the drag selection.</p>
271
+ * @property selectedClass - <p>CSS class applied to the element when selected.</p>
272
+ * @property onDragStart - <p>Event callback method.</p>
273
+ * @property onDrag - <p>Event callback method.</p>
274
+ * @property onDragEnd - <p>Event callback method.</p>
275
+ * @property onSelect - <p>Event callback method.</p>
276
+ */
277
+ type SelectableSettings = {
278
+ dragZone: HTMLElement;
279
+ selectZone: HTMLElement;
280
+ include: HTMLElement[];
281
+ exclude: HTMLElement[];
282
+ includeTags: string;
283
+ excludeTags: string;
284
+ liveUpdate: boolean;
285
+ clearOnOutsideClick: boolean;
286
+ toggleDragSelect: boolean;
287
+ toggleClickSelect: boolean;
288
+ appendDragSelect: boolean;
289
+ appendClickSelect: boolean;
290
+ shiftSelect: boolean;
291
+ ctrlSelect: boolean;
292
+ scrollOffsetX: number;
293
+ scrollOffsetY: number;
294
+ selectMode: number | string;
295
+ dragSelectionClass: string;
296
+ selectedClass: string;
297
+ onDragStart: (...params: any[]) => any;
298
+ onDrag: (...params: any[]) => any;
299
+ onDragEnd: (...params: any[]) => any;
300
+ onSelect: (...params: any[]) => any;
301
+ };
302
+ /**
303
+ * @property element - <p>The specified HTMLElement.</p>
304
+ * @property settings - <p>The specified settings.</p>
305
+ * @property disabled - <p>A value indicating if the selectable functionality is disabled.</p>
306
+ * @property enable - <p>Enables the selectability for all elements in the list of selectable elements.</p>
307
+ * @property disable - <p>Disables the selectability for all elements in the list of selectable elements.</p>
308
+ * @property update - <p>Updates the list of selectable elements and removes event bindings for previous selectable elements.</p>
309
+ * @property deselect - <p>Deselects all selected element(s) from the list of selectable elements. Optional argument: A Boolean value indicating if the select event should fire.</p>
310
+ * @property select - <p>Selects all element(s) from the list of selectable elements. Optional argument: A Boolean value indicating if the select event should fire.</p>
311
+ * @property getSelectable - <p>Returns an array of all selectable elements in the following format: at index [0]: element, at index [1]:bounding client rectangle.</p>
312
+ * @property getSelection - <p>Returns an array of all selected elements.</p>
313
+ */
314
+ type SelectableController = {
315
+ element: HTMLElement;
316
+ settings: any;
317
+ disabled: boolean;
318
+ enable: (...params: any[]) => any;
319
+ disable: (...params: any[]) => any;
320
+ update: (...params: any[]) => any;
321
+ deselect: (...params: any[]) => any;
322
+ select: (...params: any[]) => any;
323
+ getSelectable: (...params: any[]) => any;
324
+ getSelection: (...params: any[]) => any;
325
+ };
326
+ /**
327
+ * @property top - <p>Defines if the top of the element is visible.</p>
328
+ * @property right - <p>Defines if the right of the element is visible.</p>
329
+ * @property bottom - <p>Defines if the bottom of the element is visible.</p>
330
+ * @property left - <p>Defines if the left of the element is visible.</p>
331
+ * @property visible - <p>Defines if the element is partially visible.</p>
332
+ * @property full - <p>Defines if the element is fully visible.</p>
333
+ */
334
+ type Viewport = {
335
+ top: boolean;
336
+ right: boolean;
337
+ bottom: boolean;
338
+ left: boolean;
339
+ visible: boolean;
340
+ full: boolean;
341
+ };
342
+ /**
343
+ * @property xhr - <p>The xhr object.</p>
344
+ * @property settings - <p>The initial settings object.</p>
345
+ * @property abort - <p>A method to abort the running xhr request. Different to xhr.abort() in that it will also abort a repeating call specified with settings.repeatInterval.</p>
346
+ */
347
+ type XhrWrappedResult = {
348
+ xhr: XMLHttpRequest;
349
+ settings: any;
350
+ abort: componyx.library.XhrAbortFunction;
351
+ };
352
+ /**
353
+ * <p>A function to abort the active xhr request.</p>
354
+ * @param stopRepeat - <p>Stops the repeating xhr call cycle when a repeatInterval was specified in the xhr settings.</p>
355
+ */
356
+ type XhrAbortFunction = (stopRepeat: boolean) => void;
357
+ /**
358
+ * <p>Callback for xhr events.</p>
359
+ * @param args - <p>An object used as argument for XHR callbacks.</p>
360
+ * @param args.xhr - <p>The xhr object.</p>
361
+ * @param args.settings - <p>The settings of the xhr.</p>
362
+ * @param args.data - <p>The response data.</p>
363
+ * @param args.timeout - <p>A value indicating if the request timed out.</p>
364
+ * @param args.event - <p>A progress event (onProgress and onUploadProgress).</p>
365
+ */
366
+ type XhrCallback = (args: {
367
+ xhr: XMLHttpRequest;
368
+ settings: componyx.library.xhrSettings;
369
+ data: any;
370
+ timeout: boolean;
371
+ event: ProgressEvent;
372
+ }) => void;
373
+ /**
374
+ * <p>Callback for iteration.</p>
375
+ * @param item - <p>The current item in the iteration.</p>
376
+ * @param index - <p>The current array index or object key.</p>
377
+ * @param object - <p>The object that is being iterated.</p>
378
+ * @param args - <p>The initial arguments that were provided with the 'each' method call.</p>
379
+ * @param next - <p>A callback function to retrieve the next item from the iteration.</p>
380
+ */
381
+ type EachCallback = (item: any, index: number | string, object: any | object[], args: any, next: (...params: any[]) => any) => void;
382
+ /**
383
+ * <p>An object for binding and handling events.</p>
384
+ * @template THandler - The signature of the event handlers. Defaults to an untyped handler.
385
+ */
386
+ interface Event<THandler extends (...params: any[]) => any = (...params: any[]) => any>
387
+ {
388
+ /**
389
+ * <p>Adds a fire once event handler for the event.</p>
390
+ * @param handler - <p>Callback method to invoke when the event fires. Event can be cancelled by returning false.</p>
391
+ * @returns <p>The unique id of the event-handler.</p>
392
+ */
393
+ once(handler: THandler, args?: null): string;
394
+ /**
395
+ * <p>Adds a fire once event handler for the event. With custom handler arguments the handler signature is not typed, since the custom arguments change the parameters the handler receives.</p>
396
+ * @param handler - <p>Callback method to invoke when the event fires. Event can be cancelled by returning false.</p>
397
+ * @param args - <p>Arguments to pass to the specified event handler when the event fires.</p>
398
+ * @returns <p>The unique id of the event-handler.</p>
399
+ */
400
+ once(handler: (...params: any[]) => any, args: object): string;
401
+ /**
402
+ * <p>Adds an event handler for the event.</p>
403
+ * @param handler - <p>Callback method to invoke when the event fires. Event can be cancelled by returning false.</p>
404
+ * @param [args] - <p>Pass null (or omit) when no custom arguments are used.</p>
405
+ * @param [fireOnce] - <p>A value indicating if the handler will fire only once which means that the handler is removed from the event directly after execution.</p>
406
+ * @returns <p>The unique id of the event-handler.</p>
407
+ */
408
+ add(handler: THandler, args?: null, fireOnce?: boolean): string;
409
+ /**
410
+ * <p>Adds an event handler for the event. With custom handler arguments the handler signature is not typed, since the custom arguments change the parameters the handler receives.</p>
411
+ * @param handler - <p>Callback method to invoke when the event fires. Event can be cancelled by returning false.</p>
412
+ * @param args - <p>Arguments to pass to the specified event handler when the event fires.</p>
413
+ * @param [fireOnce] - <p>A value indicating if the handler will fire only once which means that the handler is removed from the event directly after execution.</p>
414
+ * @returns <p>The unique id of the event-handler.</p>
415
+ */
416
+ add(handler: (...params: any[]) => any, args: object, fireOnce?: boolean): string;
417
+ /**
418
+ * <p>Checks if the event handler is attached.</p>
419
+ * @param handler - <p>The event handler to check.</p>
420
+ * @returns <p>A value indicating if the handler is already present on the event.</p>
421
+ */
422
+ has(handler: (...params: any[]) => any): boolean;
423
+ /**
424
+ * <p>Removes an event handler for the event.</p>
425
+ * @param handler - <p>The event handler to remove.</p>
426
+ */
427
+ remove(handler: (...params: any[]) => any): void;
428
+ /**
429
+ * <p>Removes all event handlers for the event.</p>
430
+ */
431
+ removeAll(): void;
432
+ /**
433
+ * <p>Disables the event until the current call stack is finished by using a setTimeout() call.</p>
434
+ * @param [priorityHandler = false] - <p>Indicates whether to disable the priority handler instead of the main handler. Should generally remain false when called by client code.</p>
435
+ */
436
+ disable(priorityHandler?: boolean): void;
437
+ /**
438
+ * <p>Re-enables disabled events directly.</p>
439
+ * @param [priorityHandler = false] - <p>Indicates whether to enable the disabled priority handler instead of the main handler. Should generally remain false when called by client code.</p>
440
+ */
441
+ enable(priorityHandler?: boolean): void;
442
+ /**
443
+ * <p>Adds an event handler with priority. This method should not be invoked by client code directly but only from inside component code. Priority handlers should only be used within a framework where the internal handler should be called before anything else.</p>
444
+ * @param handler - <p>Callback method to invoke when the event fires.</p>
445
+ * @param [args] - <p>Pass null (or omit) when no custom arguments are used.</p>
446
+ * @param [fireOnce] - <p>A value indicating if the handler will fire only once which means that the handler is removed from the event directly after execution.</p>
447
+ * @returns <p>The unique id of the event-handler.</p>
448
+ */
449
+ priorityAdd(handler: THandler, args?: null, fireOnce?: boolean): string;
450
+ /**
451
+ * <p>Adds an event handler with priority, with custom handler arguments. This method should not be invoked by client code directly but only from inside component code.</p>
452
+ * @param handler - <p>Callback method to invoke when the event fires.</p>
453
+ * @param args - <p>Arguments to pass to the specified event handler when the event fires.</p>
454
+ * @param [fireOnce] - <p>A value indicating if the handler will fire only once which means that the handler is removed from the event directly after execution.</p>
455
+ * @returns <p>The unique id of the event-handler.</p>
456
+ */
457
+ priorityAdd(handler: (...params: any[]) => any, args: object, fireOnce?: boolean): string;
458
+ /**
459
+ * <p>Removes all event handlers for the event. This method should not be invoked by client code directly but only from inside component code.</p>
460
+ * @param [eventPriority] - <p>The priority of the events to remove, null/0 for both normal and priority events, 1 for normal events only, 2 for priority events only.</p>
461
+ */
462
+ priorityRemove(eventPriority?: number): void;
463
+ /**
464
+ * <p>Fires the event. This method should not be invoked by client code directly but only from inside component code.</p>
465
+ * @param context - <p>The context (this) for which the method is invoked.</p>
466
+ * @param [args] - <p>A single argument or a list of arguments to pass to the event handlers.</p>
467
+ * @returns <p>The handler result, or a Promise when a handler returned a Promise.</p>
468
+ */
469
+ fire(context: any, args?: any): any;
470
+ /**
471
+ * <p>Checks if a handler is bound.</p>
472
+ * @returns <p>A value indicating if a handler is bound to the event.</p>
473
+ */
474
+ isBound(): boolean;
475
+ /**
476
+ * <p>Gets all bound event handlers.</p>
477
+ * @returns <p>A list of bound handlers.</p>
478
+ */
479
+ handlers(): any;
480
+ /**
481
+ * <p>Gets all bound priority event handlers.</p>
482
+ * @returns <p>A list of bound handlers.</p>
483
+ */
484
+ priorityHandlers(): any;
485
+ }
486
+ /**
487
+ * <p>Path class for navigating recursive data arrays.</p>
488
+ * @property items - <p>The array containing all the items.</p>
489
+ * @property recursionKey - <p>The object key that points to the child items.</p>
490
+ * @property item - <p>The current item.</p>
491
+ * @property children - <p>The child items of the current item.</p>
492
+ * @property tree - <p>The tree path of the current item.</p>
493
+ * @property index - <p>The index of the current item.</p>
494
+ * @property startTree - <p>The start tree of the path.</p>
495
+ * @param items - <p>An array of items.</p>
496
+ * @param recursionKey - <p>The object key which points to the child items array. Separate object keys with a dot &quot;.&quot; to denote a deeper level.</p>
497
+ * @param tree - <p>The tree path of the current item.</p>
498
+ * @param item - <p>Current item.</p>
499
+ */
500
+ interface Path
501
+ {
502
+ /**
503
+ * <p>Creates a new Path object instance with the current tree position.</p>
504
+ * @returns <p>The new Path instance.</p>
505
+ */
506
+ create(): Path;
507
+ /**
508
+ * <p>Navigates to the starting item.</p>
509
+ * @returns <p>The current Path instance.</p>
510
+ */
511
+ start(): Path;
512
+ /**
513
+ * <p>Navigates to the root item.</p>
514
+ * @returns <p>The current Path instance.</p>
515
+ */
516
+ root(): Path;
517
+ /**
518
+ * <p>Checks if the current item has a parent item.</p>
519
+ * @returns <p>A value indicating if the current item has a parent item.</p>
520
+ */
521
+ hasParent(): boolean;
522
+ /**
523
+ * <p>Navigates to the parent item.</p>
524
+ * @returns <p>The current Path instance.</p>
525
+ */
526
+ parent(): Path;
527
+ /**
528
+ * <p>Navigates to the first item on the current level.</p>
529
+ * @returns <p>The current Path instance.</p>
530
+ */
531
+ first(): Path;
532
+ /**
533
+ * <p>Navigates to the last item on the current level.</p>
534
+ * @returns <p>The current Path instance.</p>
535
+ */
536
+ last(): Path;
537
+ /**
538
+ * <p>Navigates to the previous item on the current level.</p>
539
+ * @returns <p>The current Path instance.</p>
540
+ */
541
+ previous(): Path;
542
+ /**
543
+ * <p>Navigates to the next item on the current level.</p>
544
+ * @returns <p>The current Path instance.</p>
545
+ */
546
+ next(): Path;
547
+ /**
548
+ * <p>Navigates to the item with the specified index on the current level.</p>
549
+ * @returns <p>The current Path instance.</p>
550
+ */
551
+ sibling(): Path;
552
+ /**
553
+ * <p>Navigates to the child item with the specified index.</p>
554
+ * @returns <p>The current Path instance.</p>
555
+ */
556
+ child(): Path;
557
+ /**
558
+ * <p>Navigates to the first child item.</p>
559
+ * @returns <p>The current Path instance.</p>
560
+ */
561
+ firstChild(): Path;
562
+ /**
563
+ * <p>Navigates to the last child item.</p>
564
+ * @returns <p>The current Path instance.</p>
565
+ */
566
+ lastChild(): Path;
567
+ /**
568
+ * <p>Returns the length of the items array at the current level.</p>
569
+ * @returns <p>The length of the items array.</p>
570
+ */
571
+ length(): number;
572
+ /**
573
+ * <p>Iterates through the items in the array and evaluates each object against the specified comparer function.
574
+ * The iteration is called recursively when the recursionKey is found on an object.</p>
575
+ * @returns <p>A new instance of the Path object.</p>
576
+ */
577
+ path(): Path;
578
+ /**
579
+ * <p>The array containing all the items.</p>
580
+ */
581
+ items: any[];
582
+ /**
583
+ * <p>The object key that points to the child items.</p>
584
+ */
585
+ recursionKey: string;
586
+ /**
587
+ * <p>The current item.</p>
588
+ */
589
+ item: any;
590
+ /**
591
+ * <p>The child items of the current item.</p>
592
+ */
593
+ children: any[];
594
+ /**
595
+ * <p>The tree path of the current item.</p>
596
+ */
597
+ tree: any[];
598
+ /**
599
+ * <p>The index of the current item.</p>
600
+ */
601
+ index: number;
602
+ /**
603
+ * <p>The start tree of the path.</p>
604
+ */
605
+ startTree: any[];
606
+ }
607
+ /**
608
+ * <p>Animation class.</p>
609
+ * @property id - <p>The unique id of the animation.</p>
610
+ * @property e - <p>The elements involved in the animation.</p>
611
+ * @property p - <p>The element properties that will be animated.</p>
612
+ * @property s - <p>The settings of the animation.</p>
613
+ * @property startTime - <p>The start time of the animation.</p>
614
+ * @property elapsedTime - <p>The elapsed time of the animation.</p>
615
+ * @property isReverse - <p>A value indicating if the animation is being played backwards.</p>
616
+ * @property state - <p>The current animation state: STARTED: 0, PLAYING: 1, PAUSED: 2, COMPLETED: 3, STOPPED: 4</p>
617
+ */
618
+ interface Animation
619
+ {
620
+ /**
621
+ * <p>Starts the animation.</p>
622
+ */
623
+ start(): void;
624
+ /**
625
+ * <p>Plays/continues the animation if it is not yet playing.</p>
626
+ */
627
+ play(): void;
628
+ /**
629
+ * <p>Pauses the animation.</p>
630
+ */
631
+ pause(): void;
632
+ /**
633
+ * <p>Completes the animation by skipping to the final frame.</p>
634
+ */
635
+ complete(): void;
636
+ /**
637
+ * <p>Stops the animation.</p>
638
+ */
639
+ stop(): void;
640
+ /**
641
+ * <p>Plays the animation backwards.</p>
642
+ */
643
+ reverse(): void;
644
+ /**
645
+ * <p>Kills the animation.</p>
646
+ */
647
+ kill(): void;
648
+ /**
649
+ * <p>Updates a frame in the animation.</p>
650
+ */
651
+ update(): void;
652
+ /**
653
+ * <p>The unique id of the animation.</p>
654
+ */
655
+ id: string;
656
+ /**
657
+ * <p>The elements involved in the animation.</p>
658
+ */
659
+ e: HTMLElement[];
660
+ /**
661
+ * <p>The element properties that will be animated.</p>
662
+ */
663
+ p: any;
664
+ /**
665
+ * <p>The settings of the animation.</p>
666
+ */
667
+ s: any;
668
+ /**
669
+ * <p>The start time of the animation.</p>
670
+ */
671
+ startTime: number;
672
+ /**
673
+ * <p>The elapsed time of the animation.</p>
674
+ */
675
+ elapsedTime: any[];
676
+ /**
677
+ * <p>A value indicating if the animation is being played backwards.</p>
678
+ */
679
+ isReverse: boolean;
680
+ /**
681
+ * <p>The current animation state: STARTED: 0, PLAYING: 1, PAUSED: 2, COMPLETED: 3, STOPPED: 4</p>
682
+ */
683
+ state: number;
684
+ }
685
+ /**
686
+ * <p>Global Animation settings.</p>
687
+ * @property duration - <p>The duration of the animation.</p>
688
+ * @property interval - <p>The interval of the update function.</p>
689
+ * @property easing - <p>The animation easing setting.</p>
690
+ * @property easeBackOvershoot - <p>Defines the easeBackOvershoot value for the easeBack method.</p>
691
+ * @property onFrame - <p>A callback method which is called for every frame update.</p>
692
+ * @property onStop - <p>A callback method which is called when the animation is stopped</p>
693
+ * @property onComplete - <p>A callback method which is called when the animation is completed.</p>
694
+ */
695
+ type animationSettings = {
696
+ duration: number;
697
+ interval: number;
698
+ easing: string;
699
+ easeBackOvershoot: number;
700
+ onFrame: (...params: any[]) => any;
701
+ onStop: (...params: any[]) => any;
702
+ onComplete: (...params: any[]) => any;
703
+ };
704
+
705
+ /**
706
+ * Handle returned by {@link componyx.library.cssAnimation} to control an in-progress CSS animation/transition.
707
+ */
708
+ type cssAnimationController = {
709
+ /** Function to abort the animation by removing the animation class. */
710
+ abort: () => void;
711
+ /** Function to complete the animation by removing the animation class and firing the onComplete handler. */
712
+ complete: () => void;
713
+ };
714
+ /**
715
+ * <p>Global HTTP(S) request events for the following methods: xhr(), addCssSource() and addScriptSource().</p>
716
+ * @property onStart - <p>Event which fires before an HTTP request.</p>
717
+ * @property onComplete - <p>Event which fires after an HTTP request.</p>
718
+ * @property onSuccess - <p>Event which fires when an HTTP request was successful (status 200).</p>
719
+ * @property onError - <p>Event which fires when an HTTP request returned an error.</p>
720
+ * @property onAbort - <p>Event which fires when an HTTP request is aborted.</p>
721
+ */
722
+ type httpRequestHandlers = {
723
+ onStart: componyx.library.Event;
724
+ onComplete: componyx.library.Event;
725
+ onSuccess: componyx.library.Event;
726
+ onError: componyx.library.Event;
727
+ onAbort: componyx.library.Event;
728
+ };
729
+ /**
730
+ * <p>Global XMLHttpRequest (AJAX) settings which apply to all xhr requests, unless overridden on the xhr method call.</p>
731
+ * @property xhr - <p>Object instance to use for the xhr request.</p>
732
+ * @property url - <p>Defines the uniform resource locator.</p>
733
+ * @property data - <p>Defines the data to send with the request as URL parameters or JSON String/Object.</p>
734
+ * @property responseType - <p>Defines the type of the response.</p>
735
+ * @property method - <p>Defines the HTTP request method (GET or POST). The setting requestMethod is supported for backwards compatibility.</p>
736
+ * @property contentType - <p>Defines the HTTP request content type. The setting requestContentType is supported for backwards compatibility.</p>
737
+ * @property headers - <p>Defines the HTTP request headers (key value pair). The setting requestHeaders is supported for backwards compatibility.</p>
738
+ * @property jsonResponseDataWrapper - <p>Defines the JSON response data wrapper. e.g. ASP.NET uses d as default data wrapper.</p>
739
+ * @property jsonDeserializer - <p>Defines the custom JSON deserializer method.</p>
740
+ * @property jsonParseWrappedDataString - <p>Defines if the data within the JSON response data wrapper should be parsed again if it is of type String.</p>
741
+ * @property async - <p>Defines if the request is synchronous or asynchronous (default).</p>
742
+ * @property timeout - <p>Defines the timeout in milliseconds before the request is aborted.</p>
743
+ * @property repeatInterval - <p>Defines the interval in milliseconds between repeating xhr requests.</p>
744
+ * @property onStart - <p>Defines the callback function to call before the request.</p>
745
+ * @property onComplete - <p>Defines the callback function to call after the request.</p>
746
+ * @property onSuccess - <p>Defines the callback function to call when the request was successful.</p>
747
+ * @property onError - <p>the callback function to call when the HTTP request failed. (HTTP status &gt;= 200 and &lt; 300).</p>
748
+ * @property onAbort - <p>Defines the callback function to call when the request was aborted.</p>
749
+ * @property onProgress - <p>Defines the callback function to call when there is a change in the download progress.</p>
750
+ * @property onUploadProgress - <p>Defines the callback function to call when there is a change in the upload progress.</p>
751
+ * @property onUploadError - <p>Defines the callback function to call when the upload failed.</p>
752
+ */
753
+ type xhrSettings = {
754
+ xhr: XMLHttpRequest;
755
+ url: string;
756
+ data: string | any | FormData;
757
+ responseType: string;
758
+ method: string;
759
+ contentType: string;
760
+ headers: any;
761
+ jsonResponseDataWrapper: string;
762
+ jsonDeserializer: (...params: any[]) => any;
763
+ jsonParseWrappedDataString: boolean;
764
+ async: boolean;
765
+ timeout: number;
766
+ repeatInterval: number;
767
+ onStart: componyx.library.XhrCallback;
768
+ onComplete: componyx.library.XhrCallback;
769
+ onSuccess: componyx.library.XhrCallback;
770
+ onError: componyx.library.XhrCallback;
771
+ onAbort: componyx.library.XhrCallback;
772
+ onProgress: componyx.library.XhrCallback;
773
+ onUploadProgress: componyx.library.XhrCallback;
774
+ onUploadError: componyx.library.XhrCallback;
775
+ };
776
+ /**
777
+ * <p>Global WebSocket settings which apply to all WebSocket connections, unless overridden on the ws method call.</p>
778
+ * @property url - <p>Defines the uniform resource locator.</p>
779
+ * @property binaryType - <p>A value indicating the type of binary data being transmitted by the connection. This should be either &quot;blob&quot; if DOM Blob objects are being used or &quot;arraybuffer&quot; if ArrayBuffer objects are being used.</p>
780
+ * @property data - <p>Defines the initial data to send when the WebSocket connection is opened or retrieved from the pool.</p>
781
+ * @property pooling - <p>Defines if only a single WebSocket connection can be opened per client and URL (true by default).</p>
782
+ * @property onOpen - <p>Defines the callback function to call when the WebSocket connection is opened.</p>
783
+ * @property onClose - <p>Defines the callback function to call when the WebSocket connection is closed.</p>
784
+ * @property onMessage - <p>Defines the callback function to call when a message is received.</p>
785
+ * @property onError - <p>Defines the callback function when a WebSocket error occurs.</p>
786
+ */
787
+ type wsSettings = {
788
+ url: string;
789
+ binaryType: string;
790
+ data: string | JSON;
791
+ pooling: boolean;
792
+ onOpen: (...params: any[]) => any;
793
+ onClose: (...params: any[]) => any;
794
+ onMessage: (...params: any[]) => any;
795
+ onError: (...params: any[]) => any;
796
+ };
797
+ /**
798
+ * <p>JSON</p>
799
+ */
800
+ namespace JSON
801
+ {
802
+ /**
803
+ * <p>Serializer casing options.</p>
804
+ */
805
+ enum CasingOption
806
+ {
807
+ NONE = 0,
808
+ CAMELCASE = 1,
809
+ PASCALCASE = 2
810
+ }
811
+ /**
812
+ * <p>Serializer optimizer options.</p>
813
+ */
814
+ enum OptimizerOption
815
+ {
816
+ NONE = 0,
817
+ EXCLUDENULL = 1,
818
+ EXCLUDEFALSE = 2,
819
+ EXCLUDEZERO = 4,
820
+ EXCLUDEEMPTY = 8,
821
+ OPTIMIZED = 16
822
+ }
823
+ /**
824
+ * <p>Serializes an object to a JSON string.</p>
825
+ * @param obj - <p>Object to serialize.</p>
826
+ * @param casing - <p>Casing option.</p>
827
+ * @param optimizer - <p>Optimizer option(s).</p>
828
+ * @param properties - <p>List of property keys to include/exclude.</p>
829
+ * @param exclude - <p>Defines whether keys in the properties parameter should be included(default) or excluded.</p>
830
+ * @param replacer - <p>Replacer method to control property serialization.</p>
831
+ */
832
+ function serialize(obj: any, casing?: CasingOption, optimizer?: OptimizerOption, properties?: any, exclude?: boolean, replacer?: (...params: any[]) => any): string;
833
+ /**
834
+ * <p>Deserializes a JSON string to an object.</p>
835
+ * @param json - <p>JSON string to deserialize.</p>
836
+ * @param casing - <p>Casing option.</p>
837
+ * @param optimizer - <p>Optimizer option(s).</p>
838
+ * @param properties - <p>List of property keys to include/exclude.</p>
839
+ * @param exclude - <p>Defines whether keys in the properties parameter should be included(default) or excluded.</p>
840
+ * @param replacer - <p>Replacer method to control property serialization.</p>
841
+ */
842
+ function deserialize(json: string, casing?: CasingOption, optimizer?: OptimizerOption, properties?: any, exclude?: boolean, replacer?: (...params: any[]) => any): any;
843
+ }
844
+ }
845
+
846
+ /**
847
+ * <p>Search the DOM with the specified selector.
848
+ * Only the selector argument is required for an id search.</p>
849
+ * @property document - <p>The active document object.</p>
850
+ * @property touch - <p>A value indicating if we are dealing with a touch device.</p>
851
+ * @property event - <p>This variable will hold the last active HTML event object.</p>
852
+ * @property webSockets - <p>This variable will hold the active WebSocket connections.</p>
853
+ */
854
+ interface LibrarySelector
855
+ {
856
+ /**
857
+ * Search the DOM with the specified selector.
858
+ * @param selector -
859
+ * <ul>
860
+ * <li>null: no filter apart from baseElement and tagName.</li>
861
+ * <li>'#id': get single element by id.</li>
862
+ * <li>'class1 class2': get elements by class name(s).</li>
863
+ * <li>['class1 class2', callback]: get elements by class name(s) and use callback function to filter result.</li>
864
+ * <li>callback function: The callback function accepts two arguments and returns true to include or false to exclude the element from the result array.
865
+ * argument 1: The current element in the iteration.
866
+ * argument 2: A function reference to stop the iteration when called (optional).
867
+ * </li>
868
+ * </ul>
869
+ * @param baseElement - Element from where to start searching or null to start at the document.
870
+ * @param tagName - Name of tags to search or null to search all tags.
871
+ * @param scalar - A value indicating to return a single result which makes the iteration stop after a match (function or class selector only).
872
+ * @param upwards - A value indicating to iterate upwards through the DOM starting at the base element (does not work with class selectors).
873
+ * @returns HTMLElement or HTMLElement[]
874
+ */
875
+ // If selector is id (#id), always returns HTMLElement or null (assuming possible not found)
876
+ (selector: `#${string}`, baseElement?: HTMLElement | null, tagName?: string | null, scalar?: true, upwards?: boolean): HTMLElement | null;
877
+ (selector: `#${string}`, baseElement: HTMLElement | null | undefined, tagName: string | null | undefined, scalar: false, upwards?: boolean): HTMLElement | null;
878
+
879
+ // If selector is a string (class selectors or others) and scalar is true, return single element or null
880
+ (selector: string, baseElement: HTMLElement | null | undefined, tagName: string | null | undefined, scalar: true, upwards?: boolean): HTMLElement | null;
881
+ // If selector is a string and scalar is false or omitted, return array
882
+ (selector: string, baseElement?: HTMLElement | null, tagName?: string | null, scalar?: false, upwards?: boolean): HTMLElement[];
883
+
884
+ // If selector is a callback function and scalar is true, return single element or null
885
+ (selector: (el: HTMLElement, stop?: () => void) => boolean, baseElement: HTMLElement | null | undefined, tagName: string | null | undefined, scalar: true, upwards?: boolean): HTMLElement | null;
886
+ // If selector is callback function and scalar is false or omitted, return array
887
+ (selector: (el: HTMLElement, stop?: () => void) => boolean, baseElement?: HTMLElement | null, tagName?: string | null, scalar?: false, upwards?: boolean): HTMLElement[];
888
+
889
+ /**
890
+ * <p>Defines the prototype of an object and keeps the correct constructor.</p>
891
+ * @param obj - <p>The object to derive from the base object.</p>
892
+ * @param baseObj - <p>The base object that will become the prototype of the derived object.</p>
893
+ */
894
+ prototype(obj: any, baseObj: any): void;
895
+ }
896
+
897
+ /**
898
+ * <p>Library static methods.</p>
899
+ */
900
+ class library
901
+ {
902
+ /**
903
+ * <p>Creates a class instance for binding and handeling events.</p>
904
+ * @param eventName - <p>The name of the event.</p>
905
+ * @returns <p>An object for handeling events.</p>
906
+ */
907
+ static createEvent(eventName: string): componyx.library.Event;
908
+ /**
909
+ * <p>Generates a new unique id.</p>
910
+ * @returns <p>The generated id.</p>
911
+ */
912
+ static guid(): string;
913
+ /**
914
+ * <p>Emulates a namespace by creating an object hierarchy for the specified namespace text.</p>
915
+ * @param namespace - <p>Text with '.' separators as namespace.</p>
916
+ */
917
+ static registerNamespace(namespace: string): void;
918
+ /**
919
+ * <p>Enables the element(s) within a specified zone to be selectable.</p>
920
+ * @param settings - <p>The settings which configure the select behaviour.</p>
921
+ * @returns <p>An Object to control the selectable behaviour.</p>
922
+ */
923
+ static selectable(settings: componyx.library.SelectableSettings): componyx.library.SelectableController;
924
+ /**
925
+ * <p>Enables the specified element to be resizable.</p>
926
+ * @param element - <p>to make resizable.</p>
927
+ * @param settings - <p>The settings which configure the resize behaviour.</p>
928
+ * @returns <p>An Object to control the resizable behaviour.</p>
929
+ */
930
+ static resizable(element: HTMLElement, settings: componyx.library.ResizableSettings): componyx.library.ResizableController;
931
+ /**
932
+ * <p>Enables the specified element to be draggable.</p>
933
+ * @param element - <p>DOM element to make draggable.</p>
934
+ * @param settings - <p>The settings which configure the drag behaviour.</p>
935
+ * @returns <p>An Object to control the draggable behaviour.</p>
936
+ */
937
+ static draggable(element: HTMLElement, settings: componyx.library.DraggableSettings): componyx.library.DraggableController;
938
+ /**
939
+ * <p>Displays the element by fading it from transparent to opaque.
940
+ * When parameters are passed as array, they will be matched on array index.</p>
941
+ * @param element - <p>Element.</p>
942
+ * @param settings - <p>The settings which configure the animation.</p>
943
+ * @returns <p>The Animation object.</p>
944
+ */
945
+ static fadeIn(element: HTMLElement | HTMLElement[], settings: componyx.library.animationSettings): componyx.library.Animation;
946
+ /**
947
+ * <p>Hides the element by fading it from opaque to transparent.
948
+ * When parameters are passed as array, they will be matched on array index.</p>
949
+ * @param element - <p>Element.</p>
950
+ * @param settings - <p>The settings which configure the animation.</p>
951
+ * @returns <p>The Animation object.</p>
952
+ */
953
+ static fadeOut(element: HTMLElement | HTMLElement[], settings: componyx.library.animationSettings): componyx.library.Animation;
954
+ /**
955
+ * <p>Performs a slide transition effect to reveal an element by creating a clipping mask, applying animation classes, and then removing the mask upon completion.</p>
956
+ * @param element - <p>The target element to animate.</p>
957
+ * @param out - <p>If true, performs a slide/reveal OUT effect; otherwise, performs a slide/reveal IN effect.</p>
958
+ * @param effect - <p>The type of effect to use; expected values are &quot;slide&quot; or &quot;reveal&quot;.</p>
959
+ * @param direction - <p>The direction of the animation (e.g., &quot;left&quot;, &quot;right&quot;, &quot;up&quot;, &quot;down&quot;).</p>
960
+ * @param fade - <p>If true, the effect will include a fade transition.</p>
961
+ * @param onComplete - <p>Callback invoked when the transition completes.</p>
962
+ * @returns <p>abort - Function to abort the animation; pass false to abort without firing onComplete.</p>
963
+ */
964
+ static slide(element: HTMLElement, out?: boolean, effect?: string, direction?: string, fade?: boolean, onComplete?: (...params: any[]) => any): (...params: any[]) => any;
965
+
966
+ /**
967
+ * Applies a CSS animation/transition to an element by adding the specified classes and triggers the onComplete callback when the animation/transition ends.
968
+ * @param element - The element to animate.
969
+ * @param animationClass - The CSS class used to trigger the animation/transition.
970
+ * @param triggerElements - Array of child elements that are considered valid for triggering the animation/transition start/end events. If omitted only the main element will trigger.
971
+ * @param callbacks - An object to configure the event callbacks.
972
+ * @returns An object to abort/complete the css animation/transition.
973
+ */
974
+ static cssAnimation(element: HTMLElement, animationClass?: string, triggerElements?: HTMLElement[], callbacks?: { onComplete?: () => void; onStart?: () => void; isComplete?: () => boolean; }): componyx.library.cssAnimationController;
975
+
976
+ /**
977
+ * <p>Animates the element by transitioning the current css class(es) to the specified class(es).
978
+ * When parameters are passed as array, they will be matched on array index.</p>
979
+ * @param element - <p>Element.</p>
980
+ * @param cssClass - <p>Class name(s) string. Use space separated names to apply multiple classes on a single element.</p>
981
+ * @param classSpecifier - <p>The class specifier defines how classes are assigned to the element(s).
982
+ * By default classes are toggled, use classname: 'toggle/add/remove' for the desired behaviour.</p>
983
+ * @param settings - <p>The settings which configure the animation.</p>
984
+ * @returns <p>The Animation object.</p>
985
+ */
986
+ static animateToClass(element: HTMLElement | HTMLElement[], cssClass: string | String[], classSpecifier: any | object[], settings: componyx.library.animationSettings): componyx.library.Animation;
987
+ /**
988
+ * <p>Animates the element(s) by transitioning the current property values to the specified values.
989
+ * When both elements and properties are passed as array they will be matched on array index, otherwise the element(s) will use the properties object.</p>
990
+ * @param element - <p>Element.</p>
991
+ * @param properties - <p>Properties.
992
+ * A single property can be specified in two ways.
993
+ * property: value
994
+ * property: [value, settings] Animation settings or a numeric value to specify the duration only.</p>
995
+ * @param settings - <p>Animation settings or a numeric value to specify the duration only.</p>
996
+ * @returns <p>The Animation object.</p>
997
+ */
998
+ static animate(element: HTMLElement | HTMLElement[], properties: any | object[], settings: componyx.library.animationSettings | number): componyx.library.Animation;
999
+ /**
1000
+ * <p>Moves array elements from one position to another.</p>
1001
+ * @param list - <p>The array.</p>
1002
+ * @param index - <p>The position index of the element to move.</p>
1003
+ * @param targetIndex - <p>The position index where the elements are placed (current index in the array before moving).</p>
1004
+ * @param [amount = 1] - <p>The number of elements to be moved.</p>
1005
+ * @returns <p>The new index of the moved element(s). The index changes when elements are moved from top to bottom because the array will be re-ordered.</p>
1006
+ */
1007
+ static move(list: any[], index: number, targetIndex: number, amount?: number): number;
1008
+ /**
1009
+ * <p>Iterates through the items of the object or array and invokes the handler while passing in the item value, item key/index, the object/array and optional extra arguments.</p>
1010
+ * @example
1011
+ * // Traditional usage (positional arguments)
1012
+ $.each(['item-1', 'item-2'], (item, index, array, args) => { },['arg-1'], 0, false, null, false);
1013
+ * @example
1014
+ * // Using a settings object (all parameters are optional and can be selectively provided)
1015
+ $.each({
1016
+ object: ['item-1', 'item-2'],
1017
+ handler: (item, index, array, args) => { },
1018
+ args: ['arg-1'],
1019
+ startIndex: 0,
1020
+ manualFetching: false,
1021
+ last: null,
1022
+ reverse: false
1023
+ });
1024
+ * @param object - <p>An object or array to iterate or a settings object holding the properties to configure the each call.</p>
1025
+ * @param callback - <p>A delegate handler that is invoked for each item.</p>
1026
+ * @param args - <p>An array of extra arguments to pass to the handler.</p>
1027
+ * @param startIndex - <p>The start position of the iteration when dealing with an Array type.</p>
1028
+ * @param manualFetching - <p>A value indicating if manual fetching is required. This allows asynchronous code execution while performing an iteration. The fetcher method to manually move the iterator to the next item is passed to the handler as fifth argument.</p>
1029
+ * @param last - <p>A callback method to invoke when manualFetching is enabled and the last item has been iterated.</p>
1030
+ * @param reverse - <p>A value indicating if the iteration should move backwards. Reverse iteration is supported for arrays, and for objects only when manualFetching is true.</p>
1031
+ */
1032
+ static each(object: any | any[], callback: componyx.library.EachCallback, args?: any[], startIndex?: number, manualFetching?: boolean, last?: (...params: any[]) => any, reverse?: boolean): void;
1033
+ /**
1034
+ * <p>Copies properties from the source object (or function) to the target object.
1035
+ * Supports deep cloning, conditionally overwriting properties, circular reference protection and excluding specific values or types.</p>
1036
+ * @example
1037
+ * // Traditional usage (positional arguments)
1038
+ $.clone(target, source, true, 1, true, false, false, [], new Set(), { MyType: MyClass }, {});
1039
+ * @example
1040
+ * // Using a settings object (all parameters are optional and can be selectively provided)
1041
+ $.clone({
1042
+ target: target,
1043
+ source: source,
1044
+ deep: true,
1045
+ overwrite: 1,
1046
+ extend: true,
1047
+ excludeEmpty: false,
1048
+ excludeFunctions: false,
1049
+ exclude: [],
1050
+ omit: new Set(['password']),
1051
+ types: { MyType: MyClass },
1052
+ typeCheck: "type"
1053
+ converter: { date: (val) => new Date(val) },
1054
+ });
1055
+ * @param target - <p>The target object to which properties will be copied, or a settings object holding all configuration options.</p>
1056
+ * @param [source] - <p>The source object whose properties will be cloned to the target.</p>
1057
+ * @param [deep = false] - <p>If true, perform a deep copy (recursive cloning).</p>
1058
+ * @param [overwrite = false] - <p>Specifies how to overwrite existing properties on the target:</p>
1059
+ * <ul>
1060
+ * <li><code>0</code> or <code>false</code>: Do not overwrite existing properties.</li>
1061
+ * <li><code>1</code> or <code>true</code>: Overwrite existing properties.</li>
1062
+ * <li><code>2</code>: Overwrite only if the target property is <code>null</code> or <code>undefined</code>.</li>
1063
+ * </ul>
1064
+ * @param [extend = true] - <p>If true, new properties from the source will be added to the target object.</p>
1065
+ * @param [excludeEmpty = false] - <p>Defines if null, undefined, or empty values should be excluded from the source object:</p>
1066
+ * <ul>
1067
+ * <li><code>false</code>: Include null, undefined, or empty values.</li>
1068
+ * <li><code>true</code>: Exclude null, undefined, or empty values.</li>
1069
+ * <li><code>2</code>: Exclude when the target is a plain object type (clones value types only).</li>
1070
+ * </ul>
1071
+ * @param [excludeFunctions = false] - <p>If true, function properties will not be copied.</p>
1072
+ * @param [exclude] - <p>Tracks visited/excluded objects to handle circular references. [0] the object to match, [1] the object to return.</p>
1073
+ * @param [omit] - <p>A Set or Object specifying keys to omit from the source object.</p>
1074
+ * @param [types] - <p>An object mapping type names to their constructor functions.</p>
1075
+ * @param [typeCheck = "constructor"] - <p>How to determine type names: <code>&quot;constructor&quot;</code> (default) or a property name on the source.</p>
1076
+ * @param [converter] - <p>An object mapping source keys to custom converter functions.</p>
1077
+ * @param [report] - <p>An optional object used to report whether any target values were actually changed during cloning. If provided, its <code>changed</code> property is set to <code>true</code> the moment any property on the target is written.</p>
1078
+ * @returns <p>The updated target object after cloning.</p>
1079
+ */
1080
+ static clone(target: any | any, source?: any, deep?: boolean, overwrite?: number | boolean, extend?: boolean, excludeEmpty?: boolean, excludeFunctions?: boolean, exclude?: any[][], omit?: Set<any> | any, types?: {
1081
+ [key: string]: (...params: any[]) => void;
1082
+ }, typeCheck?: string, converter?: any, report?: any): any;
1083
+ /**
1084
+ * <p>Returns the name of the object's constructor.</p>
1085
+ * @param obj - <p>The Object to check.</p>
1086
+ * @returns <p>The constructor name.</p>
1087
+ */
1088
+ static getConstructor(obj: any): string;
1089
+ /**
1090
+ * <p>Gets the type of the object.</p>
1091
+ * @param obj - <p>The Object to check.</p>
1092
+ * @returns <p>Returns the object type as string.</p>
1093
+ */
1094
+ static type(obj: any): string;
1095
+ /**
1096
+ * <p>Gets the object's prototype.</p>
1097
+ * @param obj - <p>The Object from which the prototype is returned.</p>
1098
+ * @returns <p>Returns the object's prototype.</p>
1099
+ */
1100
+ static getPrototypeOf(obj: any): any;
1101
+ /**
1102
+ * <p>Checks if the passed object/array/string is null or empty.</p>
1103
+ * @param obj - <p>The Object to check.</p>
1104
+ * @param trim - <p>Removes leading and trailing white space characters, new lines and tabs from the specified string (Defaults to true).</p>
1105
+ * @returns <p>Returns true if the specified object is null or empty, otherwise false.</p>
1106
+ */
1107
+ static isEmpty(obj: any, trim?: boolean): boolean;
1108
+ /**
1109
+ * <p>Checks if the passed object is a plain object.</p>
1110
+ * @param obj - <p>The Object to check.</p>
1111
+ * @param [strict] - <p>A value indicating if custom class objects should NOT be considered a plain object.</p>
1112
+ * @returns <p>Returns true if the specified object is a plain object, otherwise false.</p>
1113
+ */
1114
+ static isPlainObject(obj: any, strict?: boolean): boolean;
1115
+ /**
1116
+ * <p>Checks if the passed object is a primative type.</p>
1117
+ * @param obj - <p>The Object to check.</p>
1118
+ * @returns <p>Returns true if the specified object is a primative type, otherwise false.</p>
1119
+ */
1120
+ static isPrimitive(obj: any): boolean;
1121
+ /**
1122
+ * <p>Checks if the passed object is an XML element.</p>
1123
+ * @param obj - <p>The Object to check.</p>
1124
+ * @returns <p>Returns true if the specified object is an XMLElement, otherwise false.</p>
1125
+ */
1126
+ static isXMLElement(obj: any): boolean;
1127
+ /**
1128
+ * <p>Checks if the passed object is an HTML element.</p>
1129
+ * @param obj - <p>The Object to check.</p>
1130
+ * @returns <p>Returns true if the specified object is an HTMLElement, otherwise false.</p>
1131
+ */
1132
+ static isElement(obj: any): boolean;
1133
+ /**
1134
+ * <p>Checks if the specified object is a DOM object.</p>
1135
+ * @param obj - <p>The Object to check.</p>
1136
+ * @returns <p>Returns true if the specified object is a DOM object, otherwise false.</p>
1137
+ */
1138
+ static isDOM(obj: any): boolean;
1139
+ /**
1140
+ * <p>Returns the window object associated with the specified node.</p>
1141
+ * @param node - <p>The node for which to return the associated window object.</p>
1142
+ * @returns <p>The window object associated with the specified node or null if specified obj is not of type Node.</p>
1143
+ */
1144
+ static defaultView(node: Node): Window;
1145
+ /**
1146
+ * <p>Checks if the passed object is an array.</p>
1147
+ * @param obj - <p>The Object to check.</p>
1148
+ * @returns <p>Returns true if the specified object is an array, otherwise false.</p>
1149
+ */
1150
+ static isArray(obj: any): boolean;
1151
+ /**
1152
+ * <p>Checks if the passed object is a date.</p>
1153
+ * @param obj - <p>The Object to check.</p>
1154
+ * @returns <p>Returns true if the specified object is a Date, otherwise false.</p>
1155
+ */
1156
+ static isDate(obj: any): boolean;
1157
+ /**
1158
+ * <p>Adds a handler which fires when the document is ready for manipulation, but before all resources have been loaded.</p>
1159
+ * @param handler - <p>A handler.</p>
1160
+ * @param args - <p>An array of arguments that should be passed to the handler.</p>
1161
+ * @param context - <p>The execution context object on which the handler is applied.</p>
1162
+ */
1163
+ static ready(handler: (...params: any[]) => any, args: any[], context: any): void;
1164
+ /**
1165
+ * <p>Attaches a fire once event handler to the specified object event(s).</p>
1166
+ * @param obj - <p>HTMLElement or object.</p>
1167
+ * @param eventType - <p>One or more event types separated by a space.</p>
1168
+ * @param handler - <p>A method containing executable code.</p>
1169
+ * @param [args] - <p>An array of arguments that should be passed to the event handler.</p>
1170
+ * @param [context] - <p>The execution context object on which the handler is applied, by default the DOM element/object on which the event is fired.</p>
1171
+ * @param [unique = false] - <p>A value indicating if event handlers for a specific object and event-type should exist only once.</p>
1172
+ * @returns <p>The generated guid of the handler.</p>
1173
+ */
1174
+ static once(obj: HTMLElement | any, eventType: string, handler: (...params: any[]) => any, args?: object[], context?: any, unique?: boolean): string;
1175
+ /**
1176
+ * <p>Attaches an event handler to the specified object event(s).</p>
1177
+ * @param obj - <p>HTMLElement, object, or settings object.</p>
1178
+ * @param eventType - <p>One or more event types separated by a space.</p>
1179
+ * @param handler - <p>A method containing executable code.</p>
1180
+ * @param [args] - <p>An array of arguments that should be passed to the event handler.</p>
1181
+ * @param [context] - <p>The execution context object on which the handler is applied.</p>
1182
+ * @param [unique = false] - <p>If true, only one handler per GUID is allowed.</p>
1183
+ * @param [fireOnce = false] - <p>If true, handler is removed after first run.</p>
1184
+ * @param [options] - <p>Native addEventListener options (capture, passive, once).</p>
1185
+ * @returns <p>The generated guid of the handler.</p>
1186
+ */
1187
+ static on(obj: HTMLElement | any | any, eventType: string, handler: (...params: any[]) => any, args?: object[], context?: any, unique?: boolean, fireOnce?: boolean, options?: any): string;
1188
+ /**
1189
+ * <p>Checks if the event handler is attached to the object for the specified event type.</p>
1190
+ * @param obj - <p>HTMLElement or object.</p>
1191
+ * @param eventType - <p>Event type.</p>
1192
+ * @param handler - <p>The handler or the handler guid returned from the bind method.</p>
1193
+ * @returns <p>True if the handler is bound, otherwise false.</p>
1194
+ */
1195
+ static has(obj: HTMLElement | any, eventType: string, handler: ((...params: any[]) => any) | string): boolean;
1196
+ /**
1197
+ * <p>Removes the attached event handler from the object for the specified type.</p>
1198
+ * @param obj - <p>HTMLElement or object.</p>
1199
+ * @param [eventType] - <p>Event type. Ommit to remove all bounded event handlers.</p>
1200
+ * @param [handler] - <p>The handler or the guid of the handler to remove. Ommit to remove all bounded event handlers for the specified event type.</p>
1201
+ */
1202
+ static off(obj: HTMLElement | any, eventType?: string, handler?: ((...params: any[]) => any) | string): void;
1203
+ /**
1204
+ * <p>Copies the events from the source to the target object.</p>
1205
+ * @param target - <p>HTMLElement or object.</p>
1206
+ * @param source - <p>HTMLElement or object.</p>
1207
+ * @returns <p>The target HTMLElement or object.</p>
1208
+ */
1209
+ static copyEvents(target: HTMLElement | any, source: HTMLElement | any): HTMLElement | any;
1210
+ /**
1211
+ * <p>Fires the HTML event of the specified type on the element</p>
1212
+ * @param element - <p>DOM element</p>
1213
+ * @param type - <p>HTMLEvent type</p>
1214
+ * @param [bubbles = false] - <p>A value indicating whether the event should bubble up through the event chain or not.</p>
1215
+ * @param [cancelable = false] - <p>A value indicating whether the event can be cancelled.</p>
1216
+ * @param [properties] - <p>Properties with which the event object will be extended.</p>
1217
+ */
1218
+ static fireEvent(element: HTMLElement, type: string, bubbles?: boolean, cancelable?: boolean, properties?: any): boolean;
1219
+ /**
1220
+ * <p>Adds the (X)HTML data to the specified element(s) and loads contained script and CSS resources.</p>
1221
+ * @param html - <p>The HTML string to add.</p>
1222
+ * @param [element] - <p>The Element to which the html will be appended.</p>
1223
+ * @param [mapping] - <p>A mapping object where the key refers to the id of the source element and the value refers to the target element or element id.</p>
1224
+ * @param [onComplete] - <p>Event callback method which is invoked when the html data is added and the resources are loaded.</p>
1225
+ */
1226
+ static addHTML(html: string, element?: HTMLElement, mapping?: any, onComplete?: (...params: any[]) => any): void;
1227
+ /**
1228
+ * <p>Loads (X)HTML data through an XML HTTP request and adds the data to the current document with the addHTML method (view addHTML comments for more info).</p>
1229
+ * @param settings - <p>The Settings which configure the xhr request. (view XhrSettings)</p>
1230
+ * @param element - <p>The Element to which the html will be appended.</p>
1231
+ * @param [mapping] - <p>A mapping object where the key refers to the id of the source element and the value refers to the target element or element id.</p>
1232
+ * @returns <p>An object wrapped around the xhr object.</p>
1233
+ */
1234
+ static load(settings: componyx.library.xhrSettings, element: HTMLElement, mapping?: any): componyx.library.XhrWrappedResult;
1235
+ /**
1236
+ * <p>Executes an XMLHTTP (AJAX) request.</p>
1237
+ * @param settings - <p>The settings which configure the xhr request (view xhrSettings).</p>
1238
+ * @returns <p>An object wrapped around the xhr object.</p>
1239
+ */
1240
+ static xhr(settings: componyx.library.xhrSettings): componyx.library.XhrWrappedResult;
1241
+ /**
1242
+ * <p>Creates a full-duplex WebSocket TCP connection.</p>
1243
+ * @param settings - <p>The settings which configure the WebSocket (view wsSettings).</p>
1244
+ * @returns <p>The WebSocket object.</p>
1245
+ */
1246
+ static ws(settings: componyx.library.wsSettings): WebSocket;
1247
+ /**
1248
+ * <p>Adds a script tag with the specified source and id to the page</p>
1249
+ * @param src - <p>The src of the tag</p>
1250
+ * @param id - <p>The id of the tag</p>
1251
+ * @param handlers.onStart - <p>The onStart is called when a new tag is added to the page.</p>
1252
+ * @param handlers.onComplete - <p>The onComplete is called when an HTTP request has finished.</p>
1253
+ * @param handlers.onError - <p>The onError is called when an HTTP request has failed.</p>
1254
+ * @param [async] - <p>A value indicating if the script should be loaded with the async option (false by default).</p>
1255
+ * @param [defer] - <p>A value indicating if the script should be loaded with the defer option (false by default).</p>
1256
+ * @param [before] - <p>The new tag will be placed before this tag if it was not already on the page.</p>
1257
+ * @returns <p>The created element.</p>
1258
+ */
1259
+ static addScriptSource(src: string, id: string, handlers: {
1260
+ onStart: any;
1261
+ onComplete: any;
1262
+ onError: any;
1263
+ }, async?: boolean, defer?: boolean, before?: HTMLElement): HTMLElement;
1264
+ /**
1265
+ * <p>Adds a css link tag with the specified source and id to the page</p>
1266
+ * @param src - <p>The src of the tag</p>
1267
+ * @param id - <p>The id of the tag</p>
1268
+ * @param handlers.onStart - <p>The onStart is called when a new tag is added to the page.</p>
1269
+ * @param handlers.onComplete - <p>The onComplete is called when an HTTP request has finished.</p>
1270
+ * @param handlers.onError - <p>The onError is called when an HTTP request has failed.</p>
1271
+ * @param [before] - <p>The new tag will be placed before this tag if it was not already on the page.</p>
1272
+ * @returns <p>The created element.</p>
1273
+ */
1274
+ static addCssSource(src: string, id: string, handlers: {
1275
+ onStart: any;
1276
+ onComplete: any;
1277
+ onError: any;
1278
+ }, before?: HTMLElement): HTMLElement;
1279
+ /**
1280
+ * <p>Adds an inline script tag with the specified text and id to the page.</p>
1281
+ * @param text - <p>Script text</p>
1282
+ * @param id - <p>Id of the script tag</p>
1283
+ * @param [before] - <p>The new tag will be placed before this tag when specified.</p>
1284
+ * @returns <p>The created element.</p>
1285
+ */
1286
+ static addScriptTag(text: string, id: string, before?: HTMLElement): HTMLElement;
1287
+ /**
1288
+ * <p>Adds an inline css style tag with the specified text and id to the page.</p>
1289
+ * @param text - <p>Css text</p>
1290
+ * @param id - <p>Id of the style tag</p>
1291
+ * @param [before] - <p>The new tag will be placed before this tag when specified.</p>
1292
+ * @returns <p>The created element.</p>
1293
+ */
1294
+ static addCssTag(text: string, id: string, before?: HTMLElement): HTMLElement;
1295
+ /**
1296
+ * <p>Inserts, updates or removes a CSS rule in the specified styleSheet.</p>
1297
+ * @param styleSheet - <p>The styleSheet in which the rule will be added, updated or removed.</p>
1298
+ * @param ruleIndex - <p>The position index for the rule within the styleSheet. Required if the selector parameter is not specified.</p>
1299
+ * @param selector - <p>Specify either the selector text for a new CSS rule or a matching text/regex for finding an existing CSS rule.</p>
1300
+ * @param style - <p>The CSS style value or null to remove the rule.</p>
1301
+ * @param [update] - <p>A value indicating if the style of the matching rule should be set (default) or updated.</p>
1302
+ * @returns <p>The position index of the rule within the styleSheet.</p>
1303
+ */
1304
+ static setCssRule(styleSheet: CSSStyleSheet, ruleIndex: number, selector: string | RegExp, style: string, update?: boolean): number;
1305
+ /**
1306
+ * <p>Gets CSS rules from the specified styleSheet.</p>
1307
+ * @param styleSheet - <p>The styleSheet in which the rule(s) exists.</p>
1308
+ * @param selector - <p>The selector text/regex to match rules.</p>
1309
+ * @returns <p>The found CSS rule(s).</p>
1310
+ */
1311
+ static getCssRule(styleSheet: CSSStyleSheet, selector: string): CSSRule[];
1312
+ /**
1313
+ * <p>Fires an HTTP request to the specified source every x milliseconds to keep the current HTTP session alive</p>
1314
+ * @param src - <p>Source location</p>
1315
+ * @param delay - <p>Refresh delay in milliseconds, 300000 milliseconds (5 minutes) by default</p>
1316
+ * @returns <p>A method to kill the keep alive</p>
1317
+ */
1318
+ static keepAlive(src: string, delay: number): (...params: any[]) => any;
1319
+ /**
1320
+ * <p>Creates a new HTMLElement.</p>
1321
+ * @example
1322
+ * // Traditional usage (positional arguments)
1323
+ $.element(container, before, 'div', 'Hello', { id: 'greeting' }, { className: 'text' });
1324
+ * @example
1325
+ * // Using a settings object (all parameters are optional and can be selectively provided)
1326
+ $.element({
1327
+ container: container,
1328
+ before: before,
1329
+ tagName: 'div',
1330
+ content: 'Hello',
1331
+ attrs: { id: 'greeting' },
1332
+ props: { className: 'text' }
1333
+ });
1334
+ * @param [container] - <p>The container element to append the new element to, or a settings object holding the properties to configure element creation.</p>
1335
+ * @param [before] - <p>The element to insert before (if using positional parameters).</p>
1336
+ * @param [tag = 'div'] - <p>The tag name for the new element.</p>
1337
+ * @param [content] - <p>The content of the new element. String[] is treated as HTML.</p>
1338
+ * @param [attrs] - <p>Attributes to set on the element.</p>
1339
+ * @param [props] - <p>Properties to set on the element.</p>
1340
+ * @returns <p>The created element.</p>
1341
+ */
1342
+ static element(container?: HTMLElement | any, before?: HTMLElement, tag?: string, content?: Node[] | Node | string | String[], attrs?: any, props?: any): HTMLElement;
1343
+ /**
1344
+ * <p>Gets the common ancestor for 2 nodes.</p>
1345
+ * @param firstNode - <p>The first node.</p>
1346
+ * @param secondNode - <p>The second node.</p>
1347
+ * @param [parentElement] - <p>Only siblings within the specified parent element are retrieved.</p>
1348
+ * @returns <p>The common ancestor element.</p>
1349
+ */
1350
+ static commonAncestor(firstNode: HTMLElement, secondNode: HTMLElement, parentElement?: HTMLElement): HTMLElement;
1351
+ /**
1352
+ * <p>Gets the next or previous sibling of the specified node.</p>
1353
+ * @param node - <p>The start node.</p>
1354
+ * @param [previous] - <p>A value indicating if the previous node is retrieved instead of the next.</p>
1355
+ * @param [nodeType] - <p>A node type value to retrieve the first sibling occurence of this node type, by default any node type is retrieved.</p>
1356
+ * @param [parentElement] - <p>Only siblings within the specified parent element are retrieved.</p>
1357
+ * @param [skipEmpty] - <p>A value indicating if empty siblings must be skipped.</p>
1358
+ * @returns <p>The next or previous sibling node or null if there is none.</p>
1359
+ */
1360
+ static sibling(node: Node, previous?: boolean, nodeType?: number, parentElement?: HTMLElement, skipEmpty?: boolean): Node;
1361
+ /**
1362
+ * <p>Retrieves the first child node by tagname that is of type ELEMENT_NODE.</p>
1363
+ * @param element - <p>The XML or (X)HTML element.</p>
1364
+ * @param name - <p>The name of the tag.</p>
1365
+ * @returns <p>The first child element which equals the specified name.</p>
1366
+ */
1367
+ static firstChildByTagName(element: HTMLElement, name: string): HTMLElement;
1368
+ /**
1369
+ * <p>Retrieves an array of childnodes that are of type ELEMENT_NODE.</p>
1370
+ * @param element - <p>The XML or (X)HTML element.</p>
1371
+ * @returns <p>Element collection.</p>
1372
+ */
1373
+ static children(element: HTMLElement): HTMLElement[];
1374
+ /**
1375
+ * <p>Appends the child nodes from the source element to the target element.</p>
1376
+ * @param source - <p>The source element.</p>
1377
+ * @param target - <p>The target element.</p>
1378
+ * @returns <p>The target element.</p>
1379
+ */
1380
+ static appendChildren(source: HTMLElement, target: HTMLElement): HTMLElement;
1381
+ /**
1382
+ * <p>Removes the specified node.</p>
1383
+ * @param element - <p>The node to remove.</p>
1384
+ * @returns <p>A Node object, representing the removed node, or null if the node does not exist.</p>
1385
+ */
1386
+ static remove(element: HTMLElement): Node;
1387
+ /**
1388
+ * <p>Removes all the children of the specified element.</p>
1389
+ * @param element - <p>The element for which the children will be removed.</p>
1390
+ */
1391
+ static removeChildren(element: HTMLElement): void;
1392
+ /**
1393
+ * <p>Surrounds the content with the specified element.</p>
1394
+ * @param element - <p>The element to make parent of the specified content.</p>
1395
+ * @param content - <p>The content node(s) to surround with the specified element.</p>
1396
+ * @returns <p>The specified element.</p>
1397
+ */
1398
+ static surround(element: HTMLElement, content: Node | DocumentFragment): HTMLElement;
1399
+ /**
1400
+ * <p>Replaces itself for it's child nodes.</p>
1401
+ * @param element - <p>The element to replace.</p>
1402
+ * @returns <p>The replaced element.</p>
1403
+ */
1404
+ static unsurround(element: HTMLElement): HTMLElement;
1405
+ /**
1406
+ * <p>Extracts the child nodes from the specified element by appending the nodes to a document fragment or array.</p>
1407
+ * @param element - <p>The element containing the child nodes to extract.</p>
1408
+ * @param [toArray] - <p>A value indicating if the nodes should be extracted to an array.</p>
1409
+ * @returns <p>A document fragment or array containing the extracted child nodes.</p>
1410
+ */
1411
+ static extract(element: HTMLElement, toArray?: boolean): DocumentFragment | HTMLElement[];
1412
+ /**
1413
+ * <p>Converts the HTML text to a document fragment.</p>
1414
+ * @param text - <p>The HTML text.</p>
1415
+ * @returns <p>A document fragment containing the nodes from the HTML string.</p>
1416
+ */
1417
+ static fragmentFromHTML(text: string): DocumentFragment;
1418
+ /**
1419
+ * <p>Inserts the node at the current caret (cursor) position (overriding any selection).</p>
1420
+ * @param node - <p>The node to insert.</p>
1421
+ * @param [select] - <p>A value indicating if the inserted node must be selected.</p>
1422
+ * @param [deleteContent] - <p>A value indicating if the content within the range should be removed prior to the insertion of the node.</p>
1423
+ * @param [range] - <p>A range in which the node will be inserted. By default the current selection range is used.</p>
1424
+ */
1425
+ static insertNode(node: Node, select?: boolean, deleteContent?: boolean, range?: Range): void;
1426
+ /**
1427
+ * <p>Gets the nodes within the current selection range.</p>
1428
+ * @param [nodeName] - <p>A single node name or a space separated string with node names to filter the result list.</p>
1429
+ * @param [range] - <p>A selection range from which nodes are retrieved. By default the current selection range is used.</p>
1430
+ * @returns <p>A list of nodes (which satisfy the optional filter) within the selection range.</p>
1431
+ */
1432
+ static getNodesInRange(nodeName?: string, range?: Range): Node[];
1433
+ /**
1434
+ * <p>Encodes a js string</p>
1435
+ * @param text - <p>The text to encode</p>
1436
+ * @returns <p>An encoded string</p>
1437
+ */
1438
+ static encodeString(text: string): string;
1439
+ /**
1440
+ * <p>Encodes an html string</p>
1441
+ * @param text - <p>The text to encode</p>
1442
+ * @returns <p>An encoded string</p>
1443
+ */
1444
+ static encodeHTML(text: string): string;
1445
+ /**
1446
+ * <p>Checks if the element's classname property contains the css class(es).</p>
1447
+ * @param element - <p>The element to check.</p>
1448
+ * @param cssClass - <p>Name of the css class.</p>
1449
+ * @returns <p>Returns true if the element's classname contains the cssClass, otherwise false.</p>
1450
+ */
1451
+ static hasClass(element: HTMLElement, cssClass: string): boolean;
1452
+ /**
1453
+ * <p>Toggles between css class(es) by removing the class if it's already defined on the element and otherwise adding it.</p>
1454
+ * @param element - <p>The element.</p>
1455
+ * @param cssClass - <p>Name of the css class or classes separated by a space.</p>
1456
+ */
1457
+ static toggleClass(element: HTMLElement, cssClass: string): void;
1458
+ /**
1459
+ * <p>Adds the specified css class(es) to the element.</p>
1460
+ * @param element - <p>The element.</p>
1461
+ * @param cssClass - <p>Name of the css class or classes separated by a space.</p>
1462
+ */
1463
+ static addClass(element: HTMLElement, cssClass: string): void;
1464
+ /**
1465
+ * <p>Removes the specified css class(es) from the element.</p>
1466
+ * @param element - <p>The element.</p>
1467
+ * @param cssClass - <p>Name of the css class or classes separated by a space.</p>
1468
+ */
1469
+ static removeClass(element: HTMLElement, cssClass: string): void;
1470
+ /**
1471
+ * <p>Retrieves the current inline or computed value of a style property.</p>
1472
+ * @param element - <p>The element.</p>
1473
+ * @param property - <p>Style property name in camelcase (backgroundColor) or separated by hyphens (background-color).</p>
1474
+ * @param computed - <p>Defines if only a computed style value should be retrieved.</p>
1475
+ * @returns <p>The element style.</p>
1476
+ */
1477
+ static styleValue(element: HTMLElement, property: string, computed: boolean): string;
1478
+ /**
1479
+ * <p>Sets the style text of an element.</p>
1480
+ * @param element - <p>The element.</p>
1481
+ * @param style - <p>Style text.</p>
1482
+ */
1483
+ static setStyle(element: HTMLElement, style: string): void;
1484
+ /**
1485
+ * <p>Updates the CSS style declaration of an HTMLElement or Stylesheet. Empty style properties are removed.</p>
1486
+ * @param style - <p>The current style.</p>
1487
+ * @param text - <p>The style text with which the current style is updated.</p>
1488
+ */
1489
+ static updateStyle(style: CSSStyleDeclaration, text: string): void;
1490
+ /**
1491
+ * <p>Copies the computed style of the source element to the target element.</p>
1492
+ * @param source - <p>The source element.</p>
1493
+ * @param target - <p>The target element.</p>
1494
+ */
1495
+ static copyComputedStyle(source: HTMLElement, target: HTMLElement): void;
1496
+ /**
1497
+ * <p>Gets the stylesheet by source url or id.
1498
+ * The stylesheet will be matched on id if the id parameter is passed.</p>
1499
+ * @param id - <p>Id of the stylesheet.</p>
1500
+ * @param src - <p>Src of the stylesheet.</p>
1501
+ * @returns <p>Stylesheet object.</p>
1502
+ */
1503
+ static getStyleSheet(id: string, src: string): any;
1504
+ /**
1505
+ * <p>Gets the source element for the current event.</p>
1506
+ * @param e - <p>The event.</p>
1507
+ * @returns <p>Source element.</p>
1508
+ */
1509
+ static eventSource(e: any): HTMLElement;
1510
+ /**
1511
+ * <p>Gets the related element for the current event.</p>
1512
+ * @param e - <p>The event</p>
1513
+ * @returns <p>Related element.</p>
1514
+ */
1515
+ static eventRelated(e: any): HTMLElement;
1516
+ /**
1517
+ * <p>Gets the x coordinate of the (mouse)pointer.</p>
1518
+ * @param e - <p>The event.</p>
1519
+ * @returns <p>ClientX position.</p>
1520
+ */
1521
+ static clientX(e: any): number;
1522
+ /**
1523
+ * <p>Gets the y coordinate of the (mouse)pointer.</p>
1524
+ * @param e - <p>The event.</p>
1525
+ * @returns <p>ClientY position.</p>
1526
+ */
1527
+ static clientY(e: any): number;
1528
+ /**
1529
+ * <p>Gets the absolute page position coordinates of the element.</p>
1530
+ * @param element - <p>The element.</p>
1531
+ * @param [parent] - <p>An element to get the position coordinates of the element, relative to its parent element.</p>
1532
+ * @param [fixed] - <p>A value indicating if fixed position values (ignoring scrollbar positions) should be returned.</p>
1533
+ * @returns <p>An object wich describes the position values.</p>
1534
+ */
1535
+ static getPos(element: HTMLElement, parent?: HTMLElement, fixed?: boolean): componyx.library.Position;
1536
+ /**
1537
+ * <p>Sets the position coordinates of the specified element so that it matches the specified position on the page (NOT relative to a parent element).</p>
1538
+ * @param element - <p>The element.</p>
1539
+ * @param pagePos - <p>The horizontal and/or vertical position in pixels specified via the object keys top, right, bottom of left.</p>
1540
+ * @param [keepMargin] - <p>Defines if specified element margins must be preserved.</p>
1541
+ */
1542
+ static setPos(element: HTMLElement, pagePos: any, keepMargin?: boolean): void;
1543
+ /**
1544
+ * <p>Returns the first relative, absolute or fixed positioned parent element if there is any.</p>
1545
+ * @param element - <p>The element.</p>
1546
+ * @returns <p>A positioned parent element or null when no positioned parent is found.</p>
1547
+ */
1548
+ static positionedParent(element: HTMLElement): HTMLElement;
1549
+ /**
1550
+ * <p>Returns the scrollLeft and scrollTop positions.</p>
1551
+ * @returns <p>An object which describes the scroll values.</p>
1552
+ */
1553
+ static getScrollPosition(): componyx.library.ScrollPos;
1554
+ /**
1555
+ * <p>Escapes a regular expression string to use with the regexp object.</p>
1556
+ * @param text - <p>The text to escape.</p>
1557
+ * @returns <p>The escaped text.</p>
1558
+ */
1559
+ static escapeRegExp(text: string): string;
1560
+ /**
1561
+ * <p>Removes leading and trailing white space characters, new lines and tabs from the specified string.</p>
1562
+ * @param text - <p>Text to trim.</p>
1563
+ * @returns <p>the trimmed text.</p>
1564
+ */
1565
+ static trim(text: string): string;
1566
+ /**
1567
+ * <p>Checks if the text strats with the specified prefix.</p>
1568
+ * @param ignoreCase - <p>Defines if the comparison should be case-insensitive.</p>
1569
+ * @returns <p>Returns true if the text staats with the specified prefix, otherwise false.</p>
1570
+ */
1571
+ static startsWith(text: string, prefix: string, ignoreCase: boolean): boolean;
1572
+ /**
1573
+ * <p>Checks if the text ends with the specified suffix.</p>
1574
+ * @param ignoreCase - <p>Defines if the comparison should be case-insensitive.</p>
1575
+ * @returns <p>Returns true if the text ends with the specified suffix, otherwise false.</p>
1576
+ */
1577
+ static endsWith(text: string, suffix: string, ignoreCase: boolean): boolean;
1578
+ /**
1579
+ * <p>Searches for a specified value within an array and returns its index (or -1 if not found).</p>
1580
+ * @param items - <p>Array to search.</p>
1581
+ * @param comparer - <ul>
1582
+ * <li>
1583
+ * <ol>
1584
+ * <li>A value of any type to compare with.</li>
1585
+ * </ol>
1586
+ * </li>
1587
+ * <li>
1588
+ * <ol start="2">
1589
+ * <li>A function which accepts the item to compare as argument and returns a boolean value indicating if there was a successful match.</li>
1590
+ * </ol>
1591
+ * </li>
1592
+ * </ul>
1593
+ * @param ignoreCase - <p>Defines if the comparison should be case-insensitive.</p>
1594
+ * @param strictCompare - <p>Defines if the comparison should be strict. Compared values only match when they are of the same type (true by default).</p>
1595
+ * @returns <p>Index of the found item or -1 if not found.</p>
1596
+ */
1597
+ static indexOf(items: any[], comparer: any, ignoreCase: boolean, strictCompare: boolean): number;
1598
+ /**
1599
+ * <p>Iterates through the items in the array and evaluates each object against the specified comparer function.
1600
+ * The iteration is called recursively when the recursionKey is found on an object.</p>
1601
+ * @param items - <p>The root array.</p>
1602
+ * @param recursionKey - <p>The object key which points to the child items array. Separate object keys with a dot &quot;.&quot; to denote a deeper level.</p>
1603
+ * @param comparer - <p>A function which accepts the item to compare as argument and returns a boolean value indicating if there was a successful match.</p>
1604
+ * @param scalar - <p>A value indicating to return a single result which makes the iteration stop after a match.</p>
1605
+ * @returns <p>An array of Path instances or a single Path instance when the scalar option was provided. The Path object offers methods to navigate in any direction from a specific item within the tree.</p>
1606
+ */
1607
+ static path(items: any[], recursionKey: string, comparer: (...params: any[]) => any, scalar: boolean): componyx.library.Path[] | componyx.library.Path;
1608
+ /**
1609
+ * <p>Creates and returns an object for disabling and enabling text selection for the specified element and underlaying elements.</p>
1610
+ * @param element - <p>The element.</p>
1611
+ * @returns <p>An object to control the text selection behaviour.</p>
1612
+ */
1613
+ static textSelection(element: HTMLElement): componyx.library.Toggle;
1614
+ /**
1615
+ * <p>Converts the rgb color to a hexadecimal string.</p>
1616
+ * @param red - <p>0-255 numeric value.</p>
1617
+ * @param green - <p>0-255 numeric value.</p>
1618
+ * @param blue - <p>0-255 numeric value.</p>
1619
+ * @returns <p>The hex value.</p>
1620
+ */
1621
+ static rgbToHex(red: number, green: number, blue: number): string;
1622
+ /**
1623
+ * <p>Converts a hexadecimal color string to a rgb color.</p>
1624
+ * @param hex - <p>hex color string.</p>
1625
+ * @returns <p>The R,G,B values.</p>
1626
+ */
1627
+ static hexToRgb(hex: string): Number[];
1628
+ /**
1629
+ * <p>Converts the rgb value to hsv.</p>
1630
+ * @param r - <p>The red value 0-255.</p>
1631
+ * @param g - <p>The green value 0-255.</p>
1632
+ * @param b - <p>The blue value 0-255.</p>
1633
+ * @returns <p>The hue saturation value.</p>
1634
+ */
1635
+ static rgbToHsv(r: number, g: number, b: number): Number[];
1636
+ /**
1637
+ * <p>Converts the hsv value to rgb.</p>
1638
+ * @param h - <p>The hue value 0-1.</p>
1639
+ * @param s - <p>The saturation value 0-1.</p>
1640
+ * @param v - <p>The lightness value 0-1.</p>
1641
+ * @returns <p>The rgb value.</p>
1642
+ */
1643
+ static hsvToRgb(h: number, s: number, v: number): Number[];
1644
+ /**
1645
+ * <p>Gets the width and height of the window.</p>
1646
+ * @returns <p>An object describing the width and height sizes.</p>
1647
+ */
1648
+ static getWindowSize(): componyx.library.Dimensions;
1649
+ /**
1650
+ * <p>Gets the width and height of a scrollbar.</p>
1651
+ * @returns <p>An object describing the width and height sizes.</p>
1652
+ */
1653
+ static getScrollBarSize(): componyx.library.Dimensions;
1654
+ /**
1655
+ * <p>Adds the specified unit or the default 'px' unit to the value if the unit is missing.</p>
1656
+ * @param value - <p>Nummeric value.</p>
1657
+ * @param unit - <p>Css unit.</p>
1658
+ * @returns <p>The value with the specified or default unit.</p>
1659
+ */
1660
+ static unit(value: string, unit: string): string;
1661
+ /**
1662
+ * <p>Returns the full size of an element, including the border, padding and optional margin sizes.</p>
1663
+ * @param element - <p>The element.</p>
1664
+ * @param [includeMargin] - <p>A value indicating if element margin sizes must be included.</p>
1665
+ * @returns <p>An object describing the width and height sizes.</p>
1666
+ */
1667
+ static size(element: HTMLElement, includeMargin?: boolean): componyx.library.Dimensions;
1668
+ /**
1669
+ * <p>Returns the border sizes of the element in pixels.</p>
1670
+ * @param element - <p>The element.</p>
1671
+ * @returns <p>An object describing the border sizes of the element.</p>
1672
+ */
1673
+ static border(element: HTMLElement): componyx.library.BorderSizes;
1674
+ /**
1675
+ * <p>Returns the padding sizes of the element in pixels.</p>
1676
+ * @param element - <p>The element.</p>
1677
+ * @returns <p>An object describing the padding sizes of the element.</p>
1678
+ */
1679
+ static padding(element: HTMLElement): componyx.library.PaddingSizes;
1680
+ /**
1681
+ * <p>Returns the border size, padding size and combined size (width and height of border and padding) in pixels.</p>
1682
+ * @param element - <p>The element.</p>
1683
+ * @param [computeSize] - <p>A value indicating if the combined size (width and height of border and padding) is computed. When omitted the size is only computed when the element has the default CSS box-sizing value (content-box).</p>
1684
+ * @returns <p>An object describing the border &amp; padding size of the element.</p>
1685
+ */
1686
+ static borderAndPadding(element: HTMLElement, computeSize?: boolean): componyx.library.BorderPaddingSizes;
1687
+ /**
1688
+ * <p>Returns the margin sizes of the element in pixels.</p>
1689
+ * @param element - <p>The element.</p>
1690
+ * @returns <p>An object describing the margin sizes of the element.</p>
1691
+ */
1692
+ static margin(element: HTMLElement): componyx.library.MarginSizes;
1693
+ /**
1694
+ * <p>Checks if the node is present in the current document.</p>
1695
+ * @param node - <p>The node to check.</p>
1696
+ * @returns <p>A value indicating if the node is present in the current document.</p>
1697
+ */
1698
+ static isInDOM(node: Node): boolean;
1699
+ /**
1700
+ * <p>Checks if the node is a child of the specified parent element.</p>
1701
+ * @param parent - <p>The parent element.</p>
1702
+ * @param node - <p>The node for which to check if it is a child of the specified parent.</p>
1703
+ * @returns <p>A value indicating if the node is a child of the specified parent element.</p>
1704
+ */
1705
+ static contains(parent: HTMLElement, node: Node): boolean;
1706
+ /**
1707
+ * <p>Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a specified total length.</p>
1708
+ * @param value - <p>The string value on which the operation is applied.</p>
1709
+ * @param length - <p>The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters.</p>
1710
+ * @param text - <p>The padding character(s).</p>
1711
+ * @returns <p>Left padded text.</p>
1712
+ */
1713
+ static padLeft(value: string, length: number, text?: string): string;
1714
+ /**
1715
+ * <p>Returns a new string that left-aligns the characters in this instance by padding them on the right with a specified Unicode character, for a specified total length.</p>
1716
+ * @param value - <p>The string value on which the operation is applied.</p>
1717
+ * @param length - <p>The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters.</p>
1718
+ * @param text - <p>The padding character(s).</p>
1719
+ * @returns <p>Right padded text.</p>
1720
+ */
1721
+ static padRight(value: string, length: number, text?: string): string;
1722
+ /**
1723
+ * <p>Rounds the number with the specified rounding type and precision.</p>
1724
+ * @param value - <p>Numeric value.</p>
1725
+ * @param precision - <p>Amount of decimal places.</p>
1726
+ * @param [rounding] - <p>Type of decimal rounding (round (default), floor or ceil).</p>
1727
+ * @returns <p>Rounded numeric value.</p>
1728
+ */
1729
+ static roundNumber(value: number, precision: number, rounding?: string): number;
1730
+ /**
1731
+ * <p>Reverses the specified text.</p>
1732
+ * @param text - <p>Text to reverse.</p>
1733
+ * @returns <p>Reversed text.</p>
1734
+ */
1735
+ static reverseText(text: string): string;
1736
+ /**
1737
+ * <p>Replaces each parameter in a specified String with the text equivalent of a corresponding object's value.</p>
1738
+ * @param text - <p>Text to which the format will be applied.</p>
1739
+ * @param args - <p>A variable amount of parameters or an object with named keys to be replaced in the text string.</p>
1740
+ * @returns <p>The formatted text.</p>
1741
+ */
1742
+ static format(text: string, ...args: any[]): string;
1743
+ static format(text: string, args: Record<string, any>): string;
1744
+ /**
1745
+ * <p>Formats a numeric value for textual display.</p>
1746
+ * @param value - <p>Numeric value.</p>
1747
+ * @param [leadingZeros] - <p>Defines if leading zeros should be displayed.</p>
1748
+ * @param [trailingZeros] - <p>Defines if trailing zeros on the decimal side should be displayed.</p>
1749
+ * @param [precision] - <p>Amount of decimal places.</p>
1750
+ * @param [rounding] - <p>Type of decimal rounding when rounding is desired (round, floor or ceil).</p>
1751
+ * @param [decimalSeparator = .] - <p>The character used as decimal separator.</p>
1752
+ * @param [groupSeparator] - <p>The character used as group separator.</p>
1753
+ * @param [digitPadLeftValue] - <p>The specified value is used to right-align the digits by padding this value to the left.</p>
1754
+ * @returns <p>The formatted number text. The value is returned unchanged when it is empty or not a number.</p>
1755
+ */
1756
+ static formatNumber(value: number, leadingZeros?: boolean, trailingZeros?: boolean, precision?: number, rounding?: string, decimalSeparator?: string, groupSeparator?: string, digitPadLeftValue?: string): string;
1757
+ /**
1758
+ * <p>Formats a date value for textual display.</p>
1759
+ * @param date - <p>The Date value.</p>
1760
+ * @param format - <p>The Date format as in 'MM-dd-yyyy hh:mm:ss'. Casing for Month and minutes is required, other casings are ignored.</p>
1761
+ * @returns <p>The formatted date text.</p>
1762
+ */
1763
+ static formatDate(date: Date, format: string): string;
1764
+ /**
1765
+ * <p>Parses a string value to a workable date object.</p>
1766
+ * @param value - <p>Date value as string.</p>
1767
+ * @param format - <p>Date format as in 'mm-dd-yyyy hh:mm:ss'.</p>
1768
+ * @returns <p>New Date object.</p>
1769
+ */
1770
+ static parseDate(value: string, format: string): Date;
1771
+ /**
1772
+ * <p>Returns true if the specified year is a leap year, otherwise false.</p>
1773
+ * @param year - <p>The year.</p>
1774
+ * @returns <p>A value indicating if the specified year is a leap year.</p>
1775
+ */
1776
+ static isLeapYear(year: number): boolean;
1777
+ /**
1778
+ * <p>Gets the ISO-8601 week number (Mon-Sun, first 4 day week) or the alternative variant (Sun-Sat/Sat-Fri, first week has 1st of January) when the first day is specified as Saturday or Sunday.</p>
1779
+ * @param date - <p>Date object.</p>
1780
+ * @param [firstDay = 1] - <p>Day of the week 0:Sunday, 1:Monday, 6:Saturday.</p>
1781
+ * @returns <p>Week number.</p>
1782
+ */
1783
+ static getWeekNumber(date: Date, firstDay?: number): number;
1784
+ /**
1785
+ * <p>Gets the start date of the week by following the ISO-8601 standard.</p>
1786
+ * @param week - <p>The week number.</p>
1787
+ * @param year - <p>The year.</p>
1788
+ * @param firstDay - <p>Day of the week (0-6). 0:Sunday, 6:Saturday.</p>
1789
+ * @returns <p>The start date of the week.</p>
1790
+ */
1791
+ static getDateOfWeek(week: number, year: number, firstDay: number): Date;
1792
+ /**
1793
+ * <p>Selects a range of characters within the element.</p>
1794
+ * @param element - <p>The element.</p>
1795
+ * @param start - <p>Start index of selection.</p>
1796
+ * @param [length] - <p>Selection length.</p>
1797
+ */
1798
+ static selectTextRange(element: HTMLElement, start: number, length?: number): void;
1799
+ /**
1800
+ * <p>Sets the text or value of a DOM element/node.</p>
1801
+ * @param element - <p>The element/node.</p>
1802
+ * @param text - <p>Text content.</p>
1803
+ */
1804
+ static setText(element: HTMLElement, text: string): void;
1805
+ /**
1806
+ * <p>Checks if an element is focusable.</p>
1807
+ * @param element - <p>The element.</p>
1808
+ * @returns <p>A value indicating if the element is focusable.</p>
1809
+ */
1810
+ static focusable(element: HTMLElement): boolean;
1811
+ /**
1812
+ * <p>Checks if an element is visible.</p>
1813
+ * @param element - <p>The element to check.</p>
1814
+ * @param [container] - <p>If specified the visibility style on the element's parents within the container are checked.</p>
1815
+ * @returns <p>A value indicating if the element is visible.</p>
1816
+ */
1817
+ static visible(element: HTMLElement, container?: HTMLElement): boolean;
1818
+ /**
1819
+ * <p>Detects and returns the scrollable root element.</p>
1820
+ * @returns <p>The scrollable root element.</p>
1821
+ */
1822
+ static scrollableRoot(): HTMLElement;
1823
+ /**
1824
+ * <p>Creates a new instance by calling the specified constructor and initializes the new object with the specified properties.</p>
1825
+ * @param constructor - <p>An object's constructor function.</p>
1826
+ * @param properties - <p>The initialization properties of the new object.</p>
1827
+ * @returns <p>The new object instance.</p>
1828
+ */
1829
+ static instantiate(constructor: (...params: any[]) => any, properties: any): any;
1830
+ /**
1831
+ * <p>Defers the specified method until the current task stack has finished processing.</p>
1832
+ * @param fn - <p>The method to invoke as soon as possible after the current task stack has finished. Use the native bind method to pass in arguments.</p>
1833
+ */
1834
+ static defer(fn: (...params: any[]) => any): void;
1835
+ /**
1836
+ * <p>Scrolls to the vertical or horizontal position of the specified element.</p>
1837
+ * @param element - <p>The element to scroll to.</p>
1838
+ * @param [scrollElement] - <p>A parent scroll element.</p>
1839
+ * @param [type] - <p>A value indicating if scrolling should be vertical (0), horizontal (1) or vertical &amp; horizontal (2).</p>
1840
+ * @param [animationSettings] - <p>Animation settings for the scroll effect.</p>
1841
+ */
1842
+ static scrollTo(element: HTMLElement, scrollElement?: HTMLElement, type?: number, animationSettings?: componyx.library.animationSettings): void;
1843
+ /**
1844
+ * <p>Checks if the specified element is visible within the current viewport (window dimensions with vertical and horizontal scrollbar position).</p>
1845
+ * @param element - <p>The element to check for.</p>
1846
+ * @returns <p>An object describing the element's visibility within the viewport.</p>
1847
+ */
1848
+ static inViewport(element: HTMLElement): componyx.library.Viewport;
1849
+ /**
1850
+ * <p>Logs the message in the js console if available.</p>
1851
+ * @param message - <p>The message to log.</p>
1852
+ */
1853
+ static log(message: string): void;
1854
+ /**
1855
+ * <p>Gets the active document object, defaulting to the global window document when none is explicitly set.</p>
1856
+ * @returns <p>The active document object.</p>
1857
+ */
1858
+ static getDocument(): Document;
1859
+ /**
1860
+ * <p>The active document object.</p>
1861
+ */
1862
+ static document: HTMLElement | null;
1863
+ /**
1864
+ * <p>A value indicating if we are dealing with a touch device.</p>
1865
+ */
1866
+ static touch: boolean;
1867
+ /**
1868
+ * <p>This variable will hold the last active HTML event object.</p>
1869
+ */
1870
+ static event: Event | null;
1871
+ /**
1872
+ * <p>This variable will hold the active WebSocket connections.</p>
1873
+ */
1874
+ static webSockets: WebSocket[];
1875
+ /**
1876
+ * <p>The default animation settings.</p>
1877
+ */
1878
+ static animationSettings: componyx.library.animationSettings;
1879
+ /**
1880
+ * <p>Global handlers that fire for every HTTP request.</p>
1881
+ */
1882
+ static httpRequestHandlers: componyx.library.httpRequestHandlers;
1883
+ /**
1884
+ * <p>The default XHR request settings.</p>
1885
+ */
1886
+ static xhrSettings: componyx.library.xhrSettings;
1887
+ /**
1888
+ * <p>The default WebSocket settings.</p>
1889
+ */
1890
+ static wsSettings: componyx.library.wsSettings;
1891
+ }
1892
+ }
1893
+
1894
+ declare var $lib: componyx.LibrarySelector & typeof componyx.library;
1895
+ declare var $: typeof $lib;
1896
+ /**
1897
+ * <p>Shorthand for the componyx root namespace.</p>
1898
+ */
1899
+ declare var CMP: typeof componyx;