@web-atoms/web-controls 2.6.5 → 2.6.6

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 (177) hide show
  1. package/dist/tsconfig.tsbuildinfo +1 -1
  2. package/dist-esm/ArrayLike.js +14 -12
  3. package/dist-esm/DataAttributes.js +18 -19
  4. package/dist-esm/Focusable.js +10 -11
  5. package/dist-esm/ModuleFiles.js +43 -42
  6. package/dist-esm/NumberFormats.js +60 -56
  7. package/dist-esm/PageNavigator.js +28 -30
  8. package/dist-esm/animations/Animations.js +36 -33
  9. package/dist-esm/basic/AtomChips.js +312 -305
  10. package/dist-esm/basic/AtomRepeater.js +1070 -1035
  11. package/dist-esm/basic/AtomSuggestions.js +97 -107
  12. package/dist-esm/basic/AttachedPopup.js +0 -1
  13. package/dist-esm/basic/Button.js +45 -19
  14. package/dist-esm/basic/ButtonBar.js +84 -64
  15. package/dist-esm/basic/Calendar.js +211 -203
  16. package/dist-esm/basic/CheckBoxList.js +90 -70
  17. package/dist-esm/basic/Checkbox.js +16 -8
  18. package/dist-esm/basic/Chip.js +36 -12
  19. package/dist-esm/basic/ComboBox.js +47 -51
  20. package/dist-esm/basic/DataGrid.js +258 -252
  21. package/dist-esm/basic/DateField.js +149 -127
  22. package/dist-esm/basic/DropDown.js +91 -103
  23. package/dist-esm/basic/DropDownInput.js +78 -106
  24. package/dist-esm/basic/Editable.js +82 -77
  25. package/dist-esm/basic/Expander.js +104 -86
  26. package/dist-esm/basic/FilesDragDrop.js +84 -80
  27. package/dist-esm/basic/Form.js +80 -52
  28. package/dist-esm/basic/FormField.js +164 -106
  29. package/dist-esm/basic/IElement.js +1 -2
  30. package/dist-esm/basic/InlinePopup.js +263 -234
  31. package/dist-esm/basic/InlinePopupButton.js +99 -88
  32. package/dist-esm/basic/InlinePopupControl.js +24 -23
  33. package/dist-esm/basic/ItemPath.js +59 -60
  34. package/dist-esm/basic/LimitedText.js +49 -38
  35. package/dist-esm/basic/ListRepeater.js +13 -14
  36. package/dist-esm/basic/MaskedInput.js +37 -29
  37. package/dist-esm/basic/MaskedInputDiv.js +55 -48
  38. package/dist-esm/basic/MergeNode.js +64 -35
  39. package/dist-esm/basic/PasswordBox.js +32 -17
  40. package/dist-esm/basic/PinchZoomView.js +221 -199
  41. package/dist-esm/basic/PopupButton.js +39 -16
  42. package/dist-esm/basic/PopupMenu.js +3 -4
  43. package/dist-esm/basic/RadioButtonList.js +35 -25
  44. package/dist-esm/basic/RefreshLock.js +41 -42
  45. package/dist-esm/basic/Resizable.js +43 -33
  46. package/dist-esm/basic/Select.js +72 -65
  47. package/dist-esm/basic/SortByButton.js +41 -31
  48. package/dist-esm/basic/Swipe.js +91 -84
  49. package/dist-esm/basic/Switch.js +22 -8
  50. package/dist-esm/basic/TableRepeater.js +29 -33
  51. package/dist-esm/basic/TimeEditor.js +97 -52
  52. package/dist-esm/basic/TitleEditor.js +115 -95
  53. package/dist-esm/basic/ToggleButtonBar.js +21 -22
  54. package/dist-esm/basic/Tooltip.js +49 -47
  55. package/dist-esm/basic/TypeWriter.js +45 -42
  56. package/dist-esm/basic/UploadEvent.js +211 -178
  57. package/dist-esm/basic/ZoomView.js +229 -198
  58. package/dist-esm/basic/combineClasses.js +2 -3
  59. package/dist-esm/basic/elements/AtomPopover.js +270 -253
  60. package/dist-esm/basic/elements/getContainingBlock.js +34 -35
  61. package/dist-esm/basic/elements/relativeRect.js +40 -21
  62. package/dist-esm/desktop-app/DesktopApp.js +65 -80
  63. package/dist-esm/desktop-app/MobileDesktopApp.js +20 -23
  64. package/dist-esm/html-editor/AtomHtmlEditor.js +243 -268
  65. package/dist-esm/html-editor/HtmlEditorCommands.js +6 -4
  66. package/dist-esm/html-editor/InlineHtmlEditor.js +174 -166
  67. package/dist-esm/html-editor/RangeEditor.js +49 -51
  68. package/dist-esm/html-editor/commands/AddImage.js +40 -35
  69. package/dist-esm/html-editor/commands/AddLink.js +56 -54
  70. package/dist-esm/html-editor/commands/Align.js +24 -7
  71. package/dist-esm/html-editor/commands/AttachFile.js +23 -13
  72. package/dist-esm/html-editor/commands/AttachImage.js +35 -25
  73. package/dist-esm/html-editor/commands/Bold.js +10 -11
  74. package/dist-esm/html-editor/commands/ChangeColor.js +31 -107
  75. package/dist-esm/html-editor/commands/ChangeFont.js +42 -42
  76. package/dist-esm/html-editor/commands/ChangeFontSize.js +15 -5
  77. package/dist-esm/html-editor/commands/Command.js +34 -16
  78. package/dist-esm/html-editor/commands/CommandButton.js +51 -32
  79. package/dist-esm/html-editor/commands/Headings.js +25 -9
  80. package/dist-esm/html-editor/commands/HorizontalRule.js +9 -10
  81. package/dist-esm/html-editor/commands/HtmlCommands.js +160 -65
  82. package/dist-esm/html-editor/commands/IndentLess.js +10 -11
  83. package/dist-esm/html-editor/commands/IndentMore.js +10 -11
  84. package/dist-esm/html-editor/commands/Italic.js +10 -11
  85. package/dist-esm/html-editor/commands/NumberedList.js +10 -11
  86. package/dist-esm/html-editor/commands/Quote.js +10 -11
  87. package/dist-esm/html-editor/commands/RemoveFormat.js +10 -11
  88. package/dist-esm/html-editor/commands/Separator.js +5 -4
  89. package/dist-esm/html-editor/commands/Source.js +29 -25
  90. package/dist-esm/html-editor/commands/StrikeThrough.js +10 -11
  91. package/dist-esm/html-editor/commands/Toolbar.js +6 -4
  92. package/dist-esm/html-editor/commands/Underline.js +10 -11
  93. package/dist-esm/html-editor/commands/Unlink.js +10 -9
  94. package/dist-esm/html-editor/commands/UnorderedList.js +10 -11
  95. package/dist-esm/mobile-app/BottomPopup.js +137 -148
  96. package/dist-esm/mobile-app/MasterDetailPage.js +153 -152
  97. package/dist-esm/mobile-app/MobileApp.js +577 -569
  98. package/dist-esm/player/AtomVideoPlayer.js +316 -270
  99. package/dist-esm/player/TrackProgress.js +11 -7
  100. package/dist-esm/player/input-range-style.js +97 -98
  101. package/dist-esm/tests/app-test/AppTestApp.js +12 -15
  102. package/dist-esm/tests/app-test/AppTestApp.pack.js +54 -0
  103. package/dist-esm/tests/app-test/commands/AppCommands.js +14 -11
  104. package/dist-esm/tests/app-test/drawer/AppDrawer.js +4 -6
  105. package/dist-esm/tests/app-test/model/model.js +1 -2
  106. package/dist-esm/tests/app-test/pages/detail/DetailPage.js +21 -15
  107. package/dist-esm/tests/app-test/pages/home/HomePage.js +7 -8
  108. package/dist-esm/tests/app-test/pages/list/ListPage.js +79 -62
  109. package/dist-esm/tests/basic/PopupTest.js +9 -7
  110. package/dist-esm/tests/basic/TimeEditorTest.js +5 -9
  111. package/dist-esm/tests/basic/TimeEditorTest.pack.js +39 -0
  112. package/dist-esm/tests/basic/TimerTest.js +27 -37
  113. package/dist-esm/tests/basic/TimerTest.pack.js +40 -0
  114. package/dist-esm/tests/basic/basic-form/BasicForm.js +47 -27
  115. package/dist-esm/tests/basic/basic-form/BasicForm.pack.js +44 -0
  116. package/dist-esm/tests/basic/calendar/BasicCalendarTest.js +5 -9
  117. package/dist-esm/tests/basic/calendar/BasicCalendarTest.pack.js +53 -0
  118. package/dist-esm/tests/basic/chips/ChipsTest.js +25 -15
  119. package/dist-esm/tests/basic/chips/ChipsTest.pack.js +56 -0
  120. package/dist-esm/tests/basic/data-grid/DataGridTest.js +55 -60
  121. package/dist-esm/tests/basic/data-grid/DataGridTest.pack.js +58 -0
  122. package/dist-esm/tests/basic/date/DateFieldTest.js +21 -96
  123. package/dist-esm/tests/basic/date/DateFieldTest.pack.js +57 -0
  124. package/dist-esm/tests/basic/drop-down/DropDownTest.js +25 -19
  125. package/dist-esm/tests/basic/drop-down/DropDownTest.pack.js +52 -0
  126. package/dist-esm/tests/basic/drop-down-input/DropDownTest.js +32 -32
  127. package/dist-esm/tests/basic/drop-down-input/DropDownTest.pack.js +54 -0
  128. package/dist-esm/tests/basic/expander/ExpanderMenuTest.js +20 -14
  129. package/dist-esm/tests/basic/expander/ExpanderMenuTest.pack.js +38 -0
  130. package/dist-esm/tests/basic/expander/ExpanderTest.js +11 -12
  131. package/dist-esm/tests/basic/expander/ExpanderTest.pack.js +38 -0
  132. package/dist-esm/tests/basic/form2/Form2Test.js +26 -24
  133. package/dist-esm/tests/basic/form2/Form2Test.pack.js +46 -0
  134. package/dist-esm/tests/basic/limited-text/LimitedTextTest.js +14 -11
  135. package/dist-esm/tests/basic/limited-text/LimitedTextTest.pack.js +38 -0
  136. package/dist-esm/tests/basic/pinch-zoom/PinchZoomViewTest.js +14 -14
  137. package/dist-esm/tests/basic/pinch-zoom/PinchZoomViewTest.pack.js +38 -0
  138. package/dist-esm/tests/basic/repeater/DragDropRepater.js +30 -12
  139. package/dist-esm/tests/basic/repeater/DragDropRepater.pack.js +51 -0
  140. package/dist-esm/tests/basic/repeater/RepeaterTest.js +45 -35
  141. package/dist-esm/tests/basic/repeater/RepeaterTest.pack.js +52 -0
  142. package/dist-esm/tests/basic/swipe/SwipeTest.js +13 -13
  143. package/dist-esm/tests/basic/swipe/SwipeTest.pack.js +52 -0
  144. package/dist-esm/tests/basic/switch-test/SwitchTest.js +8 -10
  145. package/dist-esm/tests/basic/switch-test/SwitchTest.pack.js +38 -0
  146. package/dist-esm/tests/basic/title-editor/TitleEditorTest.js +8 -9
  147. package/dist-esm/tests/basic/title-editor/TitleEditorTest.pack.js +38 -0
  148. package/dist-esm/tests/basic/tooltip/TooltipTest.js +30 -24
  149. package/dist-esm/tests/basic/tooltip/TooltipTest.pack.js +52 -0
  150. package/dist-esm/tests/basic/typewriter/TypeWriter.js +10 -9
  151. package/dist-esm/tests/basic/typewriter/TypeWriter.pack.js +39 -0
  152. package/dist-esm/tests/basic/video/AtomVideoTest.js +13 -10
  153. package/dist-esm/tests/basic/video/AtomVideoTest.pack.js +38 -0
  154. package/dist-esm/tests/basic/zoom/ZoomViewTest.js +13 -13
  155. package/dist-esm/tests/basic/zoom/ZoomViewTest.pack.js +38 -0
  156. package/dist-esm/tests/check-box-list/CheckBoxListSample.js +13 -12
  157. package/dist-esm/tests/check-box-list/CheckBoxListSample.pack.js +52 -0
  158. package/dist-esm/tests/data-grid/GridTestViewModel.js +203 -227
  159. package/dist-esm/tests/form/CustomHelp.js +6 -9
  160. package/dist-esm/tests/form/FormViewModel.js +21 -28
  161. package/dist-esm/tests/html-editor/HtmlEditorTest.js +7 -37
  162. package/dist-esm/tests/html-editor/HtmlEditorTest.pack.js +83 -0
  163. package/dist-esm/tests/html-editor/InlineHtmlEdiorTest.js +9 -38
  164. package/dist-esm/tests/html-editor/InlineHtmlEdiorTest.pack.js +85 -0
  165. package/dist-esm/tests/mask/MaskedInputTest.js +11 -12
  166. package/dist-esm/tests/mask/MaskedInputTest.pack.js +38 -0
  167. package/dist-esm/tests/mobile-app/DesktopAppTest.js +8 -9
  168. package/dist-esm/tests/mobile-app/DesktopAppTest.pack.js +60 -0
  169. package/dist-esm/tests/mobile-app/MobileAppTest.js +64 -53
  170. package/dist-esm/tests/mobile-app/MobileAppTest.pack.js +55 -0
  171. package/dist-esm/tests/pop-over/PopOverTest.js +37 -77
  172. package/dist-esm/tests/switch/SwitchTest.js +9 -8
  173. package/dist-esm/tests/toggle-view/ToggleViewTest.js +15 -22
  174. package/dist-esm/tests/toggle-view/ToggleViewTest.pack.js +45 -0
  175. package/dist-esm/toggle-view/AtomToggleView.js +77 -73
  176. package/dist-esm/tsconfig.esm.tsbuildinfo +1 -1
  177. package/package.json +3 -3
@@ -1,59 +1,66 @@
1
1
  import XNode from "@web-atoms/core/dist/core/XNode.js";
2
2
  import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl.js";
3
- const updateMask = (e) => {
4
- const target = e.target;
5
- const mask = target.dataset.mask;
6
- if (!mask) {
7
- return;
8
- }
9
- let result = "";
10
- const value = target.value;
11
- for (let index = 0, elementIndex = 0; elementIndex < value.length; elementIndex++, index++) {
12
- const element = value[elementIndex];
13
- const maskElement = mask[index];
14
- switch (maskElement) {
15
- case "#":
16
- result += /[0-9]/.test(element) ? element : "0";
17
- continue;
18
- case ".":
19
- if (element !== ".") {
20
- result += ".";
21
- }
22
- result += element;
23
- break;
24
- default:
25
- result += element;
26
- break;
3
+ const updateMask = e => {
4
+ const target = e.target;
5
+ const mask = target.dataset.mask;
6
+ if (!mask) {
7
+ return;
8
+ }
9
+ let result = "";
10
+ const value = target.value;
11
+ for (let index = 0, elementIndex = 0; elementIndex < value.length; elementIndex++, index++) {
12
+ const element = value[elementIndex];
13
+ const maskElement = mask[index];
14
+ switch (maskElement) {
15
+ case "#":
16
+ result += /[0-9]/.test(element) ? element : "0";
17
+ continue;
18
+ case ".":
19
+ if (element !== ".") {
20
+ result += ".";
27
21
  }
22
+ result += element;
23
+ break;
24
+ default:
25
+ result += element;
26
+ break;
28
27
  }
29
- target.parentElement.dataset.label = result;
28
+ }
29
+ target.parentElement.dataset.label = result;
30
30
  };
31
31
  document.body.addEventListener("change", updateMask);
32
32
  document.body.addEventListener("keypress", updateMask);
33
33
  document.body.addEventListener("keyup", updateMask);
34
34
  const maskProperty = AtomControl.registerProperty("data-mask", "format", (ctrl, e, value) => {
35
- if (!value) {
36
- e.dataset.label = "";
37
- return;
38
- }
39
- let result = "";
40
- for (const iterator of value) {
41
- switch (iterator) {
42
- case "#":
43
- result += " ";
44
- continue;
45
- case "0":
46
- result += "0";
47
- continue;
48
- default:
49
- result += iterator;
50
- continue;
51
- }
35
+ if (!value) {
36
+ e.dataset.label = "";
37
+ return;
38
+ }
39
+ let result = "";
40
+ for (const iterator of value) {
41
+ switch (iterator) {
42
+ case "#":
43
+ result += " ";
44
+ continue;
45
+ case "0":
46
+ result += "0";
47
+ continue;
48
+ default:
49
+ result += iterator;
50
+ continue;
52
51
  }
53
- e.dataset.label = result;
52
+ }
53
+ e.dataset.label = result;
54
54
  });
55
- export default function MaskedInput({ mask, ...a }) {
56
- return XNode.create("div", { "data-mask": mask, ...maskProperty(mask) },
57
- XNode.create("input", { "data-mask": mask, ...a }));
58
- }
59
- //# sourceMappingURL=MaskedInputDiv.js.map
55
+ export default function MaskedInput({
56
+ mask,
57
+ ...a
58
+ }) {
59
+ return XNode.create("div", {
60
+ "data-mask": mask,
61
+ ...maskProperty(mask)
62
+ }, XNode.create("input", {
63
+ "data-mask": mask,
64
+ ...a
65
+ }));
66
+ }
@@ -1,41 +1,70 @@
1
1
  const empty = [];
2
2
  export default class MergeNode {
3
- static none() {
4
- return new MergeNode(empty);
3
+ static none() {
4
+ return new MergeNode(empty);
5
+ }
6
+ static remove() {
7
+ return new MergeNode([{
8
+ remove: true
9
+ }]);
10
+ }
11
+ static childSelector(name, p) {
12
+ if (p !== void 0) {
13
+ const {
14
+ parent,
15
+ after
16
+ } = p;
17
+ return new MergeNode([{
18
+ replace: "* > " + name,
19
+ parent,
20
+ after
21
+ }]);
5
22
  }
6
- static remove() {
7
- return new MergeNode([{ remove: true }]);
23
+ return new MergeNode(["* > " + name]);
24
+ }
25
+ static nestedSelector(name, p) {
26
+ if (p !== void 0) {
27
+ const {
28
+ parent,
29
+ after
30
+ } = p;
31
+ return new MergeNode([{
32
+ replace: "* " + name,
33
+ parent,
34
+ after
35
+ }]);
8
36
  }
9
- static childSelector(name, p) {
10
- if (p !== void 0) {
11
- const { parent, after } = p;
12
- return new MergeNode([{ replace: "* > " + name, parent, after }]);
13
- }
14
- return new MergeNode(["* > " + name]);
37
+ return new MergeNode(["* " + name]);
38
+ }
39
+ constructor(classes = empty) {
40
+ this.classes = classes;
41
+ }
42
+ childSelector(name, p) {
43
+ if (p !== void 0) {
44
+ const {
45
+ parent,
46
+ after
47
+ } = p;
48
+ return new MergeNode([...this.classes, {
49
+ replace: "* > " + name,
50
+ parent,
51
+ after
52
+ }]);
15
53
  }
16
- static nestedSelector(name, p) {
17
- if (p !== void 0) {
18
- const { parent, after } = p;
19
- return new MergeNode([{ replace: "* " + name, parent, after }]);
20
- }
21
- return new MergeNode(["* " + name]);
54
+ return new MergeNode([...this.classes, "* > " + name]);
55
+ }
56
+ nestedSelector(name, p) {
57
+ if (p !== void 0) {
58
+ const {
59
+ parent,
60
+ after
61
+ } = p;
62
+ return new MergeNode([...this.classes, {
63
+ replace: "* " + name,
64
+ parent,
65
+ after
66
+ }]);
22
67
  }
23
- constructor(classes = empty) {
24
- this.classes = classes;
25
- }
26
- childSelector(name, p) {
27
- if (p !== void 0) {
28
- const { parent, after } = p;
29
- return new MergeNode([...this.classes, { replace: "* > " + name, parent, after }]);
30
- }
31
- return new MergeNode([...this.classes, "* > " + name]);
32
- }
33
- nestedSelector(name, p) {
34
- if (p !== void 0) {
35
- const { parent, after } = p;
36
- return new MergeNode([...this.classes, { replace: "* " + name, parent, after }]);
37
- }
38
- return new MergeNode([...this.classes, "* " + name]);
39
- }
40
- }
41
- //# sourceMappingURL=MergeNode.js.map
68
+ return new MergeNode([...this.classes, "* " + name]);
69
+ }
70
+ }
@@ -1,19 +1,34 @@
1
1
  import XNode from "@web-atoms/core/dist/core/XNode.js";
2
- import "./styles/password-box.global.css";
3
- document.body.addEventListener("togglePassword", (e) => {
4
- const current = e.target;
5
- const input = current.previousElementSibling;
6
- if (input?.tagName !== "INPUT") {
7
- return;
8
- }
9
- const isPassword = input.type === "password";
10
- input.type = isPassword ? "text" : "password";
11
- current.className = !isPassword ? "fa-solid fa-eye" : "fa-solid fa-eye-slash";
12
- current.title = !isPassword ? "Display Password" : "Hide Password";
2
+ ESMPack.installStyleSheet(import.meta.resolve("./styles/password-box.global.css"));
3
+ document.body.addEventListener("togglePassword", e => {
4
+ const current = e.target;
5
+ const input = current.previousElementSibling;
6
+ if (input?.tagName !== "INPUT") {
7
+ return;
8
+ }
9
+ const isPassword = input.type === "password";
10
+ input.type = isPassword ? "text" : "password";
11
+ current.className = !isPassword ? "fa-solid fa-eye" : "fa-solid fa-eye-slash";
12
+ current.title = !isPassword ? "Display Password" : "Hide Password";
13
13
  });
14
- export default function PasswordBox({ placeholder, value, autofocus, ...a }) {
15
- return XNode.create("div", { "data-password-box": "password-box", ...a },
16
- XNode.create("input", { placeholder: placeholder, autofocus: autofocus, type: "password", value: value }),
17
- XNode.create("i", { class: "fa-solid fa-eye", title: "Display Password", "data-click-event": "togglePassword", "data-password-hint": "password-hint" }));
18
- }
19
- //# sourceMappingURL=PasswordBox.js.map
14
+ export default function PasswordBox({
15
+ placeholder,
16
+ value,
17
+ autofocus,
18
+ ...a
19
+ }) {
20
+ return XNode.create("div", {
21
+ "data-password-box": "password-box",
22
+ ...a
23
+ }, XNode.create("input", {
24
+ placeholder: placeholder,
25
+ autofocus: autofocus,
26
+ type: "password",
27
+ value: value
28
+ }), XNode.create("i", {
29
+ class: "fa-solid fa-eye",
30
+ title: "Display Password",
31
+ "data-click-event": "togglePassword",
32
+ "data-password-hint": "password-hint"
33
+ }));
34
+ }