@sankhyalabs/ezui 0.0.0-feat-dev-KB-32089.0 → 0.0.0-feat-dev-KB-32137.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 (102) hide show
  1. package/dist/cjs/ez-card-item.cjs.entry.js +52 -0
  2. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-combo-box.cjs.entry.js +156 -12
  4. package/dist/cjs/ez-date-input.cjs.entry.js +0 -3
  5. package/dist/cjs/ez-date-time-input.cjs.entry.js +0 -3
  6. package/dist/cjs/ez-filter-input_2.cjs.entry.js +137 -0
  7. package/dist/cjs/ez-form-view.cjs.entry.js +30 -13
  8. package/dist/cjs/ez-grid.cjs.entry.js +18 -17
  9. package/dist/cjs/ez-number-input.cjs.entry.js +0 -3
  10. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-search.cjs.entry.js +31 -611
  12. package/dist/cjs/ez-split-item.cjs.entry.js +2 -12
  13. package/dist/cjs/ez-split-panel.cjs.entry.js +14 -16
  14. package/dist/cjs/ezui.cjs.js +1 -1
  15. package/dist/cjs/filter-column.cjs.entry.js +5 -16
  16. package/dist/cjs/index-a7b0c73d.js +6 -2
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/collection/collection-manifest.json +3 -3
  19. package/dist/collection/components/ez-card-item/ez-card-item.css +0 -35
  20. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +27 -0
  21. package/dist/collection/components/ez-combo-box/ez-combo-box.js +174 -13
  22. package/dist/collection/components/ez-date-input/ez-date-input.js +0 -3
  23. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +0 -3
  24. package/dist/collection/components/ez-form-view/ez-form-view.css +40 -0
  25. package/dist/collection/components/ez-form-view/ez-form-view.js +22 -5
  26. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
  27. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
  28. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +3 -3
  29. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
  30. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
  31. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +1 -1
  32. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +10 -7
  33. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +8 -0
  34. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +1 -12
  35. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +3 -1
  36. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +5 -16
  37. package/dist/collection/components/ez-number-input/ez-number-input.js +0 -3
  38. package/dist/collection/components/ez-popup/ez-popup.css +1 -0
  39. package/dist/collection/components/ez-search/ez-search.css +0 -331
  40. package/dist/collection/components/ez-search/ez-search.js +55 -689
  41. package/dist/collection/components/ez-split-panel/ez-split-panel.css +14 -6
  42. package/dist/collection/components/ez-split-panel/ez-split-panel.js +22 -25
  43. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +12 -40
  44. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +2 -78
  45. package/dist/custom-elements/index.js +269 -716
  46. package/dist/esm/ez-card-item.entry.js +48 -0
  47. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  48. package/dist/esm/ez-combo-box.entry.js +157 -13
  49. package/dist/esm/ez-date-input.entry.js +0 -3
  50. package/dist/esm/ez-date-time-input.entry.js +0 -3
  51. package/dist/esm/ez-filter-input_2.entry.js +132 -0
  52. package/dist/esm/ez-form-view.entry.js +31 -14
  53. package/dist/esm/ez-grid.entry.js +18 -17
  54. package/dist/esm/ez-number-input.entry.js +0 -3
  55. package/dist/esm/ez-popup.entry.js +1 -1
  56. package/dist/esm/ez-search.entry.js +33 -613
  57. package/dist/esm/ez-split-item.entry.js +2 -12
  58. package/dist/esm/ez-split-panel.entry.js +14 -16
  59. package/dist/esm/ezui.js +1 -1
  60. package/dist/esm/filter-column.entry.js +5 -16
  61. package/dist/esm/index-baa5e267.js +6 -2
  62. package/dist/esm/loader.js +1 -1
  63. package/dist/ezui/ezui.esm.js +1 -1
  64. package/dist/ezui/p-05f5a778.entry.js +1 -0
  65. package/dist/ezui/p-24d3fede.entry.js +1 -0
  66. package/dist/ezui/p-50b036c0.entry.js +1 -0
  67. package/dist/ezui/{p-02c8831a.entry.js → p-51c5e071.entry.js} +1 -1
  68. package/dist/ezui/p-5613fe63.entry.js +1 -0
  69. package/dist/ezui/p-596634e9.entry.js +1 -0
  70. package/dist/ezui/{p-ab629244.entry.js → p-844ee673.entry.js} +1 -1
  71. package/dist/ezui/{p-07cbffce.entry.js → p-93c3df4f.entry.js} +1 -1
  72. package/dist/ezui/p-a32aaac6.entry.js +1 -0
  73. package/dist/ezui/p-a5ac7151.entry.js +1 -0
  74. package/dist/ezui/p-af15c277.entry.js +1 -0
  75. package/dist/ezui/{p-18e7870d.entry.js → p-c0f1715f.entry.js} +1 -1
  76. package/dist/ezui/p-c8c0809b.entry.js +1 -0
  77. package/dist/ezui/p-d6ffe679.entry.js +1 -0
  78. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -0
  79. package/dist/types/components/ez-form-view/ez-form-view.d.ts +3 -0
  80. package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +1 -0
  81. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -2
  82. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  83. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +1 -4
  84. package/dist/types/components/ez-search/ez-search.d.ts +10 -100
  85. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +0 -22
  86. package/dist/types/components.d.ts +20 -55
  87. package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +1 -2
  88. package/package.json +5 -4
  89. package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -182
  90. package/dist/collection/utils/form/test/DataBinder.test.js +0 -9
  91. package/dist/esm/ez-card-item_3.entry.js +0 -176
  92. package/dist/ezui/p-0447d17c.entry.js +0 -1
  93. package/dist/ezui/p-25ed09c6.entry.js +0 -1
  94. package/dist/ezui/p-428a05fe.entry.js +0 -1
  95. package/dist/ezui/p-50186acb.entry.js +0 -1
  96. package/dist/ezui/p-60848ef6.entry.js +0 -1
  97. package/dist/ezui/p-672dd122.entry.js +0 -1
  98. package/dist/ezui/p-baf80b13.entry.js +0 -1
  99. package/dist/ezui/p-e52cbcc7.entry.js +0 -1
  100. package/dist/ezui/p-e562d05e.entry.js +0 -1
  101. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +0 -23
  102. package/dist/types/utils/form/test/DataBinder.test.d.ts +0 -1
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-a7b0c73d.js');
6
+ const core = require('@sankhyalabs/core');
7
+
8
+ const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
9
+
10
+ const EzCardItem = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.ezClick = index.createEvent(this, "ezClick", 7);
14
+ this.item = undefined;
15
+ }
16
+ componentWillRender() {
17
+ this.createDetailList();
18
+ }
19
+ componentDidLoad() {
20
+ var _a, _b;
21
+ const dataInfo = { id: core.StringUtils.toCamelCase(((_a = this.item) === null || _a === void 0 ? void 0 : _a.key) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.title) || "") };
22
+ core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
23
+ }
24
+ createDetailList() {
25
+ var _a, _b, _c;
26
+ this._details = { detailsLeft: [], detailsRight: [] };
27
+ let cont = 0;
28
+ if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
29
+ for (const attribute in this.item.details) {
30
+ cont < 3 ?
31
+ this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
32
+ this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
33
+ cont++;
34
+ }
35
+ }
36
+ }
37
+ buildDetailContent(detail) {
38
+ return index.h("div", { class: "card-item__detail" }, index.h("label", { class: "card-item__detail-label" }, detail.label), ": ", index.h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
39
+ }
40
+ render() {
41
+ return (index.h(index.Host, null, this.item &&
42
+ index.h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, index.h("label", { class: "card-item__title" }, index.h("span", { class: "card-item__key", innerHTML: this.item.key }), index.h("span", { innerHTML: this.item.title })), index.h("div", { class: "card-item__details" }, index.h("div", { class: "card-item__details-left" }, this._details.detailsLeft.map(detail => {
43
+ return this.buildDetailContent(detail);
44
+ })), index.h("div", { class: "card-item__details-right" }, this._details.detailsRight.map(detail => {
45
+ return this.buildDetailContent(detail);
46
+ }))))));
47
+ }
48
+ get _element() { return index.getElement(this); }
49
+ };
50
+ EzCardItem.style = ezCardItemCss;
51
+
52
+ exports.ez_card_item = EzCardItem;
@@ -8,7 +8,7 @@ const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
8
8
  require('./DialogType-2114c337.js');
9
9
  require('./CheckMode-ecb90b87.js');
10
10
 
11
- const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsable-box--bordered{border:var(--border--small);border-color:var(--color--strokes);border-radius:var(--border--radius-medium);padding:var(--space--xs)}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:2s all ease-in-out}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
11
+ const ezCollapsibleBoxCss = ":host {\n /*@doc Define o tamanho da fonte do header.*/\n --ez-collapsible-box--font-size: var(--title--medium, 14px);\n /*@doc Define a família da fonte do header.*/\n --ez-collapsible-box--font-family: var(--font-pattern, Arial);\n /*@doc Define o peso da fonte do header.*/\n --ez-collapsible-box--font-weight: var(--text-weight--large, 600);\n /*@doc Define a cor da fonte do header.*/\n --ez-collapsible-box--color: var(--title--primary);\n /*@doc Define o tamanho da fonte do header.*/\n --ez-collapsible-box--subtitle--font-size: var(--text--medium, 14px);\n /*@doc Define a família da fonte do header.*/\n --ez-collapsible-box--subtitle--font-family: var(--font-pattern, 'Roboto');\n /*@doc Define o peso da fonte do header.*/\n --ez-collapsible-box--subtitle--font-weight: var(--text-weight--medium, 400);\n /*@doc Define a cor da fonte do header.*/\n --ez-collapsible-box--subtitle--color: var(--text--primary);\n /*@doc Define a cor da fonte do header.*/\n --ez-collapsible-box--subtitle--margin-bottom: var(--space--medium, 12px);\n /*@doc Define a cor do texto e do ícone quando o componente está focado.*/\n --ez-collapsible-box--focus--color: var(--color--primary-600);\n /*@doc Define a cor do chevron.*/\n --ez-collapsible-box__icon--color: var(--ez-collapsible-box--color);\n /*@doc Define o espaçamento superior ao header.*/\n --ez-collapsible-box__header--padding-top: 0px;\n /*@doc Define o espaçamento inferior ao header.*/\n --ez-collapsible-box__header--padding-bottom: 0px;\n /*@doc Define o espaçamento à direita do header.*/\n --ez-collapsible-box__header--padding-right: 0px;\n /*@doc Define o espaçamento à esquerda do header.*/\n --ez-collapsible-box__header--padding-left: 0px;\n\n /***************\n host style \n ***************/\n /*private*/\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n container-name: body;\n container-type: inline-size;\n}\n\nez-icon {\n --ez-icon--color: inherit;\n}\n\n.collapsible-box {\n /*private*/\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n\n.collapsable-box--bordered {\n border: var(--border--small);\n border-color: var(--color--strokes);\n border-radius: var(--border--radius-medium);\n padding: var(--space--xs);\n}\n\n.collapsible-box__header {\n /*private*/\n display: flex;\n box-sizing: border-box;\n \n /*public*/\n padding-top: var(--ez-collapsible-box__header--padding-top);\n padding-bottom: var(--ez-collapsible-box__header--padding-bottom);\n padding-right: var(--ez-collapsible-box__header--padding-right);\n padding-left: var(--ez-collapsible-box__header--padding-left);\n}\n\n.collapsible-box__title {\n /*private*/\n position: relative;\n width: auto;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n outline: none;\n border: none;\n background-color: unset;\n cursor: pointer;\n padding: 0px;\n text-align: left;\n\n /*public*/\n color: var(--ez-collapsible-box--color);\n --ez-icon--color: var(--ez-collapsible-box__icon--color);\n margin-bottom: var(--space--medium, 12px);\n}\n\n.collapsible-box__title:focus {\n /*public*/\n color: var(--ez-collapsible-box--focus--color);\n --ez-icon--color: var(--ez-collapsible-box--focus--color);\n}\n\n.collapsible-box__label {\n /*private*/\n display: flex;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n text-overflow: ellipsis;\n box-sizing: border-box;\n margin-left: 6px;\n gap: 6px;\n\n /*public*/\n font-family: var(--ez-collapsible-box--font-family);\n font-size: var(--ez-collapsible-box--font-size);\n font-weight: var(--ez-collapsible-box--font-weight);\n}\n\n.subtitle-box__label {\n /*private*/\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n box-sizing: border-box;\n\n /*public*/\n font-family: var(--ez-collapsible-box--subtitle--font-family);\n font-size: var(--ez-collapsible-box--subtitle--font-size);\n font-weight: var(--ez-collapsible-box--subtitle--font-weight);\n color: var(--ez-collapsible-box--subtitle--color);\n margin-bottom: var(--ez-collapsible-box--subtitle--margin-bottom);\n}\n\n.subtitle-box__content{\n /*private*/\n width: 100%;\n}\n\n.collapsible-box__label ez-icon {\n visibility: hidden;\n transition: 2s all ease-in-out;\n}\n\n.collapsible-box__label:hover ez-icon {\n visibility: visible;\n}\n\n.collapsible-box__text-edit {\n /*private*/\n margin-left: 6px;\n}\n\n.collapsible-box__icon {\n /*private*/\n transform: rotate(90deg) translate(0px, 14%);\n\n /*public*/\n transition: transform var(--transition);\n}\n\n.collapsible-box__icon--collapsed {\n /*private*/\n transform: rotate(0deg) translate(-14%, 0px);\n}\n\n.collapsible-box__title--icon-right {\n /*private*/\n flex-direction: row-reverse;\n}\n\n.collapsible-box__title--icon-right .collapsible-box__icon {\n /*private*/\n transform: rotate(90deg) translate(0px, -14%);\n}\n\n.collapsible-box__title--icon-right .collapsible-box__icon--collapsed {\n /*private*/\n transform: rotate(0deg) translate(14%, 0px);\n}\n\n.collapsible-box__title--icon-right .collapsible-box__label {\n /*private*/\n margin-left: 0px;\n margin-right: 6px;\n}\n\n.collapsible-box__title--left {\n margin-right: auto;\n}\n\n.collapsible-box__title--right {\n margin-left: auto;\n}\n\n.collapsible-box__title--center {\n margin-left: auto;\n margin-right: auto;\n}\n\n.collapsible-box__title--stretch {\n justify-content: space-between;\n width: 100%;\n}\n\n.collapsible-box__title--no-margin {\n margin-bottom: 0;\n}\n\n.collapsible-box__content {\n /*private*/\n display: flex;\n flex-wrap: wrap;\n \n width: 100%;\n height: 0px;\n max-height: 0px;\n opacity: 0;\n overflow: hidden;\n\n /*public*/\n transition: all var(--transition, 0.5s);\n}\n\n.collapsible-box__content--show {\n /*private*/\n height: 100%;\n max-height: none;\n opacity: 1;\n overflow: visible;\n\n /*public*/\n transition: all var(--transition, 0.5s);\n}\n\n.font--x-small {\n /*private*/\n font-size: 10px;\n}\n\n.font--small {\n /*private*/\n font-size: 12px;\n}\n\n.font--medium {\n /*private*/\n font-size: 14px;\n}\n\n.font--large {\n /*private*/\n font-size: 16px;\n}\n\n.font--x-large {\n /*private*/\n font-size: 20px;\n}\n\n@container body (min-width: 881px) {\n .collapsible-box__content > * {\n width: 25%;\n }\n}\n\n@container body (min-width: 659px) and (max-width: 880px) {\n .collapsible-box__content > * {\n width: 33%;\n }\n}\n\n@container body (min-width: 440px) and (max-width: 658px) {\n .collapsible-box__content > * {\n width: 50%;\n }\n}\n\n@container body (max-width: 439px) {\n .collapsible-box__content > * {\n width: 100%;\n }\n}";
12
12
 
13
13
  const EzCollapsibleBox = class {
14
14
  constructor(hostRef) {
@@ -4,10 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- require('./ApplicationUtils-c9d1205c.js');
7
+ const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
8
8
  const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
+ const constants = require('./constants-2714478b.js');
11
12
 
12
13
  const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box__list-min-width:64px;--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-combo-box__list-min-width);position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
13
14
 
@@ -20,6 +21,7 @@ const EzComboBox = class {
20
21
  this._maxWidthValue = 0;
21
22
  this._tabPressed = false;
22
23
  this._textEmptyList = "Nenhum resultado encontrado";
24
+ this._textEmptySearch = "Nenhum resultado de {0} encontrado";
23
25
  this._lookupMode = false;
24
26
  this._preSelection = undefined;
25
27
  this._visibleOptions = undefined;
@@ -32,6 +34,7 @@ const EzComboBox = class {
32
34
  this.enabled = true;
33
35
  this.options = undefined;
34
36
  this.errorMessage = undefined;
37
+ this.searchMode = undefined;
35
38
  this.showSelectedValue = false;
36
39
  this.showOptionValue = false;
37
40
  this.suppressSearch = false;
@@ -55,7 +58,7 @@ const EzComboBox = class {
55
58
  observeValue(newValue, oldValue) {
56
59
  if (this._textInput && newValue != oldValue) {
57
60
  try {
58
- if (typeof newValue === "string") {
61
+ if (this.searchMode && typeof newValue === "string") {
59
62
  this.setInputValue();
60
63
  return;
61
64
  }
@@ -218,7 +221,7 @@ const EzComboBox = class {
218
221
  }
219
222
  updateVisibleOptions() {
220
223
  let opts = this._source || [];
221
- if (this._criteria) {
224
+ if (!this.searchMode && this._criteria) {
222
225
  const upperCriteria = this._criteria.toUpperCase();
223
226
  opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
224
227
  }
@@ -293,7 +296,7 @@ const EzComboBox = class {
293
296
  return this._floatingID !== undefined && core.FloatingManager.isFloating(this._floatingID);
294
297
  }
295
298
  nextOption() {
296
- if (!this.isOptionsVisible()) {
299
+ if (this.searchMode && !this.isOptionsVisible()) {
297
300
  return;
298
301
  }
299
302
  this.showOptions();
@@ -316,6 +319,9 @@ const EzComboBox = class {
316
319
  this.selectOption(this._visibleOptions[this._preSelection]);
317
320
  this._preSelection = undefined;
318
321
  }
322
+ else {
323
+ this.controlListWithOnlyOne();
324
+ }
319
325
  }
320
326
  updateSource(source) {
321
327
  this._startLoading = false;
@@ -334,6 +340,7 @@ const EzComboBox = class {
334
340
  this.updateVisibleOptions();
335
341
  if (this._tabPressed) {
336
342
  this._tabPressed = false;
343
+ this.controlEmptySearch();
337
344
  }
338
345
  }
339
346
  else {
@@ -341,6 +348,10 @@ const EzComboBox = class {
341
348
  }
342
349
  }
343
350
  }
351
+ clearSource() {
352
+ this._source = [];
353
+ this.updateVisibleOptions();
354
+ }
344
355
  selectOption(newOption) {
345
356
  var _a, _b;
346
357
  const currentValue = this.getSelectedOption(this.value);
@@ -352,6 +363,10 @@ const EzComboBox = class {
352
363
  else {
353
364
  this.resetOptions();
354
365
  }
366
+ if (this.searchMode) {
367
+ this._visibleOptions = [];
368
+ this.clearSource();
369
+ }
355
370
  }
356
371
  loadOptions(mode, argument = "") {
357
372
  this._criteria = argument;
@@ -370,7 +385,7 @@ const EzComboBox = class {
370
385
  }
371
386
  else {
372
387
  window.setTimeout(() => {
373
- this.setInputValue(false);
388
+ this.setInputValue();
374
389
  }, this._deboucingTime);
375
390
  }
376
391
  this.resetOptions();
@@ -387,6 +402,93 @@ const EzComboBox = class {
387
402
  clearSearch() {
388
403
  this.value = null;
389
404
  }
405
+ controlListWithOnlyOne() {
406
+ var _a;
407
+ if (this.searchMode) {
408
+ const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
409
+ if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
410
+ this.selectOption(source[0]);
411
+ }
412
+ }
413
+ }
414
+ controlEmptySearch() {
415
+ var _a;
416
+ if (this.searchMode) {
417
+ if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
418
+ this.clearSearch();
419
+ ApplicationUtils.ApplicationUtils.info(this._textEmptyList);
420
+ }
421
+ else {
422
+ this.controlListWithOnlyOne();
423
+ }
424
+ }
425
+ }
426
+ validateDescriptionValue() {
427
+ if (!this.searchMode || core.StringUtils.isEmpty(this.value)) {
428
+ return;
429
+ }
430
+ let value = this.value;
431
+ if (typeof value === "object") {
432
+ return;
433
+ }
434
+ if (core.StringUtils.isEmpty(value)) {
435
+ return;
436
+ }
437
+ this.loadDescriptionValue(value);
438
+ }
439
+ async loadDescriptionValue(argument) {
440
+ var _a, _b;
441
+ if (argument == undefined) {
442
+ return;
443
+ }
444
+ if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
445
+ this.loadOptionValue(argument);
446
+ return;
447
+ }
448
+ const searchArgument = {
449
+ mode: SearchMode.PREDICTIVE,
450
+ argument
451
+ };
452
+ const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
453
+ if (source == undefined) {
454
+ return;
455
+ }
456
+ if (source instanceof Promise) {
457
+ source.then((result) => {
458
+ this.setDescriptionValue(result);
459
+ });
460
+ }
461
+ else {
462
+ this.setDescriptionValue(source);
463
+ }
464
+ }
465
+ setDescriptionValue(source) {
466
+ const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
467
+ if (value == undefined || !Object.keys(value).length) {
468
+ this.showNoResultMessage();
469
+ return;
470
+ }
471
+ this._lookupMode = true;
472
+ this.value = value;
473
+ }
474
+ loadOptionValue(argument) {
475
+ var _a;
476
+ const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
477
+ if (source != undefined) {
478
+ this.selectOption(source);
479
+ }
480
+ else {
481
+ this.showNoResultMessage();
482
+ }
483
+ }
484
+ async showNoResultMessage() {
485
+ this.clearSearch();
486
+ ApplicationUtils.ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
487
+ }
488
+ getFieldLabel() {
489
+ var _a;
490
+ return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(constants.REQUIRED_INFO, "").toUpperCase();
491
+ }
390
492
  resetOptions() {
391
493
  this.hideOptions();
392
494
  this._criteria = undefined;
@@ -412,7 +514,12 @@ const EzComboBox = class {
412
514
  });
413
515
  }
414
516
  }
415
- this.loadOptions(SearchMode.PRELOAD);
517
+ if (this.searchMode) {
518
+ this.updateSource([]);
519
+ }
520
+ else {
521
+ this.loadOptions(SearchMode.PRELOAD);
522
+ }
416
523
  }
417
524
  componentDidRender() {
418
525
  var _a;
@@ -422,6 +529,7 @@ const EzComboBox = class {
422
529
  (_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
423
530
  core.ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
424
531
  });
532
+ this.validateDescriptionValue();
425
533
  }
426
534
  componentDidLoad() {
427
535
  CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
@@ -441,7 +549,13 @@ const EzComboBox = class {
441
549
  // Event handlers
442
550
  //---------------------------------------------
443
551
  handlerIconClick() {
444
- this.showOptions();
552
+ this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
553
+ }
554
+ buildNumberArgument(argument) {
555
+ if (this.isTextSearch) {
556
+ return NaN;
557
+ }
558
+ return Number(argument || undefined);
445
559
  }
446
560
  onTextInputChangeHandler(event) {
447
561
  var _a;
@@ -458,12 +572,36 @@ const EzComboBox = class {
458
572
  }
459
573
  this._criteria = argument;
460
574
  if (argument) {
461
- this.updateVisibleOptions();
462
- this.showOptions();
575
+ if (this.searchMode) {
576
+ this._showLoading = false;
577
+ this.clearSource();
578
+ const enoughChars = argument.length >= this.limitCharsToSearch;
579
+ const argumentNumber = this.buildNumberArgument(argument);
580
+ if (enoughChars || !isNaN(argumentNumber)) {
581
+ this._showLoading = true;
582
+ this._changeDeboucingTimeout = window.setTimeout(() => {
583
+ this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
584
+ }, this._deboucingTime);
585
+ this.showOptions();
586
+ }
587
+ else {
588
+ this.hideOptions();
589
+ }
590
+ }
591
+ else {
592
+ this.updateVisibleOptions();
593
+ this.showOptions();
594
+ }
463
595
  }
464
596
  else {
465
597
  this.hideOptions();
466
- this.updateVisibleOptions();
598
+ if (this.searchMode) {
599
+ this._showLoading = false;
600
+ this.clearSource();
601
+ }
602
+ else {
603
+ this.updateVisibleOptions();
604
+ }
467
605
  }
468
606
  }
469
607
  clearDeboucingTimeout() {
@@ -473,7 +611,9 @@ const EzComboBox = class {
473
611
  }
474
612
  }
475
613
  onTextInputClickHandler() {
476
- this.showOptions();
614
+ if (!this.searchMode) {
615
+ this.showOptions();
616
+ }
477
617
  }
478
618
  keyDownHandler(event) {
479
619
  this._tabPressed = false;
@@ -505,6 +645,7 @@ const EzComboBox = class {
505
645
  break;
506
646
  case "Tab":
507
647
  this._tabPressed = true;
648
+ this.controlListWithOnlyOne();
508
649
  break;
509
650
  }
510
651
  //ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
@@ -521,8 +662,11 @@ const EzComboBox = class {
521
662
  return !this._showLoading && this._visibleOptions.length > 0;
522
663
  }
523
664
  render() {
665
+ var _a;
524
666
  core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
525
- return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, index.h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, index.h("ez-icon", { iconName: "chevron-down" }))), index.h("section", { class: "list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, index.h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
667
+ return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, index.h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, index.h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
668
+ ? index.h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }))
669
+ : undefined), index.h("section", { class: "list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, index.h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
526
670
  && this._visibleOptions.length === 0
527
671
  && index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
528
672
  && index.h("div", { class: "message" }, index.h("div", { class: "message__loading" })), this.showOptionValue
@@ -111,9 +111,6 @@ const EzDateInput = class {
111
111
  this._calendar.hide();
112
112
  }
113
113
  handleBlur() {
114
- if (!this._changePending) {
115
- return;
116
- }
117
114
  try {
118
115
  const strValue = this._textInput.value;
119
116
  const newValue = core.DateUtils.strToDate(strValue);
@@ -163,9 +163,6 @@ const EzDateTimeInput = class {
163
163
  }
164
164
  handleBlur() {
165
165
  var _a, _b;
166
- if (!this._changePending) {
167
- return;
168
- }
169
166
  try {
170
167
  const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
171
168
  const newValue = this.getParsedDateTime();
@@ -0,0 +1,137 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-a7b0c73d.js');
6
+ const core = require('@sankhyalabs/core');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
8
+
9
+ const ezFilterInputCss = ":host{display:block;width:100%}";
10
+
11
+ const EzFilterInput = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.ezChange = index.createEvent(this, "ezChange", 7);
15
+ this.ezSearching = index.createEvent(this, "ezSearching", 7);
16
+ this.ezFocusIn = index.createEvent(this, "ezFocusIn", 7);
17
+ this._searchingText = "";
18
+ this.handleFocus = () => {
19
+ if (this._searchingText === "") {
20
+ this._textInput.value = "";
21
+ }
22
+ else {
23
+ this._textInput.value = this._searchingText;
24
+ }
25
+ this.ezFocusIn.emit();
26
+ };
27
+ this.label = undefined;
28
+ this.value = undefined;
29
+ this.enabled = true;
30
+ this.errorMessage = undefined;
31
+ this.restrict = undefined;
32
+ this.mode = "regular";
33
+ this.asyncSearch = false;
34
+ this.canShowError = true;
35
+ }
36
+ observeLabel() {
37
+ if (this._textInput) {
38
+ this._textInput.label = this.label;
39
+ }
40
+ }
41
+ observeErrorMessage() {
42
+ if (this._textInput) {
43
+ this._textInput.errorMessage = this.errorMessage;
44
+ }
45
+ }
46
+ observeValue(newValue, oldValue) {
47
+ if (this._textInput && newValue != oldValue) {
48
+ this._textInput.value = newValue;
49
+ this.ezChange.emit(newValue);
50
+ }
51
+ }
52
+ /**
53
+ * Aplica o foco no campo.
54
+ */
55
+ async setFocus() {
56
+ this._textInput.setFocus();
57
+ }
58
+ /**
59
+ * Remove o foco do campo.
60
+ */
61
+ async setBlur() {
62
+ this._textInput.setBlur();
63
+ }
64
+ /**
65
+ * Retorna se o conteúdo é inválido.
66
+ */
67
+ async isInvalid() {
68
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
69
+ }
70
+ /**
71
+ * Método responsável por setar um novo valor ao campo.
72
+ */
73
+ async setValue(newValue) {
74
+ if (!this.asyncSearch || this._textInput == undefined) {
75
+ return;
76
+ }
77
+ if (newValue !== this.value) {
78
+ this.value = newValue;
79
+ this._searchingText = "";
80
+ }
81
+ else {
82
+ this._textInput.value = newValue;
83
+ }
84
+ }
85
+ /**
86
+ * Método responsável por resetar o valor do campo para o ultimo valor inputado.
87
+ */
88
+ async endSearch() {
89
+ if (!this.asyncSearch || this._textInput == undefined) {
90
+ return;
91
+ }
92
+ if (this._textInput.value !== this.value) {
93
+ this._textInput.value = this.value;
94
+ }
95
+ }
96
+ handleChange(evt) {
97
+ const newValue = evt.detail;
98
+ this.errorMessage = "";
99
+ if (this.asyncSearch) {
100
+ this._searchingText = newValue;
101
+ this.ezSearching.emit(newValue);
102
+ }
103
+ else if (newValue !== this.value) {
104
+ this.value = newValue;
105
+ }
106
+ }
107
+ componentDidLoad() {
108
+ CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
109
+ }
110
+ render() {
111
+ core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
112
+ return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" })));
113
+ }
114
+ get _elem() { return index.getElement(this); }
115
+ static get watchers() { return {
116
+ "label": ["observeLabel"],
117
+ "errorMessage": ["observeErrorMessage"],
118
+ "value": ["observeValue"]
119
+ }; }
120
+ };
121
+ EzFilterInput.style = ezFilterInputCss;
122
+
123
+ const multiSelectionBoxMessageCss = ".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";
124
+
125
+ const MultiSelectionBoxMessage = class {
126
+ constructor(hostRef) {
127
+ index.registerInstance(this, hostRef);
128
+ this.message = undefined;
129
+ }
130
+ render() {
131
+ return (index.h("div", { class: "multi-selection__message" }, index.h("span", { class: "multi-selection__text-message" }, this.message)));
132
+ }
133
+ };
134
+ MultiSelectionBoxMessage.style = multiSelectionBoxMessageCss;
135
+
136
+ exports.ez_filter_input = EzFilterInput;
137
+ exports.multi_selection_box_message = MultiSelectionBoxMessage;