@sankhyalabs/ezui 1.1.75 → 1.1.78

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 (195) hide show
  1. package/dist/cjs/ApplicationUtils-d1c1db56.js +35 -0
  2. package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
  3. package/dist/cjs/CSSVarsUtils-66e86394.js +18 -0
  4. package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
  5. package/dist/cjs/DateUtils-716769e0.js +46 -0
  6. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-application.cjs.entry.js +26 -0
  8. package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
  9. package/dist/cjs/ez-calendar.cjs.entry.js +217 -0
  10. package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +634 -0
  11. package/dist/cjs/ez-combo-box.cjs.entry.js +254 -0
  12. package/dist/cjs/ez-date-time-input.cjs.entry.js +133 -0
  13. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-form.cjs.entry.js +1838 -0
  15. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-number-input.cjs.entry.js +36 -212
  17. package/dist/cjs/ez-popover.cjs.entry.js +3 -3
  18. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  19. package/dist/cjs/ez-time-input.cjs.entry.js +10 -9
  20. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  21. package/dist/cjs/ezui.cjs.js +3 -3
  22. package/dist/cjs/form-metadata.cjs.entry.js +129 -0
  23. package/dist/cjs/index-40ebb2be.js +7422 -0
  24. package/dist/cjs/{index-4d2896bb.js → index-4e4bae01.js} +3 -5
  25. package/dist/cjs/loader.cjs.js +3 -3
  26. package/dist/collection/collection-manifest.json +8 -3
  27. package/dist/collection/components/ez-application/ez-application.css +3 -0
  28. package/dist/collection/components/ez-application/ez-application.js +35 -0
  29. package/dist/collection/components/ez-button/ez-button.css +78 -44
  30. package/dist/collection/components/ez-button/ez-button.js +36 -4
  31. package/dist/collection/components/ez-calendar/ez-calendar.css +70 -3
  32. package/dist/collection/components/ez-calendar/ez-calendar.js +173 -24
  33. package/dist/collection/components/ez-check/ez-check.css +78 -78
  34. package/dist/collection/components/ez-check/ez-check.js +3 -3
  35. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +34 -34
  36. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -12
  37. package/dist/collection/components/ez-combo-box/ez-combo-box.css +65 -54
  38. package/dist/collection/components/ez-combo-box/ez-combo-box.js +5 -0
  39. package/dist/collection/components/ez-date-input/ez-date-input.css +17 -3
  40. package/dist/collection/components/ez-date-input/ez-date-input.js +3 -3
  41. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
  42. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +243 -0
  43. package/dist/collection/components/ez-form/ez-form.js +37 -35
  44. package/dist/collection/components/ez-form/store/Form.actions.js +16 -16
  45. package/dist/collection/components/ez-form/store/Form.reducer.js +17 -17
  46. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +11 -11
  47. package/dist/collection/components/ez-form/subcomponents/form-metadata.js +12 -12
  48. package/dist/collection/components/ez-form/subcomponents/place-holder.js +1 -1
  49. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +21 -21
  50. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
  51. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +9 -9
  52. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
  53. package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
  54. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
  55. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
  56. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
  57. package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
  58. package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
  59. package/dist/collection/components/ez-grid/ez-grid.css +15 -0
  60. package/dist/collection/components/ez-grid/ez-grid.js +414 -0
  61. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
  62. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
  63. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
  64. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
  65. package/dist/collection/components/ez-icon/ez-icon.css +1 -1
  66. package/dist/collection/components/ez-list/ez-list.css +227 -44
  67. package/dist/collection/components/ez-list/ez-list.js +529 -149
  68. package/dist/collection/components/ez-modal/ez-modal.css +4 -4
  69. package/dist/collection/components/ez-modal/ez-modal.js +1 -1
  70. package/dist/collection/components/ez-number-input/ez-number-input.css +1 -165
  71. package/dist/collection/components/ez-number-input/ez-number-input.js +53 -339
  72. package/dist/collection/components/ez-popover/ez-popover.css +10 -6
  73. package/dist/collection/components/ez-popup/ez-popup.css +25 -27
  74. package/dist/collection/components/ez-search/ez-search.js +6 -1
  75. package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
  76. package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
  77. package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
  78. package/dist/collection/components/ez-text-input/ez-text-input.css +60 -60
  79. package/dist/collection/components/ez-text-input/ez-text-input.js +17 -16
  80. package/dist/collection/components/ez-time-input/ez-time-input.js +3 -2
  81. package/dist/collection/components/ez-upload/ez-upload.js +3 -3
  82. package/dist/collection/components/test-du/test-du.css +3 -0
  83. package/dist/collection/components/test-du/test-du.js +45 -0
  84. package/dist/collection/servidor.js +94 -94
  85. package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
  86. package/dist/collection/utils/AssetsUtils.js +19 -0
  87. package/dist/collection/utils/CSSVarsUtils.js +6 -6
  88. package/dist/custom-elements/index.d.ts +36 -6
  89. package/dist/custom-elements/index.js +120886 -2964
  90. package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
  91. package/dist/esm/AssetsUtils-3803e935.js +22 -0
  92. package/dist/esm/CSSVarsUtils-aeee9825.js +16 -0
  93. package/dist/esm/DataUnit-1cd45202.js +464 -0
  94. package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
  95. package/dist/esm/ez-action-chip.entry.js +1 -1
  96. package/dist/esm/ez-application.entry.js +22 -0
  97. package/dist/esm/ez-button_11.entry.js +111757 -0
  98. package/dist/esm/ez-calendar.entry.js +213 -0
  99. package/dist/esm/ez-collapsible-box_6.entry.js +625 -0
  100. package/dist/esm/ez-combo-box.entry.js +250 -0
  101. package/dist/esm/ez-date-time-input.entry.js +129 -0
  102. package/dist/esm/ez-dialog.entry.js +1 -1
  103. package/dist/esm/ez-form.entry.js +1834 -0
  104. package/dist/esm/ez-label-chip.entry.js +1 -1
  105. package/dist/esm/ez-number-input.entry.js +36 -212
  106. package/dist/esm/ez-popover.entry.js +3 -3
  107. package/dist/esm/ez-popup.entry.js +2 -2
  108. package/dist/esm/ez-time-input.entry.js +5 -4
  109. package/dist/esm/ez-toast.entry.js +1 -1
  110. package/dist/esm/ezui.js +3 -3
  111. package/dist/esm/form-metadata.entry.js +125 -0
  112. package/dist/esm/{index-33153059.js → index-1dacecd3.js} +3 -6
  113. package/dist/esm/index-ca8700cb.js +7414 -0
  114. package/dist/esm/loader.js +3 -3
  115. package/dist/ezui/ezui.esm.js +1 -1
  116. package/dist/ezui/p-14bee38e.entry.js +1 -0
  117. package/dist/ezui/p-37a611ea.js +1 -0
  118. package/dist/ezui/p-3a09c678.entry.js +1 -0
  119. package/dist/ezui/p-43c15c94.entry.js +1 -0
  120. package/dist/ezui/{p-34d288d0.entry.js → p-516d0e0f.entry.js} +1 -1
  121. package/dist/ezui/{p-0d476efb.entry.js → p-5a86e18a.entry.js} +1 -1
  122. package/dist/ezui/{p-47406a6e.entry.js → p-5da66d3e.entry.js} +1 -1
  123. package/dist/ezui/p-7107d7ef.js +1 -0
  124. package/dist/ezui/p-72ff3c95.entry.js +1 -0
  125. package/dist/ezui/p-74f978db.entry.js +369 -0
  126. package/dist/ezui/p-88f45a83.entry.js +1 -0
  127. package/dist/ezui/p-8b099482.js +1 -0
  128. package/dist/ezui/p-8d6cdd3e.entry.js +1 -0
  129. package/dist/ezui/p-8f4851a6.js +1 -0
  130. package/dist/ezui/p-9dfd537e.js +1 -0
  131. package/dist/ezui/p-a0331955.entry.js +1 -0
  132. package/dist/ezui/p-a15093e3.entry.js +1 -0
  133. package/dist/ezui/{p-8818da66.entry.js → p-a18a2d7b.entry.js} +1 -1
  134. package/dist/ezui/p-a19f2af3.entry.js +1 -0
  135. package/dist/ezui/p-c6d469fc.entry.js +1 -0
  136. package/dist/ezui/p-c89629eb.js +1 -0
  137. package/dist/ezui/p-da929c01.js +1 -0
  138. package/dist/ezui/p-f3c5f27e.entry.js +1 -0
  139. package/dist/types/components/ez-application/ez-application.d.ts +10 -0
  140. package/dist/types/components/ez-button/ez-button.d.ts +5 -0
  141. package/dist/types/components/ez-calendar/ez-calendar.d.ts +21 -0
  142. package/dist/types/components/ez-check/ez-check.d.ts +1 -1
  143. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +3 -3
  144. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -0
  145. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
  146. package/dist/types/components/ez-form/ez-form.d.ts +9 -9
  147. package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +1 -1
  148. package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +1 -1
  149. package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
  150. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
  151. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
  152. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
  153. package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
  154. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
  155. package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
  156. package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
  157. package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
  158. package/dist/types/components/ez-list/ez-list.d.ts +70 -17
  159. package/dist/types/components/ez-number-input/ez-number-input.d.ts +29 -63
  160. package/dist/types/components/ez-search/ez-search.d.ts +2 -0
  161. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
  162. package/dist/types/components/ez-text-input/ez-text-input.d.ts +1 -1
  163. package/dist/types/components/test-du/test-du.d.ts +6 -0
  164. package/dist/types/components.d.ts +289 -139
  165. package/dist/types/stencil-public-runtime.d.ts +6 -4
  166. package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
  167. package/dist/types/utils/AssetsUtils.d.ts +1 -0
  168. package/dist/types/utils/CSSVarsUtils.d.ts +1 -1
  169. package/package.json +10 -8
  170. package/react/components.d.ts +6 -1
  171. package/react/components.js +6 -1
  172. package/react/components.js.map +1 -1
  173. package/dist/cjs/CSSVarsUtils-f8827674.js +0 -18
  174. package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
  175. package/dist/cjs/ez-button_16.cjs.entry.js +0 -4071
  176. package/dist/cjs/ez-list.cjs.entry.js +0 -174
  177. package/dist/cjs/ez-modal.cjs.entry.js +0 -65
  178. package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
  179. package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
  180. package/dist/esm/CSSVarsUtils-e0128b01.js +0 -16
  181. package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
  182. package/dist/esm/ez-button_16.entry.js +0 -4052
  183. package/dist/esm/ez-list.entry.js +0 -170
  184. package/dist/esm/ez-modal.entry.js +0 -61
  185. package/dist/ezui/p-061d21ba.entry.js +0 -1
  186. package/dist/ezui/p-15743b09.entry.js +0 -1
  187. package/dist/ezui/p-46d07e59.entry.js +0 -1
  188. package/dist/ezui/p-4df6f855.js +0 -1
  189. package/dist/ezui/p-50464bdf.entry.js +0 -1
  190. package/dist/ezui/p-67410dfa.entry.js +0 -1
  191. package/dist/ezui/p-7be54779.entry.js +0 -1
  192. package/dist/ezui/p-7f3bc6d9.entry.js +0 -1
  193. package/dist/ezui/p-9dfccb16.js +0 -1
  194. package/dist/ezui/p-d1889704.js +0 -1
  195. package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
@@ -1,174 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-4d2896bb.js');
6
-
7
- const ezListCss = ":host{--list__host--border-radius:var(--border--radius-medium, 12px);--list__host--padding:var(--space--medium, 12px);--list__icon__padding:var(--space--small, 6px);--list__item__margin:0 var(--space--small, 6px);--list__item--color:var(--title--primary, #2b3a54);--list__item--border-bottom:var(--border--small, 1px solid);--list__item--border-color:var(--title--primary, #2b3a54);--list__item--font-family:var(--font-pattern, #2b3a54);--list__item--font-size:var(--text--medium, 14px);--list__draggable__icon--image:url('data:image/svg+xml;utf8,<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 12,16 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 m 0,-6 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 m 0,-6 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 z\"/></svg>');border-radius:var(--list__host--border-radius);padding:var(--list__host--padding);max-height:100%;width:100%;background-color:#fff;display:flex}.draggable{cursor:pointer;display:flex;align-items:center;justify-content:flex-start;flex:1}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%;overflow-y:auto}.draggable-list li{background-color:#fff;display:flex;margin:var(--list__item__margin);font-family:var(--list__item--font-family);font-size:var(--list__item--font-size);color:var(--list__item--color)}.draggable-list li:not(:last-of-type){border-bottom:var(--list__item--border-bottom)}.draggable-list li.over .draggable{background-color:var(--background--strong)}.draggable:hover{background-color:var(--background--medium)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:#f0f2f5}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--title--primary);border-radius:var(--space--extra-small)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;height:6px;max-height:6px;min-height:6px;width:6px;max-width:6px;min-width:6px}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--list__item--color);width:24px;height:24px;-webkit-mask-image:var(--list__draggable__icon--image);mask-image:var(--list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}";
8
-
9
- let EzList = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this._listItems = [];
13
- /**
14
- * Define a lista inicial do componente.
15
- */
16
- this.initialList = [];
17
- /**
18
- * Define se o componente terá o comportamento de arrasto de linhas.
19
- */
20
- this.draggable = true;
21
- /**
22
- * Define se é possível selecionar mais de um registro.
23
- */
24
- this.isMultipleSelection = true;
25
- }
26
- createList() {
27
- [...this.initialList]
28
- .forEach((item, index) => {
29
- const listItem = document.createElement('li');
30
- listItem.setAttribute('data-index', index.toString());
31
- if (!this.isMultipleSelection)
32
- listItem.onclick = this.selectLine.bind(this);
33
- listItem.innerHTML = `
34
- <div class="draggable" ${this.draggable ? "draggable=true" : ""}>
35
-
36
- ${this.draggable ? '<span class="draggable-icon"></span>' : ""}
37
-
38
- ${this.isMultipleSelection ? `<ez-check class='checkbox' value=${item.checked}></ez-check>` : ''}
39
- <p title="${item.value}" class="person-name text--ellipsis">${item.value}</p>
40
-
41
- </div>
42
- `;
43
- this._listItems.push(listItem);
44
- this._draggableList.appendChild(listItem);
45
- });
46
- if (this.draggable) {
47
- this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, false);
48
- }
49
- }
50
- selectLine(e) {
51
- var _a, _b, _c;
52
- this._listItems.forEach(item => { item.classList.remove('draggable-selected'); });
53
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === 'SPAN') {
54
- const span = e.target;
55
- this._selectedItem = { value: span.parentElement.getElementsByTagName('p')[0].textContent };
56
- span.parentElement.parentElement.classList.add('draggable-selected');
57
- }
58
- else if (((_b = e.target) === null || _b === void 0 ? void 0 : _b.tagName) === 'P') {
59
- const paragraph = e.target;
60
- this._selectedItem = { value: paragraph.textContent };
61
- paragraph.parentElement.parentElement.classList.add('draggable-selected');
62
- }
63
- else if (((_c = e.target) === null || _c === void 0 ? void 0 : _c.tagName) === 'DIV') {
64
- const draggable = e.target;
65
- this._selectedItem = { value: draggable.getElementsByTagName('p')[0].textContent };
66
- draggable.parentElement.classList.add('draggable-selected');
67
- }
68
- }
69
- handleEventListeners(listItems, dragableList, hostElement, removeEvents) {
70
- let _dragStartIndex;
71
- let _isItemOut = false;
72
- function dragStart(item) {
73
- _dragStartIndex = item.parentElement.getAttribute('data-index');
74
- }
75
- function dragEnter(item) {
76
- item.classList.add('over');
77
- }
78
- function dragLeave(item) {
79
- item.classList.remove('over');
80
- }
81
- function dragOver(e) {
82
- e.preventDefault();
83
- }
84
- function dragDrop(item) {
85
- if (_isItemOut) {
86
- let index = +item.getAttribute('data-index');
87
- const itemRemoved = listItems[index].querySelector('.draggable');
88
- listItems[index].removeChild(itemRemoved);
89
- }
90
- const dragEndIndex = +item.getAttribute('data-index');
91
- swapItems(+_dragStartIndex, dragEndIndex);
92
- item.classList.remove('over');
93
- }
94
- function swapItems(fromIndex, toIndex) {
95
- const itemOne = listItems[fromIndex].querySelector('.draggable');
96
- const itemTwo = listItems[toIndex].querySelector('.draggable');
97
- listItems[fromIndex].appendChild(itemTwo);
98
- listItems[toIndex].appendChild(itemOne);
99
- return listItems;
100
- }
101
- if (!removeEvents) {
102
- hostElement.addEventListener('dragenter', function () { _isItemOut = false; });
103
- hostElement.addEventListener('dragleave', function () { _isItemOut = true; });
104
- const draggables = dragableList.querySelectorAll("div.draggable");
105
- draggables.forEach(draggable => {
106
- draggable.addEventListener('dragstart', function () { dragStart(draggable); });
107
- });
108
- listItems.forEach(item => {
109
- item.addEventListener('dragover', function (event) { dragOver(event); });
110
- item.addEventListener('drop', function () { dragDrop(item); });
111
- item.addEventListener('dragenter', function () { dragEnter(item); });
112
- item.addEventListener('dragleave', function () { dragLeave(item); });
113
- });
114
- }
115
- else {
116
- hostElement.removeEventListener('dragenter', function () { _isItemOut = false; });
117
- hostElement.removeEventListener('dragleave', function () { _isItemOut = true; });
118
- const draggables = dragableList.querySelectorAll("div.draggable");
119
- draggables.forEach(draggable => {
120
- draggable.removeEventListener('dragstart', function () { dragStart(draggable); });
121
- });
122
- listItems.forEach(item => {
123
- item.removeEventListener('dragover', function (event) { dragOver(event); });
124
- item.removeEventListener('drop', function () { dragDrop(item); });
125
- item.removeEventListener('dragenter', function () { dragEnter(item); });
126
- item.removeEventListener('dragleave', function () { dragLeave(item); });
127
- });
128
- }
129
- }
130
- /**
131
- * Retorna uma promessa com o estado da atual lista composta por objetos do tipo {value: string, checked: boolean}.
132
- */
133
- async getState() {
134
- let emitionList = [];
135
- this._listItems.forEach(item => {
136
- let emitionItem = {
137
- value: this.getValueItem(item),
138
- checked: this.getChecked(item)
139
- };
140
- emitionList.push(emitionItem);
141
- });
142
- return emitionList;
143
- }
144
- getChecked(item) {
145
- if (this.isMultipleSelection) {
146
- return item.children[0].children[1].value;
147
- }
148
- else {
149
- if (!this._selectedItem)
150
- return false;
151
- return (item.children[0].children[1].textContent === this._selectedItem.value);
152
- }
153
- }
154
- getValueItem(item) {
155
- if (this.isMultipleSelection) {
156
- return item.children[0].children[2].textContent;
157
- }
158
- return item.children[0].children[1].textContent;
159
- }
160
- componentDidLoad() {
161
- this.createList();
162
- }
163
- disconnectedCallback() {
164
- if (this.draggable) {
165
- this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, true);
166
- }
167
- }
168
- render() {
169
- return (index.h(index.Host, { ref: (el) => this._hostElement = el }, index.h("ul", { ref: (el) => this._draggableList = el, class: "draggable-list", id: "draggable-list" })));
170
- }
171
- };
172
- EzList.style = ezListCss;
173
-
174
- exports.ez_list = EzList;
@@ -1,65 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-4d2896bb.js');
6
-
7
- const ezModalCss = ":host{--modal-z-index:var(--most-visible, 3);--modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
8
-
9
- let EzModal = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.ezCloseModal = index.createEvent(this, "ezCloseModal", 7);
13
- /**
14
- * Controle de exibição do Modal
15
- */
16
- this.opened = true;
17
- /**
18
- * Define se o modal será fechado ao clicar ESC
19
- */
20
- this.closeEsc = false;
21
- /**
22
- * Define se o modal será fechado ao clicar fora do conteúdo.
23
- */
24
- this.closeOutsideClick = false;
25
- this.handleKeyboardEvent = (ev) => {
26
- if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
27
- this.closeModal();
28
- }
29
- };
30
- }
31
- handleopenedChange() {
32
- if (this.opened) {
33
- document.addEventListener("keydown", this.handleKeyboardEvent);
34
- }
35
- else {
36
- document.removeEventListener("keydown", this.handleKeyboardEvent);
37
- }
38
- }
39
- closeModal() {
40
- this.opened = false;
41
- this.ezCloseModal.emit(this.opened);
42
- }
43
- componentDidLoad() {
44
- this.handleopenedChange();
45
- }
46
- onMouseDownHandler(event) {
47
- if (this.closeOutsideClick && event.target === this._overlay) {
48
- this.closeModal();
49
- }
50
- }
51
- render() {
52
- const positionSufix = this.align === "left" ? "left" : "right";
53
- return (index.h(index.Host, null, this.opened
54
- ?
55
- index.h("div", { class: "modal", onMouseDown: evt => this.onMouseDownHandler(evt) }, index.h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, index.h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalSize}` }, index.h("slot", null))))
56
- :
57
- undefined));
58
- }
59
- static get watchers() { return {
60
- "opened": ["handleopenedChange"]
61
- }; }
62
- };
63
- EzModal.style = ezModalCss;
64
-
65
- exports.ez_modal = EzModal;
@@ -1,13 +0,0 @@
1
- :host {
2
- display: block;
3
- width: 100%;
4
- /*@doc Define a cor de fundo do input.*/
5
- --it__input--background-color: var(--background--medium, #e0e0e0);
6
- /*@doc Define a cor da borda do input.*/
7
- --it__input--border-color: var(--it__input--background-color);
8
- }
9
-
10
- .text-input {
11
- --it__input--background-color: inherit;
12
- --it__input--border-color: inherit;
13
- }
@@ -1,185 +0,0 @@
1
- import { NumberUtils } from '@sankhyalabs/core';
2
- import { Component, h, Event, Prop, Watch } from '@stencil/core';
3
- export class EzNumericInput {
4
- constructor() {
5
- /**
6
- * Deixa o campo disponível ou não para uso.
7
- */
8
- this.enabled = true;
9
- }
10
- setLabel() {
11
- this._textInput.label = this.label;
12
- }
13
- setErrorMessage() {
14
- this._textInput.errorMessage = this.errorMessage;
15
- }
16
- applyValueToInput() {
17
- if (this._textInput) {
18
- this._textInput.value = this.getTextValue(this.value);
19
- }
20
- }
21
- changeValue(newValue) {
22
- this._textInput.errorMessage = "";
23
- if (newValue !== this.value) {
24
- this.value = newValue;
25
- this.ezChange.emit();
26
- }
27
- }
28
- parseNumber() {
29
- const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) : null;
30
- if (parsedNumber != null && isNaN(parsedNumber)) {
31
- this._textInput.errorMessage = "O valor digitado não é um número válido";
32
- }
33
- else {
34
- this.changeValue(parsedNumber);
35
- }
36
- }
37
- getTextValue(value) {
38
- if (value) {
39
- return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyprecision)) : value.toString();
40
- }
41
- return null;
42
- }
43
- render() {
44
- return (h("ez-text-input", { class: "text-input", ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage }));
45
- }
46
- static get is() { return "ez-numeric-input"; }
47
- static get encapsulation() { return "shadow"; }
48
- static get originalStyleUrls() { return {
49
- "$": ["ez-numeric-input.css"]
50
- }; }
51
- static get styleUrls() { return {
52
- "$": ["ez-numeric-input.css"]
53
- }; }
54
- static get properties() { return {
55
- "label": {
56
- "type": "string",
57
- "mutable": false,
58
- "complexType": {
59
- "original": "string",
60
- "resolved": "string",
61
- "references": {}
62
- },
63
- "required": false,
64
- "optional": false,
65
- "docs": {
66
- "tags": [],
67
- "text": "T\u00EDtulo do campo"
68
- },
69
- "attribute": "label",
70
- "reflect": true
71
- },
72
- "value": {
73
- "type": "number",
74
- "mutable": true,
75
- "complexType": {
76
- "original": "number",
77
- "resolved": "number",
78
- "references": {}
79
- },
80
- "required": false,
81
- "optional": false,
82
- "docs": {
83
- "tags": [],
84
- "text": "O valor informado pelo usu\u00E1rio"
85
- },
86
- "attribute": "value",
87
- "reflect": true
88
- },
89
- "enabled": {
90
- "type": "boolean",
91
- "mutable": false,
92
- "complexType": {
93
- "original": "boolean",
94
- "resolved": "boolean",
95
- "references": {}
96
- },
97
- "required": false,
98
- "optional": false,
99
- "docs": {
100
- "tags": [],
101
- "text": "Deixa o campo dispon\u00EDvel ou n\u00E3o para uso."
102
- },
103
- "attribute": "enabled",
104
- "reflect": true,
105
- "defaultValue": "true"
106
- },
107
- "errorMessage": {
108
- "type": "string",
109
- "mutable": true,
110
- "complexType": {
111
- "original": "string",
112
- "resolved": "string",
113
- "references": {}
114
- },
115
- "required": false,
116
- "optional": false,
117
- "docs": {
118
- "tags": [],
119
- "text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
120
- },
121
- "attribute": "error-message",
122
- "reflect": true
123
- },
124
- "precision": {
125
- "type": "any",
126
- "mutable": false,
127
- "complexType": {
128
- "original": "string | number",
129
- "resolved": "number | string",
130
- "references": {}
131
- },
132
- "required": false,
133
- "optional": false,
134
- "docs": {
135
- "tags": [],
136
- "text": "Precis\u00E3o decimal, ou seja, quantas casas decimais podem ser exibidas. Caso a\nquantidade de casas decimais do valor seja maior que precision, haver\u00E1 arredondamento"
137
- },
138
- "attribute": "precision",
139
- "reflect": false
140
- },
141
- "prettyprecision": {
142
- "type": "any",
143
- "mutable": false,
144
- "complexType": {
145
- "original": "string | number",
146
- "resolved": "number | string",
147
- "references": {}
148
- },
149
- "required": false,
150
- "optional": false,
151
- "docs": {
152
- "tags": [],
153
- "text": "Esse atributo determina qual \u00E9 o n\u00FAmero m\u00EDnimo de casas depois da v\u00EDrgula.\nExemplo: Digamos que a precision seja igual a 4, assim qualquer n\u00FAmero ser\u00E1 \nrepresentado com 4 casas decimais mesmo que iguais a zero: 1,0100.\nSe prettiprecision igual a 2, como n\u00E3o h\u00E1 necessidade de mais de duas casas decimais\no valor exibido ser\u00E1 1,01. Por outro lado, at\u00E9 a quarta casa n\u00E3o haver\u00E1 arredondamento\n(1,1234 = 1,1234) mas a partir da quinta casa sim (1,12345 = 1,1235)."
154
- },
155
- "attribute": "prettyprecision",
156
- "reflect": false
157
- }
158
- }; }
159
- static get events() { return [{
160
- "method": "ezChange",
161
- "name": "ezChange",
162
- "bubbles": true,
163
- "cancelable": true,
164
- "composed": true,
165
- "docs": {
166
- "tags": [],
167
- "text": "Evento disparado quando o estado do componente \u00E9 alterado (onEzChange)."
168
- },
169
- "complexType": {
170
- "original": "string",
171
- "resolved": "string",
172
- "references": {}
173
- }
174
- }]; }
175
- static get watchers() { return [{
176
- "propName": "label",
177
- "methodName": "setLabel"
178
- }, {
179
- "propName": "errorMessage",
180
- "methodName": "setErrorMessage"
181
- }, {
182
- "propName": "value",
183
- "methodName": "applyValueToInput"
184
- }]; }
185
- }
@@ -1,16 +0,0 @@
1
- class CSSVarsUtils {
2
- static applyVarsTextInput(host, textInput) {
3
- if (textInput) {
4
- CSSVarsUtils.applyIfExists(host, textInput, '--text-input__input--background-color');
5
- CSSVarsUtils.applyIfExists(host, textInput, '--text-input__input--border-color');
6
- }
7
- }
8
- static applyIfExists(host, textInput, varName) {
9
- const prop = getComputedStyle(host).getPropertyValue(varName);
10
- if (prop) {
11
- textInput.style.setProperty(varName, prop);
12
- }
13
- }
14
- }
15
-
16
- export { CSSVarsUtils as C };