@sankhyalabs/ezui 5.20.4 → 5.21.0-dev.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.
- package/README.md +4 -5
- package/dist/cjs/{CSSVarsUtils-b136a156.js → CSSVarsUtils-10c9d5b4.js} +13 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-alert-list.cjs.entry.js +121 -49
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_3.cjs.entry.js +183 -0
- package/dist/cjs/ez-check.cjs.entry.js +2 -2
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +20 -163
- package/dist/cjs/ez-date-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-dropdown.cjs.entry.js +10 -4
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +35 -16
- package/dist/cjs/ez-form.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +132 -58
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +2 -2
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +6 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +9 -2
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_3.cjs.entry.js +19 -5
- package/dist/cjs/ez-search.cjs.entry.js +622 -33
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +166 -0
- package/dist/cjs/ez-split-item.cjs.entry.js +21 -3
- package/dist/cjs/ez-split-panel.cjs.entry.js +68 -14
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +17 -6
- package/dist/cjs/{index-1064511f.js → index-a7b0c73d.js} +12 -10
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/ez-alert-list/ez-alert-list.css +16 -2
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +127 -48
- package/dist/collection/components/ez-card-item/ez-card-item.css +52 -3
- package/dist/collection/components/ez-card-item/ez-card-item.js +22 -3
- package/dist/collection/components/ez-check/ez-check.css +1 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +19 -179
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +32 -3
- package/dist/collection/components/ez-form-view/ez-form-view.css +17 -1
- package/dist/collection/components/ez-form-view/ez-form-view.js +22 -5
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +3 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +8 -11
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +3 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +21 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -3
- package/dist/collection/components/ez-grid/ez-grid.css +25 -1
- package/dist/collection/components/ez-grid/ez-grid.js +103 -33
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +16 -5
- package/dist/collection/components/ez-icon/ez-icon.css +119 -117
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -0
- package/dist/collection/components/ez-popup/ez-popup.css +2 -5
- package/dist/collection/components/ez-popup/ez-popup.js +23 -2
- package/dist/collection/components/ez-search/ez-search.css +331 -0
- package/dist/collection/components/ez-search/ez-search.js +698 -55
- package/dist/collection/components/ez-split-button/ez-split-button.css +229 -0
- package/dist/collection/components/ez-split-button/ez-split-button.js +455 -0
- package/dist/collection/components/ez-split-button/test/dropdownItems.js +42 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +6 -7
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +103 -15
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +59 -12
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +82 -2
- package/dist/collection/components/ez-tree/ez-tree.css +26 -0
- package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js +1 -0
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +15 -2
- package/dist/collection/utils/CSSVarsUtils.js +13 -0
- package/dist/collection/utils/form/test/DataBinder.test.js +9 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +1252 -359
- package/dist/esm/{CSSVarsUtils-a97cfa29.js → CSSVarsUtils-71ce76be.js} +13 -0
- package/dist/esm/ez-actions-button.entry.js +2 -2
- package/dist/esm/ez-alert-list.entry.js +121 -49
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_3.entry.js +177 -0
- package/dist/esm/ez-check.entry.js +2 -2
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +21 -164
- package/dist/esm/ez-date-input.entry.js +2 -2
- package/dist/esm/ez-date-time-input.entry.js +2 -2
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-dropdown.entry.js +10 -4
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +35 -16
- package/dist/esm/ez-form.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +133 -59
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +6 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +2 -2
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +10 -3
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_3.entry.js +19 -5
- package/dist/esm/ez-search.entry.js +623 -34
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +162 -0
- package/dist/esm/ez-split-item.entry.js +21 -3
- package/dist/esm/ez-split-panel.entry.js +68 -14
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-edit.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +17 -6
- package/dist/esm/{index-296b8458.js → index-baa5e267.js} +12 -10
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-5cef0264.entry.js → p-0306dff7.entry.js} +1 -1
- package/dist/ezui/{p-871c1a07.entry.js → p-0447d17c.entry.js} +1 -1
- package/dist/ezui/p-072e6347.entry.js +1 -0
- package/dist/ezui/{p-f4208819.entry.js → p-17be134a.entry.js} +1 -1
- package/dist/ezui/{p-cd19a6f8.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-60ba28ea.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-245a44ed.entry.js → p-20ec22c0.entry.js} +1 -1
- package/dist/ezui/{p-e318d280.js → p-23a36bb6.js} +1 -1
- package/dist/ezui/{p-8252d9b5.entry.js → p-2a1a0e04.entry.js} +1 -1
- package/dist/ezui/p-3faa2b46.entry.js +1 -0
- package/dist/ezui/{p-9b347f04.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/{p-7319c253.entry.js → p-49456b34.entry.js} +1 -1
- package/dist/ezui/{p-ccb4ccd9.entry.js → p-555c9018.entry.js} +1 -1
- package/dist/ezui/{p-52dd8b4c.entry.js → p-5bd5e68f.entry.js} +1 -1
- package/dist/ezui/{p-62304715.entry.js → p-5e1d036e.entry.js} +1 -1
- package/dist/ezui/{p-7525e604.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/p-5ef056ce.entry.js +1 -0
- package/dist/ezui/p-637f69f2.entry.js +1 -0
- package/dist/ezui/{p-c49dbf23.entry.js → p-650e4b6d.entry.js} +1 -1
- package/dist/ezui/{p-f55d75e7.entry.js → p-6e429cff.entry.js} +1 -1
- package/dist/ezui/p-701231f0.entry.js +1 -0
- package/dist/ezui/{p-0b902469.entry.js → p-77a4bd35.entry.js} +1 -1
- package/dist/ezui/{p-81cd05c8.entry.js → p-784fe207.entry.js} +1 -1
- package/dist/ezui/p-7af81663.entry.js +1 -0
- package/dist/ezui/p-7bc07c31.entry.js +1 -0
- package/dist/ezui/{p-5d6f2550.entry.js → p-85c8baae.entry.js} +1 -1
- package/dist/ezui/{p-d3b5228e.entry.js → p-8defa6d3.entry.js} +1 -1
- package/dist/ezui/{p-fbca293f.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/{p-391de0e4.entry.js → p-9050d2cd.entry.js} +1 -1
- package/dist/ezui/p-91f626d3.entry.js +1 -0
- package/dist/ezui/{p-3e7cc8a4.entry.js → p-99ead599.entry.js} +1 -1
- package/dist/ezui/p-9aefaa52.entry.js +1 -0
- package/dist/ezui/{p-7eb3e1a5.js → p-9e11fc7b.js} +1 -1
- package/dist/ezui/{p-b11f035c.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/p-a1ec32ef.entry.js +1 -0
- package/dist/ezui/{p-2da09f70.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/{p-d20ed286.entry.js → p-af2ecb1b.entry.js} +1 -1
- package/dist/ezui/{p-e8f88361.entry.js → p-af95cd16.entry.js} +1 -1
- package/dist/ezui/{p-32b4163f.entry.js → p-b041333c.entry.js} +1 -1
- package/dist/ezui/{p-545b5b2f.entry.js → p-b44741b0.entry.js} +2 -2
- package/dist/ezui/{p-12526044.entry.js → p-b567fa8c.entry.js} +1 -1
- package/dist/ezui/p-bae3d0aa.entry.js +1 -0
- package/dist/ezui/{p-fb21d72f.entry.js → p-bae4e180.entry.js} +1 -1
- package/dist/ezui/p-baf80b13.entry.js +1 -0
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/p-bf79aaa1.entry.js +1 -0
- package/dist/ezui/{p-83885b21.entry.js → p-cc2dc4f4.entry.js} +1 -1
- package/dist/ezui/p-db77a984.entry.js +1 -0
- package/dist/ezui/{p-028f264f.entry.js → p-e85c48d7.entry.js} +1 -1
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +38 -4
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +4 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -15
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +5 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSourceInterceptor.d.ts +8 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +17 -2
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +4 -1
- package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +0 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +1 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +7 -1
- package/dist/types/components/ez-search/ez-search.d.ts +101 -10
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +92 -0
- package/dist/types/components/ez-split-button/test/dropdownItems.d.ts +2 -0
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +29 -0
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +27 -0
- package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +3 -1
- package/dist/types/components/ez-tree/interfaces/ITreeItemBadge.d.ts +6 -0
- package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +0 -1
- package/dist/types/components.d.ts +188 -15
- package/dist/types/utils/CSSVarsUtils.d.ts +1 -0
- package/dist/types/utils/form/test/DataBinder.test.d.ts +1 -0
- package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +2 -1
- package/dist/types/utils/interfaces/IAction.d.ts +1 -1
- package/package.json +13 -5
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +0 -52
- package/dist/cjs/ez-filter-input_2.cjs.entry.js +0 -137
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +0 -8
- package/dist/esm/ez-card-item.entry.js +0 -48
- package/dist/esm/ez-filter-input_2.entry.js +0 -132
- package/dist/ezui/p-47afb974.entry.js +0 -1
- package/dist/ezui/p-59bcb27c.entry.js +0 -1
- package/dist/ezui/p-74049254.entry.js +0 -1
- package/dist/ezui/p-76d16a24.entry.js +0 -1
- package/dist/ezui/p-7fd54841.entry.js +0 -1
- package/dist/ezui/p-87e85160.entry.js +0 -1
- package/dist/ezui/p-95426f93.entry.js +0 -1
- package/dist/ezui/p-99692afa.entry.js +0 -1
- package/dist/ezui/p-a01068e1.entry.js +0 -1
- package/dist/ezui/p-a42fe2ce.entry.js +0 -1
- package/dist/ezui/p-af285e68.entry.js +0 -1
- package/dist/ezui/p-b6867f19.entry.js +0 -1
- package/dist/ezui/p-d51aa09b.entry.js +0 -1
- package/dist/ezui/p-d81917fd.entry.js +0 -1
- package/dist/ezui/p-f8653522.entry.js +0 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, HTMLBuilder, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1 } from '@sankhyalabs/core';
|
|
3
|
+
import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, HTMLBuilder, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
|
|
4
4
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
5
5
|
|
|
6
6
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
@@ -284,6 +284,19 @@ class CSSVarsUtils {
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
+
static applyVarsGrid(host, child) {
|
|
288
|
+
if (child) {
|
|
289
|
+
[
|
|
290
|
+
"--ez-grid--min-height",
|
|
291
|
+
"--snk-grid-min-height",
|
|
292
|
+
].forEach(prop => {
|
|
293
|
+
const propValue = getComputedStyle(host).getPropertyValue(prop);
|
|
294
|
+
if (propValue !== null && propValue !== undefined) {
|
|
295
|
+
child.style.setProperty(prop, propValue);
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
287
300
|
static applyIfExists(host, element, varName) {
|
|
288
301
|
const prop = getComputedStyle(host).getPropertyValue(varName);
|
|
289
302
|
if (prop) {
|
|
@@ -1113,88 +1126,160 @@ const EzAlert$1 = class extends HTMLElement$1 {
|
|
|
1113
1126
|
static get style() { return ezAlertCss; }
|
|
1114
1127
|
};
|
|
1115
1128
|
|
|
1116
|
-
const ezAlertListCss = ":host{display:flex
|
|
1129
|
+
const ezAlertListCss = ":host {\n display: flex;\n\n /* Alert List */\n \n /*@doc Define a largura da lista minimizado */\n --ez-alert-list__container--width: 680px;\n /*@doc Define a altura da lista minimizado */\n --ez-alert-list__container--height: 220px;\n \n /*@doc Define a largura da lista maximizada */\n --ez-alert-list__container--width--expanded: 920px;\n /*@doc Define a altura da lista maximizada */\n --ez-alert-list__container--height--expanded: 540px;\n\n /* Title */\n /*@doc Define a fonte do título do componente */\n --ez-alert-list__title--font-family: var(--font-pattern, \"Roboto\");\n /*@doc Define o tamanho da fonte do título do popup.*/\n --ez-alert-list__title--font-size: var(--title--large, 20px);\n /*@doc Define a cor da fonte do título do popup.*/\n --ez-alert-list__title--color: var(--title--primary, #2b3a54);\n /*@doc Define o peso da fonte do título do popup.*/\n --ez-alert-list__title--font-weight: var(--text-weight--extra-large, 700);\n\n /* @doc Define a borda inferior do item da lista. */\n --ez-list__item--border-bottom: var(--border--small, 1px solid);\n\n /* @doc Define a cor da borda inferior do item da lista. */\n --ez-list__item--border-bottom-color: var(--color--strokes, #DCE0E8);\n\n /* @doc Define o tipo da quebra de linha do item da lista. */\n --ez-list__item--white-space: break-space;\n}\n\n.alert-list__content {\n display: flex;\n flex-direction: column;\n \n gap: var(--space--xs);\n margin: var(--space--large, 24px);\n width: 100%;\n}\n\n.alert-list__container {\n z-index: var(--ez-elevation--8, 8);\n display: flex;\n height: var(--ez-alert-list__container--height);\n width: var(--ez-alert-list__container--width);\n border-radius: var(--border--radius-medium);\n background-color: var(--background--xlight);\n box-shadow: var(--shadow--medium);\n\n &.expanded {\n height: var(--ez-alert-list__container--height--expanded);\n width: var(--ez-alert-list__container--width--expanded);\n }\n\n @media (max-height: 640px) {\n max-height: calc(100vh - var(--space--3xl));\n } \n}\n\n.alert-list__header {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.alert-list__title {\n font-family: var(--ez-alert-list__title--font-family);\n font-size: var(--ez-alert-list__title--font-size);\n font-weight: var(--ez-alert-list__title--font-weight);\n color: var(--ez-alert-list__title--color);\n}\n\n.alert-list__header__buttons {\n display: flex;\n gap: var(--space--xs);\n}\n\n.alert-list__expandable-content {\n overflow-y: auto;\n scrollbar-width: thin;\n}\n\n";
|
|
1117
1130
|
|
|
1118
1131
|
const EzAlertList$1 = class extends HTMLElement$1 {
|
|
1119
1132
|
constructor() {
|
|
1120
1133
|
super();
|
|
1121
1134
|
this.__registerHost();
|
|
1122
1135
|
this.__attachShadow();
|
|
1136
|
+
this._container = undefined;
|
|
1123
1137
|
this.alerts = [];
|
|
1124
1138
|
this.enableDragAndDrop = undefined;
|
|
1125
|
-
this.enableExpand =
|
|
1139
|
+
this.enableExpand = true;
|
|
1126
1140
|
this.itemRightSlotBuilder = undefined;
|
|
1127
1141
|
this.opened = true;
|
|
1128
1142
|
this.expanded = false;
|
|
1129
1143
|
}
|
|
1130
1144
|
observeOpened() {
|
|
1131
|
-
this.
|
|
1145
|
+
if (this.opened) {
|
|
1146
|
+
this.manageOverlay();
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Retorna o id do alerta a partir do título e do índice.
|
|
1151
|
+
*/
|
|
1152
|
+
alertId(title, index) {
|
|
1153
|
+
const concatTitle = (title) => { var _a; return (_a = title === null || title === void 0 ? void 0 : title.split(' ').join('-')) !== null && _a !== void 0 ? _a : ""; };
|
|
1154
|
+
return `alert-${index}-${concatTitle(title)}`;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* Retorna o título do alerta a partir do id.
|
|
1158
|
+
*/
|
|
1159
|
+
getAlertTitle(id) {
|
|
1160
|
+
var _a;
|
|
1161
|
+
return (_a = this.alerts.find((alert, index) => this.alertId(alert.title, index) === id)) === null || _a === void 0 ? void 0 : _a.title;
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* Retorna o link para o titulo do alerta a partir do id.
|
|
1165
|
+
*/
|
|
1166
|
+
getLinkTitle(item) {
|
|
1167
|
+
var _a;
|
|
1168
|
+
const link = (_a = this.alerts.find((alert, index) => this.alertId(alert.title, index) === item.id)) === null || _a === void 0 ? void 0 : _a.link;
|
|
1169
|
+
return link !== null && link !== void 0 ? link : "#";
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Retorna o texto do título do alerta.
|
|
1173
|
+
*/
|
|
1174
|
+
getTitleText(item) {
|
|
1175
|
+
var _a;
|
|
1176
|
+
const title = (_a = this.getAlertTitle(item.id)) !== null && _a !== void 0 ? _a : '';
|
|
1177
|
+
return `${title}${(title && item.label) ? ':' : ''}`;
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* Gerencia a exibição do conteúdo expandido.
|
|
1181
|
+
*/
|
|
1182
|
+
toggleExpandContainer() {
|
|
1183
|
+
if (!this.enableExpand) {
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
this.expanded = !this.expanded;
|
|
1187
|
+
this._container.classList.toggle('expanded', this.expanded);
|
|
1188
|
+
if (this.expanded) {
|
|
1189
|
+
this.updatePosition(this.getBoundingRight(), this.getBoundingBottom());
|
|
1190
|
+
}
|
|
1191
|
+
else {
|
|
1192
|
+
this.updatePosition(`10px`, `10px`);
|
|
1193
|
+
}
|
|
1132
1194
|
}
|
|
1133
1195
|
/**
|
|
1134
1196
|
* Gerencia a exibição do overlay usando FloatingManager do Core.
|
|
1135
1197
|
*/
|
|
1136
|
-
|
|
1137
|
-
if (this.opened) {
|
|
1138
|
-
this._overlayId = FloatingManager.float(this._container, this._overlayRef,
|
|
1139
|
-
autoClose: false,
|
|
1140
|
-
isFixed: !this.enableDragAndDrop,
|
|
1141
|
-
bottom: '10px',
|
|
1142
|
-
right: '10px'
|
|
1143
|
-
});
|
|
1198
|
+
manageOverlay() {
|
|
1199
|
+
if (this.opened && this._container) {
|
|
1200
|
+
this._overlayId = FloatingManager.float(this._container, this._overlayRef, this.getFloatOptions());
|
|
1144
1201
|
}
|
|
1145
1202
|
else {
|
|
1203
|
+
if (this._overlayId === undefined)
|
|
1204
|
+
return;
|
|
1146
1205
|
FloatingManager.close(this._overlayId);
|
|
1147
1206
|
this._overlayId = undefined;
|
|
1148
1207
|
}
|
|
1149
1208
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1209
|
+
/**
|
|
1210
|
+
* Atualiza a posição da lista.
|
|
1211
|
+
*/
|
|
1212
|
+
updatePosition(right, bottom) {
|
|
1152
1213
|
if (this.opened) {
|
|
1153
|
-
this._container.
|
|
1214
|
+
FloatingManager.updateFloatPosition(this._container, this._overlayRef, Object.assign(Object.assign({}, this.getFloatOptions()), { right,
|
|
1215
|
+
bottom }));
|
|
1154
1216
|
}
|
|
1155
1217
|
}
|
|
1156
|
-
|
|
1157
|
-
|
|
1218
|
+
;
|
|
1219
|
+
/**
|
|
1220
|
+
* Retorna valores padrões do componente
|
|
1221
|
+
*/
|
|
1222
|
+
getFloatOptions() {
|
|
1223
|
+
return {
|
|
1224
|
+
autoClose: false,
|
|
1225
|
+
isFixed: true,
|
|
1226
|
+
bottom: '10px',
|
|
1227
|
+
right: '10px',
|
|
1228
|
+
};
|
|
1158
1229
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1230
|
+
;
|
|
1231
|
+
/**
|
|
1232
|
+
* Retorna o valor para o alinhamento horizontal do componente.
|
|
1233
|
+
*/
|
|
1234
|
+
getBoundingRight() {
|
|
1235
|
+
const docWidth = document.body.clientWidth;
|
|
1236
|
+
const boxWidth = this._container.getBoundingClientRect().width;
|
|
1237
|
+
return ((docWidth - boxWidth) / 2) + 'px';
|
|
1162
1238
|
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1239
|
+
/**
|
|
1240
|
+
* Retorna o valor para o alinhamento vertical do componente.
|
|
1241
|
+
*/
|
|
1242
|
+
getBoundingBottom() {
|
|
1243
|
+
const docHeight = document.body.clientHeight;
|
|
1244
|
+
const boxHeight = this._container.getBoundingClientRect().height;
|
|
1245
|
+
return ((docHeight - boxHeight) / 2) + 'px';
|
|
1166
1246
|
}
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1247
|
+
componentDidLoad() {
|
|
1248
|
+
this.manageOverlay();
|
|
1249
|
+
if (this.opened && this._container) {
|
|
1250
|
+
this._container.focus();
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
componentWillLoad() {
|
|
1254
|
+
this.dataElementId = ElementIDUtils.addIDInfo(this._element, 'EzAlertList');
|
|
1171
1255
|
}
|
|
1172
1256
|
render() {
|
|
1173
|
-
return (h(Host, Object.assign({}, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: this.dataElementId }),
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1257
|
+
return (h(Host, Object.assign({}, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: this.dataElementId }), this.opened ?
|
|
1258
|
+
(h("div", { ref: elem => (this._overlayRef = elem) }, h("div", { class: `alert-list__container ${this.expanded ? 'expanded' : ''}`, ref: elem => (this._container = elem) }, h("div", { class: "alert-list__content" }, h("div", { class: "alert-list__header" }, h("div", { class: "alert-list__title" }, `Avisos (${this.alerts.length})`), h("div", { class: "alert-list__header__buttons" }, this.enableExpand && (h("ez-button", { mode: "icon", size: "small", iconName: "expand", onClick: () => this.toggleExpandContainer(), "data-element-id": ElementIDUtils.getInternalIDInfo('expandButton'), title: this.expanded ? 'Resumir' : 'Expandir' })), h("ez-button", { mode: "icon", size: "small", iconName: "close", "data-element-id": ElementIDUtils.getInternalIDInfo('closeButton'), onClick: () => {
|
|
1259
|
+
this.opened = false;
|
|
1260
|
+
}, title: 'Fechar' }))), h("div", { class: "alert-list__expandable-content" }, h("ez-list", { itemSlotBuilder: this.itemRightSlotBuilder, hoverFeedback: true, itemLeftSlotBuilder: item => {
|
|
1261
|
+
return (h("a", { href: this.getLinkTitle(item), style: {
|
|
1262
|
+
fontFamily: "var(--font-pattern, 'Roboto')",
|
|
1263
|
+
fontSize: 'var(--text--medium, 14px)',
|
|
1264
|
+
fontWeight: 'var(--text-weight--medium, 400)',
|
|
1265
|
+
color: 'var(--color--primary, #008561)',
|
|
1266
|
+
marginRight: '4px',
|
|
1267
|
+
cursor: 'pointer',
|
|
1268
|
+
display: 'flex',
|
|
1269
|
+
width: 'max-content',
|
|
1270
|
+
textDecoration: 'none'
|
|
1271
|
+
} }, this.getTitleText(item)));
|
|
1272
|
+
}, dataSource: this.alerts.map((alert, index) => {
|
|
1273
|
+
var _a;
|
|
1274
|
+
return {
|
|
1275
|
+
id: this.alertId(alert.title, index),
|
|
1276
|
+
label: (_a = alert.detail) !== null && _a !== void 0 ? _a : "",
|
|
1277
|
+
};
|
|
1278
|
+
}) })))))) : null));
|
|
1194
1279
|
}
|
|
1195
1280
|
get _element() { return this; }
|
|
1196
1281
|
static get watchers() { return {
|
|
1197
|
-
"
|
|
1282
|
+
"_container": ["observeOpened"]
|
|
1198
1283
|
}; }
|
|
1199
1284
|
static get style() { return ezAlertListCss; }
|
|
1200
1285
|
};
|
|
@@ -1925,7 +2010,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
1925
2010
|
static get style() { return ezCalendarCss; }
|
|
1926
2011
|
};
|
|
1927
2012
|
|
|
1928
|
-
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px)
|
|
2013
|
+
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 flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__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.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__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}";
|
|
1929
2014
|
|
|
1930
2015
|
const EzCardItem$1 = class extends HTMLElement$1 {
|
|
1931
2016
|
constructor() {
|
|
@@ -1934,6 +2019,7 @@ const EzCardItem$1 = class extends HTMLElement$1 {
|
|
|
1934
2019
|
this.__attachShadow();
|
|
1935
2020
|
this.ezClick = createEvent(this, "ezClick", 7);
|
|
1936
2021
|
this.item = undefined;
|
|
2022
|
+
this.enableKey = true;
|
|
1937
2023
|
}
|
|
1938
2024
|
componentWillRender() {
|
|
1939
2025
|
this.createDetailList();
|
|
@@ -1961,17 +2047,17 @@ const EzCardItem$1 = class extends HTMLElement$1 {
|
|
|
1961
2047
|
}
|
|
1962
2048
|
render() {
|
|
1963
2049
|
return (h(Host, null, this.item &&
|
|
1964
|
-
h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, h("label", { class: "card-item__title" }, h("span", { class: "card-item__key", innerHTML: this.item.key }), h("span", { innerHTML: this.item.title })), h("div", { class: "card-item__details" }, h("div", { class: "card-item__details-
|
|
2050
|
+
h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, h("div", { class: "ez-row card-item__content" }, h("div", { class: "ez-col ez-col--sd-11 card-item__details" }, h("label", { class: "card-item__title" }, this.enableKey && (h("span", { class: "card-item__key", innerHTML: this.item.key })), h("span", { innerHTML: this.item.title })), h("div", { class: "card-item__details-container" }, h("div", { class: "card-item__details-container__left" }, this._details.detailsLeft.map(detail => {
|
|
1965
2051
|
return this.buildDetailContent(detail);
|
|
1966
|
-
})), h("div", { class: "card-item__details-
|
|
2052
|
+
})), h("div", { class: "card-item__details-container__right" }, this._details.detailsRight.map(detail => {
|
|
1967
2053
|
return this.buildDetailContent(detail);
|
|
1968
|
-
}))))));
|
|
2054
|
+
})))), h("div", { class: "ez-col ez-col--sd-1 card-item__details-slot" }, h("slot", { name: "rightSlot" }))))));
|
|
1969
2055
|
}
|
|
1970
2056
|
get _element() { return this; }
|
|
1971
2057
|
static get style() { return ezCardItemCss; }
|
|
1972
2058
|
};
|
|
1973
2059
|
|
|
1974
|
-
const ezCheckCss = ":host{--ez-check--box--width:20px;--ez-check--box--height:20px;--ez-check--width:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--height:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--indeterminate--image:url('data:image/svg+xml;utf8,<svg width=\"10\" height=\"2\" viewBox=\"0 0 10 2\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 1,0 h 8 c 0.554,0 1,0.446 1,1 0,0.554 -0.446,1 -1,1 H 1 C 0.446,2 0,1.554 0,1 0,0.446 0.446,0 1,0 Z\" /></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;align-items:center;margin:0}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.compact{margin-right:0px}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover,input.regular-mode:indeterminate:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus,input.regular-mode:indeterminate:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before,input.regular-mode:indeterminate::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after,input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:10px;height:2px;-webkit-mask-image:var(--ez-check--indeterminate--image);mask-image:var(--ez-check--indeterminate--image)}input.regular-mode:checked:disabled::after,input.regular-mode:indeterminate:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;width:inherit}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--small)}";
|
|
2060
|
+
const ezCheckCss = ":host{--ez-check--box--width:20px;--ez-check--box--height:20px;--ez-check--width:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--height:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--indeterminate--image:url('data:image/svg+xml;utf8,<svg width=\"10\" height=\"2\" viewBox=\"0 0 10 2\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 1,0 h 8 c 0.554,0 1,0.446 1,1 0,0.554 -0.446,1 -1,1 H 1 C 0.446,2 0,1.554 0,1 0,0.446 0.446,0 1,0 Z\" /></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;align-items:center;margin:0;max-width:100%}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.compact{margin-right:0px}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover,input.regular-mode:indeterminate:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus,input.regular-mode:indeterminate:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before,input.regular-mode:indeterminate::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after,input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:10px;height:2px;-webkit-mask-image:var(--ez-check--indeterminate--image);mask-image:var(--ez-check--indeterminate--image)}input.regular-mode:checked:disabled::after,input.regular-mode:indeterminate:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;width:inherit}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--small)}";
|
|
1975
2061
|
|
|
1976
2062
|
const EzCheck$1 = class extends HTMLElement$1 {
|
|
1977
2063
|
constructor() {
|
|
@@ -2292,10 +2378,6 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
2292
2378
|
static get style() { return ezCollapsibleBoxCss; }
|
|
2293
2379
|
};
|
|
2294
2380
|
|
|
2295
|
-
const REQUIRED_INFO = " (obrigatório) *";
|
|
2296
|
-
const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
|
|
2297
|
-
const EZ_GRID_LOADING_SOURCE = "EZ_GRID_LOADING_SOURCE";
|
|
2298
|
-
|
|
2299
2381
|
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)}}";
|
|
2300
2382
|
|
|
2301
2383
|
const EzComboBox$1 = class extends HTMLElement$1 {
|
|
@@ -2309,7 +2391,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2309
2391
|
this._maxWidthValue = 0;
|
|
2310
2392
|
this._tabPressed = false;
|
|
2311
2393
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
2312
|
-
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
2313
2394
|
this._lookupMode = false;
|
|
2314
2395
|
this._preSelection = undefined;
|
|
2315
2396
|
this._visibleOptions = undefined;
|
|
@@ -2322,7 +2403,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2322
2403
|
this.enabled = true;
|
|
2323
2404
|
this.options = undefined;
|
|
2324
2405
|
this.errorMessage = undefined;
|
|
2325
|
-
this.searchMode = undefined;
|
|
2326
2406
|
this.showSelectedValue = false;
|
|
2327
2407
|
this.showOptionValue = false;
|
|
2328
2408
|
this.suppressSearch = false;
|
|
@@ -2346,7 +2426,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2346
2426
|
observeValue(newValue, oldValue) {
|
|
2347
2427
|
if (this._textInput && newValue != oldValue) {
|
|
2348
2428
|
try {
|
|
2349
|
-
if (
|
|
2429
|
+
if (typeof newValue === "string") {
|
|
2350
2430
|
this.setInputValue();
|
|
2351
2431
|
return;
|
|
2352
2432
|
}
|
|
@@ -2371,9 +2451,9 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2371
2451
|
}
|
|
2372
2452
|
}
|
|
2373
2453
|
observeOptions(newOptions, oldOptions) {
|
|
2374
|
-
if ((newOptions
|
|
2454
|
+
if (ObjectUtils$1.equals(newOptions, oldOptions))
|
|
2375
2455
|
return;
|
|
2376
|
-
this.loadOptions(SearchMode.PRELOAD);
|
|
2456
|
+
this.loadOptions(SearchMode$1.PRELOAD);
|
|
2377
2457
|
}
|
|
2378
2458
|
/*
|
|
2379
2459
|
* Retorna uma promise com o valor da opção selecionada,
|
|
@@ -2509,18 +2589,19 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2509
2589
|
}
|
|
2510
2590
|
updateVisibleOptions() {
|
|
2511
2591
|
let opts = this._source || [];
|
|
2512
|
-
if (
|
|
2592
|
+
if (this._criteria) {
|
|
2513
2593
|
const upperCriteria = this._criteria.toUpperCase();
|
|
2514
2594
|
opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
|
|
2515
2595
|
}
|
|
2516
|
-
if (this.
|
|
2517
|
-
|
|
2518
|
-
}
|
|
2519
|
-
else {
|
|
2520
|
-
this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
|
|
2596
|
+
if (this.hasToAddEmptyoption(opts)) {
|
|
2597
|
+
opts = [{ value: undefined, label: "" }].concat(opts);
|
|
2521
2598
|
}
|
|
2599
|
+
this._visibleOptions = opts;
|
|
2522
2600
|
this._maxWidthValue = this.getMaxWidthValue();
|
|
2523
2601
|
}
|
|
2602
|
+
hasToAddEmptyoption(opts) {
|
|
2603
|
+
return !this.suppressEmptyOption && !opts.filter(opt => !opt.value).length;
|
|
2604
|
+
}
|
|
2524
2605
|
getMaxWidthValue() {
|
|
2525
2606
|
var _a;
|
|
2526
2607
|
if (this.showOptionValue) {
|
|
@@ -2584,7 +2665,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2584
2665
|
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
2585
2666
|
}
|
|
2586
2667
|
nextOption() {
|
|
2587
|
-
if (
|
|
2668
|
+
if (!this.isOptionsVisible()) {
|
|
2588
2669
|
return;
|
|
2589
2670
|
}
|
|
2590
2671
|
this.showOptions();
|
|
@@ -2607,9 +2688,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2607
2688
|
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
2608
2689
|
this._preSelection = undefined;
|
|
2609
2690
|
}
|
|
2610
|
-
else {
|
|
2611
|
-
this.controlListWithOnlyOne();
|
|
2612
|
-
}
|
|
2613
2691
|
}
|
|
2614
2692
|
updateSource(source) {
|
|
2615
2693
|
this._startLoading = false;
|
|
@@ -2628,7 +2706,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2628
2706
|
this.updateVisibleOptions();
|
|
2629
2707
|
if (this._tabPressed) {
|
|
2630
2708
|
this._tabPressed = false;
|
|
2631
|
-
this.controlEmptySearch();
|
|
2632
2709
|
}
|
|
2633
2710
|
}
|
|
2634
2711
|
else {
|
|
@@ -2636,10 +2713,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2636
2713
|
}
|
|
2637
2714
|
}
|
|
2638
2715
|
}
|
|
2639
|
-
clearSource() {
|
|
2640
|
-
this._source = [];
|
|
2641
|
-
this.updateVisibleOptions();
|
|
2642
|
-
}
|
|
2643
2716
|
selectOption(newOption) {
|
|
2644
2717
|
var _a, _b;
|
|
2645
2718
|
const currentValue = this.getSelectedOption(this.value);
|
|
@@ -2651,10 +2724,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2651
2724
|
else {
|
|
2652
2725
|
this.resetOptions();
|
|
2653
2726
|
}
|
|
2654
|
-
if (this.searchMode) {
|
|
2655
|
-
this._visibleOptions = [];
|
|
2656
|
-
this.clearSource();
|
|
2657
|
-
}
|
|
2658
2727
|
}
|
|
2659
2728
|
loadOptions(mode, argument = "") {
|
|
2660
2729
|
this._criteria = argument;
|
|
@@ -2690,93 +2759,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2690
2759
|
clearSearch() {
|
|
2691
2760
|
this.value = null;
|
|
2692
2761
|
}
|
|
2693
|
-
controlListWithOnlyOne() {
|
|
2694
|
-
var _a;
|
|
2695
|
-
if (this.searchMode) {
|
|
2696
|
-
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
2697
|
-
if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
|
|
2698
|
-
this.selectOption(source[0]);
|
|
2699
|
-
}
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
controlEmptySearch() {
|
|
2703
|
-
var _a;
|
|
2704
|
-
if (this.searchMode) {
|
|
2705
|
-
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2706
|
-
this.clearSearch();
|
|
2707
|
-
ApplicationUtils.info(this._textEmptyList);
|
|
2708
|
-
}
|
|
2709
|
-
else {
|
|
2710
|
-
this.controlListWithOnlyOne();
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
}
|
|
2714
|
-
validateDescriptionValue() {
|
|
2715
|
-
if (!this.searchMode || StringUtils$1.isEmpty(this.value)) {
|
|
2716
|
-
return;
|
|
2717
|
-
}
|
|
2718
|
-
let value = this.value;
|
|
2719
|
-
if (typeof value === "object") {
|
|
2720
|
-
return;
|
|
2721
|
-
}
|
|
2722
|
-
if (StringUtils$1.isEmpty(value)) {
|
|
2723
|
-
return;
|
|
2724
|
-
}
|
|
2725
|
-
this.loadDescriptionValue(value);
|
|
2726
|
-
}
|
|
2727
|
-
async loadDescriptionValue(argument) {
|
|
2728
|
-
var _a, _b;
|
|
2729
|
-
if (argument == undefined) {
|
|
2730
|
-
return;
|
|
2731
|
-
}
|
|
2732
|
-
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
2733
|
-
this.loadOptionValue(argument);
|
|
2734
|
-
return;
|
|
2735
|
-
}
|
|
2736
|
-
const searchArgument = {
|
|
2737
|
-
mode: SearchMode.PREDICTIVE,
|
|
2738
|
-
argument
|
|
2739
|
-
};
|
|
2740
|
-
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
|
|
2741
|
-
if (source == undefined) {
|
|
2742
|
-
return;
|
|
2743
|
-
}
|
|
2744
|
-
if (source instanceof Promise) {
|
|
2745
|
-
source.then((result) => {
|
|
2746
|
-
this.setDescriptionValue(result);
|
|
2747
|
-
});
|
|
2748
|
-
}
|
|
2749
|
-
else {
|
|
2750
|
-
this.setDescriptionValue(source);
|
|
2751
|
-
}
|
|
2752
|
-
}
|
|
2753
|
-
setDescriptionValue(source) {
|
|
2754
|
-
const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
|
|
2755
|
-
if (value == undefined || !Object.keys(value).length) {
|
|
2756
|
-
this.showNoResultMessage();
|
|
2757
|
-
return;
|
|
2758
|
-
}
|
|
2759
|
-
this._lookupMode = true;
|
|
2760
|
-
this.value = value;
|
|
2761
|
-
}
|
|
2762
|
-
loadOptionValue(argument) {
|
|
2763
|
-
var _a;
|
|
2764
|
-
const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
|
|
2765
|
-
if (source != undefined) {
|
|
2766
|
-
this.selectOption(source);
|
|
2767
|
-
}
|
|
2768
|
-
else {
|
|
2769
|
-
this.showNoResultMessage();
|
|
2770
|
-
}
|
|
2771
|
-
}
|
|
2772
|
-
async showNoResultMessage() {
|
|
2773
|
-
this.clearSearch();
|
|
2774
|
-
ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
|
|
2775
|
-
}
|
|
2776
|
-
getFieldLabel() {
|
|
2777
|
-
var _a;
|
|
2778
|
-
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
|
|
2779
|
-
}
|
|
2780
2762
|
resetOptions() {
|
|
2781
2763
|
this.hideOptions();
|
|
2782
2764
|
this._criteria = undefined;
|
|
@@ -2802,12 +2784,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2802
2784
|
});
|
|
2803
2785
|
}
|
|
2804
2786
|
}
|
|
2805
|
-
|
|
2806
|
-
this.updateSource([]);
|
|
2807
|
-
}
|
|
2808
|
-
else {
|
|
2809
|
-
this.loadOptions(SearchMode.PRELOAD);
|
|
2810
|
-
}
|
|
2787
|
+
this.loadOptions(SearchMode$1.PRELOAD);
|
|
2811
2788
|
}
|
|
2812
2789
|
componentDidRender() {
|
|
2813
2790
|
var _a;
|
|
@@ -2817,7 +2794,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2817
2794
|
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
2818
2795
|
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
2819
2796
|
});
|
|
2820
|
-
this.validateDescriptionValue();
|
|
2821
2797
|
}
|
|
2822
2798
|
componentDidLoad() {
|
|
2823
2799
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
@@ -2837,13 +2813,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2837
2813
|
// Event handlers
|
|
2838
2814
|
//---------------------------------------------
|
|
2839
2815
|
handlerIconClick() {
|
|
2840
|
-
this.
|
|
2841
|
-
}
|
|
2842
|
-
buildNumberArgument(argument) {
|
|
2843
|
-
if (this.isTextSearch) {
|
|
2844
|
-
return NaN;
|
|
2845
|
-
}
|
|
2846
|
-
return Number(argument || undefined);
|
|
2816
|
+
this.showOptions();
|
|
2847
2817
|
}
|
|
2848
2818
|
onTextInputChangeHandler(event) {
|
|
2849
2819
|
var _a;
|
|
@@ -2860,36 +2830,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2860
2830
|
}
|
|
2861
2831
|
this._criteria = argument;
|
|
2862
2832
|
if (argument) {
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
this.clearSource();
|
|
2866
|
-
const enoughChars = argument.length >= this.limitCharsToSearch;
|
|
2867
|
-
const argumentNumber = this.buildNumberArgument(argument);
|
|
2868
|
-
if (enoughChars || !isNaN(argumentNumber)) {
|
|
2869
|
-
this._showLoading = true;
|
|
2870
|
-
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
2871
|
-
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
2872
|
-
}, this._deboucingTime);
|
|
2873
|
-
this.showOptions();
|
|
2874
|
-
}
|
|
2875
|
-
else {
|
|
2876
|
-
this.hideOptions();
|
|
2877
|
-
}
|
|
2878
|
-
}
|
|
2879
|
-
else {
|
|
2880
|
-
this.updateVisibleOptions();
|
|
2881
|
-
this.showOptions();
|
|
2882
|
-
}
|
|
2833
|
+
this.updateVisibleOptions();
|
|
2834
|
+
this.showOptions();
|
|
2883
2835
|
}
|
|
2884
2836
|
else {
|
|
2885
2837
|
this.hideOptions();
|
|
2886
|
-
|
|
2887
|
-
this._showLoading = false;
|
|
2888
|
-
this.clearSource();
|
|
2889
|
-
}
|
|
2890
|
-
else {
|
|
2891
|
-
this.updateVisibleOptions();
|
|
2892
|
-
}
|
|
2838
|
+
this.updateVisibleOptions();
|
|
2893
2839
|
}
|
|
2894
2840
|
}
|
|
2895
2841
|
clearDeboucingTimeout() {
|
|
@@ -2899,15 +2845,13 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2899
2845
|
}
|
|
2900
2846
|
}
|
|
2901
2847
|
onTextInputClickHandler() {
|
|
2902
|
-
|
|
2903
|
-
this.showOptions();
|
|
2904
|
-
}
|
|
2848
|
+
this.showOptions();
|
|
2905
2849
|
}
|
|
2906
2850
|
keyDownHandler(event) {
|
|
2907
2851
|
this._tabPressed = false;
|
|
2908
2852
|
if (event.ctrlKey) {
|
|
2909
2853
|
if (event.key === "f" || event.key === "F") {
|
|
2910
|
-
this.loadOptions(SearchMode.ADVANCED);
|
|
2854
|
+
this.loadOptions(SearchMode$1.ADVANCED);
|
|
2911
2855
|
//ATENÇÃO: Ctrl + F tem ação específica nos browsers
|
|
2912
2856
|
//nesse caso, como vamos abrir o popup de busca avançada,
|
|
2913
2857
|
//não é interessante deixar o evento propagar;
|
|
@@ -2933,7 +2877,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2933
2877
|
break;
|
|
2934
2878
|
case "Tab":
|
|
2935
2879
|
this._tabPressed = true;
|
|
2936
|
-
this.controlListWithOnlyOne();
|
|
2937
2880
|
break;
|
|
2938
2881
|
}
|
|
2939
2882
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
@@ -2950,11 +2893,8 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2950
2893
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
2951
2894
|
}
|
|
2952
2895
|
render() {
|
|
2953
|
-
var _a;
|
|
2954
2896
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
2955
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": 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 }, h("button", { class: "btn", slot:
|
|
2956
|
-
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
2957
|
-
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
2897
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": 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 }, h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
2958
2898
|
&& this._visibleOptions.length === 0
|
|
2959
2899
|
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
2960
2900
|
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
|
|
@@ -2969,12 +2909,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2969
2909
|
}; }
|
|
2970
2910
|
static get style() { return ezComboBoxCss; }
|
|
2971
2911
|
};
|
|
2972
|
-
var SearchMode;
|
|
2912
|
+
var SearchMode$1;
|
|
2973
2913
|
(function (SearchMode) {
|
|
2974
2914
|
SearchMode["ADVANCED"] = "ADVANCED";
|
|
2975
2915
|
SearchMode["PRELOAD"] = "PRELOAD";
|
|
2976
2916
|
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
2977
|
-
})(SearchMode || (SearchMode = {}));
|
|
2917
|
+
})(SearchMode$1 || (SearchMode$1 = {}));
|
|
2978
2918
|
|
|
2979
2919
|
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)}";
|
|
2980
2920
|
|
|
@@ -3881,6 +3821,7 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3881
3821
|
this.__attachShadow();
|
|
3882
3822
|
this.ezClick = createEvent(this, "ezClick", 7);
|
|
3883
3823
|
this.ezSubActionClick = createEvent(this, "ezSubActionClick", 7);
|
|
3824
|
+
this.ezOutsideClick = createEvent(this, "ezOutsideClick", 7);
|
|
3884
3825
|
this._itemList = {};
|
|
3885
3826
|
this._submenuList = [];
|
|
3886
3827
|
this._openedMenuList = {};
|
|
@@ -3893,6 +3834,11 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3893
3834
|
this.value = undefined;
|
|
3894
3835
|
this.itemBuilder = undefined;
|
|
3895
3836
|
}
|
|
3837
|
+
handleClickOutside(event) {
|
|
3838
|
+
if (!this._element.contains(event.target)) {
|
|
3839
|
+
this.ezOutsideClick.emit();
|
|
3840
|
+
}
|
|
3841
|
+
}
|
|
3896
3842
|
//---------------------------------------------
|
|
3897
3843
|
// Private methods
|
|
3898
3844
|
//---------------------------------------------
|
|
@@ -3971,13 +3917,13 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3971
3917
|
this._itemList[item.id] = {};
|
|
3972
3918
|
}
|
|
3973
3919
|
}
|
|
3974
|
-
getContainerItemBuilder(item, level) {
|
|
3920
|
+
getContainerItemBuilder(item, level, isLockedLevels, hasIcon, hasChildren) {
|
|
3975
3921
|
if (this.itemBuilder == undefined) {
|
|
3976
3922
|
return;
|
|
3977
3923
|
}
|
|
3978
3924
|
const customContent = this.itemBuilder(item, level);
|
|
3979
3925
|
if (customContent == undefined) {
|
|
3980
|
-
return;
|
|
3926
|
+
return this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren);
|
|
3981
3927
|
}
|
|
3982
3928
|
if (typeof customContent !== "string") {
|
|
3983
3929
|
return (h("div", { class: "ez-dropdown__item-builder" }, customContent));
|
|
@@ -3998,7 +3944,7 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3998
3944
|
var _a;
|
|
3999
3945
|
return (item.type !== "divider"
|
|
4000
3946
|
? h("div", Object.assign({ ref: (ref) => this._itemList[item.id] = ref, class: "ez-dropdown__item", "data-level": level }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${item.id}_ezDropdownItem`) }), h("div", { class: "ez-dropdown__item-content", onClick: (evt) => this.onItemClick(evt, item), onMouseOver: (evt) => this.onShowSubmenu(evt, item) }, this.itemBuilder
|
|
4001
|
-
? this.getContainerItemBuilder(item, level)
|
|
3947
|
+
? this.getContainerItemBuilder(item, level, isLockedLevels, hasIcon, hasChildren)
|
|
4002
3948
|
: this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren)), ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
4003
3949
|
!isLockedLevels &&
|
|
4004
3950
|
hasChildren &&
|
|
@@ -4779,6 +4725,10 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4779
4725
|
static get style() { return ezFormCss; }
|
|
4780
4726
|
};
|
|
4781
4727
|
|
|
4728
|
+
const REQUIRED_INFO = " (obrigatório) *";
|
|
4729
|
+
const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
|
|
4730
|
+
const EZ_GRID_LOADING_SOURCE = "EZ_GRID_LOADING_SOURCE";
|
|
4731
|
+
|
|
4782
4732
|
const buildSwitch$1 = (field) => {
|
|
4783
4733
|
return buildField(field.name, field.label, field.readOnly, field.contextName, true);
|
|
4784
4734
|
};
|
|
@@ -4786,7 +4736,7 @@ const buildCheckBox = (field) => {
|
|
|
4786
4736
|
return buildField(field.name, field.label, field.readOnly, field.contextName, false);
|
|
4787
4737
|
};
|
|
4788
4738
|
function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
|
|
4789
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4739
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
|
|
4790
4740
|
h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
|
|
4791
4741
|
}
|
|
4792
4742
|
|
|
@@ -4800,29 +4750,31 @@ const buildComboBox$1 = ({ name, label, readOnly, required, props, contextName,
|
|
|
4800
4750
|
else {
|
|
4801
4751
|
options = prop;
|
|
4802
4752
|
}
|
|
4803
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4753
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4804
4754
|
h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
|
|
4805
4755
|
};
|
|
4806
4756
|
|
|
4807
4757
|
const buildDate$1 = ({ name, label, readOnly, canShowError }) => {
|
|
4808
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4758
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4809
4759
|
h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
|
|
4810
4760
|
};
|
|
4811
4761
|
const buildTime$1 = ({ name, label, readOnly, canShowError }) => {
|
|
4812
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4762
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4813
4763
|
h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
|
|
4814
4764
|
};
|
|
4815
4765
|
const buildDateTime$1 = ({ name, label, readOnly, contextName, canShowError }) => {
|
|
4816
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4766
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4817
4767
|
h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
|
|
4818
4768
|
};
|
|
4819
4769
|
|
|
4820
4770
|
const buildFile = ({ name, label, readOnly, contextName, props }) => {
|
|
4821
4771
|
const uploadProps = ObjectUtils$1.removeEmptyValues({
|
|
4822
4772
|
subTitle: props.subTitle,
|
|
4823
|
-
requestHeaders: props.STORAGESTRATEGY
|
|
4773
|
+
requestHeaders: Object.assign(Object.assign({}, (props.STORAGESTRATEGY && {
|
|
4824
4774
|
STORAGESTRATEGY: props.STORAGESTRATEGY
|
|
4825
|
-
}
|
|
4775
|
+
})), (props.INTERNAL_FILENAME && {
|
|
4776
|
+
INTERNAL_FILENAME: props.INTERNAL_FILENAME
|
|
4777
|
+
})),
|
|
4826
4778
|
});
|
|
4827
4779
|
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4828
4780
|
h("ez-upload", Object.assign({ enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name }, uploadProps))));
|
|
@@ -4837,12 +4789,12 @@ const buildInteger$1 = ({ name, label, readOnly, contextName, canShowError }) =>
|
|
|
4837
4789
|
return buildNumeric$1(name, label, readOnly, 0, 0, contextName, canShowError);
|
|
4838
4790
|
};
|
|
4839
4791
|
function buildNumeric$1(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
|
|
4840
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4792
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4841
4793
|
h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
|
|
4842
4794
|
}
|
|
4843
4795
|
|
|
4844
4796
|
const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
|
|
4845
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4797
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4846
4798
|
h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
|
|
4847
4799
|
};
|
|
4848
4800
|
|
|
@@ -4852,7 +4804,7 @@ const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError
|
|
|
4852
4804
|
};
|
|
4853
4805
|
|
|
4854
4806
|
const buildTextInput$1 = ({ name, label, readOnly, contextName, canShowError }) => {
|
|
4855
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4807
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4856
4808
|
h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
|
|
4857
4809
|
};
|
|
4858
4810
|
|
|
@@ -4912,7 +4864,7 @@ class FormItems {
|
|
|
4912
4864
|
}
|
|
4913
4865
|
}
|
|
4914
4866
|
|
|
4915
|
-
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-
|
|
4867
|
+
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%}";
|
|
4916
4868
|
|
|
4917
4869
|
const EzFormView$1 = class extends HTMLElement$1 {
|
|
4918
4870
|
constructor() {
|
|
@@ -4948,19 +4900,36 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4948
4900
|
const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
|
|
4949
4901
|
this.formItemsReady.emit(formItems);
|
|
4950
4902
|
}
|
|
4903
|
+
isItemFullWidth(userInterface) {
|
|
4904
|
+
return [
|
|
4905
|
+
UserInterface.FILE,
|
|
4906
|
+
UserInterface.LONGTEXT
|
|
4907
|
+
].includes(userInterface);
|
|
4908
|
+
}
|
|
4909
|
+
buildFormItemElement(item, classItem = "") {
|
|
4910
|
+
if (this.isItemFullWidth(item.userInterface)) {
|
|
4911
|
+
classItem += " input-full_width";
|
|
4912
|
+
}
|
|
4913
|
+
return h("div", { class: classItem }, fieldBuilder(item));
|
|
4914
|
+
}
|
|
4951
4915
|
render() {
|
|
4952
4916
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
4953
4917
|
if (this.fields == undefined) {
|
|
4954
4918
|
return;
|
|
4955
4919
|
}
|
|
4956
|
-
|
|
4920
|
+
let nonArrayGrup = [];
|
|
4921
|
+
let formContent = Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
|
|
4957
4922
|
if (Array.isArray(value)) {
|
|
4958
|
-
return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, value.map(fi =>
|
|
4923
|
+
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))))));
|
|
4959
4924
|
}
|
|
4960
4925
|
else {
|
|
4961
|
-
|
|
4926
|
+
nonArrayGrup.push(value);
|
|
4962
4927
|
}
|
|
4963
|
-
})
|
|
4928
|
+
});
|
|
4929
|
+
// Filtra os elementos que não são arrays e os coloca dentro de uma única div
|
|
4930
|
+
let nonArrayElements = nonArrayGrup.map((value) => this.buildFormItemElement(value));
|
|
4931
|
+
let groupedNonArrayElements = h("div", { class: "form-view__content" }, nonArrayElements);
|
|
4932
|
+
return (h(Host, null, groupedNonArrayElements, formContent));
|
|
4964
4933
|
}
|
|
4965
4934
|
get _element() { return this; }
|
|
4966
4935
|
static get style() { return ezFormViewCss; }
|
|
@@ -123786,6 +123755,26 @@ var AllEnterpriseModules = [
|
|
|
123786
123755
|
|
|
123787
123756
|
ModuleRegistry.registerModules(AllEnterpriseModules);
|
|
123788
123757
|
|
|
123758
|
+
class DataSourceInterceptor {
|
|
123759
|
+
constructor(controller) {
|
|
123760
|
+
this._controller = controller;
|
|
123761
|
+
}
|
|
123762
|
+
clearColumnFilter(filters) {
|
|
123763
|
+
var _a;
|
|
123764
|
+
return (_a = filters.filter(filter => !filter.name.startsWith(DISTINCT_FILTER_NAME_PREFIX))) !== null && _a !== void 0 ? _a : [];
|
|
123765
|
+
}
|
|
123766
|
+
interceptAction(action) {
|
|
123767
|
+
var _a;
|
|
123768
|
+
if (action.type === Action.LOADING_DATA) {
|
|
123769
|
+
if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
|
|
123770
|
+
action.payload.filters = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.filters) !== undefined ? this.clearColumnFilter(action.payload.filters) : action.payload.filters;
|
|
123771
|
+
this._controller.clearFilter();
|
|
123772
|
+
}
|
|
123773
|
+
}
|
|
123774
|
+
return action;
|
|
123775
|
+
}
|
|
123776
|
+
}
|
|
123777
|
+
|
|
123789
123778
|
class DataSource {
|
|
123790
123779
|
updateLoadedRecords(action) {
|
|
123791
123780
|
const records = action.payload;
|
|
@@ -123817,16 +123806,13 @@ class DataSource {
|
|
|
123817
123806
|
break;
|
|
123818
123807
|
case Action.LOADING_DATA:
|
|
123819
123808
|
this._waitingForLoad = true;
|
|
123820
|
-
if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
|
|
123821
|
-
this._controller.clearFilter();
|
|
123822
|
-
}
|
|
123823
123809
|
this._controller.refresh();
|
|
123824
123810
|
break;
|
|
123825
123811
|
case Action.DATA_LOADED:
|
|
123826
123812
|
this._waitingForLoad = false;
|
|
123827
123813
|
this.callbackGetRows(this._lastLoadingParams);
|
|
123828
123814
|
if (this._options) {
|
|
123829
|
-
this._options.onPaginationChange(this._dataUnit.getPaginationInfo());
|
|
123815
|
+
this._options.onPaginationChange(this._dataUnit.getPaginationInfo(), action.payload.selectFirstRecord);
|
|
123830
123816
|
}
|
|
123831
123817
|
this.updateSelection();
|
|
123832
123818
|
break;
|
|
@@ -123860,6 +123846,7 @@ class DataSource {
|
|
|
123860
123846
|
this._controller.setColumnsDef(this.buildColumnDefs());
|
|
123861
123847
|
this._options = options;
|
|
123862
123848
|
this._dataUnit.subscribe(this.duObserver);
|
|
123849
|
+
this._dataUnit.addInterceptor(new DataSourceInterceptor(this._controller));
|
|
123863
123850
|
}
|
|
123864
123851
|
updateSelection() {
|
|
123865
123852
|
const selectionInfo = this._dataUnit.getSelectionInfo();
|
|
@@ -123922,15 +123909,6 @@ class DataSource {
|
|
|
123922
123909
|
}
|
|
123923
123910
|
}
|
|
123924
123911
|
|
|
123925
|
-
function calcFilterColumnLeftPosition(leftReference) {
|
|
123926
|
-
const FIX_MARGIN = 60;
|
|
123927
|
-
const FILTER_COLUMN_WIDTH = 330;
|
|
123928
|
-
const screenWidth = window.innerWidth;
|
|
123929
|
-
const maxLeft = screenWidth - (FILTER_COLUMN_WIDTH + FIX_MARGIN);
|
|
123930
|
-
const leftInt = leftReference - FIX_MARGIN;
|
|
123931
|
-
return leftInt > maxLeft ? maxLeft : leftInt;
|
|
123932
|
-
}
|
|
123933
|
-
|
|
123934
123912
|
class EzGridCustomHeader {
|
|
123935
123913
|
init(agParams) {
|
|
123936
123914
|
var _a;
|
|
@@ -123967,8 +123945,7 @@ class EzGridCustomHeader {
|
|
|
123967
123945
|
}
|
|
123968
123946
|
onClickFilter() {
|
|
123969
123947
|
var _a;
|
|
123970
|
-
|
|
123971
|
-
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
|
|
123948
|
+
this.params.showColumnFilter((_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left);
|
|
123972
123949
|
}
|
|
123973
123950
|
configSortIcon() {
|
|
123974
123951
|
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
@@ -124649,7 +124626,7 @@ class AgGridController {
|
|
|
124649
124626
|
this._idAttribName = '__record__id__';
|
|
124650
124627
|
this._gridConfig = [];
|
|
124651
124628
|
this._filteredColumns = new Map();
|
|
124652
|
-
this._filterColumnleftPosition =
|
|
124629
|
+
this._filterColumnleftPosition = 0;
|
|
124653
124630
|
this._enterprise = enterprise;
|
|
124654
124631
|
}
|
|
124655
124632
|
getGridConfig() {
|
|
@@ -124814,11 +124791,9 @@ class AgGridController {
|
|
|
124814
124791
|
}
|
|
124815
124792
|
return params.value;
|
|
124816
124793
|
}
|
|
124817
|
-
setFilterColumnLeftPosition(
|
|
124818
|
-
if (
|
|
124819
|
-
|
|
124820
|
-
const leftString = ePopup.style.left.replace('px', '');
|
|
124821
|
-
this._filterColumnleftPosition = `${calcFilterColumnLeftPosition(parseInt(leftString))}px`;
|
|
124794
|
+
setFilterColumnLeftPosition({ type, ePopup }) {
|
|
124795
|
+
if (type === 'columnMenu') {
|
|
124796
|
+
this._filterColumnleftPosition = ePopup.getBoundingClientRect().left;
|
|
124822
124797
|
return;
|
|
124823
124798
|
}
|
|
124824
124799
|
}
|
|
@@ -125258,10 +125233,10 @@ class AgGridController {
|
|
|
125258
125233
|
tooltip: tooltip,
|
|
125259
125234
|
isSortable: propSortable,
|
|
125260
125235
|
hasFilter: () => this.hasFilterColumn(source.name),
|
|
125261
|
-
showColumnFilter: (leftPosition
|
|
125236
|
+
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
|
|
125262
125237
|
},
|
|
125263
125238
|
valueFormatter: params => {
|
|
125264
|
-
if (params.value
|
|
125239
|
+
if (params.value === undefined) {
|
|
125265
125240
|
return "";
|
|
125266
125241
|
}
|
|
125267
125242
|
if (params.value instanceof Promise) {
|
|
@@ -125643,13 +125618,13 @@ class InMemoryFilterColumnDataSource {
|
|
|
125643
125618
|
}
|
|
125644
125619
|
}
|
|
125645
125620
|
|
|
125646
|
-
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%)}.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}";
|
|
125621
|
+
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.sc-ez-grid{width:30%;min-width:100px;justify-content:flex-end;flex-wrap:wrap}.grid-header__left-container.sc-ez-grid{width:70%}.grid-header__pagination-label.sc-ez-grid{width:100%;white-space:nowrap}.overflowed.sc-ez-grid{display:none}";
|
|
125647
125622
|
|
|
125648
125623
|
const windowInstace$1 = window;
|
|
125649
125624
|
const matches = (text, filter) => {
|
|
125650
|
-
const normalizedText = StringUtils$1.replaceAccentuatedCharsLower(text.toLocaleLowerCase());
|
|
125625
|
+
const normalizedText = StringUtils$1.replaceAccentuatedCharsLower(text === null || text === void 0 ? void 0 : text.toLocaleLowerCase());
|
|
125651
125626
|
const normalizedFilter = StringUtils$1.replaceAccentuatedCharsLower(filter.toLocaleLowerCase());
|
|
125652
|
-
return normalizedText.includes(normalizedFilter);
|
|
125627
|
+
return normalizedText === null || normalizedText === void 0 ? void 0 : normalizedText.includes(normalizedFilter);
|
|
125653
125628
|
};
|
|
125654
125629
|
const EzGrid$1 = class extends HTMLElement$1 {
|
|
125655
125630
|
constructor() {
|
|
@@ -125741,7 +125716,15 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125741
125716
|
return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
|
|
125742
125717
|
}
|
|
125743
125718
|
observeConfig(config) {
|
|
125744
|
-
this._gridController.setColumnsState(config.columns);
|
|
125719
|
+
this._gridController.setColumnsState(config === null || config === void 0 ? void 0 : config.columns);
|
|
125720
|
+
}
|
|
125721
|
+
updatePaginationTooltip() {
|
|
125722
|
+
if (!this._refPaginationLabelTooltip)
|
|
125723
|
+
return;
|
|
125724
|
+
const alreadyDefined = this._refPaginationLabelTooltip.getAttribute('data-tooltip');
|
|
125725
|
+
if (alreadyDefined) {
|
|
125726
|
+
this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
|
|
125727
|
+
}
|
|
125745
125728
|
}
|
|
125746
125729
|
onSelectionChange(evt) {
|
|
125747
125730
|
this._currentPageSelected = evt.detail.selectionHeaderStatus === true;
|
|
@@ -125791,21 +125774,29 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125791
125774
|
return newConfig;
|
|
125792
125775
|
}
|
|
125793
125776
|
positionSelectionCounter() {
|
|
125794
|
-
var _a;
|
|
125795
|
-
if (this._gridSelectionCounter
|
|
125777
|
+
var _a, _b;
|
|
125778
|
+
if (!this._gridSelectionCounter)
|
|
125796
125779
|
return;
|
|
125797
|
-
|
|
125798
|
-
if (this._showSelectionCounter) {
|
|
125799
|
-
const boundingContainer = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
125800
|
-
if (boundingContainer == undefined) {
|
|
125801
|
-
return;
|
|
125802
|
-
}
|
|
125803
|
-
const limitBottom = boundingContainer.bottom - 30;
|
|
125804
|
-
this._gridSelectionCounter.style.bottom = document.body.clientHeight - limitBottom + 'px';
|
|
125805
|
-
}
|
|
125806
|
-
else {
|
|
125780
|
+
if (!this._showSelectionCounter) {
|
|
125807
125781
|
this._gridSelectionCounter.style.bottom = '';
|
|
125782
|
+
return;
|
|
125808
125783
|
}
|
|
125784
|
+
const containerRect = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
125785
|
+
const selectionRect = (_b = this._gridSelectionCounter) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
125786
|
+
if (!containerRect || !selectionRect)
|
|
125787
|
+
return;
|
|
125788
|
+
const positionBottom = containerRect.bottom - 30;
|
|
125789
|
+
this._gridSelectionCounter.style.bottom = document.body.clientHeight - positionBottom + 'px';
|
|
125790
|
+
this._gridSelectionCounter.style.left = this.calculatePositionLeft(containerRect, selectionRect);
|
|
125791
|
+
}
|
|
125792
|
+
calculatePositionLeft(containerRect, selectionRect) {
|
|
125793
|
+
let selectionStart = containerRect.left + (containerRect.width / 2);
|
|
125794
|
+
const containerRightEdge = containerRect.left + this._container.clientWidth;
|
|
125795
|
+
const selectionEnd = (selectionStart - (selectionRect.width / 2)) + selectionRect.width;
|
|
125796
|
+
if (selectionEnd > containerRightEdge) {
|
|
125797
|
+
selectionStart = containerRightEdge - (selectionRect.width / 2);
|
|
125798
|
+
}
|
|
125799
|
+
return `${selectionStart}px`;
|
|
125809
125800
|
}
|
|
125810
125801
|
setEvents() {
|
|
125811
125802
|
window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
|
|
@@ -125898,11 +125889,10 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125898
125889
|
}
|
|
125899
125890
|
getPaginationControl() {
|
|
125900
125891
|
if (this._paginationInfo) {
|
|
125901
|
-
const {
|
|
125892
|
+
const { currentPage, hasMore } = this._paginationInfo;
|
|
125902
125893
|
return [
|
|
125903
|
-
h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium" }, h("strong", { class: "ez-text ez-text--primary ez-text--medium" },
|
|
125904
|
-
h("
|
|
125905
|
-
h("ez-button", { size: "small", iconName: "chevron-right", class: "ez-margin-right--medium", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" }),
|
|
125894
|
+
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())),
|
|
125895
|
+
h("div", { id: "grid-pagination-tooltip", 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" })),
|
|
125906
125896
|
];
|
|
125907
125897
|
}
|
|
125908
125898
|
return null;
|
|
@@ -125911,16 +125901,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125911
125901
|
this._gridController.initDatagrid(this._container, {
|
|
125912
125902
|
onColumnStateChange: (type, state, info) => this.onColumnStateChange(type, state, info),
|
|
125913
125903
|
onSelectionChange: (selection) => this.ezSelectionChange.emit(selection),
|
|
125914
|
-
onPaginationChange: (paginationInfo) => {
|
|
125915
|
-
|
|
125916
|
-
if (((_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) > (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.currentPage) && this._paginationChangedByKeyboard) {
|
|
125917
|
-
this._gridController.setFocusLastRow();
|
|
125918
|
-
}
|
|
125919
|
-
else {
|
|
125920
|
-
this._gridController.setFocusFirstRow();
|
|
125921
|
-
this._paginationChangedByKeyboard = true;
|
|
125922
|
-
}
|
|
125923
|
-
this._paginationInfo = paginationInfo;
|
|
125904
|
+
onPaginationChange: (paginationInfo, selectFirstRecord) => {
|
|
125905
|
+
this.handlePaginationChange(selectFirstRecord, paginationInfo);
|
|
125924
125906
|
},
|
|
125925
125907
|
onPaginationUpdate: (paginationInfo) => {
|
|
125926
125908
|
this._paginationInfo = paginationInfo;
|
|
@@ -125946,6 +125928,66 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125946
125928
|
this.setEvents();
|
|
125947
125929
|
this.componentReady.emit();
|
|
125948
125930
|
this._gridController.configFilterColumn(this._filterColumn);
|
|
125931
|
+
this._initHeaderOverflowWatcher();
|
|
125932
|
+
}
|
|
125933
|
+
handlePaginationChange(selectFirstRecord, paginationInfo) {
|
|
125934
|
+
var _a;
|
|
125935
|
+
if (selectFirstRecord !== false) {
|
|
125936
|
+
if (((_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) > (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.currentPage) && this._paginationChangedByKeyboard) {
|
|
125937
|
+
this._gridController.setFocusLastRow();
|
|
125938
|
+
}
|
|
125939
|
+
else {
|
|
125940
|
+
this._gridController.setFocusFirstRow();
|
|
125941
|
+
this._paginationChangedByKeyboard = true;
|
|
125942
|
+
}
|
|
125943
|
+
}
|
|
125944
|
+
this._paginationInfo = paginationInfo;
|
|
125945
|
+
}
|
|
125946
|
+
_getActualPageLabel() {
|
|
125947
|
+
const { firstRecord, lastRecord } = this._paginationInfo;
|
|
125948
|
+
return `${firstRecord}-${lastRecord}`;
|
|
125949
|
+
}
|
|
125950
|
+
_getRemainingPageLabel() {
|
|
125951
|
+
const { total, count } = this._paginationInfo;
|
|
125952
|
+
return `${total == undefined ? ` de ${count + 1} ou mais` : ` de ${total}`}`;
|
|
125953
|
+
}
|
|
125954
|
+
_getPaginationTooltip() {
|
|
125955
|
+
return this._getActualPageLabel() + this._getRemainingPageLabel();
|
|
125956
|
+
}
|
|
125957
|
+
_initHeaderOverflowWatcher() {
|
|
125958
|
+
this._headerOverflowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
|
|
125959
|
+
}
|
|
125960
|
+
buildOverFlowWatcherParams() {
|
|
125961
|
+
return {
|
|
125962
|
+
element: this._refPaginationControl,
|
|
125963
|
+
callback: this.handleOverFlow.bind(this),
|
|
125964
|
+
notOverFlow: ["grid-pagination-tooltip"]
|
|
125965
|
+
};
|
|
125966
|
+
}
|
|
125967
|
+
handleOverFlow(elementsOverflow) {
|
|
125968
|
+
if (!this._refPaginationLabel)
|
|
125969
|
+
return;
|
|
125970
|
+
if (elementsOverflow.length > 0) {
|
|
125971
|
+
this._hidePaginationDescription();
|
|
125972
|
+
}
|
|
125973
|
+
else {
|
|
125974
|
+
this._showPaginationDescription();
|
|
125975
|
+
}
|
|
125976
|
+
}
|
|
125977
|
+
_hidePaginationDescription() {
|
|
125978
|
+
this._refPaginationLabel.classList.add(OVERFLOWED_CLASS_NAME);
|
|
125979
|
+
this._refPaginationLabelTooltip.setAttribute('data-flow', 'bottom');
|
|
125980
|
+
this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
|
|
125981
|
+
}
|
|
125982
|
+
;
|
|
125983
|
+
_showPaginationDescription() {
|
|
125984
|
+
this._refPaginationLabel.classList.remove(OVERFLOWED_CLASS_NAME);
|
|
125985
|
+
this._refPaginationLabelTooltip.removeAttribute('data-flow');
|
|
125986
|
+
this._refPaginationLabelTooltip.removeAttribute('data-tooltip');
|
|
125987
|
+
}
|
|
125988
|
+
disconnectedCallback() {
|
|
125989
|
+
var _a;
|
|
125990
|
+
(_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
125949
125991
|
}
|
|
125950
125992
|
componentWillRender() {
|
|
125951
125993
|
this.configSelectionCounter();
|
|
@@ -125969,14 +126011,15 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125969
126011
|
}
|
|
125970
126012
|
render() {
|
|
125971
126013
|
var _a;
|
|
125972
|
-
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
|
|
126014
|
+
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container grid-header__left-container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container grid-header__pagination", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
|
|
125973
126015
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
125974
126016
|
` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
|
|
125975
126017
|
}
|
|
125976
126018
|
static get assetsDirs() { return ["../assets"]; }
|
|
125977
126019
|
get _element() { return this; }
|
|
125978
126020
|
static get watchers() { return {
|
|
125979
|
-
"config": ["observeConfig"]
|
|
126021
|
+
"config": ["observeConfig"],
|
|
126022
|
+
"_paginationInfo": ["updatePaginationTooltip"]
|
|
125980
126023
|
}; }
|
|
125981
126024
|
static get style() { return ezGridCss; }
|
|
125982
126025
|
};
|
|
@@ -126083,7 +126126,7 @@ const EzGuideNavigator$1 = class extends HTMLElement$1 {
|
|
|
126083
126126
|
static get style() { return ezGuideNavigatorCss; }
|
|
126084
126127
|
};
|
|
126085
126128
|
|
|
126086
|
-
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:\"\\ea01\"}.ez-icon-2chevron-up:before{content:\"\\ea02\"}.ez-icon-acao:before{content:\"\\ea03\"}.ez-icon-account-outline:before{content:\"\\ea04\"}.ez-icon-account:before{content:\"\\ea05\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea06\"}.ez-icon-alert-circle:before{content:\"\\ea07\"}.ez-icon-alert-mail:before{content:\"\\ea08\"}.ez-icon-alert-popup:before{content:\"\\ea09\"}.ez-icon-anexo:before{content:\"\\ea0a\"}.ez-icon-
|
|
126129
|
+
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:\"\\ea01\"}.ez-icon-2chevron-up:before{content:\"\\ea02\"}.ez-icon-acao:before{content:\"\\ea03\"}.ez-icon-account-outline:before{content:\"\\ea04\"}.ez-icon-account:before{content:\"\\ea05\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea06\"}.ez-icon-alert-circle:before{content:\"\\ea07\"}.ez-icon-alert-mail:before{content:\"\\ea08\"}.ez-icon-alert-popup:before{content:\"\\ea09\"}.ez-icon-anexo:before{content:\"\\ea0a\"}.ez-icon-antecipacao:before{content:\"\\ea0b\"}.ez-icon-apps:before{content:\"\\ea0c\"}.ez-icon-arrow-forward:before{content:\"\\ea0d\"}.ez-icon-arrow-upward:before{content:\"\\ea0e\"}.ez-icon-arrow_back:before{content:\"\\ea0f\"}.ez-icon-arrow_downward:before{content:\"\\ea10\"}.ez-icon-baixa:before{content:\"\\ea11\"}.ez-icon-balance:before{content:\"\\ea12\"}.ez-icon-bell-inverted:before{content:\"\\ea13\"}.ez-icon-bell:before{content:\"\\ea14\"}.ez-icon-boleto:before{content:\"\\ea15\"}.ez-icon-boolean:before{content:\"\\ea16\"}.ez-icon-business-center:before{content:\"\\ea17\"}.ez-icon-calendar-clock:before{content:\"\\ea18\"}.ez-icon-calendar:before{content:\"\\ea19\"}.ez-icon-cash-remove:before{content:\"\\ea1a\"}.ez-icon-check-circle-inverted:before{content:\"\\ea1b\"}.ez-icon-check-circle:before{content:\"\\ea1c\"}.ez-icon-check:before{content:\"\\ea1d\"}.ez-icon-chevron-down:before{content:\"\\ea1e\"}.ez-icon-chevron-left:before{content:\"\\ea1f\"}.ez-icon-chevron-right:before{content:\"\\ea20\"}.ez-icon-chevron-up:before{content:\"\\ea21\"}.ez-icon-circle--medium:before{content:\"\\ea22\"}.ez-icon-circle:before{content:\"\\ea23\"}.ez-icon-cleaning:before{content:\"\\ea24\"}.ez-icon-clipboard:before{content:\"\\ea25\"}.ez-icon-clock-rotate-left:before{content:\"\\ea26\"}.ez-icon-close:before{content:\"\\ea27\"}.ez-icon-cobrar:before{content:\"\\ea28\"}.ez-icon-code:before{content:\"\\ea29\"}.ez-icon-configuration:before{content:\"\\ea2a\"}.ez-icon-content-cut:before{content:\"\\ea2b\"}.ez-icon-copy:before{content:\"\\ea2c\"}.ez-icon-credit_card:before{content:\"\\ea2d\"}.ez-icon-crop:before{content:\"\\ea2e\"}.ez-icon-custom:before{content:\"\\ea2f\"}.ez-icon-delete-file:before{content:\"\\ea30\"}.ez-icon-delete:before{content:\"\\ea31\"}.ez-icon-description:before{content:\"\\ea32\"}.ez-icon-dividir:before{content:\"\\ea33\"}.ez-icon-docx:before{content:\"\\ea34\"}.ez-icon-dot-notification:before{content:\"\\ea35\"}.ez-icon-dots-horizontal:before{content:\"\\ea36\"}.ez-icon-dots-vertical:before{content:\"\\ea37\"}.ez-icon-drag-indicator:before{content:\"\\ea38\"}.ez-icon-dual-chevron-down:before{content:\"\\ea39\"}.ez-icon-dual-chevron-left:before{content:\"\\ea3a\"}.ez-icon-dual-chevron-right:before{content:\"\\ea3b\"}.ez-icon-dual-chevron-up:before{content:\"\\ea3c\"}.ez-icon-edit-file:before{content:\"\\ea3d\"}.ez-icon-edit-table:before{content:\"\\ea3e\"}.ez-icon-edit-time:before{content:\"\\ea3f\"}.ez-icon-edit-value:before{content:\"\\ea40\"}.ez-icon-edit:before{content:\"\\ea41\"}.ez-icon-email:before{content:\"\\ea42\"}.ez-icon-estorno:before{content:\"\\ea43\"}.ez-icon-exe:before{content:\"\\ea44\"}.ez-icon-expand:before{content:\"\\ea45\"}.ez-icon-expandir_card:before{content:\"\\ea46\"}.ez-icon-extrato:before{content:\"\\ea47\"}.ez-icon-eye-off:before{content:\"\\ea48\"}.ez-icon-eye:before{content:\"\\ea49\"}.ez-icon-favorite:before{content:\"\\ea4a\"}.ez-icon-figma:before{content:\"\\ea4b\"}.ez-icon-file-download:before{content:\"\\ea4c\"}.ez-icon-file-upload:before{content:\"\\ea4d\"}.ez-icon-filter:before{content:\"\\ea4e\"}.ez-icon-find-file:before{content:\"\\ea4f\"}.ez-icon-find-page:before{content:\"\\ea50\"}.ez-icon-format-color-fill:before{content:\"\\ea51\"}.ez-icon-generic:before{content:\"\\ea52\"}.ez-icon-gif:before{content:\"\\ea53\"}.ez-icon-graph_bar:before{content:\"\\ea54\"}.ez-icon-handshake:before{content:\"\\ea55\"}.ez-icon-help-inverted:before{content:\"\\ea56\"}.ez-icon-help:before{content:\"\\ea57\"}.ez-icon-hide_menu:before{content:\"\\ea58\"}.ez-icon-home:before{content:\"\\ea59\"}.ez-icon-icons104:before{content:\"\\ea5a\"}.ez-icon-language:before{content:\"\\ea5b\"}.ez-icon-launch:before{content:\"\\ea5c\"}.ez-icon-lightbulb:before{content:\"\\ea5d\"}.ez-icon-list:before{content:\"\\ea5e\"}.ez-icon-location:before{content:\"\\ea5f\"}.ez-icon-lock-outline:before{content:\"\\ea60\"}.ez-icon-lock:before{content:\"\\ea61\"}.ez-icon-menu:before{content:\"\\ea62\"}.ez-icon-mid:before{content:\"\\ea63\"}.ez-icon-minus:before{content:\"\\ea64\"}.ez-icon-money-off:before{content:\"\\ea65\"}.ez-icon-money:before{content:\"\\ea66\"}.ez-icon-more:before{content:\"\\ea67\"}.ez-icon-mp3:before{content:\"\\ea68\"}.ez-icon-mp4:before{content:\"\\ea69\"}.ez-icon-multiple-files:before{content:\"\\ea6a\"}.ez-icon-north-west:before{content:\"\\ea6b\"}.ez-icon-number:before{content:\"\\ea6c\"}.ez-icon-ordem-ascendente:before{content:\"\\ea6d\"}.ez-icon-ordem-descendente:before{content:\"\\ea6e\"}.ez-icon-parcelar:before{content:\"\\ea6f\"}.ez-icon-pause:before{content:\"\\ea70\"}.ez-icon-payments:before{content:\"\\ea71\"}.ez-icon-pdf:before{content:\"\\ea72\"}.ez-icon-play:before{content:\"\\ea73\"}.ez-icon-plus:before{content:\"\\ea74\"}.ez-icon-png:before{content:\"\\ea75\"}.ez-icon-power:before{content:\"\\ea76\"}.ez-icon-pptx:before{content:\"\\ea77\"}.ez-icon-preview:before{content:\"\\ea78\"}.ez-icon-print:before{content:\"\\ea79\"}.ez-icon-push-pin:before{content:\"\\ea7a\"}.ez-icon-rateio:before{content:\"\\ea7b\"}.ez-icon-receipt:before{content:\"\\ea7c\"}.ez-icon-recolher_card:before{content:\"\\ea7d\"}.ez-icon-restore:before{content:\"\\ea7e\"}.ez-icon-return:before{content:\"\\ea7f\"}.ez-icon-sankhya-place:before{content:\"\\ea80\"}.ez-icon-save:before{content:\"\\ea81\"}.ez-icon-search:before{content:\"\\ea82\"}.ez-icon-settings-inverted:before{content:\"\\ea83\"}.ez-icon-settings:before{content:\"\\ea84\"}.ez-icon-share:before{content:\"\\ea85\"}.ez-icon-shield:before{content:\"\\ea86\"}.ez-icon-show_menu:before{content:\"\\ea87\"}.ez-icon-south-east:before{content:\"\\ea88\"}.ez-icon-sync:before{content:\"\\ea89\"}.ez-icon-table:before{content:\"\\ea8a\"}.ez-icon-tag_code:before{content:\"\\ea8b\"}.ez-icon-text:before{content:\"\\ea8c\"}.ez-icon-timeline:before{content:\"\\ea8d\"}.ez-icon-timer-outline:before{content:\"\\ea8e\"}.ez-icon-trending-up:before{content:\"\\ea8f\"}.ez-icon-tune:before{content:\"\\ea90\"}.ez-icon-txt:before{content:\"\\ea91\"}.ez-icon-un-pin:before{content:\"\\ea92\"}.ez-icon-unfold_less:before{content:\"\\ea93\"}.ez-icon-unfold_more:before{content:\"\\ea94\"}.ez-icon-user-circle:before{content:\"\\ea95\"}.ez-icon-warning-outline:before{content:\"\\ea96\"}.ez-icon-warning_triangle:before{content:\"\\ea97\"}.ez-icon-whatshot:before{content:\"\\ea98\"}.ez-icon-xlsx:before{content:\"\\ea99\"}.ez-icon-zip:before{content:\"\\ea9a\"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}";
|
|
126087
126130
|
|
|
126088
126131
|
const EzIcon$1 = class extends HTMLElement$1 {
|
|
126089
126132
|
constructor() {
|
|
@@ -126810,6 +126853,10 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
126810
126853
|
window.requestAnimationFrame(() => {
|
|
126811
126854
|
this.ezModalAction.emit(ModalAction$1.LOAD);
|
|
126812
126855
|
});
|
|
126856
|
+
new KeyboardManager({ propagate: false, element: this._element })
|
|
126857
|
+
.bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
|
|
126858
|
+
.bind("Escape", this.ezModalAction.emit.bind(ModalAction$1.CANCEL))
|
|
126859
|
+
.bind("Esc", this.ezModalAction.emit.bind(ModalAction$1.CANCEL));
|
|
126813
126860
|
}
|
|
126814
126861
|
focusLast() {
|
|
126815
126862
|
if (this._okButton == undefined) {
|
|
@@ -127332,7 +127379,7 @@ const EzPopover$1 = class extends HTMLElement$1 {
|
|
|
127332
127379
|
static get style() { return ezPopoverCss; }
|
|
127333
127380
|
};
|
|
127334
127381
|
|
|
127335
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;
|
|
127382
|
+
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
127336
127383
|
|
|
127337
127384
|
const EzPopup$1 = class extends HTMLElement$1 {
|
|
127338
127385
|
constructor() {
|
|
@@ -127340,6 +127387,7 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
127340
127387
|
this.__registerHost();
|
|
127341
127388
|
this.__attachShadow();
|
|
127342
127389
|
this.ezClosePopup = createEvent(this, "ezClosePopup", 7);
|
|
127390
|
+
this.ezPopupAction = createEvent(this, "ezPopupAction", 7);
|
|
127343
127391
|
this._sizeClasses = {
|
|
127344
127392
|
"x-small": "col--sd-3 ez-popup__size-limit--x-small",
|
|
127345
127393
|
"small": "col--sd-5",
|
|
@@ -127357,6 +127405,12 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
127357
127405
|
observeConfig() {
|
|
127358
127406
|
this.manageOverflow();
|
|
127359
127407
|
}
|
|
127408
|
+
componentDidLoad() {
|
|
127409
|
+
new KeyboardManager({ propagate: false, element: this._element })
|
|
127410
|
+
.bind("Enter", this.ezPopupAction.emit.bind("OK"))
|
|
127411
|
+
.bind("Escape", () => this.opened = false)
|
|
127412
|
+
.bind("Esc", () => this.opened = false);
|
|
127413
|
+
}
|
|
127360
127414
|
manageOverflow() {
|
|
127361
127415
|
if (this.opened) {
|
|
127362
127416
|
window.document.body.style.overflow = "hidden";
|
|
@@ -127625,7 +127679,7 @@ class ScrollCtrl {
|
|
|
127625
127679
|
}
|
|
127626
127680
|
}
|
|
127627
127681
|
|
|
127628
|
-
const ezSearchCss = ":host{width:100%}";
|
|
127682
|
+
const ezSearchCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--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-search__list-min-width);overflow:auto;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:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-search--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-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-search__scrollbar--color-background);width:var(--ez-search__scrollbar--width);max-width:var(--ez-search__scrollbar--width);min-width:var(--ez-search__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__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-search--border-radius-small);padding:var(--ez-search--space--small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--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-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--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-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__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)}}";
|
|
127629
127683
|
|
|
127630
127684
|
const EzSearch$1 = class extends HTMLElement$1 {
|
|
127631
127685
|
constructor() {
|
|
@@ -127633,6 +127687,21 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127633
127687
|
this.__registerHost();
|
|
127634
127688
|
this.__attachShadow();
|
|
127635
127689
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
127690
|
+
this._changeDeboucingTimeout = null;
|
|
127691
|
+
this._limitCharsToSearch = 3;
|
|
127692
|
+
this._deboucingTime = 300;
|
|
127693
|
+
this._maxWidthValue = 0;
|
|
127694
|
+
this._tabPressed = false;
|
|
127695
|
+
this._textEmptyList = "Nenhum resultado encontrado";
|
|
127696
|
+
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
127697
|
+
this._lookupMode = false;
|
|
127698
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
127699
|
+
this._endHighlightTag = "</span>";
|
|
127700
|
+
this._preSelection = undefined;
|
|
127701
|
+
this._visibleOptions = undefined;
|
|
127702
|
+
this._startLoading = false;
|
|
127703
|
+
this._showLoading = true;
|
|
127704
|
+
this._criteria = undefined;
|
|
127636
127705
|
this.value = undefined;
|
|
127637
127706
|
this.label = undefined;
|
|
127638
127707
|
this.enabled = true;
|
|
@@ -127647,28 +127716,82 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127647
127716
|
this.listOptionsPosition = undefined;
|
|
127648
127717
|
this.isTextSearch = false;
|
|
127649
127718
|
this.ignoreLimitCharsToSearch = false;
|
|
127719
|
+
this.options = undefined;
|
|
127720
|
+
this.suppressSearch = false;
|
|
127650
127721
|
}
|
|
127651
127722
|
observeErrorMessage() {
|
|
127652
|
-
|
|
127653
|
-
|
|
127723
|
+
var _a;
|
|
127724
|
+
if (this._textInput) {
|
|
127725
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
127726
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
127727
|
+
this.setInputValue();
|
|
127728
|
+
}
|
|
127654
127729
|
}
|
|
127655
127730
|
}
|
|
127656
|
-
observeValue() {
|
|
127657
|
-
if (this.
|
|
127658
|
-
|
|
127731
|
+
observeValue(newValue, oldValue) {
|
|
127732
|
+
if (this._textInput && newValue != oldValue) {
|
|
127733
|
+
try {
|
|
127734
|
+
if (newValue === "string") {
|
|
127735
|
+
this.setInputValue();
|
|
127736
|
+
return;
|
|
127737
|
+
}
|
|
127738
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
127739
|
+
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
127740
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
127741
|
+
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
127742
|
+
this.value = newValueSelected;
|
|
127743
|
+
}
|
|
127744
|
+
if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
|
|
127745
|
+
this.setInputValue();
|
|
127746
|
+
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
127747
|
+
if (!this._lookupMode) {
|
|
127748
|
+
this.ezChange.emit(valueEmitted);
|
|
127749
|
+
}
|
|
127750
|
+
}
|
|
127751
|
+
this.resetOptions();
|
|
127752
|
+
}
|
|
127753
|
+
finally {
|
|
127754
|
+
this._lookupMode = false;
|
|
127755
|
+
}
|
|
127659
127756
|
}
|
|
127660
127757
|
}
|
|
127758
|
+
observeOptions(newOptions, oldOptions) {
|
|
127759
|
+
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
127760
|
+
return;
|
|
127761
|
+
this.loadOptions(SearchMode.PRELOAD);
|
|
127762
|
+
}
|
|
127763
|
+
/*
|
|
127764
|
+
* Retorna uma promise com o valor da opção selecionada,
|
|
127765
|
+
* que será resolvida quando o backend devolver este dado.
|
|
127766
|
+
*/
|
|
127767
|
+
async getValueAsync() {
|
|
127768
|
+
if (!this._showLoading) {
|
|
127769
|
+
return new Promise(resolve => resolve(this.value));
|
|
127770
|
+
}
|
|
127771
|
+
return new Promise(resolve => {
|
|
127772
|
+
let id = setInterval(() => {
|
|
127773
|
+
if (!this._showLoading) {
|
|
127774
|
+
clearInterval(id);
|
|
127775
|
+
resolve(this.value);
|
|
127776
|
+
}
|
|
127777
|
+
}, 100);
|
|
127778
|
+
});
|
|
127779
|
+
}
|
|
127661
127780
|
/**
|
|
127662
|
-
|
|
127663
|
-
|
|
127781
|
+
* Aplica o foco no campo.
|
|
127782
|
+
*/
|
|
127664
127783
|
async setFocus() {
|
|
127665
|
-
this.
|
|
127784
|
+
if (this._textInput) {
|
|
127785
|
+
this._textInput.setFocus();
|
|
127786
|
+
}
|
|
127666
127787
|
}
|
|
127667
127788
|
/**
|
|
127668
|
-
|
|
127669
|
-
|
|
127789
|
+
* Remove o foco do campo.
|
|
127790
|
+
*/
|
|
127670
127791
|
async setBlur() {
|
|
127671
|
-
this.
|
|
127792
|
+
if (this._textInput) {
|
|
127793
|
+
this._textInput.setBlur();
|
|
127794
|
+
}
|
|
127672
127795
|
}
|
|
127673
127796
|
/**
|
|
127674
127797
|
* Retorna se o conteúdo é inválido.
|
|
@@ -127680,40 +127803,556 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127680
127803
|
* Limpa o valor do campo de pesquisa
|
|
127681
127804
|
*/
|
|
127682
127805
|
async clearValue() {
|
|
127806
|
+
this.clearSearch();
|
|
127807
|
+
}
|
|
127808
|
+
scrollListener() {
|
|
127809
|
+
var _a;
|
|
127810
|
+
if (this._floatingID == undefined) {
|
|
127811
|
+
return;
|
|
127812
|
+
}
|
|
127813
|
+
if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
|
|
127814
|
+
this.hideOptions();
|
|
127815
|
+
}
|
|
127816
|
+
else {
|
|
127817
|
+
window.requestAnimationFrame(() => {
|
|
127818
|
+
this.updateListPosition();
|
|
127819
|
+
});
|
|
127820
|
+
}
|
|
127821
|
+
}
|
|
127822
|
+
updateListPosition() {
|
|
127823
|
+
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
127824
|
+
const elementRect = this._listWrapper.getBoundingClientRect();
|
|
127825
|
+
const containerRect = this._listContainer.getBoundingClientRect();
|
|
127826
|
+
const textInputRect = this._textInput.getBoundingClientRect();
|
|
127827
|
+
const limitHeight = bottomLimit || window.innerHeight;
|
|
127828
|
+
const neededHeight = containerRect.bottom + elementRect.height;
|
|
127829
|
+
if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
|
|
127830
|
+
fromBottom = true;
|
|
127831
|
+
}
|
|
127832
|
+
if (!hardPosition) {
|
|
127833
|
+
verticalPosition = verticalPosition || 0;
|
|
127834
|
+
horizontalPosition = horizontalPosition || 0;
|
|
127835
|
+
if (fromBottom) {
|
|
127836
|
+
verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
|
|
127837
|
+
}
|
|
127838
|
+
else {
|
|
127839
|
+
verticalPosition += containerRect.top;
|
|
127840
|
+
}
|
|
127841
|
+
if (fromRight) {
|
|
127842
|
+
horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
|
|
127843
|
+
}
|
|
127844
|
+
else {
|
|
127845
|
+
horizontalPosition += containerRect.left;
|
|
127846
|
+
}
|
|
127847
|
+
}
|
|
127848
|
+
if (verticalPosition != undefined) {
|
|
127849
|
+
this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
|
|
127850
|
+
this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
|
|
127851
|
+
}
|
|
127852
|
+
if (horizontalPosition != undefined) {
|
|
127853
|
+
this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
|
|
127854
|
+
this._listWrapper.style[fromRight ? "left" : "right"] = "";
|
|
127855
|
+
}
|
|
127856
|
+
}
|
|
127857
|
+
getListPosition() {
|
|
127858
|
+
if (this.listOptionsPosition) {
|
|
127859
|
+
return this.listOptionsPosition;
|
|
127860
|
+
}
|
|
127861
|
+
return {
|
|
127862
|
+
verticalPosition: (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13
|
|
127863
|
+
};
|
|
127864
|
+
}
|
|
127865
|
+
isDifferentValues(firstValue, secondValue) {
|
|
127866
|
+
return ObjectUtils$1.objectToString(firstValue || {}) !== ObjectUtils$1.objectToString(secondValue || {});
|
|
127867
|
+
}
|
|
127868
|
+
getFormattedText(currentValue) {
|
|
127869
|
+
if (currentValue == undefined) {
|
|
127870
|
+
return;
|
|
127871
|
+
}
|
|
127872
|
+
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : `${currentValue.value} - ${currentValue.label}`;
|
|
127873
|
+
text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
127874
|
+
return text;
|
|
127875
|
+
}
|
|
127876
|
+
getText() {
|
|
127877
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
127878
|
+
const text = this.getFormattedText(currentValue);
|
|
127879
|
+
if (text == undefined) {
|
|
127880
|
+
return;
|
|
127881
|
+
}
|
|
127882
|
+
return String(text)
|
|
127883
|
+
.replace(/&/g, '&')
|
|
127884
|
+
.replace(/</g, '<')
|
|
127885
|
+
.replace(/>/g, '>')
|
|
127886
|
+
.replace(/"/g, '"');
|
|
127887
|
+
}
|
|
127888
|
+
getSelectedOption(value) {
|
|
127889
|
+
if (typeof value === "string" || value instanceof String) {
|
|
127890
|
+
return this._visibleOptions.find(o => o.value === value);
|
|
127891
|
+
}
|
|
127892
|
+
if (value) {
|
|
127893
|
+
return Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value === null || value === void 0 ? void 0 : value.value), label: this.replaceHighlight(value === null || value === void 0 ? void 0 : value.label) });
|
|
127894
|
+
}
|
|
127895
|
+
return value;
|
|
127896
|
+
}
|
|
127897
|
+
updateVisibleOptions() {
|
|
127898
|
+
let opts = this._source || [];
|
|
127899
|
+
if (this.suppressEmptyOption) {
|
|
127900
|
+
this._visibleOptions = opts;
|
|
127901
|
+
}
|
|
127902
|
+
else {
|
|
127903
|
+
this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
|
|
127904
|
+
}
|
|
127905
|
+
this._maxWidthValue = this.getMaxWidthValue();
|
|
127906
|
+
}
|
|
127907
|
+
getMaxWidthValue() {
|
|
127908
|
+
var _a;
|
|
127909
|
+
const arrValues = [];
|
|
127910
|
+
(_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.forEach(opt => {
|
|
127911
|
+
const widthValue = this.getWidthValue(opt.value);
|
|
127912
|
+
if (!arrValues.includes(widthValue)) {
|
|
127913
|
+
arrValues.push(widthValue);
|
|
127914
|
+
}
|
|
127915
|
+
});
|
|
127916
|
+
return arrValues.length > 1 ? Math.max(...arrValues) : 0;
|
|
127917
|
+
}
|
|
127918
|
+
getWidthValue(value) {
|
|
127919
|
+
if (this._itemValueBasis != undefined) {
|
|
127920
|
+
const span = this._itemValueBasis;
|
|
127921
|
+
if (value != undefined) {
|
|
127922
|
+
span.innerHTML = value;
|
|
127923
|
+
return span.clientWidth > 0 ? (span.clientWidth + 2) : 0;
|
|
127924
|
+
}
|
|
127925
|
+
else {
|
|
127926
|
+
span.innerHTML = "";
|
|
127927
|
+
}
|
|
127928
|
+
}
|
|
127929
|
+
return 0;
|
|
127930
|
+
}
|
|
127931
|
+
createOption(detail) {
|
|
127932
|
+
let { key, title } = detail;
|
|
127933
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
127934
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
127935
|
+
title = StringUtils$1.decodeHtmlEntities(title);
|
|
127936
|
+
const option = {
|
|
127937
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
127938
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
127939
|
+
};
|
|
127940
|
+
this.selectOption(option);
|
|
127941
|
+
}
|
|
127942
|
+
buildItem(opt, index) {
|
|
127943
|
+
opt.label = opt.label || opt.value;
|
|
127944
|
+
const card = {
|
|
127945
|
+
key: opt.value,
|
|
127946
|
+
title: opt.label,
|
|
127947
|
+
details: opt.details
|
|
127948
|
+
};
|
|
127949
|
+
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index }, h("ez-card-item", { item: card }));
|
|
127950
|
+
}
|
|
127951
|
+
showOptions() {
|
|
127952
|
+
if (!this.enabled)
|
|
127953
|
+
return;
|
|
127954
|
+
if (this.isOptionsVisible()) {
|
|
127955
|
+
return;
|
|
127956
|
+
}
|
|
127957
|
+
if (!!this._resizeObserver)
|
|
127958
|
+
this._resizeObserver.observe(this._textInput);
|
|
127959
|
+
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: false, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
127960
|
+
this.setFocus();
|
|
127961
|
+
window.requestAnimationFrame(() => {
|
|
127962
|
+
this.updateListPosition();
|
|
127963
|
+
if (!this.listOptionsPosition) {
|
|
127964
|
+
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
127965
|
+
}
|
|
127966
|
+
});
|
|
127967
|
+
}
|
|
127968
|
+
hideOptions() {
|
|
127969
|
+
if (this._floatingID !== undefined) {
|
|
127970
|
+
FloatingManager.close(this._floatingID);
|
|
127971
|
+
}
|
|
127972
|
+
this._floatingID = undefined;
|
|
127973
|
+
if (!!this._resizeObserver)
|
|
127974
|
+
this._resizeObserver.unobserve(this._textInput);
|
|
127975
|
+
}
|
|
127976
|
+
isOptionsVisible() {
|
|
127977
|
+
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
127978
|
+
}
|
|
127979
|
+
nextOption() {
|
|
127980
|
+
if (!this.isOptionsVisible()) {
|
|
127981
|
+
return;
|
|
127982
|
+
}
|
|
127983
|
+
this.showOptions();
|
|
127984
|
+
this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
|
|
127985
|
+
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
127986
|
+
}
|
|
127987
|
+
previousOption() {
|
|
127988
|
+
this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
127989
|
+
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
127990
|
+
}
|
|
127991
|
+
scrollToOption(opt) {
|
|
127992
|
+
window.requestAnimationFrame(() => {
|
|
127993
|
+
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`div#item_${this.replaceHighlight(opt.value).replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
|
|
127994
|
+
if (liElem)
|
|
127995
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
127996
|
+
});
|
|
127997
|
+
}
|
|
127998
|
+
selectCurrentOption() {
|
|
127999
|
+
if (this._preSelection !== undefined) {
|
|
128000
|
+
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
128001
|
+
this._preSelection = undefined;
|
|
128002
|
+
}
|
|
128003
|
+
else {
|
|
128004
|
+
this.controlListWithOnlyOne();
|
|
128005
|
+
}
|
|
128006
|
+
}
|
|
128007
|
+
updateSource(source) {
|
|
128008
|
+
this._startLoading = false;
|
|
128009
|
+
if (source instanceof Promise) {
|
|
128010
|
+
this._showLoading = true;
|
|
128011
|
+
source.then(result => {
|
|
128012
|
+
this._showLoading = false;
|
|
128013
|
+
this.updateSource(result);
|
|
128014
|
+
}).catch(() => this._showLoading = false);
|
|
128015
|
+
this.updateVisibleOptions();
|
|
128016
|
+
}
|
|
128017
|
+
else {
|
|
128018
|
+
this._showLoading = false;
|
|
128019
|
+
if (Array.isArray(source)) {
|
|
128020
|
+
this._source = source;
|
|
128021
|
+
this.updateVisibleOptions();
|
|
128022
|
+
if (this._tabPressed) {
|
|
128023
|
+
this._tabPressed = false;
|
|
128024
|
+
this.controlEmptySearch();
|
|
128025
|
+
}
|
|
128026
|
+
}
|
|
128027
|
+
else {
|
|
128028
|
+
this.selectOption(source);
|
|
128029
|
+
}
|
|
128030
|
+
}
|
|
128031
|
+
}
|
|
128032
|
+
clearSource() {
|
|
128033
|
+
this._source = [];
|
|
128034
|
+
this.updateVisibleOptions();
|
|
128035
|
+
}
|
|
128036
|
+
replaceHighlight(value) {
|
|
128037
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
128038
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
128039
|
+
return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
128040
|
+
}
|
|
128041
|
+
selectOption(newOption) {
|
|
127683
128042
|
var _a, _b;
|
|
127684
|
-
|
|
128043
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
128044
|
+
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
128045
|
+
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
128046
|
+
|| (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
|
|
128047
|
+
const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
|
|
128048
|
+
this.value = adjustedOpt;
|
|
128049
|
+
}
|
|
128050
|
+
else {
|
|
128051
|
+
this.setInputValue();
|
|
128052
|
+
this.resetOptions();
|
|
128053
|
+
}
|
|
128054
|
+
this._visibleOptions = [];
|
|
128055
|
+
this.clearSource();
|
|
127685
128056
|
}
|
|
127686
|
-
|
|
127687
|
-
|
|
127688
|
-
|
|
127689
|
-
|
|
127690
|
-
|
|
128057
|
+
loadOptions(mode, argument = "") {
|
|
128058
|
+
this._criteria = argument;
|
|
128059
|
+
this._startLoading = true;
|
|
128060
|
+
if (this.optionLoader) {
|
|
128061
|
+
const searchArgument = { mode, argument };
|
|
128062
|
+
this.updateSource(this.optionLoader(searchArgument));
|
|
128063
|
+
}
|
|
128064
|
+
else {
|
|
128065
|
+
this.updateSource(this.options);
|
|
128066
|
+
}
|
|
128067
|
+
}
|
|
128068
|
+
cancelPreselection() {
|
|
128069
|
+
if (!this._textInput.value && this.value) {
|
|
128070
|
+
this.selectOption(undefined);
|
|
128071
|
+
}
|
|
128072
|
+
else {
|
|
128073
|
+
window.setTimeout(() => {
|
|
128074
|
+
this.setInputValue();
|
|
128075
|
+
}, this._deboucingTime);
|
|
128076
|
+
}
|
|
128077
|
+
this.resetOptions();
|
|
128078
|
+
}
|
|
128079
|
+
setInputValue(clearError = true) {
|
|
128080
|
+
const textValue = this.getText();
|
|
128081
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
128082
|
+
this._textInput.value = textValue;
|
|
128083
|
+
if (clearError) {
|
|
128084
|
+
this.errorMessage = null;
|
|
128085
|
+
}
|
|
128086
|
+
}
|
|
128087
|
+
}
|
|
128088
|
+
clearSearch() {
|
|
128089
|
+
this.value = null;
|
|
128090
|
+
}
|
|
128091
|
+
controlListWithOnlyOne() {
|
|
128092
|
+
var _a, _b;
|
|
128093
|
+
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
128094
|
+
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
128095
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
128096
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
128097
|
+
let title = StringUtils$1.decodeHtmlEntities(source[0].label);
|
|
128098
|
+
const option = {
|
|
128099
|
+
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
128100
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
128101
|
+
};
|
|
128102
|
+
this.selectOption(option);
|
|
128103
|
+
}
|
|
128104
|
+
}
|
|
128105
|
+
controlEmptySearch() {
|
|
127691
128106
|
var _a;
|
|
127692
|
-
|
|
128107
|
+
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
128108
|
+
this.clearSearch();
|
|
128109
|
+
ApplicationUtils.info(this._textEmptyList);
|
|
128110
|
+
}
|
|
128111
|
+
else {
|
|
128112
|
+
this.controlListWithOnlyOne();
|
|
128113
|
+
}
|
|
127693
128114
|
}
|
|
127694
|
-
|
|
127695
|
-
|
|
127696
|
-
|
|
127697
|
-
this.ezChange.emit(event.detail);
|
|
127698
|
-
if (this.errorMessage !== this._comboElement.errorMessage) {
|
|
127699
|
-
this.errorMessage = this._comboElement.errorMessage;
|
|
128115
|
+
validateDescriptionValue() {
|
|
128116
|
+
if (StringUtils$1.isEmpty(this.value)) {
|
|
128117
|
+
return;
|
|
127700
128118
|
}
|
|
128119
|
+
let value = this.value;
|
|
128120
|
+
if (typeof value === "object") {
|
|
128121
|
+
return;
|
|
128122
|
+
}
|
|
128123
|
+
if (StringUtils$1.isEmpty(value)) {
|
|
128124
|
+
return;
|
|
128125
|
+
}
|
|
128126
|
+
this.loadDescriptionValue(value);
|
|
128127
|
+
}
|
|
128128
|
+
async loadDescriptionValue(argument) {
|
|
128129
|
+
var _a, _b;
|
|
128130
|
+
if (argument == undefined) {
|
|
128131
|
+
return;
|
|
128132
|
+
}
|
|
128133
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
128134
|
+
this.loadOptionValue(argument);
|
|
128135
|
+
return;
|
|
128136
|
+
}
|
|
128137
|
+
const searchArgument = {
|
|
128138
|
+
mode: SearchMode.PREDICTIVE,
|
|
128139
|
+
argument
|
|
128140
|
+
};
|
|
128141
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
|
|
128142
|
+
if (source == undefined) {
|
|
128143
|
+
return;
|
|
128144
|
+
}
|
|
128145
|
+
if (source instanceof Promise) {
|
|
128146
|
+
source.then((result) => {
|
|
128147
|
+
this.setDescriptionValue(result);
|
|
128148
|
+
});
|
|
128149
|
+
}
|
|
128150
|
+
else {
|
|
128151
|
+
this.setDescriptionValue(source);
|
|
128152
|
+
}
|
|
128153
|
+
}
|
|
128154
|
+
setDescriptionValue(source) {
|
|
128155
|
+
const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
|
|
128156
|
+
if (value == undefined || !Object.keys(value).length) {
|
|
128157
|
+
this.showNoResultMessage();
|
|
128158
|
+
return;
|
|
128159
|
+
}
|
|
128160
|
+
this._lookupMode = true;
|
|
128161
|
+
this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
128162
|
+
}
|
|
128163
|
+
loadOptionValue(argument) {
|
|
128164
|
+
var _a;
|
|
128165
|
+
const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
|
|
128166
|
+
if (source != undefined) {
|
|
128167
|
+
this.selectOption(source);
|
|
128168
|
+
}
|
|
128169
|
+
else {
|
|
128170
|
+
this.showNoResultMessage();
|
|
128171
|
+
}
|
|
128172
|
+
}
|
|
128173
|
+
async showNoResultMessage() {
|
|
128174
|
+
this.clearSearch();
|
|
128175
|
+
ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
|
|
128176
|
+
}
|
|
128177
|
+
getFieldLabel() {
|
|
128178
|
+
var _a;
|
|
128179
|
+
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
|
|
128180
|
+
}
|
|
128181
|
+
resetOptions() {
|
|
128182
|
+
this.hideOptions();
|
|
128183
|
+
this._criteria = undefined;
|
|
128184
|
+
this._preSelection = undefined;
|
|
128185
|
+
this.updateVisibleOptions();
|
|
128186
|
+
}
|
|
128187
|
+
//---------------------------------------------
|
|
128188
|
+
// Lifecycle web component
|
|
128189
|
+
//---------------------------------------------
|
|
128190
|
+
componentWillLoad() {
|
|
128191
|
+
if (this.options === undefined) {
|
|
128192
|
+
this.options = [];
|
|
128193
|
+
const optionsTags = this.el.querySelectorAll("option");
|
|
128194
|
+
if (optionsTags) {
|
|
128195
|
+
optionsTags.forEach(e => {
|
|
128196
|
+
let label = e.innerText;
|
|
128197
|
+
let value = e.getAttribute("value");
|
|
128198
|
+
let details = e.getAttribute("details");
|
|
128199
|
+
if (!value) {
|
|
128200
|
+
value = label;
|
|
128201
|
+
}
|
|
128202
|
+
this.options.push({ label, value, details });
|
|
128203
|
+
e.hidden = true;
|
|
128204
|
+
});
|
|
128205
|
+
}
|
|
128206
|
+
}
|
|
128207
|
+
this.updateSource([]);
|
|
128208
|
+
}
|
|
128209
|
+
componentDidRender() {
|
|
128210
|
+
var _a;
|
|
128211
|
+
if (this._floatingID === undefined) {
|
|
128212
|
+
this._listWrapper.remove();
|
|
128213
|
+
}
|
|
128214
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
128215
|
+
ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
128216
|
+
});
|
|
128217
|
+
this.validateDescriptionValue();
|
|
127701
128218
|
}
|
|
127702
128219
|
componentDidLoad() {
|
|
127703
|
-
CSSVarsUtils.applyVarsTextInput(this.
|
|
128220
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
128221
|
+
this.setInputValue(false);
|
|
128222
|
+
this._resizeObserver = new ResizeObserver((entries) => {
|
|
128223
|
+
window.requestAnimationFrame(() => {
|
|
128224
|
+
if (!Array.isArray(entries) || !entries.length)
|
|
128225
|
+
return;
|
|
128226
|
+
const { clientWidth } = this._listContainer;
|
|
128227
|
+
if (clientWidth > 0 && !!this._listWrapper) {
|
|
128228
|
+
this._listWrapper.style.width = `${clientWidth}px`;
|
|
128229
|
+
}
|
|
128230
|
+
});
|
|
128231
|
+
});
|
|
128232
|
+
}
|
|
128233
|
+
//---------------------------------------------
|
|
128234
|
+
// Event handlers
|
|
128235
|
+
//---------------------------------------------
|
|
128236
|
+
handlerIconClick() {
|
|
128237
|
+
this.loadOptions(SearchMode.ADVANCED);
|
|
128238
|
+
}
|
|
128239
|
+
buildNumberArgument(argument) {
|
|
128240
|
+
if (this.isTextSearch) {
|
|
128241
|
+
return NaN;
|
|
128242
|
+
}
|
|
128243
|
+
return Number(argument || undefined);
|
|
128244
|
+
}
|
|
128245
|
+
onTextInputChangeHandler(event) {
|
|
128246
|
+
var _a;
|
|
128247
|
+
this.clearDeboucingTimeout();
|
|
128248
|
+
if (this._startLoading) {
|
|
128249
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
128250
|
+
this.onTextInputChangeHandler(event);
|
|
128251
|
+
}, this._deboucingTime);
|
|
128252
|
+
return;
|
|
128253
|
+
}
|
|
128254
|
+
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
128255
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
128256
|
+
if (!this._criteria) {
|
|
128257
|
+
this._textInput.value = event.data || argument;
|
|
128258
|
+
}
|
|
128259
|
+
this._criteria = argument;
|
|
128260
|
+
if (argument) {
|
|
128261
|
+
this._showLoading = false;
|
|
128262
|
+
this.clearSource();
|
|
128263
|
+
if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
128264
|
+
this._showLoading = true;
|
|
128265
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
128266
|
+
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
128267
|
+
}, this._deboucingTime);
|
|
128268
|
+
this.showOptions();
|
|
128269
|
+
}
|
|
128270
|
+
else {
|
|
128271
|
+
this.hideOptions();
|
|
128272
|
+
}
|
|
128273
|
+
}
|
|
128274
|
+
else {
|
|
128275
|
+
this.hideOptions();
|
|
128276
|
+
this._showLoading = false;
|
|
128277
|
+
this.clearSource();
|
|
128278
|
+
}
|
|
128279
|
+
}
|
|
128280
|
+
clearDeboucingTimeout() {
|
|
128281
|
+
if (this._changeDeboucingTimeout) {
|
|
128282
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
128283
|
+
this._changeDeboucingTimeout = null;
|
|
128284
|
+
}
|
|
128285
|
+
}
|
|
128286
|
+
keyDownHandler(event) {
|
|
128287
|
+
this._tabPressed = false;
|
|
128288
|
+
if (event.ctrlKey) {
|
|
128289
|
+
if (event.key === "f" || event.key === "F") {
|
|
128290
|
+
this.loadOptions(SearchMode.ADVANCED);
|
|
128291
|
+
//ATENÇÃO: Ctrl + F tem ação específica nos browsers
|
|
128292
|
+
//nesse caso, como vamos abrir o popup de busca avançada,
|
|
128293
|
+
//não é interessante deixar o evento propagar;
|
|
128294
|
+
event.stopPropagation();
|
|
128295
|
+
event.stopImmediatePropagation();
|
|
128296
|
+
event.preventDefault();
|
|
128297
|
+
}
|
|
128298
|
+
}
|
|
128299
|
+
switch (event.key) {
|
|
128300
|
+
case "ArrowDown":
|
|
128301
|
+
this.nextOption();
|
|
128302
|
+
event.stopPropagation();
|
|
128303
|
+
break;
|
|
128304
|
+
case "ArrowUp":
|
|
128305
|
+
this.previousOption();
|
|
128306
|
+
event.stopPropagation();
|
|
128307
|
+
break;
|
|
128308
|
+
case "Enter":
|
|
128309
|
+
this.selectCurrentOption();
|
|
128310
|
+
break;
|
|
128311
|
+
case "Escape":
|
|
128312
|
+
this.cancelPreselection();
|
|
128313
|
+
break;
|
|
128314
|
+
case "Tab":
|
|
128315
|
+
this._tabPressed = true;
|
|
128316
|
+
this.controlListWithOnlyOne();
|
|
128317
|
+
break;
|
|
128318
|
+
}
|
|
128319
|
+
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
128320
|
+
//Por exemplo, quando o usuário dá um Enter, além de selecionar
|
|
128321
|
+
//um valor, também significa que a ateração finalizou,
|
|
128322
|
+
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
128323
|
+
//event.stopPropagation();
|
|
128324
|
+
}
|
|
128325
|
+
onTextInputFocusOutHandler() {
|
|
128326
|
+
if (this.hideErrorOnFocusOut)
|
|
128327
|
+
this.cancelPreselection();
|
|
128328
|
+
}
|
|
128329
|
+
canShowListOptions() {
|
|
128330
|
+
return !this._showLoading && this._visibleOptions.length > 0;
|
|
127704
128331
|
}
|
|
127705
128332
|
render() {
|
|
127706
|
-
|
|
127707
|
-
|
|
128333
|
+
var _a;
|
|
128334
|
+
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
128335
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": 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), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "search" })), ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
|
|
128336
|
+
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
128337
|
+
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
128338
|
+
&& this._visibleOptions.length === 0
|
|
128339
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
128340
|
+
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem }), this.canShowListOptions() && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
|
|
127708
128341
|
}
|
|
127709
|
-
;
|
|
127710
|
-
get _elem() { return this; }
|
|
128342
|
+
get el() { return this; }
|
|
127711
128343
|
static get watchers() { return {
|
|
127712
128344
|
"errorMessage": ["observeErrorMessage"],
|
|
127713
|
-
"value": ["observeValue"]
|
|
128345
|
+
"value": ["observeValue"],
|
|
128346
|
+
"options": ["observeOptions"]
|
|
127714
128347
|
}; }
|
|
127715
128348
|
static get style() { return ezSearchCss; }
|
|
127716
128349
|
};
|
|
128350
|
+
var SearchMode;
|
|
128351
|
+
(function (SearchMode) {
|
|
128352
|
+
SearchMode["ADVANCED"] = "ADVANCED";
|
|
128353
|
+
SearchMode["PRELOAD"] = "PRELOAD";
|
|
128354
|
+
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
128355
|
+
})(SearchMode || (SearchMode = {}));
|
|
127717
128356
|
|
|
127718
128357
|
const ezSidebarButtonCss = ":host{position:relative;--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-button--background-color--xlight:var(--background--xlight, #fff);--ez-sidebar-button--background-color--primary:var(--color--primary);--ez-sidebar-button--space--small:var(--space--small, 6px);--ez-sidebar-button--space--medium:var(--space--medium, 12px);--ez-sidebar-button--box-shadow:var(--shadow--small, 0px 0px 16px rgba(0, 38, 111, 0.07));--ez-sidebar-button--hover--box-shadow:var(--shadow--hard, 0px 0px 16px rgba(43, 58, 84, 0.24));--ez-sidebar-button--border--radius-small:var(--border--radius-small);--ez-sidebar-button--border--radius-medium:var(--border--radius-medium)}button{position:absolute;display:flex;background:var(--ez-sidebar-button--background-color--xlight);border:0;border-radius:0 var(--ez-sidebar-button--border--radius-medium) var(--ez-sidebar-button--border--radius-medium) 0;box-shadow:var(--ez-sidebar-button--box-shadow);padding:0;cursor:pointer}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--small) var(--ez-sidebar-button--space--medium) 0;background:var(--ez-sidebar-button--background-color--primary);border-radius:0 var(--ez-sidebar-button--border--radius-small) var(--ez-sidebar-button--border--radius-small) 0}button:hover{box-shadow:var(--ez-sidebar-button--hover--box-shadow)}button:hover span{width:var(--ez-sidebar-button--hover--width);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) 0}";
|
|
127719
128358
|
|
|
@@ -127801,15 +128440,188 @@ const EzSkeleton$1 = class extends HTMLElement$1 {
|
|
|
127801
128440
|
static get style() { return ezSkeletonCss; }
|
|
127802
128441
|
};
|
|
127803
128442
|
|
|
127804
|
-
const
|
|
128443
|
+
const ezSplitButtonCss = ":host{--ez-split-button--min-width:24;--ez-split-button--width:'auto';--ez-split-button__medium--height:32px;--ez-split-button__large--height:42px;--ez-split-button__medium-icon--width:40px;--ez-split-button__large-icon--width:44px;--ez-split-button__inline__icon--gap:6px;--ez-split-button__label--padding-top:0px;--ez-split-button__label--padding-bottom:0px;--ez-split-button__right-button--padding-left:8px;--ez-split-button--color:var(--title--primary, #FFF);--ez-split-button--font-size:var(--text--medium, 14px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--text-weight--large);--ez-split-button--background-color:var(--background--medium, #008561);--ez-split-button--border-radius:var(--border--radius-large, 12px);--ez-split-button--border:none;--ez-split-button--justify-content:center;--ez-split-button--hover-color:var(--color--primary-600);--ez-split-button--hover--background-color:var(--background--medium, var(--ez-split-button--background-color));--ez-split-button--disabled-color:var(--text--disable);--ez-split-button--disabled--background-color:var(--color--disable-secondary);--ez-split-button--focus--border:var(--border--medium, 2px) var(--color--primary-300);--ez-split-button--focus--box-shadow:none;--ez-split-button--active-color:var(--color--primary-700);--ez-split-button--active--background-color:var(--background--strong)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-split-button--min-width);width:var(--ez-split-button--width);height:var(--ez-split-button__medium--height);font-family:var(--ez-split-button--font-family);font-size:var(--ez-split-button--font-size);font-weight:var(--ez-split-button--font-weight);padding:var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;border-top-left-radius:var(--ez-split-button--border-radius);border-bottom-left-radius:var(--ez-split-button--border-radius);background-color:var(--ez-split-button--background-color);color:var(--ez-split-button--color);fill:var(--ez-split-button--color);border:var(--ez-split-button--border);justify-content:var(--ez-split-button--justify-content)}label{cursor:pointer}button:active{outline:none;box-shadow:none;background-color:var(--ez-split-button--active--background-color);color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.ez-split-button__left-button:focus,.ez-split-button__right-button:focus{outline:var(--ez-split-button--focus--border);box-shadow:var(--ez-split-button--focus--box-shadow)}.ez-split-button__left-button:hover,.ez-split-button__right-button:hover{outline:none;background-color:var(--ez-split-button--hover--background-color);color:var(--ez-split-button--hover-color);fill:var(--ez-split-button--hover-color);--ez-icon--color:var(--ez-split-button--hover-color)}.ez-split-button__left-button:disabled,.ez-split-button__left-button:disabled label,.ez-split-button__right-button:disabled{background-color:var(--ez-split-button--disabled--background-color);color:var(--ez-split-button--disabled-color);fill:var(--ez-split-button--disabled-color);border:none;--ez-icon--color:var(--ez-split-button--disabled-color);cursor:not-allowed}button.large{height:var(--ez-split-button__large--height)}button.medium{height:var(--ez-split-button__medium--height)}.default label{padding:var(--ez-split-button__label--padding-top) 12px var(--ez-split-button__label--padding-bottom) 20px}.icon-left{gap:var(--ez-split-button__inline__icon--gap)}.icon-left label{padding-right:12px}.icon-left ez-icon{padding-left:20px}.icon-only{padding-left:12px;padding-right:12px}.ez-split-button__right-button{border-top-right-radius:var(--ez-split-button--border-radius);border-bottom-right-radius:var(--ez-split-button--border-radius);border-top-left-radius:0;border-bottom-left-radius:0}.ez-split-button__right-button--medium{min-width:var(--ez-split-button__medium-icon--width)}.ez-split-button__right-button--large{min-width:var(--ez-split-button__large-icon--width)}.ez-split-button__right-button--divider{top:10%;bottom:10%}.ez-split-button__right-button--divider:before{content:\"\";position:absolute;left:0;border-left:1px solid rgba(0, 0, 0, 20%);border-radius:2px;height:75%}.btn-icon--medium{min-width:--ez-split-button__medium-icon--width}.btn-icon--large{min-width:--ez-split-button__large-icon--width}.ez-split-button__right-button-container{position:absolute;left:0;padding-left:var(--ez-split-button__right-button--padding-left)}.label-icon{display:flex;flex-direction:row;align-items:center;color:var(--ez-split-button--color)}.label-icon:active{color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.dropdown{display:flex}.dropdown-content{display:block;position:absolute;background-color:#f1f1f1;min-width:160px;z-index:--ez-elevation--8;border-radius:var(--ez-split-button--border-radius)}.dropdown-content>ez-dropdown{position:relative}";
|
|
128444
|
+
|
|
128445
|
+
const EzSplitButton$1 = class extends HTMLElement$1 {
|
|
128446
|
+
constructor() {
|
|
128447
|
+
super();
|
|
128448
|
+
this.__registerHost();
|
|
128449
|
+
this.__attachShadow();
|
|
128450
|
+
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
128451
|
+
this.dropdownItemClick = createEvent(this, "dropdownItemClick", 7);
|
|
128452
|
+
this.dropdownSubActionClick = createEvent(this, "dropdownSubActionClick", 7);
|
|
128453
|
+
this.rightDefaultTitle = 'Mais opções';
|
|
128454
|
+
this.show = false;
|
|
128455
|
+
this.enabled = true;
|
|
128456
|
+
this.iconName = undefined;
|
|
128457
|
+
this.image = undefined;
|
|
128458
|
+
this.items = undefined;
|
|
128459
|
+
this.label = undefined;
|
|
128460
|
+
this.leftTitle = undefined;
|
|
128461
|
+
this.rightTitle = 'Mais opções';
|
|
128462
|
+
this.mode = 'default';
|
|
128463
|
+
this.size = 'medium';
|
|
128464
|
+
}
|
|
128465
|
+
/**
|
|
128466
|
+
* Remove o foco de ambos os botões.
|
|
128467
|
+
*/
|
|
128468
|
+
async setBlur() {
|
|
128469
|
+
this.leftButton.blur();
|
|
128470
|
+
this.rightButton.blur();
|
|
128471
|
+
}
|
|
128472
|
+
/**
|
|
128473
|
+
* Aplica o foco no botão principal.
|
|
128474
|
+
*/
|
|
128475
|
+
async setLeftButtonFocus() {
|
|
128476
|
+
this.leftButton.focus();
|
|
128477
|
+
}
|
|
128478
|
+
/**
|
|
128479
|
+
* Aplica o foco no botão do dropdown.
|
|
128480
|
+
*/
|
|
128481
|
+
async setRightButtonFocus() {
|
|
128482
|
+
this.rightButton.focus();
|
|
128483
|
+
}
|
|
128484
|
+
clickListener(evt) {
|
|
128485
|
+
if (!this.enabled) {
|
|
128486
|
+
evt.preventDefault();
|
|
128487
|
+
evt.stopPropagation();
|
|
128488
|
+
evt.stopImmediatePropagation();
|
|
128489
|
+
}
|
|
128490
|
+
}
|
|
128491
|
+
getIconSize(sizeParam = 'medium') {
|
|
128492
|
+
var _a;
|
|
128493
|
+
const sizeList = ['medium', 'large'];
|
|
128494
|
+
const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
128495
|
+
return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
|
|
128496
|
+
}
|
|
128497
|
+
closeDropdown() {
|
|
128498
|
+
this.show = false;
|
|
128499
|
+
}
|
|
128500
|
+
toggleDropdown() {
|
|
128501
|
+
this.show = !this.show;
|
|
128502
|
+
}
|
|
128503
|
+
handleButtonClick() {
|
|
128504
|
+
this.buttonClick.emit();
|
|
128505
|
+
}
|
|
128506
|
+
handleDropdownItemClick(evt) {
|
|
128507
|
+
this.dropdownItemClick.emit(evt.detail);
|
|
128508
|
+
evt.stopPropagation();
|
|
128509
|
+
this.closeDropdown();
|
|
128510
|
+
}
|
|
128511
|
+
handleDropdownSubActionClick(evt) {
|
|
128512
|
+
this.dropdownSubActionClick.emit(evt.detail);
|
|
128513
|
+
evt.stopPropagation();
|
|
128514
|
+
this.closeDropdown();
|
|
128515
|
+
}
|
|
128516
|
+
resolveOffsetParentRect() {
|
|
128517
|
+
var _a, _b;
|
|
128518
|
+
const offsetParentRect = (_b = (_a = this.dropdownParent) === null || _a === void 0 ? void 0 : _a.offsetParent) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
128519
|
+
const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
|
|
128520
|
+
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
128521
|
+
const rectWithoutScroll = {
|
|
128522
|
+
top: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.top) + scrollTop,
|
|
128523
|
+
left: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.left) + scrollLeft,
|
|
128524
|
+
bottom: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.bottom) + scrollTop,
|
|
128525
|
+
right: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.right) + scrollLeft,
|
|
128526
|
+
width: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.width,
|
|
128527
|
+
height: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.height
|
|
128528
|
+
};
|
|
128529
|
+
this.offsetParentRect = rectWithoutScroll;
|
|
128530
|
+
}
|
|
128531
|
+
/**
|
|
128532
|
+
* Método responsável em posicionar o dropdown na tela.
|
|
128533
|
+
* Faz com que o dropdown se ajuste automaticamente ao espaco na tela
|
|
128534
|
+
*/
|
|
128535
|
+
positionDropdown() {
|
|
128536
|
+
var _a, _b, _c, _d, _e, _f;
|
|
128537
|
+
const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
|
|
128538
|
+
const rightButtonRect = _rightButton.getBoundingClientRect();
|
|
128539
|
+
const dropdownParentRect = _dropdownParent.getBoundingClientRect();
|
|
128540
|
+
const spaceBelow = window.innerHeight - (rightButtonRect.bottom + ((_a = this.offsetParentRect) === null || _a === void 0 ? void 0 : _a.top));
|
|
128541
|
+
const spaceAbove = rightButtonRect.top + ((_b = this.offsetParentRect) === null || _b === void 0 ? void 0 : _b.top);
|
|
128542
|
+
const spaceRight = window.innerWidth - (rightButtonRect.left + ((_c = this.offsetParentRect) === null || _c === void 0 ? void 0 : _c.left));
|
|
128543
|
+
const spaceLeft = rightButtonRect.left;
|
|
128544
|
+
const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
|
|
128545
|
+
const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
|
|
128546
|
+
let top = `${rightButtonRect.bottom - ((_d = this.offsetParentRect) === null || _d === void 0 ? void 0 : _d.top) + window.scrollY}px`;
|
|
128547
|
+
let left = `${rightButtonRect.left - ((_e = this.offsetParentRect) === null || _e === void 0 ? void 0 : _e.left) + window.scrollX}px`;
|
|
128548
|
+
let bottom = 'auto';
|
|
128549
|
+
if (hasSpaceBelow) {
|
|
128550
|
+
bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
|
|
128551
|
+
top = 'auto';
|
|
128552
|
+
_dropdownParent.style.maxHeight = `${spaceAbove}px`;
|
|
128553
|
+
}
|
|
128554
|
+
if (hasSpaceRight) {
|
|
128555
|
+
left = `${rightButtonRect.right - dropdownParentRect.width - ((_f = this.offsetParentRect) === null || _f === void 0 ? void 0 : _f.left) + window.scrollX}px`;
|
|
128556
|
+
}
|
|
128557
|
+
_dropdownParent.style.top = top;
|
|
128558
|
+
_dropdownParent.style.bottom = bottom;
|
|
128559
|
+
_dropdownParent.style.left = left;
|
|
128560
|
+
}
|
|
128561
|
+
setEvents() {
|
|
128562
|
+
window.removeEventListener('scroll', this.positionDropdown.bind(this));
|
|
128563
|
+
window.addEventListener('scroll', this.positionDropdown.bind(this));
|
|
128564
|
+
}
|
|
128565
|
+
componentWillLoad() {
|
|
128566
|
+
this.setEvents();
|
|
128567
|
+
}
|
|
128568
|
+
componentWillRender() {
|
|
128569
|
+
this.resolveOffsetParentRect();
|
|
128570
|
+
}
|
|
128571
|
+
componentDidLoad() {
|
|
128572
|
+
if (this._element)
|
|
128573
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
128574
|
+
if (this.leftButton) {
|
|
128575
|
+
const dataInfo = { id: 'embedded' };
|
|
128576
|
+
ElementIDUtils.addIDInfo(this.leftButton, 'left-button', dataInfo);
|
|
128577
|
+
}
|
|
128578
|
+
if (this.rightButton) {
|
|
128579
|
+
const dataInfo = { id: 'embedded' };
|
|
128580
|
+
ElementIDUtils.addIDInfo(this.rightButton, 'right-button', dataInfo);
|
|
128581
|
+
}
|
|
128582
|
+
this.positionDropdown();
|
|
128583
|
+
}
|
|
128584
|
+
componentDidUpdate() {
|
|
128585
|
+
this.positionDropdown();
|
|
128586
|
+
}
|
|
128587
|
+
render() {
|
|
128588
|
+
const hasIconButton = this.shouldShowIconOnLeftButton();
|
|
128589
|
+
const hasLabelButton = this.shouldShowLabelOnLeftButton();
|
|
128590
|
+
const iconSize = this.getIconSize();
|
|
128591
|
+
return (h("div", { class: "label-icon" }, h("button", { class: `ez-split-button__left-button ${iconSize} ${this.mode}`, title: this.leftTitle || this.label, type: "button", disabled: !this.enabled, onClick: () => { this.handleButtonClick(); }, ref: el => (this.leftButton = el) }, hasIconButton && h("ez-icon", { href: this.image, iconName: this.iconName, size: iconSize }), hasLabelButton && h("label", { title: this.leftTitle || this.label }, this.label)), h("div", { class: "dropdown" }, h("button", { class: `ez-split-button__right-button ${iconSize} ez-split-button__right-button--${iconSize} ez-split-button__right-button--divider`, title: this.rightTitle || this.rightDefaultTitle, type: "button", disabled: !this.enabled, onClick: () => { this.toggleDropdown(); }, ref: el => (this.rightButton = el) }, h("ez-icon", { class: `ez-split-button__right-button-container ` + (iconSize ? `btn-icon--${iconSize}` : ''), iconName: 'chevron-down', size: iconSize })), h("div", { class: `dropdown-content dropdown-content--${this.size}`, ref: (ref) => (this.dropdownParent = ref) }, this.show && (h("ez-dropdown", { items: this.items, onClick: evt => { evt.stopPropagation(); }, onEzOutsideClick: () => { this.closeDropdown(); }, onEzClick: evt => { this.handleDropdownItemClick(evt); }, onEzSubActionClick: evt => { this.handleDropdownSubActionClick(evt); } }))))));
|
|
128592
|
+
}
|
|
128593
|
+
shouldShowLabelOnLeftButton() {
|
|
128594
|
+
return ['icon-left', 'default'].includes(this.mode);
|
|
128595
|
+
}
|
|
128596
|
+
shouldShowIconOnLeftButton() {
|
|
128597
|
+
return ['icon-left', 'icon-only'].includes(this.mode);
|
|
128598
|
+
}
|
|
128599
|
+
get _element() { return this; }
|
|
128600
|
+
static get style() { return ezSplitButtonCss; }
|
|
128601
|
+
};
|
|
128602
|
+
|
|
128603
|
+
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-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}";
|
|
127805
128604
|
|
|
127806
128605
|
const SplitItem = class extends HTMLElement$1 {
|
|
127807
128606
|
constructor() {
|
|
127808
128607
|
super();
|
|
127809
128608
|
this.__registerHost();
|
|
128609
|
+
this.label = undefined;
|
|
128610
|
+
this.enableExpand = true;
|
|
128611
|
+
this._expanded = false;
|
|
128612
|
+
this.size = undefined;
|
|
128613
|
+
}
|
|
128614
|
+
/**
|
|
128615
|
+
* Alterna a visibilidade do painel.
|
|
128616
|
+
*/
|
|
128617
|
+
toggleExpandItem() {
|
|
128618
|
+
this._expanded = !this._expanded;
|
|
128619
|
+
}
|
|
128620
|
+
componentDidLoad() {
|
|
128621
|
+
CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
|
|
127810
128622
|
}
|
|
127811
128623
|
render() {
|
|
127812
|
-
return (h(Host, { class:
|
|
128624
|
+
return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--small ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, h("slot", { name: "rightButtons" }), this.enableExpand && (h("ez-button", { size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })))), h("div", { class: "ez-split-item--content grid_height-0", ref: el => (this._slot = el) }, h("slot", null))));
|
|
127813
128625
|
}
|
|
127814
128626
|
static get style() { return ezSplitItemCss; }
|
|
127815
128627
|
};
|
|
@@ -128498,11 +129310,24 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128498
129310
|
super();
|
|
128499
129311
|
this.__registerHost();
|
|
128500
129312
|
this._items = [];
|
|
129313
|
+
this._buildInProgress = false;
|
|
128501
129314
|
this.direction = 'column';
|
|
129315
|
+
this.anchorToExpand = false;
|
|
128502
129316
|
}
|
|
128503
|
-
|
|
129317
|
+
rebuildLayout() {
|
|
129318
|
+
Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach(el => {
|
|
129319
|
+
el.remove();
|
|
129320
|
+
});
|
|
129321
|
+
Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach(el => {
|
|
129322
|
+
el['rebuildLayout']();
|
|
129323
|
+
});
|
|
129324
|
+
this.buildItems();
|
|
129325
|
+
this.initSplit();
|
|
129326
|
+
}
|
|
129327
|
+
buildItems() {
|
|
128504
129328
|
this._panelID = StringUtils$1.generateUUID();
|
|
128505
129329
|
this._element.dataset.panelId = this._panelID;
|
|
129330
|
+
this._element.dataset.uniqueId = "EzSplitPanel";
|
|
128506
129331
|
let itemsElements = Array.from(this._element.children);
|
|
128507
129332
|
this._items = itemsElements.filter(child => { var _a; return ((_a = child.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'EZ-SPLIT-ITEM'; });
|
|
128508
129333
|
let trackCount = 1;
|
|
@@ -128513,7 +129338,30 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128513
129338
|
}
|
|
128514
129339
|
trackCount += 2;
|
|
128515
129340
|
});
|
|
129341
|
+
}
|
|
129342
|
+
componentDidLoad() {
|
|
129343
|
+
this.buildItems();
|
|
128516
129344
|
this.initSplit();
|
|
129345
|
+
this._mutationObserver = new MutationObserver((mutationsList) => {
|
|
129346
|
+
for (const mutation of mutationsList) {
|
|
129347
|
+
if (mutation.type === 'childList' && this._buildInProgress === false) {
|
|
129348
|
+
this._buildInProgress = true;
|
|
129349
|
+
window.requestAnimationFrame(() => {
|
|
129350
|
+
this.rebuildLayout();
|
|
129351
|
+
});
|
|
129352
|
+
window.requestAnimationFrame(() => this._buildInProgress = false);
|
|
129353
|
+
break;
|
|
129354
|
+
}
|
|
129355
|
+
}
|
|
129356
|
+
});
|
|
129357
|
+
// Configure o observer para observar mudanças nos filhos
|
|
129358
|
+
this._mutationObserver.observe(this._element, { childList: true, subtree: false });
|
|
129359
|
+
}
|
|
129360
|
+
disconnectedCallback() {
|
|
129361
|
+
//disconect o _mutationObserver
|
|
129362
|
+
if (this._mutationObserver != undefined) {
|
|
129363
|
+
this._mutationObserver.disconnect();
|
|
129364
|
+
}
|
|
128517
129365
|
}
|
|
128518
129366
|
initSplit() {
|
|
128519
129367
|
if (!this._items.length) {
|
|
@@ -128525,7 +129373,7 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128525
129373
|
getGutters() {
|
|
128526
129374
|
const gutters = {
|
|
128527
129375
|
columnGutters: [],
|
|
128528
|
-
rowGutters: []
|
|
129376
|
+
rowGutters: [],
|
|
128529
129377
|
};
|
|
128530
129378
|
if (!this._items.length) {
|
|
128531
129379
|
return gutters;
|
|
@@ -128535,19 +129383,19 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128535
129383
|
if (index == this._items.length - 1)
|
|
128536
129384
|
return;
|
|
128537
129385
|
let gutterTrack = item.dataset.trackNumber;
|
|
128538
|
-
if (index ===
|
|
129386
|
+
if (index === this._items.length - 1) {
|
|
128539
129387
|
gutterTrack = this._items.length.toString();
|
|
128540
129388
|
}
|
|
128541
129389
|
gutters[proToChange].push({
|
|
128542
129390
|
track: Number(gutterTrack),
|
|
128543
|
-
element: this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${item.dataset.trackNumber}"]`)
|
|
129391
|
+
element: this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${item.dataset.trackNumber}"]`),
|
|
128544
129392
|
});
|
|
128545
129393
|
});
|
|
128546
129394
|
return gutters;
|
|
128547
129395
|
}
|
|
128548
129396
|
addItemGutter(item) {
|
|
128549
129397
|
const gutter = document.createElement('div');
|
|
128550
|
-
gutter.classList.add(
|
|
129398
|
+
gutter.classList.add('ez-split-gutter');
|
|
128551
129399
|
gutter.classList.add(this.direction);
|
|
128552
129400
|
gutter.dataset.itemTrack = `${item.dataset.trackNumber}`;
|
|
128553
129401
|
gutter.dataset.trackNumber = (Number(item.dataset.trackNumber) + 1).toString();
|
|
@@ -128555,29 +129403,47 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128555
129403
|
}
|
|
128556
129404
|
getElementStyle() {
|
|
128557
129405
|
const style = {
|
|
128558
|
-
|
|
128559
|
-
|
|
128560
|
-
|
|
129406
|
+
display: 'grid',
|
|
129407
|
+
height: '100%',
|
|
129408
|
+
width: '100%',
|
|
129409
|
+
position: this.anchorToExpand ? 'relative' : 'unset',
|
|
128561
129410
|
};
|
|
128562
129411
|
return style;
|
|
128563
129412
|
}
|
|
129413
|
+
calcFreeSpacePercentage() {
|
|
129414
|
+
const inUseSpacePercentage = this._items.reduce((accumulator, currentValue) => {
|
|
129415
|
+
var _a;
|
|
129416
|
+
return accumulator + (((_a = currentValue.size) === null || _a === void 0 ? void 0 : _a.includes('%')) ? Number(currentValue.size.replace("%", "")) : 0);
|
|
129417
|
+
}, 0);
|
|
129418
|
+
const itemsWithoutSizeAmount = this._items.filter((item) => item.size === undefined).length;
|
|
129419
|
+
if (!itemsWithoutSizeAmount || !inUseSpacePercentage) {
|
|
129420
|
+
return null;
|
|
129421
|
+
}
|
|
129422
|
+
const freeSpacePercentage = ((100 - inUseSpacePercentage) / itemsWithoutSizeAmount);
|
|
129423
|
+
return freeSpacePercentage;
|
|
129424
|
+
}
|
|
128564
129425
|
getGridTemplate() {
|
|
128565
129426
|
let template = '';
|
|
128566
|
-
this.
|
|
129427
|
+
const freeSpacePercentage = this.calcFreeSpacePercentage();
|
|
129428
|
+
this._items.forEach((col, index) => {
|
|
129429
|
+
let size = col.size || '1fr';
|
|
129430
|
+
if (!col.size && freeSpacePercentage) {
|
|
129431
|
+
size = `${freeSpacePercentage}%`;
|
|
129432
|
+
}
|
|
128567
129433
|
if (index === this._items.length - 1) {
|
|
128568
|
-
template += `
|
|
129434
|
+
template += ` ${size}`;
|
|
128569
129435
|
return;
|
|
128570
129436
|
}
|
|
128571
129437
|
if (index === 0) {
|
|
128572
|
-
template +=
|
|
129438
|
+
template += `${size} 5px`;
|
|
128573
129439
|
return;
|
|
128574
129440
|
}
|
|
128575
|
-
template += `
|
|
129441
|
+
template += ` ${size} 5px`;
|
|
128576
129442
|
});
|
|
128577
129443
|
return template;
|
|
128578
129444
|
}
|
|
128579
129445
|
render() {
|
|
128580
|
-
return
|
|
129446
|
+
return h(Host, { style: this.getElementStyle() });
|
|
128581
129447
|
}
|
|
128582
129448
|
get _element() { return this; }
|
|
128583
129449
|
static get style() { return ezSplitPanelCss; }
|
|
@@ -129602,7 +130468,7 @@ const TreeItem = (props) => {
|
|
|
129602
130468
|
itemsList.push(treeItem);
|
|
129603
130469
|
}
|
|
129604
130470
|
return (h("ul", { class: level === 1 ? "first-level" : undefined },
|
|
129605
|
-
h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ?
|
|
130471
|
+
h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem) }, {
|
|
129606
130472
|
disabled,
|
|
129607
130473
|
selected: treeItem.id === selectedId,
|
|
129608
130474
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
|
|
@@ -129610,11 +130476,25 @@ const TreeItem = (props) => {
|
|
|
129610
130476
|
h("div", { class: "item-label-container" },
|
|
129611
130477
|
h("div", { class: "item-icon-box" }, expandable &&
|
|
129612
130478
|
h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })),
|
|
129613
|
-
h("label", { class: "item-label" }, treeItem.label)),
|
|
129614
|
-
|
|
130479
|
+
h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)),
|
|
130480
|
+
getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)),
|
|
129615
130481
|
expanded
|
|
129616
130482
|
&& node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
|
|
129617
130483
|
};
|
|
130484
|
+
function getBadgeElement(itemId, badge, isSelectedItem) {
|
|
130485
|
+
if (badge == undefined) {
|
|
130486
|
+
return;
|
|
130487
|
+
}
|
|
130488
|
+
if (typeof badge === "string") {
|
|
130489
|
+
return h("div", { class: `tree-item-badge ${isSelectedItem ? null : badge}` }, badge === "error" &&
|
|
130490
|
+
h("ez-icon", { id: `${itemId}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" }));
|
|
130491
|
+
}
|
|
130492
|
+
if (badge.type === "text") {
|
|
130493
|
+
return h("div", { id: `${itemId}-badge-text`, class: "tree-item-badge-text" }, badge.text);
|
|
130494
|
+
}
|
|
130495
|
+
return h("div", null,
|
|
130496
|
+
h("ez-icon", { id: `${itemId}-badge-icon`, class: "tree-item-badge-icon", style: { "--ez-icon--color": `var(--ez-tree__badge--icon-color--${badge.iconColor || "default"})` }, iconName: badge.iconName }));
|
|
130497
|
+
}
|
|
129618
130498
|
|
|
129619
130499
|
class Node$1 {
|
|
129620
130500
|
constructor(tree, item, parent, isPlaceHolder = false) {
|
|
@@ -129858,7 +130738,7 @@ class Tree extends Node$1 {
|
|
|
129858
130738
|
}
|
|
129859
130739
|
}
|
|
129860
130740
|
|
|
129861
|
-
const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:calc(var(--space--small, 6px) + 2px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center}.tree-item{display:flex;align-items:center;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
|
|
130741
|
+
const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:calc(var(--space--small, 6px) + 2px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree--font-weight--bold:var(--text-weight--large, 600);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);--ez-tree__badge--icon-color--default:var(--title--primary, #2B3A54);--ez-tree__badge--icon-color--error:var(--color--error, #da4453);--ez-tree__badge--icon-color--success:var(--color-alert--success-800, #157a00);--ez-tree__badge--icon-color--warning:var(--color--warning, #f2d410);--ez-tree__badge--icon-color--disabled:var(--text--disable, #AFB6C0);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge-text{font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center}.tree-item{display:flex;align-items:center;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.item-label--bold{font-weight:var(--ez-tree--font-weight--bold)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
|
|
129862
130742
|
|
|
129863
130743
|
const EzTree$1 = class extends HTMLElement$1 {
|
|
129864
130744
|
constructor() {
|
|
@@ -130631,6 +131511,8 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
130631
131511
|
this.TOP_POSITION_NO_TASKBAR = '32';
|
|
130632
131512
|
this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
|
|
130633
131513
|
this.DEFAULT_HEIGHT = 430;
|
|
131514
|
+
this.FIX_MARGIN = 60;
|
|
131515
|
+
this.FILTER_COLUMN_WIDTH = 330;
|
|
130634
131516
|
this.opened = true;
|
|
130635
131517
|
this.columnName = undefined;
|
|
130636
131518
|
this.columnLabel = undefined;
|
|
@@ -130663,15 +131545,24 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
130663
131545
|
await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
|
|
130664
131546
|
}
|
|
130665
131547
|
}
|
|
130666
|
-
calculateLeftPosition(
|
|
130667
|
-
|
|
130668
|
-
|
|
131548
|
+
calculateLeftPosition({ leftPosition, fromIcon }) {
|
|
131549
|
+
const leftPositionCalculated = this.calcFilterColumnLeftPosition(leftPosition);
|
|
131550
|
+
if (!fromIcon) {
|
|
131551
|
+
return `${leftPositionCalculated}px`;
|
|
130669
131552
|
}
|
|
130670
131553
|
const difference = this.ezPopoverElement.getBoundingClientRect().left;
|
|
130671
|
-
const
|
|
130672
|
-
const leftResolved = (leftReference + 16) - difference;
|
|
131554
|
+
const leftResolved = (leftPositionCalculated + 16) - difference;
|
|
130673
131555
|
return `${(leftResolved > 0 ? leftResolved : 0)}px`;
|
|
130674
131556
|
}
|
|
131557
|
+
calcFilterColumnLeftPosition(leftReference) {
|
|
131558
|
+
var _a, _b;
|
|
131559
|
+
const gridReference = this.ezPopoverElement.closest("ez-grid");
|
|
131560
|
+
const gridLimit = (_a = gridReference.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.right;
|
|
131561
|
+
const popoverDiff = (_b = this.ezPopoverElement.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.left;
|
|
131562
|
+
const maxLeft = gridLimit - (this.FILTER_COLUMN_WIDTH + popoverDiff);
|
|
131563
|
+
const leftInt = leftReference - (this.FIX_MARGIN + popoverDiff);
|
|
131564
|
+
return leftInt > maxLeft ? maxLeft : leftInt;
|
|
131565
|
+
}
|
|
130675
131566
|
buildIsTextSearch() {
|
|
130676
131567
|
var _a, _b;
|
|
130677
131568
|
const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
|
|
@@ -130785,21 +131676,21 @@ const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
|
|
|
130785
131676
|
|
|
130786
131677
|
const EzActionsButton = /*@__PURE__*/proxyCustomElement(EzActionsButton$1, [1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32]}]);
|
|
130787
131678
|
const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
|
|
130788
|
-
const EzAlertList = /*@__PURE__*/proxyCustomElement(EzAlertList$1, [1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540]}]);
|
|
131679
|
+
const EzAlertList = /*@__PURE__*/proxyCustomElement(EzAlertList$1, [1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540],"_container":[32]}]);
|
|
130789
131680
|
const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
|
|
130790
131681
|
const EzBadge = /*@__PURE__*/proxyCustomElement(EzBadge$1, [1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"hasSlot":[32]}]);
|
|
130791
131682
|
const EzBreadcrumb = /*@__PURE__*/proxyCustomElement(EzBreadcrumb$1, [1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]);
|
|
130792
131683
|
const EzButton = /*@__PURE__*/proxyCustomElement(EzButton$1, [1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]},[[2,"click","clickListener"]]]);
|
|
130793
131684
|
const EzCalendar = /*@__PURE__*/proxyCustomElement(EzCalendar$1, [1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"]},[[11,"scroll","scrollListener"]]]);
|
|
130794
|
-
const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-item",{"item":[16]}]);
|
|
131685
|
+
const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-item",{"item":[16],"enableKey":[4,"enable-key"]}]);
|
|
130795
131686
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
130796
131687
|
const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"]}]);
|
|
130797
131688
|
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32]}]);
|
|
130798
|
-
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"
|
|
131689
|
+
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
130799
131690
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
130800
131691
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
130801
131692
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040]},[[8,"keydown","handleKeyDown"]]]);
|
|
130802
|
-
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]}]);
|
|
131693
|
+
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]]);
|
|
130803
131694
|
const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]);
|
|
130804
131695
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"]}]);
|
|
130805
131696
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"]}]);
|
|
@@ -130817,11 +131708,12 @@ const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{
|
|
|
130817
131708
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]);
|
|
130818
131709
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
130819
131710
|
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
130820
|
-
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"]}]);
|
|
131711
|
+
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
130821
131712
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
130822
131713
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
130823
|
-
const
|
|
130824
|
-
const
|
|
131714
|
+
const EzSplitButton = /*@__PURE__*/proxyCustomElement(EzSplitButton$1, [1,"ez-split-button",{"enabled":[516],"iconName":[513,"icon-name"],"image":[513],"items":[16],"label":[513],"leftTitle":[513,"left-title"],"rightTitle":[513,"right-title"],"mode":[513],"size":[513],"show":[32]},[[2,"click","clickListener"]]]);
|
|
131715
|
+
const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"_expanded":[32]}]);
|
|
131716
|
+
const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"]}]);
|
|
130825
131717
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
130826
131718
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"]}]);
|
|
130827
131719
|
const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
|
|
@@ -130873,6 +131765,7 @@ const defineCustomElements = (opts) => {
|
|
|
130873
131765
|
EzSearch,
|
|
130874
131766
|
EzSidebarButton,
|
|
130875
131767
|
EzSkeleton,
|
|
131768
|
+
EzSplitButton,
|
|
130876
131769
|
EzSplitItem,
|
|
130877
131770
|
EzSplitPanel,
|
|
130878
131771
|
EzTabselector,
|
|
@@ -130894,4 +131787,4 @@ const defineCustomElements = (opts) => {
|
|
|
130894
131787
|
}
|
|
130895
131788
|
};
|
|
130896
131789
|
|
|
130897
|
-
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
|
|
131790
|
+
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitButton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
|