@sankhyalabs/ezui 5.19.2 → 5.20.0-dev.10

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 (206) hide show
  1. package/README.md +4 -5
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-alert-list.cjs.entry.js +108 -47
  4. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-button.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-card-item_3.cjs.entry.js +182 -0
  11. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-combo-box.cjs.entry.js +13 -157
  15. package/dist/cjs/ez-date-input.cjs.entry.js +1 -4
  16. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -4
  17. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-dropdown.cjs.entry.js +10 -4
  19. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-form-view.cjs.entry.js +5 -3
  21. package/dist/cjs/ez-form.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-grid.cjs.entry.js +21 -22
  23. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-icon.cjs.entry.js +2 -2
  25. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  26. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-number-input.cjs.entry.js +1 -4
  31. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  33. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-scroller_3.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-search.cjs.entry.js +612 -32
  36. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-split-item.cjs.entry.js +12 -3
  38. package/dist/cjs/ez-split-panel.cjs.entry.js +12 -10
  39. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  41. package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
  43. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  45. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  46. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  47. package/dist/cjs/ezui.cjs.js +2 -2
  48. package/dist/cjs/filter-column.cjs.entry.js +17 -6
  49. package/dist/cjs/{index-1064511f.js → index-a7b0c73d.js} +4 -6
  50. package/dist/cjs/loader.cjs.js +2 -2
  51. package/dist/collection/collection-manifest.json +3 -3
  52. package/dist/collection/components/ez-alert-list/ez-alert-list.css +15 -1
  53. package/dist/collection/components/ez-alert-list/ez-alert-list.js +109 -46
  54. package/dist/collection/components/ez-card-item/ez-card-item.css +35 -0
  55. package/dist/collection/components/ez-combo-box/ez-combo-box.js +13 -174
  56. package/dist/collection/components/ez-date-input/ez-date-input.js +0 -3
  57. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +0 -3
  58. package/dist/collection/components/ez-dropdown/ez-dropdown.js +32 -3
  59. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
  60. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +7 -10
  61. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +12 -1
  62. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -3
  63. package/dist/collection/components/ez-grid/ez-grid.css +1 -0
  64. package/dist/collection/components/ez-grid/ez-grid.js +2 -2
  65. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +16 -5
  66. package/dist/collection/components/ez-icon/ez-icon.css +1 -1
  67. package/dist/collection/components/ez-number-input/ez-number-input.js +0 -3
  68. package/dist/collection/components/ez-popup/ez-popup.css +0 -1
  69. package/dist/collection/components/ez-search/ez-search.css +331 -0
  70. package/dist/collection/components/ez-search/ez-search.js +689 -55
  71. package/dist/collection/components/ez-split-panel/ez-split-panel.css +7 -7
  72. package/dist/collection/components/ez-split-panel/ez-split-panel.js +30 -10
  73. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +36 -12
  74. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +57 -2
  75. package/dist/collection/utils/form/test/DataBinder.test.js +9 -0
  76. package/dist/custom-elements/index.js +812 -298
  77. package/dist/esm/ez-actions-button.entry.js +1 -1
  78. package/dist/esm/ez-alert-list.entry.js +108 -47
  79. package/dist/esm/ez-alert.entry.js +1 -1
  80. package/dist/esm/ez-application.entry.js +1 -1
  81. package/dist/esm/ez-badge.entry.js +1 -1
  82. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  83. package/dist/esm/ez-button.entry.js +1 -1
  84. package/dist/esm/ez-calendar.entry.js +1 -1
  85. package/dist/esm/ez-card-item_3.entry.js +176 -0
  86. package/dist/esm/ez-check.entry.js +1 -1
  87. package/dist/esm/ez-chip.entry.js +1 -1
  88. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  89. package/dist/esm/ez-combo-box.entry.js +14 -158
  90. package/dist/esm/ez-date-input.entry.js +1 -4
  91. package/dist/esm/ez-date-time-input.entry.js +1 -4
  92. package/dist/esm/ez-dialog.entry.js +1 -1
  93. package/dist/esm/ez-dropdown.entry.js +10 -4
  94. package/dist/esm/ez-file-item.entry.js +1 -1
  95. package/dist/esm/ez-form-view.entry.js +5 -3
  96. package/dist/esm/ez-form.entry.js +1 -1
  97. package/dist/esm/ez-grid.entry.js +21 -22
  98. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  99. package/dist/esm/ez-icon.entry.js +2 -2
  100. package/dist/esm/ez-list.entry.js +1 -1
  101. package/dist/esm/ez-loading-bar.entry.js +1 -1
  102. package/dist/esm/ez-modal-container.entry.js +1 -1
  103. package/dist/esm/ez-modal.entry.js +1 -1
  104. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  105. package/dist/esm/ez-number-input.entry.js +1 -4
  106. package/dist/esm/ez-popover.entry.js +1 -1
  107. package/dist/esm/ez-popup.entry.js +2 -2
  108. package/dist/esm/ez-radio-button.entry.js +1 -1
  109. package/dist/esm/ez-scroller_3.entry.js +1 -1
  110. package/dist/esm/ez-search.entry.js +613 -33
  111. package/dist/esm/ez-skeleton.entry.js +1 -1
  112. package/dist/esm/ez-split-item.entry.js +12 -3
  113. package/dist/esm/ez-split-panel.entry.js +12 -10
  114. package/dist/esm/ez-tabselector.entry.js +1 -1
  115. package/dist/esm/ez-text-area.entry.js +1 -1
  116. package/dist/esm/ez-text-edit.entry.js +1 -1
  117. package/dist/esm/ez-text-input.entry.js +1 -1
  118. package/dist/esm/ez-time-input.entry.js +1 -1
  119. package/dist/esm/ez-toast.entry.js +1 -1
  120. package/dist/esm/ez-upload.entry.js +1 -1
  121. package/dist/esm/ez-view-stack.entry.js +1 -1
  122. package/dist/esm/ezui.js +3 -3
  123. package/dist/esm/filter-column.entry.js +17 -6
  124. package/dist/esm/{index-296b8458.js → index-baa5e267.js} +4 -6
  125. package/dist/esm/loader.js +3 -3
  126. package/dist/ezui/ezui.esm.js +1 -1
  127. package/dist/ezui/{p-99692afa.entry.js → p-02c8831a.entry.js} +1 -1
  128. package/dist/ezui/{p-5cef0264.entry.js → p-0306dff7.entry.js} +1 -1
  129. package/dist/ezui/{p-871c1a07.entry.js → p-0447d17c.entry.js} +1 -1
  130. package/dist/ezui/p-072e6347.entry.js +1 -0
  131. package/dist/ezui/p-133fae4a.entry.js +1 -0
  132. package/dist/ezui/p-13dbad96.entry.js +1 -0
  133. package/dist/ezui/{p-f4208819.entry.js → p-17be134a.entry.js} +1 -1
  134. package/dist/ezui/{p-cd19a6f8.entry.js → p-1e7a8633.entry.js} +1 -1
  135. package/dist/ezui/{p-60ba28ea.entry.js → p-1f50fa05.entry.js} +1 -1
  136. package/dist/ezui/{p-245a44ed.entry.js → p-20ec22c0.entry.js} +1 -1
  137. package/dist/ezui/{p-e318d280.js → p-23a36bb6.js} +1 -1
  138. package/dist/ezui/p-24d3fede.entry.js +1 -0
  139. package/dist/ezui/{p-8252d9b5.entry.js → p-2a1a0e04.entry.js} +1 -1
  140. package/dist/ezui/{p-d20ed286.entry.js → p-300bf244.entry.js} +1 -1
  141. package/dist/ezui/{p-22208198.entry.js → p-40f72de4.entry.js} +1 -1
  142. package/dist/ezui/p-428a05fe.entry.js +1 -0
  143. package/dist/ezui/{p-9b347f04.entry.js → p-44caad9a.entry.js} +1 -1
  144. package/dist/ezui/{p-7319c253.entry.js → p-49456b34.entry.js} +1 -1
  145. package/dist/ezui/{p-ccb4ccd9.entry.js → p-555c9018.entry.js} +1 -1
  146. package/dist/ezui/p-596634e9.entry.js +1 -0
  147. package/dist/ezui/{p-52dd8b4c.entry.js → p-5bd5e68f.entry.js} +1 -1
  148. package/dist/ezui/{p-a01068e1.entry.js → p-5d692ed1.entry.js} +1 -1
  149. package/dist/ezui/{p-95426f93.entry.js → p-5d86cca9.entry.js} +1 -1
  150. package/dist/ezui/{p-62304715.entry.js → p-5e1d036e.entry.js} +1 -1
  151. package/dist/ezui/{p-7525e604.entry.js → p-5ed81457.entry.js} +1 -1
  152. package/dist/ezui/p-60848ef6.entry.js +1 -0
  153. package/dist/ezui/{p-c49dbf23.entry.js → p-650e4b6d.entry.js} +1 -1
  154. package/dist/ezui/{p-f55d75e7.entry.js → p-6e429cff.entry.js} +1 -1
  155. package/dist/ezui/{p-0b902469.entry.js → p-77a4bd35.entry.js} +1 -1
  156. package/dist/ezui/{p-5d6f2550.entry.js → p-85c8baae.entry.js} +1 -1
  157. package/dist/ezui/{p-fa571a4e.entry.js → p-8becebf8.entry.js} +1 -1
  158. package/dist/ezui/{p-d3b5228e.entry.js → p-8defa6d3.entry.js} +1 -1
  159. package/dist/ezui/{p-391de0e4.entry.js → p-9050d2cd.entry.js} +1 -1
  160. package/dist/ezui/p-940ed30b.entry.js +1 -0
  161. package/dist/ezui/{p-028f264f.entry.js → p-9cad9b6e.entry.js} +1 -1
  162. package/dist/ezui/{p-b11f035c.entry.js → p-9f5fa3f9.entry.js} +1 -1
  163. package/dist/ezui/{p-d81917fd.entry.js → p-a08b309b.entry.js} +1 -1
  164. package/dist/ezui/{p-2da09f70.entry.js → p-a80b1287.entry.js} +1 -1
  165. package/dist/ezui/{p-4b988ee7.entry.js → p-ab629244.entry.js} +2 -2
  166. package/dist/ezui/{p-32b4163f.entry.js → p-b041333c.entry.js} +1 -1
  167. package/dist/ezui/p-baf80b13.entry.js +1 -0
  168. package/dist/ezui/p-bc2f844e.entry.js +1 -0
  169. package/dist/ezui/{p-12526044.entry.js → p-c0f1715f.entry.js} +1 -1
  170. package/dist/ezui/{p-83885b21.entry.js → p-cc2dc4f4.entry.js} +1 -1
  171. package/dist/ezui/p-cd0499a2.entry.js +1 -0
  172. package/dist/ezui/p-e52cbcc7.entry.js +1 -0
  173. package/dist/ezui/{p-3e7cc8a4.entry.js → p-eb36f072.entry.js} +1 -1
  174. package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +33 -4
  175. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +0 -15
  176. package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +5 -0
  177. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
  178. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  179. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +4 -1
  180. package/dist/types/components/ez-search/ez-search.d.ts +100 -10
  181. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +23 -0
  182. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +17 -0
  183. package/dist/types/components.d.ts +51 -14
  184. package/dist/types/utils/form/test/DataBinder.test.d.ts +1 -0
  185. package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +2 -1
  186. package/dist/types/utils/interfaces/IAction.d.ts +1 -1
  187. package/package.json +12 -5
  188. package/dist/cjs/ez-card-item.cjs.entry.js +0 -52
  189. package/dist/cjs/ez-filter-input_2.cjs.entry.js +0 -137
  190. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +0 -8
  191. package/dist/esm/ez-card-item.entry.js +0 -48
  192. package/dist/esm/ez-filter-input_2.entry.js +0 -132
  193. package/dist/ezui/p-0843df02.entry.js +0 -1
  194. package/dist/ezui/p-47afb974.entry.js +0 -1
  195. package/dist/ezui/p-59bcb27c.entry.js +0 -1
  196. package/dist/ezui/p-74049254.entry.js +0 -1
  197. package/dist/ezui/p-76d16a24.entry.js +0 -1
  198. package/dist/ezui/p-7fd54841.entry.js +0 -1
  199. package/dist/ezui/p-87e85160.entry.js +0 -1
  200. package/dist/ezui/p-a42fe2ce.entry.js +0 -1
  201. package/dist/ezui/p-af285e68.entry.js +0 -1
  202. package/dist/ezui/p-b6867f19.entry.js +0 -1
  203. package/dist/ezui/p-d51aa09b.entry.js +0 -1
  204. package/dist/ezui/p-e8f88361.entry.js +0 -1
  205. package/dist/ezui/p-f8653522.entry.js +0 -1
  206. package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +0 -1
@@ -30,7 +30,8 @@ import { TFocusOptions } from "./components/ez-text-input/ez-text-input";
30
30
  import { IEzPopoverAnchorOptions } from "./components/ez-popover/ez-popover";
31
31
  import { Radio } from "./components/ez-radio-button/ez-radio-button";
32
32
  import { EzScrollDirection } from "./components/ez-scroller/EzScrollDirection";
33
- import { IEzCheckBoxListPosition as IEzCheckBoxListPosition1, IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-combo-box/ez-combo-box";
33
+ import { IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-search/ez-search";
34
+ import { IEzCheckBoxListPosition as IEzCheckBoxListPosition1 } from "./components/ez-combo-box/ez-combo-box";
34
35
  import { Tab } from "./components/ez-tabselector/ez-tabselector";
35
36
  import { IStyled } from "./components/ez-text-edit/ez-text-edit";
36
37
  import { TFocusOptions as TFocusOptions1 } from "./components/ez-text-input/ez-text-input";
@@ -413,10 +414,6 @@ export namespace Components {
413
414
  * Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
414
415
  */
415
416
  "options": Array<IOption>;
416
- /**
417
- * Se true ativa o modo pesquisa do ez-combo-box.
418
- */
419
- "searchMode": boolean;
420
417
  /**
421
418
  * Remove o foco do campo.
422
419
  */
@@ -1172,7 +1169,11 @@ export namespace Components {
1172
1169
  /**
1173
1170
  * Carrega as opções dinamicamente.
1174
1171
  */
1175
- "optionLoader": (argument: ISearchArgument1) => Promise<Array<IOption1>> | Array<IOption1> | IOption1;
1172
+ "optionLoader": (argument: ISearchArgument) => Promise<Array<IOption>> | Array<IOption> | IOption;
1173
+ /**
1174
+ * Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
1175
+ */
1176
+ "options": Array<IOption>;
1176
1177
  /**
1177
1178
  * Remove o foco do campo.
1178
1179
  */
@@ -1193,10 +1194,14 @@ export namespace Components {
1193
1194
  * Se true remove a opção vazia da lista.
1194
1195
  */
1195
1196
  "suppressEmptyOption": boolean;
1197
+ /**
1198
+ * Se true desabilita a digitação dentro do componente.
1199
+ */
1200
+ "suppressSearch": boolean;
1196
1201
  /**
1197
1202
  * Define o valor do campo.
1198
1203
  */
1199
- "value": IOption1 | string;
1204
+ "value": IOption | string;
1200
1205
  }
1201
1206
  interface EzSidebarButton {
1202
1207
  }
@@ -1238,8 +1243,20 @@ export namespace Components {
1238
1243
  "width": string;
1239
1244
  }
1240
1245
  interface EzSplitItem {
1246
+ /**
1247
+ * Define se o item pode ser expandido
1248
+ */
1249
+ "enableExpand": boolean;
1250
+ /**
1251
+ * Define um título para o painel.
1252
+ */
1253
+ "label": string;
1241
1254
  }
1242
1255
  interface EzSplitPanel {
1256
+ /**
1257
+ * Responsável por definir o painel que limita o tamanho do item expandido.
1258
+ */
1259
+ "anchorToExpand": boolean;
1243
1260
  "direction": 'row' | 'column';
1244
1261
  }
1245
1262
  interface EzTabselector {
@@ -2450,10 +2467,6 @@ declare namespace LocalJSX {
2450
2467
  * Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
2451
2468
  */
2452
2469
  "options"?: Array<IOption>;
2453
- /**
2454
- * Se true ativa o modo pesquisa do ez-combo-box.
2455
- */
2456
- "searchMode"?: boolean;
2457
2470
  /**
2458
2471
  * Se true cada opção na lista exibe o `value` junto com `label`.
2459
2472
  */
@@ -2606,6 +2619,10 @@ declare namespace LocalJSX {
2606
2619
  * Emitido quando ocorrer um click em um item da lista, o IDropdownItem que recebeu o click deve ser enviado como data do evento.
2607
2620
  */
2608
2621
  "onEzClick"?: (event: EzDropdownCustomEvent<IDropdownItem>) => void;
2622
+ /**
2623
+ * Emitido quando ocorrer um click fora do componente.
2624
+ */
2625
+ "onEzOutsideClick"?: (event: EzDropdownCustomEvent<void>) => void;
2609
2626
  /**
2610
2627
  * Emitido quando ocorrer um click em uma ação secundaria do item, o IDropdownSubAction deve ser enviado como data do evento.
2611
2628
  */
@@ -3161,11 +3178,15 @@ declare namespace LocalJSX {
3161
3178
  /**
3162
3179
  * Emitido quando acontece a alteração de valor do campo.
3163
3180
  */
3164
- "onEzChange"?: (event: EzSearchCustomEvent<IOption1>) => void;
3181
+ "onEzChange"?: (event: EzSearchCustomEvent<IOption>) => void;
3165
3182
  /**
3166
3183
  * Carrega as opções dinamicamente.
3167
3184
  */
3168
- "optionLoader"?: (argument: ISearchArgument1) => Promise<Array<IOption1>> | Array<IOption1> | IOption1;
3185
+ "optionLoader"?: (argument: ISearchArgument) => Promise<Array<IOption>> | Array<IOption> | IOption;
3186
+ /**
3187
+ * Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
3188
+ */
3189
+ "options"?: Array<IOption>;
3169
3190
  /**
3170
3191
  * Se false cada opção na lista deve exibir somente o `label`.
3171
3192
  */
@@ -3178,10 +3199,14 @@ declare namespace LocalJSX {
3178
3199
  * Se true remove a opção vazia da lista.
3179
3200
  */
3180
3201
  "suppressEmptyOption"?: boolean;
3202
+ /**
3203
+ * Se true desabilita a digitação dentro do componente.
3204
+ */
3205
+ "suppressSearch"?: boolean;
3181
3206
  /**
3182
3207
  * Define o valor do campo.
3183
3208
  */
3184
- "value"?: IOption1 | string;
3209
+ "value"?: IOption | string;
3185
3210
  }
3186
3211
  interface EzSidebarButton {
3187
3212
  /**
@@ -3227,8 +3252,20 @@ declare namespace LocalJSX {
3227
3252
  "width"?: string;
3228
3253
  }
3229
3254
  interface EzSplitItem {
3255
+ /**
3256
+ * Define se o item pode ser expandido
3257
+ */
3258
+ "enableExpand"?: boolean;
3259
+ /**
3260
+ * Define um título para o painel.
3261
+ */
3262
+ "label"?: string;
3230
3263
  }
3231
3264
  interface EzSplitPanel {
3265
+ /**
3266
+ * Responsável por definir o painel que limita o tamanho do item expandido.
3267
+ */
3268
+ "anchorToExpand"?: boolean;
3232
3269
  "direction"?: 'row' | 'column';
3233
3270
  }
3234
3271
  interface EzTabselector {
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { FieldDescriptor, UserInterface } from "@sankhyalabs/core";
2
- import { IOption, ISearchArgument } from "../../components/ez-combo-box/ez-combo-box";
2
+ import { ISearchArgument } from "../../components/ez-combo-box/ez-combo-box";
3
+ import { IOption } from "../../components/ez-search/ez-search";
3
4
  import { IFieldConfig } from "./IFieldConfig";
4
5
  export default interface IAbstractFieldMetadata {
5
6
  userInterface: UserInterface;
@@ -3,5 +3,5 @@ export default interface IAction {
3
3
  label: string;
4
4
  enabled?: boolean;
5
5
  iconName?: string;
6
- itemBuilder?: (actionButton: HTMLEzActionsButtonElement, action: IAction) => HTMLElement;
6
+ itemBuilder?: (actionButton: any, action: IAction) => HTMLElement | string;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/ezui",
3
- "version": "5.19.2",
3
+ "version": "5.20.0-dev.10",
4
4
  "description": "Biblioteca de componentes Sankhya.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -21,8 +21,7 @@
21
21
  "build.prod": "stencil build --docs --prod",
22
22
  "build.with.peerdeps": "stencil build --docs --prod --force-peer-deps",
23
23
  "start": "stencil build --dev --watch --serve --force-peer-deps",
24
- "test": "stencil test --spec --e2e --logHeapUsage --runInBand",
25
- "test.watch": "stencil test --spec --e2e --watchAll",
24
+ "test": "stencil test --spec --e2e --logHeapUsage --runInBand --coverage --silent --testResultsProcessor jest-sonar-reporter",
26
25
  "generate": "stencil generate",
27
26
  "storybook": "npm run start.storybook",
28
27
  "build.watch": "stencil build --dev --watch --force-peer-deps",
@@ -53,7 +52,6 @@
53
52
  "@sankhyalabs/docscss": "^1.0.4",
54
53
  "@sankhyalabs/ez-design": "^4.0.0",
55
54
  "@sankhyalabs/skippeerdeps": "^1.0.2",
56
- "split-grid": "^1.0.11",
57
55
  "@shopify/draggable": "^1.0.0-beta.8",
58
56
  "@stencil/core": "^2.13.0",
59
57
  "@stencil/react-output-target": "0.0.9",
@@ -72,18 +70,27 @@
72
70
  "husky": "^8.0.3",
73
71
  "jest": "^26.6.3",
74
72
  "jest-cli": "^26.6.3",
73
+ "jest-sonar-reporter": "^2.0.0",
75
74
  "npm-run-all": "^4.1.5",
76
75
  "puppeteer": "^5.5.0",
77
76
  "redux": "^4.1.2",
78
77
  "redux-thunk": "^2.4.1",
79
78
  "redux-undo": "^1.0.1",
80
79
  "run-p": "0.0.0",
80
+ "split-grid": "^1.0.11",
81
81
  "storybook-addon-preview": "^2.2.0",
82
82
  "uuid": "^9.0.0",
83
83
  "ws": "^7.5.6"
84
84
  },
85
85
  "jest": {
86
- "verbose": true
86
+ "verbose": true,
87
+ "testResultsProcessor": "jest-sonar-reporter"
88
+ },
89
+ "jestSonar": {
90
+ "sonar56x": true,
91
+ "reportPath": "reports",
92
+ "reportFile": "test-report.xml",
93
+ "indent": 4
87
94
  },
88
95
  "peerDependencies": {
89
96
  "@sankhyalabs/core": "^5.0.0"
@@ -1,52 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-1064511f.js');
6
- const core = require('@sankhyalabs/core');
7
-
8
- const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
9
-
10
- const EzCardItem = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.ezClick = index.createEvent(this, "ezClick", 7);
14
- this.item = undefined;
15
- }
16
- componentWillRender() {
17
- this.createDetailList();
18
- }
19
- componentDidLoad() {
20
- var _a, _b;
21
- const dataInfo = { id: core.StringUtils.toCamelCase(((_a = this.item) === null || _a === void 0 ? void 0 : _a.key) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.title) || "") };
22
- core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
23
- }
24
- createDetailList() {
25
- var _a, _b, _c;
26
- this._details = { detailsLeft: [], detailsRight: [] };
27
- let cont = 0;
28
- if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
29
- for (const attribute in this.item.details) {
30
- cont < 3 ?
31
- this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
32
- this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
33
- cont++;
34
- }
35
- }
36
- }
37
- buildDetailContent(detail) {
38
- return index.h("div", { class: "card-item__detail" }, index.h("label", { class: "card-item__detail-label" }, detail.label), ": ", index.h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
39
- }
40
- render() {
41
- return (index.h(index.Host, null, this.item &&
42
- index.h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, index.h("label", { class: "card-item__title" }, index.h("span", { class: "card-item__key", innerHTML: this.item.key }), index.h("span", { innerHTML: this.item.title })), index.h("div", { class: "card-item__details" }, index.h("div", { class: "card-item__details-left" }, this._details.detailsLeft.map(detail => {
43
- return this.buildDetailContent(detail);
44
- })), index.h("div", { class: "card-item__details-right" }, this._details.detailsRight.map(detail => {
45
- return this.buildDetailContent(detail);
46
- }))))));
47
- }
48
- get _element() { return index.getElement(this); }
49
- };
50
- EzCardItem.style = ezCardItemCss;
51
-
52
- exports.ez_card_item = EzCardItem;
@@ -1,137 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-1064511f.js');
6
- const core = require('@sankhyalabs/core');
7
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
8
-
9
- const ezFilterInputCss = ":host{display:block;width:100%}";
10
-
11
- const EzFilterInput = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.ezChange = index.createEvent(this, "ezChange", 7);
15
- this.ezSearching = index.createEvent(this, "ezSearching", 7);
16
- this.ezFocusIn = index.createEvent(this, "ezFocusIn", 7);
17
- this._searchingText = "";
18
- this.handleFocus = () => {
19
- if (this._searchingText === "") {
20
- this._textInput.value = "";
21
- }
22
- else {
23
- this._textInput.value = this._searchingText;
24
- }
25
- this.ezFocusIn.emit();
26
- };
27
- this.label = undefined;
28
- this.value = undefined;
29
- this.enabled = true;
30
- this.errorMessage = undefined;
31
- this.restrict = undefined;
32
- this.mode = "regular";
33
- this.asyncSearch = false;
34
- this.canShowError = true;
35
- }
36
- observeLabel() {
37
- if (this._textInput) {
38
- this._textInput.label = this.label;
39
- }
40
- }
41
- observeErrorMessage() {
42
- if (this._textInput) {
43
- this._textInput.errorMessage = this.errorMessage;
44
- }
45
- }
46
- observeValue(newValue, oldValue) {
47
- if (this._textInput && newValue != oldValue) {
48
- this._textInput.value = newValue;
49
- this.ezChange.emit(newValue);
50
- }
51
- }
52
- /**
53
- * Aplica o foco no campo.
54
- */
55
- async setFocus() {
56
- this._textInput.setFocus();
57
- }
58
- /**
59
- * Remove o foco do campo.
60
- */
61
- async setBlur() {
62
- this._textInput.setBlur();
63
- }
64
- /**
65
- * Retorna se o conteúdo é inválido.
66
- */
67
- async isInvalid() {
68
- return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
69
- }
70
- /**
71
- * Método responsável por setar um novo valor ao campo.
72
- */
73
- async setValue(newValue) {
74
- if (!this.asyncSearch || this._textInput == undefined) {
75
- return;
76
- }
77
- if (newValue !== this.value) {
78
- this.value = newValue;
79
- this._searchingText = "";
80
- }
81
- else {
82
- this._textInput.value = newValue;
83
- }
84
- }
85
- /**
86
- * Método responsável por resetar o valor do campo para o ultimo valor inputado.
87
- */
88
- async endSearch() {
89
- if (!this.asyncSearch || this._textInput == undefined) {
90
- return;
91
- }
92
- if (this._textInput.value !== this.value) {
93
- this._textInput.value = this.value;
94
- }
95
- }
96
- handleChange(evt) {
97
- const newValue = evt.detail;
98
- this.errorMessage = "";
99
- if (this.asyncSearch) {
100
- this._searchingText = newValue;
101
- this.ezSearching.emit(newValue);
102
- }
103
- else if (newValue !== this.value) {
104
- this.value = newValue;
105
- }
106
- }
107
- componentDidLoad() {
108
- CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
109
- }
110
- render() {
111
- core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
112
- return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" })));
113
- }
114
- get _elem() { return index.getElement(this); }
115
- static get watchers() { return {
116
- "label": ["observeLabel"],
117
- "errorMessage": ["observeErrorMessage"],
118
- "value": ["observeValue"]
119
- }; }
120
- };
121
- EzFilterInput.style = ezFilterInputCss;
122
-
123
- const multiSelectionBoxMessageCss = ".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";
124
-
125
- const MultiSelectionBoxMessage = class {
126
- constructor(hostRef) {
127
- index.registerInstance(this, hostRef);
128
- this.message = undefined;
129
- }
130
- render() {
131
- return (index.h("div", { class: "multi-selection__message" }, index.h("span", { class: "multi-selection__text-message" }, this.message)));
132
- }
133
- };
134
- MultiSelectionBoxMessage.style = multiSelectionBoxMessageCss;
135
-
136
- exports.ez_filter_input = EzFilterInput;
137
- exports.multi_selection_box_message = MultiSelectionBoxMessage;
@@ -1,8 +0,0 @@
1
- export function calcFilterColumnLeftPosition(leftReference) {
2
- const FIX_MARGIN = 60;
3
- const FILTER_COLUMN_WIDTH = 330;
4
- const screenWidth = window.innerWidth;
5
- const maxLeft = screenWidth - (FILTER_COLUMN_WIDTH + FIX_MARGIN);
6
- const leftInt = leftReference - FIX_MARGIN;
7
- return leftInt > maxLeft ? maxLeft : leftInt;
8
- }
@@ -1,48 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
2
- import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
-
4
- const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
5
-
6
- const EzCardItem = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.ezClick = createEvent(this, "ezClick", 7);
10
- this.item = undefined;
11
- }
12
- componentWillRender() {
13
- this.createDetailList();
14
- }
15
- componentDidLoad() {
16
- var _a, _b;
17
- const dataInfo = { id: StringUtils.toCamelCase(((_a = this.item) === null || _a === void 0 ? void 0 : _a.key) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.title) || "") };
18
- ElementIDUtils.addIDInfo(this._element, null, dataInfo);
19
- }
20
- createDetailList() {
21
- var _a, _b, _c;
22
- this._details = { detailsLeft: [], detailsRight: [] };
23
- let cont = 0;
24
- if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
25
- for (const attribute in this.item.details) {
26
- cont < 3 ?
27
- this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
28
- this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
29
- cont++;
30
- }
31
- }
32
- }
33
- buildDetailContent(detail) {
34
- return h("div", { class: "card-item__detail" }, h("label", { class: "card-item__detail-label" }, detail.label), ": ", h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
35
- }
36
- render() {
37
- return (h(Host, null, this.item &&
38
- h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, h("label", { class: "card-item__title" }, h("span", { class: "card-item__key", innerHTML: this.item.key }), h("span", { innerHTML: this.item.title })), h("div", { class: "card-item__details" }, h("div", { class: "card-item__details-left" }, this._details.detailsLeft.map(detail => {
39
- return this.buildDetailContent(detail);
40
- })), h("div", { class: "card-item__details-right" }, this._details.detailsRight.map(detail => {
41
- return this.buildDetailContent(detail);
42
- }))))));
43
- }
44
- get _element() { return getElement(this); }
45
- };
46
- EzCardItem.style = ezCardItemCss;
47
-
48
- export { EzCardItem as ez_card_item };
@@ -1,132 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-296b8458.js';
2
- import { ElementIDUtils } from '@sankhyalabs/core';
3
- import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
4
-
5
- const ezFilterInputCss = ":host{display:block;width:100%}";
6
-
7
- const EzFilterInput = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.ezChange = createEvent(this, "ezChange", 7);
11
- this.ezSearching = createEvent(this, "ezSearching", 7);
12
- this.ezFocusIn = createEvent(this, "ezFocusIn", 7);
13
- this._searchingText = "";
14
- this.handleFocus = () => {
15
- if (this._searchingText === "") {
16
- this._textInput.value = "";
17
- }
18
- else {
19
- this._textInput.value = this._searchingText;
20
- }
21
- this.ezFocusIn.emit();
22
- };
23
- this.label = undefined;
24
- this.value = undefined;
25
- this.enabled = true;
26
- this.errorMessage = undefined;
27
- this.restrict = undefined;
28
- this.mode = "regular";
29
- this.asyncSearch = false;
30
- this.canShowError = true;
31
- }
32
- observeLabel() {
33
- if (this._textInput) {
34
- this._textInput.label = this.label;
35
- }
36
- }
37
- observeErrorMessage() {
38
- if (this._textInput) {
39
- this._textInput.errorMessage = this.errorMessage;
40
- }
41
- }
42
- observeValue(newValue, oldValue) {
43
- if (this._textInput && newValue != oldValue) {
44
- this._textInput.value = newValue;
45
- this.ezChange.emit(newValue);
46
- }
47
- }
48
- /**
49
- * Aplica o foco no campo.
50
- */
51
- async setFocus() {
52
- this._textInput.setFocus();
53
- }
54
- /**
55
- * Remove o foco do campo.
56
- */
57
- async setBlur() {
58
- this._textInput.setBlur();
59
- }
60
- /**
61
- * Retorna se o conteúdo é inválido.
62
- */
63
- async isInvalid() {
64
- return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
65
- }
66
- /**
67
- * Método responsável por setar um novo valor ao campo.
68
- */
69
- async setValue(newValue) {
70
- if (!this.asyncSearch || this._textInput == undefined) {
71
- return;
72
- }
73
- if (newValue !== this.value) {
74
- this.value = newValue;
75
- this._searchingText = "";
76
- }
77
- else {
78
- this._textInput.value = newValue;
79
- }
80
- }
81
- /**
82
- * Método responsável por resetar o valor do campo para o ultimo valor inputado.
83
- */
84
- async endSearch() {
85
- if (!this.asyncSearch || this._textInput == undefined) {
86
- return;
87
- }
88
- if (this._textInput.value !== this.value) {
89
- this._textInput.value = this.value;
90
- }
91
- }
92
- handleChange(evt) {
93
- const newValue = evt.detail;
94
- this.errorMessage = "";
95
- if (this.asyncSearch) {
96
- this._searchingText = newValue;
97
- this.ezSearching.emit(newValue);
98
- }
99
- else if (newValue !== this.value) {
100
- this.value = newValue;
101
- }
102
- }
103
- componentDidLoad() {
104
- CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
105
- }
106
- render() {
107
- ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
108
- return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "search" })));
109
- }
110
- get _elem() { return getElement(this); }
111
- static get watchers() { return {
112
- "label": ["observeLabel"],
113
- "errorMessage": ["observeErrorMessage"],
114
- "value": ["observeValue"]
115
- }; }
116
- };
117
- EzFilterInput.style = ezFilterInputCss;
118
-
119
- const multiSelectionBoxMessageCss = ".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";
120
-
121
- const MultiSelectionBoxMessage = class {
122
- constructor(hostRef) {
123
- registerInstance(this, hostRef);
124
- this.message = undefined;
125
- }
126
- render() {
127
- return (h("div", { class: "multi-selection__message" }, h("span", { class: "multi-selection__text-message" }, this.message)));
128
- }
129
- };
130
- MultiSelectionBoxMessage.style = multiSelectionBoxMessageCss;
131
-
132
- export { EzFilterInput as ez_filter_input, MultiSelectionBoxMessage as multi_selection_box_message };
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,H as s,g as a}from"./p-e318d280.js";import{DateUtils as n,ElementIDUtils as r}from"@sankhyalabs/core";import{C as h}from"./p-7eb3e1a5.js";const o=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.mode="regular",this.canShowError=!0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=n.validateDate(t),s=n.validateDate(i);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!n.strToDate(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}changeValue(t){const i=n.validateDate(this.value),e=n.validateDate(t);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}showCalendar(){let t;this.handleBlur(),this._calendar.value=this.value,this.isFixed()?(t=29,this._calendar.fitHorizontal(0)):t=this.errorMessage||"slim"===this.mode?6:-13,this._calendar.fitVertical(t,this._elem.clientHeight)}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}handleBlur(){if(this._changePending)try{const t=this._textInput.value,i=n.strToDate(t);if(i||!t){this.errorMessage="";const t=n.validateDate(this.value),e=n.validateDate(i);(null==t?void 0:t.getTime())===(null==e?void 0:e.getTime())?(e&&(this._textInput.value=this.getTextValue(e)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(e)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){return t?n.formatDate(t):void 0}handleInput(t){const i=n.strToDate(this._textInput.value),e=n.validateDate(this.value),s=n.validateDate(i);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}isFixed(){return"true"===this._elem.dataset.isFixed}componentDidLoad(){h.applyVarsTextInput(this._elem,this._textInput),this.setInputValue()}render(){return r.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":r.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},floating:!0,"data-is-fixed":this._elem.dataset.isFixed}))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};o.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{o as ez_date_input}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as i,H as a,g as r}from"./p-e318d280.js";import{StringUtils as l,ElementIDUtils as o}from"@sankhyalabs/core";const d=class{constructor(i){t(this,i),this.ezClick=e(this,"ezClick",7),this.item=void 0}componentWillRender(){this.createDetailList()}componentDidLoad(){var t,e;const i={id:l.toCamelCase((null===(t=this.item)||void 0===t?void 0:t.key)||(null===(e=this.item)||void 0===e?void 0:e.title)||"")};o.addIDInfo(this._element,null,i)}createDetailList(){var t,e,i;this._details={detailsLeft:[],detailsRight:[]};let a=0;if(null===(t=this.item)||void 0===t?void 0:t.details)for(const t in this.item.details)a<3?this._details.detailsLeft.push({label:t,value:null===(e=this.item.details[t])||void 0===e?void 0:e.toString()}):this._details.detailsRight.push({label:t,value:null===(i=this.item.details[t])||void 0===i?void 0:i.toString()}),a++}buildDetailContent(t){return i("div",{class:"card-item__detail"},i("label",{class:"card-item__detail-label"},t.label),": ",i("label",{class:"card-item__detail-value",innerHTML:t.value}))}render(){return i(a,null,this.item&&i("div",{class:"card-item",onClick:()=>{this.ezClick.emit(this.item)}},i("label",{class:"card-item__title"},i("span",{class:"card-item__key",innerHTML:this.item.key}),i("span",{innerHTML:this.item.title})),i("div",{class:"card-item__details"},i("div",{class:"card-item__details-left"},this._details.detailsLeft.map((t=>this.buildDetailContent(t)))),i("div",{class:"card-item__details-right"},this._details.detailsRight.map((t=>this.buildDetailContent(t)))))))}get _element(){return r(this)}};d.style=":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";export{d as ez_card_item}
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as i,g as r}from"./p-e318d280.js";import{FloatingManager as l,ElementIDUtils as a}from"@sankhyalabs/core";const s=class{constructor(e){t(this,e),this.alerts=[],this.enableDragAndDrop=void 0,this.enableExpand=void 0,this.itemRightSlotBuilder=void 0,this.opened=!0,this.expanded=!1}observeOpened(){this.manageOverlay()}async manageOverlay(){this.opened?this._overlayId=l.float(this._container,this._overlayRef,{autoClose:!1,isFixed:!this.enableDragAndDrop,bottom:"10px",right:"10px"}):(l.close(this._overlayId),this._overlayId=void 0)}componentDidRender(){this.manageOverlay(),this.opened&&this._container.focus()}componentWillLoad(){this.dataElementId=a.addIDInfo(this._element,"EzAlertList")}alertId(t,e){return`alert-${e}-${(t=>{var e;return null!==(e=null==t?void 0:t.split(" ").join("-"))&&void 0!==e?e:""})(t)}`}getAlertTitle(t){var e;return null===(e=this.alerts.find(((e,i)=>this.alertId(e.title,i)===t)))||void 0===e?void 0:e.title}getTitleText(t){var e;const i=null!==(e=this.getAlertTitle(t.id))&&void 0!==e?e:"";return`${i}${i&&t.label?":":""}`}render(){return e(i,Object.assign({},{[a.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:this.dataElementId}),e("div",{ref:t=>this._overlayRef=t},e("div",{class:"alert-list__container",ref:t=>this._container=t},e("div",{class:"alert-list__content"},e("div",{class:"alert-list__header"},e("div",{class:"alert-list__title"},`Avisos (${this.alerts.length})`),e("div",{class:"alert-list__header__buttons"},e("ez-button",{mode:"icon",size:"small",iconName:"expand","data-element-id":a.getInternalIDInfo("expandButton"),onClick:()=>{},title:this.expanded?"Resumir":"Expandir"}),e("ez-button",{mode:"icon",size:"small",iconName:"close","data-element-id":a.getInternalIDInfo("closeButton"),onClick:()=>{this.opened=!1},title:"Fechar"}))),e("div",{class:"alert-list__expandable-content"},e("ez-list",{hoverFeedback:!0,itemLeftSlotBuilder:t=>e("a",{href:"#",style:{fontFamily:"var(--font-pattern, 'Roboto')",fontSize:"var(--text--medium, 14px)",fontWeight:"var(--text-weight--medium, 400)",color:"var(--color--primary, #008561)",marginRight:"4px",cursor:"pointer",display:"flex",width:"max-content",textDecoration:"none"}},this.getTitleText(t)),dataSource:this.alerts.map(((t,e)=>{var i;return{id:this.alertId(t.title,e),label:null!==(i=t.detail)&&void 0!==i?i:""}}))}))))))}get _element(){return r(this)}static get watchers(){return{opened:["observeOpened"]}}};s.style=':host{display:flex;--ez-alert-list__container--width:680px;--ez-alert-list__container--height:220px;--ez-alert-list__title--font-family:var(--font-pattern, "Roboto");--ez-alert-list__title--font-size:var(--title--large, 20px);--ez-alert-list__title--color:var(--title--primary, #2b3a54);--ez-alert-list__title--font-weight:var(--text-weight--extra-large, 700);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-bottom-color:var(--color--strokes, #DCE0E8);--ez-list__item--white-space:break-space}.alert-list__content{display:flex;flex-direction:column;gap:var(--space--xs);margin:var(--space--large, 24px);width:100%}.alert-list__container{z-index:var(--more-visible--2x, 3);display:flex;height:var(--ez-alert-list__container--height);width:var(--ez-alert-list__container--width);border-radius:var(--border--radius-medium);background-color:var(--background--xlight);box-shadow:0px 8px 24px 0px rgba(0, 38, 111, 0.1)}.alert-list__header{width:100%;display:flex;align-items:center;justify-content:space-between}.alert-list__title{font-family:var(--ez-alert-list__title--font-family);font-size:var(--ez-alert-list__title--font-size);font-weight:var(--ez-alert-list__title--font-weight);color:var(--ez-alert-list__title--color)}.alert-list__header__buttons{display:flex;gap:var(--space--xs)}.alert-list__expandable-content{overflow-y:auto;scrollbar-width:thin}';export{s as ez_alert_list}