@sankhyalabs/ezui 0.0.0-feat-dev-KB-35645.1 → 0.0.0-feat-dev-KB-35645.2

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 (62) hide show
  1. package/dist/cjs/{CSSVarsUtils-b136a156.js → CSSVarsUtils-10c9d5b4.js} +13 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-card-item_3.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-combo-box.cjs.entry.js +7 -6
  5. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-form-view.cjs.entry.js +30 -13
  8. package/dist/cjs/ez-grid.cjs.entry.js +3 -3
  9. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-search.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-split-item.cjs.entry.js +10 -2
  12. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  13. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -0
  14. package/dist/collection/components/ez-combo-box/ez-combo-box.js +6 -5
  15. package/dist/collection/components/ez-form-view/ez-form-view.css +17 -1
  16. package/dist/collection/components/ez-form-view/ez-form-view.js +22 -5
  17. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
  18. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
  19. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +3 -3
  20. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
  21. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
  22. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +1 -1
  23. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
  24. package/dist/collection/components/ez-grid/ez-grid.css +4 -1
  25. package/dist/collection/components/ez-grid/ez-grid.js +1 -1
  26. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +8 -1
  27. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +5 -1
  28. package/dist/collection/utils/CSSVarsUtils.js +13 -0
  29. package/dist/custom-elements/index.js +57 -23
  30. package/dist/esm/{CSSVarsUtils-a97cfa29.js → CSSVarsUtils-71ce76be.js} +13 -0
  31. package/dist/esm/ez-actions-button.entry.js +1 -1
  32. package/dist/esm/ez-card-item_3.entry.js +1 -1
  33. package/dist/esm/ez-combo-box.entry.js +7 -6
  34. package/dist/esm/ez-date-input.entry.js +1 -1
  35. package/dist/esm/ez-date-time-input.entry.js +1 -1
  36. package/dist/esm/ez-form-view.entry.js +31 -14
  37. package/dist/esm/ez-grid.entry.js +3 -3
  38. package/dist/esm/ez-number-input.entry.js +1 -1
  39. package/dist/esm/ez-search.entry.js +1 -1
  40. package/dist/esm/ez-split-item.entry.js +10 -2
  41. package/dist/esm/ez-time-input.entry.js +1 -1
  42. package/dist/ezui/ezui.esm.js +1 -1
  43. package/dist/ezui/{p-e52cbcc7.entry.js → p-205cfb8f.entry.js} +1 -1
  44. package/dist/ezui/{p-055fd02c.entry.js → p-2eb8f73b.entry.js} +1 -1
  45. package/dist/ezui/{p-0521387a.entry.js → p-79bbf86d.entry.js} +1 -1
  46. package/dist/ezui/p-801fd0f8.entry.js +1 -0
  47. package/dist/ezui/p-807560f0.entry.js +1 -0
  48. package/dist/ezui/{p-eb36f072.entry.js → p-99ead599.entry.js} +1 -1
  49. package/dist/ezui/{p-7eb3e1a5.js → p-9e11fc7b.js} +1 -1
  50. package/dist/ezui/{p-672dd122.entry.js → p-9f1e89c9.entry.js} +1 -1
  51. package/dist/ezui/{p-50186acb.entry.js → p-af95cd16.entry.js} +1 -1
  52. package/dist/ezui/{p-18e7870d.entry.js → p-b567fa8c.entry.js} +1 -1
  53. package/dist/ezui/p-db77a984.entry.js +1 -0
  54. package/dist/ezui/{p-9cad9b6e.entry.js → p-e85c48d7.entry.js} +1 -1
  55. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -0
  56. package/dist/types/components/ez-form-view/ez-form-view.d.ts +3 -0
  57. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
  58. package/dist/types/utils/CSSVarsUtils.d.ts +1 -0
  59. package/package.json +1 -1
  60. package/dist/ezui/p-25ed09c6.entry.js +0 -1
  61. package/dist/ezui/p-60848ef6.entry.js +0 -1
  62. package/dist/ezui/p-e562d05e.entry.js +0 -1
@@ -66,6 +66,19 @@ class CSSVarsUtils {
66
66
  });
67
67
  }
68
68
  }
69
+ static applyVarsGrid(host, child) {
70
+ if (child) {
71
+ [
72
+ "--ez-grid--min-height",
73
+ "--snk-grid-min-height",
74
+ ].forEach(prop => {
75
+ const propValue = getComputedStyle(host).getPropertyValue(prop);
76
+ if (propValue !== null && propValue !== undefined) {
77
+ child.style.setProperty(prop, propValue);
78
+ }
79
+ });
80
+ }
81
+ }
69
82
  static applyIfExists(host, element, varName) {
70
83
  const prop = getComputedStyle(host).getPropertyValue(varName);
71
84
  if (prop) {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  require('./ApplicationUtils-c9d1205c.js');
8
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
8
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
11
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
8
8
 
9
9
  const ezCardItemCss = ":host {\n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--title--primary, #2B3A54);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n padding: 12px;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n cursor: pointer;\n justify-content: space-between;\n gap: var(--space--small, 6px);\n}\n\n.card-item__details-left {\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-right {\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail:not(:last-child) {\n cursor: pointer;\n white-space: pre-line;\n\n /*public*/\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item__detail-label--color);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item--color);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-left {\n width: 100%;\n }\n \n .card-item__details-right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
10
10
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  require('./ApplicationUtils-c9d1205c.js');
8
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
8
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
11
 
@@ -222,14 +222,15 @@ const EzComboBox = class {
222
222
  const upperCriteria = this._criteria.toUpperCase();
223
223
  opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
224
224
  }
225
- if (this.suppressEmptyOption) {
226
- this._visibleOptions = opts;
227
- }
228
- else {
229
- this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
225
+ if (this.hasToAddEmptyoption(opts)) {
226
+ opts = [{ value: undefined, label: "" }].concat(opts);
230
227
  }
228
+ this._visibleOptions = opts;
231
229
  this._maxWidthValue = this.getMaxWidthValue();
232
230
  }
231
+ hasToAddEmptyoption(opts) {
232
+ return !this.suppressEmptyOption && !opts.filter(opt => !opt.value).length;
233
+ }
233
234
  getMaxWidthValue() {
234
235
  var _a;
235
236
  if (this.showOptionValue) {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
8
8
 
9
9
  const ezDateInputCss = ":host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"15px\"><path d=\"M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z\"/></svg>')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}";
10
10
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
8
8
 
9
9
  const ezDateTimeInputCss = ":host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"15px\"><path d=\"M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z\"/></svg>')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}";
10
10
 
@@ -14,7 +14,7 @@ const buildCheckBox = (field) => {
14
14
  return buildField(field.name, field.label, field.readOnly, field.contextName, false);
15
15
  };
16
16
  function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
17
- return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
17
+ return (index.h("div", { class: "ez-col ez-col--sd-12 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
18
18
  index.h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.CheckMode.SWITCH : CheckMode.CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
19
19
  }
20
20
 
@@ -28,20 +28,20 @@ const buildComboBox = ({ name, label, readOnly, required, props, contextName, ca
28
28
  else {
29
29
  options = prop;
30
30
  }
31
- return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
31
+ return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
32
32
  index.h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
33
33
  };
34
34
 
35
35
  const buildDate = ({ name, label, readOnly, canShowError }) => {
36
- return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
36
+ return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
37
37
  index.h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
38
38
  };
39
39
  const buildTime = ({ name, label, readOnly, canShowError }) => {
40
- return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
40
+ return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
41
41
  index.h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
42
42
  };
43
43
  const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) => {
44
- return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
44
+ return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
45
45
  index.h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
46
46
  };
47
47
 
@@ -67,12 +67,12 @@ const buildInteger = ({ name, label, readOnly, contextName, canShowError }) => {
67
67
  return buildNumeric(name, label, readOnly, 0, 0, contextName, canShowError);
68
68
  };
69
69
  function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
70
- return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
70
+ return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
71
71
  index.h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
72
72
  }
73
73
 
74
74
  const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
75
- return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
75
+ return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
76
76
  index.h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
77
77
  };
78
78
 
@@ -82,7 +82,7 @@ const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError
82
82
  };
83
83
 
84
84
  const buildTextInput = ({ name, label, readOnly, contextName, canShowError }) => {
85
- return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
85
+ return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
86
86
  index.h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
87
87
  };
88
88
 
@@ -142,7 +142,7 @@ class FormItems {
142
142
  }
143
143
  }
144
144
 
145
- const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
145
+ const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-wrap:wrap;width:100%;--ez-form-view__item--min-width:220px;--ez-form-view__item--sapce-width:5px}.form-view__content.sc-ez-form-view{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));gap:var(--ez-form-view__item--sapce-width);width:100%}.input-full_width.sc-ez-form-view{grid-column:1 / -1;width:100%}";
146
146
 
147
147
  const EzFormView = class {
148
148
  constructor(hostRef) {
@@ -177,19 +177,36 @@ const EzFormView = class {
177
177
  const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
178
178
  this.formItemsReady.emit(formItems);
179
179
  }
180
+ isItemFullWidth(userInterface) {
181
+ return [
182
+ core.UserInterface.FILE,
183
+ core.UserInterface.LONGTEXT
184
+ ].includes(userInterface);
185
+ }
186
+ buildFormItemElement(item, classItem = "") {
187
+ if (this.isItemFullWidth(item.userInterface)) {
188
+ classItem += " input-full_width";
189
+ }
190
+ return index.h("div", { class: classItem }, fieldBuilder(item));
191
+ }
180
192
  render() {
181
193
  core.ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
182
194
  if (this.fields == undefined) {
183
195
  return;
184
196
  }
185
- return (index.h(index.Host, null, Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
197
+ let nonArrayGrup = [];
198
+ let formContent = Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
186
199
  if (Array.isArray(value)) {
187
- return (index.h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, value.map(fi => fieldBuilder(fi))));
200
+ return (index.h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, index.h("div", { class: "form-view__content" }, value.map(fi => (this.buildFormItemElement(fi))))));
188
201
  }
189
202
  else {
190
- return fieldBuilder(value);
203
+ nonArrayGrup.push(value);
191
204
  }
192
- })));
205
+ });
206
+ // Filtra os elementos que não são arrays e os coloca dentro de uma única div
207
+ let nonArrayElements = nonArrayGrup.map((value) => this.buildFormItemElement(value));
208
+ let groupedNonArrayElements = index.h("div", { class: "form-view__content" }, nonArrayElements);
209
+ return (index.h(index.Host, null, groupedNonArrayElements, formContent));
193
210
  }
194
211
  get _element() { return index.getElement(this); }
195
212
  };
@@ -120255,7 +120255,7 @@ class AgGridController {
120255
120255
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
120256
120256
  },
120257
120257
  valueFormatter: params => {
120258
- if (params.value == undefined) {
120258
+ if (params.value === undefined) {
120259
120259
  return "";
120260
120260
  }
120261
120261
  if (params.value instanceof Promise) {
@@ -120637,7 +120637,7 @@ class InMemoryFilterColumnDataSource {
120637
120637
  }
120638
120638
  }
120639
120639
 
120640
- const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;min-height:300px;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-row-start:1;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}.grid-header__pagination-label.sc-ez-grid{width:100%;white-space:nowrap}";
120640
+ const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%);--ez-grid--min-height:300px;min-height:var(--ez-grid--min-height)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-row-start:1;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}.grid-header__pagination-label.sc-ez-grid{width:100%;white-space:nowrap}";
120641
120641
 
120642
120642
  const windowInstace = window;
120643
120643
  const matches = (text, filter) => {
@@ -120894,7 +120894,7 @@ const EzGrid = class {
120894
120894
  const { currentPage, hasMore } = this._paginationInfo;
120895
120895
  return [
120896
120896
  index.h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, index.h("span", { class: "grid-header__pagination-label" }, index.h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this._getRemainingPageLabel())),
120897
- index.h("div", { ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, index.h("ez-button", { size: "small", class: "ez-margin-right--medium", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), index.h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })),
120897
+ index.h("div", { ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, index.h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), index.h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })),
120898
120898
  ];
120899
120899
  }
120900
120900
  return null;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
8
8
 
9
9
  const ezNumberInputCss = ":host{display:block;width:100%}.number__input{height:100%}";
10
10
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
6
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
7
7
  const core = require('@sankhyalabs/core');
8
8
  const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
9
9
  require('./DialogType-2114c337.js');
@@ -3,8 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
+ require('./ApplicationUtils-c9d1205c.js');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
8
+ require('./DialogType-2114c337.js');
9
+ require('./CheckMode-ecb90b87.js');
10
+ require('@sankhyalabs/core');
6
11
 
7
- const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}";
12
+ const ezSplitItemCss = "ez-split-item{--snk-grid-min-height:0;--ez-grid--min-height:0}.box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}";
8
13
 
9
14
  const SplitItem = class {
10
15
  constructor(hostRef) {
@@ -20,8 +25,11 @@ const SplitItem = class {
20
25
  toggleExpandItem() {
21
26
  this._expanded = !this._expanded;
22
27
  }
28
+ componentDidLoad() {
29
+ CSSVarsUtils.CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
30
+ }
23
31
  render() {
24
- return (index.h(index.Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, index.h("div", { class: "ez-split-item--header" }, index.h("div", null, this.label && (index.h("div", { class: "ez-margin--small" }, index.h("h3", { class: " ez-title ez-title--small" }, this.label)))), index.h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (index.h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), index.h("slot", { name: "rightButtons" }))), index.h("div", { class: "ez-split-item--content" }, index.h("slot", null))));
32
+ return (index.h(index.Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, index.h("div", { class: "ez-split-item--header" }, index.h("div", null, this.label && (index.h("div", { class: "ez-margin--small" }, index.h("h3", { class: " ez-title ez-title--small" }, this.label)))), index.h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (index.h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), index.h("slot", { name: "rightButtons" }))), index.h("div", { class: "ez-split-item--content", ref: el => (this._slot = el) }, index.h("slot", null))));
25
33
  }
26
34
  };
27
35
  SplitItem.style = ezSplitItemCss;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
8
8
 
9
9
  const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}.time__input{height:100%}";
10
10
 
@@ -207,6 +207,7 @@ ez-icon {
207
207
  /*private*/
208
208
  display: flex;
209
209
  flex-wrap: wrap;
210
+
210
211
  width: 100%;
211
212
  height: 0px;
212
213
  max-height: 0px;
@@ -210,14 +210,15 @@ export class EzComboBox {
210
210
  const upperCriteria = this._criteria.toUpperCase();
211
211
  opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
212
212
  }
213
- if (this.suppressEmptyOption) {
214
- this._visibleOptions = opts;
215
- }
216
- else {
217
- this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
213
+ if (this.hasToAddEmptyoption(opts)) {
214
+ opts = [{ value: undefined, label: "" }].concat(opts);
218
215
  }
216
+ this._visibleOptions = opts;
219
217
  this._maxWidthValue = this.getMaxWidthValue();
220
218
  }
219
+ hasToAddEmptyoption(opts) {
220
+ return !this.suppressEmptyOption && !opts.filter(opt => !opt.value).length;
221
+ }
221
222
  getMaxWidthValue() {
222
223
  var _a;
223
224
  if (this.showOptionValue) {
@@ -1,6 +1,22 @@
1
1
  :host {
2
2
  display: flex;
3
- flex-direction: row;
4
3
  flex-wrap: wrap;
5
4
  width: 100%;
5
+
6
+ /*@doc Define o tamanho mínimo dos itens do formulário.*/
7
+ --ez-form-view__item--min-width: 220px;
8
+ /*@doc Define o espaçamento entre itens do formulário.*/
9
+ --ez-form-view__item--sapce-width: 5px;
10
+ }
11
+
12
+ .form-view__content{
13
+ display: grid;
14
+ grid-template-columns: repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));
15
+ gap: var(--ez-form-view__item--sapce-width);
16
+ width: 100%;
17
+ }
18
+
19
+ .input-full_width {
20
+ grid-column: 1 / -1;
21
+ width: 100%;
6
22
  }
@@ -1,6 +1,6 @@
1
1
  import { Host, h } from '@stencil/core';
2
2
  import { fieldBuilder } from './fieldbuilder/FieldBuilder';
3
- import { ElementIDUtils } from '@sankhyalabs/core';
3
+ import { ElementIDUtils, UserInterface } from '@sankhyalabs/core';
4
4
  import { FormItems } from './structure';
5
5
  export class EzFormView {
6
6
  constructor() {
@@ -32,19 +32,36 @@ export class EzFormView {
32
32
  const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
33
33
  this.formItemsReady.emit(formItems);
34
34
  }
35
+ isItemFullWidth(userInterface) {
36
+ return [
37
+ UserInterface.FILE,
38
+ UserInterface.LONGTEXT
39
+ ].includes(userInterface);
40
+ }
41
+ buildFormItemElement(item, classItem = "") {
42
+ if (this.isItemFullWidth(item.userInterface)) {
43
+ classItem += " input-full_width";
44
+ }
45
+ return h("div", { class: classItem }, fieldBuilder(item));
46
+ }
35
47
  render() {
36
48
  ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
37
49
  if (this.fields == undefined) {
38
50
  return;
39
51
  }
40
- return (h(Host, null, Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
52
+ let nonArrayGrup = [];
53
+ let formContent = Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
41
54
  if (Array.isArray(value)) {
42
- return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, value.map(fi => fieldBuilder(fi))));
55
+ return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, h("div", { class: "form-view__content" }, value.map(fi => (this.buildFormItemElement(fi))))));
43
56
  }
44
57
  else {
45
- return fieldBuilder(value);
58
+ nonArrayGrup.push(value);
46
59
  }
47
- })));
60
+ });
61
+ // Filtra os elementos que não são arrays e os coloca dentro de uma única div
62
+ let nonArrayElements = nonArrayGrup.map((value) => this.buildFormItemElement(value));
63
+ let groupedNonArrayElements = h("div", { class: "form-view__content" }, nonArrayElements);
64
+ return (h(Host, null, groupedNonArrayElements, formContent));
48
65
  }
49
66
  static get is() { return "ez-form-view"; }
50
67
  static get encapsulation() { return "scoped"; }
@@ -7,5 +7,5 @@ export const buildCheckBox = (field) => {
7
7
  return buildField(field.name, field.label, field.readOnly, field.contextName, false);
8
8
  };
9
9
  function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
10
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" }, h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
10
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" }, h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
11
11
  }
@@ -9,5 +9,5 @@ export const buildComboBox = ({ name, label, readOnly, required, props, contextN
9
9
  else {
10
10
  options = prop;
11
11
  }
12
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
12
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
13
13
  };
@@ -1,10 +1,10 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildDate = ({ name, label, readOnly, canShowError }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
4
4
  };
5
5
  export const buildTime = ({ name, label, readOnly, canShowError }) => {
6
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
6
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
7
7
  };
8
8
  export const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) => {
9
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
9
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
10
10
  };
@@ -8,5 +8,5 @@ export const buildInteger = ({ name, label, readOnly, contextName, canShowError
8
8
  return buildNumeric(name, label, readOnly, 0, 0, contextName, canShowError);
9
9
  };
10
10
  function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
11
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
11
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
12
12
  }
@@ -1,4 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
4
4
  };
@@ -1,4 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildTextInput = ({ name, label, readOnly, contextName, canShowError }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
4
4
  };
@@ -612,7 +612,7 @@ export default class AgGridController {
612
612
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
613
613
  },
614
614
  valueFormatter: params => {
615
- if (params.value == undefined) {
615
+ if (params.value === undefined) {
616
616
  return "";
617
617
  }
618
618
  if (params.value instanceof Promise) {
@@ -4,7 +4,6 @@
4
4
  grid-template-rows: auto 1fr auto;
5
5
  height: 100%;
6
6
  width: 100%;
7
- min-height: 300px;
8
7
 
9
8
  /*public*/
10
9
  /*@doc Define a cor de fundo do header do componente.*/
@@ -13,6 +12,10 @@
13
12
  --ez-grid__selection-counter--z-index: var(--visible, 1);
14
13
  /*@doc Define o sombreamento usado como borda.*/
15
14
  --ez-grid__container--shadow: 0 0 16px 0 rgb(0 38 111 / 12%);
15
+ /*@doc Define altura mínima da grid */
16
+ --ez-grid--min-height: 300px;
17
+
18
+ min-height: var(--ez-grid--min-height);
16
19
  }
17
20
 
18
21
  .grid-header {
@@ -254,7 +254,7 @@ export class EzGrid {
254
254
  const { currentPage, hasMore } = this._paginationInfo;
255
255
  return [
256
256
  h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, h("span", { class: "grid-header__pagination-label" }, h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this._getRemainingPageLabel())),
257
- h("div", { ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, h("ez-button", { size: "small", class: "ez-margin-right--medium", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })),
257
+ h("div", { ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })),
258
258
  ];
259
259
  }
260
260
  return null;
@@ -1,3 +1,10 @@
1
+ ez-split-item {
2
+ /*@doc Define altura mínima da snk-grid */
3
+ --snk-grid-min-height: 0;
4
+ /*@doc Define altura mínima da grid */
5
+ --ez-grid--min-height: 0;
6
+ }
7
+
1
8
  .box_split-item {
2
9
  background-color: var(--background--xlight);
3
10
  width: 100%;
@@ -37,4 +44,4 @@
37
44
  .ez-split-item--content {
38
45
  display: block;
39
46
  height: 100%;
40
- }
47
+ }
@@ -1,4 +1,5 @@
1
1
  import { Host, h } from '@stencil/core';
2
+ import { CSSVarsUtils } from '../../../../utils';
2
3
  export class SplitItem {
3
4
  constructor() {
4
5
  this.label = undefined;
@@ -12,8 +13,11 @@ export class SplitItem {
12
13
  toggleExpandItem() {
13
14
  this._expanded = !this._expanded;
14
15
  }
16
+ componentDidLoad() {
17
+ CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
18
+ }
15
19
  render() {
16
- return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
20
+ return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content", ref: el => (this._slot = el) }, h("slot", null))));
17
21
  }
18
22
  static get is() { return "ez-split-item"; }
19
23
  static get originalStyleUrls() {
@@ -64,6 +64,19 @@ export default class CSSVarsUtils {
64
64
  });
65
65
  }
66
66
  }
67
+ static applyVarsGrid(host, child) {
68
+ if (child) {
69
+ [
70
+ "--ez-grid--min-height",
71
+ "--snk-grid-min-height",
72
+ ].forEach(prop => {
73
+ const propValue = getComputedStyle(host).getPropertyValue(prop);
74
+ if (propValue !== null && propValue !== undefined) {
75
+ child.style.setProperty(prop, propValue);
76
+ }
77
+ });
78
+ }
79
+ }
67
80
  static applyIfExists(host, element, varName) {
68
81
  const prop = getComputedStyle(host).getPropertyValue(varName);
69
82
  if (prop) {