x4js 1.4.8 → 1.4.11

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 (173) hide show
  1. package/build.sh +5 -0
  2. package/lib/application.d.ts +15 -11
  3. package/lib/application.js +15 -11
  4. package/lib/base64.d.ts +15 -11
  5. package/lib/base64.js +15 -11
  6. package/lib/base_component.d.ts +18 -1
  7. package/lib/base_component.js +18 -1
  8. package/lib/button.d.ts +15 -11
  9. package/lib/button.js +15 -11
  10. package/lib/calendar.d.ts +15 -11
  11. package/lib/calendar.js +29 -22
  12. package/lib/canvas.d.ts +15 -11
  13. package/lib/canvas.js +15 -11
  14. package/lib/cardview.d.ts +15 -11
  15. package/lib/cardview.js +15 -11
  16. package/lib/checkbox.d.ts +17 -12
  17. package/lib/checkbox.js +18 -11
  18. package/lib/color.d.ts +15 -11
  19. package/lib/color.js +15 -11
  20. package/lib/colorpicker.d.ts +18 -11
  21. package/lib/colorpicker.js +18 -11
  22. package/lib/combobox.d.ts +15 -11
  23. package/lib/combobox.js +16 -12
  24. package/lib/component.d.ts +19 -15
  25. package/lib/component.js +19 -15
  26. package/lib/datastore.d.ts +15 -11
  27. package/lib/datastore.js +16 -12
  28. package/lib/dialog.d.ts +15 -11
  29. package/lib/dialog.js +19 -14
  30. package/lib/dom_events.d.ts +17 -1
  31. package/lib/dom_events.js +17 -1
  32. package/lib/drag_manager.d.ts +28 -0
  33. package/lib/drawtext.d.ts +15 -11
  34. package/lib/drawtext.js +15 -11
  35. package/lib/fileupload.d.ts +15 -11
  36. package/lib/fileupload.js +15 -11
  37. package/lib/form.d.ts +15 -11
  38. package/lib/form.js +15 -11
  39. package/lib/formatters.d.ts +15 -11
  40. package/lib/formatters.js +16 -11
  41. package/lib/gridview.d.ts +15 -11
  42. package/lib/gridview.js +59 -29
  43. package/lib/i18n.d.ts +15 -11
  44. package/lib/i18n.js +15 -11
  45. package/lib/icon.d.ts +20 -12
  46. package/lib/icon.js +107 -25
  47. package/lib/image.d.ts +15 -11
  48. package/lib/image.js +15 -11
  49. package/lib/index.d.ts +28 -0
  50. package/lib/index.js +28 -0
  51. package/lib/input.d.ts +15 -11
  52. package/lib/input.js +15 -11
  53. package/lib/label.d.ts +15 -11
  54. package/lib/label.js +15 -11
  55. package/lib/layout.d.ts +27 -17
  56. package/lib/layout.js +61 -18
  57. package/lib/link.d.ts +15 -11
  58. package/lib/link.js +15 -11
  59. package/lib/listview.d.ts +18 -14
  60. package/lib/listview.js +16 -23
  61. package/lib/md5.d.ts +16 -11
  62. package/lib/md5.js +16 -10
  63. package/lib/menu.d.ts +15 -11
  64. package/lib/menu.js +19 -12
  65. package/lib/messagebox.d.ts +15 -11
  66. package/lib/messagebox.js +17 -13
  67. package/lib/panel.d.ts +15 -11
  68. package/lib/panel.js +15 -11
  69. package/lib/popup.d.ts +15 -11
  70. package/lib/popup.js +20 -18
  71. package/lib/property_editor.d.ts +15 -11
  72. package/lib/property_editor.js +15 -11
  73. package/lib/radiobtn.d.ts +15 -11
  74. package/lib/radiobtn.js +15 -11
  75. package/lib/rating.d.ts +15 -11
  76. package/lib/rating.js +15 -11
  77. package/lib/request.d.ts +15 -11
  78. package/lib/request.js +16 -12
  79. package/lib/router.d.ts +28 -0
  80. package/lib/router.js +28 -0
  81. package/lib/settings.d.ts +15 -11
  82. package/lib/settings.js +15 -11
  83. package/lib/sidebarview.d.ts +15 -11
  84. package/lib/sidebarview.js +15 -11
  85. package/lib/smartedit.d.ts +15 -11
  86. package/lib/smartedit.js +15 -11
  87. package/lib/spreadsheet.d.ts +15 -11
  88. package/lib/spreadsheet.js +15 -11
  89. package/lib/styles.d.ts +16 -12
  90. package/lib/styles.js +21 -14
  91. package/lib/svgcomponent.d.ts +15 -11
  92. package/lib/svgcomponent.js +15 -11
  93. package/lib/tabbar.d.ts +17 -2
  94. package/lib/tabbar.js +17 -2
  95. package/lib/tabview.d.ts +15 -11
  96. package/lib/tabview.js +15 -11
  97. package/lib/textarea.d.ts +15 -11
  98. package/lib/textarea.js +15 -11
  99. package/lib/textedit.d.ts +15 -11
  100. package/lib/textedit.js +16 -12
  101. package/lib/texthiliter.d.ts +15 -11
  102. package/lib/texthiliter.js +15 -11
  103. package/lib/toaster.d.ts +15 -11
  104. package/lib/toaster.js +15 -11
  105. package/lib/tools.d.ts +15 -11
  106. package/lib/tools.js +17 -12
  107. package/lib/tooltips.d.ts +15 -11
  108. package/lib/tooltips.js +16 -12
  109. package/lib/treeview.d.ts +15 -11
  110. package/lib/treeview.js +15 -11
  111. package/{x4.css → lib/x4.css} +269 -106
  112. package/lib/x4_events.d.ts +17 -12
  113. package/lib/x4_events.js +24 -14
  114. package/package.json +5 -1
  115. package/src/MIT-license.md +14 -0
  116. package/src/application.ts +15 -11
  117. package/src/base64.ts +15 -11
  118. package/src/base_component.ts +18 -1
  119. package/src/button.ts +15 -11
  120. package/src/calendar.ts +30 -22
  121. package/src/canvas.ts +22 -18
  122. package/src/cardview.ts +15 -11
  123. package/src/checkbox.ts +21 -12
  124. package/src/color.ts +15 -11
  125. package/src/colorpicker.ts +19 -11
  126. package/src/combobox.ts +16 -12
  127. package/src/component.ts +21 -16
  128. package/src/datastore.ts +16 -12
  129. package/src/dialog.ts +19 -14
  130. package/src/dom_events.ts +17 -1
  131. package/src/drag_manager.ts +28 -0
  132. package/src/drawtext.ts +15 -11
  133. package/src/fileupload.ts +15 -11
  134. package/src/form.ts +15 -11
  135. package/src/formatters.ts +19 -12
  136. package/src/gridview.ts +76 -30
  137. package/src/i18n.ts +15 -11
  138. package/src/icon.ts +125 -33
  139. package/src/image.ts +15 -11
  140. package/src/index.ts +29 -0
  141. package/src/input.ts +15 -11
  142. package/src/label.ts +15 -11
  143. package/src/layout.ts +75 -20
  144. package/src/link.ts +15 -11
  145. package/src/listview.ts +18 -14
  146. package/src/md5.ts +16 -10
  147. package/src/menu.ts +19 -12
  148. package/src/messagebox.ts +17 -13
  149. package/src/panel.ts +15 -11
  150. package/src/popup.ts +20 -19
  151. package/src/property_editor.ts +15 -11
  152. package/src/radiobtn.ts +15 -11
  153. package/src/rating.ts +15 -11
  154. package/src/request.ts +16 -12
  155. package/src/router.ts +28 -0
  156. package/src/settings.ts +15 -11
  157. package/src/sidebarview.ts +15 -11
  158. package/src/smartedit.ts +15 -11
  159. package/src/spreadsheet.ts +15 -11
  160. package/src/styles.ts +23 -14
  161. package/src/svgcomponent.ts +15 -11
  162. package/src/tabbar.ts +17 -2
  163. package/src/tabview.ts +15 -11
  164. package/src/textarea.ts +15 -11
  165. package/src/textedit.ts +17 -13
  166. package/src/texthiliter.ts +15 -11
  167. package/src/toaster.ts +15 -11
  168. package/src/tools.ts +18 -12
  169. package/src/tooltips.ts +16 -12
  170. package/src/treeview.ts +15 -11
  171. package/src/x4.less +289 -120
  172. package/src/x4_events.ts +27 -16
  173. package/tsconfig.json +1 -1
package/lib/layout.js CHANGED
@@ -6,25 +6,29 @@
6
6
  * / \____ _|
7
7
  * /__/\__\ |_|
8
8
  *
9
- * @file layout.ts
10
- * @author Etienne Cochard
11
- * @license
12
- * Copyright (c) 2019-2021 R-libre ingenierie
13
- *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 3 of the License, or
17
- * (at your option) any later version.
18
- *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
23
- *
24
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>..
25
- */
9
+ * @file layout.ts
10
+ * @author Etienne Cochard
11
+ *
12
+ * Copyright (c) 2019-2022 R-libre ingenierie
13
+ *
14
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ * of this software and associated documentation files (the "Software"), to deal
16
+ * in the Software without restriction, including without limitation the rights
17
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
18
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
19
+ * subject to the following conditions:
20
+ * The above copyright notice and this permission notice shall be included in all copies
21
+ * or substantial portions of the Software.
22
+ *
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
24
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
25
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
+ */
26
30
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.ScrollView = exports.TableLayout = exports.GridLayout = exports.AutoLayout = exports.VLayout = exports.HLayout = exports.AbsLayout = void 0;
31
+ exports.Masonry = exports.ScrollView = exports.TableLayout = exports.GridLayout = exports.AutoLayout = exports.VLayout = exports.HLayout = exports.AbsLayout = void 0;
28
32
  const component_1 = require("./component");
29
33
  const tools_1 = require("./tools");
30
34
  // ============================================================================
@@ -269,3 +273,42 @@ class ScrollView extends component_1.Component {
269
273
  }
270
274
  }
271
275
  exports.ScrollView = ScrollView;
276
+ // :: MASONERY ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
277
+ // from a nice article of Andy Barefoot
278
+ // https://medium.com/@andybarefoot/a-masonry-style-layout-using-css-grid-8c663d355ebb
279
+ class Masonry extends component_1.Container {
280
+ constructor(props) {
281
+ super(props);
282
+ this.setDomEvent('sizechange', () => {
283
+ this.resizeAllItems();
284
+ });
285
+ }
286
+ resizeItem(item) {
287
+ const style = this.getComputedStyle();
288
+ const rowHeight = style.parse('grid-auto-rows');
289
+ const rowGap = style.parse('grid-row-gap');
290
+ let content = item.queryItem('.content');
291
+ if (!content) {
292
+ content = item;
293
+ }
294
+ if (content && (rowHeight + rowGap)) {
295
+ const rc = content.getBoundingRect();
296
+ const rowSpan = Math.ceil((rc.height + rowGap) / (rowHeight + rowGap));
297
+ item.setStyleValue('gridRowEnd', "span " + rowSpan);
298
+ }
299
+ }
300
+ resizeAllItems() {
301
+ this.queryAll(".item", (itm) => {
302
+ ;
303
+ this.resizeItem(itm);
304
+ });
305
+ }
306
+ addItem(itm) {
307
+ itm.addClass('content');
308
+ this.appendChild(new component_1.Container({
309
+ cls: 'item',
310
+ content: itm
311
+ }));
312
+ }
313
+ }
314
+ exports.Masonry = Masonry;
package/lib/link.d.ts CHANGED
@@ -7,20 +7,24 @@
7
7
  *
8
8
  * @file link.ts
9
9
  * @author Etienne Cochard
10
- * @license
11
- * Copyright (c) 2019-2021 R-libre ingenierie
12
10
  *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 3 of the License, or
16
- * (at your option) any later version.
11
+ * Copyright (c) 2019-2022 R-libre ingenierie
17
12
  *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
17
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
18
+ * subject to the following conditions:
19
+ * The above copyright notice and this permission notice shall be included in all copies
20
+ * or substantial portions of the Software.
22
21
  *
23
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
23
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
28
  **/
25
29
  import { Component, CProps, CEventMap, HtmlString } from './component';
26
30
  import { EvClick, EventCallback } from './x4_events';
package/lib/link.js CHANGED
@@ -8,20 +8,24 @@
8
8
  *
9
9
  * @file link.ts
10
10
  * @author Etienne Cochard
11
- * @license
12
- * Copyright (c) 2019-2021 R-libre ingenierie
13
11
  *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 3 of the License, or
17
- * (at your option) any later version.
12
+ * Copyright (c) 2019-2022 R-libre ingenierie
18
13
  *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
14
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ * of this software and associated documentation files (the "Software"), to deal
16
+ * in the Software without restriction, including without limitation the rights
17
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
18
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
19
+ * subject to the following conditions:
20
+ * The above copyright notice and this permission notice shall be included in all copies
21
+ * or substantial portions of the Software.
23
22
  *
24
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
24
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
25
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
29
  **/
26
30
  Object.defineProperty(exports, "__esModule", { value: true });
27
31
  exports.Link = void 0;
package/lib/listview.d.ts CHANGED
@@ -7,22 +7,26 @@
7
7
  *
8
8
  * @file listview.ts
9
9
  * @author Etienne Cochard
10
- * @license
11
- * Copyright (c) 2019-2021 R-libre ingenierie
12
10
  *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 3 of the License, or
16
- * (at your option) any later version.
11
+ * Copyright (c) 2019-2022 R-libre ingenierie
17
12
  *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
17
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
18
+ * subject to the following conditions:
19
+ * The above copyright notice and this permission notice shall be included in all copies
20
+ * or substantial portions of the Software.
22
21
  *
23
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
23
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
28
  **/
25
- import { Container, Component, CProps, ContainerEventMap, EvDblClick } from './component';
29
+ import { Container, Component, ContainerProps, ContainerEventMap, EvDblClick } from './component';
26
30
  import { IconID } from './icon';
27
31
  import { VLayout } from './layout';
28
32
  import { Popup, PopupEventMap, PopupProps } from './popup';
@@ -31,7 +35,7 @@ import { EvContextMenu, EvSelectionChange, EvClick, EventCallback, BasicEvent }
31
35
  /**
32
36
  * item definition
33
37
  */
34
- export declare class ListViewItem {
38
+ export interface ListViewItem {
35
39
  id: any;
36
40
  text?: string | HtmlString;
37
41
  html?: boolean;
@@ -63,7 +67,7 @@ export interface ListViewEventMap extends ContainerEventMap {
63
67
  /**
64
68
  * listview properties
65
69
  */
66
- export interface ListViewProps<E extends ListViewEventMap = ListViewEventMap> extends CProps<E> {
70
+ export interface ListViewProps<E extends ListViewEventMap = ListViewEventMap> extends ContainerProps<E> {
67
71
  items?: ListViewItem[];
68
72
  populate?: PopulateItems;
69
73
  gadgets?: Component[];
package/lib/listview.js CHANGED
@@ -8,40 +8,33 @@
8
8
  *
9
9
  * @file listview.ts
10
10
  * @author Etienne Cochard
11
- * @license
12
- * Copyright (c) 2019-2021 R-libre ingenierie
13
11
  *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 3 of the License, or
17
- * (at your option) any later version.
12
+ * Copyright (c) 2019-2022 R-libre ingenierie
18
13
  *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
14
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ * of this software and associated documentation files (the "Software"), to deal
16
+ * in the Software without restriction, including without limitation the rights
17
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
18
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
19
+ * subject to the following conditions:
20
+ * The above copyright notice and this permission notice shall be included in all copies
21
+ * or substantial portions of the Software.
23
22
  *
24
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
24
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
25
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
29
  **/
26
30
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.PopupListView = exports.EvCancel = exports.ListView = exports.ListViewItem = void 0;
31
+ exports.PopupListView = exports.EvCancel = exports.ListView = void 0;
28
32
  const component_1 = require("./component");
29
33
  const layout_1 = require("./layout");
30
34
  const popup_1 = require("./popup");
31
35
  const tools_1 = require("./tools");
32
36
  const menu_1 = require("./menu");
33
37
  const x4_events_1 = require("./x4_events");
34
- /**
35
- * item definition
36
- */
37
- class ListViewItem {
38
- id;
39
- text; // if you need pure text
40
- html; // if text is html
41
- icon;
42
- data;
43
- }
44
- exports.ListViewItem = ListViewItem;
45
38
  ;
46
39
  /**
47
40
  * Standard listview class
package/lib/md5.d.ts CHANGED
@@ -8,19 +8,24 @@
8
8
  * @file md5.ts
9
9
  * @author Etienne Cochard
10
10
  * @license
11
- * Copyright (c) 2019-2021 R-libre ingenierie
12
11
  *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 3 of the License, or
16
- * (at your option) any later version.
12
+ * Copyright (c) 2019-2022 R-libre ingenierie
17
13
  *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
14
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ * of this software and associated documentation files (the "Software"), to deal
16
+ * in the Software without restriction, including without limitation the rights
17
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
18
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
19
+ * subject to the following conditions:
20
+ * The above copyright notice and this permission notice shall be included in all copies
21
+ * or substantial portions of the Software.
22
22
  *
23
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
24
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
25
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
29
  **/
25
30
  export declare class Md5 {
26
31
  static hashStr(str: string, raw?: false): string;
@@ -46,7 +51,7 @@ export declare class Md5 {
46
51
  appendAsciiStr(str: string): this;
47
52
  appendByteArray(input: Uint8Array): this;
48
53
  getState(): {
49
- buffer: any;
54
+ buffer: string;
50
55
  buflen: number;
51
56
  length: number;
52
57
  state: number[];
package/lib/md5.js CHANGED
@@ -9,19 +9,24 @@
9
9
  * @file md5.ts
10
10
  * @author Etienne Cochard
11
11
  * @license
12
- * Copyright (c) 2019-2021 R-libre ingenierie
13
12
  *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 3 of the License, or
17
- * (at your option) any later version.
13
+ * Copyright (c) 2019-2022 R-libre ingenierie
18
14
  *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ * of this software and associated documentation files (the "Software"), to deal
17
+ * in the Software without restriction, including without limitation the rights
18
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
19
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
20
+ * subject to the following conditions:
21
+ * The above copyright notice and this permission notice shall be included in all copies
22
+ * or substantial portions of the Software.
23
23
  *
24
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
25
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
26
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
27
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
30
  **/
26
31
  Object.defineProperty(exports, "__esModule", { value: true });
27
32
  exports.Md5 = void 0;
@@ -338,6 +343,7 @@ class Md5 {
338
343
  const self = this;
339
344
  const s = self._state;
340
345
  return {
346
+ //@ts-ignore
341
347
  buffer: String.fromCharCode.apply(null, self._buffer8),
342
348
  buflen: self._bufferLength,
343
349
  length: self._dataLength,
package/lib/menu.d.ts CHANGED
@@ -7,20 +7,24 @@
7
7
  *
8
8
  * @file menu.ts
9
9
  * @author Etienne Cochard
10
- * @license
11
- * Copyright (c) 2019-2021 R-libre ingenierie
12
10
  *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 3 of the License, or
16
- * (at your option) any later version.
11
+ * Copyright (c) 2019-2022 R-libre ingenierie
17
12
  *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
17
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
18
+ * subject to the following conditions:
19
+ * The above copyright notice and this permission notice shall be included in all copies
20
+ * or substantial portions of the Software.
22
21
  *
23
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
23
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
28
  **/
25
29
  import { CEventMap, Component, CProps } from './component';
26
30
  import { EvClick, EventCallback } from './x4_events';
package/lib/menu.js CHANGED
@@ -8,20 +8,24 @@
8
8
  *
9
9
  * @file menu.ts
10
10
  * @author Etienne Cochard
11
- * @license
12
- * Copyright (c) 2019-2021 R-libre ingenierie
13
11
  *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 3 of the License, or
17
- * (at your option) any later version.
12
+ * Copyright (c) 2019-2022 R-libre ingenierie
18
13
  *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
14
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ * of this software and associated documentation files (the "Software"), to deal
16
+ * in the Software without restriction, including without limitation the rights
17
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
18
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
19
+ * subject to the following conditions:
20
+ * The above copyright notice and this permission notice shall be included in all copies
21
+ * or substantial portions of the Software.
23
22
  *
24
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
24
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
25
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
29
  **/
26
30
  Object.defineProperty(exports, "__esModule", { value: true });
27
31
  exports.MenuBar = exports.MenuItem = exports.Menu = exports.MenuTitle = exports.MenuSeparator = void 0;
@@ -195,8 +199,10 @@ class MenuItem extends component_1.Component {
195
199
  if (props.checked !== undefined) {
196
200
  icon = props.checked ? 'cls(far fa-check)' : 0; //todo: use stylesheet
197
201
  }
202
+ let popIco = null;
198
203
  if (this.isPopup) {
199
204
  this.addClass('@popup-menu-item');
205
+ popIco = new icon_1.Icon("var( --x4-icon-chevron-right )");
200
206
  }
201
207
  if (!text && !icon) {
202
208
  this.addClass('@separator');
@@ -209,7 +215,8 @@ class MenuItem extends component_1.Component {
209
215
  // this.setAttribute( 'tabindex', '0' );
210
216
  this.setContent([
211
217
  icon < 0 ? null : new icon_1.Icon({ icon }),
212
- new label_1.Label({ flex: 1, text })
218
+ new label_1.Label({ flex: 1, text }),
219
+ popIco
213
220
  ]);
214
221
  }
215
222
  get id() {
@@ -7,20 +7,24 @@
7
7
  *
8
8
  * @file messagebox.ts
9
9
  * @author Etienne Cochard
10
- * @license
11
- * Copyright (c) 2019-2021 R-libre ingenierie
12
10
  *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 3 of the License, or
16
- * (at your option) any later version.
11
+ * Copyright (c) 2019-2022 R-libre ingenierie
17
12
  *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
17
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
18
+ * subject to the following conditions:
19
+ * The above copyright notice and this permission notice shall be included in all copies
20
+ * or substantial portions of the Software.
22
21
  *
23
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
23
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
28
  **/
25
29
  import { Dialog, DialogProps } from './dialog';
26
30
  import { HtmlString } from './tools';
package/lib/messagebox.js CHANGED
@@ -8,20 +8,24 @@
8
8
  *
9
9
  * @file messagebox.ts
10
10
  * @author Etienne Cochard
11
- * @license
12
- * Copyright (c) 2019-2021 R-libre ingenierie
13
11
  *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 3 of the License, or
17
- * (at your option) any later version.
12
+ * Copyright (c) 2019-2022 R-libre ingenierie
18
13
  *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
14
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ * of this software and associated documentation files (the "Software"), to deal
16
+ * in the Software without restriction, including without limitation the rights
17
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
18
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
19
+ * subject to the following conditions:
20
+ * The above copyright notice and this permission notice shall be included in all copies
21
+ * or substantial portions of the Software.
23
22
  *
24
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
24
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
25
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
29
  **/
26
30
  Object.defineProperty(exports, "__esModule", { value: true });
27
31
  exports.PromptDialogBox = exports.MessageBox = void 0;
@@ -35,7 +39,7 @@ class MessageBox extends dialog_1.Dialog {
35
39
  m_label;
36
40
  constructor(props) {
37
41
  // remove overloaded elements from DialogBoxProps
38
- let icon = props.icon ?? 'cls(far fa-circle-exclamation)'; // todo: resolve that
42
+ let icon = props.icon ?? 'var( --x4-icon-exclamation )'; // todo: resolve that
39
43
  props.icon = undefined;
40
44
  let buttons = props.buttons === undefined ? ['ok'] : props.buttons;
41
45
  props.buttons = undefined;
@@ -44,7 +48,7 @@ class MessageBox extends dialog_1.Dialog {
44
48
  this.form.updateContent(new layout_1.HLayout({
45
49
  style: { padding: 8 },
46
50
  content: [
47
- new icon_1.Icon({ cls: 'icon', icon }),
51
+ icon ? new icon_1.Icon({ cls: 'icon', icon }) : null,
48
52
  this.m_label = new label_1.Label({ cls: 'text', text: msg, multiline: true })
49
53
  ]
50
54
  }), buttons);
package/lib/panel.d.ts CHANGED
@@ -7,20 +7,24 @@
7
7
  *
8
8
  * @file panel.ts
9
9
  * @author Etienne Cochard
10
- * @license
11
- * Copyright (c) 2019-2021 R-libre ingenierie
12
10
  *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 3 of the License, or
16
- * (at your option) any later version.
11
+ * Copyright (c) 2019-2022 R-libre ingenierie
17
12
  *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
17
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
18
+ * subject to the following conditions:
19
+ * The above copyright notice and this permission notice shall be included in all copies
20
+ * or substantial portions of the Software.
22
21
  *
23
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
23
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
28
  **/
25
29
  import { Component, ComponentContent, ContainerProps, ContainerEventMap } from './component';
26
30
  import { VLayout } from './layout';