@sankhyalabs/ezui 1.1.78 → 1.1.79

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 (150) hide show
  1. package/dist/cjs/{AssetsUtils-dd585fba.js → AssetsUtils-02db4f46.js} +1 -1
  2. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-button_3.cjs.entry.js +520 -0
  5. package/dist/cjs/ez-calendar_13.cjs.entry.js +2417 -0
  6. package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -2
  7. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  8. package/dist/cjs/{ez-button_11.cjs.entry.js → ez-grid.cjs.entry.js} +14 -1410
  9. package/dist/cjs/ez-icon.cjs.entry.js +30 -0
  10. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-modal_2.cjs.entry.js +370 -0
  12. package/dist/cjs/ez-popover.cjs.entry.js +2 -2
  13. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-time-input.cjs.entry.js +3 -3
  15. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  16. package/dist/cjs/ezui.cjs.js +2 -2
  17. package/dist/cjs/{index-4e4bae01.js → index-2003dec4.js} +0 -10
  18. package/dist/cjs/{index-40ebb2be.js → index-a2266984.js} +18 -23
  19. package/dist/cjs/loader.cjs.js +2 -2
  20. package/dist/collection/collection-manifest.json +0 -2
  21. package/dist/collection/components/ez-form/DataBinder.js +44 -0
  22. package/dist/collection/components/ez-form/ez-form.css +1 -15
  23. package/dist/collection/components/ez-form/ez-form.js +109 -428
  24. package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +45 -0
  25. package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +11 -0
  26. package/dist/collection/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.js +14 -0
  27. package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +5 -0
  28. package/dist/collection/components/ez-form/fieldbuilder/tpl/FileInput.tpl.js +5 -0
  29. package/dist/collection/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.js +13 -0
  30. package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +5 -0
  31. package/dist/collection/components/ez-form/fieldbuilder/tpl/TextArea.tpl.js +5 -0
  32. package/dist/collection/components/ez-form/fieldbuilder/tpl/TextInput.tpl.js +5 -0
  33. package/dist/collection/components/ez-form/store/form.slice.js +38 -0
  34. package/dist/collection/components/ez-form/structure/FormItem.js +11 -0
  35. package/dist/collection/components/ez-form/structure/FormSheet.js +5 -0
  36. package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +86 -0
  37. package/dist/collection/components/test-du/test-du.js +65 -23
  38. package/dist/custom-elements/index.d.ts +0 -12
  39. package/dist/custom-elements/index.js +380 -2065
  40. package/dist/esm/{AssetsUtils-3803e935.js → AssetsUtils-76ca41e1.js} +1 -1
  41. package/dist/esm/ez-action-chip.entry.js +1 -1
  42. package/dist/esm/ez-application.entry.js +1 -1
  43. package/dist/esm/ez-button_3.entry.js +514 -0
  44. package/dist/esm/ez-calendar_13.entry.js +2401 -0
  45. package/dist/esm/ez-date-time-input.entry.js +2 -2
  46. package/dist/esm/ez-dialog.entry.js +1 -1
  47. package/dist/esm/{ez-button_11.entry.js → ez-grid.entry.js} +4 -1390
  48. package/dist/esm/ez-icon.entry.js +26 -0
  49. package/dist/esm/ez-label-chip.entry.js +1 -1
  50. package/dist/esm/ez-modal_2.entry.js +365 -0
  51. package/dist/esm/ez-popover.entry.js +2 -2
  52. package/dist/esm/ez-popup.entry.js +1 -1
  53. package/dist/esm/ez-time-input.entry.js +3 -3
  54. package/dist/esm/ez-toast.entry.js +1 -1
  55. package/dist/esm/ezui.js +2 -2
  56. package/dist/esm/{index-1dacecd3.js → index-077c7fcf.js} +0 -10
  57. package/dist/esm/{index-ca8700cb.js → index-afe19542.js} +17 -21
  58. package/dist/esm/loader.js +2 -2
  59. package/dist/ezui/ezui.esm.js +1 -1
  60. package/dist/ezui/p-00b837e2.js +1 -0
  61. package/dist/ezui/{p-516d0e0f.entry.js → p-0a2056d9.entry.js} +1 -1
  62. package/dist/ezui/{p-a15093e3.entry.js → p-0d8368fc.entry.js} +1 -1
  63. package/dist/ezui/p-1e36e3ff.entry.js +1 -0
  64. package/dist/ezui/p-446ec85b.js +1 -0
  65. package/dist/ezui/{p-74f978db.entry.js → p-5509ee41.entry.js} +46 -46
  66. package/dist/ezui/{p-a18a2d7b.entry.js → p-57ea4b84.entry.js} +1 -1
  67. package/dist/ezui/{p-5a86e18a.entry.js → p-6d157776.entry.js} +1 -1
  68. package/dist/ezui/{p-f3c5f27e.entry.js → p-7a1f2e0e.entry.js} +1 -1
  69. package/dist/ezui/p-7de3c95d.js +1 -0
  70. package/dist/ezui/{p-8d6cdd3e.entry.js → p-857ead8e.entry.js} +1 -1
  71. package/dist/ezui/{p-c6d469fc.entry.js → p-920bb8c9.entry.js} +1 -1
  72. package/dist/ezui/p-9be02ecf.entry.js +1 -0
  73. package/dist/ezui/p-a4a39579.entry.js +1 -0
  74. package/dist/ezui/p-d5699f29.entry.js +1 -0
  75. package/dist/ezui/p-d64a3939.entry.js +1 -0
  76. package/dist/ezui/{p-5da66d3e.entry.js → p-da31cd21.entry.js} +1 -1
  77. package/dist/types/components/ez-form/DataBinder.d.ts +10 -0
  78. package/dist/types/components/ez-form/ez-form.d.ts +24 -32
  79. package/dist/types/components/ez-form/fieldbuilder/FieldBuilder.d.ts +2 -0
  80. package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -0
  81. package/dist/types/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.d.ts +4 -0
  82. package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -0
  83. package/dist/types/components/ez-form/fieldbuilder/tpl/FileInput.tpl.d.ts +4 -0
  84. package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +8 -0
  85. package/dist/types/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.d.ts +4 -0
  86. package/dist/types/components/ez-form/fieldbuilder/tpl/TextArea.tpl.d.ts +4 -0
  87. package/dist/types/components/ez-form/fieldbuilder/tpl/TextInput.tpl.d.ts +4 -0
  88. package/dist/types/components/ez-form/store/form.slice.d.ts +24 -0
  89. package/dist/types/components/ez-form/structure/FormItem.d.ts +9 -0
  90. package/dist/types/components/ez-form/structure/FormSheet.d.ts +9 -0
  91. package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +27 -0
  92. package/dist/types/components/test-du/test-du.d.ts +8 -2
  93. package/dist/types/components.d.ts +9 -63
  94. package/package.json +1 -1
  95. package/react/components.d.ts +0 -2
  96. package/react/components.js +0 -2
  97. package/react/components.js.map +1 -1
  98. package/dist/cjs/ApplicationUtils-d1c1db56.js +0 -35
  99. package/dist/cjs/DataUnit-fdd7c70e.js +0 -474
  100. package/dist/cjs/ez-calendar.cjs.entry.js +0 -217
  101. package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +0 -634
  102. package/dist/cjs/ez-combo-box.cjs.entry.js +0 -254
  103. package/dist/cjs/ez-form.cjs.entry.js +0 -1838
  104. package/dist/cjs/ez-number-input.cjs.entry.js +0 -74
  105. package/dist/cjs/form-metadata.cjs.entry.js +0 -129
  106. package/dist/collection/components/ez-form/assets/trash-can-outline.svg +0 -3
  107. package/dist/collection/components/ez-form/store/Form.actions.js +0 -132
  108. package/dist/collection/components/ez-form/store/Form.reducer.js +0 -194
  109. package/dist/collection/components/ez-form/store/Form.selectors.js +0 -44
  110. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +0 -301
  111. package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +0 -8
  112. package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +0 -24
  113. package/dist/collection/components/ez-form/subcomponents/form-metadata.js +0 -227
  114. package/dist/collection/components/ez-form/subcomponents/place-holder.js +0 -14
  115. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +0 -95
  116. package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +0 -27
  117. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +0 -41
  118. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +0 -37
  119. package/dist/esm/ApplicationUtils-01280a9d.js +0 -33
  120. package/dist/esm/DataUnit-1cd45202.js +0 -464
  121. package/dist/esm/ez-calendar.entry.js +0 -213
  122. package/dist/esm/ez-collapsible-box_6.entry.js +0 -625
  123. package/dist/esm/ez-combo-box.entry.js +0 -250
  124. package/dist/esm/ez-form.entry.js +0 -1834
  125. package/dist/esm/ez-number-input.entry.js +0 -70
  126. package/dist/esm/form-metadata.entry.js +0 -125
  127. package/dist/ezui/assets/trash-can-outline.svg +0 -3
  128. package/dist/ezui/p-14bee38e.entry.js +0 -1
  129. package/dist/ezui/p-37a611ea.js +0 -1
  130. package/dist/ezui/p-3a09c678.entry.js +0 -1
  131. package/dist/ezui/p-43c15c94.entry.js +0 -1
  132. package/dist/ezui/p-7107d7ef.js +0 -1
  133. package/dist/ezui/p-72ff3c95.entry.js +0 -1
  134. package/dist/ezui/p-88f45a83.entry.js +0 -1
  135. package/dist/ezui/p-8f4851a6.js +0 -1
  136. package/dist/ezui/p-9dfd537e.js +0 -1
  137. package/dist/ezui/p-a0331955.entry.js +0 -1
  138. package/dist/ezui/p-a19f2af3.entry.js +0 -1
  139. package/dist/ezui/p-da929c01.js +0 -1
  140. package/dist/types/components/ez-form/store/Form.actions.d.ts +0 -111
  141. package/dist/types/components/ez-form/store/Form.reducer.d.ts +0 -20
  142. package/dist/types/components/ez-form/store/Form.selectors.d.ts +0 -14
  143. package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +0 -91
  144. package/dist/types/components/ez-form/subcomponents/FormMetadata.d.ts +0 -24
  145. package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +0 -16
  146. package/dist/types/components/ez-form/subcomponents/place-holder.d.ts +0 -3
  147. package/dist/types/components/ez-form/subcomponents/structure/Field.d.ts +0 -11
  148. package/dist/types/components/ez-form/subcomponents/structure/FieldSet.d.ts +0 -13
  149. package/dist/types/components/ez-form/subcomponents/structure/FormSheet.d.ts +0 -14
  150. package/dist/types/components/ez-form/subcomponents/structure/NavigationBar.d.ts +0 -19
@@ -1,132 +1,6 @@
1
- import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-1dacecd3.js';
2
- import { c as createCommonjsModule, a as commonjsGlobal, A as Action, M as MaskFormatter, D as DataUnit, b as DataType } from './index-ca8700cb.js';
3
- import { g as getSpritePath } from './AssetsUtils-3803e935.js';
4
-
5
- const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--text--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover--background-color:var(--background--strong, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--ez-button--border);--ez-button--focus--box-shadow:none;--ez-button--link-color:var(--title--primary, '#C0C0C0')}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:hover{background-color:var(--ez-button--hover--background-color)}button:focus{outline:none;border:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;cursor:no-drop}button.icon{padding:0px}button.small{width:32px;min-width:32px;height:32px}button.medium{width:42px;min-width:42px;height:42px}button.large{width:52px;min-width:52px;height:52px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight)}a{font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}";
6
-
7
- let EzButton = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- /**
11
- * Deixa o botão disponível ou não para interação com o usuário.
12
- */
13
- this.enabled = true;
14
- /**
15
- * Define o modo de uso do botão; opções: icon, link e regular
16
- */
17
- this.mode = "regular";
18
- /**
19
- * Quando em modo "icon" pode-se escolher entre [small,medium,large] (somente para o modo "icon")
20
- */
21
- this.size = "medium";
22
- }
23
- getIconSize() {
24
- return this.size;
25
- }
26
- handleSlotChange(ev) {
27
- const slot = ev.target;
28
- const content = slot.assignedElements()[0];
29
- if (this.mode == "link") {
30
- content.style.display = "inline";
31
- if (slot.name == "leftIcon") {
32
- content.style.paddingRight = "var(--ez-button__inline__icon--padding)";
33
- }
34
- else if (slot.name == "rightIcon") {
35
- content.style.paddingLeft = "var(--ez-button__inline__icon--padding)";
36
- }
37
- }
38
- else {
39
- content.style.setProperty('--ez-icon--color', 'var(--ez-icon--color)');
40
- }
41
- }
42
- render() {
43
- if (this.mode == "icon") {
44
- return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled }, h("ez-icon", { class: "icon", href: this.image, size: this.getIconSize(), onClick: evt => {
45
- if (!this.enabled)
46
- evt.stopPropagation();
47
- } })));
48
- }
49
- else if (this.mode == "label-icon") {
50
- return (h("div", { class: "label-icon" }, h("button", { class: "icon", type: "button", disabled: !this.enabled }, h("ez-icon", { class: "icon", href: this.image, size: "large", onClick: evt => {
51
- if (!this.enabled)
52
- evt.stopPropagation();
53
- } })), h("label", { title: this.label }, this.label)));
54
- }
55
- else if (this.mode == "link") {
56
- return (h("a", null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
57
- }
58
- else {
59
- return (h("button", { type: "button", disabled: !this.enabled }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
60
- }
61
- }
62
- };
63
- EzButton.style = ezButtonCss;
64
-
65
- const ezCheckCss = ":host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:20px;--ez-switch--pin--height:20px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--checked--background-color:var(--color--primary-300);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-secondary);--ez-switch--pin--checked--background-color:var(--color--primary);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regularMode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.regularMode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regularMode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regularMode:disabled{cursor:auto;background:none}input.regularMode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regularMode:disabled::before{border:var(--ez-check--disabled--border)}input.regularMode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regularMode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regularMode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regularMode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regularMode:checked::after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regularMode:checked:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switchMode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:none;transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switchMode:disabled{background-color:var(--ez-switch--disabled--background-color)}input.switchMode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transform:translateY(-3px);border-radius:50%;width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switchMode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color)}input.switchMode:checked{transition:background-color var(--transition);background-color:var(--ez-switch--checked--background-color)}input.switchMode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width))/2);background-color:var(--ez-switch--pin--focus--background-color)}input.switchMode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switchMode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width)))}input.switchMode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-3px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color)}input.switchMode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);text-shadow:var(--text-shadow);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}";
66
-
67
- let EzCheck = class {
68
- constructor(hostRef) {
69
- registerInstance(this, hostRef);
70
- this.ezChange = createEvent(this, "ezChange", 7);
71
- /**
72
- * Deixa o campo disponível ou não para interação com o usuário.
73
- */
74
- this.enabled = true;
75
- /**
76
- * Existem dois modos de visualização: regular e switch.
77
- * Se esta propriedade for omitida, o componete assume o formato "regular".
78
- * No modo "regular" a visualização é a tradicional de uma caixinha marcada/desmarcada.
79
- * No modo "switch" o campo tem uma interface em formato de um pino liga/desliga.
80
- */
81
- this.mode = "regular";
82
- }
83
- adjustMode() {
84
- if (this.mode === "switch") {
85
- this._inputElem.classList.remove("regularMode");
86
- this._inputElem.classList.add("switchMode");
87
- }
88
- else {
89
- this._inputElem.classList.remove("switchMode");
90
- this._inputElem.classList.add("regularMode");
91
- }
92
- }
93
- //---------------------------------------------
94
- // Public methods
95
- //---------------------------------------------
96
- /**
97
- * Devolve o modo escolhido para o componente
98
- */
99
- async getMode() {
100
- return this.mode;
101
- }
102
- /**
103
- * Faz o foco no componente de input
104
- */
105
- async setFocus() {
106
- this._inputElem.focus();
107
- }
108
- componentDidLoad() {
109
- this.adjustMode();
110
- }
111
- changeValue() {
112
- this.value = !this.value;
113
- this.ezChange.emit(this.value);
114
- }
115
- getLabelClasses() {
116
- let classes = "label";
117
- if (!this.enabled) {
118
- classes += " label--disabled";
119
- }
120
- return classes;
121
- }
122
- render() {
123
- return (h(Host, null, h("input", { type: "checkbox", class: "regularMode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }), this.label ? h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
124
- }
125
- static get watchers() { return {
126
- "mode": ["adjustMode"]
127
- }; }
128
- };
129
- EzCheck.style = ezCheckCss;
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-077c7fcf.js';
2
+ import { c as createCommonjsModule, b as commonjsGlobal, A as Action } from './index-afe19542.js';
3
+ import { g as getSpritePath } from './AssetsUtils-76ca41e1.js';
130
4
 
131
5
  var agGridCommunity_cjs = createCommonjsModule(function (module, exports) {
132
6
 
@@ -110363,60 +110237,6 @@ class AgGridController {
110363
110237
  }
110364
110238
  }
110365
110239
 
110366
- /**
110367
- * Classe com utiliários comuns para Strings.
110368
- */
110369
- class StringUtils {
110370
- /**
110371
- * Verifica se a string está vazia.
110372
- * Valores null e undefined são considerados como vazio.
110373
- *
110374
- * @param value String para ser validada.
110375
- */
110376
- static isEmpty(value) {
110377
- if (value == undefined || value === null) {
110378
- return true;
110379
- }
110380
- value = value.toString();
110381
- value = value.trim();
110382
- if (value.length === 0) {
110383
- return true;
110384
- }
110385
- return false;
110386
- }
110387
- /**
110388
- * Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta.
110389
- *
110390
- * @param value String para ser transformada.
110391
- */
110392
- static replaceAccentuatedChars(text) {
110393
- text = text.toUpperCase();
110394
- text = text.replace(/[À]/, "A");
110395
- text = text.replace(/[Á]/, "A");
110396
- text = text.replace(/[Â]/, "A");
110397
- text = text.replace(/[Ã]/, "A");
110398
- text = text.replace(/[Ä]/, "A");
110399
- text = text.replace(/[È]/, "E");
110400
- text = text.replace(/[É]/, "E");
110401
- text = text.replace(/[Ê]/, "E");
110402
- text = text.replace(/[Ë]/, "E");
110403
- text = text.replace(/[Ì]/, "I");
110404
- text = text.replace(/[Í]/, "I");
110405
- text = text.replace(/[Î]/, "I");
110406
- text = text.replace(/[Ï]/, "I");
110407
- text = text.replace(/[Ò]/, "O");
110408
- text = text.replace(/[Ó]/, "O");
110409
- text = text.replace(/[Ô]/, "O");
110410
- text = text.replace(/[Ö]/, "O");
110411
- text = text.replace(/[Ù]/, "U");
110412
- text = text.replace(/[Ú]/, "U");
110413
- text = text.replace(/[Û]/, "U");
110414
- text = text.replace(/[Ü]/, "U");
110415
- text = text.replace(/[Ç]/, "C");
110416
- return text.replace(/[^a-z0-9]/gi, '');
110417
- }
110418
- }
110419
-
110420
110240
  class DataUnitBridge {
110421
110241
  constructor(gridController, dataUnit) {
110422
110242
  this._gridController = gridController;
@@ -110548,1210 +110368,4 @@ let EzGrid = class {
110548
110368
  };
110549
110369
  EzGrid.style = ezGridCss;
110550
110370
 
110551
- const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}";
110552
-
110553
- let EzIcon = class {
110554
- constructor(hostRef) {
110555
- registerInstance(this, hostRef);
110556
- /**
110557
- * Tamanho do ícone
110558
- */
110559
- this.size = 'medium';
110560
- }
110561
- isSprite() {
110562
- return this.href && this.href.indexOf('#') > -1;
110563
- }
110564
- render() {
110565
- return (h(Host, null, this.isSprite()
110566
- ?
110567
- h("svg", { class: this.size, role: "img" }, h("use", { xlinkHref: this.href }))
110568
- :
110569
- h("img", { class: this.size, src: this.href })));
110570
- }
110571
- };
110572
- EzIcon.style = ezIconCss;
110573
-
110574
- const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon__padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item__margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Sora\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item__border-radius:var(--border--radius-small, 6px);--ez-list__selected-item__background:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Sora\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group__overlay--font-family:var(--font-pattern, \"Sora\");--ez-list__group__overlay--font-size:var(--text--medium, 14px);--ez-list__group-container__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__group-container__scrollbar--width:var(--space--medium, 12px);--ez-list__group-container__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__draggable__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__draggable__scrollbar--width:var(--space--medium, 12px);--ez-list__draggable__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__draggable__icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}.draggable{display:flex;align-items:center;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:center;align-items:center}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%;padding-bottom:var(--space--small)}.draggable-list li{background-color:#fff;display:flex;margin:var(--ez-list__item__margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);height:32px}.over{border-top:1px dashed var(--ez-list__over--border--color)}.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(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--ez-list__icon--color);width:18px;height:18px;-webkit-mask-image:var(--ez-list__draggable__icon--image);mask-image:var(--ez-list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%}.group-name{font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom)}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar-track{background-color:#f0f2f5}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__group-container__scrollbar--background-color);border-radius:var(--ez-list__group-container__scrollbar--border-radius)}.group-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__group-container__scrollbar--width);max-width:var(--ez-list__group-container__scrollbar--width);min-width:var(--ez-list__group-container__scrollbar--width)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar-track{background-color:#f0f2f5}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.items-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.group-overlay{font-family:var(--ez-list__group__overlay--font-family);font-size:var(--ez-list__group__overlay--font-size);background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item__background);border-radius:var(--ez-list__selected-item__border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
110575
-
110576
- let EzList = class {
110577
- constructor(hostRef) {
110578
- registerInstance(this, hostRef);
110579
- this.ezChange = createEvent(this, "ezChange", 7);
110580
- this._listItems = [];
110581
- this._listGroupItems = [];
110582
- this._listItemsHistory = [];
110583
- /**
110584
- * Define a lista inicial do componente.
110585
- */
110586
- this.dataSource = [];
110587
- /**
110588
- * Define se o componente renderizará os itens separados em grupos..
110589
- */
110590
- this.useGroups = false;
110591
- /**
110592
- * Define se o componente terá o comportamento de arrasto de linhas.
110593
- */
110594
- this.ezDraggable = false;
110595
- /**
110596
- * Define se os items da lista serão selecionáveis.
110597
- */
110598
- this.ezSelectable = false;
110599
- }
110600
- createList() {
110601
- if (this.useGroups) {
110602
- let list = [...this.dataSource];
110603
- list.forEach(itemGroup => {
110604
- this.sortGroup(itemGroup);
110605
- });
110606
- this._listGroupItems = list;
110607
- }
110608
- else {
110609
- this._listItems = this._listItemsHistory.length > 0 ? this._listItemsHistory : [...this.dataSource];
110610
- }
110611
- }
110612
- sortGroup(itemGroup) {
110613
- if (itemGroup.sort) {
110614
- itemGroup.items.sort(function (a, b) {
110615
- return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
110616
- });
110617
- if (itemGroup.sort === "DSC") {
110618
- itemGroup.items.reverse();
110619
- }
110620
- }
110621
- }
110622
- /**
110623
- * Recebe como argumento um ListItem {label: string} e um booleano que define se o componente deve fazer scroll para exibir o item específico (opcional).
110624
- */
110625
- async setSelection(selectedItem, scrollToOption) {
110626
- if (selectedItem && this.ezSelectable) {
110627
- if (this.useGroups) {
110628
- let newList = [...this._listGroupItems];
110629
- newList.forEach(groupItem => {
110630
- groupItem.items.forEach(item => {
110631
- if (item.label == selectedItem.label) {
110632
- item.selected = !item.selected;
110633
- }
110634
- else {
110635
- item.selected = false;
110636
- }
110637
- });
110638
- });
110639
- this._listGroupItems = newList;
110640
- }
110641
- else {
110642
- let newList = [...this._listItems];
110643
- newList.forEach(item => {
110644
- if (item.label === selectedItem.label) {
110645
- item.selected = !item.selected;
110646
- }
110647
- else {
110648
- item.selected = false;
110649
- }
110650
- });
110651
- this._listItems = newList;
110652
- }
110653
- if (scrollToOption) {
110654
- let liElem = this.useGroups ?
110655
- this._groupContainer.querySelector('li#item_' + this.getItemId(selectedItem.label))
110656
- : this._itemContainer.querySelector('li#item_' + this.getItemId(selectedItem.label));
110657
- if (liElem) {
110658
- liElem.scrollIntoView();
110659
- }
110660
- }
110661
- }
110662
- else {
110663
- this.removeSelection();
110664
- }
110665
- }
110666
- removeSelection() {
110667
- if (this.useGroups) {
110668
- let newList = [...this._listGroupItems];
110669
- newList.forEach(groupItem => {
110670
- groupItem.items.forEach(item => {
110671
- item.selected = false;
110672
- });
110673
- });
110674
- this._listGroupItems = newList;
110675
- }
110676
- else {
110677
- let newList = [...this._listItems];
110678
- newList.forEach(item => {
110679
- item.selected = false;
110680
- });
110681
- this._listItems = newList;
110682
- }
110683
- }
110684
- /**
110685
- * Retorna o item selecionado.
110686
- */
110687
- async getSelection() {
110688
- let selectedItem;
110689
- if (this.useGroups) {
110690
- this._listGroupItems.every(group => {
110691
- let item = group.items.find((item) => item.selected == true);
110692
- if (item) {
110693
- selectedItem = item;
110694
- return false;
110695
- }
110696
- return true;
110697
- });
110698
- }
110699
- else {
110700
- selectedItem = this._listItems.find((item) => item.selected == true);
110701
- }
110702
- return selectedItem;
110703
- }
110704
- /**
110705
- * Retorna a lista de items conforme o modo de uso.
110706
- */
110707
- async getList() {
110708
- if (this.useGroups) {
110709
- return this._listGroupItems;
110710
- }
110711
- return this._listItems;
110712
- }
110713
- componentWillLoad() {
110714
- this._listItemsHistory = [];
110715
- }
110716
- componentWillRender() {
110717
- this.createList();
110718
- }
110719
- onDrop(ev, dragEndItem) {
110720
- this.removeOverClass(ev);
110721
- this.setSelection(undefined);
110722
- if (this._dragStartItem) {
110723
- if (this.useGroups) {
110724
- let newList = [...this._listGroupItems];
110725
- let groupEnd = this._listGroupItems.find(group => dragEndItem.groupName == group.group);
110726
- //Remove item arrastado
110727
- newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
110728
- //Adiciona item arrastado
110729
- if (groupEnd.sort) {
110730
- newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
110731
- newList.find(group => group.group == dragEndItem.groupName).items.sort(function (a, b) {
110732
- return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
110733
- });
110734
- if (groupEnd.sort === "DSC") {
110735
- newList.find(group => group.group == dragEndItem.groupName).items.reverse();
110736
- }
110737
- }
110738
- else {
110739
- newList.find(group => group.group == dragEndItem.groupName).items.splice(dragEndItem.index, 0, this._dragStartItem.item);
110740
- }
110741
- this._listGroupItems = newList;
110742
- this.ezChange.emit(this._listGroupItems);
110743
- }
110744
- else {
110745
- let newList = [...this._listItems];
110746
- newList.splice(this._dragStartItem.index, 1);
110747
- newList.splice(dragEndItem.index, 0, this._dragStartItem.item);
110748
- this._listItems = newList;
110749
- this._listItemsHistory = newList;
110750
- this.ezChange.emit(this._listItems);
110751
- }
110752
- }
110753
- ev.stopPropagation();
110754
- }
110755
- onDropGroup(groupSelected) {
110756
- var _a;
110757
- let newList = [...this._listGroupItems];
110758
- this.setSelection(undefined);
110759
- let newGroup = newList.find(group => group.group === groupSelected.group);
110760
- if (newGroup) {
110761
- if (((_a = newGroup.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
110762
- let newItem;
110763
- newGroup.items.forEach((item, index) => {
110764
- if (item.label === this._dragStartItem.item.label) {
110765
- newItem = { item: item, index: index };
110766
- }
110767
- });
110768
- if (newItem) {
110769
- newGroup.items.splice(newItem.index, 1);
110770
- newGroup.items.unshift(newItem.item);
110771
- this.sortGroup(newGroup);
110772
- }
110773
- else {
110774
- newGroup.items.unshift(this._dragStartItem.item);
110775
- this.sortGroup(newGroup);
110776
- newList.find(group => group.group === this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
110777
- }
110778
- }
110779
- else {
110780
- newList.find(group => group.group === this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
110781
- newGroup.items = [this._dragStartItem.item];
110782
- }
110783
- this._listGroupItems = newList;
110784
- }
110785
- }
110786
- onDragEnd() {
110787
- this._dragStartItem = undefined;
110788
- if (this._draggingElement) {
110789
- try {
110790
- this._element.shadowRoot.removeChild(this._draggingElement);
110791
- }
110792
- catch (err) { }
110793
- this._draggingElement = undefined;
110794
- }
110795
- }
110796
- addOverClass(ev) {
110797
- if (ev.target.__proto__ == HTMLDivElement.prototype && ev.target.classList.contains("draggable")) {
110798
- ev.target.classList.add('over');
110799
- }
110800
- }
110801
- addOverGroupClass(ev, group) {
110802
- if (ev.target) {
110803
- let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
110804
- if (group.items.length > 0) {
110805
- let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
110806
- groupOverlay.setAttribute("style", "display:grid");
110807
- }
110808
- else {
110809
- groupContainer === null || groupContainer === void 0 ? void 0 : groupContainer.classList.add('overGroup');
110810
- }
110811
- }
110812
- }
110813
- removeOverClass(ev) {
110814
- ev.target.classList.remove('over');
110815
- }
110816
- removeOverGroupClass(ev, group) {
110817
- if (ev.target) {
110818
- let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
110819
- if (group.items.length > 0) {
110820
- let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
110821
- groupOverlay.setAttribute("style", "display:none");
110822
- }
110823
- else {
110824
- groupContainer === null || groupContainer === void 0 ? void 0 : groupContainer.classList.remove('overGroup');
110825
- }
110826
- }
110827
- }
110828
- onDragStart(event, item, group, index) {
110829
- if (this.useGroups) {
110830
- this._dragStartItem = { groupName: group.group, item: item, index: index };
110831
- }
110832
- else {
110833
- this._dragStartItem = { item: item.item, index: item.index };
110834
- }
110835
- let sourceElement = event.srcElement.cloneNode(true);
110836
- this._draggingElement = event.srcElement.cloneNode(true);
110837
- this._draggingElement.style.position = "absolute";
110838
- this._draggingElement.style.top = (event.clientY + 5) + 'px';
110839
- this._draggingElement.style.left = (event.clientX + 5) + 'px';
110840
- this._draggingElement.style.height = event.srcElement.clientHeight + 'px';
110841
- this._draggingElement.style.width = event.srcElement.clientWidth + 'px';
110842
- this._draggingElement.style.background = "#FFFFFF";
110843
- this._draggingElement.style.border = "1px solid #008561";
110844
- this._draggingElement.style["box-sizing"] = "border-box";
110845
- this._draggingElement.style["box-shadow"] = "0px 0px 16px rgba(0, 38, 111, 0.122)";
110846
- this._draggingElement.style["border-radius"] = "6px";
110847
- this._element.shadowRoot.appendChild(this._draggingElement);
110848
- event.dataTransfer.setDragImage(sourceElement, -10000, -10000);
110849
- }
110850
- onDrag(event) {
110851
- if (this._draggingElement) {
110852
- this._draggingElement.style.top = (event.clientY + 5) + 'px';
110853
- this._draggingElement.style.left = (event.clientX + 5) + 'px';
110854
- }
110855
- }
110856
- selectFirstItem() {
110857
- if (this.useGroups) {
110858
- this.setSelection(this._listGroupItems[0].items[0]);
110859
- }
110860
- {
110861
- this.setSelection(this._listItems[0]);
110862
- }
110863
- }
110864
- nextOption(selectedItem) {
110865
- let nextItem = undefined;
110866
- if (this.useGroups) {
110867
- this._listGroupItems.every((group, groupIndex, listGroupItems) => {
110868
- let item = undefined;
110869
- let itemIndex = group.items.findIndex(item => item.label == selectedItem.label);
110870
- if (itemIndex != undefined && itemIndex != -1) {
110871
- if (itemIndex === group.items.length - 1) {
110872
- if (groupIndex + 1 <= listGroupItems.length - 1) {
110873
- item = { label: listGroupItems[groupIndex + 1].items[0].label };
110874
- }
110875
- }
110876
- else {
110877
- item = { label: group.items[itemIndex + 1].label };
110878
- }
110879
- }
110880
- if (item != undefined) {
110881
- nextItem = item;
110882
- return false;
110883
- }
110884
- return true;
110885
- });
110886
- }
110887
- else {
110888
- let itemIndex = this._listItems.findIndex(item => item.label === selectedItem.label);
110889
- if (itemIndex >= 0 && itemIndex < this._listItems.length) {
110890
- nextItem = this._listItems[itemIndex + 1];
110891
- }
110892
- }
110893
- this.setSelection(nextItem, true);
110894
- }
110895
- previousOption(selectedItem) {
110896
- let previousItem = undefined;
110897
- if (this.useGroups) {
110898
- this._listGroupItems.every((group, groupIndex, listGroupItems) => {
110899
- let item = undefined;
110900
- let itemIndex = group.items.findIndex(item => item.label == selectedItem.label);
110901
- if (itemIndex != undefined && itemIndex != -1) {
110902
- if (itemIndex === 0) {
110903
- if ((groupIndex - 1 >= 0)) {
110904
- item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
110905
- }
110906
- }
110907
- else {
110908
- item = { label: group.items[itemIndex - 1].label };
110909
- }
110910
- }
110911
- if (item != undefined) {
110912
- previousItem = item;
110913
- return false;
110914
- }
110915
- return true;
110916
- });
110917
- }
110918
- else {
110919
- let itemIndex = this._listItems.findIndex(item => item.label === selectedItem.label);
110920
- if (itemIndex > 0 && itemIndex < this._listItems.length) {
110921
- previousItem = this._listItems[itemIndex - 1];
110922
- }
110923
- }
110924
- this.setSelection(previousItem, true);
110925
- }
110926
- keyDownHandler(event) {
110927
- event.preventDefault();
110928
- this.getSelection().then(selectedItem => {
110929
- if (selectedItem) {
110930
- switch (event.key) {
110931
- case "ArrowDown":
110932
- this.nextOption(selectedItem);
110933
- break;
110934
- case "ArrowUp":
110935
- this.previousOption(selectedItem);
110936
- break;
110937
- }
110938
- }
110939
- else {
110940
- this.selectFirstItem();
110941
- }
110942
- });
110943
- event.stopPropagation();
110944
- }
110945
- getItemId(itemLabel) {
110946
- if (itemLabel) {
110947
- return itemLabel.replace(/[^a-z0-9_]/gi, "_");
110948
- }
110949
- return undefined;
110950
- }
110951
- getDivGroupId(groupName) {
110952
- if (groupName) {
110953
- return "group-" + groupName.replace(/[^a-z0-9_]/gi, "_");
110954
- }
110955
- return undefined;
110956
- }
110957
- onDragOverGroup(event, group) {
110958
- if (this._dragStartItem && this._dragStartItem.groupName !== group.group) {
110959
- event.preventDefault();
110960
- this.addOverGroupClass(event, group);
110961
- }
110962
- }
110963
- onDragOverItem(event, group) {
110964
- if (this._dragStartItem) {
110965
- event.preventDefault();
110966
- if (group) {
110967
- group.sort ?
110968
- () => {
110969
- this.addOverGroupClass(event, group);
110970
- }
110971
- : this.addOverClass(event);
110972
- }
110973
- else {
110974
- this.addOverClass(event);
110975
- }
110976
- event.stopPropagation();
110977
- }
110978
- }
110979
- render() {
110980
- return (h(Host, { ref: (el) => this._element = el }, this.useGroups ?
110981
- h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
110982
- return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDragLeave: (event) => { this.removeOverGroupClass(event, group); }, onDragEnd: (event) => { this.onDragEnd(); this.removeOverGroupClass(event, group); }, onDragOver: (event) => { this.onDragOverGroup(event, group); }, onDrop: () => this.onDropGroup(group) }, h("label", { class: "group-name", onDragLeave: (event) => { this.removeOverGroupClass(event, group); }, onDragOver: (event) => { this.onDragOverGroup(event, group); }, onDragEnd: (event) => { this.onDragEnd(); this.removeOverGroupClass(event, group); }, onDrop: () => this.onDropGroup(group) }, group.group), h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => {
110983
- return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: (event) => { group.sort ? undefined : this.removeOverClass(event); }, onDragEnd: () => this.onDragEnd(), onDragStart: (event) => this.onDragStart(event, item, group, index), onDragOver: (event) => this.onDragOverItem(event, group), onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index }), onDrag: (event) => this.onDrag(event), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
110984
- h("div", { class: "slot-item" }, this.itemSlotBuilder(item, group))
110985
- : undefined));
110986
- }))), h("div", { class: "group-overlay" }, h("div", { id: "overlay-text" }, h("b", null, "Mover"), " para ", group.group))));
110987
- }))
110988
- :
110989
- h("div", { class: "items-container", ref: (el) => this._itemContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, h("div", { class: "draggable-list" }, this._listItems.map((item, index) => {
110990
- return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: (event) => this.onDragStart(event, { item: item, index: index }), onClick: () => { this.setSelection(item); }, onDragLeave: event => this.removeOverClass(event), onDragOver: (event) => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDrop(event, { item: item, index: index }), onDrag: (event) => this.onDrag(event), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
110991
- h("div", null, this.itemSlotBuilder(item))
110992
- : undefined));
110993
- })))));
110994
- }
110995
- };
110996
- EzList.style = ezListCss;
110997
-
110998
- const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-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%}}";
110999
-
111000
- let EzModal = class {
111001
- constructor(hostRef) {
111002
- registerInstance(this, hostRef);
111003
- this.ezCloseModal = createEvent(this, "ezCloseModal", 7);
111004
- /**
111005
- * Controle de exibição do Modal
111006
- */
111007
- this.opened = true;
111008
- /**
111009
- * Define se o modal será fechado ao clicar ESC
111010
- */
111011
- this.closeEsc = false;
111012
- /**
111013
- * Define se o modal será fechado ao clicar fora do conteúdo.
111014
- */
111015
- this.closeOutsideClick = false;
111016
- this.handleKeyboardEvent = (ev) => {
111017
- if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
111018
- this.closeModal();
111019
- }
111020
- };
111021
- }
111022
- handleopenedChange() {
111023
- if (this.opened) {
111024
- document.addEventListener("keydown", this.handleKeyboardEvent);
111025
- }
111026
- else {
111027
- document.removeEventListener("keydown", this.handleKeyboardEvent);
111028
- }
111029
- }
111030
- closeModal() {
111031
- this.opened = false;
111032
- this.ezCloseModal.emit(this.opened);
111033
- }
111034
- componentDidLoad() {
111035
- this.handleopenedChange();
111036
- }
111037
- onMouseDownHandler(event) {
111038
- if (this.closeOutsideClick && event.target === this._overlay) {
111039
- this.closeModal();
111040
- }
111041
- }
111042
- render() {
111043
- const positionSufix = this.align === "left" ? "left" : "right";
111044
- return (h(Host, null, this.opened
111045
- ?
111046
- h("div", { class: "modal", onMouseDown: evt => this.onMouseDownHandler(evt) }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalSize}` }, h("slot", null))))
111047
- :
111048
- undefined));
111049
- }
111050
- static get watchers() { return {
111051
- "opened": ["handleopenedChange"]
111052
- }; }
111053
- };
111054
- EzModal.style = ezModalCss;
111055
-
111056
- const ezTabselectorCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--tabselector--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.midle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Sora, Algerian\");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:\"\";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}";
111057
-
111058
- let EzTabselector = class {
111059
- constructor(hostRef) {
111060
- registerInstance(this, hostRef);
111061
- this.ezChange = createEvent(this, "ezChange", 7);
111062
- this.setFocusedParam = (ev) => {
111063
- if (ev.key === "Enter") {
111064
- this.selectedIndex = this.focusedIndex;
111065
- this.focusedIndex = undefined;
111066
- this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
111067
- this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
111068
- ev.preventDefault();
111069
- this.setFocusedTab(this.selectedIndex);
111070
- }
111071
- else if (ev.key === "ArrowLeft" || ev.key === "ArrowRight") {
111072
- let operator = undefined;
111073
- if (ev.key === "ArrowLeft") {
111074
- operator = false;
111075
- }
111076
- else if (ev.key === "ArrowRight") {
111077
- operator = true;
111078
- }
111079
- else {
111080
- return;
111081
- }
111082
- if (this.focusedIndex === undefined) {
111083
- if (operator === false) {
111084
- this.focusedIndex = this.selectedIndex !== undefined ? (parseInt(this.selectedIndex) - 1).toString() : undefined;
111085
- }
111086
- else {
111087
- this.focusedIndex = this.selectedIndex !== undefined ? (parseInt(this.selectedIndex) + 1).toString() : undefined;
111088
- }
111089
- }
111090
- else {
111091
- if (operator === false) {
111092
- this.focusedIndex = (parseInt(this.focusedIndex) - 1).toString();
111093
- }
111094
- else {
111095
- this.focusedIndex = (parseInt(this.focusedIndex) + 1).toString();
111096
- }
111097
- }
111098
- if (parseInt(this.focusedIndex) < 0) {
111099
- this.focusedIndex = "0";
111100
- }
111101
- else if (parseInt(this.focusedIndex) > this._processedTabs.length - 1) {
111102
- this.focusedIndex = (this._processedTabs.length - 1).toString();
111103
- }
111104
- this.setFocusedBtn(true, this.focusedIndex);
111105
- this.setFocusedTab(this.focusedIndex);
111106
- this.ezChange.emit(this.selectedTab);
111107
- }
111108
- else if (ev.key === "Tab" || ev.key === "Escape") {
111109
- this.focusedIndex = undefined;
111110
- this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
111111
- this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
111112
- ev.preventDefault();
111113
- this.setFocusedTab(this.selectedIndex);
111114
- }
111115
- // this.setFocusedTab();
111116
- };
111117
- }
111118
- handleTabClick(tab, index) {
111119
- this.selectedIndex = index.toString();
111120
- this.focusedIndex = undefined;
111121
- this.selectedTab = tab;
111122
- this.ezChange.emit(this.selectedTab);
111123
- this.setFocusedBtn(false, this.selectedIndex);
111124
- }
111125
- componentWillRender() {
111126
- if (!this._processedTabs) {
111127
- this._processedTabs = [];
111128
- if (this.tabs) {
111129
- this.tabs.split(",").forEach((label) => {
111130
- label = label.trim();
111131
- this._processedTabs.push(new Tab(label, label));
111132
- });
111133
- }
111134
- this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
111135
- const tabKey = elem.getAttribute("tabKey");
111136
- const label = elem.getAttribute("label");
111137
- const t = new Tab(label, tabKey);
111138
- const content = elem.firstChild;
111139
- if (content) {
111140
- content.setAttribute("slot", "tab" + this._processedTabs.length);
111141
- this._hostElem.appendChild(content);
111142
- }
111143
- this._processedTabs.push(t);
111144
- });
111145
- }
111146
- }
111147
- handleSlotChange(ev) {
111148
- const slot = ev.target;
111149
- const content = slot.assignedElements()[0];
111150
- if (content) {
111151
- content.style.marginLeft = "6px";
111152
- }
111153
- }
111154
- scrollBackward() {
111155
- const container = this._scrollContainer;
111156
- if (container) {
111157
- container.scrollLeft -= container.clientWidth;
111158
- }
111159
- }
111160
- scrollFoward() {
111161
- const container = this._scrollContainer;
111162
- if (container) {
111163
- let lastTab = null;
111164
- container.querySelectorAll(".tab").forEach((tab) => {
111165
- if (tab.getBoundingClientRect().right < container.clientWidth) {
111166
- lastTab = tab;
111167
- }
111168
- });
111169
- container.scrollLeft = lastTab.offsetLeft + lastTab.offsetWidth;
111170
- }
111171
- }
111172
- componentDidRender() {
111173
- this.updateScroll();
111174
- }
111175
- updateScroll() {
111176
- const container = this._scrollContainer;
111177
- if (container) {
111178
- const { scrollWidth, clientWidth, scrollLeft } = container;
111179
- const remainingScroll = scrollWidth - clientWidth - Math.ceil(scrollLeft);
111180
- this._startHidden = container.scrollLeft > 0;
111181
- this._endHidden = remainingScroll > 0;
111182
- if (this._startHidden) {
111183
- this._backwardButton.classList.remove("hidden");
111184
- }
111185
- else {
111186
- this._backwardButton.classList.add("hidden");
111187
- }
111188
- if (this._endHidden) {
111189
- this._forwardButton.classList.remove("hidden");
111190
- }
111191
- else {
111192
- this._forwardButton.classList.add("hidden");
111193
- }
111194
- const classNames = ["", "startHidden", "endHidden", "midle"];
111195
- const currentClass = classNames[Number(this._startHidden) | Number(this._endHidden) << 1];
111196
- classNames.forEach((name) => {
111197
- if (name !== currentClass && container.classList.contains(name)) {
111198
- container.classList.remove(name);
111199
- }
111200
- });
111201
- if (currentClass && !container.classList.contains(currentClass)) {
111202
- container.classList.add(currentClass);
111203
- }
111204
- }
111205
- }
111206
- domScrollHandler() {
111207
- window.clearTimeout(this._scrollCallBack);
111208
- this._scrollCallBack = window.setTimeout(() => { this.updateScroll(); }, 200);
111209
- }
111210
- setFocusedTab(index) {
111211
- window.clearTimeout(this._scrollCallBackTest);
111212
- this._scrollCallBackTest = window.setTimeout(() => {
111213
- const tabtoscroll = this._scrollContainer.querySelector(`#tab${index}`);
111214
- tabtoscroll.scrollIntoView();
111215
- }, 200);
111216
- }
111217
- getTextWidth(text) {
111218
- if (this._textMesurement === undefined) {
111219
- this._textMesurement = this._hostElem.shadowRoot.ownerDocument.createElement("canvas");
111220
- }
111221
- const context = this._textMesurement.getContext("2d");
111222
- context.font = "14px Sora, Algerian";
111223
- return Math.min(220, 24 + context.measureText(text).width) + "px";
111224
- }
111225
- ;
111226
- setFocusedBtn(visible, parameter) {
111227
- const tabsButtons = this._scrollContainer.querySelectorAll(".tab");
111228
- tabsButtons.forEach((el) => {
111229
- el.classList.remove("is-focused");
111230
- if (el.id === "tab" + parameter && visible) {
111231
- el.classList.add("is-focused");
111232
- }
111233
- });
111234
- }
111235
- render() {
111236
- return (h(Host, null, h("button", { class: "backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }), h("div", { class: "scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev) }, this._processedTabs.map((tab, index) => {
111237
- const labelStyle = { "min-width": this.getTextWidth(tab.label) };
111238
- const tabId = "tab" + index;
111239
- const isSelected = index === parseInt(this.selectedIndex) || (this.selectedTab && tab.tabKey === this.selectedTab);
111240
- if (isSelected) {
111241
- this.selectedTab = tab.tabKey;
111242
- this.selectedIndex = index.toString();
111243
- }
111244
- return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab.tabKey, index), style: labelStyle }, h("span", { class: "tab-label", title: tab.label }, tab.label), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
111245
- })), h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
111246
- }
111247
- get _hostElem() { return getElement(this); }
111248
- };
111249
- class Tab {
111250
- constructor(label, tabKey) {
111251
- this.label = label;
111252
- this.tabKey = tabKey;
111253
- }
111254
- }
111255
- EzTabselector.style = ezTabselectorCss;
111256
-
111257
- const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--large, 500);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--alert-cold-800, #042EFF);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input.text--right{text-align:right}.message-box{display:flex;min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}";
111258
-
111259
- let EzTextInput = class {
111260
- constructor(hostRef) {
111261
- registerInstance(this, hostRef);
111262
- this.ezChange = createEvent(this, "ezChange", 7);
111263
- /**
111264
- * Deixa o campo disponível ou não para digitação.
111265
- */
111266
- this.enabled = true;
111267
- }
111268
- showError() {
111269
- const hasError = typeof this.errorMessage === "string" && this.errorMessage !== "";
111270
- if (hasError) {
111271
- this._inputElem.classList.add("hasError");
111272
- this._messageBoxElem.classList.add("hasError");
111273
- }
111274
- else {
111275
- this._inputElem.classList.remove("hasError");
111276
- this._messageBoxElem.classList.remove("hasError");
111277
- }
111278
- }
111279
- prepareMask() {
111280
- if (this.mask) {
111281
- if (this._maskFormatter == undefined) {
111282
- this._maskFormatter = new MaskFormatter(this.mask);
111283
- }
111284
- else {
111285
- this._maskFormatter.mask = this.mask;
111286
- }
111287
- }
111288
- }
111289
- updateInputValue() {
111290
- if (this._inputElem) {
111291
- this._inputElem.value = this.value;
111292
- }
111293
- this.handleChange();
111294
- this.errorMessage = "";
111295
- this.ezChange.emit(this.value);
111296
- this.adjustFloatingLabel();
111297
- }
111298
- adjustFloatingLabel() {
111299
- if (this.label && this._labelElem) {
111300
- if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
111301
- this._inputElem.classList.add("input--with--label");
111302
- }
111303
- const hasValue = this.value && this.value.toString().length > 0;
111304
- const containsFloatedClass = this._labelElem.classList.contains("input__label--floated");
111305
- if (hasValue || this.isFocused()) {
111306
- if (!containsFloatedClass) {
111307
- this._labelElem.classList.add("input__label--floated");
111308
- }
111309
- }
111310
- else {
111311
- if (containsFloatedClass) {
111312
- this._labelElem.classList.remove("input__label--floated");
111313
- }
111314
- }
111315
- }
111316
- }
111317
- isFocused() {
111318
- return this._hostElement.shadowRoot.activeElement !== null;
111319
- }
111320
- //---------------------------------------------
111321
- // Public methods
111322
- //---------------------------------------------
111323
- /**
111324
- * Faz o foco no componente de input
111325
- */
111326
- async setFocus() {
111327
- this._inputElem.focus();
111328
- }
111329
- /**
111330
- * Remove o foco no componente de input
111331
- */
111332
- async setBlur() {
111333
- this._inputElem.blur();
111334
- }
111335
- //---------------------------------------------
111336
- // Event handlers
111337
- //---------------------------------------------
111338
- handleFocusout() {
111339
- const value = this._inputElem.value;
111340
- if (value && this._maskFormatter) {
111341
- try {
111342
- this._inputElem.value = this._maskFormatter.format(value);
111343
- }
111344
- catch (e) {
111345
- this.errorMessage = e.message;
111346
- }
111347
- }
111348
- this.value = this._inputElem.value;
111349
- this.adjustFloatingLabel();
111350
- }
111351
- isValidValue(value) {
111352
- if (this.restrict) {
111353
- return Array.from(value).reduce((valid, c) => valid && this.restrict.indexOf(c) > -1, true);
111354
- }
111355
- return true;
111356
- }
111357
- handleChange() {
111358
- if (!this._inputElem) {
111359
- return;
111360
- }
111361
- const value = this._inputElem.value;
111362
- if (this.isValidValue(value)) {
111363
- this._lastValidValue = value;
111364
- }
111365
- else {
111366
- this._inputElem.value = this._lastValidValue === undefined ? "" : this._lastValidValue;
111367
- }
111368
- this.value = this._inputElem.value;
111369
- }
111370
- handleSlotChange(ev) {
111371
- const slot = ev.target;
111372
- const content = slot.assignedElements()[0];
111373
- if (content) {
111374
- content.style.position = "absolute";
111375
- content.style.display = "flex";
111376
- content.style.alignItems = "center";
111377
- content.style.justifyContent = "center";
111378
- content.style.overflow = "hidden";
111379
- content.style.top = "0px";
111380
- content.style.width = "var(--ez-text-input__icon--width)";
111381
- content.style.height = "var(--ez-text-input--height)";
111382
- if (slot.name == "leftIcon") {
111383
- content.style.left = "0px";
111384
- content.style.borderRadius = "var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)";
111385
- this._inputElem.classList.add("icon--left");
111386
- if (this._labelElem) {
111387
- this._labelElem.classList.add("input__label--left");
111388
- }
111389
- }
111390
- else if (slot.name == "rightIcon") {
111391
- content.style.right = "0px";
111392
- content.style.borderRadius = "0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0";
111393
- this._inputElem.classList.add("icon--right");
111394
- if (this._labelElem) {
111395
- this._labelElem.classList.add("input__label--right");
111396
- }
111397
- }
111398
- }
111399
- this.showError();
111400
- }
111401
- doFocus() {
111402
- if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
111403
- this._labelElem.classList.add("input__label--floated");
111404
- }
111405
- }
111406
- //---------------------------------------------
111407
- // Lifecycle web component
111408
- //---------------------------------------------
111409
- componentDidLoad() {
111410
- this.showError();
111411
- this.prepareMask();
111412
- this.adjustFloatingLabel();
111413
- }
111414
- componentWillLoad() {
111415
- this.prepareMask();
111416
- if (this.value) {
111417
- if (this._maskFormatter) {
111418
- try {
111419
- this.value = this._maskFormatter.format(this.value);
111420
- }
111421
- catch (e) {
111422
- this.errorMessage = e.message;
111423
- }
111424
- }
111425
- if (!this.isValidValue(this.value)) {
111426
- this._lastValidValue = "";
111427
- this.value = "";
111428
- }
111429
- }
111430
- }
111431
- render() {
111432
- return (h(Host, null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label ?
111433
- h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
111434
- : null, h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
111435
- }
111436
- get _hostElement() { return getElement(this); }
111437
- static get watchers() { return {
111438
- "errorMessage": ["showError"],
111439
- "mask": ["prepareMask"],
111440
- "value": ["updateInputValue"]
111441
- }; }
111442
- };
111443
- EzTextInput.style = ezTextInputCss;
111444
-
111445
- const gridConfigCss = ":host{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 14px);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium{padding-right:var(--space--medium)}ez-list{height:100%}.grid-config__footer{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden{display:none}.grid-config__main{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container{display:flex;justify-content:center;align-items:center}.subtitle{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size)}.title{display:flex;font-family:var(--ez-grid-config__title--font-family);margin:0;font-weight:var(--ez-grid-config__title--font-weight);line-height:1.3}.grid-config__main::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}";
111446
-
111447
- let GridConfig = class {
111448
- constructor(hostRef) {
111449
- registerInstance(this, hostRef);
111450
- this.configFinish = createEvent(this, "configFinish", 7);
111451
- this.configCancel = createEvent(this, "configCancel", 7);
111452
- this._columnListHistory = [];
111453
- this._orderListItems = [];
111454
- this._columListItems = [];
111455
- this.selectedTab = "Colunas";
111456
- this._selectedIndex = -1;
111457
- }
111458
- /* Creation Methods */
111459
- createOrderList() {
111460
- var _a;
111461
- let newList = [];
111462
- if (((_a = this._columnListHistory) === null || _a === void 0 ? void 0 : _a.length) > 0) {
111463
- this._columnListHistory.find(group => group.group === "Visíveis").items.forEach(column => {
111464
- let item = { label: column.label };
111465
- newList.push(item);
111466
- });
111467
- }
111468
- else {
111469
- this.columns.forEach(column => {
111470
- let item = { name: column.name, label: column.label };
111471
- if (!column.hidden) {
111472
- newList.push(item);
111473
- }
111474
- });
111475
- }
111476
- this._orderListItems = newList;
111477
- }
111478
- createColumnList() {
111479
- let visibleGroup = {
111480
- group: 'Visíveis',
111481
- items: [],
111482
- };
111483
- let hiddenGroup = {
111484
- group: 'Ocultas',
111485
- items: [],
111486
- sort: 'ASC'
111487
- };
111488
- this.columns.forEach(column => {
111489
- let item = { label: column.label };
111490
- if (column.hidden) {
111491
- hiddenGroup.items.push(item);
111492
- }
111493
- else {
111494
- visibleGroup.items.push(item);
111495
- }
111496
- });
111497
- if (this._columnListHistory.length <= 0) {
111498
- this._columListItems = [visibleGroup, hiddenGroup];
111499
- }
111500
- }
111501
- buildColumnListSlot(item, group) {
111502
- return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
111503
- }
111504
- buildOrderListSlot(item) {
111505
- let existingItem = this.columns.find(columnItem => columnItem.label === item.label);
111506
- return (h("div", null, h("select-box", { selectedOption: existingItem === null || existingItem === void 0 ? void 0 : existingItem.sort, key: 'select-box' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item); } })));
111507
- }
111508
- updateOrder(sortOrder, updatedItem) {
111509
- let newList = [...this.columns];
111510
- let newItem = newList.find(item => item.label === updatedItem.label);
111511
- if (newItem) {
111512
- newItem.sort = sortOrder;
111513
- }
111514
- this.columns = newList;
111515
- }
111516
- /* Actions Methods */
111517
- switchColumnGroup(ev, switchedItem) {
111518
- ev.stopPropagation();
111519
- let newList = [...this._columListItems];
111520
- if (ev.detail === true) {
111521
- let hiddenGroup = newList.find(group => group.group === "Ocultas");
111522
- let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
111523
- if (index >= 0) {
111524
- hiddenGroup.items.splice(index, 1);
111525
- }
111526
- let visibleGroup = newList.find(group => group.group === "Visíveis");
111527
- visibleGroup.items.push(switchedItem);
111528
- this._columListItems = newList;
111529
- this.createOrderList();
111530
- }
111531
- else if (ev.detail === false) {
111532
- let visibleGroup = newList.find(group => group.group === "Visíveis");
111533
- let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
111534
- if (index >= 0) {
111535
- visibleGroup.items.splice(index, 1);
111536
- }
111537
- let hiddenGroup = newList.find(group => group.group === "Ocultas");
111538
- hiddenGroup.items.push(switchedItem);
111539
- this._columListItems = newList;
111540
- this.createOrderList();
111541
- }
111542
- }
111543
- finish() {
111544
- let newColumnList = [];
111545
- this._columListItems.forEach(group => {
111546
- group.items.forEach(item => {
111547
- const baseColumn = this.columns.find(column => column.label === item.label);
111548
- let newColumnItem = Object.assign({}, baseColumn);
111549
- if (group.group === "Ocultas") {
111550
- newColumnItem.hidden = true;
111551
- }
111552
- else {
111553
- newColumnItem.hidden = false;
111554
- }
111555
- newColumnList.push(newColumnItem);
111556
- });
111557
- });
111558
- this._columnListHistory = [];
111559
- this.columns = newColumnList;
111560
- this.configFinish.emit(this.columns);
111561
- }
111562
- async locateColumn(evt, searchingText) {
111563
- var _a;
111564
- const hitEnter = evt.key === "Enter";
111565
- if (!searchingText) {
111566
- searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
111567
- }
111568
- let newSelected = -1;
111569
- if (this.selectedTab === "Ordenação") {
111570
- if (searchingText) {
111571
- const matchedIndexes = [];
111572
- let orderListDatasource;
111573
- await this._orderList.getList().then(listGroup => {
111574
- orderListDatasource = listGroup;
111575
- orderListDatasource.forEach((column, index) => {
111576
- if (this.compareWords(column, searchingText)) {
111577
- matchedIndexes.push(index);
111578
- }
111579
- });
111580
- });
111581
- if (matchedIndexes.length > 0) {
111582
- if (hitEnter) {
111583
- for (let j = 0; j < matchedIndexes.length; j++) {
111584
- if (matchedIndexes[j] > this._selectedIndex) {
111585
- newSelected = matchedIndexes[j];
111586
- break;
111587
- }
111588
- }
111589
- }
111590
- if (newSelected === -1) {
111591
- newSelected = matchedIndexes[0];
111592
- }
111593
- }
111594
- this._selectedIndex = newSelected;
111595
- let selectedColumn;
111596
- selectedColumn = orderListDatasource[newSelected];
111597
- if (selectedColumn) {
111598
- this._orderList.setSelection({ label: selectedColumn.label }, true);
111599
- }
111600
- else {
111601
- this._orderList.setSelection(undefined);
111602
- }
111603
- }
111604
- else {
111605
- this._orderList.setSelection(undefined);
111606
- }
111607
- }
111608
- else {
111609
- if (searchingText) {
111610
- const matchedIndexes = [];
111611
- this.columns.forEach((column, index) => {
111612
- if (this.compareWords(column, searchingText)) {
111613
- matchedIndexes.push(index);
111614
- }
111615
- });
111616
- if (matchedIndexes.length > 0) {
111617
- if (hitEnter) {
111618
- for (let j = 0; j < matchedIndexes.length; j++) {
111619
- if (matchedIndexes[j] > this._selectedIndex) {
111620
- newSelected = matchedIndexes[j];
111621
- break;
111622
- }
111623
- }
111624
- }
111625
- if (newSelected === -1) {
111626
- newSelected = matchedIndexes[0];
111627
- }
111628
- }
111629
- this._selectedIndex = newSelected;
111630
- let selectedColumn = this.columns[newSelected];
111631
- if (selectedColumn) {
111632
- this._columnList.setSelection({ label: selectedColumn.label }, true);
111633
- }
111634
- else {
111635
- this._columnList.setSelection(undefined);
111636
- }
111637
- }
111638
- else {
111639
- this._columnList.setSelection(undefined);
111640
- }
111641
- }
111642
- }
111643
- compareWords(column, searchingText) {
111644
- if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
111645
- return true;
111646
- }
111647
- return false;
111648
- }
111649
- closeConfig() {
111650
- this._columnListHistory = [];
111651
- this.configCancel.emit();
111652
- }
111653
- /* Handlers */
111654
- handleTabChange(ev) {
111655
- var _a;
111656
- if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
111657
- if (ev.target.selectedTab === "Ordenação") {
111658
- this._columnListHistory = this._columnList.dataSource;
111659
- this.createOrderList();
111660
- }
111661
- this.selectedTab = ev.target.selectedTab;
111662
- }
111663
- }
111664
- handleColumnListChange(ev) {
111665
- var _a;
111666
- if (ev.detail) {
111667
- let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
111668
- if (visibleItems) {
111669
- this._orderListItems = visibleItems;
111670
- }
111671
- }
111672
- }
111673
- componentWillRender() {
111674
- var _a;
111675
- if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
111676
- this.createColumnList();
111677
- this.createOrderList();
111678
- }
111679
- }
111680
- componentDidRender() {
111681
- var _a;
111682
- if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
111683
- this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
111684
- }
111685
- }
111686
- render() {
111687
- return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: '0', onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação" ? "" : "hidden", dataSource: this._orderListItems, ezSelectable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
111688
- }
111689
- static get assetsDirs() { return ["../assets"]; }
111690
- };
111691
- GridConfig.style = gridConfigCss;
111692
-
111693
- const selectBoxCss = "select{border:1px solid #DCE0E8;font-family:'Sora';border-radius:3px;outline:none;cursor:pointer}";
111694
-
111695
- let SelectBox = class {
111696
- constructor(hostRef) {
111697
- registerInstance(this, hostRef);
111698
- this.ezChange = createEvent(this, "ezChange", 7);
111699
- }
111700
- changeSelection() {
111701
- this.ezChange.emit(this._selectElem.value);
111702
- }
111703
- componentDidRender() {
111704
- if (this._selectElem) {
111705
- if (this.selectedOption) {
111706
- this._selectElem.value = this.selectedOption;
111707
- }
111708
- else {
111709
- this._selectElem.value = "na";
111710
- }
111711
- }
111712
- }
111713
- render() {
111714
- return (h("select", { ref: (el) => this._selectElem = el, onChange: () => { this.changeSelection(); } }, h("option", { value: "na" }, "N/A"), h("option", { value: "asc" }, "A-Z"), h("option", { value: "desc" }, "Z-A")));
111715
- }
111716
- static get assetsDirs() { return ["../assets"]; }
111717
- };
111718
- SelectBox.style = selectBoxCss;
111719
-
111720
- const testDuCss = ":host{display:block}";
111721
-
111722
- let TestDu = class {
111723
- constructor(hostRef) {
111724
- registerInstance(this, hostRef);
111725
- this._dataUnit = new DataUnit("duteste");
111726
- }
111727
- componentDidLoad() {
111728
- this._dataUnit.dataLoader = (_dataUnit, _sort, _filters) => {
111729
- return Promise.resolve([
111730
- { __record__id__: "registro1", CODPARC: 10, NOMEPARC: "Parceiro 10" },
111731
- { __record__id__: "registro2", CODPARC: 20, NOMEPARC: "Parceiro 20" }
111732
- ]);
111733
- };
111734
- this._dataUnit.metadata = {
111735
- name: "Parceiro",
111736
- label: "Parceiro",
111737
- fields: [
111738
- {
111739
- name: "CODPARC",
111740
- label: "Cód. Parceiro",
111741
- dataType: DataType.NUMBER
111742
- },
111743
- {
111744
- name: "NOMEPARC",
111745
- label: "Nome Parceiro",
111746
- dataType: DataType.TEXT
111747
- }
111748
- ]
111749
- };
111750
- }
111751
- render() {
111752
- return (h("section", { class: "padding--large" }, h("div", { class: "row margin-bottom--large" }, h("h1", { class: "title title--primary" }, "Formul\u00E1rios")), h("div", { class: "col col--sd-12", style: { height: "600px" } }, h("ez-grid", { dataUnit: this._dataUnit, "server-url": "https://www.ag-grid.com/example-assets/row-data.json", "multiple-selection": true, "page-size": "100" }))));
111753
- }
111754
- };
111755
- TestDu.style = testDuCss;
111756
-
111757
- export { EzButton as ez_button, EzCheck as ez_check, EzGrid as ez_grid, EzIcon as ez_icon, EzList as ez_list, EzModal as ez_modal, EzTabselector as ez_tabselector, EzTextInput as ez_text_input, GridConfig as grid_config, SelectBox as select_box, TestDu as test_du };
110371
+ export { EzGrid as ez_grid };