@sankhyalabs/ezui 5.20.4 → 5.21.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +123 -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 +3 -3
- 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 +48 -16
- package/dist/cjs/ez-form.cjs.entry.js +29 -3
- package/dist/cjs/ez-grid.cjs.entry.js +216 -72
- 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 +19 -3
- package/dist/cjs/ez-modal.cjs.entry.js +8 -9
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +10 -3
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +21 -8
- 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 +625 -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 +129 -48
- package/dist/collection/components/ez-button/ez-button.css +7 -0
- package/dist/collection/components/ez-button/ez-button.js +1 -1
- 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/ez-form.js +76 -2
- package/dist/collection/components/ez-form-view/ez-form-view.css +17 -1
- package/dist/collection/components/ez-form-view/ez-form-view.js +60 -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 +26 -13
- 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 +228 -35
- package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +16 -5
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +3 -11
- package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js +24 -0
- package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js +19 -0
- package/dist/collection/components/ez-icon/ez-icon.css +119 -117
- package/dist/collection/components/ez-modal/ez-modal.js +22 -9
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +4 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +26 -1
- package/dist/collection/components/ez-number-input/ez-number-input.js +11 -0
- package/dist/collection/components/ez-popup/ez-popup.css +2 -5
- package/dist/collection/components/ez-popup/ez-popup.js +35 -8
- package/dist/collection/components/ez-search/ez-search.css +331 -0
- package/dist/collection/components/ez-search/ez-search.js +701 -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 +1427 -397
- 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 +123 -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 +3 -3
- 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 +48 -16
- package/dist/esm/ez-form.entry.js +29 -3
- package/dist/esm/ez-grid.entry.js +217 -73
- 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 +19 -3
- package/dist/esm/ez-modal.entry.js +9 -10
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +10 -3
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +22 -9
- 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 +626 -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-09de35a2.entry.js +1 -0
- package/dist/ezui/p-13d2fe2d.entry.js +1 -0
- package/dist/ezui/{p-f4208819.entry.js → p-17be134a.entry.js} +1 -1
- package/dist/ezui/{p-545b5b2f.entry.js → p-1db718ab.entry.js} +2 -2
- 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-30775e7f.entry.js +1 -0
- package/dist/ezui/{p-8252d9b5.entry.js → p-3a21618b.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-7525e604.entry.js → p-5ed81457.entry.js} +1 -1
- 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-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-7c770f14.entry.js +1 -0
- package/dist/ezui/p-836cdfdf.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-99f46950.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-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-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-d9401ea0.entry.js +1 -0
- package/dist/ezui/{p-028f264f.entry.js → p-e85c48d7.entry.js} +1 -1
- package/dist/ezui/p-f3c526cc.entry.js +1 -0
- 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/ez-form.d.ts +12 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +7 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +10 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -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 +35 -3
- package/dist/types/components/ez-grid/interfaces/ICustomFormatter.d.ts +5 -0
- package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +4 -1
- package/dist/types/components/ez-grid/subcomponents/utils/selectionCounterUtils.d.ts +4 -0
- package/dist/types/components/ez-grid/test/resources/gridDataUnit.d.ts +2 -0
- package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +0 -1
- package/dist/types/components/ez-modal/ez-modal.d.ts +9 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +1 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +9 -3
- 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 +225 -16
- 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-12526044.entry.js +0 -1
- package/dist/ezui/p-32b4163f.entry.js +0 -1
- package/dist/ezui/p-47afb974.entry.js +0 -1
- package/dist/ezui/p-59bcb27c.entry.js +0 -1
- package/dist/ezui/p-62304715.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,162 @@ 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
|
+
getLinkActionClick(item) {
|
|
1167
|
+
var _a;
|
|
1168
|
+
const action = (_a = this.alerts.find((alert, index) => this.alertId(alert.title, index) === item.id)) === null || _a === void 0 ? void 0 : _a.onClickLink;
|
|
1169
|
+
if (action)
|
|
1170
|
+
return action;
|
|
1171
|
+
return () => { };
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* Retorna o texto do título do alerta.
|
|
1175
|
+
*/
|
|
1176
|
+
getTitleText(item) {
|
|
1177
|
+
var _a;
|
|
1178
|
+
const title = (_a = this.getAlertTitle(item.id)) !== null && _a !== void 0 ? _a : '';
|
|
1179
|
+
return `${title}${(title && item.label) ? ':' : ''}`;
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Gerencia a exibição do conteúdo expandido.
|
|
1183
|
+
*/
|
|
1184
|
+
toggleExpandContainer() {
|
|
1185
|
+
if (!this.enableExpand) {
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
this.expanded = !this.expanded;
|
|
1189
|
+
this._container.classList.toggle('expanded', this.expanded);
|
|
1190
|
+
if (this.expanded) {
|
|
1191
|
+
this.updatePosition(this.getBoundingRight(), this.getBoundingBottom());
|
|
1192
|
+
}
|
|
1193
|
+
else {
|
|
1194
|
+
this.updatePosition(`10px`, `10px`);
|
|
1195
|
+
}
|
|
1132
1196
|
}
|
|
1133
1197
|
/**
|
|
1134
1198
|
* Gerencia a exibição do overlay usando FloatingManager do Core.
|
|
1135
1199
|
*/
|
|
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
|
-
});
|
|
1200
|
+
manageOverlay() {
|
|
1201
|
+
if (this.opened && this._container) {
|
|
1202
|
+
this._overlayId = FloatingManager.float(this._container, this._overlayRef, this.getFloatOptions());
|
|
1144
1203
|
}
|
|
1145
1204
|
else {
|
|
1205
|
+
if (this._overlayId === undefined)
|
|
1206
|
+
return;
|
|
1146
1207
|
FloatingManager.close(this._overlayId);
|
|
1147
1208
|
this._overlayId = undefined;
|
|
1148
1209
|
}
|
|
1149
1210
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1211
|
+
/**
|
|
1212
|
+
* Atualiza a posição da lista.
|
|
1213
|
+
*/
|
|
1214
|
+
updatePosition(right, bottom) {
|
|
1152
1215
|
if (this.opened) {
|
|
1153
|
-
this._container.
|
|
1216
|
+
FloatingManager.updateFloatPosition(this._container, this._overlayRef, Object.assign(Object.assign({}, this.getFloatOptions()), { right,
|
|
1217
|
+
bottom }));
|
|
1154
1218
|
}
|
|
1155
1219
|
}
|
|
1156
|
-
|
|
1157
|
-
|
|
1220
|
+
;
|
|
1221
|
+
/**
|
|
1222
|
+
* Retorna valores padrões do componente
|
|
1223
|
+
*/
|
|
1224
|
+
getFloatOptions() {
|
|
1225
|
+
return {
|
|
1226
|
+
autoClose: false,
|
|
1227
|
+
isFixed: true,
|
|
1228
|
+
bottom: '10px',
|
|
1229
|
+
right: '10px',
|
|
1230
|
+
};
|
|
1158
1231
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1232
|
+
;
|
|
1233
|
+
/**
|
|
1234
|
+
* Retorna o valor para o alinhamento horizontal do componente.
|
|
1235
|
+
*/
|
|
1236
|
+
getBoundingRight() {
|
|
1237
|
+
const docWidth = document.body.clientWidth;
|
|
1238
|
+
const boxWidth = this._container.getBoundingClientRect().width;
|
|
1239
|
+
return ((docWidth - boxWidth) / 2) + 'px';
|
|
1162
1240
|
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1241
|
+
/**
|
|
1242
|
+
* Retorna o valor para o alinhamento vertical do componente.
|
|
1243
|
+
*/
|
|
1244
|
+
getBoundingBottom() {
|
|
1245
|
+
const docHeight = document.body.clientHeight;
|
|
1246
|
+
const boxHeight = this._container.getBoundingClientRect().height;
|
|
1247
|
+
return ((docHeight - boxHeight) / 2) + 'px';
|
|
1166
1248
|
}
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1249
|
+
componentDidLoad() {
|
|
1250
|
+
this.manageOverlay();
|
|
1251
|
+
if (this.opened && this._container) {
|
|
1252
|
+
this._container.focus();
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
componentWillLoad() {
|
|
1256
|
+
this.dataElementId = ElementIDUtils.addIDInfo(this._element, 'EzAlertList');
|
|
1171
1257
|
}
|
|
1172
1258
|
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
|
-
|
|
1259
|
+
return (h(Host, Object.assign({}, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: this.dataElementId }), this.opened ?
|
|
1260
|
+
(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: () => {
|
|
1261
|
+
this.opened = false;
|
|
1262
|
+
}, title: 'Fechar' }))), h("div", { class: "alert-list__expandable-content" }, h("ez-list", { itemSlotBuilder: this.itemRightSlotBuilder, hoverFeedback: true, itemLeftSlotBuilder: item => {
|
|
1263
|
+
return (h("a", { onClick: this.getLinkActionClick(item), style: {
|
|
1264
|
+
fontFamily: "var(--font-pattern, 'Roboto')",
|
|
1265
|
+
fontSize: 'var(--text--medium, 14px)',
|
|
1266
|
+
fontWeight: 'var(--text-weight--medium, 400)',
|
|
1267
|
+
color: 'var(--color--primary, #008561)',
|
|
1268
|
+
marginRight: '4px',
|
|
1269
|
+
cursor: 'pointer',
|
|
1270
|
+
display: 'flex',
|
|
1271
|
+
width: 'max-content',
|
|
1272
|
+
textDecoration: 'none'
|
|
1273
|
+
} }, this.getTitleText(item)));
|
|
1274
|
+
}, dataSource: this.alerts.map((alert, index) => {
|
|
1275
|
+
var _a;
|
|
1276
|
+
return {
|
|
1277
|
+
id: this.alertId(alert.title, index),
|
|
1278
|
+
label: (_a = alert.detail) !== null && _a !== void 0 ? _a : "",
|
|
1279
|
+
};
|
|
1280
|
+
}) })))))) : null));
|
|
1194
1281
|
}
|
|
1195
1282
|
get _element() { return this; }
|
|
1196
1283
|
static get watchers() { return {
|
|
1197
|
-
"
|
|
1284
|
+
"_container": ["observeOpened"]
|
|
1198
1285
|
}; }
|
|
1199
1286
|
static get style() { return ezAlertListCss; }
|
|
1200
1287
|
};
|
|
@@ -1612,7 +1699,7 @@ const EzBreadcrumb$1 = class extends HTMLElement$1 {
|
|
|
1612
1699
|
static get style() { return ezBreadcrumbCss; }
|
|
1613
1700
|
};
|
|
1614
1701
|
|
|
1615
|
-
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}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-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
|
|
1702
|
+
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link-disabled-color:var(--color--disable-primary, '#e5eaf0');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}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-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}a.disabled{color:var(--ez-button--link-disabled-color);cursor:not-allowed}";
|
|
1616
1703
|
|
|
1617
1704
|
const EzButton$1 = class extends HTMLElement$1 {
|
|
1618
1705
|
constructor() {
|
|
@@ -1683,7 +1770,7 @@ const EzButton$1 = class extends HTMLElement$1 {
|
|
|
1683
1770
|
return (h("div", { class: "label-icon" }, h("button", { class: "btn-icon " + ((this.getIconSize()) ? `btn-icon--${this.getIconSize()}` : ""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize() })), h("label", { title: this.label }, this.label)));
|
|
1684
1771
|
}
|
|
1685
1772
|
else if (this.mode == "link") {
|
|
1686
|
-
return (h("a", { class: this.getIconSize()
|
|
1773
|
+
return (h("a", { class: `${this.getIconSize()} ${!this.enabled ? "disabled" : ""}`, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
|
|
1687
1774
|
}
|
|
1688
1775
|
else {
|
|
1689
1776
|
return (h("button", { class: this.getIconSize(""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
|
|
@@ -1925,7 +2012,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
1925
2012
|
static get style() { return ezCalendarCss; }
|
|
1926
2013
|
};
|
|
1927
2014
|
|
|
1928
|
-
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px)
|
|
2015
|
+
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
2016
|
|
|
1930
2017
|
const EzCardItem$1 = class extends HTMLElement$1 {
|
|
1931
2018
|
constructor() {
|
|
@@ -1934,6 +2021,7 @@ const EzCardItem$1 = class extends HTMLElement$1 {
|
|
|
1934
2021
|
this.__attachShadow();
|
|
1935
2022
|
this.ezClick = createEvent(this, "ezClick", 7);
|
|
1936
2023
|
this.item = undefined;
|
|
2024
|
+
this.enableKey = true;
|
|
1937
2025
|
}
|
|
1938
2026
|
componentWillRender() {
|
|
1939
2027
|
this.createDetailList();
|
|
@@ -1961,17 +2049,17 @@ const EzCardItem$1 = class extends HTMLElement$1 {
|
|
|
1961
2049
|
}
|
|
1962
2050
|
render() {
|
|
1963
2051
|
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-
|
|
2052
|
+
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
2053
|
return this.buildDetailContent(detail);
|
|
1966
|
-
})), h("div", { class: "card-item__details-
|
|
2054
|
+
})), h("div", { class: "card-item__details-container__right" }, this._details.detailsRight.map(detail => {
|
|
1967
2055
|
return this.buildDetailContent(detail);
|
|
1968
|
-
}))))));
|
|
2056
|
+
})))), h("div", { class: "ez-col ez-col--sd-1 card-item__details-slot" }, h("slot", { name: "rightSlot" }))))));
|
|
1969
2057
|
}
|
|
1970
2058
|
get _element() { return this; }
|
|
1971
2059
|
static get style() { return ezCardItemCss; }
|
|
1972
2060
|
};
|
|
1973
2061
|
|
|
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)}";
|
|
2062
|
+
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
2063
|
|
|
1976
2064
|
const EzCheck$1 = class extends HTMLElement$1 {
|
|
1977
2065
|
constructor() {
|
|
@@ -2292,10 +2380,6 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
2292
2380
|
static get style() { return ezCollapsibleBoxCss; }
|
|
2293
2381
|
};
|
|
2294
2382
|
|
|
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
2383
|
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
2384
|
|
|
2301
2385
|
const EzComboBox$1 = class extends HTMLElement$1 {
|
|
@@ -2309,7 +2393,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2309
2393
|
this._maxWidthValue = 0;
|
|
2310
2394
|
this._tabPressed = false;
|
|
2311
2395
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
2312
|
-
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
2313
2396
|
this._lookupMode = false;
|
|
2314
2397
|
this._preSelection = undefined;
|
|
2315
2398
|
this._visibleOptions = undefined;
|
|
@@ -2322,7 +2405,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2322
2405
|
this.enabled = true;
|
|
2323
2406
|
this.options = undefined;
|
|
2324
2407
|
this.errorMessage = undefined;
|
|
2325
|
-
this.searchMode = undefined;
|
|
2326
2408
|
this.showSelectedValue = false;
|
|
2327
2409
|
this.showOptionValue = false;
|
|
2328
2410
|
this.suppressSearch = false;
|
|
@@ -2346,7 +2428,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2346
2428
|
observeValue(newValue, oldValue) {
|
|
2347
2429
|
if (this._textInput && newValue != oldValue) {
|
|
2348
2430
|
try {
|
|
2349
|
-
if (
|
|
2431
|
+
if (typeof newValue === "string") {
|
|
2350
2432
|
this.setInputValue();
|
|
2351
2433
|
return;
|
|
2352
2434
|
}
|
|
@@ -2371,9 +2453,9 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2371
2453
|
}
|
|
2372
2454
|
}
|
|
2373
2455
|
observeOptions(newOptions, oldOptions) {
|
|
2374
|
-
if ((newOptions
|
|
2456
|
+
if (ObjectUtils$1.equals(newOptions, oldOptions))
|
|
2375
2457
|
return;
|
|
2376
|
-
this.loadOptions(SearchMode.PRELOAD);
|
|
2458
|
+
this.loadOptions(SearchMode$1.PRELOAD);
|
|
2377
2459
|
}
|
|
2378
2460
|
/*
|
|
2379
2461
|
* Retorna uma promise com o valor da opção selecionada,
|
|
@@ -2509,18 +2591,19 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2509
2591
|
}
|
|
2510
2592
|
updateVisibleOptions() {
|
|
2511
2593
|
let opts = this._source || [];
|
|
2512
|
-
if (
|
|
2594
|
+
if (this._criteria) {
|
|
2513
2595
|
const upperCriteria = this._criteria.toUpperCase();
|
|
2514
2596
|
opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
|
|
2515
2597
|
}
|
|
2516
|
-
if (this.
|
|
2517
|
-
|
|
2518
|
-
}
|
|
2519
|
-
else {
|
|
2520
|
-
this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
|
|
2598
|
+
if (this.hasToAddEmptyoption(opts)) {
|
|
2599
|
+
opts = [{ value: undefined, label: "" }].concat(opts);
|
|
2521
2600
|
}
|
|
2601
|
+
this._visibleOptions = opts;
|
|
2522
2602
|
this._maxWidthValue = this.getMaxWidthValue();
|
|
2523
2603
|
}
|
|
2604
|
+
hasToAddEmptyoption(opts) {
|
|
2605
|
+
return !this.suppressEmptyOption && !opts.filter(opt => !opt.value).length;
|
|
2606
|
+
}
|
|
2524
2607
|
getMaxWidthValue() {
|
|
2525
2608
|
var _a;
|
|
2526
2609
|
if (this.showOptionValue) {
|
|
@@ -2584,7 +2667,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2584
2667
|
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
2585
2668
|
}
|
|
2586
2669
|
nextOption() {
|
|
2587
|
-
if (
|
|
2670
|
+
if (!this.isOptionsVisible()) {
|
|
2588
2671
|
return;
|
|
2589
2672
|
}
|
|
2590
2673
|
this.showOptions();
|
|
@@ -2607,9 +2690,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2607
2690
|
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
2608
2691
|
this._preSelection = undefined;
|
|
2609
2692
|
}
|
|
2610
|
-
else {
|
|
2611
|
-
this.controlListWithOnlyOne();
|
|
2612
|
-
}
|
|
2613
2693
|
}
|
|
2614
2694
|
updateSource(source) {
|
|
2615
2695
|
this._startLoading = false;
|
|
@@ -2628,7 +2708,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2628
2708
|
this.updateVisibleOptions();
|
|
2629
2709
|
if (this._tabPressed) {
|
|
2630
2710
|
this._tabPressed = false;
|
|
2631
|
-
this.controlEmptySearch();
|
|
2632
2711
|
}
|
|
2633
2712
|
}
|
|
2634
2713
|
else {
|
|
@@ -2636,10 +2715,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2636
2715
|
}
|
|
2637
2716
|
}
|
|
2638
2717
|
}
|
|
2639
|
-
clearSource() {
|
|
2640
|
-
this._source = [];
|
|
2641
|
-
this.updateVisibleOptions();
|
|
2642
|
-
}
|
|
2643
2718
|
selectOption(newOption) {
|
|
2644
2719
|
var _a, _b;
|
|
2645
2720
|
const currentValue = this.getSelectedOption(this.value);
|
|
@@ -2651,10 +2726,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2651
2726
|
else {
|
|
2652
2727
|
this.resetOptions();
|
|
2653
2728
|
}
|
|
2654
|
-
if (this.searchMode) {
|
|
2655
|
-
this._visibleOptions = [];
|
|
2656
|
-
this.clearSource();
|
|
2657
|
-
}
|
|
2658
2729
|
}
|
|
2659
2730
|
loadOptions(mode, argument = "") {
|
|
2660
2731
|
this._criteria = argument;
|
|
@@ -2690,93 +2761,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2690
2761
|
clearSearch() {
|
|
2691
2762
|
this.value = null;
|
|
2692
2763
|
}
|
|
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
2764
|
resetOptions() {
|
|
2781
2765
|
this.hideOptions();
|
|
2782
2766
|
this._criteria = undefined;
|
|
@@ -2802,12 +2786,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2802
2786
|
});
|
|
2803
2787
|
}
|
|
2804
2788
|
}
|
|
2805
|
-
|
|
2806
|
-
this.updateSource([]);
|
|
2807
|
-
}
|
|
2808
|
-
else {
|
|
2809
|
-
this.loadOptions(SearchMode.PRELOAD);
|
|
2810
|
-
}
|
|
2789
|
+
this.loadOptions(SearchMode$1.PRELOAD);
|
|
2811
2790
|
}
|
|
2812
2791
|
componentDidRender() {
|
|
2813
2792
|
var _a;
|
|
@@ -2817,7 +2796,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2817
2796
|
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
2818
2797
|
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
2819
2798
|
});
|
|
2820
|
-
this.validateDescriptionValue();
|
|
2821
2799
|
}
|
|
2822
2800
|
componentDidLoad() {
|
|
2823
2801
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
@@ -2837,13 +2815,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2837
2815
|
// Event handlers
|
|
2838
2816
|
//---------------------------------------------
|
|
2839
2817
|
handlerIconClick() {
|
|
2840
|
-
this.
|
|
2841
|
-
}
|
|
2842
|
-
buildNumberArgument(argument) {
|
|
2843
|
-
if (this.isTextSearch) {
|
|
2844
|
-
return NaN;
|
|
2845
|
-
}
|
|
2846
|
-
return Number(argument || undefined);
|
|
2818
|
+
this.showOptions();
|
|
2847
2819
|
}
|
|
2848
2820
|
onTextInputChangeHandler(event) {
|
|
2849
2821
|
var _a;
|
|
@@ -2860,36 +2832,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2860
2832
|
}
|
|
2861
2833
|
this._criteria = argument;
|
|
2862
2834
|
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
|
-
}
|
|
2835
|
+
this.updateVisibleOptions();
|
|
2836
|
+
this.showOptions();
|
|
2883
2837
|
}
|
|
2884
2838
|
else {
|
|
2885
2839
|
this.hideOptions();
|
|
2886
|
-
|
|
2887
|
-
this._showLoading = false;
|
|
2888
|
-
this.clearSource();
|
|
2889
|
-
}
|
|
2890
|
-
else {
|
|
2891
|
-
this.updateVisibleOptions();
|
|
2892
|
-
}
|
|
2840
|
+
this.updateVisibleOptions();
|
|
2893
2841
|
}
|
|
2894
2842
|
}
|
|
2895
2843
|
clearDeboucingTimeout() {
|
|
@@ -2899,15 +2847,13 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2899
2847
|
}
|
|
2900
2848
|
}
|
|
2901
2849
|
onTextInputClickHandler() {
|
|
2902
|
-
|
|
2903
|
-
this.showOptions();
|
|
2904
|
-
}
|
|
2850
|
+
this.showOptions();
|
|
2905
2851
|
}
|
|
2906
2852
|
keyDownHandler(event) {
|
|
2907
2853
|
this._tabPressed = false;
|
|
2908
2854
|
if (event.ctrlKey) {
|
|
2909
2855
|
if (event.key === "f" || event.key === "F") {
|
|
2910
|
-
this.loadOptions(SearchMode.ADVANCED);
|
|
2856
|
+
this.loadOptions(SearchMode$1.ADVANCED);
|
|
2911
2857
|
//ATENÇÃO: Ctrl + F tem ação específica nos browsers
|
|
2912
2858
|
//nesse caso, como vamos abrir o popup de busca avançada,
|
|
2913
2859
|
//não é interessante deixar o evento propagar;
|
|
@@ -2933,7 +2879,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2933
2879
|
break;
|
|
2934
2880
|
case "Tab":
|
|
2935
2881
|
this._tabPressed = true;
|
|
2936
|
-
this.controlListWithOnlyOne();
|
|
2937
2882
|
break;
|
|
2938
2883
|
}
|
|
2939
2884
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
@@ -2950,11 +2895,8 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2950
2895
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
2951
2896
|
}
|
|
2952
2897
|
render() {
|
|
2953
|
-
var _a;
|
|
2954
2898
|
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
|
|
2899
|
+
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
2900
|
&& this._visibleOptions.length === 0
|
|
2959
2901
|
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
2960
2902
|
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
|
|
@@ -2969,12 +2911,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2969
2911
|
}; }
|
|
2970
2912
|
static get style() { return ezComboBoxCss; }
|
|
2971
2913
|
};
|
|
2972
|
-
var SearchMode;
|
|
2914
|
+
var SearchMode$1;
|
|
2973
2915
|
(function (SearchMode) {
|
|
2974
2916
|
SearchMode["ADVANCED"] = "ADVANCED";
|
|
2975
2917
|
SearchMode["PRELOAD"] = "PRELOAD";
|
|
2976
2918
|
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
2977
|
-
})(SearchMode || (SearchMode = {}));
|
|
2919
|
+
})(SearchMode$1 || (SearchMode$1 = {}));
|
|
2978
2920
|
|
|
2979
2921
|
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
2922
|
|
|
@@ -3881,6 +3823,7 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3881
3823
|
this.__attachShadow();
|
|
3882
3824
|
this.ezClick = createEvent(this, "ezClick", 7);
|
|
3883
3825
|
this.ezSubActionClick = createEvent(this, "ezSubActionClick", 7);
|
|
3826
|
+
this.ezOutsideClick = createEvent(this, "ezOutsideClick", 7);
|
|
3884
3827
|
this._itemList = {};
|
|
3885
3828
|
this._submenuList = [];
|
|
3886
3829
|
this._openedMenuList = {};
|
|
@@ -3893,6 +3836,11 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3893
3836
|
this.value = undefined;
|
|
3894
3837
|
this.itemBuilder = undefined;
|
|
3895
3838
|
}
|
|
3839
|
+
handleClickOutside(event) {
|
|
3840
|
+
if (!this._element.contains(event.target)) {
|
|
3841
|
+
this.ezOutsideClick.emit();
|
|
3842
|
+
}
|
|
3843
|
+
}
|
|
3896
3844
|
//---------------------------------------------
|
|
3897
3845
|
// Private methods
|
|
3898
3846
|
//---------------------------------------------
|
|
@@ -3971,13 +3919,13 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3971
3919
|
this._itemList[item.id] = {};
|
|
3972
3920
|
}
|
|
3973
3921
|
}
|
|
3974
|
-
getContainerItemBuilder(item, level) {
|
|
3922
|
+
getContainerItemBuilder(item, level, isLockedLevels, hasIcon, hasChildren) {
|
|
3975
3923
|
if (this.itemBuilder == undefined) {
|
|
3976
3924
|
return;
|
|
3977
3925
|
}
|
|
3978
3926
|
const customContent = this.itemBuilder(item, level);
|
|
3979
3927
|
if (customContent == undefined) {
|
|
3980
|
-
return;
|
|
3928
|
+
return this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren);
|
|
3981
3929
|
}
|
|
3982
3930
|
if (typeof customContent !== "string") {
|
|
3983
3931
|
return (h("div", { class: "ez-dropdown__item-builder" }, customContent));
|
|
@@ -3998,7 +3946,7 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3998
3946
|
var _a;
|
|
3999
3947
|
return (item.type !== "divider"
|
|
4000
3948
|
? 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)
|
|
3949
|
+
? this.getContainerItemBuilder(item, level, isLockedLevels, hasIcon, hasChildren)
|
|
4002
3950
|
: this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren)), ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
4003
3951
|
!isLockedLevels &&
|
|
4004
3952
|
hasChildren &&
|
|
@@ -4672,10 +4620,12 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4672
4620
|
this.processMetadata();
|
|
4673
4621
|
}
|
|
4674
4622
|
};
|
|
4623
|
+
this._fieldsProps = new Map();
|
|
4675
4624
|
this.dataUnit = undefined;
|
|
4676
4625
|
this.config = undefined;
|
|
4677
4626
|
this.recordsValidator = undefined;
|
|
4678
4627
|
this.fieldToFocus = undefined;
|
|
4628
|
+
this.onlyStaticFields = false;
|
|
4679
4629
|
}
|
|
4680
4630
|
/**
|
|
4681
4631
|
* Realiza validação no conteúdo de todos os campos.
|
|
@@ -4686,6 +4636,15 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4686
4636
|
observeConfig() {
|
|
4687
4637
|
this.processMetadata();
|
|
4688
4638
|
}
|
|
4639
|
+
/**
|
|
4640
|
+
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
4641
|
+
*/
|
|
4642
|
+
async setFieldProp(fieldName, propName, value) {
|
|
4643
|
+
const newCustomFieldProps = new Map(this._fieldsProps);
|
|
4644
|
+
const currentProps = this._fieldsProps.get(fieldName);
|
|
4645
|
+
newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
|
|
4646
|
+
this._fieldsProps = newCustomFieldProps;
|
|
4647
|
+
}
|
|
4689
4648
|
getDynamicContent() {
|
|
4690
4649
|
var _a;
|
|
4691
4650
|
const formMD = selectFormMetadata(this._store.getState());
|
|
@@ -4712,10 +4671,10 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4712
4671
|
}
|
|
4713
4672
|
this.ezFormSetFields.emit(fields);
|
|
4714
4673
|
const idFormSheet = `${StringUtils$1.replaceAccentuatedChars(StringUtils$1.toCamelCase(currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.label), false)}_selectorContainer`;
|
|
4715
|
-
return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { class: "ez-row ez-padding-vertical--small", fields: fields })));
|
|
4674
|
+
return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { ref: ref => this._formView = ref, class: "ez-row ez-padding-vertical--small", fields: fields })));
|
|
4716
4675
|
}
|
|
4717
4676
|
processMetadata() {
|
|
4718
|
-
if (
|
|
4677
|
+
if (this.bindFields() && this.dataUnit && this._store) {
|
|
4719
4678
|
const metadata = buildFormMetadata(this.config, this.dataUnit);
|
|
4720
4679
|
this._store.dispatch(loadMetadata(metadata));
|
|
4721
4680
|
}
|
|
@@ -4724,6 +4683,9 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4724
4683
|
var _a;
|
|
4725
4684
|
return ((_a = this._staticFields) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
4726
4685
|
}
|
|
4686
|
+
bindFields() {
|
|
4687
|
+
return !this.isStatic() || this.onlyStaticFields === false;
|
|
4688
|
+
}
|
|
4727
4689
|
componentWillLoad() {
|
|
4728
4690
|
if (this.dataUnit === undefined) {
|
|
4729
4691
|
this.dataUnit = new DataUnit("ez-form");
|
|
@@ -4743,6 +4705,7 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4743
4705
|
this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")), this.dataUnit.dataUnitId, metadata, this.recordsValidator);
|
|
4744
4706
|
this.ezReady.emit();
|
|
4745
4707
|
this.handleFieldToFocus();
|
|
4708
|
+
this.setFieldsProps();
|
|
4746
4709
|
}
|
|
4747
4710
|
handleFieldToFocus() {
|
|
4748
4711
|
var _a;
|
|
@@ -4759,6 +4722,17 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4759
4722
|
this.ezFormRequestClearFieldToFocus.emit();
|
|
4760
4723
|
});
|
|
4761
4724
|
}
|
|
4725
|
+
setFieldsProps() {
|
|
4726
|
+
if (!this._formView) {
|
|
4727
|
+
return;
|
|
4728
|
+
}
|
|
4729
|
+
for (const [fieldName, props] of this._fieldsProps) {
|
|
4730
|
+
for (const prop in props) {
|
|
4731
|
+
this._formView.setFieldProp(fieldName, prop, props[prop]);
|
|
4732
|
+
}
|
|
4733
|
+
this._fieldsProps.delete(fieldName);
|
|
4734
|
+
}
|
|
4735
|
+
}
|
|
4762
4736
|
disconnectedCallback() {
|
|
4763
4737
|
this.dataUnit.unsubscribe(this.onDataUnitAction);
|
|
4764
4738
|
this._dataBinder.onDisconnectedCallback();
|
|
@@ -4779,6 +4753,10 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4779
4753
|
static get style() { return ezFormCss; }
|
|
4780
4754
|
};
|
|
4781
4755
|
|
|
4756
|
+
const REQUIRED_INFO = " (obrigatório) *";
|
|
4757
|
+
const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
|
|
4758
|
+
const EZ_GRID_LOADING_SOURCE = "EZ_GRID_LOADING_SOURCE";
|
|
4759
|
+
|
|
4782
4760
|
const buildSwitch$1 = (field) => {
|
|
4783
4761
|
return buildField(field.name, field.label, field.readOnly, field.contextName, true);
|
|
4784
4762
|
};
|
|
@@ -4786,7 +4764,7 @@ const buildCheckBox = (field) => {
|
|
|
4786
4764
|
return buildField(field.name, field.label, field.readOnly, field.contextName, false);
|
|
4787
4765
|
};
|
|
4788
4766
|
function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
|
|
4789
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4767
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
|
|
4790
4768
|
h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
|
|
4791
4769
|
}
|
|
4792
4770
|
|
|
@@ -4800,29 +4778,31 @@ const buildComboBox$1 = ({ name, label, readOnly, required, props, contextName,
|
|
|
4800
4778
|
else {
|
|
4801
4779
|
options = prop;
|
|
4802
4780
|
}
|
|
4803
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4781
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4804
4782
|
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
4783
|
};
|
|
4806
4784
|
|
|
4807
4785
|
const buildDate$1 = ({ name, label, readOnly, canShowError }) => {
|
|
4808
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4786
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4809
4787
|
h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
|
|
4810
4788
|
};
|
|
4811
4789
|
const buildTime$1 = ({ name, label, readOnly, canShowError }) => {
|
|
4812
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4790
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4813
4791
|
h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
|
|
4814
4792
|
};
|
|
4815
4793
|
const buildDateTime$1 = ({ name, label, readOnly, contextName, canShowError }) => {
|
|
4816
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4794
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4817
4795
|
h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
|
|
4818
4796
|
};
|
|
4819
4797
|
|
|
4820
4798
|
const buildFile = ({ name, label, readOnly, contextName, props }) => {
|
|
4821
4799
|
const uploadProps = ObjectUtils$1.removeEmptyValues({
|
|
4822
4800
|
subTitle: props.subTitle,
|
|
4823
|
-
requestHeaders: props.STORAGESTRATEGY
|
|
4801
|
+
requestHeaders: Object.assign(Object.assign({}, (props.STORAGESTRATEGY && {
|
|
4824
4802
|
STORAGESTRATEGY: props.STORAGESTRATEGY
|
|
4825
|
-
}
|
|
4803
|
+
})), (props.INTERNAL_FILENAME && {
|
|
4804
|
+
INTERNAL_FILENAME: props.INTERNAL_FILENAME
|
|
4805
|
+
})),
|
|
4826
4806
|
});
|
|
4827
4807
|
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4828
4808
|
h("ez-upload", Object.assign({ enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name }, uploadProps))));
|
|
@@ -4837,12 +4817,12 @@ const buildInteger$1 = ({ name, label, readOnly, contextName, canShowError }) =>
|
|
|
4837
4817
|
return buildNumeric$1(name, label, readOnly, 0, 0, contextName, canShowError);
|
|
4838
4818
|
};
|
|
4839
4819
|
function buildNumeric$1(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
|
|
4840
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4820
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4841
4821
|
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
4822
|
}
|
|
4843
4823
|
|
|
4844
4824
|
const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
|
|
4845
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4825
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4846
4826
|
h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
|
|
4847
4827
|
};
|
|
4848
4828
|
|
|
@@ -4852,7 +4832,7 @@ const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError
|
|
|
4852
4832
|
};
|
|
4853
4833
|
|
|
4854
4834
|
const buildTextInput$1 = ({ name, label, readOnly, contextName, canShowError }) => {
|
|
4855
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-
|
|
4835
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4856
4836
|
h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
|
|
4857
4837
|
};
|
|
4858
4838
|
|
|
@@ -4912,7 +4892,7 @@ class FormItems {
|
|
|
4912
4892
|
}
|
|
4913
4893
|
}
|
|
4914
4894
|
|
|
4915
|
-
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-
|
|
4895
|
+
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
4896
|
|
|
4917
4897
|
const EzFormView$1 = class extends HTMLElement$1 {
|
|
4918
4898
|
constructor() {
|
|
@@ -4925,6 +4905,19 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4925
4905
|
async showUp() {
|
|
4926
4906
|
this._element.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
4927
4907
|
}
|
|
4908
|
+
/**
|
|
4909
|
+
* Altera/adiciona uma propriedade nos metados do campo.
|
|
4910
|
+
*/
|
|
4911
|
+
async setFieldProp(fieldName, propName, value) {
|
|
4912
|
+
const fields = this.fields.map(field => {
|
|
4913
|
+
if (field.name === fieldName) {
|
|
4914
|
+
field.props = field.props || {};
|
|
4915
|
+
field.props[propName] = value;
|
|
4916
|
+
}
|
|
4917
|
+
return field;
|
|
4918
|
+
});
|
|
4919
|
+
this.fields = [...fields];
|
|
4920
|
+
}
|
|
4928
4921
|
groupFields(fields) {
|
|
4929
4922
|
const result = new Map();
|
|
4930
4923
|
fields.forEach(item => {
|
|
@@ -4948,19 +4941,36 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4948
4941
|
const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
|
|
4949
4942
|
this.formItemsReady.emit(formItems);
|
|
4950
4943
|
}
|
|
4944
|
+
isItemFullWidth(userInterface) {
|
|
4945
|
+
return [
|
|
4946
|
+
UserInterface.FILE,
|
|
4947
|
+
UserInterface.LONGTEXT
|
|
4948
|
+
].includes(userInterface);
|
|
4949
|
+
}
|
|
4950
|
+
buildFormItemElement(item, classItem = "") {
|
|
4951
|
+
if (this.isItemFullWidth(item.userInterface)) {
|
|
4952
|
+
classItem += " input-full_width";
|
|
4953
|
+
}
|
|
4954
|
+
return h("div", { class: classItem }, fieldBuilder(item));
|
|
4955
|
+
}
|
|
4951
4956
|
render() {
|
|
4952
4957
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
4953
4958
|
if (this.fields == undefined) {
|
|
4954
4959
|
return;
|
|
4955
4960
|
}
|
|
4956
|
-
|
|
4961
|
+
let nonArrayGrup = [];
|
|
4962
|
+
let formContent = Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
|
|
4957
4963
|
if (Array.isArray(value)) {
|
|
4958
|
-
return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, value.map(fi =>
|
|
4964
|
+
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
4965
|
}
|
|
4960
4966
|
else {
|
|
4961
|
-
|
|
4967
|
+
nonArrayGrup.push(value);
|
|
4962
4968
|
}
|
|
4963
|
-
})
|
|
4969
|
+
});
|
|
4970
|
+
// Filtra os elementos que não são arrays e os coloca dentro de uma única div
|
|
4971
|
+
let nonArrayElements = nonArrayGrup.map((value) => this.buildFormItemElement(value));
|
|
4972
|
+
let groupedNonArrayElements = h("div", { class: "form-view__content" }, nonArrayElements);
|
|
4973
|
+
return (h(Host, null, groupedNonArrayElements, formContent));
|
|
4964
4974
|
}
|
|
4965
4975
|
get _element() { return this; }
|
|
4966
4976
|
static get style() { return ezFormViewCss; }
|
|
@@ -123786,6 +123796,26 @@ var AllEnterpriseModules = [
|
|
|
123786
123796
|
|
|
123787
123797
|
ModuleRegistry.registerModules(AllEnterpriseModules);
|
|
123788
123798
|
|
|
123799
|
+
class DataSourceInterceptor {
|
|
123800
|
+
constructor(controller) {
|
|
123801
|
+
this._controller = controller;
|
|
123802
|
+
}
|
|
123803
|
+
clearColumnFilter(filters) {
|
|
123804
|
+
var _a;
|
|
123805
|
+
return (_a = filters.filter(filter => !filter.name.startsWith(DISTINCT_FILTER_NAME_PREFIX))) !== null && _a !== void 0 ? _a : [];
|
|
123806
|
+
}
|
|
123807
|
+
interceptAction(action) {
|
|
123808
|
+
var _a;
|
|
123809
|
+
if (action.type === Action.LOADING_DATA) {
|
|
123810
|
+
if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
|
|
123811
|
+
action.payload.filters = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.filters) !== undefined ? this.clearColumnFilter(action.payload.filters) : action.payload.filters;
|
|
123812
|
+
this._controller.clearFilter();
|
|
123813
|
+
}
|
|
123814
|
+
}
|
|
123815
|
+
return action;
|
|
123816
|
+
}
|
|
123817
|
+
}
|
|
123818
|
+
|
|
123789
123819
|
class DataSource {
|
|
123790
123820
|
updateLoadedRecords(action) {
|
|
123791
123821
|
const records = action.payload;
|
|
@@ -123817,16 +123847,13 @@ class DataSource {
|
|
|
123817
123847
|
break;
|
|
123818
123848
|
case Action.LOADING_DATA:
|
|
123819
123849
|
this._waitingForLoad = true;
|
|
123820
|
-
if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
|
|
123821
|
-
this._controller.clearFilter();
|
|
123822
|
-
}
|
|
123823
123850
|
this._controller.refresh();
|
|
123824
123851
|
break;
|
|
123825
123852
|
case Action.DATA_LOADED:
|
|
123826
123853
|
this._waitingForLoad = false;
|
|
123827
123854
|
this.callbackGetRows(this._lastLoadingParams);
|
|
123828
123855
|
if (this._options) {
|
|
123829
|
-
this._options.onPaginationChange(this._dataUnit.getPaginationInfo());
|
|
123856
|
+
this._options.onPaginationChange(this._dataUnit.getPaginationInfo(), action.payload.selectFirstRecord);
|
|
123830
123857
|
}
|
|
123831
123858
|
this.updateSelection();
|
|
123832
123859
|
break;
|
|
@@ -123860,6 +123887,7 @@ class DataSource {
|
|
|
123860
123887
|
this._controller.setColumnsDef(this.buildColumnDefs());
|
|
123861
123888
|
this._options = options;
|
|
123862
123889
|
this._dataUnit.subscribe(this.duObserver);
|
|
123890
|
+
this._dataUnit.addInterceptor(new DataSourceInterceptor(this._controller));
|
|
123863
123891
|
}
|
|
123864
123892
|
updateSelection() {
|
|
123865
123893
|
const selectionInfo = this._dataUnit.getSelectionInfo();
|
|
@@ -123922,15 +123950,6 @@ class DataSource {
|
|
|
123922
123950
|
}
|
|
123923
123951
|
}
|
|
123924
123952
|
|
|
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
123953
|
class EzGridCustomHeader {
|
|
123935
123954
|
init(agParams) {
|
|
123936
123955
|
var _a;
|
|
@@ -123967,8 +123986,7 @@ class EzGridCustomHeader {
|
|
|
123967
123986
|
}
|
|
123968
123987
|
onClickFilter() {
|
|
123969
123988
|
var _a;
|
|
123970
|
-
|
|
123971
|
-
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
|
|
123989
|
+
this.params.showColumnFilter((_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left);
|
|
123972
123990
|
}
|
|
123973
123991
|
configSortIcon() {
|
|
123974
123992
|
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
@@ -124649,7 +124667,8 @@ class AgGridController {
|
|
|
124649
124667
|
this._idAttribName = '__record__id__';
|
|
124650
124668
|
this._gridConfig = [];
|
|
124651
124669
|
this._filteredColumns = new Map();
|
|
124652
|
-
this._filterColumnleftPosition =
|
|
124670
|
+
this._filterColumnleftPosition = 0;
|
|
124671
|
+
this._customFormatters = new Map();
|
|
124653
124672
|
this._enterprise = enterprise;
|
|
124654
124673
|
}
|
|
124655
124674
|
getGridConfig() {
|
|
@@ -124795,6 +124814,7 @@ class AgGridController {
|
|
|
124795
124814
|
this.selectRows((selection === null || selection === void 0 ? void 0 : selection.recordIds) || [], true);
|
|
124796
124815
|
}
|
|
124797
124816
|
this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
|
|
124817
|
+
this._customFormatters = options.customFormatters;
|
|
124798
124818
|
}
|
|
124799
124819
|
}
|
|
124800
124820
|
processFormatterCellCallback(params) {
|
|
@@ -124814,11 +124834,9 @@ class AgGridController {
|
|
|
124814
124834
|
}
|
|
124815
124835
|
return params.value;
|
|
124816
124836
|
}
|
|
124817
|
-
setFilterColumnLeftPosition(
|
|
124818
|
-
if (
|
|
124819
|
-
|
|
124820
|
-
const leftString = ePopup.style.left.replace('px', '');
|
|
124821
|
-
this._filterColumnleftPosition = `${calcFilterColumnLeftPosition(parseInt(leftString))}px`;
|
|
124837
|
+
setFilterColumnLeftPosition({ type, ePopup }) {
|
|
124838
|
+
if (type === 'columnMenu') {
|
|
124839
|
+
this._filterColumnleftPosition = ePopup.getBoundingClientRect().left;
|
|
124822
124840
|
return;
|
|
124823
124841
|
}
|
|
124824
124842
|
}
|
|
@@ -125164,7 +125182,7 @@ class AgGridController {
|
|
|
125164
125182
|
//Como vamos reordenar, precisamos considerar o deslocamento provocado por elas.
|
|
125165
125183
|
const columnsOffset = colDef.length - columns.length;
|
|
125166
125184
|
let sort = [];
|
|
125167
|
-
state.forEach((cfgColumn, index) => {
|
|
125185
|
+
state === null || state === void 0 ? void 0 : state.forEach((cfgColumn, index) => {
|
|
125168
125186
|
const colWidth = this.getColumnWidth(cfgColumn);
|
|
125169
125187
|
this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + columnsOffset);
|
|
125170
125188
|
this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
|
|
@@ -125258,15 +125276,22 @@ class AgGridController {
|
|
|
125258
125276
|
tooltip: tooltip,
|
|
125259
125277
|
isSortable: propSortable,
|
|
125260
125278
|
hasFilter: () => this.hasFilterColumn(source.name),
|
|
125261
|
-
showColumnFilter: (leftPosition
|
|
125279
|
+
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
|
|
125262
125280
|
},
|
|
125263
125281
|
valueFormatter: params => {
|
|
125264
|
-
if (params.value
|
|
125282
|
+
if (params.value === undefined) {
|
|
125265
125283
|
return "";
|
|
125266
125284
|
}
|
|
125267
125285
|
if (params.value instanceof Promise) {
|
|
125268
125286
|
return "Carregando...";
|
|
125269
125287
|
}
|
|
125288
|
+
const customFormatter = this._customFormatters.get(source.name);
|
|
125289
|
+
if (customFormatter) {
|
|
125290
|
+
const formattedValue = customFormatter.format(params.value, source, params.data.__record__id__);
|
|
125291
|
+
if (formattedValue) {
|
|
125292
|
+
return formattedValue;
|
|
125293
|
+
}
|
|
125294
|
+
}
|
|
125270
125295
|
if (this._dataUnit) {
|
|
125271
125296
|
return this._dataUnit.getFormattedValue(source.name, params.value);
|
|
125272
125297
|
}
|
|
@@ -125275,6 +125300,13 @@ class AgGridController {
|
|
|
125275
125300
|
cellStyle: this.getStyleByColumn(source),
|
|
125276
125301
|
});
|
|
125277
125302
|
}
|
|
125303
|
+
setCustomFormatters(customFormatters) {
|
|
125304
|
+
this._customFormatters = customFormatters;
|
|
125305
|
+
}
|
|
125306
|
+
refreshSelectedRows() {
|
|
125307
|
+
const selectedNodes = this._gridOptions.api.getSelectedNodes();
|
|
125308
|
+
this._gridOptions.api.redrawRows({ rowNodes: selectedNodes });
|
|
125309
|
+
}
|
|
125278
125310
|
getInitCellStyle() {
|
|
125279
125311
|
return {
|
|
125280
125312
|
'line-height': this.getRowHeight() - 1 + 'px',
|
|
@@ -125452,9 +125484,34 @@ class AgGridController {
|
|
|
125452
125484
|
}
|
|
125453
125485
|
}
|
|
125454
125486
|
|
|
125487
|
+
function enableSelectAll(total) {
|
|
125488
|
+
return total !== undefined;
|
|
125489
|
+
}
|
|
125490
|
+
function buildSelectAllLabel(allRecordSelected, count, total) {
|
|
125491
|
+
if (allRecordSelected)
|
|
125492
|
+
return 'Selecionar apenas a página atual';
|
|
125493
|
+
if (total === undefined)
|
|
125494
|
+
return `Carregando todos os ${count} registros`;
|
|
125495
|
+
return `Selecionar todos os ${total} registros`;
|
|
125496
|
+
}
|
|
125497
|
+
function buildSelectAllTitle(total) {
|
|
125498
|
+
if (enableSelectAll(total))
|
|
125499
|
+
return '';
|
|
125500
|
+
return 'Aguarde o carregamento para selecionar o registro de todas as páginas';
|
|
125501
|
+
}
|
|
125502
|
+
function getText(selectionCount, allSelectedRecords) {
|
|
125503
|
+
if (allSelectedRecords) {
|
|
125504
|
+
return `Todos os <strong>${selectionCount} registros</strong> da grade estão selecionados.`;
|
|
125505
|
+
}
|
|
125506
|
+
if (selectionCount > 1) {
|
|
125507
|
+
return `Os <strong>${selectionCount} registros</strong> dessa página estão selecionados.`;
|
|
125508
|
+
}
|
|
125509
|
+
return "O único registro dessa página está selecionado";
|
|
125510
|
+
}
|
|
125511
|
+
|
|
125455
125512
|
const SelectionCounter = (props) => {
|
|
125456
125513
|
const { selectionCount, currentPageSelected, allRecordSelected, paginationInfo, canSelectAll, onSelectAll, onSelectPage, onClearAll, onClose } = props;
|
|
125457
|
-
const { total, hasMore } = paginationInfo || {};
|
|
125514
|
+
const { total, hasMore, count } = paginationInfo || {};
|
|
125458
125515
|
const shouldRenderSelectionButton = () => {
|
|
125459
125516
|
if ((!allRecordSelected && selectionCount === total) || (allRecordSelected && !hasMore))
|
|
125460
125517
|
return false;
|
|
@@ -125468,20 +125525,11 @@ const SelectionCounter = (props) => {
|
|
|
125468
125525
|
h("label", Object.assign({ innerHTML: getText(selectionCount, allRecordSelected), class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium ez-margin-top--medium" }, getElementID("ezGridSelectionCounter_label"))),
|
|
125469
125526
|
h("div", { class: "ez-flex ez-margin-right--medium" },
|
|
125470
125527
|
shouldRenderSelectionButton() &&
|
|
125471
|
-
h("ez-button", Object.assign({ class: "ez-margin-right--medium", label:
|
|
125472
|
-
h("ez-button", Object.assign({ class: "grid__btn-clear", label: "Limpar", mode: "link", onClick: onClearAll }, getElementID("ezGridSelectionCounter_clearAll"))))),
|
|
125528
|
+
h("ez-button", Object.assign({ title: buildSelectAllTitle(total), enabled: enableSelectAll(total), class: "ez-margin-right--medium", label: buildSelectAllLabel(allRecordSelected, count, total), mode: "link", onClick: allRecordSelected ? onSelectPage : onSelectAll }, getElementID(`ezGridSelectionCounter_select${allRecordSelected ? "Page" : "All"}`))),
|
|
125529
|
+
h("ez-button", Object.assign({ class: "grid__btn-clear", label: "Limpar Sele\u00E7\u00E3o", mode: "link", onClick: onClearAll }, getElementID("ezGridSelectionCounter_clearAll"))))),
|
|
125473
125530
|
h("button", Object.assign({ class: "grid__btn-close", title: "Fechar", onClick: onClose }, getElementID("ezGridSelectionCounter_close")),
|
|
125474
125531
|
h("ez-icon", { iconName: "close" })))));
|
|
125475
125532
|
};
|
|
125476
|
-
function getText(selectionCount, allSelectedRecords) {
|
|
125477
|
-
if (allSelectedRecords) {
|
|
125478
|
-
return `Todos os <strong>${selectionCount} registros</strong> da grade estão selecionados.`;
|
|
125479
|
-
}
|
|
125480
|
-
else {
|
|
125481
|
-
const pluralChar = selectionCount > 1 ? "s" : "";
|
|
125482
|
-
return `Há <strong>${selectionCount} registro${pluralChar}</strong> selecionado${pluralChar}.`;
|
|
125483
|
-
}
|
|
125484
|
-
}
|
|
125485
125533
|
function getElementID(sufix) {
|
|
125486
125534
|
return {
|
|
125487
125535
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(sufix)
|
|
@@ -125643,13 +125691,13 @@ class InMemoryFilterColumnDataSource {
|
|
|
125643
125691
|
}
|
|
125644
125692
|
}
|
|
125645
125693
|
|
|
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}";
|
|
125694
|
+
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
125695
|
|
|
125648
125696
|
const windowInstace$1 = window;
|
|
125649
125697
|
const matches = (text, filter) => {
|
|
125650
|
-
const normalizedText = StringUtils$1.replaceAccentuatedCharsLower(text.toLocaleLowerCase());
|
|
125698
|
+
const normalizedText = StringUtils$1.replaceAccentuatedCharsLower(text === null || text === void 0 ? void 0 : text.toLocaleLowerCase());
|
|
125651
125699
|
const normalizedFilter = StringUtils$1.replaceAccentuatedCharsLower(filter.toLocaleLowerCase());
|
|
125652
|
-
return normalizedText.includes(normalizedFilter);
|
|
125700
|
+
return normalizedText === null || normalizedText === void 0 ? void 0 : normalizedText.includes(normalizedFilter);
|
|
125653
125701
|
};
|
|
125654
125702
|
const EzGrid$1 = class extends HTMLElement$1 {
|
|
125655
125703
|
constructor() {
|
|
@@ -125669,6 +125717,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125669
125717
|
this._currentPageSelected = undefined;
|
|
125670
125718
|
this._selectionCount = undefined;
|
|
125671
125719
|
this._hasLeftButtons = false;
|
|
125720
|
+
this._customFormatters = new Map();
|
|
125672
125721
|
this.multipleSelection = undefined;
|
|
125673
125722
|
this.config = undefined;
|
|
125674
125723
|
this.selectionToastConfig = undefined;
|
|
@@ -125740,8 +125789,52 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125740
125789
|
async filterColumns(search) {
|
|
125741
125790
|
return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
|
|
125742
125791
|
}
|
|
125792
|
+
/**
|
|
125793
|
+
* Registra um formatador de valores para uma coluna da grid.
|
|
125794
|
+
*/
|
|
125795
|
+
async addCustomValueFormatter(columnName, customFormatter) {
|
|
125796
|
+
if (!columnName || !customFormatter) {
|
|
125797
|
+
return;
|
|
125798
|
+
}
|
|
125799
|
+
const newCustomFormatters = new Map(this._customFormatters);
|
|
125800
|
+
newCustomFormatters.set(columnName, customFormatter);
|
|
125801
|
+
this._customFormatters = newCustomFormatters;
|
|
125802
|
+
this._gridController.setCustomFormatters(newCustomFormatters);
|
|
125803
|
+
}
|
|
125804
|
+
/**
|
|
125805
|
+
* Remove o formatador de valores de uma coluna da grid.
|
|
125806
|
+
*/
|
|
125807
|
+
async removeCustomValueFormatter(columnName) {
|
|
125808
|
+
if (!columnName) {
|
|
125809
|
+
return;
|
|
125810
|
+
}
|
|
125811
|
+
const newCustomFormatters = new Map(this._customFormatters);
|
|
125812
|
+
newCustomFormatters.delete(columnName);
|
|
125813
|
+
this._customFormatters = newCustomFormatters;
|
|
125814
|
+
this._gridController.setCustomFormatters(newCustomFormatters);
|
|
125815
|
+
}
|
|
125816
|
+
/**
|
|
125817
|
+
* Atualiza linhas da grade.
|
|
125818
|
+
*/
|
|
125819
|
+
async refreshSelectedRows() {
|
|
125820
|
+
this._gridController.refreshSelectedRows();
|
|
125821
|
+
}
|
|
125822
|
+
/**
|
|
125823
|
+
* Retorna o formatador customizado da coluna caso exista.
|
|
125824
|
+
*/
|
|
125825
|
+
async getCustomValueFormatter(columnName) {
|
|
125826
|
+
return this._customFormatters.get(columnName);
|
|
125827
|
+
}
|
|
125743
125828
|
observeConfig(config) {
|
|
125744
|
-
this._gridController.setColumnsState(config.columns);
|
|
125829
|
+
this._gridController.setColumnsState(config === null || config === void 0 ? void 0 : config.columns);
|
|
125830
|
+
}
|
|
125831
|
+
updatePaginationTooltip() {
|
|
125832
|
+
if (!this._refPaginationLabelTooltip)
|
|
125833
|
+
return;
|
|
125834
|
+
const alreadyDefined = this._refPaginationLabelTooltip.getAttribute('data-tooltip');
|
|
125835
|
+
if (alreadyDefined) {
|
|
125836
|
+
this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
|
|
125837
|
+
}
|
|
125745
125838
|
}
|
|
125746
125839
|
onSelectionChange(evt) {
|
|
125747
125840
|
this._currentPageSelected = evt.detail.selectionHeaderStatus === true;
|
|
@@ -125791,21 +125884,29 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125791
125884
|
return newConfig;
|
|
125792
125885
|
}
|
|
125793
125886
|
positionSelectionCounter() {
|
|
125794
|
-
var _a;
|
|
125795
|
-
if (this._gridSelectionCounter
|
|
125887
|
+
var _a, _b;
|
|
125888
|
+
if (!this._gridSelectionCounter)
|
|
125796
125889
|
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 {
|
|
125890
|
+
if (!this._showSelectionCounter) {
|
|
125807
125891
|
this._gridSelectionCounter.style.bottom = '';
|
|
125892
|
+
return;
|
|
125893
|
+
}
|
|
125894
|
+
const containerRect = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
125895
|
+
const selectionRect = (_b = this._gridSelectionCounter) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
125896
|
+
if (!containerRect || !selectionRect)
|
|
125897
|
+
return;
|
|
125898
|
+
const positionBottom = containerRect.bottom - 30;
|
|
125899
|
+
this._gridSelectionCounter.style.bottom = document.body.clientHeight - positionBottom + 'px';
|
|
125900
|
+
this._gridSelectionCounter.style.left = this.calculatePositionLeft(containerRect, selectionRect);
|
|
125901
|
+
}
|
|
125902
|
+
calculatePositionLeft(containerRect, selectionRect) {
|
|
125903
|
+
let selectionStart = containerRect.left + (containerRect.width / 2);
|
|
125904
|
+
const containerRightEdge = containerRect.left + this._container.clientWidth;
|
|
125905
|
+
const selectionEnd = (selectionStart - (selectionRect.width / 2)) + selectionRect.width;
|
|
125906
|
+
if (selectionEnd > containerRightEdge) {
|
|
125907
|
+
selectionStart = containerRightEdge - (selectionRect.width / 2);
|
|
125808
125908
|
}
|
|
125909
|
+
return `${selectionStart}px`;
|
|
125809
125910
|
}
|
|
125810
125911
|
setEvents() {
|
|
125811
125912
|
window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
|
|
@@ -125898,11 +125999,10 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125898
125999
|
}
|
|
125899
126000
|
getPaginationControl() {
|
|
125900
126001
|
if (this._paginationInfo) {
|
|
125901
|
-
const {
|
|
126002
|
+
const { currentPage, hasMore } = this._paginationInfo;
|
|
125902
126003
|
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" }),
|
|
126004
|
+
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())),
|
|
126005
|
+
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
126006
|
];
|
|
125907
126007
|
}
|
|
125908
126008
|
return null;
|
|
@@ -125911,16 +126011,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125911
126011
|
this._gridController.initDatagrid(this._container, {
|
|
125912
126012
|
onColumnStateChange: (type, state, info) => this.onColumnStateChange(type, state, info),
|
|
125913
126013
|
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;
|
|
126014
|
+
onPaginationChange: (paginationInfo, selectFirstRecord) => {
|
|
126015
|
+
this.handlePaginationChange(selectFirstRecord, paginationInfo);
|
|
125924
126016
|
},
|
|
125925
126017
|
onPaginationUpdate: (paginationInfo) => {
|
|
125926
126018
|
this._paginationInfo = paginationInfo;
|
|
@@ -125934,7 +126026,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125934
126026
|
statusResolver: this.statusResolver,
|
|
125935
126027
|
useEnterLikeTab: this.useEnterLikeTab,
|
|
125936
126028
|
recordsValidator: this.recordsValidator,
|
|
125937
|
-
editionIsDisabled: () => !this.canEdit
|
|
126029
|
+
editionIsDisabled: () => !this.canEdit,
|
|
126030
|
+
customFormatters: this._customFormatters
|
|
125938
126031
|
});
|
|
125939
126032
|
if (this.config) {
|
|
125940
126033
|
this.observeConfig(this.config);
|
|
@@ -125946,6 +126039,66 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125946
126039
|
this.setEvents();
|
|
125947
126040
|
this.componentReady.emit();
|
|
125948
126041
|
this._gridController.configFilterColumn(this._filterColumn);
|
|
126042
|
+
this._initHeaderOverflowWatcher();
|
|
126043
|
+
}
|
|
126044
|
+
handlePaginationChange(selectFirstRecord, paginationInfo) {
|
|
126045
|
+
var _a;
|
|
126046
|
+
if (selectFirstRecord !== false) {
|
|
126047
|
+
if (((_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) > (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.currentPage) && this._paginationChangedByKeyboard) {
|
|
126048
|
+
this._gridController.setFocusLastRow();
|
|
126049
|
+
}
|
|
126050
|
+
else {
|
|
126051
|
+
this._gridController.setFocusFirstRow();
|
|
126052
|
+
this._paginationChangedByKeyboard = true;
|
|
126053
|
+
}
|
|
126054
|
+
}
|
|
126055
|
+
this._paginationInfo = paginationInfo;
|
|
126056
|
+
}
|
|
126057
|
+
_getActualPageLabel() {
|
|
126058
|
+
const { firstRecord, lastRecord } = this._paginationInfo;
|
|
126059
|
+
return `${firstRecord}-${lastRecord}`;
|
|
126060
|
+
}
|
|
126061
|
+
_getRemainingPageLabel() {
|
|
126062
|
+
const { total, count } = this._paginationInfo;
|
|
126063
|
+
return `${total == undefined ? ` de ${count + 1} ou mais` : ` de ${total}`}`;
|
|
126064
|
+
}
|
|
126065
|
+
_getPaginationTooltip() {
|
|
126066
|
+
return this._getActualPageLabel() + this._getRemainingPageLabel();
|
|
126067
|
+
}
|
|
126068
|
+
_initHeaderOverflowWatcher() {
|
|
126069
|
+
this._headerOverflowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
|
|
126070
|
+
}
|
|
126071
|
+
buildOverFlowWatcherParams() {
|
|
126072
|
+
return {
|
|
126073
|
+
element: this._refPaginationControl,
|
|
126074
|
+
callback: this.handleOverFlow.bind(this),
|
|
126075
|
+
notOverFlow: ["grid-pagination-tooltip"]
|
|
126076
|
+
};
|
|
126077
|
+
}
|
|
126078
|
+
handleOverFlow(elementsOverflow) {
|
|
126079
|
+
if (!this._refPaginationLabel)
|
|
126080
|
+
return;
|
|
126081
|
+
if (elementsOverflow.length > 0) {
|
|
126082
|
+
this._hidePaginationDescription();
|
|
126083
|
+
}
|
|
126084
|
+
else {
|
|
126085
|
+
this._showPaginationDescription();
|
|
126086
|
+
}
|
|
126087
|
+
}
|
|
126088
|
+
_hidePaginationDescription() {
|
|
126089
|
+
this._refPaginationLabel.classList.add(OVERFLOWED_CLASS_NAME);
|
|
126090
|
+
this._refPaginationLabelTooltip.setAttribute('data-flow', 'bottom');
|
|
126091
|
+
this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
|
|
126092
|
+
}
|
|
126093
|
+
;
|
|
126094
|
+
_showPaginationDescription() {
|
|
126095
|
+
this._refPaginationLabel.classList.remove(OVERFLOWED_CLASS_NAME);
|
|
126096
|
+
this._refPaginationLabelTooltip.removeAttribute('data-flow');
|
|
126097
|
+
this._refPaginationLabelTooltip.removeAttribute('data-tooltip');
|
|
126098
|
+
}
|
|
126099
|
+
disconnectedCallback() {
|
|
126100
|
+
var _a;
|
|
126101
|
+
(_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
125949
126102
|
}
|
|
125950
126103
|
componentWillRender() {
|
|
125951
126104
|
this.configSelectionCounter();
|
|
@@ -125969,14 +126122,15 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125969
126122
|
}
|
|
125970
126123
|
render() {
|
|
125971
126124
|
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
|
|
126125
|
+
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
126126
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
125974
126127
|
` }, 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
126128
|
}
|
|
125976
126129
|
static get assetsDirs() { return ["../assets"]; }
|
|
125977
126130
|
get _element() { return this; }
|
|
125978
126131
|
static get watchers() { return {
|
|
125979
|
-
"config": ["observeConfig"]
|
|
126132
|
+
"config": ["observeConfig"],
|
|
126133
|
+
"_paginationInfo": ["updatePaginationTooltip"]
|
|
125980
126134
|
}; }
|
|
125981
126135
|
static get style() { return ezGridCss; }
|
|
125982
126136
|
};
|
|
@@ -126083,7 +126237,7 @@ const EzGuideNavigator$1 = class extends HTMLElement$1 {
|
|
|
126083
126237
|
static get style() { return ezGuideNavigatorCss; }
|
|
126084
126238
|
};
|
|
126085
126239
|
|
|
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-
|
|
126240
|
+
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
126241
|
|
|
126088
126242
|
const EzIcon$1 = class extends HTMLElement$1 {
|
|
126089
126243
|
constructor() {
|
|
@@ -126711,11 +126865,7 @@ const EzModal$1 = class extends HTMLElement$1 {
|
|
|
126711
126865
|
this.__attachShadow();
|
|
126712
126866
|
this.ezCloseModal = createEvent(this, "ezCloseModal", 7);
|
|
126713
126867
|
this.ezOpenModal = createEvent(this, "ezOpenModal", 7);
|
|
126714
|
-
this.
|
|
126715
|
-
if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
|
|
126716
|
-
this.closeModal();
|
|
126717
|
-
}
|
|
126718
|
-
};
|
|
126868
|
+
this.ezModalAction = createEvent(this, "ezModalAction", 7);
|
|
126719
126869
|
this.modalSize = undefined;
|
|
126720
126870
|
this.align = undefined;
|
|
126721
126871
|
this.heightMode = "regular";
|
|
@@ -126727,11 +126877,9 @@ const EzModal$1 = class extends HTMLElement$1 {
|
|
|
126727
126877
|
observeOpened() {
|
|
126728
126878
|
if (this.opened) {
|
|
126729
126879
|
this._overlayId = FloatingManager.subscribeOverlayControl(this._modalRef);
|
|
126730
|
-
document.addEventListener("keydown", this.handleKeyboardEvent);
|
|
126731
126880
|
}
|
|
126732
126881
|
else {
|
|
126733
126882
|
FloatingManager.unsubscribeOverlayControl(this._modalRef || this._overlayId);
|
|
126734
|
-
document.removeEventListener("keydown", this.handleKeyboardEvent);
|
|
126735
126883
|
}
|
|
126736
126884
|
}
|
|
126737
126885
|
closeModal() {
|
|
@@ -126740,6 +126888,10 @@ const EzModal$1 = class extends HTMLElement$1 {
|
|
|
126740
126888
|
}
|
|
126741
126889
|
componentDidLoad() {
|
|
126742
126890
|
this.observeOpened();
|
|
126891
|
+
new KeyboardManager({ propagate: false, element: this._element })
|
|
126892
|
+
.bind("Enter", this.ezModalAction.emit.bind("OK"))
|
|
126893
|
+
.bind("Escape", () => this.closeModal())
|
|
126894
|
+
.bind("Esc", () => this.closeModal());
|
|
126743
126895
|
}
|
|
126744
126896
|
componentDidRender() {
|
|
126745
126897
|
if (this.opened) {
|
|
@@ -126758,10 +126910,11 @@ const EzModal$1 = class extends HTMLElement$1 {
|
|
|
126758
126910
|
const scrimType = `modal__screen-${this.scrim}`;
|
|
126759
126911
|
return (h(Host, null, this.opened
|
|
126760
126912
|
?
|
|
126761
|
-
h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt) }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
|
|
126913
|
+
h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt), tabIndex: -1 }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
|
|
126762
126914
|
:
|
|
126763
126915
|
undefined));
|
|
126764
126916
|
}
|
|
126917
|
+
get _element() { return this; }
|
|
126765
126918
|
static get watchers() { return {
|
|
126766
126919
|
"opened": ["observeOpened"]
|
|
126767
126920
|
}; }
|
|
@@ -126785,7 +126938,7 @@ var ModalButtonStatus;
|
|
|
126785
126938
|
})(ModalButtonStatus || (ModalButtonStatus = {}));
|
|
126786
126939
|
const ModalButtonStatus$1 = ModalButtonStatus;
|
|
126787
126940
|
|
|
126788
|
-
const ezModalContainerCss = ".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:clip;display:grid;grid-template-rows:0 auto 1fr auto 0;width:100%;height:100%}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x)}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";
|
|
126941
|
+
const ezModalContainerCss = ".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:clip;display:grid;grid-template-rows:0 auto 1fr auto 0;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x)}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";
|
|
126789
126942
|
|
|
126790
126943
|
const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
126791
126944
|
constructor() {
|
|
@@ -126800,6 +126953,12 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
126800
126953
|
this.cancelButtonStatus = undefined;
|
|
126801
126954
|
this.okButtonStatus = undefined;
|
|
126802
126955
|
}
|
|
126956
|
+
async handleEzModalAction(event) {
|
|
126957
|
+
var _a;
|
|
126958
|
+
if ((event === null || event === void 0 ? void 0 : event.target) && (event === null || event === void 0 ? void 0 : event.target) === ((_a = this._element) === null || _a === void 0 ? void 0 : _a.parentElement)) {
|
|
126959
|
+
this.closeModal();
|
|
126960
|
+
}
|
|
126961
|
+
}
|
|
126803
126962
|
cancelIsVisible() {
|
|
126804
126963
|
return (this.cancelButtonStatus !== ModalButtonStatus$1.HIDDEN && this.cancelButtonLabel != undefined);
|
|
126805
126964
|
}
|
|
@@ -126809,7 +126968,15 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
126809
126968
|
componentDidLoad() {
|
|
126810
126969
|
window.requestAnimationFrame(() => {
|
|
126811
126970
|
this.ezModalAction.emit(ModalAction$1.LOAD);
|
|
126971
|
+
this._modalRef.focus();
|
|
126812
126972
|
});
|
|
126973
|
+
new KeyboardManager({ propagate: false, element: this._element })
|
|
126974
|
+
.bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
|
|
126975
|
+
.bind("Escape", () => this.closeModal())
|
|
126976
|
+
.bind("Esc", () => this.closeModal());
|
|
126977
|
+
}
|
|
126978
|
+
closeModal() {
|
|
126979
|
+
this.ezModalAction.emit("CLOSE");
|
|
126813
126980
|
}
|
|
126814
126981
|
focusLast() {
|
|
126815
126982
|
if (this._okButton == undefined) {
|
|
@@ -126821,8 +126988,9 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
126821
126988
|
this._closeButton.focus();
|
|
126822
126989
|
}
|
|
126823
126990
|
render() {
|
|
126824
|
-
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div",
|
|
126991
|
+
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", { ref: ref => this._modalRef = ref, tabIndex: -1, class: "ez-modal-container__header-container" }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--large" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
|
|
126825
126992
|
}
|
|
126993
|
+
get _element() { return this; }
|
|
126826
126994
|
static get style() { return ezModalContainerCss; }
|
|
126827
126995
|
};
|
|
126828
126996
|
|
|
@@ -127094,6 +127262,11 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
127094
127262
|
}
|
|
127095
127263
|
this._changePending = false;
|
|
127096
127264
|
}
|
|
127265
|
+
observePrecision() {
|
|
127266
|
+
if (this._textInput) {
|
|
127267
|
+
this.setInputValue();
|
|
127268
|
+
}
|
|
127269
|
+
}
|
|
127097
127270
|
validateValue(value) {
|
|
127098
127271
|
return isNaN(value) || value === undefined ? null : value;
|
|
127099
127272
|
}
|
|
@@ -127177,7 +127350,9 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
127177
127350
|
static get watchers() { return {
|
|
127178
127351
|
"label": ["observeLabel"],
|
|
127179
127352
|
"errorMessage": ["observeErrorMessage"],
|
|
127180
|
-
"value": ["observeValue"]
|
|
127353
|
+
"value": ["observeValue"],
|
|
127354
|
+
"precision": ["observePrecision"],
|
|
127355
|
+
"prettyPrecision": ["observePrecision"]
|
|
127181
127356
|
}; }
|
|
127182
127357
|
static get style() { return ezNumberInputCss; }
|
|
127183
127358
|
};
|
|
@@ -127332,7 +127507,7 @@ const EzPopover$1 = class extends HTMLElement$1 {
|
|
|
127332
127507
|
static get style() { return ezPopoverCss; }
|
|
127333
127508
|
};
|
|
127334
127509
|
|
|
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;
|
|
127510
|
+
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
127511
|
|
|
127337
127512
|
const EzPopup$1 = class extends HTMLElement$1 {
|
|
127338
127513
|
constructor() {
|
|
@@ -127340,6 +127515,7 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
127340
127515
|
this.__registerHost();
|
|
127341
127516
|
this.__attachShadow();
|
|
127342
127517
|
this.ezClosePopup = createEvent(this, "ezClosePopup", 7);
|
|
127518
|
+
this.ezPopupAction = createEvent(this, "ezPopupAction", 7);
|
|
127343
127519
|
this._sizeClasses = {
|
|
127344
127520
|
"x-small": "col--sd-3 ez-popup__size-limit--x-small",
|
|
127345
127521
|
"small": "col--sd-5",
|
|
@@ -127357,6 +127533,20 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
127357
127533
|
observeConfig() {
|
|
127358
127534
|
this.manageOverflow();
|
|
127359
127535
|
}
|
|
127536
|
+
componentDidLoad() {
|
|
127537
|
+
if (this.opened && this._popupRef) {
|
|
127538
|
+
this._popupRef.focus();
|
|
127539
|
+
}
|
|
127540
|
+
new KeyboardManager({ propagate: false, element: this._element })
|
|
127541
|
+
.bind("Enter", this.ezPopupAction.emit.bind("OK"))
|
|
127542
|
+
.bind("Escape", () => this.closePopup())
|
|
127543
|
+
.bind("Esc", () => this.closePopup());
|
|
127544
|
+
}
|
|
127545
|
+
closePopup() {
|
|
127546
|
+
this.opened = false;
|
|
127547
|
+
this.manageOverflow();
|
|
127548
|
+
this.ezClosePopup.emit();
|
|
127549
|
+
}
|
|
127360
127550
|
manageOverflow() {
|
|
127361
127551
|
if (this.opened) {
|
|
127362
127552
|
window.document.body.style.overflow = "hidden";
|
|
@@ -127367,25 +127557,23 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
127367
127557
|
}
|
|
127368
127558
|
manageOverlay() {
|
|
127369
127559
|
if (this.opened) {
|
|
127370
|
-
this._overlayId = FloatingManager.subscribeOverlayControl(this.
|
|
127560
|
+
this._overlayId = FloatingManager.subscribeOverlayControl(this._popupRef);
|
|
127371
127561
|
}
|
|
127372
127562
|
else {
|
|
127373
|
-
FloatingManager.unsubscribeOverlayControl(this.
|
|
127563
|
+
FloatingManager.unsubscribeOverlayControl(this._popupRef || this._overlayId);
|
|
127374
127564
|
}
|
|
127375
127565
|
}
|
|
127376
127566
|
getGridSize() {
|
|
127377
127567
|
return this._sizeClasses[this.size] || this._sizeClasses["medium"];
|
|
127378
127568
|
}
|
|
127379
127569
|
componentDidRender() {
|
|
127380
|
-
if (this._container) {
|
|
127381
|
-
this._container.focus();
|
|
127382
|
-
}
|
|
127383
127570
|
this.manageOverlay();
|
|
127384
127571
|
}
|
|
127385
127572
|
render() {
|
|
127386
|
-
return (h(Host, null, this.opened ? (h("div", { class: "overlay", ref: ref => this.
|
|
127573
|
+
return (h(Host, null, this.opened ? (h("div", { class: "overlay", ref: ref => this._popupRef = ref, tabIndex: -1 }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class: "popup__container " + (this.heightMode === "auto" ? "popup__container--auto" : "") }, h("div", { class: "popup__content" }, h("div", { class: "popup__header " + (this.useHeader ? "popup__header--padding" : "") }, this.useHeader &&
|
|
127387
127574
|
h(Fragment, null, !!this.ezTitle && h("div", { class: "popup__title" }, this.ezTitle), h("button", { class: this.ezTitle ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezClosePopup.emit(); } }))), h("div", { class: "popup__expandable-content" }, h("slot", null))))))) : undefined));
|
|
127388
127575
|
}
|
|
127576
|
+
get _element() { return this; }
|
|
127389
127577
|
static get watchers() { return {
|
|
127390
127578
|
"opened": ["observeConfig"]
|
|
127391
127579
|
}; }
|
|
@@ -127625,7 +127813,7 @@ class ScrollCtrl {
|
|
|
127625
127813
|
}
|
|
127626
127814
|
}
|
|
127627
127815
|
|
|
127628
|
-
const ezSearchCss = ":host{width:100%}";
|
|
127816
|
+
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
127817
|
|
|
127630
127818
|
const EzSearch$1 = class extends HTMLElement$1 {
|
|
127631
127819
|
constructor() {
|
|
@@ -127633,6 +127821,21 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127633
127821
|
this.__registerHost();
|
|
127634
127822
|
this.__attachShadow();
|
|
127635
127823
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
127824
|
+
this._changeDeboucingTimeout = null;
|
|
127825
|
+
this._limitCharsToSearch = 3;
|
|
127826
|
+
this._deboucingTime = 300;
|
|
127827
|
+
this._maxWidthValue = 0;
|
|
127828
|
+
this._tabPressed = false;
|
|
127829
|
+
this._textEmptyList = "Nenhum resultado encontrado";
|
|
127830
|
+
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
127831
|
+
this._lookupMode = false;
|
|
127832
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
127833
|
+
this._endHighlightTag = "</span>";
|
|
127834
|
+
this._preSelection = undefined;
|
|
127835
|
+
this._visibleOptions = undefined;
|
|
127836
|
+
this._startLoading = false;
|
|
127837
|
+
this._showLoading = true;
|
|
127838
|
+
this._criteria = undefined;
|
|
127636
127839
|
this.value = undefined;
|
|
127637
127840
|
this.label = undefined;
|
|
127638
127841
|
this.enabled = true;
|
|
@@ -127647,28 +127850,82 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127647
127850
|
this.listOptionsPosition = undefined;
|
|
127648
127851
|
this.isTextSearch = false;
|
|
127649
127852
|
this.ignoreLimitCharsToSearch = false;
|
|
127853
|
+
this.options = undefined;
|
|
127854
|
+
this.suppressSearch = false;
|
|
127650
127855
|
}
|
|
127651
127856
|
observeErrorMessage() {
|
|
127652
|
-
|
|
127653
|
-
|
|
127857
|
+
var _a;
|
|
127858
|
+
if (this._textInput) {
|
|
127859
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
127860
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
127861
|
+
this.setInputValue();
|
|
127862
|
+
}
|
|
127654
127863
|
}
|
|
127655
127864
|
}
|
|
127656
|
-
observeValue() {
|
|
127657
|
-
if (this.
|
|
127658
|
-
|
|
127865
|
+
observeValue(newValue, oldValue) {
|
|
127866
|
+
if (this._textInput && newValue != oldValue) {
|
|
127867
|
+
try {
|
|
127868
|
+
if (newValue === "string") {
|
|
127869
|
+
this.setInputValue();
|
|
127870
|
+
return;
|
|
127871
|
+
}
|
|
127872
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
127873
|
+
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
127874
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
127875
|
+
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
127876
|
+
this.value = newValueSelected;
|
|
127877
|
+
}
|
|
127878
|
+
if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
|
|
127879
|
+
this.setInputValue();
|
|
127880
|
+
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
127881
|
+
if (!this._lookupMode) {
|
|
127882
|
+
this.ezChange.emit(valueEmitted);
|
|
127883
|
+
}
|
|
127884
|
+
}
|
|
127885
|
+
this.resetOptions();
|
|
127886
|
+
}
|
|
127887
|
+
finally {
|
|
127888
|
+
this._lookupMode = false;
|
|
127889
|
+
}
|
|
127659
127890
|
}
|
|
127660
127891
|
}
|
|
127892
|
+
observeOptions(newOptions, oldOptions) {
|
|
127893
|
+
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
127894
|
+
return;
|
|
127895
|
+
this.loadOptions(SearchMode.PRELOAD);
|
|
127896
|
+
}
|
|
127897
|
+
/*
|
|
127898
|
+
* Retorna uma promise com o valor da opção selecionada,
|
|
127899
|
+
* que será resolvida quando o backend devolver este dado.
|
|
127900
|
+
*/
|
|
127901
|
+
async getValueAsync() {
|
|
127902
|
+
if (!this._showLoading) {
|
|
127903
|
+
return new Promise(resolve => resolve(this.value));
|
|
127904
|
+
}
|
|
127905
|
+
return new Promise(resolve => {
|
|
127906
|
+
let id = setInterval(() => {
|
|
127907
|
+
if (!this._showLoading) {
|
|
127908
|
+
clearInterval(id);
|
|
127909
|
+
resolve(this.value);
|
|
127910
|
+
}
|
|
127911
|
+
}, 100);
|
|
127912
|
+
});
|
|
127913
|
+
}
|
|
127661
127914
|
/**
|
|
127662
|
-
|
|
127663
|
-
|
|
127915
|
+
* Aplica o foco no campo.
|
|
127916
|
+
*/
|
|
127664
127917
|
async setFocus() {
|
|
127665
|
-
this.
|
|
127918
|
+
if (this._textInput) {
|
|
127919
|
+
this._textInput.setFocus();
|
|
127920
|
+
}
|
|
127666
127921
|
}
|
|
127667
127922
|
/**
|
|
127668
|
-
|
|
127669
|
-
|
|
127923
|
+
* Remove o foco do campo.
|
|
127924
|
+
*/
|
|
127670
127925
|
async setBlur() {
|
|
127671
|
-
this.
|
|
127926
|
+
if (this._textInput) {
|
|
127927
|
+
this._textInput.setBlur();
|
|
127928
|
+
}
|
|
127672
127929
|
}
|
|
127673
127930
|
/**
|
|
127674
127931
|
* Retorna se o conteúdo é inválido.
|
|
@@ -127680,40 +127937,559 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127680
127937
|
* Limpa o valor do campo de pesquisa
|
|
127681
127938
|
*/
|
|
127682
127939
|
async clearValue() {
|
|
127940
|
+
this.clearSearch();
|
|
127941
|
+
}
|
|
127942
|
+
scrollListener() {
|
|
127943
|
+
var _a;
|
|
127944
|
+
if (this._floatingID == undefined) {
|
|
127945
|
+
return;
|
|
127946
|
+
}
|
|
127947
|
+
if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
|
|
127948
|
+
this.hideOptions();
|
|
127949
|
+
}
|
|
127950
|
+
else {
|
|
127951
|
+
window.requestAnimationFrame(() => {
|
|
127952
|
+
this.updateListPosition();
|
|
127953
|
+
});
|
|
127954
|
+
}
|
|
127955
|
+
}
|
|
127956
|
+
updateListPosition() {
|
|
127957
|
+
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
127958
|
+
const elementRect = this._listWrapper.getBoundingClientRect();
|
|
127959
|
+
const containerRect = this._listContainer.getBoundingClientRect();
|
|
127960
|
+
const textInputRect = this._textInput.getBoundingClientRect();
|
|
127961
|
+
const limitHeight = bottomLimit || window.innerHeight;
|
|
127962
|
+
const neededHeight = containerRect.bottom + elementRect.height;
|
|
127963
|
+
if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
|
|
127964
|
+
fromBottom = true;
|
|
127965
|
+
}
|
|
127966
|
+
if (!hardPosition) {
|
|
127967
|
+
verticalPosition = verticalPosition || 0;
|
|
127968
|
+
horizontalPosition = horizontalPosition || 0;
|
|
127969
|
+
if (fromBottom) {
|
|
127970
|
+
verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
|
|
127971
|
+
}
|
|
127972
|
+
else {
|
|
127973
|
+
verticalPosition += containerRect.top;
|
|
127974
|
+
}
|
|
127975
|
+
if (fromRight) {
|
|
127976
|
+
horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
|
|
127977
|
+
}
|
|
127978
|
+
else {
|
|
127979
|
+
horizontalPosition += containerRect.left;
|
|
127980
|
+
}
|
|
127981
|
+
}
|
|
127982
|
+
if (verticalPosition != undefined) {
|
|
127983
|
+
this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
|
|
127984
|
+
this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
|
|
127985
|
+
}
|
|
127986
|
+
if (horizontalPosition != undefined) {
|
|
127987
|
+
this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
|
|
127988
|
+
this._listWrapper.style[fromRight ? "left" : "right"] = "";
|
|
127989
|
+
}
|
|
127990
|
+
}
|
|
127991
|
+
getListPosition() {
|
|
127992
|
+
if (this.listOptionsPosition) {
|
|
127993
|
+
return this.listOptionsPosition;
|
|
127994
|
+
}
|
|
127995
|
+
return {
|
|
127996
|
+
verticalPosition: (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13
|
|
127997
|
+
};
|
|
127998
|
+
}
|
|
127999
|
+
isDifferentValues(firstValue, secondValue) {
|
|
128000
|
+
return ObjectUtils$1.objectToString(firstValue || {}) !== ObjectUtils$1.objectToString(secondValue || {});
|
|
128001
|
+
}
|
|
128002
|
+
getFormattedText(currentValue) {
|
|
128003
|
+
if (currentValue == undefined) {
|
|
128004
|
+
return;
|
|
128005
|
+
}
|
|
128006
|
+
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : `${currentValue.value} - ${currentValue.label}`;
|
|
128007
|
+
text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
128008
|
+
return text;
|
|
128009
|
+
}
|
|
128010
|
+
getText() {
|
|
128011
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
128012
|
+
const text = this.getFormattedText(currentValue);
|
|
128013
|
+
if (text == undefined) {
|
|
128014
|
+
return;
|
|
128015
|
+
}
|
|
128016
|
+
return String(text)
|
|
128017
|
+
.replace(/&/g, '&')
|
|
128018
|
+
.replace(/</g, '<')
|
|
128019
|
+
.replace(/>/g, '>')
|
|
128020
|
+
.replace(/"/g, '"');
|
|
128021
|
+
}
|
|
128022
|
+
getSelectedOption(value) {
|
|
128023
|
+
if (typeof value === "string" || value instanceof String) {
|
|
128024
|
+
return this._visibleOptions.find(o => o.value === value);
|
|
128025
|
+
}
|
|
128026
|
+
if (value) {
|
|
128027
|
+
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) });
|
|
128028
|
+
}
|
|
128029
|
+
return value;
|
|
128030
|
+
}
|
|
128031
|
+
updateVisibleOptions() {
|
|
128032
|
+
let opts = this._source || [];
|
|
128033
|
+
if (this.suppressEmptyOption) {
|
|
128034
|
+
this._visibleOptions = opts;
|
|
128035
|
+
}
|
|
128036
|
+
else {
|
|
128037
|
+
this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
|
|
128038
|
+
}
|
|
128039
|
+
this._maxWidthValue = this.getMaxWidthValue();
|
|
128040
|
+
}
|
|
128041
|
+
getMaxWidthValue() {
|
|
128042
|
+
var _a;
|
|
128043
|
+
const arrValues = [];
|
|
128044
|
+
(_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.forEach(opt => {
|
|
128045
|
+
const widthValue = this.getWidthValue(opt.value);
|
|
128046
|
+
if (!arrValues.includes(widthValue)) {
|
|
128047
|
+
arrValues.push(widthValue);
|
|
128048
|
+
}
|
|
128049
|
+
});
|
|
128050
|
+
return arrValues.length > 1 ? Math.max(...arrValues) : 0;
|
|
128051
|
+
}
|
|
128052
|
+
getWidthValue(value) {
|
|
128053
|
+
if (this._itemValueBasis != undefined) {
|
|
128054
|
+
const span = this._itemValueBasis;
|
|
128055
|
+
if (value != undefined) {
|
|
128056
|
+
span.innerHTML = value;
|
|
128057
|
+
return span.clientWidth > 0 ? (span.clientWidth + 2) : 0;
|
|
128058
|
+
}
|
|
128059
|
+
else {
|
|
128060
|
+
span.innerHTML = "";
|
|
128061
|
+
}
|
|
128062
|
+
}
|
|
128063
|
+
return 0;
|
|
128064
|
+
}
|
|
128065
|
+
createOption(detail) {
|
|
128066
|
+
let { key, title } = detail;
|
|
128067
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
128068
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
128069
|
+
title = StringUtils$1.decodeHtmlEntities(title);
|
|
128070
|
+
const option = {
|
|
128071
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
128072
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
128073
|
+
};
|
|
128074
|
+
this.selectOption(option);
|
|
128075
|
+
}
|
|
128076
|
+
buildItem(opt, index) {
|
|
128077
|
+
opt.label = opt.label || opt.value;
|
|
128078
|
+
const card = {
|
|
128079
|
+
key: opt.value,
|
|
128080
|
+
title: opt.label,
|
|
128081
|
+
details: opt.details
|
|
128082
|
+
};
|
|
128083
|
+
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 }));
|
|
128084
|
+
}
|
|
128085
|
+
showOptions() {
|
|
128086
|
+
if (!this.enabled)
|
|
128087
|
+
return;
|
|
128088
|
+
if (this.isOptionsVisible()) {
|
|
128089
|
+
return;
|
|
128090
|
+
}
|
|
128091
|
+
if (!!this._resizeObserver)
|
|
128092
|
+
this._resizeObserver.observe(this._textInput);
|
|
128093
|
+
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: false, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
128094
|
+
this.setFocus();
|
|
128095
|
+
window.requestAnimationFrame(() => {
|
|
128096
|
+
this.updateListPosition();
|
|
128097
|
+
if (!this.listOptionsPosition) {
|
|
128098
|
+
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
128099
|
+
}
|
|
128100
|
+
});
|
|
128101
|
+
}
|
|
128102
|
+
hideOptions() {
|
|
128103
|
+
if (this._floatingID !== undefined) {
|
|
128104
|
+
FloatingManager.close(this._floatingID);
|
|
128105
|
+
}
|
|
128106
|
+
this._floatingID = undefined;
|
|
128107
|
+
if (!!this._resizeObserver)
|
|
128108
|
+
this._resizeObserver.unobserve(this._textInput);
|
|
128109
|
+
}
|
|
128110
|
+
isOptionsVisible() {
|
|
128111
|
+
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
128112
|
+
}
|
|
128113
|
+
nextOption() {
|
|
128114
|
+
if (!this.isOptionsVisible()) {
|
|
128115
|
+
return;
|
|
128116
|
+
}
|
|
128117
|
+
this.showOptions();
|
|
128118
|
+
this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
|
|
128119
|
+
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
128120
|
+
}
|
|
128121
|
+
previousOption() {
|
|
128122
|
+
this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
128123
|
+
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
128124
|
+
}
|
|
128125
|
+
scrollToOption(opt) {
|
|
128126
|
+
window.requestAnimationFrame(() => {
|
|
128127
|
+
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value)
|
|
128128
|
+
? this._optionsList.querySelector(`div#item_${opt.value.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
|
|
128129
|
+
: undefined;
|
|
128130
|
+
if (liElem) {
|
|
128131
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
128132
|
+
}
|
|
128133
|
+
});
|
|
128134
|
+
}
|
|
128135
|
+
selectCurrentOption() {
|
|
128136
|
+
if (this._preSelection !== undefined) {
|
|
128137
|
+
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
128138
|
+
this._preSelection = undefined;
|
|
128139
|
+
}
|
|
128140
|
+
else {
|
|
128141
|
+
this.controlListWithOnlyOne();
|
|
128142
|
+
}
|
|
128143
|
+
}
|
|
128144
|
+
updateSource(source) {
|
|
128145
|
+
this._startLoading = false;
|
|
128146
|
+
if (source instanceof Promise) {
|
|
128147
|
+
this._showLoading = true;
|
|
128148
|
+
source.then(result => {
|
|
128149
|
+
this._showLoading = false;
|
|
128150
|
+
this.updateSource(result);
|
|
128151
|
+
}).catch(() => this._showLoading = false);
|
|
128152
|
+
this.updateVisibleOptions();
|
|
128153
|
+
}
|
|
128154
|
+
else {
|
|
128155
|
+
this._showLoading = false;
|
|
128156
|
+
if (Array.isArray(source)) {
|
|
128157
|
+
this._source = source;
|
|
128158
|
+
this.updateVisibleOptions();
|
|
128159
|
+
if (this._tabPressed) {
|
|
128160
|
+
this._tabPressed = false;
|
|
128161
|
+
this.controlEmptySearch();
|
|
128162
|
+
}
|
|
128163
|
+
}
|
|
128164
|
+
else {
|
|
128165
|
+
this.selectOption(source);
|
|
128166
|
+
}
|
|
128167
|
+
}
|
|
128168
|
+
}
|
|
128169
|
+
clearSource() {
|
|
128170
|
+
this._source = [];
|
|
128171
|
+
this.updateVisibleOptions();
|
|
128172
|
+
}
|
|
128173
|
+
replaceHighlight(value) {
|
|
128174
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
128175
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
128176
|
+
return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
128177
|
+
}
|
|
128178
|
+
selectOption(newOption) {
|
|
127683
128179
|
var _a, _b;
|
|
127684
|
-
|
|
128180
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
128181
|
+
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) });
|
|
128182
|
+
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()))
|
|
128183
|
+
|| (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
|
|
128184
|
+
const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
|
|
128185
|
+
this.value = adjustedOpt;
|
|
128186
|
+
}
|
|
128187
|
+
else {
|
|
128188
|
+
this.setInputValue();
|
|
128189
|
+
this.resetOptions();
|
|
128190
|
+
}
|
|
128191
|
+
this._visibleOptions = [];
|
|
128192
|
+
this.clearSource();
|
|
127685
128193
|
}
|
|
127686
|
-
|
|
127687
|
-
|
|
127688
|
-
|
|
127689
|
-
|
|
127690
|
-
|
|
128194
|
+
loadOptions(mode, argument = "") {
|
|
128195
|
+
this._criteria = argument;
|
|
128196
|
+
this._startLoading = true;
|
|
128197
|
+
if (this.optionLoader) {
|
|
128198
|
+
const searchArgument = { mode, argument };
|
|
128199
|
+
this.updateSource(this.optionLoader(searchArgument));
|
|
128200
|
+
}
|
|
128201
|
+
else {
|
|
128202
|
+
this.updateSource(this.options);
|
|
128203
|
+
}
|
|
128204
|
+
}
|
|
128205
|
+
cancelPreselection() {
|
|
128206
|
+
if (!this._textInput.value && this.value) {
|
|
128207
|
+
this.selectOption(undefined);
|
|
128208
|
+
}
|
|
128209
|
+
else {
|
|
128210
|
+
window.setTimeout(() => {
|
|
128211
|
+
this.setInputValue();
|
|
128212
|
+
}, this._deboucingTime);
|
|
128213
|
+
}
|
|
128214
|
+
this.resetOptions();
|
|
128215
|
+
}
|
|
128216
|
+
setInputValue(clearError = true) {
|
|
128217
|
+
const textValue = this.getText();
|
|
128218
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
128219
|
+
this._textInput.value = textValue;
|
|
128220
|
+
if (clearError) {
|
|
128221
|
+
this.errorMessage = null;
|
|
128222
|
+
}
|
|
128223
|
+
}
|
|
128224
|
+
}
|
|
128225
|
+
clearSearch() {
|
|
128226
|
+
this.value = null;
|
|
128227
|
+
}
|
|
128228
|
+
controlListWithOnlyOne() {
|
|
128229
|
+
var _a, _b;
|
|
128230
|
+
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
128231
|
+
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
128232
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
128233
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
128234
|
+
let title = StringUtils$1.decodeHtmlEntities(source[0].label);
|
|
128235
|
+
const option = {
|
|
128236
|
+
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
128237
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
128238
|
+
};
|
|
128239
|
+
this.selectOption(option);
|
|
128240
|
+
}
|
|
128241
|
+
}
|
|
128242
|
+
controlEmptySearch() {
|
|
127691
128243
|
var _a;
|
|
127692
|
-
|
|
128244
|
+
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
128245
|
+
this.clearSearch();
|
|
128246
|
+
ApplicationUtils.info(this._textEmptyList);
|
|
128247
|
+
}
|
|
128248
|
+
else {
|
|
128249
|
+
this.controlListWithOnlyOne();
|
|
128250
|
+
}
|
|
127693
128251
|
}
|
|
127694
|
-
|
|
127695
|
-
|
|
127696
|
-
|
|
127697
|
-
this.ezChange.emit(event.detail);
|
|
127698
|
-
if (this.errorMessage !== this._comboElement.errorMessage) {
|
|
127699
|
-
this.errorMessage = this._comboElement.errorMessage;
|
|
128252
|
+
validateDescriptionValue() {
|
|
128253
|
+
if (StringUtils$1.isEmpty(this.value)) {
|
|
128254
|
+
return;
|
|
127700
128255
|
}
|
|
128256
|
+
let value = this.value;
|
|
128257
|
+
if (typeof value === "object") {
|
|
128258
|
+
return;
|
|
128259
|
+
}
|
|
128260
|
+
if (StringUtils$1.isEmpty(value)) {
|
|
128261
|
+
return;
|
|
128262
|
+
}
|
|
128263
|
+
this.loadDescriptionValue(value);
|
|
128264
|
+
}
|
|
128265
|
+
async loadDescriptionValue(argument) {
|
|
128266
|
+
var _a, _b;
|
|
128267
|
+
if (argument == undefined) {
|
|
128268
|
+
return;
|
|
128269
|
+
}
|
|
128270
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
128271
|
+
this.loadOptionValue(argument);
|
|
128272
|
+
return;
|
|
128273
|
+
}
|
|
128274
|
+
const searchArgument = {
|
|
128275
|
+
mode: SearchMode.PREDICTIVE,
|
|
128276
|
+
argument
|
|
128277
|
+
};
|
|
128278
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
|
|
128279
|
+
if (source == undefined) {
|
|
128280
|
+
return;
|
|
128281
|
+
}
|
|
128282
|
+
if (source instanceof Promise) {
|
|
128283
|
+
source.then((result) => {
|
|
128284
|
+
this.setDescriptionValue(result);
|
|
128285
|
+
});
|
|
128286
|
+
}
|
|
128287
|
+
else {
|
|
128288
|
+
this.setDescriptionValue(source);
|
|
128289
|
+
}
|
|
128290
|
+
}
|
|
128291
|
+
setDescriptionValue(source) {
|
|
128292
|
+
const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
|
|
128293
|
+
if (value == undefined || !Object.keys(value).length) {
|
|
128294
|
+
this.showNoResultMessage();
|
|
128295
|
+
return;
|
|
128296
|
+
}
|
|
128297
|
+
this._lookupMode = true;
|
|
128298
|
+
this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
128299
|
+
}
|
|
128300
|
+
loadOptionValue(argument) {
|
|
128301
|
+
var _a;
|
|
128302
|
+
const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
|
|
128303
|
+
if (source != undefined) {
|
|
128304
|
+
this.selectOption(source);
|
|
128305
|
+
}
|
|
128306
|
+
else {
|
|
128307
|
+
this.showNoResultMessage();
|
|
128308
|
+
}
|
|
128309
|
+
}
|
|
128310
|
+
async showNoResultMessage() {
|
|
128311
|
+
this.clearSearch();
|
|
128312
|
+
ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
|
|
128313
|
+
}
|
|
128314
|
+
getFieldLabel() {
|
|
128315
|
+
var _a;
|
|
128316
|
+
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
|
|
128317
|
+
}
|
|
128318
|
+
resetOptions() {
|
|
128319
|
+
this.hideOptions();
|
|
128320
|
+
this._criteria = undefined;
|
|
128321
|
+
this._preSelection = undefined;
|
|
128322
|
+
this.updateVisibleOptions();
|
|
128323
|
+
}
|
|
128324
|
+
//---------------------------------------------
|
|
128325
|
+
// Lifecycle web component
|
|
128326
|
+
//---------------------------------------------
|
|
128327
|
+
componentWillLoad() {
|
|
128328
|
+
if (this.options === undefined) {
|
|
128329
|
+
this.options = [];
|
|
128330
|
+
const optionsTags = this.el.querySelectorAll("option");
|
|
128331
|
+
if (optionsTags) {
|
|
128332
|
+
optionsTags.forEach(e => {
|
|
128333
|
+
let label = e.innerText;
|
|
128334
|
+
let value = e.getAttribute("value");
|
|
128335
|
+
let details = e.getAttribute("details");
|
|
128336
|
+
if (!value) {
|
|
128337
|
+
value = label;
|
|
128338
|
+
}
|
|
128339
|
+
this.options.push({ label, value, details });
|
|
128340
|
+
e.hidden = true;
|
|
128341
|
+
});
|
|
128342
|
+
}
|
|
128343
|
+
}
|
|
128344
|
+
this.updateSource([]);
|
|
128345
|
+
}
|
|
128346
|
+
componentDidRender() {
|
|
128347
|
+
var _a;
|
|
128348
|
+
if (this._floatingID === undefined) {
|
|
128349
|
+
this._listWrapper.remove();
|
|
128350
|
+
}
|
|
128351
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
128352
|
+
ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
128353
|
+
});
|
|
128354
|
+
this.validateDescriptionValue();
|
|
127701
128355
|
}
|
|
127702
128356
|
componentDidLoad() {
|
|
127703
|
-
CSSVarsUtils.applyVarsTextInput(this.
|
|
128357
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
128358
|
+
this.setInputValue(false);
|
|
128359
|
+
this._resizeObserver = new ResizeObserver((entries) => {
|
|
128360
|
+
window.requestAnimationFrame(() => {
|
|
128361
|
+
if (!Array.isArray(entries) || !entries.length)
|
|
128362
|
+
return;
|
|
128363
|
+
const { clientWidth } = this._listContainer;
|
|
128364
|
+
if (clientWidth > 0 && !!this._listWrapper) {
|
|
128365
|
+
this._listWrapper.style.width = `${clientWidth}px`;
|
|
128366
|
+
}
|
|
128367
|
+
});
|
|
128368
|
+
});
|
|
128369
|
+
}
|
|
128370
|
+
//---------------------------------------------
|
|
128371
|
+
// Event handlers
|
|
128372
|
+
//---------------------------------------------
|
|
128373
|
+
handlerIconClick() {
|
|
128374
|
+
this.loadOptions(SearchMode.ADVANCED);
|
|
128375
|
+
}
|
|
128376
|
+
buildNumberArgument(argument) {
|
|
128377
|
+
if (this.isTextSearch) {
|
|
128378
|
+
return NaN;
|
|
128379
|
+
}
|
|
128380
|
+
return Number(argument || undefined);
|
|
128381
|
+
}
|
|
128382
|
+
onTextInputChangeHandler(event) {
|
|
128383
|
+
var _a;
|
|
128384
|
+
this.clearDeboucingTimeout();
|
|
128385
|
+
if (this._startLoading) {
|
|
128386
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
128387
|
+
this.onTextInputChangeHandler(event);
|
|
128388
|
+
}, this._deboucingTime);
|
|
128389
|
+
return;
|
|
128390
|
+
}
|
|
128391
|
+
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
128392
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
128393
|
+
if (!this._criteria) {
|
|
128394
|
+
this._textInput.value = event.data || argument;
|
|
128395
|
+
}
|
|
128396
|
+
this._criteria = argument;
|
|
128397
|
+
if (argument) {
|
|
128398
|
+
this._showLoading = false;
|
|
128399
|
+
this.clearSource();
|
|
128400
|
+
if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
128401
|
+
this._showLoading = true;
|
|
128402
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
128403
|
+
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
128404
|
+
}, this._deboucingTime);
|
|
128405
|
+
this.showOptions();
|
|
128406
|
+
}
|
|
128407
|
+
else {
|
|
128408
|
+
this.hideOptions();
|
|
128409
|
+
}
|
|
128410
|
+
}
|
|
128411
|
+
else {
|
|
128412
|
+
this.hideOptions();
|
|
128413
|
+
this._showLoading = false;
|
|
128414
|
+
this.clearSource();
|
|
128415
|
+
}
|
|
128416
|
+
}
|
|
128417
|
+
clearDeboucingTimeout() {
|
|
128418
|
+
if (this._changeDeboucingTimeout) {
|
|
128419
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
128420
|
+
this._changeDeboucingTimeout = null;
|
|
128421
|
+
}
|
|
128422
|
+
}
|
|
128423
|
+
keyDownHandler(event) {
|
|
128424
|
+
this._tabPressed = false;
|
|
128425
|
+
if (event.ctrlKey) {
|
|
128426
|
+
if (event.key === "f" || event.key === "F") {
|
|
128427
|
+
this.loadOptions(SearchMode.ADVANCED);
|
|
128428
|
+
//ATENÇÃO: Ctrl + F tem ação específica nos browsers
|
|
128429
|
+
//nesse caso, como vamos abrir o popup de busca avançada,
|
|
128430
|
+
//não é interessante deixar o evento propagar;
|
|
128431
|
+
event.stopPropagation();
|
|
128432
|
+
event.stopImmediatePropagation();
|
|
128433
|
+
event.preventDefault();
|
|
128434
|
+
}
|
|
128435
|
+
}
|
|
128436
|
+
switch (event.key) {
|
|
128437
|
+
case "ArrowDown":
|
|
128438
|
+
this.nextOption();
|
|
128439
|
+
event.stopPropagation();
|
|
128440
|
+
break;
|
|
128441
|
+
case "ArrowUp":
|
|
128442
|
+
this.previousOption();
|
|
128443
|
+
event.stopPropagation();
|
|
128444
|
+
break;
|
|
128445
|
+
case "Enter":
|
|
128446
|
+
this.selectCurrentOption();
|
|
128447
|
+
break;
|
|
128448
|
+
case "Escape":
|
|
128449
|
+
this.cancelPreselection();
|
|
128450
|
+
break;
|
|
128451
|
+
case "Tab":
|
|
128452
|
+
this._tabPressed = true;
|
|
128453
|
+
this.controlListWithOnlyOne();
|
|
128454
|
+
break;
|
|
128455
|
+
}
|
|
128456
|
+
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
128457
|
+
//Por exemplo, quando o usuário dá um Enter, além de selecionar
|
|
128458
|
+
//um valor, também significa que a ateração finalizou,
|
|
128459
|
+
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
128460
|
+
//event.stopPropagation();
|
|
128461
|
+
}
|
|
128462
|
+
onTextInputFocusOutHandler() {
|
|
128463
|
+
if (this.hideErrorOnFocusOut)
|
|
128464
|
+
this.cancelPreselection();
|
|
128465
|
+
}
|
|
128466
|
+
canShowListOptions() {
|
|
128467
|
+
return !this._showLoading && this._visibleOptions.length > 0;
|
|
127704
128468
|
}
|
|
127705
128469
|
render() {
|
|
127706
|
-
|
|
127707
|
-
|
|
128470
|
+
var _a;
|
|
128471
|
+
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
128472
|
+
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)
|
|
128473
|
+
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
128474
|
+
: 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
|
|
128475
|
+
&& this._visibleOptions.length === 0
|
|
128476
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
128477
|
+
&& 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
128478
|
}
|
|
127709
|
-
;
|
|
127710
|
-
get _elem() { return this; }
|
|
128479
|
+
get el() { return this; }
|
|
127711
128480
|
static get watchers() { return {
|
|
127712
128481
|
"errorMessage": ["observeErrorMessage"],
|
|
127713
|
-
"value": ["observeValue"]
|
|
128482
|
+
"value": ["observeValue"],
|
|
128483
|
+
"options": ["observeOptions"]
|
|
127714
128484
|
}; }
|
|
127715
128485
|
static get style() { return ezSearchCss; }
|
|
127716
128486
|
};
|
|
128487
|
+
var SearchMode;
|
|
128488
|
+
(function (SearchMode) {
|
|
128489
|
+
SearchMode["ADVANCED"] = "ADVANCED";
|
|
128490
|
+
SearchMode["PRELOAD"] = "PRELOAD";
|
|
128491
|
+
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
128492
|
+
})(SearchMode || (SearchMode = {}));
|
|
127717
128493
|
|
|
127718
128494
|
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
128495
|
|
|
@@ -127801,15 +128577,188 @@ const EzSkeleton$1 = class extends HTMLElement$1 {
|
|
|
127801
128577
|
static get style() { return ezSkeletonCss; }
|
|
127802
128578
|
};
|
|
127803
128579
|
|
|
127804
|
-
const
|
|
128580
|
+
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}";
|
|
128581
|
+
|
|
128582
|
+
const EzSplitButton$1 = class extends HTMLElement$1 {
|
|
128583
|
+
constructor() {
|
|
128584
|
+
super();
|
|
128585
|
+
this.__registerHost();
|
|
128586
|
+
this.__attachShadow();
|
|
128587
|
+
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
128588
|
+
this.dropdownItemClick = createEvent(this, "dropdownItemClick", 7);
|
|
128589
|
+
this.dropdownSubActionClick = createEvent(this, "dropdownSubActionClick", 7);
|
|
128590
|
+
this.rightDefaultTitle = 'Mais opções';
|
|
128591
|
+
this.show = false;
|
|
128592
|
+
this.enabled = true;
|
|
128593
|
+
this.iconName = undefined;
|
|
128594
|
+
this.image = undefined;
|
|
128595
|
+
this.items = undefined;
|
|
128596
|
+
this.label = undefined;
|
|
128597
|
+
this.leftTitle = undefined;
|
|
128598
|
+
this.rightTitle = 'Mais opções';
|
|
128599
|
+
this.mode = 'default';
|
|
128600
|
+
this.size = 'medium';
|
|
128601
|
+
}
|
|
128602
|
+
/**
|
|
128603
|
+
* Remove o foco de ambos os botões.
|
|
128604
|
+
*/
|
|
128605
|
+
async setBlur() {
|
|
128606
|
+
this.leftButton.blur();
|
|
128607
|
+
this.rightButton.blur();
|
|
128608
|
+
}
|
|
128609
|
+
/**
|
|
128610
|
+
* Aplica o foco no botão principal.
|
|
128611
|
+
*/
|
|
128612
|
+
async setLeftButtonFocus() {
|
|
128613
|
+
this.leftButton.focus();
|
|
128614
|
+
}
|
|
128615
|
+
/**
|
|
128616
|
+
* Aplica o foco no botão do dropdown.
|
|
128617
|
+
*/
|
|
128618
|
+
async setRightButtonFocus() {
|
|
128619
|
+
this.rightButton.focus();
|
|
128620
|
+
}
|
|
128621
|
+
clickListener(evt) {
|
|
128622
|
+
if (!this.enabled) {
|
|
128623
|
+
evt.preventDefault();
|
|
128624
|
+
evt.stopPropagation();
|
|
128625
|
+
evt.stopImmediatePropagation();
|
|
128626
|
+
}
|
|
128627
|
+
}
|
|
128628
|
+
getIconSize(sizeParam = 'medium') {
|
|
128629
|
+
var _a;
|
|
128630
|
+
const sizeList = ['medium', 'large'];
|
|
128631
|
+
const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
128632
|
+
return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
|
|
128633
|
+
}
|
|
128634
|
+
closeDropdown() {
|
|
128635
|
+
this.show = false;
|
|
128636
|
+
}
|
|
128637
|
+
toggleDropdown() {
|
|
128638
|
+
this.show = !this.show;
|
|
128639
|
+
}
|
|
128640
|
+
handleButtonClick() {
|
|
128641
|
+
this.buttonClick.emit();
|
|
128642
|
+
}
|
|
128643
|
+
handleDropdownItemClick(evt) {
|
|
128644
|
+
this.dropdownItemClick.emit(evt.detail);
|
|
128645
|
+
evt.stopPropagation();
|
|
128646
|
+
this.closeDropdown();
|
|
128647
|
+
}
|
|
128648
|
+
handleDropdownSubActionClick(evt) {
|
|
128649
|
+
this.dropdownSubActionClick.emit(evt.detail);
|
|
128650
|
+
evt.stopPropagation();
|
|
128651
|
+
this.closeDropdown();
|
|
128652
|
+
}
|
|
128653
|
+
resolveOffsetParentRect() {
|
|
128654
|
+
var _a, _b;
|
|
128655
|
+
const offsetParentRect = (_b = (_a = this.dropdownParent) === null || _a === void 0 ? void 0 : _a.offsetParent) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
128656
|
+
const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
|
|
128657
|
+
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
128658
|
+
const rectWithoutScroll = {
|
|
128659
|
+
top: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.top) + scrollTop,
|
|
128660
|
+
left: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.left) + scrollLeft,
|
|
128661
|
+
bottom: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.bottom) + scrollTop,
|
|
128662
|
+
right: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.right) + scrollLeft,
|
|
128663
|
+
width: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.width,
|
|
128664
|
+
height: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.height
|
|
128665
|
+
};
|
|
128666
|
+
this.offsetParentRect = rectWithoutScroll;
|
|
128667
|
+
}
|
|
128668
|
+
/**
|
|
128669
|
+
* Método responsável em posicionar o dropdown na tela.
|
|
128670
|
+
* Faz com que o dropdown se ajuste automaticamente ao espaco na tela
|
|
128671
|
+
*/
|
|
128672
|
+
positionDropdown() {
|
|
128673
|
+
var _a, _b, _c, _d, _e, _f;
|
|
128674
|
+
const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
|
|
128675
|
+
const rightButtonRect = _rightButton.getBoundingClientRect();
|
|
128676
|
+
const dropdownParentRect = _dropdownParent.getBoundingClientRect();
|
|
128677
|
+
const spaceBelow = window.innerHeight - (rightButtonRect.bottom + ((_a = this.offsetParentRect) === null || _a === void 0 ? void 0 : _a.top));
|
|
128678
|
+
const spaceAbove = rightButtonRect.top + ((_b = this.offsetParentRect) === null || _b === void 0 ? void 0 : _b.top);
|
|
128679
|
+
const spaceRight = window.innerWidth - (rightButtonRect.left + ((_c = this.offsetParentRect) === null || _c === void 0 ? void 0 : _c.left));
|
|
128680
|
+
const spaceLeft = rightButtonRect.left;
|
|
128681
|
+
const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
|
|
128682
|
+
const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
|
|
128683
|
+
let top = `${rightButtonRect.bottom - ((_d = this.offsetParentRect) === null || _d === void 0 ? void 0 : _d.top) + window.scrollY}px`;
|
|
128684
|
+
let left = `${rightButtonRect.left - ((_e = this.offsetParentRect) === null || _e === void 0 ? void 0 : _e.left) + window.scrollX}px`;
|
|
128685
|
+
let bottom = 'auto';
|
|
128686
|
+
if (hasSpaceBelow) {
|
|
128687
|
+
bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
|
|
128688
|
+
top = 'auto';
|
|
128689
|
+
_dropdownParent.style.maxHeight = `${spaceAbove}px`;
|
|
128690
|
+
}
|
|
128691
|
+
if (hasSpaceRight) {
|
|
128692
|
+
left = `${rightButtonRect.right - dropdownParentRect.width - ((_f = this.offsetParentRect) === null || _f === void 0 ? void 0 : _f.left) + window.scrollX}px`;
|
|
128693
|
+
}
|
|
128694
|
+
_dropdownParent.style.top = top;
|
|
128695
|
+
_dropdownParent.style.bottom = bottom;
|
|
128696
|
+
_dropdownParent.style.left = left;
|
|
128697
|
+
}
|
|
128698
|
+
setEvents() {
|
|
128699
|
+
window.removeEventListener('scroll', this.positionDropdown.bind(this));
|
|
128700
|
+
window.addEventListener('scroll', this.positionDropdown.bind(this));
|
|
128701
|
+
}
|
|
128702
|
+
componentWillLoad() {
|
|
128703
|
+
this.setEvents();
|
|
128704
|
+
}
|
|
128705
|
+
componentWillRender() {
|
|
128706
|
+
this.resolveOffsetParentRect();
|
|
128707
|
+
}
|
|
128708
|
+
componentDidLoad() {
|
|
128709
|
+
if (this._element)
|
|
128710
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
128711
|
+
if (this.leftButton) {
|
|
128712
|
+
const dataInfo = { id: 'embedded' };
|
|
128713
|
+
ElementIDUtils.addIDInfo(this.leftButton, 'left-button', dataInfo);
|
|
128714
|
+
}
|
|
128715
|
+
if (this.rightButton) {
|
|
128716
|
+
const dataInfo = { id: 'embedded' };
|
|
128717
|
+
ElementIDUtils.addIDInfo(this.rightButton, 'right-button', dataInfo);
|
|
128718
|
+
}
|
|
128719
|
+
this.positionDropdown();
|
|
128720
|
+
}
|
|
128721
|
+
componentDidUpdate() {
|
|
128722
|
+
this.positionDropdown();
|
|
128723
|
+
}
|
|
128724
|
+
render() {
|
|
128725
|
+
const hasIconButton = this.shouldShowIconOnLeftButton();
|
|
128726
|
+
const hasLabelButton = this.shouldShowLabelOnLeftButton();
|
|
128727
|
+
const iconSize = this.getIconSize();
|
|
128728
|
+
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); } }))))));
|
|
128729
|
+
}
|
|
128730
|
+
shouldShowLabelOnLeftButton() {
|
|
128731
|
+
return ['icon-left', 'default'].includes(this.mode);
|
|
128732
|
+
}
|
|
128733
|
+
shouldShowIconOnLeftButton() {
|
|
128734
|
+
return ['icon-left', 'icon-only'].includes(this.mode);
|
|
128735
|
+
}
|
|
128736
|
+
get _element() { return this; }
|
|
128737
|
+
static get style() { return ezSplitButtonCss; }
|
|
128738
|
+
};
|
|
128739
|
+
|
|
128740
|
+
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
128741
|
|
|
127806
128742
|
const SplitItem = class extends HTMLElement$1 {
|
|
127807
128743
|
constructor() {
|
|
127808
128744
|
super();
|
|
127809
128745
|
this.__registerHost();
|
|
128746
|
+
this.label = undefined;
|
|
128747
|
+
this.enableExpand = true;
|
|
128748
|
+
this._expanded = false;
|
|
128749
|
+
this.size = undefined;
|
|
128750
|
+
}
|
|
128751
|
+
/**
|
|
128752
|
+
* Alterna a visibilidade do painel.
|
|
128753
|
+
*/
|
|
128754
|
+
toggleExpandItem() {
|
|
128755
|
+
this._expanded = !this._expanded;
|
|
128756
|
+
}
|
|
128757
|
+
componentDidLoad() {
|
|
128758
|
+
CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
|
|
127810
128759
|
}
|
|
127811
128760
|
render() {
|
|
127812
|
-
return (h(Host, { class:
|
|
128761
|
+
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
128762
|
}
|
|
127814
128763
|
static get style() { return ezSplitItemCss; }
|
|
127815
128764
|
};
|
|
@@ -128498,11 +129447,24 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128498
129447
|
super();
|
|
128499
129448
|
this.__registerHost();
|
|
128500
129449
|
this._items = [];
|
|
129450
|
+
this._buildInProgress = false;
|
|
128501
129451
|
this.direction = 'column';
|
|
129452
|
+
this.anchorToExpand = false;
|
|
128502
129453
|
}
|
|
128503
|
-
|
|
129454
|
+
rebuildLayout() {
|
|
129455
|
+
Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach(el => {
|
|
129456
|
+
el.remove();
|
|
129457
|
+
});
|
|
129458
|
+
Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach(el => {
|
|
129459
|
+
el['rebuildLayout']();
|
|
129460
|
+
});
|
|
129461
|
+
this.buildItems();
|
|
129462
|
+
this.initSplit();
|
|
129463
|
+
}
|
|
129464
|
+
buildItems() {
|
|
128504
129465
|
this._panelID = StringUtils$1.generateUUID();
|
|
128505
129466
|
this._element.dataset.panelId = this._panelID;
|
|
129467
|
+
this._element.dataset.uniqueId = "EzSplitPanel";
|
|
128506
129468
|
let itemsElements = Array.from(this._element.children);
|
|
128507
129469
|
this._items = itemsElements.filter(child => { var _a; return ((_a = child.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'EZ-SPLIT-ITEM'; });
|
|
128508
129470
|
let trackCount = 1;
|
|
@@ -128513,7 +129475,30 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128513
129475
|
}
|
|
128514
129476
|
trackCount += 2;
|
|
128515
129477
|
});
|
|
129478
|
+
}
|
|
129479
|
+
componentDidLoad() {
|
|
129480
|
+
this.buildItems();
|
|
128516
129481
|
this.initSplit();
|
|
129482
|
+
this._mutationObserver = new MutationObserver((mutationsList) => {
|
|
129483
|
+
for (const mutation of mutationsList) {
|
|
129484
|
+
if (mutation.type === 'childList' && this._buildInProgress === false) {
|
|
129485
|
+
this._buildInProgress = true;
|
|
129486
|
+
window.requestAnimationFrame(() => {
|
|
129487
|
+
this.rebuildLayout();
|
|
129488
|
+
});
|
|
129489
|
+
window.requestAnimationFrame(() => this._buildInProgress = false);
|
|
129490
|
+
break;
|
|
129491
|
+
}
|
|
129492
|
+
}
|
|
129493
|
+
});
|
|
129494
|
+
// Configure o observer para observar mudanças nos filhos
|
|
129495
|
+
this._mutationObserver.observe(this._element, { childList: true, subtree: false });
|
|
129496
|
+
}
|
|
129497
|
+
disconnectedCallback() {
|
|
129498
|
+
//disconect o _mutationObserver
|
|
129499
|
+
if (this._mutationObserver != undefined) {
|
|
129500
|
+
this._mutationObserver.disconnect();
|
|
129501
|
+
}
|
|
128517
129502
|
}
|
|
128518
129503
|
initSplit() {
|
|
128519
129504
|
if (!this._items.length) {
|
|
@@ -128525,7 +129510,7 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128525
129510
|
getGutters() {
|
|
128526
129511
|
const gutters = {
|
|
128527
129512
|
columnGutters: [],
|
|
128528
|
-
rowGutters: []
|
|
129513
|
+
rowGutters: [],
|
|
128529
129514
|
};
|
|
128530
129515
|
if (!this._items.length) {
|
|
128531
129516
|
return gutters;
|
|
@@ -128535,19 +129520,19 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128535
129520
|
if (index == this._items.length - 1)
|
|
128536
129521
|
return;
|
|
128537
129522
|
let gutterTrack = item.dataset.trackNumber;
|
|
128538
|
-
if (index ===
|
|
129523
|
+
if (index === this._items.length - 1) {
|
|
128539
129524
|
gutterTrack = this._items.length.toString();
|
|
128540
129525
|
}
|
|
128541
129526
|
gutters[proToChange].push({
|
|
128542
129527
|
track: Number(gutterTrack),
|
|
128543
|
-
element: this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${item.dataset.trackNumber}"]`)
|
|
129528
|
+
element: this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${item.dataset.trackNumber}"]`),
|
|
128544
129529
|
});
|
|
128545
129530
|
});
|
|
128546
129531
|
return gutters;
|
|
128547
129532
|
}
|
|
128548
129533
|
addItemGutter(item) {
|
|
128549
129534
|
const gutter = document.createElement('div');
|
|
128550
|
-
gutter.classList.add(
|
|
129535
|
+
gutter.classList.add('ez-split-gutter');
|
|
128551
129536
|
gutter.classList.add(this.direction);
|
|
128552
129537
|
gutter.dataset.itemTrack = `${item.dataset.trackNumber}`;
|
|
128553
129538
|
gutter.dataset.trackNumber = (Number(item.dataset.trackNumber) + 1).toString();
|
|
@@ -128555,29 +129540,47 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
128555
129540
|
}
|
|
128556
129541
|
getElementStyle() {
|
|
128557
129542
|
const style = {
|
|
128558
|
-
|
|
128559
|
-
|
|
128560
|
-
|
|
129543
|
+
display: 'grid',
|
|
129544
|
+
height: '100%',
|
|
129545
|
+
width: '100%',
|
|
129546
|
+
position: this.anchorToExpand ? 'relative' : 'unset',
|
|
128561
129547
|
};
|
|
128562
129548
|
return style;
|
|
128563
129549
|
}
|
|
129550
|
+
calcFreeSpacePercentage() {
|
|
129551
|
+
const inUseSpacePercentage = this._items.reduce((accumulator, currentValue) => {
|
|
129552
|
+
var _a;
|
|
129553
|
+
return accumulator + (((_a = currentValue.size) === null || _a === void 0 ? void 0 : _a.includes('%')) ? Number(currentValue.size.replace("%", "")) : 0);
|
|
129554
|
+
}, 0);
|
|
129555
|
+
const itemsWithoutSizeAmount = this._items.filter((item) => item.size === undefined).length;
|
|
129556
|
+
if (!itemsWithoutSizeAmount || !inUseSpacePercentage) {
|
|
129557
|
+
return null;
|
|
129558
|
+
}
|
|
129559
|
+
const freeSpacePercentage = ((100 - inUseSpacePercentage) / itemsWithoutSizeAmount);
|
|
129560
|
+
return freeSpacePercentage;
|
|
129561
|
+
}
|
|
128564
129562
|
getGridTemplate() {
|
|
128565
129563
|
let template = '';
|
|
128566
|
-
this.
|
|
129564
|
+
const freeSpacePercentage = this.calcFreeSpacePercentage();
|
|
129565
|
+
this._items.forEach((col, index) => {
|
|
129566
|
+
let size = col.size || '1fr';
|
|
129567
|
+
if (!col.size && freeSpacePercentage) {
|
|
129568
|
+
size = `${freeSpacePercentage}%`;
|
|
129569
|
+
}
|
|
128567
129570
|
if (index === this._items.length - 1) {
|
|
128568
|
-
template += `
|
|
129571
|
+
template += ` ${size}`;
|
|
128569
129572
|
return;
|
|
128570
129573
|
}
|
|
128571
129574
|
if (index === 0) {
|
|
128572
|
-
template +=
|
|
129575
|
+
template += `${size} 5px`;
|
|
128573
129576
|
return;
|
|
128574
129577
|
}
|
|
128575
|
-
template += `
|
|
129578
|
+
template += ` ${size} 5px`;
|
|
128576
129579
|
});
|
|
128577
129580
|
return template;
|
|
128578
129581
|
}
|
|
128579
129582
|
render() {
|
|
128580
|
-
return
|
|
129583
|
+
return h(Host, { style: this.getElementStyle() });
|
|
128581
129584
|
}
|
|
128582
129585
|
get _element() { return this; }
|
|
128583
129586
|
static get style() { return ezSplitPanelCss; }
|
|
@@ -129602,7 +130605,7 @@ const TreeItem = (props) => {
|
|
|
129602
130605
|
itemsList.push(treeItem);
|
|
129603
130606
|
}
|
|
129604
130607
|
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 ?
|
|
130608
|
+
h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem) }, {
|
|
129606
130609
|
disabled,
|
|
129607
130610
|
selected: treeItem.id === selectedId,
|
|
129608
130611
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
|
|
@@ -129610,11 +130613,25 @@ const TreeItem = (props) => {
|
|
|
129610
130613
|
h("div", { class: "item-label-container" },
|
|
129611
130614
|
h("div", { class: "item-icon-box" }, expandable &&
|
|
129612
130615
|
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
|
-
|
|
130616
|
+
h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)),
|
|
130617
|
+
getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)),
|
|
129615
130618
|
expanded
|
|
129616
130619
|
&& node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
|
|
129617
130620
|
};
|
|
130621
|
+
function getBadgeElement(itemId, badge, isSelectedItem) {
|
|
130622
|
+
if (badge == undefined) {
|
|
130623
|
+
return;
|
|
130624
|
+
}
|
|
130625
|
+
if (typeof badge === "string") {
|
|
130626
|
+
return h("div", { class: `tree-item-badge ${isSelectedItem ? null : badge}` }, badge === "error" &&
|
|
130627
|
+
h("ez-icon", { id: `${itemId}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" }));
|
|
130628
|
+
}
|
|
130629
|
+
if (badge.type === "text") {
|
|
130630
|
+
return h("div", { id: `${itemId}-badge-text`, class: "tree-item-badge-text" }, badge.text);
|
|
130631
|
+
}
|
|
130632
|
+
return h("div", null,
|
|
130633
|
+
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 }));
|
|
130634
|
+
}
|
|
129618
130635
|
|
|
129619
130636
|
class Node$1 {
|
|
129620
130637
|
constructor(tree, item, parent, isPlaceHolder = false) {
|
|
@@ -129858,7 +130875,7 @@ class Tree extends Node$1 {
|
|
|
129858
130875
|
}
|
|
129859
130876
|
}
|
|
129860
130877
|
|
|
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)}";
|
|
130878
|
+
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
130879
|
|
|
129863
130880
|
const EzTree$1 = class extends HTMLElement$1 {
|
|
129864
130881
|
constructor() {
|
|
@@ -130631,6 +131648,8 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
130631
131648
|
this.TOP_POSITION_NO_TASKBAR = '32';
|
|
130632
131649
|
this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
|
|
130633
131650
|
this.DEFAULT_HEIGHT = 430;
|
|
131651
|
+
this.FIX_MARGIN = 60;
|
|
131652
|
+
this.FILTER_COLUMN_WIDTH = 330;
|
|
130634
131653
|
this.opened = true;
|
|
130635
131654
|
this.columnName = undefined;
|
|
130636
131655
|
this.columnLabel = undefined;
|
|
@@ -130663,15 +131682,24 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
130663
131682
|
await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
|
|
130664
131683
|
}
|
|
130665
131684
|
}
|
|
130666
|
-
calculateLeftPosition(
|
|
130667
|
-
|
|
130668
|
-
|
|
131685
|
+
calculateLeftPosition({ leftPosition, fromIcon }) {
|
|
131686
|
+
const leftPositionCalculated = this.calcFilterColumnLeftPosition(leftPosition);
|
|
131687
|
+
if (!fromIcon) {
|
|
131688
|
+
return `${leftPositionCalculated}px`;
|
|
130669
131689
|
}
|
|
130670
131690
|
const difference = this.ezPopoverElement.getBoundingClientRect().left;
|
|
130671
|
-
const
|
|
130672
|
-
const leftResolved = (leftReference + 16) - difference;
|
|
131691
|
+
const leftResolved = (leftPositionCalculated + 16) - difference;
|
|
130673
131692
|
return `${(leftResolved > 0 ? leftResolved : 0)}px`;
|
|
130674
131693
|
}
|
|
131694
|
+
calcFilterColumnLeftPosition(leftReference) {
|
|
131695
|
+
var _a, _b;
|
|
131696
|
+
const gridReference = this.ezPopoverElement.closest("ez-grid");
|
|
131697
|
+
const gridLimit = (_a = gridReference.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.right;
|
|
131698
|
+
const popoverDiff = (_b = this.ezPopoverElement.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.left;
|
|
131699
|
+
const maxLeft = gridLimit - (this.FILTER_COLUMN_WIDTH + popoverDiff);
|
|
131700
|
+
const leftInt = leftReference - (this.FIX_MARGIN + popoverDiff);
|
|
131701
|
+
return leftInt > maxLeft ? maxLeft : leftInt;
|
|
131702
|
+
}
|
|
130675
131703
|
buildIsTextSearch() {
|
|
130676
131704
|
var _a, _b;
|
|
130677
131705
|
const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
|
|
@@ -130785,43 +131813,44 @@ const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
|
|
|
130785
131813
|
|
|
130786
131814
|
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
131815
|
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]}]);
|
|
131816
|
+
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
131817
|
const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
|
|
130790
131818
|
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
131819
|
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
131820
|
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
131821
|
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]}]);
|
|
131822
|
+
const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-item",{"item":[16],"enableKey":[4,"enable-key"]}]);
|
|
130795
131823
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
130796
131824
|
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
131825
|
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"],"
|
|
131826
|
+
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
131827
|
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
131828
|
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
131829
|
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]}]);
|
|
131830
|
+
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]]);
|
|
130803
131831
|
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
131832
|
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
|
-
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"]}]);
|
|
131833
|
+
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"_fieldsProps":[32]}]);
|
|
130806
131834
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16]}]);
|
|
130807
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
131835
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
130808
131836
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
130809
131837
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
130810
131838
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
130811
131839
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
130812
131840
|
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]);
|
|
130813
|
-
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]);
|
|
131841
|
+
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]},[[4,"ezCloseModal","handleEzModalAction"]]]);
|
|
130814
131842
|
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
130815
131843
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513]}]);
|
|
130816
131844
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
|
|
130817
131845
|
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
131846
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
130819
131847
|
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"]}]);
|
|
131848
|
+
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
131849
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
130822
131850
|
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
|
|
131851
|
+
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"]]]);
|
|
131852
|
+
const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"_expanded":[32]}]);
|
|
131853
|
+
const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"]}]);
|
|
130825
131854
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
130826
131855
|
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
131856
|
const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
|
|
@@ -130873,6 +131902,7 @@ const defineCustomElements = (opts) => {
|
|
|
130873
131902
|
EzSearch,
|
|
130874
131903
|
EzSidebarButton,
|
|
130875
131904
|
EzSkeleton,
|
|
131905
|
+
EzSplitButton,
|
|
130876
131906
|
EzSplitItem,
|
|
130877
131907
|
EzSplitPanel,
|
|
130878
131908
|
EzTabselector,
|
|
@@ -130894,4 +131924,4 @@ const defineCustomElements = (opts) => {
|
|
|
130894
131924
|
}
|
|
130895
131925
|
};
|
|
130896
131926
|
|
|
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 };
|
|
131927
|
+
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 };
|