x4js 1.4.51 → 1.4.53

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 (305) hide show
  1. package/lib/{action.js → cjs/action.js} +0 -0
  2. package/lib/{application.js → cjs/application.js} +13 -19
  3. package/lib/{autocomplete.js → cjs/autocomplete.js} +0 -4
  4. package/lib/cjs/base_component.js +124 -0
  5. package/lib/{button.js → cjs/button.js} +4 -4
  6. package/lib/{calendar.js → cjs/calendar.js} +22 -22
  7. package/lib/{canvas.js → cjs/canvas.js} +7 -8
  8. package/lib/{cardview.js → cjs/cardview.js} +3 -5
  9. package/lib/{checkbox.js → cjs/checkbox.js} +6 -5
  10. package/lib/cjs/color.js +591 -0
  11. package/lib/{colorpicker.js → cjs/colorpicker.js} +1 -14
  12. package/lib/{combobox.js → cjs/combobox.js} +2 -6
  13. package/lib/{component.js → cjs/component.js} +20 -41
  14. package/lib/{datastore.js → cjs/datastore.js} +18 -32
  15. package/lib/{dialog.js → cjs/dialog.js} +4 -21
  16. package/lib/{dom_events.js → cjs/dom_events.js} +0 -0
  17. package/lib/{drag_manager.js → cjs/drag_manager.js} +0 -5
  18. package/lib/{drawtext.js → cjs/drawtext.js} +5 -4
  19. package/lib/{fileupload.js → cjs/fileupload.js} +0 -3
  20. package/lib/{form.js → cjs/form.js} +2 -6
  21. package/lib/{formatters.js → cjs/formatters.js} +0 -0
  22. package/lib/{gridview.js → cjs/gridview.js} +20 -33
  23. package/lib/{i18n.js → cjs/i18n.js} +0 -0
  24. package/lib/{icon.js → cjs/icon.js} +17 -11
  25. package/lib/{image.js → cjs/image.js} +4 -5
  26. package/lib/{index.js → cjs/index.js} +0 -0
  27. package/lib/cjs/input.js +174 -0
  28. package/lib/{label.js → cjs/label.js} +2 -1
  29. package/lib/{layout.js → cjs/layout.js} +9 -8
  30. package/lib/{link.js → cjs/link.js} +3 -2
  31. package/lib/cjs/listview.js +544 -0
  32. package/{src/md5.ts → lib/cjs/md5.js} +403 -438
  33. package/lib/{menu.js → cjs/menu.js} +4 -11
  34. package/lib/{messagebox.js → cjs/messagebox.js} +4 -4
  35. package/lib/{panel.js → cjs/panel.js} +3 -4
  36. package/lib/{popup.js → cjs/popup.js} +4 -5
  37. package/lib/{property_editor.js → cjs/property_editor.js} +2 -5
  38. package/lib/{radiobtn.js → cjs/radiobtn.js} +6 -6
  39. package/lib/{rating.js → cjs/rating.js} +7 -6
  40. package/lib/cjs/request.js +246 -0
  41. package/lib/{router.js → cjs/router.js} +0 -1
  42. package/lib/cjs/settings.js +69 -0
  43. package/lib/{sidebarview.js → cjs/sidebarview.js} +2 -3
  44. package/lib/{spreadsheet.js → cjs/spreadsheet.js} +10 -27
  45. package/lib/{styles.js → cjs/styles.js} +5 -6
  46. package/lib/{svgcomponent.js → cjs/svgcomponent.js} +3 -11
  47. package/lib/{tabbar.js → cjs/tabbar.js} +5 -5
  48. package/lib/{tabview.js → cjs/tabview.js} +0 -2
  49. package/lib/{textarea.js → cjs/textarea.js} +4 -3
  50. package/lib/{textedit.js → cjs/textedit.js} +7 -8
  51. package/lib/{toaster.js → cjs/toaster.js} +0 -2
  52. package/lib/{tools.js → cjs/tools.js} +7 -16
  53. package/lib/{tooltips.js → cjs/tooltips.js} +0 -1
  54. package/lib/{treeview.js → cjs/treeview.js} +23 -19
  55. package/lib/{action.d.ts → cjs/types/action.d.ts} +0 -0
  56. package/lib/{application.d.ts → cjs/types/application.d.ts} +0 -0
  57. package/lib/{autocomplete.d.ts → cjs/types/autocomplete.d.ts} +0 -0
  58. package/lib/{base_component.d.ts → cjs/types/base_component.d.ts} +0 -0
  59. package/lib/{button.d.ts → cjs/types/button.d.ts} +0 -0
  60. package/lib/{calendar.d.ts → cjs/types/calendar.d.ts} +0 -0
  61. package/lib/{canvas.d.ts → cjs/types/canvas.d.ts} +0 -0
  62. package/lib/{cardview.d.ts → cjs/types/cardview.d.ts} +0 -0
  63. package/lib/{checkbox.d.ts → cjs/types/checkbox.d.ts} +0 -0
  64. package/lib/{color.d.ts → cjs/types/color.d.ts} +0 -0
  65. package/lib/{colorpicker.d.ts → cjs/types/colorpicker.d.ts} +0 -0
  66. package/lib/{combobox.d.ts → cjs/types/combobox.d.ts} +0 -0
  67. package/lib/{component.d.ts → cjs/types/component.d.ts} +1 -7
  68. package/lib/{datastore.d.ts → cjs/types/datastore.d.ts} +0 -0
  69. package/lib/{dialog.d.ts → cjs/types/dialog.d.ts} +0 -0
  70. package/lib/{dom_events.d.ts → cjs/types/dom_events.d.ts} +0 -0
  71. package/lib/{drag_manager.d.ts → cjs/types/drag_manager.d.ts} +0 -0
  72. package/lib/{drawtext.d.ts → cjs/types/drawtext.d.ts} +0 -0
  73. package/lib/{fileupload.d.ts → cjs/types/fileupload.d.ts} +0 -0
  74. package/lib/{form.d.ts → cjs/types/form.d.ts} +0 -0
  75. package/lib/{formatters.d.ts → cjs/types/formatters.d.ts} +0 -0
  76. package/lib/{gridview.d.ts → cjs/types/gridview.d.ts} +0 -0
  77. package/lib/{i18n.d.ts → cjs/types/i18n.d.ts} +0 -0
  78. package/lib/{icon.d.ts → cjs/types/icon.d.ts} +0 -0
  79. package/lib/{image.d.ts → cjs/types/image.d.ts} +0 -0
  80. package/lib/{index.d.ts → cjs/types/index.d.ts} +0 -0
  81. package/lib/{input.d.ts → cjs/types/input.d.ts} +0 -0
  82. package/lib/{label.d.ts → cjs/types/label.d.ts} +0 -0
  83. package/lib/{layout.d.ts → cjs/types/layout.d.ts} +0 -0
  84. package/lib/{link.d.ts → cjs/types/link.d.ts} +0 -0
  85. package/lib/{listview.d.ts → cjs/types/listview.d.ts} +0 -0
  86. package/lib/{md5.d.ts → cjs/types/md5.d.ts} +0 -0
  87. package/lib/{menu.d.ts → cjs/types/menu.d.ts} +0 -0
  88. package/lib/{messagebox.d.ts → cjs/types/messagebox.d.ts} +0 -0
  89. package/lib/{panel.d.ts → cjs/types/panel.d.ts} +0 -0
  90. package/lib/{popup.d.ts → cjs/types/popup.d.ts} +0 -0
  91. package/lib/{property_editor.d.ts → cjs/types/property_editor.d.ts} +0 -0
  92. package/lib/{radiobtn.d.ts → cjs/types/radiobtn.d.ts} +0 -0
  93. package/lib/{rating.d.ts → cjs/types/rating.d.ts} +0 -0
  94. package/lib/{request.d.ts → cjs/types/request.d.ts} +0 -0
  95. package/lib/{router.d.ts → cjs/types/router.d.ts} +0 -0
  96. package/lib/{settings.d.ts → cjs/types/settings.d.ts} +0 -0
  97. package/lib/{sidebarview.d.ts → cjs/types/sidebarview.d.ts} +0 -0
  98. package/lib/{spreadsheet.d.ts → cjs/types/spreadsheet.d.ts} +0 -0
  99. package/lib/{styles.d.ts → cjs/types/styles.d.ts} +0 -0
  100. package/lib/{svgcomponent.d.ts → cjs/types/svgcomponent.d.ts} +0 -0
  101. package/lib/{tabbar.d.ts → cjs/types/tabbar.d.ts} +0 -0
  102. package/lib/{tabview.d.ts → cjs/types/tabview.d.ts} +0 -0
  103. package/lib/{textarea.d.ts → cjs/types/textarea.d.ts} +0 -0
  104. package/lib/{textedit.d.ts → cjs/types/textedit.d.ts} +0 -0
  105. package/lib/{toaster.d.ts → cjs/types/toaster.d.ts} +0 -0
  106. package/lib/{tools.d.ts → cjs/types/tools.d.ts} +0 -0
  107. package/lib/{tooltips.d.ts → cjs/types/tooltips.d.ts} +0 -0
  108. package/lib/{treeview.d.ts → cjs/types/treeview.d.ts} +0 -0
  109. package/lib/{version.d.ts → cjs/types/version.d.ts} +0 -0
  110. package/lib/{x4dom.d.ts → cjs/types/x4dom.d.ts} +0 -0
  111. package/lib/{x4events.d.ts → cjs/types/x4events.d.ts} +0 -0
  112. package/lib/cjs/types/x4react.d.ts +41 -0
  113. package/lib/{version.js → cjs/version.js} +0 -0
  114. package/lib/{x4dom.js → cjs/x4dom.js} +0 -0
  115. package/lib/{x4events.js → cjs/x4events.js} +6 -11
  116. package/lib/cjs/x4react.js +72 -0
  117. package/lib/esm/action.js +53 -0
  118. package/lib/esm/application.js +184 -0
  119. package/lib/esm/autocomplete.js +155 -0
  120. package/lib/{base_component.js → esm/base_component.js} +3 -7
  121. package/lib/esm/button.js +257 -0
  122. package/lib/esm/calendar.js +244 -0
  123. package/lib/esm/canvas.js +358 -0
  124. package/lib/esm/cardview.js +159 -0
  125. package/lib/esm/checkbox.js +133 -0
  126. package/lib/{color.js → esm/color.js} +3 -7
  127. package/lib/esm/colorpicker.js +1475 -0
  128. package/lib/esm/combobox.js +259 -0
  129. package/lib/esm/component.js +1711 -0
  130. package/lib/esm/datastore.js +990 -0
  131. package/lib/esm/dialog.js +490 -0
  132. package/lib/{base64.d.ts → esm/dom_events.js} +2 -8
  133. package/lib/esm/drag_manager.js +147 -0
  134. package/lib/esm/drawtext.js +271 -0
  135. package/lib/esm/fileupload.js +163 -0
  136. package/lib/esm/form.js +297 -0
  137. package/lib/esm/formatters.js +81 -0
  138. package/lib/esm/gridview.js +889 -0
  139. package/lib/esm/i18n.js +257 -0
  140. package/lib/esm/icon.js +256 -0
  141. package/lib/esm/image.js +154 -0
  142. package/lib/esm/index.mjs +86 -0
  143. package/lib/{input.js → esm/input.js} +2 -6
  144. package/lib/esm/label.js +90 -0
  145. package/lib/esm/layout.js +310 -0
  146. package/lib/esm/link.js +59 -0
  147. package/lib/{listview.js → esm/listview.js} +30 -36
  148. package/lib/{md5.js → esm/md5.js} +1 -5
  149. package/lib/esm/menu.js +300 -0
  150. package/lib/esm/messagebox.js +145 -0
  151. package/lib/esm/panel.js +65 -0
  152. package/lib/esm/popup.js +379 -0
  153. package/lib/esm/property_editor.js +251 -0
  154. package/lib/esm/radiobtn.js +136 -0
  155. package/lib/esm/rating.js +97 -0
  156. package/lib/{request.js → esm/request.js} +9 -16
  157. package/lib/esm/router.js +136 -0
  158. package/lib/{settings.js → esm/settings.js} +1 -5
  159. package/lib/esm/sidebarview.js +79 -0
  160. package/lib/esm/spreadsheet.js +1091 -0
  161. package/lib/esm/styles.js +270 -0
  162. package/lib/esm/svgcomponent.js +422 -0
  163. package/lib/esm/tabbar.js +107 -0
  164. package/lib/esm/tabview.js +83 -0
  165. package/lib/esm/textarea.js +123 -0
  166. package/lib/esm/textedit.js +412 -0
  167. package/lib/esm/toaster.js +62 -0
  168. package/lib/esm/tools.js +1155 -0
  169. package/lib/esm/tooltips.js +153 -0
  170. package/lib/esm/treeview.js +495 -0
  171. package/lib/esm/types/action.d.ts +57 -0
  172. package/lib/esm/types/application.d.ts +104 -0
  173. package/lib/esm/types/autocomplete.d.ts +58 -0
  174. package/lib/esm/types/base_component.d.ts +88 -0
  175. package/lib/esm/types/button.d.ts +151 -0
  176. package/lib/esm/types/calendar.d.ts +81 -0
  177. package/lib/esm/types/canvas.d.ts +92 -0
  178. package/lib/esm/types/cardview.d.ts +87 -0
  179. package/lib/esm/types/checkbox.d.ts +77 -0
  180. package/lib/esm/types/color.d.ts +148 -0
  181. package/lib/esm/types/colorpicker.d.ts +107 -0
  182. package/lib/esm/types/combobox.d.ts +101 -0
  183. package/lib/esm/types/component.d.ts +601 -0
  184. package/lib/esm/types/datastore.d.ts +396 -0
  185. package/lib/esm/types/dialog.d.ts +175 -0
  186. package/lib/esm/types/dom_events.d.ts +302 -0
  187. package/lib/esm/types/drag_manager.d.ts +54 -0
  188. package/lib/esm/types/drawtext.d.ts +48 -0
  189. package/lib/esm/types/fileupload.d.ts +64 -0
  190. package/lib/esm/types/form.d.ts +126 -0
  191. package/lib/esm/types/formatters.d.ts +35 -0
  192. package/lib/esm/types/gridview.d.ts +175 -0
  193. package/lib/esm/types/i18n.d.ts +73 -0
  194. package/lib/esm/types/icon.d.ts +64 -0
  195. package/lib/esm/types/image.d.ts +55 -0
  196. package/lib/esm/types/index.d.ts +83 -0
  197. package/lib/esm/types/input.d.ts +91 -0
  198. package/lib/esm/types/label.d.ts +58 -0
  199. package/lib/esm/types/layout.d.ts +87 -0
  200. package/lib/esm/types/link.d.ts +50 -0
  201. package/lib/esm/types/listview.d.ts +178 -0
  202. package/lib/esm/types/md5.d.ts +61 -0
  203. package/lib/esm/types/menu.d.ts +130 -0
  204. package/lib/esm/types/messagebox.d.ts +68 -0
  205. package/lib/esm/types/panel.d.ts +47 -0
  206. package/lib/esm/types/popup.d.ts +75 -0
  207. package/lib/esm/types/property_editor.d.ts +71 -0
  208. package/lib/esm/types/radiobtn.d.ts +72 -0
  209. package/lib/esm/types/rating.d.ts +53 -0
  210. package/lib/esm/types/request.d.ts +52 -0
  211. package/lib/esm/types/router.d.ts +42 -0
  212. package/lib/esm/types/settings.d.ts +37 -0
  213. package/lib/esm/types/sidebarview.d.ts +49 -0
  214. package/lib/esm/types/spreadsheet.d.ts +218 -0
  215. package/lib/esm/types/styles.d.ts +85 -0
  216. package/lib/esm/types/svgcomponent.d.ts +191 -0
  217. package/lib/esm/types/tabbar.d.ts +58 -0
  218. package/lib/esm/types/tabview.d.ts +49 -0
  219. package/lib/{texthiliter.d.ts → esm/types/textarea.d.ts} +26 -23
  220. package/lib/esm/types/textedit.d.ts +123 -0
  221. package/lib/esm/types/toaster.d.ts +42 -0
  222. package/lib/esm/types/tools.d.ts +394 -0
  223. package/lib/esm/types/tooltips.d.ts +46 -0
  224. package/lib/esm/types/treeview.d.ts +132 -0
  225. package/lib/esm/types/version.d.ts +29 -0
  226. package/lib/esm/types/x4dom.d.ts +49 -0
  227. package/lib/{x4_events.d.ts → esm/types/x4events.d.ts} +6 -3
  228. package/lib/esm/types/x4react.d.ts +41 -0
  229. package/lib/esm/version.js +29 -0
  230. package/lib/esm/x4dom.js +29 -0
  231. package/lib/{x4_events.js → esm/x4events.js} +11 -24
  232. package/lib/esm/x4react.js +71 -0
  233. package/lib/{x4.css → styles/x4.css} +11 -0
  234. package/{src → lib/styles}/x4.less +14 -0
  235. package/package.json +35 -14
  236. package/build.sh +0 -5
  237. package/lib/base64.js +0 -143
  238. package/lib/hosts/host.d.ts +0 -44
  239. package/lib/hosts/host.js +0 -73
  240. package/lib/smartedit.d.ts +0 -107
  241. package/lib/smartedit.js +0 -390
  242. package/lib/texthiliter.js +0 -227
  243. package/lib/x4react.d.ts +0 -6
  244. package/lib/x4react.js +0 -35
  245. package/src/MIT-license.md +0 -14
  246. package/src/action.ts +0 -88
  247. package/src/alpha.jpg +0 -0
  248. package/src/application.ts +0 -251
  249. package/src/autocomplete.ts +0 -197
  250. package/src/base64.ts +0 -166
  251. package/src/base_component.ts +0 -152
  252. package/src/button.ts +0 -355
  253. package/src/calendar.ts +0 -322
  254. package/src/canvas.ts +0 -505
  255. package/src/cardview.ts +0 -227
  256. package/src/checkbox.ts +0 -187
  257. package/src/color.ts +0 -752
  258. package/src/colorpicker.ts +0 -1639
  259. package/src/combobox.ts +0 -362
  260. package/src/component.ts +0 -2344
  261. package/src/datastore.ts +0 -1322
  262. package/src/dialog.ts +0 -656
  263. package/src/dom_events.ts +0 -315
  264. package/src/drag_manager.ts +0 -199
  265. package/src/drawtext.ts +0 -355
  266. package/src/fileupload.ts +0 -213
  267. package/src/form.ts +0 -366
  268. package/src/formatters.ts +0 -105
  269. package/src/gridview.ts +0 -1185
  270. package/src/i18n.ts +0 -346
  271. package/src/icon.ts +0 -329
  272. package/src/image.ts +0 -204
  273. package/src/index.ts +0 -88
  274. package/src/input.ts +0 -249
  275. package/src/label.ts +0 -128
  276. package/src/layout.ts +0 -430
  277. package/src/link.ts +0 -86
  278. package/src/listview.ts +0 -762
  279. package/src/menu.ts +0 -425
  280. package/src/messagebox.ts +0 -203
  281. package/src/panel.ts +0 -86
  282. package/src/popup.ts +0 -494
  283. package/src/property_editor.ts +0 -337
  284. package/src/radiobtn.ts +0 -196
  285. package/src/rating.ts +0 -135
  286. package/src/request.ts +0 -300
  287. package/src/router.ts +0 -185
  288. package/src/settings.ts +0 -77
  289. package/src/sidebarview.ts +0 -103
  290. package/src/spreadsheet.ts +0 -1442
  291. package/src/styles.ts +0 -343
  292. package/src/svgcomponent.ts +0 -537
  293. package/src/tabbar.ts +0 -151
  294. package/src/tabview.ts +0 -110
  295. package/src/textarea.ts +0 -187
  296. package/src/textedit.ts +0 -544
  297. package/src/toaster.ts +0 -80
  298. package/src/tools.ts +0 -1468
  299. package/src/tooltips.ts +0 -191
  300. package/src/treeview.ts +0 -675
  301. package/src/version.ts +0 -30
  302. package/src/x4dom.ts +0 -57
  303. package/src/x4events.ts +0 -585
  304. package/src/x4react.ts +0 -42
  305. package/tsconfig.json +0 -21
@@ -28,7 +28,7 @@
28
28
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
29
  */
30
30
  Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.TSXComponent = exports.Container = exports.SizerOverlay = exports.EvOverlayResize = exports.Separator = exports.EvSize = exports.Space = exports.Flex = exports.flyWrap = exports.Component = exports.EvFocus = exports.EvDblClick = exports._x4_unitless = exports.html = exports.isHtmlString = exports.HtmlString = void 0;
31
+ exports.Container = exports.SizerOverlay = exports.EvOverlayResize = exports.Separator = exports.EvSize = exports.Space = exports.Flex = exports.flyWrap = exports.Component = exports.EvFocus = exports.EvDblClick = exports._x4_unitless = exports.html = exports.isHtmlString = exports.HtmlString = void 0;
32
32
  /**
33
33
  * @todo
34
34
  * create Container class
@@ -83,19 +83,8 @@ exports.EvFocus = EvFocus;
83
83
  *
84
84
  */
85
85
  class Component extends base_component_1.BaseComponent {
86
- m_dom;
87
- m_iprops;
88
- static __sb_width; // scrollbar width
89
- static __comp_guid = 1000; // component global unique id
90
- static __privateEvents = {};
91
- static __sizeObserver; // resize observer
92
- static __createObserver; // creation observer
93
- //private static __intersectionObserver: IntersectionObserver; // visibility observer
94
- static __capture = null;
95
- static __capture_mask = null;
96
- static __css = null;
97
86
  constructor(props = null) {
98
- super(props ?? {});
87
+ super(props !== null && props !== void 0 ? props : {});
99
88
  this.m_iprops = {
100
89
  classes: {},
101
90
  dom_events: {},
@@ -118,7 +107,7 @@ class Component extends base_component_1.BaseComponent {
118
107
  * @param content new content or null
119
108
  */
120
109
  setContent(content, refreshAll = false) {
121
- this.m_props.content = content ?? [];
110
+ this.m_props.content = content !== null && content !== void 0 ? content : [];
122
111
  if (this.m_iprops.inrender || !this.m_dom) {
123
112
  return;
124
113
  }
@@ -129,6 +118,9 @@ class Component extends base_component_1.BaseComponent {
129
118
  this._updateContent();
130
119
  }
131
120
  }
121
+ getContent() {
122
+ return this.m_props.content;
123
+ }
132
124
  /**
133
125
  * add a new child to the component content
134
126
  * @param content
@@ -279,7 +271,7 @@ class Component extends base_component_1.BaseComponent {
279
271
  */
280
272
  getComputedStyle(pseudoElt) {
281
273
  if (this.dom) {
282
- return new styles_1.ComputedStyle(getComputedStyle(this.dom, pseudoElt ?? null));
274
+ return new styles_1.ComputedStyle(getComputedStyle(this.dom, pseudoElt !== null && pseudoElt !== void 0 ? pseudoElt : null));
283
275
  }
284
276
  return new styles_1.ComputedStyle(this.m_props.style);
285
277
  }
@@ -532,6 +524,7 @@ class Component extends base_component_1.BaseComponent {
532
524
  render(props) {
533
525
  }
534
526
  _createDOM() {
527
+ var _a, _b;
535
528
  if (this.m_dom) {
536
529
  return this.m_dom;
537
530
  }
@@ -578,10 +571,10 @@ class Component extends base_component_1.BaseComponent {
578
571
  // create self
579
572
  let vdom = this.m_iprops;
580
573
  if (props.ns) {
581
- this.m_dom = x4dom_1.x4document.createElementNS(props.ns, props.tag ?? 'div');
574
+ this.m_dom = x4dom_1.x4document.createElementNS(props.ns, (_a = props.tag) !== null && _a !== void 0 ? _a : 'div');
582
575
  }
583
576
  else {
584
- this.m_dom = x4dom_1.x4document.createElement((props.tag ?? 'div'));
577
+ this.m_dom = x4dom_1.x4document.createElement(((_b = props.tag) !== null && _b !== void 0 ? _b : 'div'));
585
578
  }
586
579
  this.m_dom[_x4_el_sym] = this;
587
580
  //let me = Object.getPrototypeOf(this);
@@ -883,13 +876,14 @@ class Component extends base_component_1.BaseComponent {
883
876
  * called by the system
884
877
  */
885
878
  static _dispatchEvent(ev) {
879
+ var _a;
886
880
  let target = ev.target, noup = unbubbleEvents[ev.type] === 2;
887
881
  while (target) {
888
882
  if (target[_x4_el_store]) {
889
883
  let store = target[_x4_el_store][ev.type];
890
884
  if (store) {
891
885
  let el = target[_x4_el_sym];
892
- let root = el?.root ?? null;
886
+ let root = (_a = el === null || el === void 0 ? void 0 : el.root) !== null && _a !== void 0 ? _a : null;
893
887
  if (store instanceof Array) {
894
888
  store.some((fn) => {
895
889
  fn(ev, root);
@@ -918,11 +912,12 @@ class Component extends base_component_1.BaseComponent {
918
912
  * called by the system
919
913
  */
920
914
  static _dispatchUnbubbleEvent(ev) {
915
+ var _a;
921
916
  let target = ev.currentTarget || ev.target, eventType = ev.type;
922
917
  let eventStore = target[_x4_el_store], store = eventStore && eventStore[eventType];
923
918
  if (store) {
924
919
  let el = target[_x4_el_sym];
925
- let root = el?.root ?? null;
920
+ let root = (_a = el === null || el === void 0 ? void 0 : el.root) !== null && _a !== void 0 ? _a : null;
926
921
  if (store instanceof Array) {
927
922
  store.forEach((fn) => {
928
923
  fn(ev, root);
@@ -1285,6 +1280,12 @@ class Component extends base_component_1.BaseComponent {
1285
1280
  }
1286
1281
  }
1287
1282
  exports.Component = Component;
1283
+ Component.__comp_guid = 1000; // component global unique id
1284
+ Component.__privateEvents = {};
1285
+ //private static __intersectionObserver: IntersectionObserver; // visibility observer
1286
+ Component.__capture = null;
1287
+ Component.__capture_mask = null;
1288
+ Component.__css = null;
1288
1289
  /** @ignore */
1289
1290
  let fly_element = null;
1290
1291
  /**
@@ -1320,7 +1321,6 @@ exports.Flex = Flex;
1320
1321
  * simple space between 2 elements
1321
1322
  */
1322
1323
  class Space extends Component {
1323
- m_size;
1324
1324
  constructor(size) {
1325
1325
  super({});
1326
1326
  this.m_size = size;
@@ -1353,9 +1353,6 @@ function EvSize(size, mode = null, context = null) {
1353
1353
  }
1354
1354
  exports.EvSize = EvSize;
1355
1355
  class Separator extends Component {
1356
- m_irect;
1357
- m_delta;
1358
- m_target;
1359
1356
  constructor(props) {
1360
1357
  super(props);
1361
1358
  this.setDomEvent('mousedown', (e) => this._mousedown(e));
@@ -1497,8 +1494,6 @@ function EvOverlayResize(ui_event, sens, context = null) {
1497
1494
  }
1498
1495
  exports.EvOverlayResize = EvOverlayResize;
1499
1496
  class SizerOverlay extends Component {
1500
- m_delta;
1501
- m_irect;
1502
1497
  constructor(props) {
1503
1498
  super(props);
1504
1499
  this.addClass(props.sens);
@@ -1620,7 +1615,6 @@ function EvShortcut(name) {
1620
1615
  * ])
1621
1616
  */
1622
1617
  class Container extends Component {
1623
- m_shortcuts;
1624
1618
  constructor(props) {
1625
1619
  if ((0, tools_1.isArray)(props)) {
1626
1620
  super({ content: props });
@@ -1723,18 +1717,3 @@ class Container extends Component {
1723
1717
  }
1724
1718
  }
1725
1719
  exports.Container = Container;
1726
- /**
1727
- *
1728
- */
1729
- class TSXComponent extends Component {
1730
- render(props) {
1731
- const tsx = this.renderTSX(props);
1732
- if (tsx) {
1733
- this.setContent(tsx);
1734
- }
1735
- }
1736
- renderTSX(props) {
1737
- return undefined;
1738
- }
1739
- }
1740
- exports.TSXComponent = TSXComponent;
@@ -40,9 +40,6 @@ function EvDataChange(type, id) {
40
40
  *
41
41
  */
42
42
  class MetaInfos {
43
- name;
44
- id; // field name holding 'id' record info
45
- fields; // field list
46
43
  constructor(name) {
47
44
  this.name = name;
48
45
  this.id = undefined;
@@ -99,10 +96,7 @@ var data;
99
96
  function field(data) {
100
97
  return (ownerCls, fldName) => {
101
98
  let metas = _getMetas(ownerCls);
102
- metas.fields.push({
103
- name: fldName,
104
- ...data
105
- });
99
+ metas.fields.push(Object.assign({ name: fldName }, data));
106
100
  };
107
101
  }
108
102
  data_1.field = field;
@@ -113,7 +107,7 @@ var data;
113
107
  * my_field: string; // this field will be seen as a string
114
108
  */
115
109
  function string(props) {
116
- return field({ ...props, type: 'string' });
110
+ return field(Object.assign(Object.assign({}, props), { type: 'string' }));
117
111
  }
118
112
  data_1.string = string;
119
113
  /**
@@ -123,7 +117,7 @@ var data;
123
117
  * my_field: number; // this field will be seen as an integer
124
118
  */
125
119
  function int(props) {
126
- return field({ ...props, type: 'int' });
120
+ return field(Object.assign(Object.assign({}, props), { type: 'int' }));
127
121
  }
128
122
  data_1.int = int;
129
123
  /**
@@ -133,7 +127,7 @@ var data;
133
127
  * my_field: number; // this field will be seen as a float
134
128
  */
135
129
  function float(props) {
136
- return field({ ...props, type: 'float' });
130
+ return field(Object.assign(Object.assign({}, props), { type: 'float' }));
137
131
  }
138
132
  data_1.float = float;
139
133
  /**
@@ -143,7 +137,7 @@ var data;
143
137
  * my_field: boolean; // this field will be seen as a boolean
144
138
  */
145
139
  function bool(props) {
146
- return field({ ...props, type: 'bool' });
140
+ return field(Object.assign(Object.assign({}, props), { type: 'bool' }));
147
141
  }
148
142
  data_1.bool = bool;
149
143
  /**
@@ -153,7 +147,7 @@ var data;
153
147
  * my_field: date; // this field will be seen as a date
154
148
  */
155
149
  function date(props) {
156
- return field({ ...props, type: 'date' });
150
+ return field(Object.assign(Object.assign({}, props), { type: 'date' }));
157
151
  }
158
152
  data_1.date = date;
159
153
  /**
@@ -165,7 +159,7 @@ var data;
165
159
  * };
166
160
  */
167
161
  function calc(props) {
168
- return field({ ...props, type: 'calc' });
162
+ return field(Object.assign(Object.assign({}, props), { type: 'calc' }));
169
163
  }
170
164
  data_1.calc = calc;
171
165
  /**
@@ -175,7 +169,7 @@ var data;
175
169
  * my_field(): TypedRecord[];
176
170
  */
177
171
  function array(ctor, props) {
178
- return data.field({ ...props, type: 'array', model: new ctor() });
172
+ return data.field(Object.assign(Object.assign({}, props), { type: 'array', model: new ctor() }));
179
173
  }
180
174
  data_1.array = array;
181
175
  })(data = exports.data || (exports.data = {}));
@@ -381,8 +375,6 @@ exports.Record = Record;
381
375
  * by default, the field id is rhe first member or the record
382
376
  */
383
377
  class AutoRecord extends Record {
384
- m_data;
385
- m_fid;
386
378
  constructor(data) {
387
379
  super();
388
380
  this.m_data = data;
@@ -410,7 +402,7 @@ class AutoRecord extends Record {
410
402
  this.m_data[name] = data;
411
403
  }
412
404
  clone(data) {
413
- return new AutoRecord({ ...data });
405
+ return new AutoRecord(Object.assign({}, data));
414
406
  }
415
407
  }
416
408
  exports.AutoRecord = AutoRecord;
@@ -460,11 +452,6 @@ exports.DataProxy = DataProxy;
460
452
  *
461
453
  */
462
454
  class DataStore extends x4events_1.EventSource {
463
- m_model;
464
- m_fields;
465
- m_records;
466
- m_proxy;
467
- m_rec_index;
468
455
  constructor(props) {
469
456
  super();
470
457
  this.m_fields = undefined;
@@ -640,7 +627,8 @@ class DataStore extends x4events_1.EventSource {
640
627
  return this._getRecord(idx);
641
628
  }
642
629
  _getRecord(index) {
643
- return this.m_records[index] ?? null;
630
+ var _a;
631
+ return (_a = this.m_records[index]) !== null && _a !== void 0 ? _a : null;
644
632
  }
645
633
  moveTo(other) {
646
634
  other.setRawData(this.m_records);
@@ -650,7 +638,7 @@ class DataStore extends x4events_1.EventSource {
650
638
  * @param opts
651
639
  */
652
640
  createView(opts) {
653
- let eopts = { ...opts, store: this };
641
+ let eopts = Object.assign(Object.assign({}, opts), { store: this });
654
642
  return new DataView(eopts);
655
643
  }
656
644
  /**
@@ -800,8 +788,9 @@ class DataStore extends x4events_1.EventSource {
800
788
  if (fidxs.length == 1) {
801
789
  let field = fidxs[0].fidx;
802
790
  index.sort((ia, ib) => {
803
- let va = this.getByIndex(ia).getRaw(field) ?? '';
804
- let vb = this.getByIndex(ib).getRaw(field) ?? '';
791
+ var _a, _b;
792
+ let va = (_a = this.getByIndex(ia).getRaw(field)) !== null && _a !== void 0 ? _a : '';
793
+ let vb = (_b = this.getByIndex(ib).getRaw(field)) !== null && _b !== void 0 ? _b : '';
805
794
  if (va > vb) {
806
795
  return 1;
807
796
  }
@@ -817,11 +806,12 @@ class DataStore extends x4events_1.EventSource {
817
806
  }
818
807
  else {
819
808
  index.sort((ia, ib) => {
809
+ var _a, _b;
820
810
  for (let fi = 0; fi < fidxs.length; fi++) {
821
811
  let fidx = fidxs[fi].fidx;
822
812
  let mul = fidxs[fi].asc ? 1 : -1;
823
- let va = this.getByIndex(ia).getRaw(fidx) ?? '';
824
- let vb = this.getByIndex(ib).getRaw(fidx) ?? '';
813
+ let va = (_a = this.getByIndex(ia).getRaw(fidx)) !== null && _a !== void 0 ? _a : '';
814
+ let vb = (_b = this.getByIndex(ib).getRaw(fidx)) !== null && _b !== void 0 ? _b : '';
825
815
  if (va > vb) {
826
816
  return mul;
827
817
  }
@@ -873,10 +863,6 @@ exports.EvViewChange = EvViewChange;
873
863
  * You can have multiple views for a single DataStore
874
864
  */
875
865
  class DataView extends base_component_1.BaseComponent {
876
- m_index;
877
- m_store;
878
- m_sort;
879
- m_filter;
880
866
  constructor(props) {
881
867
  super(props);
882
868
  this.m_store = props.store;
@@ -46,25 +46,8 @@ exports.EvBtnClick = EvBtnClick;
46
46
  * Standard dialog class
47
47
  */
48
48
  class Dialog extends popup_1.Popup {
49
- m_icon;
50
- m_title;
51
- m_form;
52
- m_buttons;
53
- m_closable;
54
- m_movable;
55
- m_maximized;
56
- m_minimized;
57
- m_maximizable;
58
- m_minimizable;
59
- m_minFormSize;
60
- m_rc_max;
61
- m_rc_min;
62
- m_el_title;
63
- m_last_down;
64
- m_auto_close;
65
- m_ui_title;
66
- m_form_cb;
67
49
  constructor(props) {
50
+ var _a, _b, _c;
68
51
  let content = props.content;
69
52
  props.content = null;
70
53
  let width = props.width;
@@ -92,11 +75,11 @@ class Dialog extends popup_1.Popup {
92
75
  });
93
76
  }
94
77
  this.m_movable = props.movable;
95
- this.m_auto_close = props.autoClose ?? true;
78
+ this.m_auto_close = (_a = props.autoClose) !== null && _a !== void 0 ? _a : true;
96
79
  this.m_icon = props.icon;
97
80
  this.m_title = props.title;
98
- this.m_buttons = props.buttons ?? null;
99
- this.m_closable = props.closable ?? false;
81
+ this.m_buttons = (_b = props.buttons) !== null && _b !== void 0 ? _b : null;
82
+ this.m_closable = (_c = props.closable) !== null && _c !== void 0 ? _c : false;
100
83
  this.m_last_down = 0;
101
84
  this.on('size', (ev) => {
102
85
  this.addClass('@resized');
File without changes
@@ -35,11 +35,6 @@ const x_drag_cb = Symbol('x-drag-cb');
35
35
  *
36
36
  */
37
37
  class DragManager {
38
- dragSource;
39
- dragGhost;
40
- dropTarget;
41
- notified;
42
- timer;
43
38
  /**
44
39
  *
45
40
  */
@@ -49,12 +49,13 @@ const defStyle = {
49
49
  lineBreak: true,
50
50
  };
51
51
  function drawText(ctx, input_Text, rc, drawStyle) {
52
+ var _a, _b, _c;
52
53
  if (rc.width <= 0 || rc.height <= 0) {
53
54
  //width or height or font size cannot be 0
54
55
  return;
55
56
  }
56
57
  //console.time( 'drawtext' );
57
- drawStyle = { ...defStyle, ...drawStyle };
58
+ drawStyle = Object.assign(Object.assign({}, defStyle), drawStyle);
58
59
  ctx.save();
59
60
  if (drawStyle.clip) {
60
61
  ctx.beginPath();
@@ -73,7 +74,7 @@ function drawText(ctx, input_Text, rc, drawStyle) {
73
74
  }
74
75
  ctx.textBaseline = 'bottom';
75
76
  // End points
76
- let fontSize = (0, tools_1.roundTo)(drawStyle.fontSize, 2) ?? 12;
77
+ let fontSize = (_a = (0, tools_1.roundTo)(drawStyle.fontSize, 2)) !== null && _a !== void 0 ? _a : 12;
77
78
  //let style = `${drawStyle.fontStyle ?? ''} ${drawStyle.fontVariant ?? ''} ${drawStyle.fontWeight ?? ''} ${fontSize}px ${drawStyle.fontFamily ?? 'arial'}`;
78
79
  let style = '';
79
80
  if (drawStyle.fontStyle) {
@@ -86,7 +87,7 @@ function drawText(ctx, input_Text, rc, drawStyle) {
86
87
  style += drawStyle.fontWeight + ' ';
87
88
  }
88
89
  style += fontSize + 'px ';
89
- let family = drawStyle.fontFamily ?? 'sans-serif';
90
+ let family = (_b = drawStyle.fontFamily) !== null && _b !== void 0 ? _b : 'sans-serif';
90
91
  if (family.indexOf('.') > 0) {
91
92
  family = '"' + family + '"';
92
93
  }
@@ -156,7 +157,7 @@ function drawText(ctx, input_Text, rc, drawStyle) {
156
157
  }
157
158
  });
158
159
  const textSize = _calcTextHeight(ctx, "Ag");
159
- let lineHeight = (drawStyle.lineHeight ?? 1.3) * textSize; // * 1.2 = map to pdf
160
+ let lineHeight = ((_c = drawStyle.lineHeight) !== null && _c !== void 0 ? _c : 1.3) * textSize; // * 1.2 = map to pdf
160
161
  const nlines = textarray.length;
161
162
  // calc vertical Align
162
163
  let col_top = rc.top;
@@ -47,9 +47,6 @@ exports.FileUpload = FileUpload;
47
47
  *
48
48
  */
49
49
  class ImageUpload extends FileUpload {
50
- m_path;
51
- m_ui_img;
52
- m_ui_input;
53
50
  /** @ignore */
54
51
  render(props) {
55
52
  let ename = "up" + this.uid;
@@ -40,11 +40,6 @@ const i18n_1 = require("./i18n");
40
40
  *
41
41
  */
42
42
  class Form extends layout_1.VLayout {
43
- m_height;
44
- m_container;
45
- m_buttons;
46
- m_dirty;
47
- m_watchChanges;
48
43
  constructor(props) {
49
44
  let content = props.content;
50
45
  props.content = null;
@@ -121,7 +116,8 @@ class Form extends layout_1.VLayout {
121
116
  * @param name
122
117
  */
123
118
  getButton(name) {
124
- let button = this.m_buttons?.itemWithRef('@' + name);
119
+ var _a;
120
+ let button = (_a = this.m_buttons) === null || _a === void 0 ? void 0 : _a.itemWithRef('@' + name);
125
121
  return button;
126
122
  }
127
123
  /**
File without changes
@@ -48,8 +48,6 @@ function EvGridCheck(rec, chk) {
48
48
  }
49
49
  exports.EvGridCheck = EvGridCheck;
50
50
  class ColHeader extends component_1.Component {
51
- m_sens;
52
- m_sorted;
53
51
  constructor(props, title) {
54
52
  super(props);
55
53
  this.m_sorted = false;
@@ -93,27 +91,11 @@ class ColHeader extends component_1.Component {
93
91
  * gridview class
94
92
  */
95
93
  class GridView extends layout_1.VLayout {
96
- m_dataview;
97
- m_data_cx;
98
- m_columns;
99
- m_view_el;
100
- m_container;
101
- m_header;
102
- m_footer;
103
- m_empty_msg;
104
- m_empty_text;
105
- m_selection;
106
- m_itemHeight;
107
- m_topIndex;
108
- m_visible_rows; // shown elements
109
- m_hasMarks;
110
- m_marks; // checked elements
111
- m_recycler;
112
- m_rowClassifier;
113
94
  constructor(props) {
95
+ var _a, _b;
114
96
  super(props);
115
97
  this.m_columns = props.columns;
116
- this.m_hasMarks = props.hasMarks ?? false;
98
+ this.m_hasMarks = (_a = props.hasMarks) !== null && _a !== void 0 ? _a : false;
117
99
  this.m_marks = new Set();
118
100
  // prepend the checkable column
119
101
  if (this.m_hasMarks) {
@@ -129,7 +111,7 @@ class GridView extends layout_1.VLayout {
129
111
  this.m_itemHeight = 0;
130
112
  this.m_recycler = [];
131
113
  this.m_rowClassifier = props.calcRowClass;
132
- this.m_empty_text = props.empty_text ?? i18n_1._tr.global.empty_list;
114
+ this.m_empty_text = (_b = props.empty_text) !== null && _b !== void 0 ? _b : i18n_1._tr.global.empty_list;
133
115
  //this.setDomEvent('create', this._handleCreate, this);
134
116
  this.setDomEvent('click', (e) => this._itemClick(e));
135
117
  this.setDomEvent('dblclick', (e) => this._itemDblClick(e));
@@ -347,7 +329,8 @@ class GridView extends layout_1.VLayout {
347
329
  // compute full width
348
330
  let full_width = 0;
349
331
  this.m_columns.forEach((col) => {
350
- full_width += col.width ?? 0;
332
+ var _a;
333
+ full_width += (_a = col.width) !== null && _a !== void 0 ? _a : 0;
351
334
  });
352
335
  this.m_header = new layout_1.HLayout({
353
336
  cls: '@header',
@@ -399,20 +382,21 @@ class GridView extends layout_1.VLayout {
399
382
  ]);
400
383
  }
401
384
  _on_col_resize(col, width) {
385
+ var _a, _b, _c, _d;
402
386
  const _col = this.m_columns[col];
403
387
  let updateFlex = false;
404
388
  if (width >= 0) {
405
389
  _col.width = width;
406
390
  if (_col.flex) {
407
391
  _col.$hdr.removeClass('@flex');
408
- _col.$ftr?.removeClass('@flex');
392
+ (_a = _col.$ftr) === null || _a === void 0 ? void 0 : _a.removeClass('@flex');
409
393
  _col.flex = undefined;
410
394
  updateFlex = true;
411
395
  }
412
396
  }
413
397
  else if (width < 0 && !_col.flex) {
414
398
  _col.$hdr.addClass('@flex');
415
- _col.$ftr?.addClass('@flex');
399
+ (_b = _col.$ftr) === null || _b === void 0 ? void 0 : _b.addClass('@flex');
416
400
  _col.flex = 1;
417
401
  updateFlex = true;
418
402
  }
@@ -423,9 +407,9 @@ class GridView extends layout_1.VLayout {
423
407
  flex = true;
424
408
  }
425
409
  });
426
- this.m_header.itemWithRef('flex')?.show(flex ? false : true);
410
+ (_c = this.m_header.itemWithRef('flex')) === null || _c === void 0 ? void 0 : _c.show(flex ? false : true);
427
411
  if (this.m_footer) {
428
- this.m_footer.itemWithRef('flex')?.show(flex ? false : true);
412
+ (_d = this.m_footer.itemWithRef('flex')) === null || _d === void 0 ? void 0 : _d.show(flex ? false : true);
429
413
  }
430
414
  }
431
415
  this._updateScroll(true);
@@ -503,6 +487,7 @@ class GridView extends layout_1.VLayout {
503
487
  return row;
504
488
  }
505
489
  _buildItems(canOpt = true) {
490
+ var _a, _b, _c, _d;
506
491
  let rc = this.getBoundingRect();
507
492
  let rh = this.m_header.getBoundingRect();
508
493
  let height = rc.height - rh.height + this.m_itemHeight;
@@ -518,17 +503,18 @@ class GridView extends layout_1.VLayout {
518
503
  let even = this.m_topIndex & 1 ? true : false;
519
504
  // compute full width
520
505
  this.m_columns.forEach((col) => {
521
- full_width += col.width ?? 0;
506
+ var _a;
507
+ full_width += (_a = col.width) !== null && _a !== void 0 ? _a : 0;
522
508
  });
523
509
  // if items height make scroll visible, update header width
524
510
  if (((count + 1) * this.m_itemHeight) >= height) {
525
511
  let w = component_1.Component.getScrollbarSize();
526
512
  this.m_header.setStyleValue("paddingRight", w);
527
- this.m_footer?.setStyleValue("paddingRight", w);
513
+ (_a = this.m_footer) === null || _a === void 0 ? void 0 : _a.setStyleValue("paddingRight", w);
528
514
  }
529
515
  else {
530
516
  this.m_header.setStyleValue("paddingRight", 0);
531
- this.m_footer?.setStyleValue("paddingRight", 0);
517
+ (_b = this.m_footer) === null || _b === void 0 ? void 0 : _b.setStyleValue("paddingRight", 0);
532
518
  }
533
519
  // passe 0 - all created cells are moved to the recycler
534
520
  if (this.m_visible_rows) {
@@ -639,7 +625,7 @@ class GridView extends layout_1.VLayout {
639
625
  this.m_empty_msg.show(show);
640
626
  if (full_width < rc.width) {
641
627
  this.m_header.setStyleValue('width', null);
642
- this.m_footer?.setStyleValue('width', null);
628
+ (_c = this.m_footer) === null || _c === void 0 ? void 0 : _c.setStyleValue('width', null);
643
629
  this.m_container.setStyle({
644
630
  height: count * this.m_itemHeight,
645
631
  width: null
@@ -647,7 +633,7 @@ class GridView extends layout_1.VLayout {
647
633
  }
648
634
  else {
649
635
  this.m_header.setStyleValue('width', full_width + 1000);
650
- this.m_footer?.setStyleValue('width', full_width + 1000);
636
+ (_d = this.m_footer) === null || _d === void 0 ? void 0 : _d.setStyleValue('width', full_width + 1000);
651
637
  this.m_container.setStyle({
652
638
  height: count * this.m_itemHeight,
653
639
  width: full_width
@@ -662,6 +648,7 @@ class GridView extends layout_1.VLayout {
662
648
  return;
663
649
  }
664
650
  const update = () => {
651
+ var _a;
665
652
  // element destroyed between updateScroll and now
666
653
  if (!this.dom) {
667
654
  return;
@@ -673,7 +660,7 @@ class GridView extends layout_1.VLayout {
673
660
  }
674
661
  let newLeft = this.m_view_el.dom.scrollLeft;
675
662
  this.m_header.setStyleValue('left', -newLeft);
676
- this.m_footer?.setStyleValue('left', -newLeft);
663
+ (_a = this.m_footer) === null || _a === void 0 ? void 0 : _a.setStyleValue('left', -newLeft);
677
664
  };
678
665
  if (forceUpdate) {
679
666
  this.singleShot(update, 10);
@@ -721,7 +708,7 @@ class GridView extends layout_1.VLayout {
721
708
  _itemMenu(e) {
722
709
  let dom = e.target, self = this.dom;
723
710
  while (dom && dom != self) {
724
- let itm = component_1.Component.getElement(dom), id = itm?.getData('row-id');
711
+ let itm = component_1.Component.getElement(dom), id = itm === null || itm === void 0 ? void 0 : itm.getData('row-id');
725
712
  if (id !== undefined) {
726
713
  this._selectItem(id, itm);
727
714
  let idx = itm.getData('row-idx');
File without changes