@web-atoms/web-controls 2.6.5 → 2.6.7

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 (185) hide show
  1. package/dist/html-editor/InlineHtmlEditor.d.ts +1 -1
  2. package/dist/html-editor/InlineHtmlEditor.d.ts.map +1 -1
  3. package/dist/html-editor/InlineHtmlEditor.js +2 -2
  4. package/dist/html-editor/InlineHtmlEditor.js.map +1 -1
  5. package/dist/tsconfig.tsbuildinfo +1 -1
  6. package/dist-esm/ArrayLike.js +14 -12
  7. package/dist-esm/DataAttributes.js +18 -19
  8. package/dist-esm/Focusable.js +10 -11
  9. package/dist-esm/ModuleFiles.js +43 -42
  10. package/dist-esm/NumberFormats.js +60 -56
  11. package/dist-esm/PageNavigator.js +28 -30
  12. package/dist-esm/animations/Animations.js +36 -33
  13. package/dist-esm/basic/AtomChips.js +312 -305
  14. package/dist-esm/basic/AtomRepeater.js +1070 -1035
  15. package/dist-esm/basic/AtomSuggestions.js +97 -107
  16. package/dist-esm/basic/AttachedPopup.js +0 -1
  17. package/dist-esm/basic/Button.js +45 -19
  18. package/dist-esm/basic/ButtonBar.js +84 -64
  19. package/dist-esm/basic/Calendar.js +211 -203
  20. package/dist-esm/basic/CheckBoxList.js +90 -70
  21. package/dist-esm/basic/Checkbox.js +16 -8
  22. package/dist-esm/basic/Chip.js +36 -12
  23. package/dist-esm/basic/ComboBox.js +47 -51
  24. package/dist-esm/basic/DataGrid.js +258 -252
  25. package/dist-esm/basic/DateField.js +149 -127
  26. package/dist-esm/basic/DropDown.js +91 -103
  27. package/dist-esm/basic/DropDownInput.js +78 -106
  28. package/dist-esm/basic/Editable.js +82 -77
  29. package/dist-esm/basic/Expander.js +104 -86
  30. package/dist-esm/basic/FilesDragDrop.js +84 -80
  31. package/dist-esm/basic/Form.js +80 -52
  32. package/dist-esm/basic/FormField.js +164 -106
  33. package/dist-esm/basic/IElement.js +1 -2
  34. package/dist-esm/basic/InlinePopup.js +263 -234
  35. package/dist-esm/basic/InlinePopupButton.js +99 -88
  36. package/dist-esm/basic/InlinePopupControl.js +24 -23
  37. package/dist-esm/basic/ItemPath.js +59 -60
  38. package/dist-esm/basic/LimitedText.js +49 -38
  39. package/dist-esm/basic/ListRepeater.js +13 -14
  40. package/dist-esm/basic/MaskedInput.js +37 -29
  41. package/dist-esm/basic/MaskedInputDiv.js +55 -48
  42. package/dist-esm/basic/MergeNode.js +64 -35
  43. package/dist-esm/basic/PasswordBox.js +32 -17
  44. package/dist-esm/basic/PinchZoomView.js +221 -199
  45. package/dist-esm/basic/PopupButton.js +39 -16
  46. package/dist-esm/basic/PopupMenu.js +3 -4
  47. package/dist-esm/basic/RadioButtonList.js +35 -25
  48. package/dist-esm/basic/RefreshLock.js +41 -42
  49. package/dist-esm/basic/Resizable.js +43 -33
  50. package/dist-esm/basic/Select.js +72 -65
  51. package/dist-esm/basic/SortByButton.js +41 -31
  52. package/dist-esm/basic/Swipe.js +91 -84
  53. package/dist-esm/basic/Switch.js +22 -8
  54. package/dist-esm/basic/TableRepeater.js +29 -33
  55. package/dist-esm/basic/TimeEditor.js +97 -52
  56. package/dist-esm/basic/TitleEditor.js +115 -95
  57. package/dist-esm/basic/ToggleButtonBar.js +21 -22
  58. package/dist-esm/basic/Tooltip.js +49 -47
  59. package/dist-esm/basic/TypeWriter.js +45 -42
  60. package/dist-esm/basic/UploadEvent.js +211 -178
  61. package/dist-esm/basic/ZoomView.js +229 -198
  62. package/dist-esm/basic/combineClasses.js +2 -3
  63. package/dist-esm/basic/elements/AtomPopover.js +270 -253
  64. package/dist-esm/basic/elements/getContainingBlock.js +34 -35
  65. package/dist-esm/basic/elements/relativeRect.js +40 -21
  66. package/dist-esm/desktop-app/DesktopApp.js +65 -80
  67. package/dist-esm/desktop-app/MobileDesktopApp.js +20 -23
  68. package/dist-esm/html-editor/AtomHtmlEditor.js +243 -268
  69. package/dist-esm/html-editor/HtmlEditorCommands.js +6 -4
  70. package/dist-esm/html-editor/InlineHtmlEditor.d.ts +1 -1
  71. package/dist-esm/html-editor/InlineHtmlEditor.d.ts.map +1 -1
  72. package/dist-esm/html-editor/InlineHtmlEditor.js +175 -167
  73. package/dist-esm/html-editor/InlineHtmlEditor.js.map +1 -1
  74. package/dist-esm/html-editor/RangeEditor.js +49 -51
  75. package/dist-esm/html-editor/commands/AddImage.js +40 -35
  76. package/dist-esm/html-editor/commands/AddLink.js +56 -54
  77. package/dist-esm/html-editor/commands/Align.js +24 -7
  78. package/dist-esm/html-editor/commands/AttachFile.js +23 -13
  79. package/dist-esm/html-editor/commands/AttachImage.js +35 -25
  80. package/dist-esm/html-editor/commands/Bold.js +10 -11
  81. package/dist-esm/html-editor/commands/ChangeColor.js +31 -107
  82. package/dist-esm/html-editor/commands/ChangeFont.js +42 -42
  83. package/dist-esm/html-editor/commands/ChangeFontSize.js +15 -5
  84. package/dist-esm/html-editor/commands/Command.js +34 -16
  85. package/dist-esm/html-editor/commands/CommandButton.js +51 -32
  86. package/dist-esm/html-editor/commands/Headings.js +25 -9
  87. package/dist-esm/html-editor/commands/HorizontalRule.js +9 -10
  88. package/dist-esm/html-editor/commands/HtmlCommands.js +160 -65
  89. package/dist-esm/html-editor/commands/IndentLess.js +10 -11
  90. package/dist-esm/html-editor/commands/IndentMore.js +10 -11
  91. package/dist-esm/html-editor/commands/Italic.js +10 -11
  92. package/dist-esm/html-editor/commands/NumberedList.js +10 -11
  93. package/dist-esm/html-editor/commands/Quote.js +10 -11
  94. package/dist-esm/html-editor/commands/RemoveFormat.js +10 -11
  95. package/dist-esm/html-editor/commands/Separator.js +5 -4
  96. package/dist-esm/html-editor/commands/Source.js +29 -25
  97. package/dist-esm/html-editor/commands/StrikeThrough.js +10 -11
  98. package/dist-esm/html-editor/commands/Toolbar.js +6 -4
  99. package/dist-esm/html-editor/commands/Underline.js +10 -11
  100. package/dist-esm/html-editor/commands/Unlink.js +10 -9
  101. package/dist-esm/html-editor/commands/UnorderedList.js +10 -11
  102. package/dist-esm/mobile-app/BottomPopup.js +137 -148
  103. package/dist-esm/mobile-app/MasterDetailPage.js +153 -152
  104. package/dist-esm/mobile-app/MobileApp.js +577 -569
  105. package/dist-esm/player/AtomVideoPlayer.js +316 -270
  106. package/dist-esm/player/TrackProgress.js +11 -7
  107. package/dist-esm/player/input-range-style.js +97 -98
  108. package/dist-esm/tests/app-test/AppTestApp.js +12 -15
  109. package/dist-esm/tests/app-test/AppTestApp.pack.js +54 -0
  110. package/dist-esm/tests/app-test/commands/AppCommands.js +14 -11
  111. package/dist-esm/tests/app-test/drawer/AppDrawer.js +4 -6
  112. package/dist-esm/tests/app-test/model/model.js +1 -2
  113. package/dist-esm/tests/app-test/pages/detail/DetailPage.js +21 -15
  114. package/dist-esm/tests/app-test/pages/home/HomePage.js +7 -8
  115. package/dist-esm/tests/app-test/pages/list/ListPage.js +79 -62
  116. package/dist-esm/tests/basic/PopupTest.js +9 -7
  117. package/dist-esm/tests/basic/TimeEditorTest.js +5 -9
  118. package/dist-esm/tests/basic/TimeEditorTest.pack.js +39 -0
  119. package/dist-esm/tests/basic/TimerTest.js +27 -37
  120. package/dist-esm/tests/basic/TimerTest.pack.js +40 -0
  121. package/dist-esm/tests/basic/basic-form/BasicForm.js +47 -27
  122. package/dist-esm/tests/basic/basic-form/BasicForm.pack.js +44 -0
  123. package/dist-esm/tests/basic/calendar/BasicCalendarTest.js +5 -9
  124. package/dist-esm/tests/basic/calendar/BasicCalendarTest.pack.js +53 -0
  125. package/dist-esm/tests/basic/chips/ChipsTest.js +25 -15
  126. package/dist-esm/tests/basic/chips/ChipsTest.pack.js +56 -0
  127. package/dist-esm/tests/basic/data-grid/DataGridTest.js +55 -60
  128. package/dist-esm/tests/basic/data-grid/DataGridTest.pack.js +58 -0
  129. package/dist-esm/tests/basic/date/DateFieldTest.js +21 -96
  130. package/dist-esm/tests/basic/date/DateFieldTest.pack.js +57 -0
  131. package/dist-esm/tests/basic/drop-down/DropDownTest.js +25 -19
  132. package/dist-esm/tests/basic/drop-down/DropDownTest.pack.js +52 -0
  133. package/dist-esm/tests/basic/drop-down-input/DropDownTest.js +32 -32
  134. package/dist-esm/tests/basic/drop-down-input/DropDownTest.pack.js +54 -0
  135. package/dist-esm/tests/basic/expander/ExpanderMenuTest.js +20 -14
  136. package/dist-esm/tests/basic/expander/ExpanderMenuTest.pack.js +38 -0
  137. package/dist-esm/tests/basic/expander/ExpanderTest.js +11 -12
  138. package/dist-esm/tests/basic/expander/ExpanderTest.pack.js +38 -0
  139. package/dist-esm/tests/basic/form2/Form2Test.js +26 -24
  140. package/dist-esm/tests/basic/form2/Form2Test.pack.js +46 -0
  141. package/dist-esm/tests/basic/limited-text/LimitedTextTest.js +14 -11
  142. package/dist-esm/tests/basic/limited-text/LimitedTextTest.pack.js +38 -0
  143. package/dist-esm/tests/basic/pinch-zoom/PinchZoomViewTest.js +14 -14
  144. package/dist-esm/tests/basic/pinch-zoom/PinchZoomViewTest.pack.js +38 -0
  145. package/dist-esm/tests/basic/repeater/DragDropRepater.js +30 -12
  146. package/dist-esm/tests/basic/repeater/DragDropRepater.pack.js +51 -0
  147. package/dist-esm/tests/basic/repeater/RepeaterTest.js +45 -35
  148. package/dist-esm/tests/basic/repeater/RepeaterTest.pack.js +52 -0
  149. package/dist-esm/tests/basic/swipe/SwipeTest.js +13 -13
  150. package/dist-esm/tests/basic/swipe/SwipeTest.pack.js +52 -0
  151. package/dist-esm/tests/basic/switch-test/SwitchTest.js +8 -10
  152. package/dist-esm/tests/basic/switch-test/SwitchTest.pack.js +38 -0
  153. package/dist-esm/tests/basic/title-editor/TitleEditorTest.js +8 -9
  154. package/dist-esm/tests/basic/title-editor/TitleEditorTest.pack.js +38 -0
  155. package/dist-esm/tests/basic/tooltip/TooltipTest.js +30 -24
  156. package/dist-esm/tests/basic/tooltip/TooltipTest.pack.js +52 -0
  157. package/dist-esm/tests/basic/typewriter/TypeWriter.js +10 -9
  158. package/dist-esm/tests/basic/typewriter/TypeWriter.pack.js +39 -0
  159. package/dist-esm/tests/basic/video/AtomVideoTest.js +13 -10
  160. package/dist-esm/tests/basic/video/AtomVideoTest.pack.js +38 -0
  161. package/dist-esm/tests/basic/zoom/ZoomViewTest.js +13 -13
  162. package/dist-esm/tests/basic/zoom/ZoomViewTest.pack.js +38 -0
  163. package/dist-esm/tests/check-box-list/CheckBoxListSample.js +13 -12
  164. package/dist-esm/tests/check-box-list/CheckBoxListSample.pack.js +52 -0
  165. package/dist-esm/tests/data-grid/GridTestViewModel.js +203 -227
  166. package/dist-esm/tests/form/CustomHelp.js +6 -9
  167. package/dist-esm/tests/form/FormViewModel.js +21 -28
  168. package/dist-esm/tests/html-editor/HtmlEditorTest.js +7 -37
  169. package/dist-esm/tests/html-editor/HtmlEditorTest.pack.js +83 -0
  170. package/dist-esm/tests/html-editor/InlineHtmlEdiorTest.js +9 -38
  171. package/dist-esm/tests/html-editor/InlineHtmlEdiorTest.pack.js +85 -0
  172. package/dist-esm/tests/mask/MaskedInputTest.js +11 -12
  173. package/dist-esm/tests/mask/MaskedInputTest.pack.js +38 -0
  174. package/dist-esm/tests/mobile-app/DesktopAppTest.js +8 -9
  175. package/dist-esm/tests/mobile-app/DesktopAppTest.pack.js +60 -0
  176. package/dist-esm/tests/mobile-app/MobileAppTest.js +64 -53
  177. package/dist-esm/tests/mobile-app/MobileAppTest.pack.js +55 -0
  178. package/dist-esm/tests/pop-over/PopOverTest.js +37 -77
  179. package/dist-esm/tests/switch/SwitchTest.js +9 -8
  180. package/dist-esm/tests/toggle-view/ToggleViewTest.js +15 -22
  181. package/dist-esm/tests/toggle-view/ToggleViewTest.pack.js +45 -0
  182. package/dist-esm/toggle-view/AtomToggleView.js +77 -73
  183. package/dist-esm/tsconfig.esm.tsbuildinfo +1 -1
  184. package/package.json +3 -3
  185. package/src/html-editor/InlineHtmlEditor.tsx +1 -1
@@ -4,92 +4,77 @@ import XNode from "@web-atoms/core/dist/core/XNode.js";
4
4
  import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl.js";
5
5
  import { ChildEnumerator } from "@web-atoms/core/dist/web/core/AtomUI.js";
6
6
  import MobileApp from "../mobile-app/MobileApp.js";
7
- import "../styles/desktop-app.global.css";
7
+ ESMPack.installStyleSheet(import.meta.resolve("../styles/desktop-app.global.css"));
8
8
  import Action from "@web-atoms/core/dist/view-model/Action.js";
9
9
  export default class DesktopApp extends AtomControl {
10
- onPropertyChanged(name) {
11
- super.onPropertyChanged(name);
12
- if (!this.initialized) {
13
- return;
14
- }
15
- switch (name) {
16
- case "statusBarRenderer":
17
- this.recreate(name, "status-bar");
18
- break;
19
- case "menuRenderer":
20
- this.recreate(name, "menu-renderer");
21
- break;
22
- case "sideBarRenderer":
23
- this.recreate(name, "side-bar");
24
- break;
25
- }
10
+ onPropertyChanged(name) {
11
+ super.onPropertyChanged(name);
12
+ if (!this.initialized) {
13
+ return;
26
14
  }
27
- init() {
15
+ switch (name) {
16
+ case "statusBarRenderer":
17
+ this.recreate(name, "status-bar");
18
+ break;
19
+ case "menuRenderer":
20
+ this.recreate(name, "menu-renderer");
21
+ break;
22
+ case "sideBarRenderer":
23
+ this.recreate(name, "side-bar");
24
+ break;
28
25
  }
29
- recreate(renderer, name, remove = true) {
30
- const node = this[renderer]?.() ?? undefined;
31
- if (remove) {
32
- for (const e of ChildEnumerator.enumerate(this.element)) {
33
- if (e.dataset.pageElement === name) {
34
- this.dispose(e);
35
- e.remove();
36
- break;
37
- }
38
- }
39
- }
40
- if (node) {
41
- const na = node.attributes ??= {};
42
- na["data-page-element"] = name;
43
- this.render(XNode.create("div", null, node));
44
- return this.element.querySelector(`[data-page-element="${name}"]`);
26
+ }
27
+ init() {}
28
+ recreate(renderer, name, remove = true) {
29
+ const node = this[renderer]?.() ?? undefined;
30
+ if (remove) {
31
+ for (const e of ChildEnumerator.enumerate(this.element)) {
32
+ if (e.dataset.pageElement === name) {
33
+ this.dispose(e);
34
+ e.remove();
35
+ break;
45
36
  }
46
- return null;
37
+ }
47
38
  }
48
- create() {
49
- this.render(XNode.create("div", { "data-desktop-app": "desktop-app" },
50
- XNode.create(MobileApp, { "data-page-element": "app" })));
51
- this.recreate("menuRenderer", "menu-renderer", false);
52
- this.recreate("sideBarRenderer", "side-bar", false);
53
- this.recreate("statusBarRenderer", "status-bar", false);
54
- this.initialized = true;
55
- this.runAfterInit(() => {
56
- this.app.runAsync(() => this.init());
57
- });
58
- }
59
- onIconClick() {
60
- if (this.element.hasAttribute("drawer-hidden")) {
61
- this.element.removeAttribute("drawer-hidden");
62
- }
63
- else {
64
- this.element.setAttribute("drawer-hidden", "1");
65
- }
39
+ if (node) {
40
+ const na = node.attributes ??= {};
41
+ na["data-page-element"] = name;
42
+ this.render(XNode.create("div", null, node));
43
+ return this.element.querySelector(`[data-page-element="${name}"]`);
66
44
  }
67
- onHideDrawer() {
68
- this.element.setAttribute("drawer-hidden", "1");
45
+ return null;
46
+ }
47
+ create() {
48
+ this.render(XNode.create("div", {
49
+ "data-desktop-app": "desktop-app"
50
+ }, XNode.create(MobileApp, {
51
+ "data-page-element": "app"
52
+ })));
53
+ this.recreate("menuRenderer", "menu-renderer", false);
54
+ this.recreate("sideBarRenderer", "side-bar", false);
55
+ this.recreate("statusBarRenderer", "status-bar", false);
56
+ this.initialized = true;
57
+ this.runAfterInit(() => {
58
+ this.app.runAsync(() => this.init());
59
+ });
60
+ }
61
+ onIconClick() {
62
+ if (this.element.hasAttribute("drawer-hidden")) {
63
+ this.element.removeAttribute("drawer-hidden");
64
+ } else {
65
+ this.element.setAttribute("drawer-hidden", "1");
69
66
  }
67
+ }
68
+ onHideDrawer() {
69
+ this.element.setAttribute("drawer-hidden", "1");
70
+ }
70
71
  }
71
- __decorate([
72
- BindableProperty,
73
- __metadata("design:type", Function)
74
- ], DesktopApp.prototype, "menuRenderer", void 0);
75
- __decorate([
76
- BindableProperty,
77
- __metadata("design:type", Function)
78
- ], DesktopApp.prototype, "sideBarRenderer", void 0);
79
- __decorate([
80
- BindableProperty,
81
- __metadata("design:type", Function)
82
- ], DesktopApp.prototype, "statusBarRenderer", void 0);
83
- __decorate([
84
- Action({ onEvent: "iconClick" }),
85
- __metadata("design:type", Function),
86
- __metadata("design:paramtypes", []),
87
- __metadata("design:returntype", void 0)
88
- ], DesktopApp.prototype, "onIconClick", null);
89
- __decorate([
90
- Action({ onEvent: "hideDrawer" }),
91
- __metadata("design:type", Function),
92
- __metadata("design:paramtypes", []),
93
- __metadata("design:returntype", void 0)
94
- ], DesktopApp.prototype, "onHideDrawer", null);
95
- //# sourceMappingURL=DesktopApp.js.map
72
+ __decorate([BindableProperty, __metadata("design:type", Function)], DesktopApp.prototype, "menuRenderer", void 0);
73
+ __decorate([BindableProperty, __metadata("design:type", Function)], DesktopApp.prototype, "sideBarRenderer", void 0);
74
+ __decorate([BindableProperty, __metadata("design:type", Function)], DesktopApp.prototype, "statusBarRenderer", void 0);
75
+ __decorate([Action({
76
+ onEvent: "iconClick"
77
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], DesktopApp.prototype, "onIconClick", null);
78
+ __decorate([Action({
79
+ onEvent: "hideDrawer"
80
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], DesktopApp.prototype, "onHideDrawer", null);
@@ -5,28 +5,25 @@ import XNode from "@web-atoms/core/dist/core/XNode.js";
5
5
  import PopupService from "@web-atoms/core/dist/web/services/PopupService.js";
6
6
  const T = isMobileView ? MobileApp : DesktopApp;
7
7
  export default class MobileDesktopApp extends T {
8
- get drawerMenu() {
9
- return this.menu;
8
+ get drawerMenu() {
9
+ return this.menu;
10
+ }
11
+ set drawerMenu(v) {
12
+ this.menu = v;
13
+ if (this.mobileApp) {
14
+ this.mobileApp.drawer = v;
15
+ } else {
16
+ this.desktopApp.menuRenderer = () => XNode.create(v, {});
10
17
  }
11
- set drawerMenu(v) {
12
- this.menu = v;
13
- if (this.mobileApp) {
14
- this.mobileApp.drawer = v;
15
- }
16
- else {
17
- this.desktopApp.menuRenderer = () => XNode.create(v, {});
18
- }
18
+ }
19
+ preCreate() {
20
+ MobileDesktopApp.current = this;
21
+ super.preCreate();
22
+ if (isMobileView) {
23
+ this.mobileApp = this;
24
+ } else {
25
+ this.desktopApp = this;
19
26
  }
20
- preCreate() {
21
- MobileDesktopApp.current = this;
22
- super.preCreate();
23
- if (isMobileView) {
24
- this.mobileApp = this;
25
- }
26
- else {
27
- this.desktopApp = this;
28
- }
29
- this.runAfterInit(() => PopupService.lastTarget = this.element);
30
- }
31
- }
32
- //# sourceMappingURL=MobileDesktopApp.js.map
27
+ this.runAfterInit(() => PopupService.lastTarget = this.element);
28
+ }
29
+ }