@sankhyalabs/ezui 1.1.108 → 1.1.111

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 (101) hide show
  1. package/dist/cjs/ApplicationUtils-c8f07135.js +39 -0
  2. package/dist/cjs/AssetsUtils-4909c6de.js +24 -0
  3. package/dist/cjs/CSSVarsUtils-8fbdf2e0.js +19 -0
  4. package/dist/cjs/ez-button.cjs.entry.js +79 -0
  5. package/dist/cjs/ez-calendar.cjs.entry.js +223 -0
  6. package/dist/cjs/ez-check.cjs.entry.js +76 -0
  7. package/dist/cjs/ez-collapsible-box.cjs.entry.js +47 -0
  8. package/dist/cjs/ez-combo-box.cjs.entry.js +278 -0
  9. package/dist/cjs/ez-date-input.cjs.entry.js +102 -0
  10. package/dist/cjs/ez-date-time-input.cjs.entry.js +145 -0
  11. package/dist/cjs/ez-form.cjs.entry.js +785 -0
  12. package/dist/cjs/ez-grid.cjs.entry.js +9 -8
  13. package/dist/cjs/ez-icon.cjs.entry.js +41 -0
  14. package/dist/cjs/{ez-button_3.cjs.entry.js → ez-list.cjs.entry.js} +0 -89
  15. package/dist/cjs/ez-modal.cjs.entry.js +65 -0
  16. package/dist/cjs/ez-number-input.cjs.entry.js +86 -0
  17. package/dist/cjs/ez-popover.cjs.entry.js +4 -5
  18. package/dist/cjs/ez-search.cjs.entry.js +64 -0
  19. package/dist/cjs/ez-tabselector.cjs.entry.js +198 -0
  20. package/dist/cjs/ez-text-area.cjs.entry.js +114 -0
  21. package/dist/cjs/ez-text-input.cjs.entry.js +201 -0
  22. package/dist/cjs/ez-time-input.cjs.entry.js +118 -0
  23. package/dist/cjs/ez-upload.cjs.entry.js +356 -0
  24. package/dist/cjs/ezui.cjs.js +1 -1
  25. package/dist/cjs/{ez-modal_2.cjs.entry.js → grid-config.cjs.entry.js} +3 -62
  26. package/dist/cjs/loader.cjs.js +1 -1
  27. package/dist/cjs/select-box.cjs.entry.js +22 -0
  28. package/dist/cjs/test-du.cjs.entry.js +76 -0
  29. package/dist/collection/collection-manifest.json +132 -1
  30. package/dist/custom-elements/index.js +3 -1577
  31. package/dist/esm/ApplicationUtils-36e38de9.js +37 -0
  32. package/dist/esm/AssetsUtils-9b1329a3.js +22 -0
  33. package/dist/esm/CSSVarsUtils-667e0016.js +17 -0
  34. package/dist/esm/ez-button.entry.js +75 -0
  35. package/dist/esm/ez-calendar.entry.js +219 -0
  36. package/dist/esm/ez-check.entry.js +72 -0
  37. package/dist/esm/ez-collapsible-box.entry.js +43 -0
  38. package/dist/esm/ez-combo-box.entry.js +274 -0
  39. package/dist/esm/ez-date-input.entry.js +98 -0
  40. package/dist/esm/ez-date-time-input.entry.js +141 -0
  41. package/dist/esm/ez-form.entry.js +781 -0
  42. package/dist/esm/ez-grid.entry.js +2 -1
  43. package/dist/esm/ez-icon.entry.js +37 -0
  44. package/dist/esm/{ez-button_3.entry.js → ez-list.entry.js} +2 -89
  45. package/dist/esm/ez-modal.entry.js +61 -0
  46. package/dist/esm/ez-number-input.entry.js +82 -0
  47. package/dist/esm/ez-popover.entry.js +1 -2
  48. package/dist/esm/ez-search.entry.js +60 -0
  49. package/dist/esm/ez-tabselector.entry.js +194 -0
  50. package/dist/esm/ez-text-area.entry.js +110 -0
  51. package/dist/esm/ez-text-input.entry.js +197 -0
  52. package/dist/esm/ez-time-input.entry.js +114 -0
  53. package/dist/esm/ez-upload.entry.js +352 -0
  54. package/dist/esm/ezui.js +1 -1
  55. package/dist/esm/{ez-modal_2.entry.js → grid-config.entry.js} +3 -61
  56. package/dist/esm/loader.js +1 -1
  57. package/dist/esm/select-box.entry.js +18 -0
  58. package/dist/esm/test-du.entry.js +72 -0
  59. package/dist/ezui/ezui.esm.js +1 -1
  60. package/dist/ezui/p-080045a0.entry.js +1 -0
  61. package/dist/ezui/p-25e87823.entry.js +1 -0
  62. package/dist/ezui/p-31b0e21a.entry.js +1 -0
  63. package/dist/ezui/p-363fc3af.entry.js +1 -0
  64. package/dist/ezui/p-3662c09e.entry.js +1 -0
  65. package/dist/ezui/p-3a8bf0a8.entry.js +1 -0
  66. package/dist/ezui/p-3c954800.entry.js +1 -0
  67. package/dist/ezui/p-44d4f8d6.entry.js +1 -0
  68. package/dist/ezui/p-477bb703.js +1 -0
  69. package/dist/ezui/p-59a8448a.entry.js +1 -0
  70. package/dist/ezui/p-62daf508.js +1 -0
  71. package/dist/ezui/p-65893e25.entry.js +1 -0
  72. package/dist/ezui/p-73d3f767.entry.js +1 -0
  73. package/dist/ezui/p-73d45b12.entry.js +1 -0
  74. package/dist/ezui/p-804c118a.entry.js +1 -0
  75. package/dist/ezui/p-97f77023.entry.js +1 -0
  76. package/dist/ezui/p-9aecc079.entry.js +1 -0
  77. package/dist/ezui/{p-db1797d7.entry.js → p-a038e7a5.entry.js} +28 -28
  78. package/dist/ezui/p-a5f1f9c4.entry.js +1 -0
  79. package/dist/ezui/p-bc2834fa.entry.js +1 -0
  80. package/dist/ezui/p-c27495d9.entry.js +1 -0
  81. package/dist/ezui/p-c6f2aa6c.entry.js +1 -0
  82. package/dist/ezui/p-d54c157f.js +1 -0
  83. package/dist/ezui/p-f26f6d67.entry.js +1 -0
  84. package/dist/ezui/p-f3f9c7e6.entry.js +1 -0
  85. package/dist/ezui/p-f78c7ec9.entry.js +1 -0
  86. package/package.json +5 -4
  87. package/dist/cjs/AssetsUtils-697927e8.js +0 -79
  88. package/dist/cjs/FloatingManager-751368a8.js +0 -126
  89. package/dist/cjs/UnitMetadata-de809a4b.js +0 -1346
  90. package/dist/cjs/ez-calendar_16.cjs.entry.js +0 -2916
  91. package/dist/esm/AssetsUtils-f75711ac.js +0 -76
  92. package/dist/esm/FloatingManager-ee1f7fdf.js +0 -124
  93. package/dist/esm/UnitMetadata-d300ae38.js +0 -1340
  94. package/dist/esm/ez-calendar_16.entry.js +0 -2897
  95. package/dist/ezui/p-3e6fa4ca.entry.js +0 -1
  96. package/dist/ezui/p-47cf74f0.js +0 -1
  97. package/dist/ezui/p-6b257393.entry.js +0 -1
  98. package/dist/ezui/p-780fbe22.entry.js +0 -1
  99. package/dist/ezui/p-81fc41a5.js +0 -1
  100. package/dist/ezui/p-b05feb1f.js +0 -1
  101. package/dist/ezui/p-c451d6e6.entry.js +0 -1
@@ -1,76 +0,0 @@
1
- import { a as getAssetPath, s as setAssetPath } from './index-6b8bfbeb.js';
2
-
3
- /**
4
- * Classe com utiliários comuns para Strings.
5
- */
6
- class StringUtils {
7
- /**
8
- * Verifica se a string está vazia.
9
- * Valores null e undefined são considerados como vazio.
10
- *
11
- * @param value String para ser validada.
12
- */
13
- static isEmpty(value) {
14
- if (value == undefined || value === null) {
15
- return true;
16
- }
17
- value = value.toString();
18
- value = value.trim();
19
- if (value.length === 0) {
20
- return true;
21
- }
22
- return false;
23
- }
24
- /**
25
- * Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta.
26
- *
27
- * @param value String para ser transformada.
28
- */
29
- static replaceAccentuatedChars(text) {
30
- text = text.toUpperCase();
31
- text = text.replace(/[À]/, "A");
32
- text = text.replace(/[Á]/, "A");
33
- text = text.replace(/[Â]/, "A");
34
- text = text.replace(/[Ã]/, "A");
35
- text = text.replace(/[Ä]/, "A");
36
- text = text.replace(/[È]/, "E");
37
- text = text.replace(/[É]/, "E");
38
- text = text.replace(/[Ê]/, "E");
39
- text = text.replace(/[Ë]/, "E");
40
- text = text.replace(/[Ì]/, "I");
41
- text = text.replace(/[Í]/, "I");
42
- text = text.replace(/[Î]/, "I");
43
- text = text.replace(/[Ï]/, "I");
44
- text = text.replace(/[Ò]/, "O");
45
- text = text.replace(/[Ó]/, "O");
46
- text = text.replace(/[Ô]/, "O");
47
- text = text.replace(/[Ö]/, "O");
48
- text = text.replace(/[Ù]/, "U");
49
- text = text.replace(/[Ú]/, "U");
50
- text = text.replace(/[Û]/, "U");
51
- text = text.replace(/[Ü]/, "U");
52
- text = text.replace(/[Ç]/, "C");
53
- return text.replace(/[^a-z0-9]/gi, '');
54
- }
55
- }
56
-
57
- const getSpritePath = (sprite) => `${getContextAssetsPath("../assets/actions-sprite.svg")}#${sprite}`;
58
- let ctxLoaded = false;
59
- function getContextAssetsPath(resource) {
60
- if (!ctxLoaded) {
61
- const scriptElem = document.querySelector("script[data-ezui-assets-url]");
62
- if (scriptElem) {
63
- let assetsPath = scriptElem.dataset.ezuiAssetsUrl;
64
- if (assetsPath) {
65
- if (assetsPath.startsWith('/')) {
66
- assetsPath = window.location.origin + assetsPath;
67
- }
68
- setAssetPath(assetsPath);
69
- }
70
- }
71
- ctxLoaded = true;
72
- }
73
- return getAssetPath(resource);
74
- }
75
-
76
- export { StringUtils as S, getSpritePath as g };
@@ -1,124 +0,0 @@
1
- class FloatingEntry {
2
- constructor(parent, content, opts) {
3
- try {
4
- this.weakRefParent = new WeakRef(parent);
5
- this.weakRefContent = new WeakRef(content);
6
- }
7
- catch (error) {
8
- this.strongRefParent = parent;
9
- this.strongRefContent = content;
10
- }
11
- this.options = opts;
12
- }
13
- get parent() {
14
- if (this.weakRefParent) {
15
- return this.weakRefParent.deref();
16
- }
17
- return this.strongRefParent;
18
- }
19
- get content() {
20
- if (this.weakRefContent) {
21
- return this.weakRefContent.deref();
22
- }
23
- return this.strongRefContent;
24
- }
25
- }
26
- class FloatingManager {
27
- static init() {
28
- FloatingManager.entries = [];
29
- document.addEventListener('mousedown', FloatingManager.handleDocumentEvent);
30
- document.addEventListener('keydown', FloatingManager.handleKeyboardEvent);
31
- FloatingManager.initialized = true;
32
- }
33
- static innerClick(container, node) {
34
- if (container.contains(node)) {
35
- return true;
36
- }
37
- if (container.shadowRoot && container.shadowRoot.contains(node)) {
38
- return true;
39
- }
40
- return false;
41
- }
42
- static doClose(id, entry, target) {
43
- if (!target || entry.options.autoClose) {
44
- const parent = entry.parent;
45
- const content = entry.content;
46
- if (parent && content) {
47
- const innerClickFunction = entry.options.innerClickTest ? entry.options.innerClickTest : FloatingManager.innerClick;
48
- if (!target || !innerClickFunction(content, target)) {
49
- content.remove();
50
- delete FloatingManager.entries[id];
51
- }
52
- }
53
- else {
54
- delete FloatingManager.entries[id];
55
- }
56
- }
57
- }
58
- static handleDocumentEvent(event) {
59
- FloatingManager.entries.forEach((entry, index) => {
60
- FloatingManager.doClose(index, entry, event.composedPath()[0]);
61
- });
62
- }
63
- static handleKeyboardEvent(event) {
64
- if (event.key === 'Escape') {
65
- for (let index = FloatingManager.entries.length; index >= 0; index--) {
66
- const entry = FloatingManager.entries[index];
67
- if (entry) {
68
- FloatingManager.close(index);
69
- break;
70
- }
71
- }
72
- }
73
- }
74
- static applyStyle(element, propertyName, value) {
75
- if (value) {
76
- element.style.setProperty(propertyName, value);
77
- }
78
- }
79
- static getFloatIndex(content, parent) {
80
- for (let index = 0; index < FloatingManager.entries.length; index++) {
81
- const entry = FloatingManager.entries[index];
82
- if (entry && content === entry.content && parent === entry.parent) {
83
- return index;
84
- }
85
- }
86
- return -1;
87
- }
88
- static isFloating(id) {
89
- return FloatingManager.entries[id] !== undefined;
90
- }
91
- static float(content, parent, options = { autoClose: true }) {
92
- if (!FloatingManager.initialized) {
93
- FloatingManager.init();
94
- }
95
- const alreadyFloatingIndex = FloatingManager.getFloatIndex(content, parent);
96
- if (alreadyFloatingIndex > -1) {
97
- return alreadyFloatingIndex;
98
- }
99
- content.style.position = 'absolute';
100
- FloatingManager.applyStyle(content, "top", options.top);
101
- FloatingManager.applyStyle(content, "left", options.left);
102
- FloatingManager.applyStyle(content, "right", options.right);
103
- FloatingManager.applyStyle(content, "bottom", options.bottom);
104
- parent.appendChild(content);
105
- FloatingManager.entries.push(new FloatingEntry(parent, content, options));
106
- return FloatingManager.entries.length - 1;
107
- }
108
- static updateFloatPosition(content, parent, options = { autoClose: true }) {
109
- const alreadyFloatingIndex = FloatingManager.getFloatIndex(content, parent);
110
- if (alreadyFloatingIndex > -1) {
111
- FloatingManager.applyStyle(content, "top", options.top);
112
- FloatingManager.applyStyle(content, "left", options.left);
113
- FloatingManager.applyStyle(content, "right", options.right);
114
- FloatingManager.applyStyle(content, "bottom", options.bottom);
115
- }
116
- }
117
- static close(id) {
118
- if (FloatingManager.entries[id]) {
119
- FloatingManager.doClose(id, FloatingManager.entries[id], undefined);
120
- }
121
- }
122
- }
123
-
124
- export { FloatingManager as F };