@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-6165.0 → 0.0.0-bugfix-dev-KB-17130.0
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 +8 -10
- package/dist/cjs/{ApplicationUtils-2e444734.js → ApplicationUtils-c9d1205c.js} +56 -6
- package/dist/cjs/{RecordValidationProcessor-edd23705.js → RecordValidationProcessor-4c893e04.js} +1 -1
- package/dist/cjs/{constants-3a1d64fb.js → constants-2714478b.js} +2 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +56 -28
- package/dist/cjs/ez-alert-list.cjs.entry.js +148 -0
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_3.cjs.entry.js +182 -0
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +3 -4
- package/dist/cjs/ez-combo-box.cjs.entry.js +17 -152
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +31 -5
- package/dist/cjs/ez-dropdown.cjs.entry.js +12 -6
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +44 -3
- package/dist/cjs/ez-form.cjs.entry.js +36 -4
- package/dist/cjs/ez-grid.cjs.entry.js +246 -64
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +7 -1
- package/dist/cjs/ez-icon.cjs.entry.js +2 -2
- package/dist/cjs/ez-list.cjs.entry.js +5 -3
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +2 -2
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +23 -10
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_3.cjs.entry.js +8 -6
- package/dist/cjs/ez-search.cjs.entry.js +615 -32
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-item.cjs.entry.js +19 -0
- package/dist/cjs/ez-split-panel.cjs.entry.js +776 -0
- 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 +2 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +3 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +2 -2
- 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 +47 -12
- package/dist/cjs/{index-1064511f.js → index-a7b0c73d.js} +16 -6
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +6 -3
- package/dist/collection/components/ez-actions-button/ez-actions-button.css +17 -3
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +105 -27
- package/dist/collection/components/ez-alert-list/ez-alert-list.css +87 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +268 -0
- package/dist/collection/components/ez-card-item/ez-card-item.css +17 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +0 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +71 -169
- package/dist/collection/components/ez-dialog/ez-dialog.css +1 -1
- package/dist/collection/components/ez-dialog/ez-dialog.js +39 -4
- package/dist/collection/components/ez-dropdown/ez-dropdown.css +4 -3
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -4
- package/dist/collection/components/ez-form/ez-form.js +93 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +23 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +4 -1
- package/dist/collection/components/ez-form-view/structure/index.js +34 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +21 -9
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +23 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.css +1 -4
- package/dist/collection/components/ez-grid/ez-grid.js +91 -51
- package/dist/collection/components/ez-grid/interfaces/IColumnFilter.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +66 -12
- package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js +62 -0
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +94 -0
- package/dist/collection/components/ez-grid/utils/index.js +1 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +22 -0
- package/dist/collection/components/ez-icon/ez-icon.css +148 -139
- package/dist/collection/components/ez-list/ez-list.css +12 -7
- package/dist/collection/components/ez-list/ez-list.js +3 -1
- package/dist/collection/components/ez-modal/ez-modal.css +1 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +41 -10
- package/dist/collection/components/ez-popup/ez-popup.css +2 -2
- package/dist/collection/components/ez-search/ez-search.css +330 -0
- package/dist/collection/components/ez-search/ez-search.js +746 -55
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +8 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +122 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +12 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +17 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +20 -1
- package/dist/collection/components/ez-tree/ez-tree.css +33 -0
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
- package/dist/collection/utils/ApplicationUtils.js +56 -6
- package/dist/collection/utils/constants.js +1 -0
- package/dist/collection/utils/form/DataBinder.js +12 -1
- package/dist/collection/utils/interfaces/IAction.js +1 -0
- package/dist/custom-elements/index.d.ts +18 -0
- package/dist/custom-elements/index.js +2138 -339
- package/dist/esm/{ApplicationUtils-d9a34a16.js → ApplicationUtils-eaf91331.js} +56 -6
- package/dist/esm/{RecordValidationProcessor-abc814af.js → RecordValidationProcessor-b00b8b77.js} +1 -1
- package/dist/esm/constants-4e0d35b7.js +5 -0
- package/dist/esm/ez-actions-button.entry.js +56 -28
- package/dist/esm/ez-alert-list.entry.js +144 -0
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_3.entry.js +176 -0
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +3 -4
- package/dist/esm/ez-combo-box.entry.js +18 -153
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +31 -5
- package/dist/esm/ez-dropdown.entry.js +12 -6
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +44 -3
- package/dist/esm/ez-form.entry.js +36 -4
- package/dist/esm/ez-grid.entry.js +247 -65
- package/dist/esm/ez-guide-navigator.entry.js +7 -1
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-list.entry.js +5 -3
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +2 -2
- package/dist/esm/ez-multi-selection-list.entry.js +23 -10
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_3.entry.js +8 -6
- package/dist/esm/ez-search.entry.js +616 -33
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-split-item.entry.js +15 -0
- package/dist/esm/ez-split-panel.entry.js +772 -0
- 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 +2 -2
- package/dist/esm/ez-text-input.entry.js +3 -2
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +2 -2
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +47 -12
- package/dist/esm/{index-296b8458.js → index-baa5e267.js} +16 -6
- 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-0447d17c.entry.js +1 -0
- package/dist/ezui/{p-86a2036d.js → p-04f24913.js} +1 -1
- package/dist/ezui/p-05e1f4e7.js +1 -0
- package/dist/ezui/p-072e6347.entry.js +1 -0
- package/dist/ezui/p-133fae4a.entry.js +1 -0
- package/dist/ezui/{p-f4208819.entry.js → p-17be134a.entry.js} +1 -1
- package/dist/ezui/{p-cd19a6f8.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-60ba28ea.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-a5e09759.entry.js → p-20ec22c0.entry.js} +1 -1
- package/dist/ezui/p-2187f86c.js +1 -0
- package/dist/ezui/{p-e318d280.js → p-23a36bb6.js} +1 -1
- package/dist/ezui/{p-ce035beb.entry.js → p-24d3fede.entry.js} +1 -1
- package/dist/ezui/p-2a1a0e04.entry.js +1 -0
- package/dist/ezui/p-40f72de4.entry.js +1 -0
- package/dist/ezui/p-43b03119.entry.js +1 -0
- package/dist/ezui/{p-9b347f04.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/p-49456b34.entry.js +1 -0
- package/dist/ezui/p-4a7f113d.entry.js +1 -0
- package/dist/ezui/p-51c5e071.entry.js +1 -0
- package/dist/ezui/{p-ccb4ccd9.entry.js → p-555c9018.entry.js} +1 -1
- package/dist/ezui/{p-d43b22f3.entry.js → p-596634e9.entry.js} +1 -1
- package/dist/ezui/p-5bd5e68f.entry.js +1 -0
- package/dist/ezui/{p-a01068e1.entry.js → p-5d692ed1.entry.js} +1 -1
- package/dist/ezui/{p-95426f93.entry.js → p-5d86cca9.entry.js} +1 -1
- package/dist/ezui/p-5e1d036e.entry.js +1 -0
- package/dist/ezui/{p-7525e604.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/{p-c49dbf23.entry.js → p-650e4b6d.entry.js} +1 -1
- package/dist/ezui/{p-fd54b5b4.entry.js → p-6e2f8e6b.entry.js} +2 -2
- package/dist/ezui/p-6e429cff.entry.js +1 -0
- package/dist/ezui/p-76ba9d67.entry.js +1 -0
- package/dist/ezui/{p-37673563.entry.js → p-77a4bd35.entry.js} +1 -1
- package/dist/ezui/p-796c1a88.entry.js +1 -0
- package/dist/ezui/{p-5d6f2550.entry.js → p-85c8baae.entry.js} +1 -1
- package/dist/ezui/{p-fa571a4e.entry.js → p-8becebf8.entry.js} +1 -1
- package/dist/ezui/p-8defa6d3.entry.js +1 -0
- package/dist/ezui/{p-391de0e4.entry.js → p-9050d2cd.entry.js} +1 -1
- package/dist/ezui/{p-028f264f.entry.js → p-9cad9b6e.entry.js} +1 -1
- package/dist/ezui/{p-b11f035c.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/p-a08b309b.entry.js +1 -0
- package/dist/ezui/{p-2da09f70.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/p-af15c277.entry.js +1 -0
- package/dist/ezui/{p-32b4163f.entry.js → p-b041333c.entry.js} +1 -1
- package/dist/ezui/p-ba875f37.entry.js +1 -0
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-e2dfd935.entry.js → p-c0f1715f.entry.js} +1 -1
- package/dist/ezui/{p-83885b21.entry.js → p-cc2dc4f4.entry.js} +1 -1
- package/dist/ezui/p-d6ffe679.entry.js +1 -0
- package/dist/ezui/p-eb36f072.entry.js +1 -0
- package/dist/ezui/p-f56dd1da.entry.js +1 -0
- package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +15 -7
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +76 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +12 -15
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +8 -2
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +5 -0
- package/dist/types/components/ez-form/ez-form.d.ts +19 -1
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +5 -0
- package/dist/types/components/ez-form-view/structure/index.d.ts +15 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +9 -6
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -3
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -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 +13 -5
- package/dist/types/components/ez-grid/interfaces/IColumnFilter.d.ts +4 -0
- package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
- package/dist/types/components/ez-grid/utils/ColumnFilterManager.d.ts +9 -0
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +19 -0
- package/dist/types/components/ez-grid/utils/index.d.ts +1 -0
- package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +4 -0
- package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +1 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
- package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +2 -0
- package/dist/types/components/ez-search/ez-search.d.ts +112 -10
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +3 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
- package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
- package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
- package/dist/types/components.d.ts +236 -17
- package/dist/types/utils/ApplicationUtils.d.ts +24 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/form/DataBinder.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +2 -1
- package/dist/types/utils/interfaces/IAction.d.ts +7 -0
- package/package.json +4 -3
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -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/esm/constants-6dab64f7.js +0 -4
- 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-050247dc.entry.js +0 -1
- package/dist/ezui/p-1e7c4986.entry.js +0 -1
- package/dist/ezui/p-244dfe8a.entry.js +0 -1
- package/dist/ezui/p-27a01a26.js +0 -1
- package/dist/ezui/p-2a0e1679.entry.js +0 -1
- package/dist/ezui/p-4535da17.entry.js +0 -1
- package/dist/ezui/p-4c8b029b.entry.js +0 -1
- package/dist/ezui/p-4e31b69b.entry.js +0 -1
- package/dist/ezui/p-5495fa45.entry.js +0 -1
- package/dist/ezui/p-5ce6548c.entry.js +0 -1
- package/dist/ezui/p-68352e41.entry.js +0 -1
- package/dist/ezui/p-87e85160.entry.js +0 -1
- package/dist/ezui/p-8bd3903b.entry.js +0 -1
- package/dist/ezui/p-90fa4cb3.entry.js +0 -1
- package/dist/ezui/p-9285b53e.entry.js +0 -1
- package/dist/ezui/p-a510a4c5.entry.js +0 -1
- package/dist/ezui/p-d51aa09b.entry.js +0 -1
- package/dist/ezui/p-db528b31.entry.js +0 -1
- package/dist/ezui/p-e67d0bd5.entry.js +0 -1
- package/dist/ezui/p-e7fa0ad6.entry.js +0 -1
- package/dist/ezui/p-f15ec3bb.js +0 -1
- package/dist/ezui/p-ff82b176.entry.js +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, 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 } 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
|
|
@@ -82,12 +82,13 @@ class ApplicationUtils {
|
|
|
82
82
|
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
83
83
|
}
|
|
84
84
|
return new Promise(resolve => {
|
|
85
|
-
let dialog = document.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
let dialog = document.createElement("ez-dialog");
|
|
86
|
+
window.document.body.appendChild(dialog);
|
|
87
|
+
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger, options.beforeClose)
|
|
88
|
+
.then(ok => {
|
|
89
|
+
dialog.remove();
|
|
90
|
+
return resolve(ok);
|
|
91
|
+
});
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
94
|
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
@@ -132,6 +133,33 @@ class ApplicationUtils {
|
|
|
132
133
|
}
|
|
133
134
|
toast.show(message, 5000, useIcon, options.canClose);
|
|
134
135
|
}
|
|
136
|
+
static isModalContent(content) {
|
|
137
|
+
return content instanceof HTMLElement && content.tagName === 'EZ-MODAL-CONTAINER';
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Exibe um popup configurado com os parâmetros informados e retorna um callBack
|
|
141
|
+
* para removêlo da DOM quando necessário.
|
|
142
|
+
*
|
|
143
|
+
* @param popupProps
|
|
144
|
+
*/
|
|
145
|
+
static async showPopup(popupProps) {
|
|
146
|
+
var _a, _b;
|
|
147
|
+
const popup = document.createElement("ez-popup");
|
|
148
|
+
window.document.body.appendChild(popup);
|
|
149
|
+
const { content } = popupProps;
|
|
150
|
+
popup.setAttribute('id', v4());
|
|
151
|
+
popup.heightMode = (_a = popupProps.size) !== null && _a !== void 0 ? _a : "auto";
|
|
152
|
+
popup.opened = true;
|
|
153
|
+
if (ApplicationUtils.isModalContent(content)) {
|
|
154
|
+
popup.appendChild(content);
|
|
155
|
+
popup.useHeader = false;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
popup.ezTitle = (_b = popupProps.title) !== null && _b !== void 0 ? _b : "";
|
|
159
|
+
popup.innerHTML = content;
|
|
160
|
+
}
|
|
161
|
+
return () => popup.remove();
|
|
162
|
+
}
|
|
135
163
|
static async showModal(modalProps) {
|
|
136
164
|
modalProps = Object.assign(Object.assign({}, ApplicationUtils.defaultModalProps), modalProps);
|
|
137
165
|
const modal = document.createElement("ez-modal");
|
|
@@ -152,6 +180,21 @@ class ApplicationUtils {
|
|
|
152
180
|
modal.opened = true;
|
|
153
181
|
return () => modal.remove();
|
|
154
182
|
}
|
|
183
|
+
static showAlerts(props) {
|
|
184
|
+
const alertListId = 'EzAlertList';
|
|
185
|
+
let alertList = document.getElementById(alertListId);
|
|
186
|
+
if (!alertList) {
|
|
187
|
+
alertList = document.createElement('ez-alert-list');
|
|
188
|
+
alertList.setAttribute("id", alertListId);
|
|
189
|
+
window.document.body.appendChild(alertList);
|
|
190
|
+
}
|
|
191
|
+
props = Object.assign(Object.assign({}, ApplicationUtils.defaultAlertListProps), props);
|
|
192
|
+
alertList.itemRightSlotBuilder = props.itemRightSlotBuilder;
|
|
193
|
+
alertList.enableDragAndDrop = props.enableDragAndDrop;
|
|
194
|
+
alertList.enableExpand = props.enableExpand;
|
|
195
|
+
alertList.opened = props.opened;
|
|
196
|
+
alertList.alerts = props.alerts;
|
|
197
|
+
}
|
|
155
198
|
}
|
|
156
199
|
ApplicationUtils.defaultMessageOptions = {
|
|
157
200
|
canClose: true,
|
|
@@ -167,6 +210,13 @@ ApplicationUtils.defaultModalProps = {
|
|
|
167
210
|
closeOutsideClick: true,
|
|
168
211
|
closeEsc: true
|
|
169
212
|
};
|
|
213
|
+
ApplicationUtils.defaultAlertListProps = {
|
|
214
|
+
alerts: [],
|
|
215
|
+
enableDragAndDrop: true,
|
|
216
|
+
enableExpand: true,
|
|
217
|
+
itemRightSlotBuilder: null,
|
|
218
|
+
opened: true
|
|
219
|
+
};
|
|
170
220
|
|
|
171
221
|
class CSSVarsUtils {
|
|
172
222
|
static applyCSSVars(document, host, child) {
|
|
@@ -593,6 +643,16 @@ class DataBinder {
|
|
|
593
643
|
this.updateErrorMessage(field.name, fieldElement, field.message);
|
|
594
644
|
}
|
|
595
645
|
}
|
|
646
|
+
setFocus(fieldName) {
|
|
647
|
+
if (!this._fields.has(fieldName)) {
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
const fieldElement = this._fields.get(fieldName).field;
|
|
651
|
+
if (typeof fieldElement["setFocus"] != "function") {
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
fieldElement["setFocus"]();
|
|
655
|
+
}
|
|
596
656
|
clearInvalid(recordId) {
|
|
597
657
|
this._dataUnit.clearInvalid(recordId);
|
|
598
658
|
this._fields.forEach(fieldBinder => {
|
|
@@ -681,7 +741,8 @@ class DataBinder {
|
|
|
681
741
|
this._dataUnit.addRecord();
|
|
682
742
|
}
|
|
683
743
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
684
|
-
this._dataUnit.
|
|
744
|
+
const record = this._dataUnit.getSelectedRecord();
|
|
745
|
+
this._dataUnit.setFieldValue(fieldName, newValue, record ? [record.__record__id__] : undefined);
|
|
685
746
|
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
686
747
|
const bind = this._fields.get(fieldName);
|
|
687
748
|
if (bind) {
|
|
@@ -798,7 +859,7 @@ class Bind {
|
|
|
798
859
|
}
|
|
799
860
|
}
|
|
800
861
|
|
|
801
|
-
const ezActionsButtonCss = ":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space--small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-small, 6px);--ez-actions-button__btn-action--min-width:'auto';--ez-actions-button__btn-action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.ez-actions-button__actions-list{display:flex;flex-direction:column;position:fixed;width:fit-content;height:fit-content;z-index:var(--
|
|
862
|
+
const ezActionsButtonCss = ":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space--small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-small, 6px);--ez-actions-button__actions-list--z-index:var(--ez-elevation--8, 8);--ez-actions-button__actions-max-height:415px;--ez-actions-button__btn-action--min-width:'auto';--ez-actions-button__btn-action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.ez-actions-button__actions-list{display:flex;flex-direction:column;position:fixed;width:fit-content;height:fit-content;overflow-y:auto;scrollbar-width:thin;z-index:var(--ez-actions-button__actions-list--z-index);padding:var(--ez-actions-button__actions-list--padding);margin-top:var(--ez-actions-button__actions-list--top-margin);background-color:var(--ez-actions-button__actions-list--background-color);border-radius:var(--ez-actions-button__actions-list--border-radius);box-shadow:var(--ez-actions-button__actions-list--box-shadow)}.ez-actions-button__actions-list--max-height{max-height:var(--ez-actions-button__actions-max-height)}.ez-actions-button__actions-list--lowered{margin-top:calc(var(--ez-actions-button__actions-list--top-margin) + 6px)}.ez-actions-button__btn-action{--ez-button--justify-content:flex-start;--ez-button--width:100%;--ez-button--min-width:var(--ez-actions-button__btn-action--min-width);--ez-button--background-color:var(--ez-actions-button__btn-action--background-color);--ez-button--font-weight:var(--text-weight--medium, 400);--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__btn-action--spaced{--ez-button--padding-left:calc(var(--space--medium, 12px) + 24px)}.ez-actions-button__icon-right{margin-left:var(--space--small, 6px)}.ez-actions-button__icon-check,.ez-actions-button__icon-item{position:absolute;left:var(--space--medium, 12px)}.ez-actions-button__icon-check{color:var(--ez-button--hover-color)}.ez-actions-button__arrow{position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;width:0;height:0;z-index:calc(var(--ez-actions-button__actions-list--z-index) + 1);border-bottom:15px solid var(--ez-actions-button__btn-action--background-color)}.ez-actions-button__arrow--upped{margin-top:calc((var(--ez-actions-button__actions-list--top-margin) + 2px) * -1)}.ez-actions-button__arrow--small{margin-left:6px}.ez-actions-button__arrow--medium{margin-left:11px}.ez-actions-button__arrow--large{margin-left:13px}.ez-actions-button__arrow:only-child{display:none}.ez-actions-button__btn-transparent{--ez-button--background-color:transparent;--ez-button--hover--background-color:transparent;--ez-button--active--background-color:transparent;--ez-button--focus--border:none}.ez-actions-button__btn-label{--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__list-container{position:relative}.ez-actions-button--bottom-padding{padding-bottom:var(--space--small, 6px)}";
|
|
802
863
|
|
|
803
864
|
const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
804
865
|
constructor() {
|
|
@@ -806,6 +867,8 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
806
867
|
this.__registerHost();
|
|
807
868
|
this.__attachShadow();
|
|
808
869
|
this.ezAction = createEvent(this, "ezAction", 7);
|
|
870
|
+
this.ezPopoverOpen = createEvent(this, "ezPopoverOpen", 7);
|
|
871
|
+
this.ezDisconnectedActionButtons = createEvent(this, "ezDisconnectedActionButtons", 7);
|
|
809
872
|
this._arrowOffset = 5;
|
|
810
873
|
this.innerClickCheck = (floatingContainer, node) => {
|
|
811
874
|
var _a;
|
|
@@ -819,6 +882,12 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
819
882
|
return true;
|
|
820
883
|
}
|
|
821
884
|
}
|
|
885
|
+
do {
|
|
886
|
+
if (floatingContainer.contains(node)) {
|
|
887
|
+
return true;
|
|
888
|
+
}
|
|
889
|
+
node = node.offsetParent;
|
|
890
|
+
} while (node != undefined && node != document.getRootNode());
|
|
822
891
|
}
|
|
823
892
|
return false;
|
|
824
893
|
};
|
|
@@ -842,6 +911,25 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
842
911
|
}
|
|
843
912
|
this._floatingID = undefined;
|
|
844
913
|
}
|
|
914
|
+
/**
|
|
915
|
+
* Apresenta a lista de ações.
|
|
916
|
+
*/
|
|
917
|
+
async showActions() {
|
|
918
|
+
if (!this.enabled) {
|
|
919
|
+
return;
|
|
920
|
+
}
|
|
921
|
+
const options = this.getFloatOptions();
|
|
922
|
+
this._floatingID = FloatingManager.float(this._actionsList, this._listContainer, options);
|
|
923
|
+
const sideLimit = this.getSideLimit();
|
|
924
|
+
if (sideLimit != undefined) {
|
|
925
|
+
options.left = sideLimit;
|
|
926
|
+
FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, options);
|
|
927
|
+
}
|
|
928
|
+
window.requestAnimationFrame(() => {
|
|
929
|
+
this._actionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
930
|
+
});
|
|
931
|
+
this.ezPopoverOpen.emit(this._actionsList);
|
|
932
|
+
}
|
|
845
933
|
/**
|
|
846
934
|
* Verifica se a lista de ações está aberta.
|
|
847
935
|
*/
|
|
@@ -854,7 +942,8 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
854
942
|
innerClickTest: this.innerClickCheck,
|
|
855
943
|
isFixed: true,
|
|
856
944
|
top: this.getPositionTop(),
|
|
857
|
-
left: this.getPositionLeft()
|
|
945
|
+
left: this.getPositionLeft(),
|
|
946
|
+
backClickListener: () => this._floatingID = undefined
|
|
858
947
|
};
|
|
859
948
|
}
|
|
860
949
|
getSideLimit() {
|
|
@@ -866,21 +955,6 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
866
955
|
}
|
|
867
956
|
return;
|
|
868
957
|
}
|
|
869
|
-
showActions() {
|
|
870
|
-
if (!this.enabled) {
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
const options = this.getFloatOptions();
|
|
874
|
-
this._floatingID = FloatingManager.float(this._actionsList, this._listContainer, options);
|
|
875
|
-
const sideLimit = this.getSideLimit();
|
|
876
|
-
if (sideLimit != undefined) {
|
|
877
|
-
options.left = sideLimit;
|
|
878
|
-
FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, options);
|
|
879
|
-
}
|
|
880
|
-
window.requestAnimationFrame(() => {
|
|
881
|
-
this._actionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
958
|
updatePosition() {
|
|
885
959
|
if (!this.enabled || this._floatingID == undefined) {
|
|
886
960
|
return;
|
|
@@ -963,14 +1037,18 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
963
1037
|
}
|
|
964
1038
|
}
|
|
965
1039
|
}
|
|
1040
|
+
disconnectedCallback() {
|
|
1041
|
+
this.ezDisconnectedActionButtons.emit();
|
|
1042
|
+
}
|
|
966
1043
|
componentDidLoad() {
|
|
967
1044
|
CSSVarsUtils.applyVarsButton(this._element, this._button);
|
|
968
1045
|
ElementIDUtils.addIDInfo(this._element);
|
|
969
1046
|
this.controlScrollPage();
|
|
970
1047
|
}
|
|
971
1048
|
componentDidRender() {
|
|
1049
|
+
var _a;
|
|
972
1050
|
if (this._floatingID == undefined) {
|
|
973
|
-
this._actionsList.remove();
|
|
1051
|
+
(_a = this._actionsList) === null || _a === void 0 ? void 0 : _a.remove();
|
|
974
1052
|
}
|
|
975
1053
|
if (this.hasLabelOrCheckOption()) {
|
|
976
1054
|
if (!!this.value) {
|
|
@@ -981,20 +1059,31 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
981
1059
|
}
|
|
982
1060
|
}
|
|
983
1061
|
}
|
|
1062
|
+
buildActionElement(action) {
|
|
1063
|
+
var _a;
|
|
1064
|
+
if (!action) {
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
if (action.itemBuilder != undefined) {
|
|
1068
|
+
const customContent = action.itemBuilder(this._element, action);
|
|
1069
|
+
if (typeof customContent === "string") {
|
|
1070
|
+
return h("div", { class: "ez-actions-button__btn-action", innerHTML: customContent });
|
|
1071
|
+
}
|
|
1072
|
+
return customContent;
|
|
1073
|
+
}
|
|
1074
|
+
return h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), enabled: action.enabled, class: "ez-actions-button__btn-action" +
|
|
1075
|
+
(this.checkOption || this.hasIconName() ? " ez-actions-button__btn-action--spaced" : "") }, this.checkOption && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.value) === action.value &&
|
|
1076
|
+
h("ez-icon", { class: "ez-actions-button__icon-check", slot: "leftIcon", size: "small", iconName: "check" }), !this.checkOption && action.iconName &&
|
|
1077
|
+
h("ez-icon", { class: "ez-actions-button__icon-item", slot: "leftIcon", size: "small", iconName: action.iconName }));
|
|
1078
|
+
}
|
|
984
1079
|
render() {
|
|
985
1080
|
var _a;
|
|
986
1081
|
return (h(Host, null, h("ez-button", { ref: elem => this._button = elem, class: (this.isTransparent ? "ez-actions-button__btn-transparent" : "") +
|
|
987
1082
|
(this.showLabel ? " ez-actions-button__btn-label" : ""), label: this.showLabel && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.label), enabled: this.enabled, mode: this.showLabel ? undefined : "icon", iconName: this.showLabel ? "" : this.displayIcon || "dots-vertical", size: this.size, onClick: () => this.handlerButtonClick() }, this.showLabel &&
|
|
988
1083
|
h("ez-icon", { class: "ez-actions-button__icon-right", slot: "rightIcon", iconName: this.displayIcon || "dots-vertical" })), h("section", { class: "ez-actions-button__list-container", ref: elem => this._listContainer = elem }, this.arrowActive &&
|
|
989
1084
|
h("div", { class: "ez-actions-button__arrow ez-actions-button__arrow--" + (this.size || "small") +
|
|
990
|
-
(this.isTransparent ? " ez-actions-button__arrow--upped" : "") }), h("div", { ref: elem => this._actionsList = elem, class: "ez-actions-button__actions-list" +
|
|
991
|
-
(this.arrowActive && !this.isTransparent ? " ez-actions-button__actions-list--lowered" : "") }, this.actions.map(action =>
|
|
992
|
-
var _a;
|
|
993
|
-
return h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), enabled: action.enabled, class: "ez-actions-button__btn-action" +
|
|
994
|
-
(this.checkOption || this.hasIconName() ? " ez-actions-button__btn-action--spaced" : "") }, this.checkOption && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.value) === action.value &&
|
|
995
|
-
h("ez-icon", { class: "ez-actions-button__icon-check", slot: "leftIcon", size: "small", iconName: "check" }), !this.checkOption && action.iconName &&
|
|
996
|
-
h("ez-icon", { class: "ez-actions-button__icon-item", slot: "leftIcon", size: "small", iconName: action.iconName }));
|
|
997
|
-
})))));
|
|
1085
|
+
(this.isTransparent ? " ez-actions-button__arrow--upped" : "") }), h("div", { ref: elem => this._actionsList = elem, class: "ez-actions-button__actions-list ez-actions-button__actions-list--max-height" +
|
|
1086
|
+
(this.arrowActive && !this.isTransparent ? " ez-actions-button__actions-list--lowered" : "") }, this.actions.map(action => this.buildActionElement(action))))));
|
|
998
1087
|
}
|
|
999
1088
|
get _element() { return this; }
|
|
1000
1089
|
static get style() { return ezActionsButtonCss; }
|
|
@@ -1024,6 +1113,148 @@ const EzAlert$1 = class extends HTMLElement$1 {
|
|
|
1024
1113
|
static get style() { return ezAlertCss; }
|
|
1025
1114
|
};
|
|
1026
1115
|
|
|
1116
|
+
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(--more-visible--2x, 3);\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
|
+
|
|
1118
|
+
const EzAlertList$1 = class extends HTMLElement$1 {
|
|
1119
|
+
constructor() {
|
|
1120
|
+
super();
|
|
1121
|
+
this.__registerHost();
|
|
1122
|
+
this.__attachShadow();
|
|
1123
|
+
this.alerts = [];
|
|
1124
|
+
this.enableDragAndDrop = undefined;
|
|
1125
|
+
this.enableExpand = true;
|
|
1126
|
+
this.itemRightSlotBuilder = undefined;
|
|
1127
|
+
this.opened = true;
|
|
1128
|
+
this.expanded = false;
|
|
1129
|
+
}
|
|
1130
|
+
observeOpened() {
|
|
1131
|
+
this.manageOverlay();
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Retorna o id do alerta a partir do título e do índice.
|
|
1135
|
+
*/
|
|
1136
|
+
alertId(title, index) {
|
|
1137
|
+
const concatTitle = (title) => { var _a; return (_a = title === null || title === void 0 ? void 0 : title.split(' ').join('-')) !== null && _a !== void 0 ? _a : ""; };
|
|
1138
|
+
return `alert-${index}-${concatTitle(title)}`;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Retorna o título do alerta a partir do id.
|
|
1142
|
+
*/
|
|
1143
|
+
getAlertTitle(id) {
|
|
1144
|
+
var _a;
|
|
1145
|
+
return (_a = this.alerts.find((alert, index) => this.alertId(alert.title, index) === id)) === null || _a === void 0 ? void 0 : _a.title;
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Retorna o texto do título do alerta.
|
|
1149
|
+
*/
|
|
1150
|
+
getTitleText(item) {
|
|
1151
|
+
var _a;
|
|
1152
|
+
const title = (_a = this.getAlertTitle(item.id)) !== null && _a !== void 0 ? _a : '';
|
|
1153
|
+
return `${title}${(title && item.label) ? ':' : ''}`;
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Gerencia a exibição do conteúdo expandido.
|
|
1157
|
+
*/
|
|
1158
|
+
toggleExpandContainer() {
|
|
1159
|
+
if (!this.enableExpand) {
|
|
1160
|
+
return;
|
|
1161
|
+
}
|
|
1162
|
+
this.expanded = !this.expanded;
|
|
1163
|
+
this._container.classList.toggle('expanded', this.expanded);
|
|
1164
|
+
if (this.expanded) {
|
|
1165
|
+
this.updatePosition(this.getBoundingRight(), this.getBoundingBottom());
|
|
1166
|
+
}
|
|
1167
|
+
else {
|
|
1168
|
+
this.updatePosition(`10px`, `10px`);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Gerencia a exibição do overlay usando FloatingManager do Core.
|
|
1173
|
+
*/
|
|
1174
|
+
async manageOverlay() {
|
|
1175
|
+
if (this.opened) {
|
|
1176
|
+
this._overlayId = FloatingManager.float(this._container, this._overlayRef, this.getFloatOptions());
|
|
1177
|
+
}
|
|
1178
|
+
else {
|
|
1179
|
+
FloatingManager.close(this._overlayId);
|
|
1180
|
+
this._overlayId = undefined;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
/**
|
|
1184
|
+
* Atualiza a posição da lista.
|
|
1185
|
+
*/
|
|
1186
|
+
updatePosition(right, bottom) {
|
|
1187
|
+
FloatingManager.updateFloatPosition(this._container, this._overlayRef, Object.assign(Object.assign({}, this.getFloatOptions()), { right,
|
|
1188
|
+
bottom }));
|
|
1189
|
+
}
|
|
1190
|
+
;
|
|
1191
|
+
/**
|
|
1192
|
+
* Retorna valores padrões do componente
|
|
1193
|
+
*/
|
|
1194
|
+
getFloatOptions() {
|
|
1195
|
+
return {
|
|
1196
|
+
autoClose: false,
|
|
1197
|
+
isFixed: false,
|
|
1198
|
+
bottom: '10px',
|
|
1199
|
+
right: '10px',
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
;
|
|
1203
|
+
/**
|
|
1204
|
+
* Retorna o valor para o alinhamento horizontal do componente.
|
|
1205
|
+
*/
|
|
1206
|
+
getBoundingRight() {
|
|
1207
|
+
const docWidth = document.body.clientWidth;
|
|
1208
|
+
const boxWidth = this._container.getBoundingClientRect().width;
|
|
1209
|
+
return ((docWidth - boxWidth) / 2) + 'px';
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* Retorna o valor para o alinhamento vertical do componente.
|
|
1213
|
+
*/
|
|
1214
|
+
getBoundingBottom() {
|
|
1215
|
+
const docHeight = document.body.clientHeight;
|
|
1216
|
+
const boxHeight = this._container.getBoundingClientRect().height;
|
|
1217
|
+
return ((docHeight - boxHeight) / 2) + 'px';
|
|
1218
|
+
}
|
|
1219
|
+
componentDidRender() {
|
|
1220
|
+
this.manageOverlay();
|
|
1221
|
+
if (this.opened) {
|
|
1222
|
+
this._container.focus();
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
componentWillLoad() {
|
|
1226
|
+
this.dataElementId = ElementIDUtils.addIDInfo(this._element, 'EzAlertList');
|
|
1227
|
+
}
|
|
1228
|
+
render() {
|
|
1229
|
+
return (h(Host, Object.assign({}, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: this.dataElementId }), 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: () => {
|
|
1230
|
+
this.opened = false;
|
|
1231
|
+
}, title: 'Fechar' }))), h("div", { class: "alert-list__expandable-content" }, h("ez-list", { hoverFeedback: true, itemLeftSlotBuilder: item => {
|
|
1232
|
+
return (h("a", { href: "#", style: {
|
|
1233
|
+
fontFamily: "var(--font-pattern, 'Roboto')",
|
|
1234
|
+
fontSize: 'var(--text--medium, 14px)',
|
|
1235
|
+
fontWeight: 'var(--text-weight--medium, 400)',
|
|
1236
|
+
color: 'var(--color--primary, #008561)',
|
|
1237
|
+
marginRight: '4px',
|
|
1238
|
+
cursor: 'pointer',
|
|
1239
|
+
display: 'flex',
|
|
1240
|
+
width: 'max-content',
|
|
1241
|
+
textDecoration: 'none'
|
|
1242
|
+
} }, this.getTitleText(item)));
|
|
1243
|
+
}, dataSource: this.alerts.map((alert, index) => {
|
|
1244
|
+
var _a;
|
|
1245
|
+
return {
|
|
1246
|
+
id: this.alertId(alert.title, index),
|
|
1247
|
+
label: (_a = alert.detail) !== null && _a !== void 0 ? _a : "",
|
|
1248
|
+
};
|
|
1249
|
+
}) })))))));
|
|
1250
|
+
}
|
|
1251
|
+
get _element() { return this; }
|
|
1252
|
+
static get watchers() { return {
|
|
1253
|
+
"opened": ["observeOpened"]
|
|
1254
|
+
}; }
|
|
1255
|
+
static get style() { return ezAlertListCss; }
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1027
1258
|
const ezApplicationCss = "";
|
|
1028
1259
|
|
|
1029
1260
|
const EzApplication$1 = class extends HTMLElement$1 {
|
|
@@ -1750,7 +1981,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
1750
1981
|
static get style() { return ezCalendarCss; }
|
|
1751
1982
|
};
|
|
1752
1983
|
|
|
1753
|
-
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px)
|
|
1984
|
+
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}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n cursor: pointer;\n justify-content: space-between;\n gap: var(--space--small, 6px);\n}\n\n.card-item__details-left {\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-right {\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail:not(:last-child) {\n cursor: pointer;\n\n /*public*/\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item__detail-label--color);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item--color);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n@container box (max-width: 500px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-left {\n width: 100%;\n }\n \n .card-item__details-right {\n width: 100%;\n }\n}";
|
|
1754
1985
|
|
|
1755
1986
|
const EzCardItem$1 = class extends HTMLElement$1 {
|
|
1756
1987
|
constructor() {
|
|
@@ -1994,7 +2225,7 @@ var ChipSize;
|
|
|
1994
2225
|
ChipSize[ChipSize["CHAR_LIMIT"] = 28] = "CHAR_LIMIT";
|
|
1995
2226
|
})(ChipSize || (ChipSize = {}));
|
|
1996
2227
|
|
|
1997
|
-
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsable-box--bordered{border:var(--border--small);border-color:var(--color--strokes);border-radius:var(--border--radius-medium);padding:var(--space--xs)}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:
|
|
2228
|
+
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsable-box--bordered{border:var(--border--small);border-color:var(--color--strokes);border-radius:var(--border--radius-medium);padding:var(--space--xs)}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:2s all ease-in-out}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
|
|
1998
2229
|
|
|
1999
2230
|
const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
2000
2231
|
constructor() {
|
|
@@ -2061,7 +2292,6 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
2061
2292
|
this.ezEditLabelMode.emit(this._activeEditText);
|
|
2062
2293
|
}
|
|
2063
2294
|
confirmRemove(evt) {
|
|
2064
|
-
evt.preventDefault();
|
|
2065
2295
|
evt.stopPropagation();
|
|
2066
2296
|
ApplicationUtils.confirm("Aviso", `Deseja realmente remover o grupo <b>${this.label}</b>?`)
|
|
2067
2297
|
.then((canRemove) => {
|
|
@@ -2118,9 +2348,6 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
2118
2348
|
static get style() { return ezCollapsibleBoxCss; }
|
|
2119
2349
|
};
|
|
2120
2350
|
|
|
2121
|
-
const REQUIRED_INFO = " (obrigatório) *";
|
|
2122
|
-
const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
|
|
2123
|
-
|
|
2124
2351
|
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)}}";
|
|
2125
2352
|
|
|
2126
2353
|
const EzComboBox$1 = class extends HTMLElement$1 {
|
|
@@ -2130,24 +2357,22 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2130
2357
|
this.__attachShadow();
|
|
2131
2358
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
2132
2359
|
this._changeDeboucingTimeout = null;
|
|
2133
|
-
this._limitCharsToSearch = 3;
|
|
2134
2360
|
this._deboucingTime = 300;
|
|
2135
2361
|
this._maxWidthValue = 0;
|
|
2136
2362
|
this._tabPressed = false;
|
|
2137
2363
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
2138
|
-
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
2139
2364
|
this._lookupMode = false;
|
|
2140
2365
|
this._preSelection = undefined;
|
|
2141
2366
|
this._visibleOptions = undefined;
|
|
2142
2367
|
this._startLoading = false;
|
|
2143
2368
|
this._showLoading = true;
|
|
2144
2369
|
this._criteria = undefined;
|
|
2370
|
+
this.limitCharsToSearch = 3;
|
|
2145
2371
|
this.value = undefined;
|
|
2146
2372
|
this.label = undefined;
|
|
2147
2373
|
this.enabled = true;
|
|
2148
2374
|
this.options = undefined;
|
|
2149
2375
|
this.errorMessage = undefined;
|
|
2150
|
-
this.searchMode = undefined;
|
|
2151
2376
|
this.showSelectedValue = false;
|
|
2152
2377
|
this.showOptionValue = false;
|
|
2153
2378
|
this.suppressSearch = false;
|
|
@@ -2155,7 +2380,9 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2155
2380
|
this.suppressEmptyOption = false;
|
|
2156
2381
|
this.canShowError = true;
|
|
2157
2382
|
this.mode = "regular";
|
|
2383
|
+
this.hideErrorOnFocusOut = true;
|
|
2158
2384
|
this.listOptionsPosition = undefined;
|
|
2385
|
+
this.isTextSearch = false;
|
|
2159
2386
|
}
|
|
2160
2387
|
observeErrorMessage() {
|
|
2161
2388
|
var _a;
|
|
@@ -2169,7 +2396,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2169
2396
|
observeValue(newValue, oldValue) {
|
|
2170
2397
|
if (this._textInput && newValue != oldValue) {
|
|
2171
2398
|
try {
|
|
2172
|
-
if (
|
|
2399
|
+
if (typeof newValue === "string") {
|
|
2173
2400
|
this.setInputValue();
|
|
2174
2401
|
return;
|
|
2175
2402
|
}
|
|
@@ -2196,7 +2423,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2196
2423
|
observeOptions(newOptions, oldOptions) {
|
|
2197
2424
|
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
2198
2425
|
return;
|
|
2199
|
-
this.loadOptions(SearchMode.PRELOAD);
|
|
2426
|
+
this.loadOptions(SearchMode$1.PRELOAD);
|
|
2200
2427
|
}
|
|
2201
2428
|
/*
|
|
2202
2429
|
* Retorna uma promise com o valor da opção selecionada,
|
|
@@ -2332,7 +2559,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2332
2559
|
}
|
|
2333
2560
|
updateVisibleOptions() {
|
|
2334
2561
|
let opts = this._source || [];
|
|
2335
|
-
if (
|
|
2562
|
+
if (this._criteria) {
|
|
2336
2563
|
const upperCriteria = this._criteria.toUpperCase();
|
|
2337
2564
|
opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
|
|
2338
2565
|
}
|
|
@@ -2407,7 +2634,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2407
2634
|
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
2408
2635
|
}
|
|
2409
2636
|
nextOption() {
|
|
2410
|
-
if (
|
|
2637
|
+
if (!this.isOptionsVisible()) {
|
|
2411
2638
|
return;
|
|
2412
2639
|
}
|
|
2413
2640
|
this.showOptions();
|
|
@@ -2430,9 +2657,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2430
2657
|
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
2431
2658
|
this._preSelection = undefined;
|
|
2432
2659
|
}
|
|
2433
|
-
else {
|
|
2434
|
-
this.controlListWithOnlyOne();
|
|
2435
|
-
}
|
|
2436
2660
|
}
|
|
2437
2661
|
updateSource(source) {
|
|
2438
2662
|
this._startLoading = false;
|
|
@@ -2451,7 +2675,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2451
2675
|
this.updateVisibleOptions();
|
|
2452
2676
|
if (this._tabPressed) {
|
|
2453
2677
|
this._tabPressed = false;
|
|
2454
|
-
this.controlEmptySearch();
|
|
2455
2678
|
}
|
|
2456
2679
|
}
|
|
2457
2680
|
else {
|
|
@@ -2459,10 +2682,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2459
2682
|
}
|
|
2460
2683
|
}
|
|
2461
2684
|
}
|
|
2462
|
-
clearSource() {
|
|
2463
|
-
this._source = [];
|
|
2464
|
-
this.updateVisibleOptions();
|
|
2465
|
-
}
|
|
2466
2685
|
selectOption(newOption) {
|
|
2467
2686
|
var _a, _b;
|
|
2468
2687
|
const currentValue = this.getSelectedOption(this.value);
|
|
@@ -2474,11 +2693,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2474
2693
|
else {
|
|
2475
2694
|
this.resetOptions();
|
|
2476
2695
|
}
|
|
2477
|
-
if (this.searchMode) {
|
|
2478
|
-
this._visibleOptions = [];
|
|
2479
|
-
this.clearSource();
|
|
2480
|
-
}
|
|
2481
|
-
this.setFocus();
|
|
2482
2696
|
}
|
|
2483
2697
|
loadOptions(mode, argument = "") {
|
|
2484
2698
|
this._criteria = argument;
|
|
@@ -2514,93 +2728,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2514
2728
|
clearSearch() {
|
|
2515
2729
|
this.value = null;
|
|
2516
2730
|
}
|
|
2517
|
-
controlListWithOnlyOne() {
|
|
2518
|
-
var _a;
|
|
2519
|
-
if (this.searchMode) {
|
|
2520
|
-
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
2521
|
-
if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
|
|
2522
|
-
this.selectOption(source[0]);
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
}
|
|
2526
|
-
controlEmptySearch() {
|
|
2527
|
-
var _a;
|
|
2528
|
-
if (this.searchMode) {
|
|
2529
|
-
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2530
|
-
this.clearSearch();
|
|
2531
|
-
ApplicationUtils.info(this._textEmptyList);
|
|
2532
|
-
}
|
|
2533
|
-
else {
|
|
2534
|
-
this.controlListWithOnlyOne();
|
|
2535
|
-
}
|
|
2536
|
-
}
|
|
2537
|
-
}
|
|
2538
|
-
validateDescriptionValue() {
|
|
2539
|
-
if (!this.searchMode || StringUtils$1.isEmpty(this.value)) {
|
|
2540
|
-
return;
|
|
2541
|
-
}
|
|
2542
|
-
let value = this.value;
|
|
2543
|
-
if (typeof value === "object") {
|
|
2544
|
-
return;
|
|
2545
|
-
}
|
|
2546
|
-
if (StringUtils$1.isEmpty(value)) {
|
|
2547
|
-
return;
|
|
2548
|
-
}
|
|
2549
|
-
this.loadDescriptionValue(value);
|
|
2550
|
-
}
|
|
2551
|
-
async loadDescriptionValue(argument) {
|
|
2552
|
-
var _a, _b;
|
|
2553
|
-
if (argument == undefined) {
|
|
2554
|
-
return;
|
|
2555
|
-
}
|
|
2556
|
-
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
2557
|
-
this.loadOptionValue(argument);
|
|
2558
|
-
return;
|
|
2559
|
-
}
|
|
2560
|
-
const searchArgument = {
|
|
2561
|
-
mode: SearchMode.PREDICTIVE,
|
|
2562
|
-
argument
|
|
2563
|
-
};
|
|
2564
|
-
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
|
|
2565
|
-
if (source == undefined) {
|
|
2566
|
-
return;
|
|
2567
|
-
}
|
|
2568
|
-
if (source instanceof Promise) {
|
|
2569
|
-
source.then((result) => {
|
|
2570
|
-
this.setDescriptionValue(result);
|
|
2571
|
-
});
|
|
2572
|
-
}
|
|
2573
|
-
else {
|
|
2574
|
-
this.setDescriptionValue(source);
|
|
2575
|
-
}
|
|
2576
|
-
}
|
|
2577
|
-
setDescriptionValue(source) {
|
|
2578
|
-
const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
|
|
2579
|
-
if (value == undefined || !Object.keys(value).length) {
|
|
2580
|
-
this.showNoResultMessage();
|
|
2581
|
-
return;
|
|
2582
|
-
}
|
|
2583
|
-
this._lookupMode = true;
|
|
2584
|
-
this.value = value;
|
|
2585
|
-
}
|
|
2586
|
-
loadOptionValue(argument) {
|
|
2587
|
-
var _a;
|
|
2588
|
-
const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
|
|
2589
|
-
if (source != undefined) {
|
|
2590
|
-
this.selectOption(source);
|
|
2591
|
-
}
|
|
2592
|
-
else {
|
|
2593
|
-
this.showNoResultMessage();
|
|
2594
|
-
}
|
|
2595
|
-
}
|
|
2596
|
-
async showNoResultMessage() {
|
|
2597
|
-
this.clearSearch();
|
|
2598
|
-
ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
|
|
2599
|
-
}
|
|
2600
|
-
getFieldLabel() {
|
|
2601
|
-
var _a;
|
|
2602
|
-
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
|
|
2603
|
-
}
|
|
2604
2731
|
resetOptions() {
|
|
2605
2732
|
this.hideOptions();
|
|
2606
2733
|
this._criteria = undefined;
|
|
@@ -2626,12 +2753,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2626
2753
|
});
|
|
2627
2754
|
}
|
|
2628
2755
|
}
|
|
2629
|
-
|
|
2630
|
-
this.updateSource([]);
|
|
2631
|
-
}
|
|
2632
|
-
else {
|
|
2633
|
-
this.loadOptions(SearchMode.PRELOAD);
|
|
2634
|
-
}
|
|
2756
|
+
this.loadOptions(SearchMode$1.PRELOAD);
|
|
2635
2757
|
}
|
|
2636
2758
|
componentDidRender() {
|
|
2637
2759
|
var _a;
|
|
@@ -2641,7 +2763,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2641
2763
|
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
2642
2764
|
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
2643
2765
|
});
|
|
2644
|
-
this.validateDescriptionValue();
|
|
2645
2766
|
}
|
|
2646
2767
|
componentDidLoad() {
|
|
2647
2768
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
@@ -2661,7 +2782,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2661
2782
|
// Event handlers
|
|
2662
2783
|
//---------------------------------------------
|
|
2663
2784
|
handlerIconClick() {
|
|
2664
|
-
this.
|
|
2785
|
+
this.showOptions();
|
|
2665
2786
|
}
|
|
2666
2787
|
onTextInputChangeHandler(event) {
|
|
2667
2788
|
var _a;
|
|
@@ -2673,40 +2794,17 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2673
2794
|
return;
|
|
2674
2795
|
}
|
|
2675
2796
|
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
2676
|
-
const argumentNumber = Number(argument || undefined);
|
|
2677
2797
|
if (!this._criteria) {
|
|
2678
2798
|
this._textInput.value = event.data || argument;
|
|
2679
2799
|
}
|
|
2680
2800
|
this._criteria = argument;
|
|
2681
2801
|
if (argument) {
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
this.clearSource();
|
|
2685
|
-
if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
2686
|
-
this._showLoading = true;
|
|
2687
|
-
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
2688
|
-
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
2689
|
-
}, this._deboucingTime);
|
|
2690
|
-
this.showOptions();
|
|
2691
|
-
}
|
|
2692
|
-
else {
|
|
2693
|
-
this.hideOptions();
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
else {
|
|
2697
|
-
this.updateVisibleOptions();
|
|
2698
|
-
this.showOptions();
|
|
2699
|
-
}
|
|
2802
|
+
this.updateVisibleOptions();
|
|
2803
|
+
this.showOptions();
|
|
2700
2804
|
}
|
|
2701
2805
|
else {
|
|
2702
2806
|
this.hideOptions();
|
|
2703
|
-
|
|
2704
|
-
this._showLoading = false;
|
|
2705
|
-
this.clearSource();
|
|
2706
|
-
}
|
|
2707
|
-
else {
|
|
2708
|
-
this.updateVisibleOptions();
|
|
2709
|
-
}
|
|
2807
|
+
this.updateVisibleOptions();
|
|
2710
2808
|
}
|
|
2711
2809
|
}
|
|
2712
2810
|
clearDeboucingTimeout() {
|
|
@@ -2716,15 +2814,13 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2716
2814
|
}
|
|
2717
2815
|
}
|
|
2718
2816
|
onTextInputClickHandler() {
|
|
2719
|
-
|
|
2720
|
-
this.showOptions();
|
|
2721
|
-
}
|
|
2817
|
+
this.showOptions();
|
|
2722
2818
|
}
|
|
2723
2819
|
keyDownHandler(event) {
|
|
2724
2820
|
this._tabPressed = false;
|
|
2725
2821
|
if (event.ctrlKey) {
|
|
2726
2822
|
if (event.key === "f" || event.key === "F") {
|
|
2727
|
-
this.loadOptions(SearchMode.ADVANCED);
|
|
2823
|
+
this.loadOptions(SearchMode$1.ADVANCED);
|
|
2728
2824
|
//ATENÇÃO: Ctrl + F tem ação específica nos browsers
|
|
2729
2825
|
//nesse caso, como vamos abrir o popup de busca avançada,
|
|
2730
2826
|
//não é interessante deixar o evento propagar;
|
|
@@ -2750,7 +2846,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2750
2846
|
break;
|
|
2751
2847
|
case "Tab":
|
|
2752
2848
|
this._tabPressed = true;
|
|
2753
|
-
this.controlListWithOnlyOne();
|
|
2754
2849
|
break;
|
|
2755
2850
|
}
|
|
2756
2851
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
@@ -2760,17 +2855,15 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2760
2855
|
//event.stopPropagation();
|
|
2761
2856
|
}
|
|
2762
2857
|
onTextInputFocusOutHandler() {
|
|
2763
|
-
this.
|
|
2858
|
+
if (this.hideErrorOnFocusOut)
|
|
2859
|
+
this.cancelPreselection();
|
|
2764
2860
|
}
|
|
2765
2861
|
canShowListOptions() {
|
|
2766
2862
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
2767
2863
|
}
|
|
2768
2864
|
render() {
|
|
2769
|
-
var _a;
|
|
2770
2865
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
2771
|
-
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:
|
|
2772
|
-
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
2773
|
-
: 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
|
|
2866
|
+
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
|
|
2774
2867
|
&& this._visibleOptions.length === 0
|
|
2775
2868
|
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
2776
2869
|
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
|
|
@@ -2785,12 +2878,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2785
2878
|
}; }
|
|
2786
2879
|
static get style() { return ezComboBoxCss; }
|
|
2787
2880
|
};
|
|
2788
|
-
var SearchMode;
|
|
2881
|
+
var SearchMode$1;
|
|
2789
2882
|
(function (SearchMode) {
|
|
2790
2883
|
SearchMode["ADVANCED"] = "ADVANCED";
|
|
2791
2884
|
SearchMode["PRELOAD"] = "PRELOAD";
|
|
2792
2885
|
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
2793
|
-
})(SearchMode || (SearchMode = {}));
|
|
2886
|
+
})(SearchMode$1 || (SearchMode$1 = {}));
|
|
2794
2887
|
|
|
2795
2888
|
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)}";
|
|
2796
2889
|
|
|
@@ -3208,7 +3301,7 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
3208
3301
|
static get style() { return ezDateTimeInputCss; }
|
|
3209
3302
|
};
|
|
3210
3303
|
|
|
3211
|
-
const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__title--font-pattern:var(--font-pattern, \"Roboto\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"Roboto\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__container--default{border-radius:6px 6px 6px 6px}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:0;color:var(--title--primary)}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title__label{padding-left:var(--dialog__title--padding-left)}.title__label--no-icon{padding-left:0}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.title-icon--success{background-color:var(--dialog__success--background-color)}.title-icon--warn{background-color:var(--dialog__warning--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
3304
|
+
const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__title--font-pattern:var(--font-pattern, \"Roboto\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"Roboto\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--dialog-z-index:var(--elevation--100, 100);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__container--default{border-radius:6px 6px 6px 6px}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:0;color:var(--title--primary)}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title__label{padding-left:var(--dialog__title--padding-left)}.title__label--no-icon{padding-left:0}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.title-icon--success{background-color:var(--dialog__success--background-color)}.title-icon--warn{background-color:var(--dialog__warning--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
3212
3305
|
|
|
3213
3306
|
class Message {
|
|
3214
3307
|
constructor(title, message, dialogType, confirm, icon, labelCancel, labelConfirm, btnConfirmDanger, callBack, beforeClose) {
|
|
@@ -3231,10 +3324,12 @@ const EzDialog$1 = class extends HTMLElement$1 {
|
|
|
3231
3324
|
this.__attachShadow();
|
|
3232
3325
|
this.ezCancel = createEvent(this, "ezCancel", 7);
|
|
3233
3326
|
this.ezAccept = createEvent(this, "ezAccept", 7);
|
|
3327
|
+
this.PRIMARY_BUTTON_ID = "EZ_DIALOG_PRIMARY_BUTTON";
|
|
3234
3328
|
this.labelConfirm = 'Sim';
|
|
3235
3329
|
this.labelCancel = 'Não';
|
|
3236
3330
|
this.btnConfirmDanger = false;
|
|
3237
3331
|
this._messageQueue = [];
|
|
3332
|
+
this._canFocusOnPrimaryBtn = false;
|
|
3238
3333
|
this.confirm = false;
|
|
3239
3334
|
this.dialogType = undefined;
|
|
3240
3335
|
this.message = undefined;
|
|
@@ -3243,8 +3338,17 @@ const EzDialog$1 = class extends HTMLElement$1 {
|
|
|
3243
3338
|
this.ezTitle = undefined;
|
|
3244
3339
|
this.beforeClose = undefined;
|
|
3245
3340
|
}
|
|
3246
|
-
observeConfig() {
|
|
3341
|
+
observeConfig(newValue, oldValue) {
|
|
3247
3342
|
this.manageOverflow();
|
|
3343
|
+
//Eh preciso verificar se gouve de fato mudança do estado opened de FALSE para TRUE
|
|
3344
|
+
if (newValue && !oldValue) {
|
|
3345
|
+
this._canFocusOnPrimaryBtn = true;
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3348
|
+
handleKeyDown(event) {
|
|
3349
|
+
if (event.key === 'Escape' || event.key === 'Esc') {
|
|
3350
|
+
this.handleButtonClick(false);
|
|
3351
|
+
}
|
|
3248
3352
|
}
|
|
3249
3353
|
manageOverflow() {
|
|
3250
3354
|
if (this.opened) {
|
|
@@ -3360,17 +3464,32 @@ const EzDialog$1 = class extends HTMLElement$1 {
|
|
|
3360
3464
|
}
|
|
3361
3465
|
componentDidRender() {
|
|
3362
3466
|
this.manageOverlay();
|
|
3467
|
+
this.focusOnDialog();
|
|
3468
|
+
this.handleFocusOnPrimaryButton();
|
|
3469
|
+
}
|
|
3470
|
+
focusOnDialog() {
|
|
3363
3471
|
const dialog = this._element.shadowRoot.querySelector('.overlay .dialog');
|
|
3364
3472
|
if (dialog instanceof HTMLDivElement) {
|
|
3365
3473
|
dialog.style.outline = 'none';
|
|
3366
3474
|
dialog.focus();
|
|
3367
3475
|
}
|
|
3368
3476
|
}
|
|
3477
|
+
handleFocusOnPrimaryButton() {
|
|
3478
|
+
if (this._canFocusOnPrimaryBtn) {
|
|
3479
|
+
this.focusOnPrimaryButton();
|
|
3480
|
+
this._canFocusOnPrimaryBtn = false;
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
focusOnPrimaryButton() {
|
|
3484
|
+
const btnConfirm = this._element.shadowRoot.querySelector(`#${this.PRIMARY_BUTTON_ID}`);
|
|
3485
|
+
const buttonElement = btnConfirm === null || btnConfirm === void 0 ? void 0 : btnConfirm.shadowRoot.querySelector('button');
|
|
3486
|
+
buttonElement === null || buttonElement === void 0 ? void 0 : buttonElement.focus();
|
|
3487
|
+
}
|
|
3369
3488
|
render() {
|
|
3370
3489
|
if (this.opened && this._currentMessage) {
|
|
3371
3490
|
return (h("div", { class: "overlay", ref: ref => this._overlayRef = ref }, h("div", { tabindex: "-1", class: "dialog" }, this.getTypeIndicatorElement(this._currentMessage), h("div", { class: this.getClassContainer(this._currentMessage) }, h("div", { class: "title__container" }, h("div", { class: "title__box" }, this.getIconElement(this._currentMessage), h("div", { class: this.getClassTitleLabel(this._currentMessage), innerHTML: this._currentMessage.title, "data-element-id": ElementIDUtils.getInternalIDInfo("title") })), h("button", { class: "btn-close", onClick: () => this.handleButtonClick(false), "data-element-id": ElementIDUtils.getInternalIDInfo("buttonClose") })), h("div", { class: "message", innerHTML: this._currentMessage.message, "data-element-id": ElementIDUtils.getInternalIDInfo("message") }), this._currentMessage.confirm &&
|
|
3372
|
-
h("div", { class: "button-yes-no__container" }, h("ez-button", { class: "button__cancel", "data-element-id": ElementIDUtils.getInternalIDInfo("cancel"), label: this._currentMessage.labelCancel, onClick: () => this.handleButtonClick(false) }), h("ez-button", { class: !this._currentMessage.btnConfirmDanger ? "button__confirm" : "button__confirm--danger", "data-element-id": ElementIDUtils.getInternalIDInfo("confirm"), label: this._currentMessage.labelConfirm, onClick: () => this.handleButtonClick(true) })), !this._currentMessage.confirm &&
|
|
3373
|
-
h("div", { class: "button__confirm--container" }, h("ez-button", { label: 'Ok', "data-element-id": ElementIDUtils.getInternalIDInfo("ok"), class: "button__confirm", onClick: () => this.handleButtonClick(true) }))))));
|
|
3491
|
+
h("div", { class: "button-yes-no__container" }, h("ez-button", { class: "button__cancel", "data-element-id": ElementIDUtils.getInternalIDInfo("cancel"), label: this._currentMessage.labelCancel, onClick: () => this.handleButtonClick(false) }), h("ez-button", { id: this.PRIMARY_BUTTON_ID, class: !this._currentMessage.btnConfirmDanger ? "button__confirm" : "button__confirm--danger", "data-element-id": ElementIDUtils.getInternalIDInfo("confirm"), label: this._currentMessage.labelConfirm, onClick: () => this.handleButtonClick(true) })), !this._currentMessage.confirm &&
|
|
3492
|
+
h("div", { class: "button__confirm--container" }, h("ez-button", { id: this.PRIMARY_BUTTON_ID, label: 'Ok', "data-element-id": ElementIDUtils.getInternalIDInfo("ok"), class: "button__confirm", onClick: () => this.handleButtonClick(true) }))))));
|
|
3374
3493
|
}
|
|
3375
3494
|
return null;
|
|
3376
3495
|
}
|
|
@@ -3655,7 +3774,7 @@ class SubmenuControl {
|
|
|
3655
3774
|
}
|
|
3656
3775
|
}
|
|
3657
3776
|
|
|
3658
|
-
const ezDropdownCss = ":host{--ez-dropdown--z-index:var(--more-visible, 2);--ez-dropdown--padding:var(--space--small, 6px);--ez-dropdown--box-shadow:var(--shadow--medium, 0px 8px 24px rgba(0, 38, 111, 0.1));--ez-dropdown--border-radius:var(--border--radius-medium, 12px);--ez-dropdown--background-color:var(--background--xlight, #fff);--ez-dropdown--font-family:var(--font-pattern, 'Roboto');--ez-dropdown--max-
|
|
3777
|
+
const ezDropdownCss = ":host{--ez-dropdown--z-index:var(--more-visible, 2);--ez-dropdown--padding:var(--space--small, 6px);--ez-dropdown--box-shadow:var(--shadow--medium, 0px 8px 24px rgba(0, 38, 111, 0.1));--ez-dropdown--border-radius:var(--border--radius-medium, 12px);--ez-dropdown--background-color:var(--background--xlight, #fff);--ez-dropdown--font-family:var(--font-pattern, 'Roboto');--ez-dropdown--max-height:415px;--ez-dropdown__item--padding:var(--space--small, 6px);--ez-dropdown__item--gap:var(--space--small, 6px);--ez-dropdown__item--border-radius:var(--border--radius-small, 6px);--ez-dropdown__item--color:var(--title--primary, #2b3a54);--ez-dropdown__item--font-weight:var(--text-weight--medium, 400);--ez-dropdown__item--font-size:var(--text--medium, 14px);--ez-dropdown__item--line-height:calc(var(--ez-dropdown__item--font-size) + 4px);--ez-dropdown__item--background-color:var(--background--medium, #f0f3f7);--ez-dropdown__item--transition:var(--transition, .2s linear);--ez-dropdown__item-label--margin-right:var(--space--medium, 12px);--ez-dropdown__icon--size:var(--icon--medium, 18px);--ez-dropdown__divider--background-color:var(--color--disable-secondary, #f2f5f8);--ez-dropdown__divider--margin:var(--space--extra-small, 3px) 0;--ez-dropdown__group-label--color:var(--text--secondary, #A2ABB9);--ez-dropdown__group-label--font-weight:var(--text-weight--large, 600);--ez-dropdown__group-label--font-size:var(--text--small, 12px);--ez-dropdown__group-label--line-height:var(--text--medium, 14px);--ez-dropdown__group-label--padding:var(--space--small, 6px);--ez-dropdown__submenu--z-index:var(--most-visible, 3);--ez-dropdown__link--font-weight:var(--text-weight--large, 600);--ez-dropdown__link--primary--color:var(--color--primary, #008561);--ez-dropdown__link--critical--color:var(--color-alert--error-800, #BD0025);--ez-dropdown__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-dropdown__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-dropdown__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-dropdown__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-dropdown__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-dropdown__scrollbar--width:var(--space--small, 6px);--ez-dropdown__scrollbar--padding-right:var(--space--extra-small, 3px);display:flex;flex-direction:column;height:fit-content;user-select:none;box-sizing:border-box;position:fixed;z-index:var(--ez-dropdown--z-index)}:host *{box-sizing:border-box}.ez-dropdown{display:flex;padding:var(--ez-dropdown--padding);box-shadow:var(--ez-dropdown--box-shadow);border-radius:var(--ez-dropdown--border-radius);background-color:var(--ez-dropdown--background-color);max-width:var(--ez-dropdown--max-width)}.ez-dropdown__max-height{max-height:var(--ez-dropdown--max-height)}.ez-dropdown *{font-family:var(--ez-dropdown--font-family)}.ez-dropdown__container{display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;flex:auto;scrollbar-color:var(--ez-dropdown__scrollbar--color-clicked) var(--ez-dropdown__scrollbar--color-background)}.ez-dropdown__container::-webkit-scrollbar{background-color:var(--ez-dropdown__scrollbar--color-background);width:var(--ez-dropdown__scrollbar--width);max-width:var(--ez-dropdown__scrollbar--width);min-width:var(--ez-dropdown__scrollbar--width)}.ez-dropdown__container::-webkit-scrollbar-track{background-color:var(--ez-dropdown__scrollbar--color-background);border-radius:var(--ez-dropdown__scrollbar--border-radius)}.ez-dropdown__container::-webkit-scrollbar-thumb{background-color:var(--ez-dropdown__scrollbar--color-default);border-radius:var(--ez-dropdown__scrollbar--border-radius)}.ez-dropdown__container::-webkit-scrollbar-thumb:vertical:hover,.ez-dropdown__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-dropdown__scrollbar--color-hover)}.ez-dropdown__container::-webkit-scrollbar-thumb:vertical:active,.ez-dropdown__container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-dropdown__scrollbar--color-clicked)}.ez-dropdown__container--spacer{padding-right:var(--ez-dropdown__scrollbar--padding-right)}.ez-dropdown__item{display:flex;align-items:center;background-color:transparent;border-radius:var(--ez-dropdown__item--border-radius);transition:var(--ez-dropdown__item--transition)}.ez-dropdown__item:hover{background-color:var(--ez-dropdown__item--background-color)}.ez-dropdown__item-wrapper{display:flex;align-items:center;position:relative;cursor:pointer;width:100%;margin:0;white-space:nowrap;gap:var(--ez-dropdown__item--gap);color:var(--ez-dropdown__item--color);font-weight:var(--ez-dropdown__item--font-weight);font-size:var(--ez-dropdown__item--font-size);line-height:var(--ez-dropdown__item--line-height);padding:var(--ez-dropdown__item--padding)}.ez-dropdown__item-wrapper ez-icon{display:flex;justify-content:center;align-items:center;width:var(--ez-dropdown__icon--size);height:var(--ez-dropdown__icon--size);min-width:var(--ez-dropdown__icon--size);min-height:var(--ez-dropdown__icon--size)}.ez-dropdown__item-content{display:flex;align-items:center;flex:auto;overflow:hidden;gap:var(--ez-dropdown__item--gap)}.ez-dropdown__item-label{text-align:left;text-overflow:ellipsis;overflow:hidden;flex:auto}.ez-dropdown__item-label:not(:last-child){margin-right:var(--ez-dropdown__item-label--margin-right)}.ez-dropdown__item-content+.ez-dropdown__link{margin-left:var(--ez-dropdown__item-label--margin-right);margin-right:var(--ez-dropdown__item--padding)}.ez-dropdown__item-builder{flex:auto}.ez-dropdown__divider{width:100%;height:2px;border-radius:1px;border:none;display:block;background-color:var(--ez-dropdown__divider--background-color);margin:var(--ez-dropdown__divider--margin)}.ez-dropdown__hidden{visibility:hidden}.ez-dropdown__group{display:flex;flex-direction:column}.ez-dropdown__group-label{display:block;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ez-dropdown__group-label--color);font-weight:var(--ez-dropdown__group-label--font-weight);font-size:var(--ez-dropdown__group-label--font-size);line-height:var(--ez-dropdown__group-label--line-height);padding:var(--ez-dropdown__group-label--padding)}.ez-dropdown__icon-right{margin-left:auto}.ez-dropdown__submenu{position:fixed;z-index:var(--ez-dropdown__submenu--z-index);margin-top:calc(var(--ez-dropdown__item--padding) * -1)}.ez-dropdown__submenu--hide{display:none}.ez-dropdown__link{display:block;margin-left:auto;cursor:pointer;text-overflow:ellipsis;overflow:hidden;font-weight:var(--ez-dropdown__link--font-weight);max-width:calc(var(--ez-dropdown--max-width) * 0.43)}.ez-dropdown__link--primary{color:var(--ez-dropdown__link--primary--color)}.ez-dropdown__link--critical{color:var(--ez-dropdown__link--critical--color)}.ez-dropdown__link:hover{text-decoration:underline}";
|
|
3659
3778
|
|
|
3660
3779
|
const EzDropdown$1 = class extends HTMLElement$1 {
|
|
3661
3780
|
constructor() {
|
|
@@ -3664,6 +3783,7 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3664
3783
|
this.__attachShadow();
|
|
3665
3784
|
this.ezClick = createEvent(this, "ezClick", 7);
|
|
3666
3785
|
this.ezSubActionClick = createEvent(this, "ezSubActionClick", 7);
|
|
3786
|
+
this.ezOutsideClick = createEvent(this, "ezOutsideClick", 7);
|
|
3667
3787
|
this._itemList = {};
|
|
3668
3788
|
this._submenuList = [];
|
|
3669
3789
|
this._openedMenuList = {};
|
|
@@ -3676,6 +3796,11 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3676
3796
|
this.value = undefined;
|
|
3677
3797
|
this.itemBuilder = undefined;
|
|
3678
3798
|
}
|
|
3799
|
+
handleClickOutside(event) {
|
|
3800
|
+
if (!this._element.contains(event.target)) {
|
|
3801
|
+
this.ezOutsideClick.emit();
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3679
3804
|
//---------------------------------------------
|
|
3680
3805
|
// Private methods
|
|
3681
3806
|
//---------------------------------------------
|
|
@@ -3754,13 +3879,13 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3754
3879
|
this._itemList[item.id] = {};
|
|
3755
3880
|
}
|
|
3756
3881
|
}
|
|
3757
|
-
getContainerItemBuilder(item, level) {
|
|
3882
|
+
getContainerItemBuilder(item, level, isLockedLevels, hasIcon, hasChildren) {
|
|
3758
3883
|
if (this.itemBuilder == undefined) {
|
|
3759
3884
|
return;
|
|
3760
3885
|
}
|
|
3761
3886
|
const customContent = this.itemBuilder(item, level);
|
|
3762
3887
|
if (customContent == undefined) {
|
|
3763
|
-
return;
|
|
3888
|
+
return this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren);
|
|
3764
3889
|
}
|
|
3765
3890
|
if (typeof customContent !== "string") {
|
|
3766
3891
|
return (h("div", { class: "ez-dropdown__item-builder" }, customContent));
|
|
@@ -3781,7 +3906,7 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3781
3906
|
var _a;
|
|
3782
3907
|
return (item.type !== "divider"
|
|
3783
3908
|
? 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
|
|
3784
|
-
? this.getContainerItemBuilder(item, level)
|
|
3909
|
+
? this.getContainerItemBuilder(item, level, isLockedLevels, hasIcon, hasChildren)
|
|
3785
3910
|
: this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren)), ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
3786
3911
|
!isLockedLevels &&
|
|
3787
3912
|
hasChildren &&
|
|
@@ -3797,7 +3922,7 @@ const EzDropdown$1 = class extends HTMLElement$1 {
|
|
|
3797
3922
|
const hasGroup = this.hasGroup(branchItems);
|
|
3798
3923
|
const hasIcon = this.hasIcon(branchItems);
|
|
3799
3924
|
const hasChildren = this.hasChildren(branchItems);
|
|
3800
|
-
return (h("div", { class: "ez-dropdown", "data-level": level }, h("div", { class: "ez-dropdown__container" }, Object.keys(itemsByGroup)
|
|
3925
|
+
return (h("div", { class: "ez-dropdown ez-dropdown__max-height", "data-level": level }, h("div", { class: "ez-dropdown__container" }, Object.keys(itemsByGroup)
|
|
3801
3926
|
.map((groupLabel) => {
|
|
3802
3927
|
return (h("div", Object.assign({ class: "ez-dropdown__group" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${groupLabel}_ezDropdownGroup`) }), groupLabel !== "noGroup" &&
|
|
3803
3928
|
h("label", { class: "ez-dropdown__group-label", title: groupLabel }, groupLabel), hasGroup &&
|
|
@@ -4446,7 +4571,10 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4446
4571
|
constructor() {
|
|
4447
4572
|
super();
|
|
4448
4573
|
this.__registerHost();
|
|
4574
|
+
this.ezFormRequestClearFieldToFocus = createEvent(this, "ezFormRequestClearFieldToFocus", 7);
|
|
4575
|
+
this.ezFormSetFields = createEvent(this, "ezFormSetFields", 7);
|
|
4449
4576
|
this.ezReady = createEvent(this, "ezReady", 7);
|
|
4577
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
4450
4578
|
this.onDataUnitAction = (action) => {
|
|
4451
4579
|
if (action.type === Action.METADATA_LOADED) {
|
|
4452
4580
|
this.processMetadata();
|
|
@@ -4455,6 +4583,7 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4455
4583
|
this.dataUnit = undefined;
|
|
4456
4584
|
this.config = undefined;
|
|
4457
4585
|
this.recordsValidator = undefined;
|
|
4586
|
+
this.fieldToFocus = undefined;
|
|
4458
4587
|
}
|
|
4459
4588
|
/**
|
|
4460
4589
|
* Realiza validação no conteúdo de todos os campos.
|
|
@@ -4489,6 +4618,7 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4489
4618
|
if (currentSheet == undefined) {
|
|
4490
4619
|
return;
|
|
4491
4620
|
}
|
|
4621
|
+
this.ezFormSetFields.emit(fields);
|
|
4492
4622
|
const idFormSheet = `${StringUtils$1.replaceAccentuatedChars(StringUtils$1.toCamelCase(currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.label), false)}_selectorContainer`;
|
|
4493
4623
|
return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { class: "ez-row ez-padding-vertical--small", fields: fields })));
|
|
4494
4624
|
}
|
|
@@ -4520,6 +4650,22 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4520
4650
|
metadata.addRequiredFields(this._staticFields.filter(f => f.dataset.required).map(f => f.dataset.fieldName));
|
|
4521
4651
|
this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")), this.dataUnit.dataUnitId, metadata, this.recordsValidator);
|
|
4522
4652
|
this.ezReady.emit();
|
|
4653
|
+
this.handleFieldToFocus();
|
|
4654
|
+
}
|
|
4655
|
+
handleFieldToFocus() {
|
|
4656
|
+
var _a;
|
|
4657
|
+
if (this.fieldToFocus == undefined) {
|
|
4658
|
+
return;
|
|
4659
|
+
}
|
|
4660
|
+
const currentSheet = selectCurrentSheet((_a = this._store) === null || _a === void 0 ? void 0 : _a.getState());
|
|
4661
|
+
const fields = currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.fields;
|
|
4662
|
+
if (!fields.some(item => item.name === this.fieldToFocus)) {
|
|
4663
|
+
return;
|
|
4664
|
+
}
|
|
4665
|
+
requestAnimationFrame(() => {
|
|
4666
|
+
this._dataBinder.setFocus(this.fieldToFocus);
|
|
4667
|
+
this.ezFormRequestClearFieldToFocus.emit();
|
|
4668
|
+
});
|
|
4523
4669
|
}
|
|
4524
4670
|
disconnectedCallback() {
|
|
4525
4671
|
this.dataUnit.unsubscribe(this.onDataUnitAction);
|
|
@@ -4541,6 +4687,10 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4541
4687
|
static get style() { return ezFormCss; }
|
|
4542
4688
|
};
|
|
4543
4689
|
|
|
4690
|
+
const REQUIRED_INFO = " (obrigatório) *";
|
|
4691
|
+
const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
|
|
4692
|
+
const EZ_GRID_LOADING_SOURCE = "EZ_GRID_LOADING_SOURCE";
|
|
4693
|
+
|
|
4544
4694
|
const buildSwitch$1 = (field) => {
|
|
4545
4695
|
return buildField(field.name, field.label, field.readOnly, field.contextName, true);
|
|
4546
4696
|
};
|
|
@@ -4633,9 +4783,47 @@ uiBuilders$1.set(UserInterface.LONGTEXT, buildTextArea);
|
|
|
4633
4783
|
const fieldBuilder = (field) => {
|
|
4634
4784
|
const builder = uiBuilders$1.get(field.userInterface) || buildTextInput$1;
|
|
4635
4785
|
const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
|
|
4636
|
-
|
|
4786
|
+
const builtElement = builder(Object.assign(Object.assign({}, field), { label }));
|
|
4787
|
+
//@ts-ignore
|
|
4788
|
+
builtElement.$attrs$['data-form-item'] = field.name;
|
|
4789
|
+
return builtElement;
|
|
4637
4790
|
};
|
|
4638
4791
|
|
|
4792
|
+
class FormItem {
|
|
4793
|
+
constructor(elem) {
|
|
4794
|
+
this.elem = elem;
|
|
4795
|
+
}
|
|
4796
|
+
addRightElement(el) {
|
|
4797
|
+
this.removeRightElement();
|
|
4798
|
+
el.classList.add('ez-padding-left--small');
|
|
4799
|
+
el.setAttribute('data-custom-item', 'true');
|
|
4800
|
+
this.elem.classList.add('ez-col--nowrap');
|
|
4801
|
+
this.elem.appendChild(el);
|
|
4802
|
+
}
|
|
4803
|
+
removeRightElement() {
|
|
4804
|
+
Array.from(this.elem.querySelectorAll('[data-custom-item="true"]')).forEach(item => item.remove());
|
|
4805
|
+
}
|
|
4806
|
+
get fieldName() {
|
|
4807
|
+
return this.elem.getAttribute('data-form-item');
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4810
|
+
class FormItems {
|
|
4811
|
+
constructor(items, formId) {
|
|
4812
|
+
this.items = new Map();
|
|
4813
|
+
this.formId = formId;
|
|
4814
|
+
items.forEach(item => {
|
|
4815
|
+
const formItem = new FormItem(item);
|
|
4816
|
+
this.items.set(formItem.fieldName, formItem);
|
|
4817
|
+
});
|
|
4818
|
+
}
|
|
4819
|
+
getItem(name) {
|
|
4820
|
+
return this.items.get(name);
|
|
4821
|
+
}
|
|
4822
|
+
get formName() {
|
|
4823
|
+
return this.formId;
|
|
4824
|
+
}
|
|
4825
|
+
}
|
|
4826
|
+
|
|
4639
4827
|
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
|
|
4640
4828
|
|
|
4641
4829
|
const EzFormView$1 = class extends HTMLElement$1 {
|
|
@@ -4643,6 +4831,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4643
4831
|
super();
|
|
4644
4832
|
this.__registerHost();
|
|
4645
4833
|
this.ezContentReady = createEvent(this, "ezContentReady", 7);
|
|
4834
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
4646
4835
|
this.fields = undefined;
|
|
4647
4836
|
}
|
|
4648
4837
|
async showUp() {
|
|
@@ -4668,6 +4857,8 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4668
4857
|
}
|
|
4669
4858
|
componentDidRender() {
|
|
4670
4859
|
this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
|
|
4860
|
+
const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
|
|
4861
|
+
this.formItemsReady.emit(formItems);
|
|
4671
4862
|
}
|
|
4672
4863
|
render() {
|
|
4673
4864
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
@@ -53840,7 +54031,7 @@ var __spread$1$1 = function () {
|
|
|
53840
54031
|
};
|
|
53841
54032
|
// creates JavaScript vanilla Grid, including JavaScript (ag-stack) components, which can
|
|
53842
54033
|
// be wrapped by the framework wrappers
|
|
53843
|
-
var Grid = /** @class */ (function () {
|
|
54034
|
+
var Grid$1 = /** @class */ (function () {
|
|
53844
54035
|
function Grid(eGridDiv, gridOptions, params) {
|
|
53845
54036
|
if (!gridOptions) {
|
|
53846
54037
|
console.error('AG Grid: no gridOptions provided to the grid');
|
|
@@ -106183,7 +106374,7 @@ var DetailCellRenderer = /** @class */ (function (_super) {
|
|
|
106183
106374
|
var frameworkComponentWrapper = this.context.getBean('frameworkComponentWrapper');
|
|
106184
106375
|
var frameworkOverrides = this.getFrameworkOverrides();
|
|
106185
106376
|
// tslint:disable-next-line
|
|
106186
|
-
new Grid(this.eDetailGrid, gridOptions, {
|
|
106377
|
+
new Grid$1(this.eDetailGrid, gridOptions, {
|
|
106187
106378
|
frameworkOverrides: frameworkOverrides,
|
|
106188
106379
|
providedBeanInstances: {
|
|
106189
106380
|
agGridReact: agGridReactCloned,
|
|
@@ -123508,6 +123699,19 @@ var AllEnterpriseModules = [
|
|
|
123508
123699
|
ModuleRegistry.registerModules(AllEnterpriseModules);
|
|
123509
123700
|
|
|
123510
123701
|
class DataSource {
|
|
123702
|
+
isSilentChange(action) {
|
|
123703
|
+
//TODO: Provisorio p/ não atualizar a grade quando a alteração for apenas de campos transisntes
|
|
123704
|
+
var _a, _b;
|
|
123705
|
+
if (!(action === null || action === void 0 ? void 0 : action.payload)) {
|
|
123706
|
+
return false;
|
|
123707
|
+
}
|
|
123708
|
+
if (action.type === Action.DATA_CHANGED) {
|
|
123709
|
+
return ((_a = Object.keys(action === null || action === void 0 ? void 0 : action.payload)) === null || _a === void 0 ? void 0 : _a.filter(changeName => changeName.startsWith("transient.") || changeName === "records").length) > 0;
|
|
123710
|
+
}
|
|
123711
|
+
if (action.type === Action.EDITION_CANCELED) {
|
|
123712
|
+
return ((_b = action === null || action === void 0 ? void 0 : action.payload) === null || _b === void 0 ? void 0 : _b.silent) === true;
|
|
123713
|
+
}
|
|
123714
|
+
}
|
|
123511
123715
|
constructor(dataUnit, controller, options) {
|
|
123512
123716
|
this.RECORD_ARCHIVE = "__RECORD_ARCHIVE__";
|
|
123513
123717
|
this.duObserver = (action) => {
|
|
@@ -123527,11 +123731,19 @@ class DataSource {
|
|
|
123527
123731
|
}
|
|
123528
123732
|
this.updateSelection();
|
|
123529
123733
|
break;
|
|
123734
|
+
case Action.PAGINATION_UPDATED:
|
|
123735
|
+
if (this._options) {
|
|
123736
|
+
this._options.onPaginationUpdate(this._dataUnit.getPaginationInfo());
|
|
123737
|
+
}
|
|
123738
|
+
break;
|
|
123530
123739
|
case Action.RECORDS_REMOVED:
|
|
123531
123740
|
case Action.DATA_SAVED:
|
|
123532
123741
|
case Action.EDITION_CANCELED:
|
|
123533
123742
|
case Action.DATA_CHANGED:
|
|
123534
123743
|
case Action.DATA_RESOLVED:
|
|
123744
|
+
if (this.isSilentChange(action)) {
|
|
123745
|
+
return;
|
|
123746
|
+
}
|
|
123535
123747
|
this._controller.refresh();
|
|
123536
123748
|
break;
|
|
123537
123749
|
case Action.SELECTION_CHANGED:
|
|
@@ -123559,7 +123771,7 @@ class DataSource {
|
|
|
123559
123771
|
getRows(params) {
|
|
123560
123772
|
if (this.needReload(params)) {
|
|
123561
123773
|
this._lastLoadingParams = params;
|
|
123562
|
-
this._dataUnit.loadData(this.quickFilter).then(() => this.updateSelection());
|
|
123774
|
+
this._dataUnit.loadData(this.quickFilter, undefined, true, EZ_GRID_LOADING_SOURCE).then(() => this.updateSelection());
|
|
123563
123775
|
}
|
|
123564
123776
|
else {
|
|
123565
123777
|
this._lastLoadingParams = params;
|
|
@@ -123654,7 +123866,7 @@ class EzGridCustomHeader {
|
|
|
123654
123866
|
onClickFilter() {
|
|
123655
123867
|
var _a;
|
|
123656
123868
|
const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
|
|
123657
|
-
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px
|
|
123869
|
+
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
|
|
123658
123870
|
}
|
|
123659
123871
|
configSortIcon() {
|
|
123660
123872
|
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
@@ -123715,7 +123927,7 @@ class CellRendererStatus {
|
|
|
123715
123927
|
}
|
|
123716
123928
|
refresh(params) {
|
|
123717
123929
|
this.renderStatus(params);
|
|
123718
|
-
return
|
|
123930
|
+
return false;
|
|
123719
123931
|
}
|
|
123720
123932
|
destroy() {
|
|
123721
123933
|
this._eGui = undefined;
|
|
@@ -124311,7 +124523,7 @@ class AgGridController {
|
|
|
124311
124523
|
const applied = event.detail;
|
|
124312
124524
|
this._filteredColumns.set(applied.field, applied.values);
|
|
124313
124525
|
this._gridOptions.api.refreshHeader();
|
|
124314
|
-
this._dataUnit.loadData();
|
|
124526
|
+
this._dataUnit.loadData(undefined, undefined, undefined, EZ_GRID_LOADING_SOURCE);
|
|
124315
124527
|
}
|
|
124316
124528
|
showFilterColumn(configs) {
|
|
124317
124529
|
var _a;
|
|
@@ -124323,7 +124535,7 @@ class AgGridController {
|
|
|
124323
124535
|
this.CHECK_BOX_COL_ID = 'checkBoxColumn';
|
|
124324
124536
|
this.STATUS_COL_ID = 'statusColumn';
|
|
124325
124537
|
this.RECORD_ARCHIVE_COL_ID = '__RECORD_ARCHIVE__';
|
|
124326
|
-
this.BLOCK_LOAD_DEBOUNCE =
|
|
124538
|
+
this.BLOCK_LOAD_DEBOUNCE = 100;
|
|
124327
124539
|
this.DEFAULT_FONT_SIZE = 14;
|
|
124328
124540
|
this.DEFAULT_ICON_SIZE = 12;
|
|
124329
124541
|
this.DEFAULT_MAX_SIZE = 200;
|
|
@@ -124337,10 +124549,10 @@ class AgGridController {
|
|
|
124337
124549
|
getGridConfig() {
|
|
124338
124550
|
return this._gridConfig;
|
|
124339
124551
|
}
|
|
124340
|
-
|
|
124341
|
-
|
|
124552
|
+
locateColumn(columnName) {
|
|
124553
|
+
this._gridOptions.api.ensureColumnVisible(columnName);
|
|
124342
124554
|
}
|
|
124343
|
-
getSort() {
|
|
124555
|
+
getSort(_dataUnitName, defaultSorting) {
|
|
124344
124556
|
const sortedColumns = [];
|
|
124345
124557
|
this._gridOptions.columnApi
|
|
124346
124558
|
.getColumnState()
|
|
@@ -124353,7 +124565,7 @@ class AgGridController {
|
|
|
124353
124565
|
sortedColumns.push(sortField);
|
|
124354
124566
|
}
|
|
124355
124567
|
});
|
|
124356
|
-
return sortedColumns;
|
|
124568
|
+
return sortedColumns.length === 0 && this._gridConfig === undefined ? defaultSorting : sortedColumns;
|
|
124357
124569
|
}
|
|
124358
124570
|
getFilter() {
|
|
124359
124571
|
if (!this._filteredColumns || this._filteredColumns.size === 0) {
|
|
@@ -124424,6 +124636,7 @@ class AgGridController {
|
|
|
124424
124636
|
height: '100%'
|
|
124425
124637
|
}
|
|
124426
124638
|
},
|
|
124639
|
+
suppressFieldDotNotation: true,
|
|
124427
124640
|
components: Object.assign({ ezGridHeaderComponent: SelectionHeader, ezGridCustomHeader: EzGridCustomHeader }, this._editionManager.getComponents()),
|
|
124428
124641
|
context: {
|
|
124429
124642
|
editionManager: this._editionManager,
|
|
@@ -124437,11 +124650,15 @@ class AgGridController {
|
|
|
124437
124650
|
this.setOptionsSupress(this._gridOptions);
|
|
124438
124651
|
this._gridOptions = this._editionManager.configureGrid(this._gridOptions);
|
|
124439
124652
|
if (this._enterprise) {
|
|
124440
|
-
this._grid = new Grid(container, this._gridOptions);
|
|
124653
|
+
this._grid = new Grid$1(container, this._gridOptions);
|
|
124441
124654
|
}
|
|
124442
124655
|
else {
|
|
124443
|
-
this._grid = new Grid(container, this._gridOptions);
|
|
124656
|
+
this._grid = new Grid$1(container, this._gridOptions);
|
|
124444
124657
|
}
|
|
124658
|
+
container.addEventListener('focusout', (event) => {
|
|
124659
|
+
if (!container.contains(event.relatedTarget))
|
|
124660
|
+
this._gridOptions.api.clearFocusedCell();
|
|
124661
|
+
});
|
|
124445
124662
|
const selection = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo();
|
|
124446
124663
|
if (selection === null || selection === void 0 ? void 0 : selection.isAllRecords()) {
|
|
124447
124664
|
this.selectAll(true);
|
|
@@ -124717,7 +124934,7 @@ class AgGridController {
|
|
|
124717
124934
|
if (this._grid === undefined) {
|
|
124718
124935
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
124719
124936
|
}
|
|
124720
|
-
this._gridOptions.api.refreshServerSide({ purge:
|
|
124937
|
+
this._gridOptions.api.refreshServerSide({ purge: true });
|
|
124721
124938
|
}
|
|
124722
124939
|
setFocusFirstRow() {
|
|
124723
124940
|
const firstRow = this._gridOptions.api.getDisplayedRowAtIndex(0);
|
|
@@ -124896,7 +125113,7 @@ class AgGridController {
|
|
|
124896
125113
|
tooltip: tooltip,
|
|
124897
125114
|
isSortable: propSortable,
|
|
124898
125115
|
hasFilter: () => this.hasFilterColumn(source.name),
|
|
124899
|
-
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name) }),
|
|
125116
|
+
showColumnFilter: (leftPosition, fromIcon) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon }),
|
|
124900
125117
|
},
|
|
124901
125118
|
valueFormatter: params => {
|
|
124902
125119
|
if (params.value == undefined) {
|
|
@@ -124991,6 +125208,13 @@ class AgGridController {
|
|
|
124991
125208
|
return maskFormatter.format(formattedValue);
|
|
124992
125209
|
}
|
|
124993
125210
|
}
|
|
125211
|
+
if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.FILE) {
|
|
125212
|
+
if (!params.value || !Array.isArray(params.value))
|
|
125213
|
+
return '';
|
|
125214
|
+
if (params.value.length === 1)
|
|
125215
|
+
return params.value[0].name;
|
|
125216
|
+
return `${params.value.length} arquivos`;
|
|
125217
|
+
}
|
|
124994
125218
|
}
|
|
124995
125219
|
onCallStateChange(type, e) {
|
|
124996
125220
|
const finished = !('finished' in e) || e['finished'];
|
|
@@ -125119,9 +125343,169 @@ function getElementID(sufix) {
|
|
|
125119
125343
|
};
|
|
125120
125344
|
}
|
|
125121
125345
|
|
|
125122
|
-
const
|
|
125346
|
+
const COLUMN_FILTER_PATTERN = /FILTRO_COLUNA_(.+)/;
|
|
125347
|
+
class ColumnFilterManager {
|
|
125348
|
+
static getColumnFilters(filters, fieldName) {
|
|
125349
|
+
const columnFilters = new Map();
|
|
125350
|
+
if (filters == undefined || filters.length == 0) {
|
|
125351
|
+
return columnFilters;
|
|
125352
|
+
}
|
|
125353
|
+
filters.forEach(filter => {
|
|
125354
|
+
const result = COLUMN_FILTER_PATTERN.exec(filter.name);
|
|
125355
|
+
if (result) {
|
|
125356
|
+
if (fieldName !== result[1]) {
|
|
125357
|
+
columnFilters.set(filter.name, Object.assign({ columnName: result[1] }, filter));
|
|
125358
|
+
}
|
|
125359
|
+
}
|
|
125360
|
+
});
|
|
125361
|
+
return columnFilters;
|
|
125362
|
+
}
|
|
125363
|
+
static getFilterFunction(dataUnit, filters) {
|
|
125364
|
+
if (filters != undefined && filters.length > 0) {
|
|
125365
|
+
return record => {
|
|
125366
|
+
for (const filter of filters) {
|
|
125367
|
+
if (!ColumnFilterManager.recordMatchesFilter(dataUnit, record, filter)) {
|
|
125368
|
+
return false;
|
|
125369
|
+
}
|
|
125370
|
+
}
|
|
125371
|
+
return true;
|
|
125372
|
+
};
|
|
125373
|
+
}
|
|
125374
|
+
return undefined;
|
|
125375
|
+
}
|
|
125376
|
+
static recordMatchesFilter(dataUnit, record, columnFilter) {
|
|
125377
|
+
const fieldValue = record[columnFilter.columnName];
|
|
125378
|
+
for (let param of columnFilter.params) {
|
|
125379
|
+
const paramValue = dataUnit.valueFromString(columnFilter.columnName, param.value);
|
|
125380
|
+
if (FieldComparator.compareValues(dataUnit.getField(columnFilter.columnName), fieldValue, paramValue) === 0) {
|
|
125381
|
+
return true;
|
|
125382
|
+
}
|
|
125383
|
+
}
|
|
125384
|
+
return false;
|
|
125385
|
+
}
|
|
125386
|
+
static compileDistinct(fieldName, dataUnit) {
|
|
125387
|
+
const request = dataUnit.getLastLoadRequest();
|
|
125388
|
+
let list = dataUnit.records;
|
|
125389
|
+
if (request != undefined) {
|
|
125390
|
+
const columnFilters = Array.from(ColumnFilterManager.getColumnFilters(request.filters, fieldName).values());
|
|
125391
|
+
const filterFunciton = ColumnFilterManager.getFilterFunction(dataUnit, columnFilters);
|
|
125392
|
+
if (filterFunciton != undefined) {
|
|
125393
|
+
list = list.filter(filterFunciton);
|
|
125394
|
+
}
|
|
125395
|
+
}
|
|
125396
|
+
const distinct = new Map(list.map(record => {
|
|
125397
|
+
const fieldValue = record[fieldName];
|
|
125398
|
+
if (fieldValue == undefined) {
|
|
125399
|
+
return [null, { label: null, value: null, check: true }];
|
|
125400
|
+
}
|
|
125401
|
+
const item = { label: dataUnit.getFormattedValue(fieldName, fieldValue), value: fieldValue, check: true };
|
|
125402
|
+
return [item.label, item];
|
|
125403
|
+
}));
|
|
125404
|
+
return Array.from(distinct.values());
|
|
125405
|
+
}
|
|
125406
|
+
}
|
|
125407
|
+
|
|
125408
|
+
class InMemoryFilterColumnDataSource {
|
|
125409
|
+
constructor(dataUnit) {
|
|
125410
|
+
var _a;
|
|
125411
|
+
this.onDataUnitAction = (action) => {
|
|
125412
|
+
if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
|
|
125413
|
+
this.originalRecords = this.dataUnit.records;
|
|
125414
|
+
}
|
|
125415
|
+
};
|
|
125416
|
+
this.dataUnit = dataUnit;
|
|
125417
|
+
this.originalRecords = (_a = this.dataUnit.records) !== null && _a !== void 0 ? _a : [];
|
|
125418
|
+
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
125419
|
+
}
|
|
125420
|
+
getStaticOptions(fieldName) {
|
|
125421
|
+
return Promise.resolve(ColumnFilterManager.compileDistinct(fieldName, this.dataUnit));
|
|
125422
|
+
}
|
|
125423
|
+
fetchData(filterTerm, fieldName) {
|
|
125424
|
+
return new Promise(resolve => {
|
|
125425
|
+
const filteredRecords = this.originalRecords.filter(record => this.includesSearchTerm(record, fieldName, filterTerm));
|
|
125426
|
+
const options = filteredRecords.map(item => this.buildFieldOption(item, fieldName));
|
|
125427
|
+
resolve(this.removeDuplicatedOptions(options));
|
|
125428
|
+
});
|
|
125429
|
+
}
|
|
125430
|
+
sortItems(fieldName, items) {
|
|
125431
|
+
return InMemoryFilterColumnDataSource.defaultSorterMultSelectionOption(this.dataUnit, fieldName, items);
|
|
125432
|
+
}
|
|
125433
|
+
buildFieldOption(item, fieldName) {
|
|
125434
|
+
return {
|
|
125435
|
+
value: this.buildValue(item, fieldName),
|
|
125436
|
+
label: this.formatLabel(fieldName, item[fieldName]),
|
|
125437
|
+
check: true,
|
|
125438
|
+
};
|
|
125439
|
+
}
|
|
125440
|
+
buildValue(item, fieldName) {
|
|
125441
|
+
var _a;
|
|
125442
|
+
let value = item[fieldName];
|
|
125443
|
+
if (((_a = this.dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType) === DataType.OBJECT) {
|
|
125444
|
+
value = value.value;
|
|
125445
|
+
}
|
|
125446
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
125447
|
+
}
|
|
125448
|
+
removeDuplicatedOptions(options) {
|
|
125449
|
+
const noDuplicatedOptions = [];
|
|
125450
|
+
options.forEach(option => {
|
|
125451
|
+
if (!noDuplicatedOptions.find(({ label }) => label === option.label)) {
|
|
125452
|
+
noDuplicatedOptions.push(option);
|
|
125453
|
+
}
|
|
125454
|
+
});
|
|
125455
|
+
return noDuplicatedOptions;
|
|
125456
|
+
}
|
|
125457
|
+
includesSearchTerm(record, fieldName, filterTerm) {
|
|
125458
|
+
let label = this.buildLabel(fieldName, record[fieldName]);
|
|
125459
|
+
return label.toLowerCase().includes(filterTerm.toLowerCase());
|
|
125460
|
+
}
|
|
125461
|
+
buildLabel(fieldName, value) {
|
|
125462
|
+
var _a;
|
|
125463
|
+
const { dataType } = this.dataUnit.getField(fieldName);
|
|
125464
|
+
if (dataType === DataType.NUMBER) {
|
|
125465
|
+
return value === null || value === void 0 ? void 0 : value.toString().replace('.', ',');
|
|
125466
|
+
}
|
|
125467
|
+
if (dataType === DataType.DATE) {
|
|
125468
|
+
return (typeof value === 'object')
|
|
125469
|
+
? (_a = DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString()
|
|
125470
|
+
: value === null || value === void 0 ? void 0 : value.toString();
|
|
125471
|
+
}
|
|
125472
|
+
if (dataType === DataType.OBJECT) {
|
|
125473
|
+
return `${value === null || value === void 0 ? void 0 : value.value} - ${value === null || value === void 0 ? void 0 : value.label}`;
|
|
125474
|
+
}
|
|
125475
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
125476
|
+
}
|
|
125477
|
+
formatLabel(fieldName, value) {
|
|
125478
|
+
var _a, _b;
|
|
125479
|
+
const { userInterface, dataType } = this.dataUnit.getField(fieldName);
|
|
125480
|
+
if (dataType === DataType.DATE) {
|
|
125481
|
+
return (typeof value === 'object')
|
|
125482
|
+
? DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))
|
|
125483
|
+
: value === null || value === void 0 ? void 0 : value.toString();
|
|
125484
|
+
}
|
|
125485
|
+
if (dataType === DataType.NUMBER && userInterface !== UserInterface.DECIMALNUMBER) {
|
|
125486
|
+
return (_a = parseInt(this.dataUnit.getFormattedValue(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString();
|
|
125487
|
+
}
|
|
125488
|
+
return (_b = this.dataUnit.getFormattedValue(fieldName, value)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
125489
|
+
}
|
|
125490
|
+
static defaultSorterMultSelectionOption(dataUnit, fieldName, items) {
|
|
125491
|
+
const fieldDescriptor = dataUnit.getField(fieldName);
|
|
125492
|
+
if (fieldDescriptor == undefined) {
|
|
125493
|
+
return ArrayUtils$1.sortAlphabetically(items);
|
|
125494
|
+
}
|
|
125495
|
+
return items.sort((itemA, itemB) => {
|
|
125496
|
+
return FieldComparator.compareValues(fieldDescriptor, itemA.value, itemB.value);
|
|
125497
|
+
});
|
|
125498
|
+
}
|
|
125499
|
+
}
|
|
125500
|
+
|
|
125501
|
+
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}";
|
|
125123
125502
|
|
|
125124
125503
|
const windowInstace$1 = window;
|
|
125504
|
+
const matches = (text, filter) => {
|
|
125505
|
+
const normalizedText = StringUtils$1.replaceAccentuatedCharsLower(text.toLocaleLowerCase());
|
|
125506
|
+
const normalizedFilter = StringUtils$1.replaceAccentuatedCharsLower(filter.toLocaleLowerCase());
|
|
125507
|
+
return normalizedText.includes(normalizedFilter);
|
|
125508
|
+
};
|
|
125125
125509
|
const EzGrid$1 = class extends HTMLElement$1 {
|
|
125126
125510
|
constructor() {
|
|
125127
125511
|
super();
|
|
@@ -125133,18 +125517,13 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125133
125517
|
this.componentReady = createEvent(this, "componentReady", 7);
|
|
125134
125518
|
this._gridController = new AgGridController(false);
|
|
125135
125519
|
this._messageFilterAppliedSuccess = 'Filtro de coluna aplicado com sucesso!';
|
|
125136
|
-
this.onDataUnitAction = (action) => {
|
|
125137
|
-
if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
|
|
125138
|
-
this._originalRecords = this.dataUnit.records;
|
|
125139
|
-
}
|
|
125140
|
-
};
|
|
125141
125520
|
this._paginationInfo = undefined;
|
|
125142
125521
|
this._paginationChangedByKeyboard = true;
|
|
125143
125522
|
this._showSelectionCounter = false;
|
|
125144
125523
|
this._isAllSelection = false;
|
|
125145
125524
|
this._currentPageSelected = undefined;
|
|
125146
125525
|
this._selectionCount = undefined;
|
|
125147
|
-
this.
|
|
125526
|
+
this._hasLeftButtons = false;
|
|
125148
125527
|
this.multipleSelection = undefined;
|
|
125149
125528
|
this.config = undefined;
|
|
125150
125529
|
this.selectionToastConfig = undefined;
|
|
@@ -125204,6 +125583,18 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125204
125583
|
async quickFilter(term) {
|
|
125205
125584
|
this._gridController.quickFilter(term);
|
|
125206
125585
|
}
|
|
125586
|
+
/**
|
|
125587
|
+
* Localiza determinada coluna tornando-a visível.
|
|
125588
|
+
*/
|
|
125589
|
+
async locateColumn(columnName) {
|
|
125590
|
+
this._gridController.locateColumn(columnName);
|
|
125591
|
+
}
|
|
125592
|
+
/**
|
|
125593
|
+
* Usa um argumento para filtrar as colunas po label
|
|
125594
|
+
*/
|
|
125595
|
+
async filterColumns(search) {
|
|
125596
|
+
return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
|
|
125597
|
+
}
|
|
125207
125598
|
observeConfig(config) {
|
|
125208
125599
|
this._gridController.setColumnsState(config.columns);
|
|
125209
125600
|
}
|
|
@@ -125345,21 +125736,26 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125345
125736
|
}
|
|
125346
125737
|
previousPage() {
|
|
125347
125738
|
if (this.dataUnit) {
|
|
125348
|
-
this.dataUnit.previousPage()
|
|
125349
|
-
|
|
125739
|
+
this.dataUnit.previousPage()
|
|
125740
|
+
.then(() => this.resetPaginationState());
|
|
125350
125741
|
}
|
|
125351
125742
|
}
|
|
125352
125743
|
nextPage() {
|
|
125353
125744
|
if (this.dataUnit) {
|
|
125354
|
-
this.dataUnit.nextPage()
|
|
125355
|
-
|
|
125745
|
+
this.dataUnit.nextPage()
|
|
125746
|
+
.then(() => this.resetPaginationState());
|
|
125356
125747
|
}
|
|
125357
125748
|
}
|
|
125749
|
+
resetPaginationState() {
|
|
125750
|
+
var _a;
|
|
125751
|
+
this._paginationChangedByKeyboard = false;
|
|
125752
|
+
(_a = this._gridApi) === null || _a === void 0 ? void 0 : _a.clearRangeSelection();
|
|
125753
|
+
}
|
|
125358
125754
|
getPaginationControl() {
|
|
125359
125755
|
if (this._paginationInfo) {
|
|
125360
|
-
const { firstRecord, lastRecord, total, currentPage, hasMore } = this._paginationInfo;
|
|
125756
|
+
const { firstRecord, lastRecord, total, count, currentPage, hasMore } = this._paginationInfo;
|
|
125361
125757
|
return [
|
|
125362
|
-
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" }, `${firstRecord}-${lastRecord}`), ` de ${total}`),
|
|
125758
|
+
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" }, `${firstRecord}-${lastRecord}`), total == undefined ? ` de ${count + 1} ou mais` : ` de ${total}`),
|
|
125363
125759
|
h("ez-button", { size: "small", iconName: "chevron-left", class: "ez-margin-right--medium", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }),
|
|
125364
125760
|
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" }),
|
|
125365
125761
|
];
|
|
@@ -125381,6 +125777,9 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125381
125777
|
}
|
|
125382
125778
|
this._paginationInfo = paginationInfo;
|
|
125383
125779
|
},
|
|
125780
|
+
onPaginationUpdate: (paginationInfo) => {
|
|
125781
|
+
this._paginationInfo = paginationInfo;
|
|
125782
|
+
},
|
|
125384
125783
|
onDoubleClick: (row) => {
|
|
125385
125784
|
this.ezDoubleClick.emit(row);
|
|
125386
125785
|
},
|
|
@@ -125395,15 +125794,13 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125395
125794
|
if (this.config) {
|
|
125396
125795
|
this.observeConfig(this.config);
|
|
125397
125796
|
}
|
|
125797
|
+
if (this.dataUnit != undefined) {
|
|
125798
|
+
this._paginationInfo = this.dataUnit.getPaginationInfo();
|
|
125799
|
+
}
|
|
125398
125800
|
this.buildDataElementId();
|
|
125399
125801
|
this.setEvents();
|
|
125400
125802
|
this.componentReady.emit();
|
|
125401
125803
|
this._gridController.configFilterColumn(this._filterColumn);
|
|
125402
|
-
this._container.addEventListener('focusout', (event) => {
|
|
125403
|
-
const api = this._gridController.getGridApi();
|
|
125404
|
-
if (api && !this._container.contains(event.relatedTarget))
|
|
125405
|
-
api.clearFocusedCell();
|
|
125406
|
-
});
|
|
125407
125804
|
}
|
|
125408
125805
|
componentWillRender() {
|
|
125409
125806
|
this.configSelectionCounter();
|
|
@@ -125414,46 +125811,22 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125414
125811
|
});
|
|
125415
125812
|
}
|
|
125416
125813
|
componentWillLoad() {
|
|
125814
|
+
this._hasLeftButtons = !!this._element.querySelector('[slot="leftButtons"]');
|
|
125417
125815
|
if (!this.dataUnit.name.includes("InMemoryDataUnit"))
|
|
125418
125816
|
return;
|
|
125419
|
-
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
125420
125817
|
}
|
|
125421
125818
|
getDataSource() {
|
|
125422
|
-
|
|
125423
|
-
|
|
125424
|
-
buildDefaultDataSource() {
|
|
125425
|
-
var _a, _b;
|
|
125426
|
-
if (this._originalRecords.length === 0) {
|
|
125427
|
-
this._originalRecords = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : [];
|
|
125428
|
-
}
|
|
125429
|
-
return {
|
|
125430
|
-
fetchData: (filterTerm, fieldName) => {
|
|
125431
|
-
return new Promise(resolve => {
|
|
125432
|
-
const filteredRecords = this._originalRecords.filter(record => {
|
|
125433
|
-
var _a, _b;
|
|
125434
|
-
const label = typeof record[fieldName] === "object" ? `${(_a = record[fieldName]) === null || _a === void 0 ? void 0 : _a.value} - ${(_b = record[fieldName]) === null || _b === void 0 ? void 0 : _b.label}` : record[fieldName];
|
|
125435
|
-
return label === null || label === void 0 ? void 0 : label.toString().toLowerCase().includes(filterTerm.toLowerCase());
|
|
125436
|
-
});
|
|
125437
|
-
const options = filteredRecords.map(item => {
|
|
125438
|
-
return { value: item[fieldName].toString(), label: this.formatLabel(fieldName, item[fieldName]), check: true };
|
|
125439
|
-
});
|
|
125440
|
-
resolve(options);
|
|
125441
|
-
});
|
|
125442
|
-
}
|
|
125443
|
-
};
|
|
125819
|
+
var _a;
|
|
125820
|
+
return (_a = this.columnfilterDataSource) !== null && _a !== void 0 ? _a : new InMemoryFilterColumnDataSource(this.dataUnit);
|
|
125444
125821
|
}
|
|
125445
|
-
|
|
125446
|
-
|
|
125447
|
-
if (userInterface === UserInterface.DATETIME) {
|
|
125448
|
-
return DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value));
|
|
125449
|
-
}
|
|
125450
|
-
return String(this.dataUnit.getFormattedValue(fieldName, value));
|
|
125822
|
+
hideHeader() {
|
|
125823
|
+
return (!!this._element.getAttribute("no-header") && !this._paginationInfo);
|
|
125451
125824
|
}
|
|
125452
125825
|
render() {
|
|
125453
125826
|
var _a;
|
|
125454
|
-
return (h(Host,
|
|
125827
|
+
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
|
|
125455
125828
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
125456
|
-
` }, 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: "
|
|
125829
|
+
` }, 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" }))));
|
|
125457
125830
|
}
|
|
125458
125831
|
static get assetsDirs() { return ["../assets"]; }
|
|
125459
125832
|
get _element() { return this; }
|
|
@@ -125491,6 +125864,12 @@ const EzGuideNavigator$1 = class extends HTMLElement$1 {
|
|
|
125491
125864
|
async disableItem(id) {
|
|
125492
125865
|
[].concat(id).forEach(item => this._tree.disableItem(item));
|
|
125493
125866
|
}
|
|
125867
|
+
/**
|
|
125868
|
+
* Abre o navegador de Guia
|
|
125869
|
+
*/
|
|
125870
|
+
async openGuideNavidator() {
|
|
125871
|
+
this.open = true;
|
|
125872
|
+
}
|
|
125494
125873
|
/**
|
|
125495
125874
|
* Habilita um ou mais itens.
|
|
125496
125875
|
*/
|
|
@@ -125559,7 +125938,7 @@ const EzGuideNavigator$1 = class extends HTMLElement$1 {
|
|
|
125559
125938
|
static get style() { return ezGuideNavigatorCss; }
|
|
125560
125939
|
};
|
|
125561
125940
|
|
|
125562
|
-
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-
|
|
125941
|
+
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-antecipação: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-close:before{content:\"\\ea26\"}.ez-icon-cobrar:before{content:\"\\ea27\"}.ez-icon-code:before{content:\"\\ea28\"}.ez-icon-configuration:before{content:\"\\ea29\"}.ez-icon-content-cut:before{content:\"\\ea2a\"}.ez-icon-copy:before{content:\"\\ea2b\"}.ez-icon-credit_card:before{content:\"\\ea2c\"}.ez-icon-crop:before{content:\"\\ea2d\"}.ez-icon-custom:before{content:\"\\ea2e\"}.ez-icon-delete-file:before{content:\"\\ea2f\"}.ez-icon-delete:before{content:\"\\ea30\"}.ez-icon-description:before{content:\"\\ea31\"}.ez-icon-dividir:before{content:\"\\ea32\"}.ez-icon-docx:before{content:\"\\ea33\"}.ez-icon-dot-notification:before{content:\"\\ea34\"}.ez-icon-dots-horizontal:before{content:\"\\ea35\"}.ez-icon-dots-vertical:before{content:\"\\ea36\"}.ez-icon-drag-indicator:before{content:\"\\ea37\"}.ez-icon-dual-chevron-down:before{content:\"\\ea38\"}.ez-icon-dual-chevron-left:before{content:\"\\ea39\"}.ez-icon-dual-chevron-right:before{content:\"\\ea3a\"}.ez-icon-dual-chevron-up:before{content:\"\\ea3b\"}.ez-icon-edit-file:before{content:\"\\ea3c\"}.ez-icon-edit-table:before{content:\"\\ea3d\"}.ez-icon-edit-time:before{content:\"\\ea3e\"}.ez-icon-edit-value:before{content:\"\\ea3f\"}.ez-icon-edit:before{content:\"\\ea40\"}.ez-icon-email:before{content:\"\\ea41\"}.ez-icon-estorno:before{content:\"\\ea42\"}.ez-icon-exe:before{content:\"\\ea43\"}.ez-icon-expand:before{content:\"\\ea44\"}.ez-icon-expandir_card:before{content:\"\\ea45\"}.ez-icon-extrato:before{content:\"\\ea46\"}.ez-icon-eye-off:before{content:\"\\ea47\"}.ez-icon-eye:before{content:\"\\ea48\"}.ez-icon-favorite:before{content:\"\\ea49\"}.ez-icon-figma:before{content:\"\\ea4a\"}.ez-icon-file-download:before{content:\"\\ea4b\"}.ez-icon-file-upload:before{content:\"\\ea4c\"}.ez-icon-filter:before{content:\"\\ea4d\"}.ez-icon-find-file:before{content:\"\\ea4e\"}.ez-icon-find-page:before{content:\"\\ea4f\"}.ez-icon-format-color-fill:before{content:\"\\ea50\"}.ez-icon-generic:before{content:\"\\ea51\"}.ez-icon-gif:before{content:\"\\ea52\"}.ez-icon-graph_bar:before{content:\"\\ea53\"}.ez-icon-handshake:before{content:\"\\ea54\"}.ez-icon-help-inverted:before{content:\"\\ea55\"}.ez-icon-help:before{content:\"\\ea56\"}.ez-icon-hide_menu:before{content:\"\\ea57\"}.ez-icon-home:before{content:\"\\ea58\"}.ez-icon-icons104:before{content:\"\\ea59\"}.ez-icon-language:before{content:\"\\ea5a\"}.ez-icon-launch:before{content:\"\\ea5b\"}.ez-icon-lightbulb:before{content:\"\\ea5c\"}.ez-icon-list:before{content:\"\\ea5d\"}.ez-icon-location:before{content:\"\\ea5e\"}.ez-icon-lock-outline:before{content:\"\\ea5f\"}.ez-icon-lock:before{content:\"\\ea60\"}.ez-icon-menu:before{content:\"\\ea61\"}.ez-icon-mid:before{content:\"\\ea62\"}.ez-icon-minus:before{content:\"\\ea63\"}.ez-icon-money-off:before{content:\"\\ea64\"}.ez-icon-money:before{content:\"\\ea65\"}.ez-icon-more:before{content:\"\\ea66\"}.ez-icon-mp3:before{content:\"\\ea67\"}.ez-icon-mp4:before{content:\"\\ea68\"}.ez-icon-multiple-files:before{content:\"\\ea69\"}.ez-icon-north-west:before{content:\"\\ea6a\"}.ez-icon-number:before{content:\"\\ea6b\"}.ez-icon-ordem-ascendente:before{content:\"\\ea6c\"}.ez-icon-ordem-descendente:before{content:\"\\ea6d\"}.ez-icon-parcelar:before{content:\"\\ea6e\"}.ez-icon-pause:before{content:\"\\ea6f\"}.ez-icon-payments:before{content:\"\\ea70\"}.ez-icon-pdf:before{content:\"\\ea71\"}.ez-icon-play:before{content:\"\\ea72\"}.ez-icon-plus:before{content:\"\\ea73\"}.ez-icon-png:before{content:\"\\ea74\"}.ez-icon-power:before{content:\"\\ea75\"}.ez-icon-pptx:before{content:\"\\ea76\"}.ez-icon-preview:before{content:\"\\ea77\"}.ez-icon-print:before{content:\"\\ea78\"}.ez-icon-push-pin:before{content:\"\\ea79\"}.ez-icon-rateio:before{content:\"\\ea7a\"}.ez-icon-receipt:before{content:\"\\ea7b\"}.ez-icon-recolher_card:before{content:\"\\ea7c\"}.ez-icon-restore:before{content:\"\\ea7d\"}.ez-icon-return:before{content:\"\\ea7e\"}.ez-icon-sankhya-place:before{content:\"\\ea7f\"}.ez-icon-save:before{content:\"\\ea80\"}.ez-icon-search:before{content:\"\\ea81\"}.ez-icon-settings-inverted:before{content:\"\\ea82\"}.ez-icon-settings:before{content:\"\\ea83\"}.ez-icon-share:before{content:\"\\ea84\"}.ez-icon-shield:before{content:\"\\ea85\"}.ez-icon-show_menu:before{content:\"\\ea86\"}.ez-icon-south-east:before{content:\"\\ea87\"}.ez-icon-sync:before{content:\"\\ea88\"}.ez-icon-table:before{content:\"\\ea89\"}.ez-icon-tag_code:before{content:\"\\ea8a\"}.ez-icon-text:before{content:\"\\ea8b\"}.ez-icon-timeline:before{content:\"\\ea8c\"}.ez-icon-timer-outline:before{content:\"\\ea8d\"}.ez-icon-trending-up:before{content:\"\\ea8e\"}.ez-icon-tune:before{content:\"\\ea8f\"}.ez-icon-txt:before{content:\"\\ea90\"}.ez-icon-un-pin:before{content:\"\\ea91\"}.ez-icon-unfold_less:before{content:\"\\ea92\"}.ez-icon-unfold_more:before{content:\"\\ea93\"}.ez-icon-user-circle:before{content:\"\\ea94\"}.ez-icon-warning-outline:before{content:\"\\ea95\"}.ez-icon-warning_triangle:before{content:\"\\ea96\"}.ez-icon-whatshot:before{content:\"\\ea97\"}.ez-icon-xlsx:before{content:\"\\ea98\"}.ez-icon-zip:before{content:\"\\ea99\"}.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}";
|
|
125563
125942
|
|
|
125564
125943
|
const EzIcon$1 = class extends HTMLElement$1 {
|
|
125565
125944
|
constructor() {
|
|
@@ -125597,7 +125976,7 @@ const EzIcon$1 = class extends HTMLElement$1 {
|
|
|
125597
125976
|
static get style() { return ezIconCss; }
|
|
125598
125977
|
};
|
|
125599
125978
|
|
|
125600
|
-
const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon--padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item--margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Roboto\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Roboto\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group-overlay--font-family:var(--font-pattern, \"Roboto\");--ez-list__group-overlay--font-size:var(--text--medium, 14px);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable-list--padding-bottom:var(--space--small, 6px);--ez-list__draggable-icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');--ez-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-list__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-list__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__scrollbar--width:var(--space--medium, 12px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{width:100%;display:grid;grid-template-columns:minmax(0px, auto) minmax(0px, auto);place-items:center;border-top:1px dashed #fff;justify-content:space-between;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size)}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.item-content{display:flex;overflow:hidden;justify-content:flex-start;align-items:center;width:100%}.draggable-list{padding:0;margin:0;width:100%;max-height:100%;scrollbar-width:thin;color:var(--text-color);scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.draggable-list li{display:flex;height:32px;margin:var(--ez-list__item--margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color)}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.draggable-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb:vertical:hover,.draggable-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.draggable-list::-webkit-scrollbar-thumb:vertical:active,.draggable-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;width:18px;height:18px;background-color:var(--ez-list__icon--color);-webkit-mask-image:var(--ez-list__draggable-icon--image);mask-image:var(--ez-list__draggable-icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-name{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--title--primary);font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom)}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.group-container::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb:vertical:hover,.group-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.group-container::-webkit-scrollbar-thumb:vertical:active,.group-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;outline:none;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.items-container::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container::-webkit-scrollbar-thumb:vertical:hover,.items-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.items-container::-webkit-scrollbar-thumb:vertical:active,.items-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.group-overlay{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer;font-family:var(--ez-list__group-overlay--font-family);font-size:var(--ez-list__group-overlay--font-size)}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
|
|
125979
|
+
const ezListCss = ":host {\n /* @doc Define a camada de visibilidae do componente. */\n --ez-list__host--z-index: var(--visible, 1);\n\n /* @doc Define o raio da borda do componente. */\n --ez-list__host--border-radius: var(--border--radius-medium, 12px);\n\n /* @doc Define o espaçamento entre a lista e o componente. */\n --ez-list__host--padding: var(--space--medium, 12px);\n\n /* @doc Define o espaçamento interno do ícone. */\n --ez-list__icon--padding: var(--space--small, 6px);\n\n /* @doc Define a cor do ícone de arrasto do item da lista. */\n --ez-list__icon--color: #AFB6C0;\n\n /* @doc Define o espaçamento externo do item da lista. */\n --ez-list__item--margin: 0 var(--space--small, 6px);\n\n /* @doc Define a cor do texto do item da lista. */\n --ez-list__item--color: var(--title--primary, #2b3a54);\n\n /* @doc Define o estilo borda inferior do item da lista. */\n --ez-list__item--border-bottom;\n\n /* @doc Define a cor da borda inferior do item da lista. */\n --ez-list__item--border-bottom-color;\n\n /* @doc Define o estilo do texto do item da lista. */\n --ez-list__item--font-family: var(--font-pattern, \"Roboto\");\n\n /* @doc Define o tamanho do texto do item da lista. */\n --ez-list__item--font-size: var(--text--medium, 14px);\n \n /* @doc Define o tipo da quebra de linha do item da lista. */\n --ez-list__item--white-space: var(--ez-list__item--white-space, nowrap);\n\n /* @doc Define o espaçamento lateral direito para items selecionados. */\n --ez-list__selectable--padding-right: var(--space--small, 6px);\n \n /* @doc Define o espaçamento lateral esquerdo para items selecionados. */\n --ez-list__selectable--padding-left: var(--space--small, 6px);\n\n /*@doc Define o raio da borda de items selecionados.*/\n --ez-list__selected-item--border-radius: var(--border--radius-small, 6px);\n \n /*@doc Define a cor de fundo de items selecionados.*/\n --ez-list__selected-item--background-color: var(--color--primary-300, #E2F4EF);\n\n /* @doc Define o estilo do texto do grupo da lista. */\n --ez-list__group--font-family: var(--font-pattern, \"Roboto\");\n \n /* @doc Define o tamanho do texto do grupo da lista. */\n --ez-list__group--font-size: var(--text--medium, 14px);\n \n /* @doc Define o peso do texto do grupo da lista. */\n --ez-list__group--font-weight: var(--text-weight--large, 600);\n \n /* @doc Define o espaçamento inferior do grupo da lista. */\n --ez-list__group--padding-bottom: var(--space-small, 6px);\n\n /* @doc Define o estilo do texto da área de transferência de grupos. */\n --ez-list__group-overlay--font-family: var(--font-pattern, \"Roboto\");\n\n /* @doc Define o tamanho do texto da área de transferência de grupos. */\n --ez-list__group-overlay--font-size: var(--text--medium, 14px);\n \n /* @doc Define a cor da borda pontilhada sobre os elementos da lista. */\n --ez-list__over--border--color: var(--color--primary, #008561);\n\n /*@doc Define a altura do container para arrasto para última posição .*/\n --ez-list__last-droppable-space--height: var(--space--small, 6px);\n \n /*@doc Define o espaçamento do container de itens arrastáveis .*/\n --ez-list__draggable-list--padding-bottom: var(--space--small, 6px);\n\n /* @doc Define a imagem do ícone de drag. */\n --ez-list__draggable-icon--image: url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');\n\n /* scrollbar */\n /*@doc Define a cor da barra de rolagem do componente.*/\n --ez-list__scrollbar--color-default: var(--scrollbar--default, #626e82);\n /*@doc Define a cor de fundo da barra de rolagem do componente.*/\n --ez-list__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);\n /*@doc Define a cor do hover na barra de rolagem do componente.*/\n --ez-list__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);\n /*@doc Define a cor do active na barra de rolagem do componente.*/\n --ez-list__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);\n /*@doc Define o raio da borda da barra de rolagem do componente.*/\n --ez-list__scrollbar--border-radius: var(--border--radius-small, 6px);\n /*@doc Define a largura da barra de rolagem do componente.*/\n --ez-list__scrollbar--width: var(--space--medium, 12px);\n\n max-height: 100%;\n width: 100%;\n background-color: #fff;\n display: flex;\n\n /*public*/\n z-index: var(--ez-list__host--z-index);\n}\n\np {\n margin: 0;\n}\n\n.draggable {\n /* private */\n width: 100%;\n display: grid;\n grid-template-columns: minmax(0px, auto) minmax(0px, auto);\n place-items: center;\n border-top: 1px dashed #fff;\n justify-content: space-between;\n\n /*public*/\n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n}\n\n.dragging {\n background: #FFFFFF;\n /* Primary/color--primary */\n\n border: 1px solid #008561;\n box-sizing: border-box;\n box-shadow: 0px 0px 16px rgba(0, 38, 111, 0.122);\n border-radius: 6px;\n}\n\n.selectable {\n cursor: pointer;\n\n /*public*/\n padding-right: var(--ez-list__selectable--padding-right);\n padding-left: var(--ez-list__selectable--padding-left);\n}\n\n.selectable-container {\n margin: 0px !important;\n}\n\n.hover-feedback:hover {\n background-color: var(--background--medium);\n border-radius: var(--border--radius-regular);\n}\n\n.item-content {\n display: flex;\n overflow: hidden;\n justify-content: flex-start;\n width: 100%;\n}\n\n.draggable-list {\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n scrollbar-width: thin;\n \n /*public*/\n color: var(--text-color);\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.draggable-list li {\n display: flex;\n \n /*public*/\n padding: var(--space--2xs, 8px) var(--space--3xs, 4px);\n margin: var(--ez-list__item--margin);\n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n color: var(--ez-list__item--color);\n border-bottom: var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color);\n}\n\n.over {\n /*public*/\n border-top: 1px dashed var(--ez-list__over--border--color);\n}\n\n.last-droppable-space {\n /*public*/\n height: var(--ez-list__last-droppable-space--height);\n}\n\n.draggable-selected {\n /*public*/\n background-color: var(--background--strong) !important;\n}\n\n.draggable-selected div:hover {\n /*public*/\n background-color: var(--background--strong) !important;\n}\n\n.draggable-list::-webkit-scrollbar {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.draggable-list::-webkit-scrollbar-track {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list::-webkit-scrollbar-thumb {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list::-webkit-scrollbar-thumb:vertical:hover,\n.draggable-list::-webkit-scrollbar-thumb:horizontal:hover {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.draggable-list::-webkit-scrollbar-thumb:vertical:active,\n.draggable-list::-webkit-scrollbar-thumb:horizontal:active {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.draggable-icon {\n align-items: flex-start;\n display: flex;\n outline: none;\n border: none;\n background-color: unset;\n}\n\n.draggable-icon::after {\n content: '';\n display: flex;\n width: 18px;\n height: 18px;\n\n /*public*/\n background-color: var(--ez-list__icon--color);\n -webkit-mask-image: var(--ez-list__draggable-icon--image);\n mask-image: var(--ez-list__draggable-icon--image);\n}\n\n* {\n box-sizing: border-box;\n}\n\n.checkbox {\n width: fit-content;\n}\n\n.text--ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n \n /*public*/\n white-space: var(--ez-list__item--white-space);\n}\n\n.group-container {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n overflow-y: auto;\n outline: none;\n width: 100%;\n scrollbar-width: thin;\n\n /*public*/\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-name {\n -webkit-user-select: none;\n -moz-user-select: -moz-none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n /*public*/\n color: var(--title--primary);\n font-family: var(--ez-list__group--font-family);\n font-size: var(--ez-list__group--font-size);\n font-weight: var(--ez-list__group--font-weight);\n padding-bottom: var(--ez-list__group--padding-bottom);\n}\n\n.group {\n display: flex;\n flex-direction: column;\n}\n\n.group-container::-webkit-scrollbar {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.group-container::-webkit-scrollbar-track {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container::-webkit-scrollbar-thumb {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container::-webkit-scrollbar-thumb:vertical:hover,\n.group-container::-webkit-scrollbar-thumb:horizontal:hover {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.group-container::-webkit-scrollbar-thumb:vertical:active,\n.group-container::-webkit-scrollbar-thumb:horizontal:active {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.section-container {\n display: flex;\n position: relative;\n height: 100%;\n}\n\n.items-container {\n width: 100%;\n max-height: 100%;\n outline: none;\n scrollbar-width: thin;\n\n /*public*/\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-items-container {\n width: 100%;\n max-height: 100%;\n height: 100%;\n outline: none;\n}\n\n.items-container::-webkit-scrollbar {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.items-container::-webkit-scrollbar-track {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container::-webkit-scrollbar-thumb {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container::-webkit-scrollbar-thumb:vertical:hover,\n.items-container::-webkit-scrollbar-thumb:horizontal:hover {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.items-container::-webkit-scrollbar-thumb:vertical:active,\n.items-container::-webkit-scrollbar-thumb:horizontal:active {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.group-overlay {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n border-radius: 8px;\n position: absolute;\n display: none;\n place-items: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 2;\n margin: 0;\n cursor: pointer;\n\n /*public*/\n font-family: var(--ez-list__group-overlay--font-family);\n font-size: var(--ez-list__group-overlay--font-size);\n}\n\n.presetedHeight {\n min-height: 100px;\n}\n\n.overlay-text {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n}\n\n.selected-item {\n /*public*/\n background: var(--ez-list__selected-item--background-color);\n border-radius: var(--ez-list__selected-item--border-radius);\n}\n\n.slot-item {\n align-items: flex-end;\n}\n\n.overGroup {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n box-sizing: border-box;\n border-radius: 8px;\n padding-top: 6px;\n}";
|
|
125601
125980
|
|
|
125602
125981
|
const EzList$1 = class extends HTMLElement$1 {
|
|
125603
125982
|
constructor() {
|
|
@@ -126039,7 +126418,9 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
126039
126418
|
this.setSelection(previousItem, true);
|
|
126040
126419
|
}
|
|
126041
126420
|
keyDownHandler(event) {
|
|
126042
|
-
event.
|
|
126421
|
+
if (!event.ctrlKey) {
|
|
126422
|
+
event.preventDefault();
|
|
126423
|
+
}
|
|
126043
126424
|
this.getSelection().then(selectedItem => {
|
|
126044
126425
|
if (selectedItem) {
|
|
126045
126426
|
switch (event.key) {
|
|
@@ -126176,7 +126557,7 @@ const EzLoadingBar$1 = class extends HTMLElement$1 {
|
|
|
126176
126557
|
static get style() { return ezLoadingBarCss; }
|
|
126177
126558
|
};
|
|
126178
126559
|
|
|
126179
|
-
const ezModalCss = ":host{--ez-modal-z-index:var(--
|
|
126560
|
+
const ezModalCss = ":host{--ez-modal-z-index:var(--elevation--12, 12);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
126180
126561
|
|
|
126181
126562
|
const EzModal$1 = class extends HTMLElement$1 {
|
|
126182
126563
|
constructor() {
|
|
@@ -126319,6 +126700,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126319
126700
|
this.dataSource = undefined;
|
|
126320
126701
|
this.useOptions = false;
|
|
126321
126702
|
this.options = undefined;
|
|
126703
|
+
this.isTextSearch = false;
|
|
126322
126704
|
this.filteredOptions = undefined;
|
|
126323
126705
|
this.displayOptions = undefined;
|
|
126324
126706
|
this.viewScenario = undefined;
|
|
@@ -126356,8 +126738,18 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126356
126738
|
ordenationByCheckStateAndAlphabetically(filteredOptions) {
|
|
126357
126739
|
const listWithSelectChecked = [];
|
|
126358
126740
|
const listWithNotSelectChecked = [];
|
|
126359
|
-
|
|
126360
|
-
|
|
126741
|
+
let emptyElement;
|
|
126742
|
+
filteredOptions.forEach(item => {
|
|
126743
|
+
if (item.value == undefined || item.label === "") {
|
|
126744
|
+
emptyElement = Object.assign(Object.assign({}, item), { label: "(Vazio)" });
|
|
126745
|
+
}
|
|
126746
|
+
else {
|
|
126747
|
+
(item.check ? listWithSelectChecked.push(item) : listWithNotSelectChecked.push(item));
|
|
126748
|
+
}
|
|
126749
|
+
});
|
|
126750
|
+
return (emptyElement == undefined ? [] : [emptyElement])
|
|
126751
|
+
.concat(this.dataSource == undefined ? ArrayUtils$1.sortAlphabetically(listWithSelectChecked) : this.dataSource.sortItems(this.columnName, listWithSelectChecked))
|
|
126752
|
+
.concat(this.dataSource == undefined ? ArrayUtils$1.sortAlphabetically(listWithNotSelectChecked) : this.dataSource.sortItems(this.columnName, listWithNotSelectChecked));
|
|
126361
126753
|
}
|
|
126362
126754
|
changeCheckAllValeuFromFilteredOptions() {
|
|
126363
126755
|
var _a, _b, _c, _d;
|
|
@@ -126401,6 +126793,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126401
126793
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
|
|
126402
126794
|
}
|
|
126403
126795
|
this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
|
|
126796
|
+
this.searchInput.value = "";
|
|
126404
126797
|
}
|
|
126405
126798
|
handleRemoveItemFromOptions(item) {
|
|
126406
126799
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
|
|
@@ -126455,16 +126848,17 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126455
126848
|
}
|
|
126456
126849
|
scenarioToDisplay(view) {
|
|
126457
126850
|
const scenarios = {
|
|
126458
|
-
[ViewScenarios.DATASOURCE_INIT]: this.buildInitViewWithDataSource(),
|
|
126459
|
-
[ViewScenarios.DATASOURCE_RESULTS]: this.buildViewList(true),
|
|
126460
|
-
[ViewScenarios.DATASOURCE_RESULTS_EMPTY]: this.buildViewEmptyResults(),
|
|
126461
|
-
[ViewScenarios.OPTIONS_EMPTY]: this.buildViewEmptyResults(),
|
|
126462
|
-
[ViewScenarios.OPTIONS]: this.buildViewList(false),
|
|
126851
|
+
[ViewScenarios.DATASOURCE_INIT]: () => this.buildInitViewWithDataSource(),
|
|
126852
|
+
[ViewScenarios.DATASOURCE_RESULTS]: () => this.buildViewList(true),
|
|
126853
|
+
[ViewScenarios.DATASOURCE_RESULTS_EMPTY]: () => this.buildViewEmptyResults(),
|
|
126854
|
+
[ViewScenarios.OPTIONS_EMPTY]: () => this.buildViewEmptyResults(),
|
|
126855
|
+
[ViewScenarios.OPTIONS]: () => this.buildViewList(false),
|
|
126463
126856
|
};
|
|
126464
|
-
|
|
126857
|
+
const scenarioBuilder = scenarios[view];
|
|
126858
|
+
return scenarioBuilder ? scenarioBuilder() : undefined;
|
|
126465
126859
|
}
|
|
126466
126860
|
render() {
|
|
126467
|
-
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this) })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
126861
|
+
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this), isTextSearch: this.isTextSearch })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
126468
126862
|
}
|
|
126469
126863
|
static get watchers() { return {
|
|
126470
126864
|
"useOptions": ["onChangeUseOptions"],
|
|
@@ -126798,7 +127192,7 @@ const EzPopover$1 = class extends HTMLElement$1 {
|
|
|
126798
127192
|
static get style() { return ezPopoverCss; }
|
|
126799
127193
|
};
|
|
126800
127194
|
|
|
126801
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--
|
|
127195
|
+
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;max-height:100%;width:100%;display:grid;grid-template-rows:auto 1fr}.popup__expandable-content{box-sizing:border-box;width:100%;min-height:100%;height:100%}.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%}}";
|
|
126802
127196
|
|
|
126803
127197
|
const EzPopup$1 = class extends HTMLElement$1 {
|
|
126804
127198
|
constructor() {
|
|
@@ -127091,7 +127485,7 @@ class ScrollCtrl {
|
|
|
127091
127485
|
}
|
|
127092
127486
|
}
|
|
127093
127487
|
|
|
127094
|
-
const ezSearchCss = ":host{width:100%}";
|
|
127488
|
+
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);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;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);min-height:var(--ez-search__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-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)}}";
|
|
127095
127489
|
|
|
127096
127490
|
const EzSearch$1 = class extends HTMLElement$1 {
|
|
127097
127491
|
constructor() {
|
|
@@ -127099,6 +127493,21 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127099
127493
|
this.__registerHost();
|
|
127100
127494
|
this.__attachShadow();
|
|
127101
127495
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
127496
|
+
this._changeDeboucingTimeout = null;
|
|
127497
|
+
this._limitCharsToSearch = 3;
|
|
127498
|
+
this._deboucingTime = 300;
|
|
127499
|
+
this._maxWidthValue = 0;
|
|
127500
|
+
this._tabPressed = false;
|
|
127501
|
+
this._textEmptyList = "Nenhum resultado encontrado";
|
|
127502
|
+
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
127503
|
+
this._lookupMode = false;
|
|
127504
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
127505
|
+
this._endHighlightTag = "</span>";
|
|
127506
|
+
this._preSelection = undefined;
|
|
127507
|
+
this._visibleOptions = undefined;
|
|
127508
|
+
this._startLoading = false;
|
|
127509
|
+
this._showLoading = true;
|
|
127510
|
+
this._criteria = undefined;
|
|
127102
127511
|
this.value = undefined;
|
|
127103
127512
|
this.label = undefined;
|
|
127104
127513
|
this.enabled = true;
|
|
@@ -127109,29 +127518,86 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127109
127518
|
this.suppressEmptyOption = false;
|
|
127110
127519
|
this.mode = "regular";
|
|
127111
127520
|
this.canShowError = true;
|
|
127521
|
+
this.hideErrorOnFocusOut = true;
|
|
127112
127522
|
this.listOptionsPosition = undefined;
|
|
127523
|
+
this.isTextSearch = false;
|
|
127524
|
+
this.ignoreLimitCharsToSearch = false;
|
|
127525
|
+
this.options = undefined;
|
|
127526
|
+
this.suppressSearch = false;
|
|
127113
127527
|
}
|
|
127114
127528
|
observeErrorMessage() {
|
|
127115
|
-
|
|
127116
|
-
|
|
127529
|
+
var _a;
|
|
127530
|
+
if (this._textInput) {
|
|
127531
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
127532
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
127533
|
+
this.setInputValue();
|
|
127534
|
+
}
|
|
127117
127535
|
}
|
|
127118
127536
|
}
|
|
127119
|
-
observeValue() {
|
|
127120
|
-
if (this.
|
|
127121
|
-
|
|
127537
|
+
observeValue(newValue, oldValue) {
|
|
127538
|
+
if (this._textInput && newValue != oldValue) {
|
|
127539
|
+
try {
|
|
127540
|
+
if (newValue === "string") {
|
|
127541
|
+
this.setInputValue();
|
|
127542
|
+
return;
|
|
127543
|
+
}
|
|
127544
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
127545
|
+
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
127546
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
127547
|
+
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
127548
|
+
this.value = newValueSelected;
|
|
127549
|
+
}
|
|
127550
|
+
if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
|
|
127551
|
+
this.setInputValue();
|
|
127552
|
+
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
127553
|
+
if (!this._lookupMode) {
|
|
127554
|
+
this.ezChange.emit(valueEmitted);
|
|
127555
|
+
}
|
|
127556
|
+
}
|
|
127557
|
+
this.resetOptions();
|
|
127558
|
+
}
|
|
127559
|
+
finally {
|
|
127560
|
+
this._lookupMode = false;
|
|
127561
|
+
}
|
|
127122
127562
|
}
|
|
127123
127563
|
}
|
|
127564
|
+
observeOptions(newOptions, oldOptions) {
|
|
127565
|
+
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
127566
|
+
return;
|
|
127567
|
+
this.loadOptions(SearchMode.PRELOAD);
|
|
127568
|
+
}
|
|
127569
|
+
/*
|
|
127570
|
+
* Retorna uma promise com o valor da opção selecionada,
|
|
127571
|
+
* que será resolvida quando o backend devolver este dado.
|
|
127572
|
+
*/
|
|
127573
|
+
async getValueAsync() {
|
|
127574
|
+
if (!this._showLoading) {
|
|
127575
|
+
return new Promise(resolve => resolve(this.value));
|
|
127576
|
+
}
|
|
127577
|
+
return new Promise(resolve => {
|
|
127578
|
+
let id = setInterval(() => {
|
|
127579
|
+
if (!this._showLoading) {
|
|
127580
|
+
clearInterval(id);
|
|
127581
|
+
resolve(this.value);
|
|
127582
|
+
}
|
|
127583
|
+
}, 100);
|
|
127584
|
+
});
|
|
127585
|
+
}
|
|
127124
127586
|
/**
|
|
127125
|
-
|
|
127126
|
-
|
|
127587
|
+
* Aplica o foco no campo.
|
|
127588
|
+
*/
|
|
127127
127589
|
async setFocus() {
|
|
127128
|
-
this.
|
|
127590
|
+
if (this._textInput) {
|
|
127591
|
+
this._textInput.setFocus();
|
|
127592
|
+
}
|
|
127129
127593
|
}
|
|
127130
127594
|
/**
|
|
127131
|
-
|
|
127132
|
-
|
|
127595
|
+
* Remove o foco do campo.
|
|
127596
|
+
*/
|
|
127133
127597
|
async setBlur() {
|
|
127134
|
-
this.
|
|
127598
|
+
if (this._textInput) {
|
|
127599
|
+
this._textInput.setBlur();
|
|
127600
|
+
}
|
|
127135
127601
|
}
|
|
127136
127602
|
/**
|
|
127137
127603
|
* Retorna se o conteúdo é inválido.
|
|
@@ -127143,40 +127609,547 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127143
127609
|
* Limpa o valor do campo de pesquisa
|
|
127144
127610
|
*/
|
|
127145
127611
|
async clearValue() {
|
|
127612
|
+
this.clearSearch();
|
|
127613
|
+
}
|
|
127614
|
+
scrollListener() {
|
|
127615
|
+
var _a;
|
|
127616
|
+
if (this._floatingID == undefined) {
|
|
127617
|
+
return;
|
|
127618
|
+
}
|
|
127619
|
+
if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
|
|
127620
|
+
this.hideOptions();
|
|
127621
|
+
}
|
|
127622
|
+
else {
|
|
127623
|
+
window.requestAnimationFrame(() => {
|
|
127624
|
+
this.updateListPosition();
|
|
127625
|
+
});
|
|
127626
|
+
}
|
|
127627
|
+
}
|
|
127628
|
+
updateListPosition() {
|
|
127629
|
+
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
127630
|
+
const elementRect = this._listWrapper.getBoundingClientRect();
|
|
127631
|
+
const containerRect = this._listContainer.getBoundingClientRect();
|
|
127632
|
+
const textInputRect = this._textInput.getBoundingClientRect();
|
|
127633
|
+
const limitHeight = bottomLimit || window.innerHeight;
|
|
127634
|
+
const neededHeight = containerRect.bottom + elementRect.height;
|
|
127635
|
+
if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
|
|
127636
|
+
fromBottom = true;
|
|
127637
|
+
}
|
|
127638
|
+
if (!hardPosition) {
|
|
127639
|
+
verticalPosition = verticalPosition || 0;
|
|
127640
|
+
horizontalPosition = horizontalPosition || 0;
|
|
127641
|
+
if (fromBottom) {
|
|
127642
|
+
verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
|
|
127643
|
+
}
|
|
127644
|
+
else {
|
|
127645
|
+
verticalPosition += containerRect.top;
|
|
127646
|
+
}
|
|
127647
|
+
if (fromRight) {
|
|
127648
|
+
horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
|
|
127649
|
+
}
|
|
127650
|
+
else {
|
|
127651
|
+
horizontalPosition += containerRect.left;
|
|
127652
|
+
}
|
|
127653
|
+
}
|
|
127654
|
+
if (verticalPosition != undefined) {
|
|
127655
|
+
this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
|
|
127656
|
+
this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
|
|
127657
|
+
}
|
|
127658
|
+
if (horizontalPosition != undefined) {
|
|
127659
|
+
this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
|
|
127660
|
+
this._listWrapper.style[fromRight ? "left" : "right"] = "";
|
|
127661
|
+
}
|
|
127662
|
+
}
|
|
127663
|
+
getListPosition() {
|
|
127664
|
+
if (this.listOptionsPosition) {
|
|
127665
|
+
return this.listOptionsPosition;
|
|
127666
|
+
}
|
|
127667
|
+
return {
|
|
127668
|
+
verticalPosition: (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13
|
|
127669
|
+
};
|
|
127670
|
+
}
|
|
127671
|
+
isDifferentValues(firstValue, secondValue) {
|
|
127672
|
+
return ObjectUtils$1.objectToString(firstValue || {}) !== ObjectUtils$1.objectToString(secondValue || {});
|
|
127673
|
+
}
|
|
127674
|
+
getFormattedText(currentValue) {
|
|
127675
|
+
if (currentValue == undefined) {
|
|
127676
|
+
return;
|
|
127677
|
+
}
|
|
127678
|
+
if (!this.showSelectedValue || currentValue.value == undefined) {
|
|
127679
|
+
return currentValue.label;
|
|
127680
|
+
}
|
|
127681
|
+
return currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
|
|
127682
|
+
}
|
|
127683
|
+
getText() {
|
|
127684
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
127685
|
+
const text = this.getFormattedText(currentValue);
|
|
127686
|
+
if (text == undefined) {
|
|
127687
|
+
return;
|
|
127688
|
+
}
|
|
127689
|
+
return String(text)
|
|
127690
|
+
.replace(/&/g, '&')
|
|
127691
|
+
.replace(/</g, '<')
|
|
127692
|
+
.replace(/>/g, '>')
|
|
127693
|
+
.replace(/"/g, '"');
|
|
127694
|
+
}
|
|
127695
|
+
getSelectedOption(value) {
|
|
127696
|
+
if (typeof value === "string" || value instanceof String) {
|
|
127697
|
+
return this._visibleOptions.find(o => o.value === value);
|
|
127698
|
+
}
|
|
127699
|
+
return value;
|
|
127700
|
+
}
|
|
127701
|
+
updateVisibleOptions() {
|
|
127702
|
+
let opts = this._source || [];
|
|
127703
|
+
if (this.suppressEmptyOption) {
|
|
127704
|
+
this._visibleOptions = opts;
|
|
127705
|
+
}
|
|
127706
|
+
else {
|
|
127707
|
+
this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
|
|
127708
|
+
}
|
|
127709
|
+
this._maxWidthValue = this.getMaxWidthValue();
|
|
127710
|
+
}
|
|
127711
|
+
getMaxWidthValue() {
|
|
127712
|
+
var _a;
|
|
127713
|
+
const arrValues = [];
|
|
127714
|
+
(_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.forEach(opt => {
|
|
127715
|
+
const widthValue = this.getWidthValue(opt.value);
|
|
127716
|
+
if (!arrValues.includes(widthValue)) {
|
|
127717
|
+
arrValues.push(widthValue);
|
|
127718
|
+
}
|
|
127719
|
+
});
|
|
127720
|
+
return arrValues.length > 1 ? Math.max(...arrValues) : 0;
|
|
127721
|
+
}
|
|
127722
|
+
getWidthValue(value) {
|
|
127723
|
+
if (this._itemValueBasis != undefined) {
|
|
127724
|
+
const span = this._itemValueBasis;
|
|
127725
|
+
if (value != undefined) {
|
|
127726
|
+
span.innerHTML = value;
|
|
127727
|
+
return span.clientWidth > 0 ? (span.clientWidth + 2) : 0;
|
|
127728
|
+
}
|
|
127729
|
+
else {
|
|
127730
|
+
span.innerHTML = "";
|
|
127731
|
+
}
|
|
127732
|
+
}
|
|
127733
|
+
return 0;
|
|
127734
|
+
}
|
|
127735
|
+
createOption(detail) {
|
|
127736
|
+
let { key, title } = detail;
|
|
127737
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
127738
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
127739
|
+
title = StringUtils$1.decodeHtmlEntities(title);
|
|
127740
|
+
const option = {
|
|
127741
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
127742
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
127743
|
+
};
|
|
127744
|
+
this.selectOption(option);
|
|
127745
|
+
}
|
|
127746
|
+
buildItem(opt, index) {
|
|
127747
|
+
opt.label = opt.label || opt.value;
|
|
127748
|
+
const card = {
|
|
127749
|
+
key: opt.value,
|
|
127750
|
+
title: opt.label,
|
|
127751
|
+
details: opt.details
|
|
127752
|
+
};
|
|
127753
|
+
return h("div", { style: { "height": "100%" }, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index }, h("ez-card-item", { item: card }));
|
|
127754
|
+
}
|
|
127755
|
+
showOptions() {
|
|
127756
|
+
if (!this.enabled)
|
|
127757
|
+
return;
|
|
127758
|
+
if (this.isOptionsVisible()) {
|
|
127759
|
+
return;
|
|
127760
|
+
}
|
|
127761
|
+
if (!!this._resizeObserver)
|
|
127762
|
+
this._resizeObserver.observe(this._textInput);
|
|
127763
|
+
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: false, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
127764
|
+
this.setFocus();
|
|
127765
|
+
window.requestAnimationFrame(() => {
|
|
127766
|
+
this.updateListPosition();
|
|
127767
|
+
if (!this.listOptionsPosition) {
|
|
127768
|
+
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
127769
|
+
}
|
|
127770
|
+
});
|
|
127771
|
+
}
|
|
127772
|
+
hideOptions() {
|
|
127773
|
+
if (this._floatingID !== undefined) {
|
|
127774
|
+
FloatingManager.close(this._floatingID);
|
|
127775
|
+
}
|
|
127776
|
+
this._floatingID = undefined;
|
|
127777
|
+
if (!!this._resizeObserver)
|
|
127778
|
+
this._resizeObserver.unobserve(this._textInput);
|
|
127779
|
+
}
|
|
127780
|
+
isOptionsVisible() {
|
|
127781
|
+
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
127782
|
+
}
|
|
127783
|
+
nextOption() {
|
|
127784
|
+
if (!this.isOptionsVisible()) {
|
|
127785
|
+
return;
|
|
127786
|
+
}
|
|
127787
|
+
this.showOptions();
|
|
127788
|
+
this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
|
|
127789
|
+
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
127790
|
+
}
|
|
127791
|
+
previousOption() {
|
|
127792
|
+
this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
127793
|
+
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
127794
|
+
}
|
|
127795
|
+
scrollToOption(opt) {
|
|
127796
|
+
window.requestAnimationFrame(() => {
|
|
127797
|
+
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
|
|
127798
|
+
if (liElem)
|
|
127799
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
127800
|
+
});
|
|
127801
|
+
}
|
|
127802
|
+
selectCurrentOption() {
|
|
127803
|
+
if (this._preSelection !== undefined) {
|
|
127804
|
+
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
127805
|
+
this._preSelection = undefined;
|
|
127806
|
+
}
|
|
127807
|
+
else {
|
|
127808
|
+
this.controlListWithOnlyOne();
|
|
127809
|
+
}
|
|
127810
|
+
}
|
|
127811
|
+
updateSource(source) {
|
|
127812
|
+
this._startLoading = false;
|
|
127813
|
+
if (source instanceof Promise) {
|
|
127814
|
+
this._showLoading = true;
|
|
127815
|
+
source.then(result => {
|
|
127816
|
+
this._showLoading = false;
|
|
127817
|
+
this.updateSource(result);
|
|
127818
|
+
}).catch(() => this._showLoading = false);
|
|
127819
|
+
this.updateVisibleOptions();
|
|
127820
|
+
}
|
|
127821
|
+
else {
|
|
127822
|
+
this._showLoading = false;
|
|
127823
|
+
if (Array.isArray(source)) {
|
|
127824
|
+
this._source = source;
|
|
127825
|
+
this.updateVisibleOptions();
|
|
127826
|
+
if (this._tabPressed) {
|
|
127827
|
+
this._tabPressed = false;
|
|
127828
|
+
this.controlEmptySearch();
|
|
127829
|
+
}
|
|
127830
|
+
}
|
|
127831
|
+
else {
|
|
127832
|
+
this.selectOption(source);
|
|
127833
|
+
}
|
|
127834
|
+
}
|
|
127835
|
+
}
|
|
127836
|
+
clearSource() {
|
|
127837
|
+
this._source = [];
|
|
127838
|
+
this.updateVisibleOptions();
|
|
127839
|
+
}
|
|
127840
|
+
selectOption(newOption) {
|
|
127146
127841
|
var _a, _b;
|
|
127147
|
-
|
|
127842
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
127843
|
+
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
127844
|
+
|| (currentValue == undefined && newOption != undefined && "value" in newOption)) {
|
|
127845
|
+
const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
|
|
127846
|
+
this.value = adjustedOpt;
|
|
127847
|
+
}
|
|
127848
|
+
else {
|
|
127849
|
+
this.resetOptions();
|
|
127850
|
+
}
|
|
127851
|
+
this._visibleOptions = [];
|
|
127852
|
+
this.clearSource();
|
|
127148
127853
|
}
|
|
127149
|
-
|
|
127150
|
-
|
|
127151
|
-
|
|
127152
|
-
|
|
127153
|
-
|
|
127854
|
+
loadOptions(mode, argument = "") {
|
|
127855
|
+
this._criteria = argument;
|
|
127856
|
+
this._startLoading = true;
|
|
127857
|
+
if (this.optionLoader) {
|
|
127858
|
+
const searchArgument = { mode, argument };
|
|
127859
|
+
this.updateSource(this.optionLoader(searchArgument));
|
|
127860
|
+
}
|
|
127861
|
+
else {
|
|
127862
|
+
this.updateSource(this.options);
|
|
127863
|
+
}
|
|
127864
|
+
}
|
|
127865
|
+
cancelPreselection() {
|
|
127866
|
+
if (!this._textInput.value && this.value) {
|
|
127867
|
+
this.selectOption(undefined);
|
|
127868
|
+
}
|
|
127869
|
+
else {
|
|
127870
|
+
window.setTimeout(() => {
|
|
127871
|
+
this.setInputValue();
|
|
127872
|
+
}, this._deboucingTime);
|
|
127873
|
+
}
|
|
127874
|
+
this.resetOptions();
|
|
127875
|
+
}
|
|
127876
|
+
setInputValue(clearError = true) {
|
|
127877
|
+
const textValue = this.getText();
|
|
127878
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
127879
|
+
this._textInput.value = textValue;
|
|
127880
|
+
if (clearError) {
|
|
127881
|
+
this.errorMessage = null;
|
|
127882
|
+
}
|
|
127883
|
+
}
|
|
127884
|
+
}
|
|
127885
|
+
clearSearch() {
|
|
127886
|
+
this.value = null;
|
|
127887
|
+
}
|
|
127888
|
+
controlListWithOnlyOne() {
|
|
127889
|
+
var _a, _b;
|
|
127890
|
+
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
127891
|
+
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
127892
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
127893
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
127894
|
+
let title = StringUtils$1.decodeHtmlEntities(source[0].label);
|
|
127895
|
+
const option = {
|
|
127896
|
+
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
127897
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
127898
|
+
};
|
|
127899
|
+
this.selectOption(option);
|
|
127900
|
+
}
|
|
127901
|
+
}
|
|
127902
|
+
controlEmptySearch() {
|
|
127154
127903
|
var _a;
|
|
127155
|
-
|
|
127904
|
+
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
127905
|
+
this.clearSearch();
|
|
127906
|
+
ApplicationUtils.info(this._textEmptyList);
|
|
127907
|
+
}
|
|
127908
|
+
else {
|
|
127909
|
+
this.controlListWithOnlyOne();
|
|
127910
|
+
}
|
|
127156
127911
|
}
|
|
127157
|
-
|
|
127158
|
-
|
|
127159
|
-
|
|
127160
|
-
|
|
127161
|
-
|
|
127162
|
-
|
|
127912
|
+
validateDescriptionValue() {
|
|
127913
|
+
if (StringUtils$1.isEmpty(this.value)) {
|
|
127914
|
+
return;
|
|
127915
|
+
}
|
|
127916
|
+
let value = this.value;
|
|
127917
|
+
if (typeof value === "object") {
|
|
127918
|
+
return;
|
|
127919
|
+
}
|
|
127920
|
+
if (StringUtils$1.isEmpty(value)) {
|
|
127921
|
+
return;
|
|
127922
|
+
}
|
|
127923
|
+
this.loadDescriptionValue(value);
|
|
127924
|
+
}
|
|
127925
|
+
async loadDescriptionValue(argument) {
|
|
127926
|
+
var _a, _b;
|
|
127927
|
+
if (argument == undefined) {
|
|
127928
|
+
return;
|
|
127929
|
+
}
|
|
127930
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
127931
|
+
this.loadOptionValue(argument);
|
|
127932
|
+
return;
|
|
127933
|
+
}
|
|
127934
|
+
const searchArgument = {
|
|
127935
|
+
mode: SearchMode.PREDICTIVE,
|
|
127936
|
+
argument
|
|
127937
|
+
};
|
|
127938
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
|
|
127939
|
+
if (source == undefined) {
|
|
127940
|
+
return;
|
|
127941
|
+
}
|
|
127942
|
+
if (source instanceof Promise) {
|
|
127943
|
+
source.then((result) => {
|
|
127944
|
+
this.setDescriptionValue(result);
|
|
127945
|
+
});
|
|
127946
|
+
}
|
|
127947
|
+
else {
|
|
127948
|
+
this.setDescriptionValue(source);
|
|
127949
|
+
}
|
|
127950
|
+
}
|
|
127951
|
+
setDescriptionValue(source) {
|
|
127952
|
+
const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
|
|
127953
|
+
if (value == undefined || !Object.keys(value).length) {
|
|
127954
|
+
this.showNoResultMessage();
|
|
127955
|
+
return;
|
|
127956
|
+
}
|
|
127957
|
+
this._lookupMode = true;
|
|
127958
|
+
this.value = value;
|
|
127959
|
+
}
|
|
127960
|
+
loadOptionValue(argument) {
|
|
127961
|
+
var _a;
|
|
127962
|
+
const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
|
|
127963
|
+
if (source != undefined) {
|
|
127964
|
+
this.selectOption(source);
|
|
127965
|
+
}
|
|
127966
|
+
else {
|
|
127967
|
+
this.showNoResultMessage();
|
|
127968
|
+
}
|
|
127969
|
+
}
|
|
127970
|
+
async showNoResultMessage() {
|
|
127971
|
+
this.clearSearch();
|
|
127972
|
+
ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
|
|
127973
|
+
}
|
|
127974
|
+
getFieldLabel() {
|
|
127975
|
+
var _a;
|
|
127976
|
+
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
|
|
127977
|
+
}
|
|
127978
|
+
resetOptions() {
|
|
127979
|
+
this.hideOptions();
|
|
127980
|
+
this._criteria = undefined;
|
|
127981
|
+
this._preSelection = undefined;
|
|
127982
|
+
this.updateVisibleOptions();
|
|
127983
|
+
}
|
|
127984
|
+
//---------------------------------------------
|
|
127985
|
+
// Lifecycle web component
|
|
127986
|
+
//---------------------------------------------
|
|
127987
|
+
componentWillLoad() {
|
|
127988
|
+
if (this.options === undefined) {
|
|
127989
|
+
this.options = [];
|
|
127990
|
+
const optionsTags = this.el.querySelectorAll("option");
|
|
127991
|
+
if (optionsTags) {
|
|
127992
|
+
optionsTags.forEach(e => {
|
|
127993
|
+
let label = e.innerText;
|
|
127994
|
+
let value = e.getAttribute("value");
|
|
127995
|
+
let details = e.getAttribute("details");
|
|
127996
|
+
if (!value) {
|
|
127997
|
+
value = label;
|
|
127998
|
+
}
|
|
127999
|
+
this.options.push({ label, value, details });
|
|
128000
|
+
e.hidden = true;
|
|
128001
|
+
});
|
|
128002
|
+
}
|
|
128003
|
+
}
|
|
128004
|
+
this.updateSource([]);
|
|
128005
|
+
}
|
|
128006
|
+
componentDidRender() {
|
|
128007
|
+
var _a;
|
|
128008
|
+
if (this._floatingID === undefined) {
|
|
128009
|
+
this._listWrapper.remove();
|
|
127163
128010
|
}
|
|
128011
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
128012
|
+
ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
128013
|
+
});
|
|
128014
|
+
this.validateDescriptionValue();
|
|
127164
128015
|
}
|
|
127165
128016
|
componentDidLoad() {
|
|
127166
|
-
CSSVarsUtils.applyVarsTextInput(this.
|
|
128017
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
128018
|
+
this.setInputValue(false);
|
|
128019
|
+
this._resizeObserver = new ResizeObserver((entries) => {
|
|
128020
|
+
window.requestAnimationFrame(() => {
|
|
128021
|
+
if (!Array.isArray(entries) || !entries.length)
|
|
128022
|
+
return;
|
|
128023
|
+
const { clientWidth } = this._listContainer;
|
|
128024
|
+
if (clientWidth > 0 && !!this._listWrapper) {
|
|
128025
|
+
this._listWrapper.style.width = `${clientWidth}px`;
|
|
128026
|
+
}
|
|
128027
|
+
});
|
|
128028
|
+
});
|
|
128029
|
+
}
|
|
128030
|
+
//---------------------------------------------
|
|
128031
|
+
// Event handlers
|
|
128032
|
+
//---------------------------------------------
|
|
128033
|
+
handlerIconClick() {
|
|
128034
|
+
this.loadOptions(SearchMode.ADVANCED);
|
|
128035
|
+
}
|
|
128036
|
+
buildNumberArgument(argument) {
|
|
128037
|
+
if (this.isTextSearch) {
|
|
128038
|
+
return NaN;
|
|
128039
|
+
}
|
|
128040
|
+
return Number(argument || undefined);
|
|
128041
|
+
}
|
|
128042
|
+
onTextInputChangeHandler(event) {
|
|
128043
|
+
var _a;
|
|
128044
|
+
this.clearDeboucingTimeout();
|
|
128045
|
+
if (this._startLoading) {
|
|
128046
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
128047
|
+
this.onTextInputChangeHandler(event);
|
|
128048
|
+
}, this._deboucingTime);
|
|
128049
|
+
return;
|
|
128050
|
+
}
|
|
128051
|
+
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
128052
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
128053
|
+
if (!this._criteria) {
|
|
128054
|
+
this._textInput.value = event.data || argument;
|
|
128055
|
+
}
|
|
128056
|
+
this._criteria = argument;
|
|
128057
|
+
if (argument) {
|
|
128058
|
+
this._showLoading = false;
|
|
128059
|
+
this.clearSource();
|
|
128060
|
+
if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
128061
|
+
this._showLoading = true;
|
|
128062
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
128063
|
+
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
128064
|
+
}, this._deboucingTime);
|
|
128065
|
+
this.showOptions();
|
|
128066
|
+
}
|
|
128067
|
+
else {
|
|
128068
|
+
this.hideOptions();
|
|
128069
|
+
}
|
|
128070
|
+
}
|
|
128071
|
+
else {
|
|
128072
|
+
this.hideOptions();
|
|
128073
|
+
this._showLoading = false;
|
|
128074
|
+
this.clearSource();
|
|
128075
|
+
}
|
|
128076
|
+
}
|
|
128077
|
+
clearDeboucingTimeout() {
|
|
128078
|
+
if (this._changeDeboucingTimeout) {
|
|
128079
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
128080
|
+
this._changeDeboucingTimeout = null;
|
|
128081
|
+
}
|
|
128082
|
+
}
|
|
128083
|
+
keyDownHandler(event) {
|
|
128084
|
+
this._tabPressed = false;
|
|
128085
|
+
if (event.ctrlKey) {
|
|
128086
|
+
if (event.key === "f" || event.key === "F") {
|
|
128087
|
+
this.loadOptions(SearchMode.ADVANCED);
|
|
128088
|
+
//ATENÇÃO: Ctrl + F tem ação específica nos browsers
|
|
128089
|
+
//nesse caso, como vamos abrir o popup de busca avançada,
|
|
128090
|
+
//não é interessante deixar o evento propagar;
|
|
128091
|
+
event.stopPropagation();
|
|
128092
|
+
event.stopImmediatePropagation();
|
|
128093
|
+
event.preventDefault();
|
|
128094
|
+
}
|
|
128095
|
+
}
|
|
128096
|
+
switch (event.key) {
|
|
128097
|
+
case "ArrowDown":
|
|
128098
|
+
this.nextOption();
|
|
128099
|
+
event.stopPropagation();
|
|
128100
|
+
break;
|
|
128101
|
+
case "ArrowUp":
|
|
128102
|
+
this.previousOption();
|
|
128103
|
+
event.stopPropagation();
|
|
128104
|
+
break;
|
|
128105
|
+
case "Enter":
|
|
128106
|
+
this.selectCurrentOption();
|
|
128107
|
+
break;
|
|
128108
|
+
case "Escape":
|
|
128109
|
+
this.cancelPreselection();
|
|
128110
|
+
break;
|
|
128111
|
+
case "Tab":
|
|
128112
|
+
this._tabPressed = true;
|
|
128113
|
+
this.controlListWithOnlyOne();
|
|
128114
|
+
break;
|
|
128115
|
+
}
|
|
128116
|
+
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
128117
|
+
//Por exemplo, quando o usuário dá um Enter, além de selecionar
|
|
128118
|
+
//um valor, também significa que a ateração finalizou,
|
|
128119
|
+
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
128120
|
+
//event.stopPropagation();
|
|
128121
|
+
}
|
|
128122
|
+
onTextInputFocusOutHandler() {
|
|
128123
|
+
if (this.hideErrorOnFocusOut)
|
|
128124
|
+
this.cancelPreselection();
|
|
128125
|
+
}
|
|
128126
|
+
canShowListOptions() {
|
|
128127
|
+
return !this._showLoading && this._visibleOptions.length > 0;
|
|
127167
128128
|
}
|
|
127168
128129
|
render() {
|
|
127169
|
-
|
|
127170
|
-
|
|
128130
|
+
var _a;
|
|
128131
|
+
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
128132
|
+
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)
|
|
128133
|
+
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
128134
|
+
: 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
|
|
128135
|
+
&& this._visibleOptions.length === 0
|
|
128136
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
128137
|
+
&& 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)))))));
|
|
127171
128138
|
}
|
|
127172
|
-
;
|
|
127173
|
-
get _elem() { return this; }
|
|
128139
|
+
get el() { return this; }
|
|
127174
128140
|
static get watchers() { return {
|
|
127175
128141
|
"errorMessage": ["observeErrorMessage"],
|
|
127176
|
-
"value": ["observeValue"]
|
|
128142
|
+
"value": ["observeValue"],
|
|
128143
|
+
"options": ["observeOptions"]
|
|
127177
128144
|
}; }
|
|
127178
128145
|
static get style() { return ezSearchCss; }
|
|
127179
128146
|
};
|
|
128147
|
+
var SearchMode;
|
|
128148
|
+
(function (SearchMode) {
|
|
128149
|
+
SearchMode["ADVANCED"] = "ADVANCED";
|
|
128150
|
+
SearchMode["PRELOAD"] = "PRELOAD";
|
|
128151
|
+
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
128152
|
+
})(SearchMode || (SearchMode = {}));
|
|
127180
128153
|
|
|
127181
128154
|
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}";
|
|
127182
128155
|
|
|
@@ -127264,6 +128237,788 @@ const EzSkeleton$1 = class extends HTMLElement$1 {
|
|
|
127264
128237
|
static get style() { return ezSkeletonCss; }
|
|
127265
128238
|
};
|
|
127266
128239
|
|
|
128240
|
+
const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);padding:var(--space--nano);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow)}";
|
|
128241
|
+
|
|
128242
|
+
const SplitItem = class extends HTMLElement$1 {
|
|
128243
|
+
constructor() {
|
|
128244
|
+
super();
|
|
128245
|
+
this.__registerHost();
|
|
128246
|
+
}
|
|
128247
|
+
render() {
|
|
128248
|
+
return (h(Host, { class: 'box_split-item' }));
|
|
128249
|
+
}
|
|
128250
|
+
static get style() { return ezSplitItemCss; }
|
|
128251
|
+
};
|
|
128252
|
+
|
|
128253
|
+
var numeric = function (value, unit) { return Number(value.slice(0, -1 * unit.length)); };
|
|
128254
|
+
|
|
128255
|
+
var parseValue = function (value) {
|
|
128256
|
+
if (value.endsWith('px'))
|
|
128257
|
+
{ return { value: value, type: 'px', numeric: numeric(value, 'px') } }
|
|
128258
|
+
if (value.endsWith('fr'))
|
|
128259
|
+
{ return { value: value, type: 'fr', numeric: numeric(value, 'fr') } }
|
|
128260
|
+
if (value.endsWith('%'))
|
|
128261
|
+
{ return { value: value, type: '%', numeric: numeric(value, '%') } }
|
|
128262
|
+
if (value === 'auto') { return { value: value, type: 'auto' } }
|
|
128263
|
+
return null
|
|
128264
|
+
};
|
|
128265
|
+
|
|
128266
|
+
var parse = function (rule) { return rule.split(' ').map(parseValue); };
|
|
128267
|
+
|
|
128268
|
+
var getSizeAtTrack = function (index, tracks, gap, end) {
|
|
128269
|
+
if ( gap === void 0 ) { gap = 0; }
|
|
128270
|
+
if ( end === void 0 ) { end = false; }
|
|
128271
|
+
|
|
128272
|
+
var newIndex = end ? index + 1 : index;
|
|
128273
|
+
var trackSum = tracks
|
|
128274
|
+
.slice(0, newIndex)
|
|
128275
|
+
.reduce(function (accum, value) { return accum + value.numeric; }, 0);
|
|
128276
|
+
var gapSum = gap ? index * gap : 0;
|
|
128277
|
+
|
|
128278
|
+
return trackSum + gapSum
|
|
128279
|
+
};
|
|
128280
|
+
|
|
128281
|
+
var getStyles = function (rule, ownRules, matchedRules) { return ownRules.concat( matchedRules)
|
|
128282
|
+
.map(function (r) { return r.style[rule]; })
|
|
128283
|
+
.filter(function (style) { return style !== undefined && style !== ''; }); };
|
|
128284
|
+
|
|
128285
|
+
var getGapValue = function (unit, size) {
|
|
128286
|
+
if (size.endsWith(unit)) {
|
|
128287
|
+
return Number(size.slice(0, -1 * unit.length))
|
|
128288
|
+
}
|
|
128289
|
+
return null
|
|
128290
|
+
};
|
|
128291
|
+
|
|
128292
|
+
var firstNonZero = function (tracks) {
|
|
128293
|
+
// eslint-disable-next-line no-plusplus
|
|
128294
|
+
for (var i = 0; i < tracks.length; i++) {
|
|
128295
|
+
if (tracks[i].numeric > 0) {
|
|
128296
|
+
return i
|
|
128297
|
+
}
|
|
128298
|
+
}
|
|
128299
|
+
return null
|
|
128300
|
+
};
|
|
128301
|
+
|
|
128302
|
+
var NOOP = function () { return false; };
|
|
128303
|
+
|
|
128304
|
+
var defaultWriteStyle = function (element, gridTemplateProp, style) {
|
|
128305
|
+
// eslint-disable-next-line no-param-reassign
|
|
128306
|
+
element.style[gridTemplateProp] = style;
|
|
128307
|
+
};
|
|
128308
|
+
|
|
128309
|
+
var getOption = function (options, propName, def) {
|
|
128310
|
+
var value = options[propName];
|
|
128311
|
+
if (value !== undefined) {
|
|
128312
|
+
return value
|
|
128313
|
+
}
|
|
128314
|
+
return def
|
|
128315
|
+
};
|
|
128316
|
+
|
|
128317
|
+
function getMatchedCSSRules (el) {
|
|
128318
|
+
var ref;
|
|
128319
|
+
|
|
128320
|
+
return (ref = [])
|
|
128321
|
+
.concat.apply(
|
|
128322
|
+
ref, Array.from(el.ownerDocument.styleSheets).map(function (s) {
|
|
128323
|
+
var rules = [];
|
|
128324
|
+
|
|
128325
|
+
try {
|
|
128326
|
+
rules = Array.from(s.cssRules || []);
|
|
128327
|
+
} catch (e) {
|
|
128328
|
+
// Ignore results on security error
|
|
128329
|
+
}
|
|
128330
|
+
|
|
128331
|
+
return rules
|
|
128332
|
+
})
|
|
128333
|
+
)
|
|
128334
|
+
.filter(function (r) {
|
|
128335
|
+
var matches = false;
|
|
128336
|
+
try {
|
|
128337
|
+
matches = el.matches(r.selectorText);
|
|
128338
|
+
} catch (e) {
|
|
128339
|
+
// Ignore matching erros
|
|
128340
|
+
}
|
|
128341
|
+
|
|
128342
|
+
return matches
|
|
128343
|
+
});
|
|
128344
|
+
}
|
|
128345
|
+
|
|
128346
|
+
var gridTemplatePropColumns = 'grid-template-columns';
|
|
128347
|
+
var gridTemplatePropRows = 'grid-template-rows';
|
|
128348
|
+
|
|
128349
|
+
var Gutter = function Gutter(direction, options, parentOptions) {
|
|
128350
|
+
this.direction = direction;
|
|
128351
|
+
this.element = options.element;
|
|
128352
|
+
this.track = options.track;
|
|
128353
|
+
|
|
128354
|
+
if (direction === 'column') {
|
|
128355
|
+
this.gridTemplateProp = gridTemplatePropColumns;
|
|
128356
|
+
this.gridGapProp = 'grid-column-gap';
|
|
128357
|
+
this.cursor = getOption(
|
|
128358
|
+
parentOptions,
|
|
128359
|
+
'columnCursor',
|
|
128360
|
+
getOption(parentOptions, 'cursor', 'col-resize')
|
|
128361
|
+
);
|
|
128362
|
+
this.snapOffset = getOption(
|
|
128363
|
+
parentOptions,
|
|
128364
|
+
'columnSnapOffset',
|
|
128365
|
+
getOption(parentOptions, 'snapOffset', 30)
|
|
128366
|
+
);
|
|
128367
|
+
this.dragInterval = getOption(
|
|
128368
|
+
parentOptions,
|
|
128369
|
+
'columnDragInterval',
|
|
128370
|
+
getOption(parentOptions, 'dragInterval', 1)
|
|
128371
|
+
);
|
|
128372
|
+
this.clientAxis = 'clientX';
|
|
128373
|
+
this.optionStyle = getOption(parentOptions, 'gridTemplateColumns');
|
|
128374
|
+
} else if (direction === 'row') {
|
|
128375
|
+
this.gridTemplateProp = gridTemplatePropRows;
|
|
128376
|
+
this.gridGapProp = 'grid-row-gap';
|
|
128377
|
+
this.cursor = getOption(
|
|
128378
|
+
parentOptions,
|
|
128379
|
+
'rowCursor',
|
|
128380
|
+
getOption(parentOptions, 'cursor', 'row-resize')
|
|
128381
|
+
);
|
|
128382
|
+
this.snapOffset = getOption(
|
|
128383
|
+
parentOptions,
|
|
128384
|
+
'rowSnapOffset',
|
|
128385
|
+
getOption(parentOptions, 'snapOffset', 30)
|
|
128386
|
+
);
|
|
128387
|
+
this.dragInterval = getOption(
|
|
128388
|
+
parentOptions,
|
|
128389
|
+
'rowDragInterval',
|
|
128390
|
+
getOption(parentOptions, 'dragInterval', 1)
|
|
128391
|
+
);
|
|
128392
|
+
this.clientAxis = 'clientY';
|
|
128393
|
+
this.optionStyle = getOption(parentOptions, 'gridTemplateRows');
|
|
128394
|
+
}
|
|
128395
|
+
|
|
128396
|
+
this.onDragStart = getOption(parentOptions, 'onDragStart', NOOP);
|
|
128397
|
+
this.onDragEnd = getOption(parentOptions, 'onDragEnd', NOOP);
|
|
128398
|
+
this.onDrag = getOption(parentOptions, 'onDrag', NOOP);
|
|
128399
|
+
this.writeStyle = getOption(
|
|
128400
|
+
parentOptions,
|
|
128401
|
+
'writeStyle',
|
|
128402
|
+
defaultWriteStyle
|
|
128403
|
+
);
|
|
128404
|
+
|
|
128405
|
+
this.startDragging = this.startDragging.bind(this);
|
|
128406
|
+
this.stopDragging = this.stopDragging.bind(this);
|
|
128407
|
+
this.drag = this.drag.bind(this);
|
|
128408
|
+
|
|
128409
|
+
this.minSizeStart = options.minSizeStart;
|
|
128410
|
+
this.minSizeEnd = options.minSizeEnd;
|
|
128411
|
+
|
|
128412
|
+
if (options.element) {
|
|
128413
|
+
this.element.addEventListener('mousedown', this.startDragging);
|
|
128414
|
+
this.element.addEventListener('touchstart', this.startDragging);
|
|
128415
|
+
}
|
|
128416
|
+
};
|
|
128417
|
+
|
|
128418
|
+
Gutter.prototype.getDimensions = function getDimensions () {
|
|
128419
|
+
var ref = this.grid.getBoundingClientRect();
|
|
128420
|
+
var width = ref.width;
|
|
128421
|
+
var height = ref.height;
|
|
128422
|
+
var top = ref.top;
|
|
128423
|
+
var bottom = ref.bottom;
|
|
128424
|
+
var left = ref.left;
|
|
128425
|
+
var right = ref.right;
|
|
128426
|
+
|
|
128427
|
+
if (this.direction === 'column') {
|
|
128428
|
+
this.start = top;
|
|
128429
|
+
this.end = bottom;
|
|
128430
|
+
this.size = height;
|
|
128431
|
+
} else if (this.direction === 'row') {
|
|
128432
|
+
this.start = left;
|
|
128433
|
+
this.end = right;
|
|
128434
|
+
this.size = width;
|
|
128435
|
+
}
|
|
128436
|
+
};
|
|
128437
|
+
|
|
128438
|
+
Gutter.prototype.getSizeAtTrack = function getSizeAtTrack$1 (track, end) {
|
|
128439
|
+
return getSizeAtTrack(
|
|
128440
|
+
track,
|
|
128441
|
+
this.computedPixels,
|
|
128442
|
+
this.computedGapPixels,
|
|
128443
|
+
end
|
|
128444
|
+
)
|
|
128445
|
+
};
|
|
128446
|
+
|
|
128447
|
+
Gutter.prototype.getSizeOfTrack = function getSizeOfTrack (track) {
|
|
128448
|
+
return this.computedPixels[track].numeric
|
|
128449
|
+
};
|
|
128450
|
+
|
|
128451
|
+
Gutter.prototype.getRawTracks = function getRawTracks () {
|
|
128452
|
+
var tracks = getStyles(
|
|
128453
|
+
this.gridTemplateProp,
|
|
128454
|
+
[this.grid],
|
|
128455
|
+
getMatchedCSSRules(this.grid)
|
|
128456
|
+
);
|
|
128457
|
+
if (!tracks.length) {
|
|
128458
|
+
if (this.optionStyle) { return this.optionStyle }
|
|
128459
|
+
|
|
128460
|
+
throw Error('Unable to determine grid template tracks from styles.')
|
|
128461
|
+
}
|
|
128462
|
+
return tracks[0]
|
|
128463
|
+
};
|
|
128464
|
+
|
|
128465
|
+
Gutter.prototype.getGap = function getGap () {
|
|
128466
|
+
var gap = getStyles(
|
|
128467
|
+
this.gridGapProp,
|
|
128468
|
+
[this.grid],
|
|
128469
|
+
getMatchedCSSRules(this.grid)
|
|
128470
|
+
);
|
|
128471
|
+
if (!gap.length) {
|
|
128472
|
+
return null
|
|
128473
|
+
}
|
|
128474
|
+
return gap[0]
|
|
128475
|
+
};
|
|
128476
|
+
|
|
128477
|
+
Gutter.prototype.getRawComputedTracks = function getRawComputedTracks () {
|
|
128478
|
+
return window.getComputedStyle(this.grid)[this.gridTemplateProp]
|
|
128479
|
+
};
|
|
128480
|
+
|
|
128481
|
+
Gutter.prototype.getRawComputedGap = function getRawComputedGap () {
|
|
128482
|
+
return window.getComputedStyle(this.grid)[this.gridGapProp]
|
|
128483
|
+
};
|
|
128484
|
+
|
|
128485
|
+
Gutter.prototype.setTracks = function setTracks (raw) {
|
|
128486
|
+
this.tracks = raw.split(' ');
|
|
128487
|
+
this.trackValues = parse(raw);
|
|
128488
|
+
};
|
|
128489
|
+
|
|
128490
|
+
Gutter.prototype.setComputedTracks = function setComputedTracks (raw) {
|
|
128491
|
+
this.computedTracks = raw.split(' ');
|
|
128492
|
+
this.computedPixels = parse(raw);
|
|
128493
|
+
};
|
|
128494
|
+
|
|
128495
|
+
Gutter.prototype.setGap = function setGap (raw) {
|
|
128496
|
+
this.gap = raw;
|
|
128497
|
+
};
|
|
128498
|
+
|
|
128499
|
+
Gutter.prototype.setComputedGap = function setComputedGap (raw) {
|
|
128500
|
+
this.computedGap = raw;
|
|
128501
|
+
this.computedGapPixels = getGapValue('px', this.computedGap) || 0;
|
|
128502
|
+
};
|
|
128503
|
+
|
|
128504
|
+
Gutter.prototype.getMousePosition = function getMousePosition (e) {
|
|
128505
|
+
if ('touches' in e) { return e.touches[0][this.clientAxis] }
|
|
128506
|
+
return e[this.clientAxis]
|
|
128507
|
+
};
|
|
128508
|
+
|
|
128509
|
+
Gutter.prototype.startDragging = function startDragging (e) {
|
|
128510
|
+
if ('button' in e && e.button !== 0) {
|
|
128511
|
+
return
|
|
128512
|
+
}
|
|
128513
|
+
|
|
128514
|
+
// Don't actually drag the element. We emulate that in the drag function.
|
|
128515
|
+
e.preventDefault();
|
|
128516
|
+
|
|
128517
|
+
if (this.element) {
|
|
128518
|
+
this.grid = this.element.parentNode;
|
|
128519
|
+
} else {
|
|
128520
|
+
this.grid = e.target.parentNode;
|
|
128521
|
+
}
|
|
128522
|
+
|
|
128523
|
+
this.getDimensions();
|
|
128524
|
+
this.setTracks(this.getRawTracks());
|
|
128525
|
+
this.setComputedTracks(this.getRawComputedTracks());
|
|
128526
|
+
this.setGap(this.getGap());
|
|
128527
|
+
this.setComputedGap(this.getRawComputedGap());
|
|
128528
|
+
|
|
128529
|
+
var trackPercentage = this.trackValues.filter(
|
|
128530
|
+
function (track) { return track.type === '%'; }
|
|
128531
|
+
);
|
|
128532
|
+
var trackFr = this.trackValues.filter(function (track) { return track.type === 'fr'; });
|
|
128533
|
+
|
|
128534
|
+
this.totalFrs = trackFr.length;
|
|
128535
|
+
|
|
128536
|
+
if (this.totalFrs) {
|
|
128537
|
+
var track = firstNonZero(trackFr);
|
|
128538
|
+
|
|
128539
|
+
if (track !== null) {
|
|
128540
|
+
this.frToPixels =
|
|
128541
|
+
this.computedPixels[track].numeric / trackFr[track].numeric;
|
|
128542
|
+
}
|
|
128543
|
+
}
|
|
128544
|
+
|
|
128545
|
+
if (trackPercentage.length) {
|
|
128546
|
+
var track$1 = firstNonZero(trackPercentage);
|
|
128547
|
+
|
|
128548
|
+
if (track$1 !== null) {
|
|
128549
|
+
this.percentageToPixels =
|
|
128550
|
+
this.computedPixels[track$1].numeric /
|
|
128551
|
+
trackPercentage[track$1].numeric;
|
|
128552
|
+
}
|
|
128553
|
+
}
|
|
128554
|
+
|
|
128555
|
+
// get start of gutter track
|
|
128556
|
+
var gutterStart = this.getSizeAtTrack(this.track, false) + this.start;
|
|
128557
|
+
this.dragStartOffset = this.getMousePosition(e) - gutterStart;
|
|
128558
|
+
|
|
128559
|
+
this.aTrack = this.track - 1;
|
|
128560
|
+
|
|
128561
|
+
if (this.track < this.tracks.length - 1) {
|
|
128562
|
+
this.bTrack = this.track + 1;
|
|
128563
|
+
} else {
|
|
128564
|
+
throw Error(
|
|
128565
|
+
("Invalid track index: " + (this.track) + ". Track must be between two other tracks and only " + (this.tracks.length) + " tracks were found.")
|
|
128566
|
+
)
|
|
128567
|
+
}
|
|
128568
|
+
|
|
128569
|
+
this.aTrackStart = this.getSizeAtTrack(this.aTrack, false) + this.start;
|
|
128570
|
+
this.bTrackEnd = this.getSizeAtTrack(this.bTrack, true) + this.start;
|
|
128571
|
+
|
|
128572
|
+
// Set the dragging property of the pair object.
|
|
128573
|
+
this.dragging = true;
|
|
128574
|
+
|
|
128575
|
+
// All the binding. `window` gets the stop events in case we drag out of the elements.
|
|
128576
|
+
window.addEventListener('mouseup', this.stopDragging);
|
|
128577
|
+
window.addEventListener('touchend', this.stopDragging);
|
|
128578
|
+
window.addEventListener('touchcancel', this.stopDragging);
|
|
128579
|
+
window.addEventListener('mousemove', this.drag);
|
|
128580
|
+
window.addEventListener('touchmove', this.drag);
|
|
128581
|
+
|
|
128582
|
+
// Disable selection. Disable!
|
|
128583
|
+
this.grid.addEventListener('selectstart', NOOP);
|
|
128584
|
+
this.grid.addEventListener('dragstart', NOOP);
|
|
128585
|
+
|
|
128586
|
+
this.grid.style.userSelect = 'none';
|
|
128587
|
+
this.grid.style.webkitUserSelect = 'none';
|
|
128588
|
+
this.grid.style.MozUserSelect = 'none';
|
|
128589
|
+
this.grid.style.pointerEvents = 'none';
|
|
128590
|
+
|
|
128591
|
+
// Set the cursor at multiple levels
|
|
128592
|
+
this.grid.style.cursor = this.cursor;
|
|
128593
|
+
window.document.body.style.cursor = this.cursor;
|
|
128594
|
+
|
|
128595
|
+
this.onDragStart(this.direction, this.track);
|
|
128596
|
+
};
|
|
128597
|
+
|
|
128598
|
+
Gutter.prototype.stopDragging = function stopDragging () {
|
|
128599
|
+
this.dragging = false;
|
|
128600
|
+
|
|
128601
|
+
// Remove the stored event listeners. This is why we store them.
|
|
128602
|
+
this.cleanup();
|
|
128603
|
+
|
|
128604
|
+
this.onDragEnd(this.direction, this.track);
|
|
128605
|
+
|
|
128606
|
+
if (this.needsDestroy) {
|
|
128607
|
+
if (this.element) {
|
|
128608
|
+
this.element.removeEventListener(
|
|
128609
|
+
'mousedown',
|
|
128610
|
+
this.startDragging
|
|
128611
|
+
);
|
|
128612
|
+
this.element.removeEventListener(
|
|
128613
|
+
'touchstart',
|
|
128614
|
+
this.startDragging
|
|
128615
|
+
);
|
|
128616
|
+
}
|
|
128617
|
+
this.destroyCb();
|
|
128618
|
+
this.needsDestroy = false;
|
|
128619
|
+
this.destroyCb = null;
|
|
128620
|
+
}
|
|
128621
|
+
};
|
|
128622
|
+
|
|
128623
|
+
Gutter.prototype.drag = function drag (e) {
|
|
128624
|
+
var mousePosition = this.getMousePosition(e);
|
|
128625
|
+
|
|
128626
|
+
var gutterSize = this.getSizeOfTrack(this.track);
|
|
128627
|
+
var minMousePosition =
|
|
128628
|
+
this.aTrackStart +
|
|
128629
|
+
this.minSizeStart +
|
|
128630
|
+
this.dragStartOffset +
|
|
128631
|
+
this.computedGapPixels;
|
|
128632
|
+
var maxMousePosition =
|
|
128633
|
+
this.bTrackEnd -
|
|
128634
|
+
this.minSizeEnd -
|
|
128635
|
+
this.computedGapPixels -
|
|
128636
|
+
(gutterSize - this.dragStartOffset);
|
|
128637
|
+
var minMousePositionOffset = minMousePosition + this.snapOffset;
|
|
128638
|
+
var maxMousePositionOffset = maxMousePosition - this.snapOffset;
|
|
128639
|
+
|
|
128640
|
+
if (mousePosition < minMousePositionOffset) {
|
|
128641
|
+
mousePosition = minMousePosition;
|
|
128642
|
+
}
|
|
128643
|
+
|
|
128644
|
+
if (mousePosition > maxMousePositionOffset) {
|
|
128645
|
+
mousePosition = maxMousePosition;
|
|
128646
|
+
}
|
|
128647
|
+
|
|
128648
|
+
if (mousePosition < minMousePosition) {
|
|
128649
|
+
mousePosition = minMousePosition;
|
|
128650
|
+
} else if (mousePosition > maxMousePosition) {
|
|
128651
|
+
mousePosition = maxMousePosition;
|
|
128652
|
+
}
|
|
128653
|
+
|
|
128654
|
+
var aTrackSize =
|
|
128655
|
+
mousePosition -
|
|
128656
|
+
this.aTrackStart -
|
|
128657
|
+
this.dragStartOffset -
|
|
128658
|
+
this.computedGapPixels;
|
|
128659
|
+
var bTrackSize =
|
|
128660
|
+
this.bTrackEnd -
|
|
128661
|
+
mousePosition +
|
|
128662
|
+
this.dragStartOffset -
|
|
128663
|
+
gutterSize -
|
|
128664
|
+
this.computedGapPixels;
|
|
128665
|
+
|
|
128666
|
+
if (this.dragInterval > 1) {
|
|
128667
|
+
var aTrackSizeIntervaled =
|
|
128668
|
+
Math.round(aTrackSize / this.dragInterval) * this.dragInterval;
|
|
128669
|
+
bTrackSize -= aTrackSizeIntervaled - aTrackSize;
|
|
128670
|
+
aTrackSize = aTrackSizeIntervaled;
|
|
128671
|
+
}
|
|
128672
|
+
|
|
128673
|
+
if (aTrackSize < this.minSizeStart) {
|
|
128674
|
+
aTrackSize = this.minSizeStart;
|
|
128675
|
+
}
|
|
128676
|
+
|
|
128677
|
+
if (bTrackSize < this.minSizeEnd) {
|
|
128678
|
+
bTrackSize = this.minSizeEnd;
|
|
128679
|
+
}
|
|
128680
|
+
|
|
128681
|
+
if (this.trackValues[this.aTrack].type === 'px') {
|
|
128682
|
+
this.tracks[this.aTrack] = aTrackSize + "px";
|
|
128683
|
+
} else if (this.trackValues[this.aTrack].type === 'fr') {
|
|
128684
|
+
if (this.totalFrs === 1) {
|
|
128685
|
+
this.tracks[this.aTrack] = '1fr';
|
|
128686
|
+
} else {
|
|
128687
|
+
var targetFr = aTrackSize / this.frToPixels;
|
|
128688
|
+
this.tracks[this.aTrack] = targetFr + "fr";
|
|
128689
|
+
}
|
|
128690
|
+
} else if (this.trackValues[this.aTrack].type === '%') {
|
|
128691
|
+
var targetPercentage = aTrackSize / this.percentageToPixels;
|
|
128692
|
+
this.tracks[this.aTrack] = targetPercentage + "%";
|
|
128693
|
+
}
|
|
128694
|
+
|
|
128695
|
+
if (this.trackValues[this.bTrack].type === 'px') {
|
|
128696
|
+
this.tracks[this.bTrack] = bTrackSize + "px";
|
|
128697
|
+
} else if (this.trackValues[this.bTrack].type === 'fr') {
|
|
128698
|
+
if (this.totalFrs === 1) {
|
|
128699
|
+
this.tracks[this.bTrack] = '1fr';
|
|
128700
|
+
} else {
|
|
128701
|
+
var targetFr$1 = bTrackSize / this.frToPixels;
|
|
128702
|
+
this.tracks[this.bTrack] = targetFr$1 + "fr";
|
|
128703
|
+
}
|
|
128704
|
+
} else if (this.trackValues[this.bTrack].type === '%') {
|
|
128705
|
+
var targetPercentage$1 = bTrackSize / this.percentageToPixels;
|
|
128706
|
+
this.tracks[this.bTrack] = targetPercentage$1 + "%";
|
|
128707
|
+
}
|
|
128708
|
+
|
|
128709
|
+
var style = this.tracks.join(' ');
|
|
128710
|
+
this.writeStyle(this.grid, this.gridTemplateProp, style);
|
|
128711
|
+
this.onDrag(this.direction, this.track, style);
|
|
128712
|
+
};
|
|
128713
|
+
|
|
128714
|
+
Gutter.prototype.cleanup = function cleanup () {
|
|
128715
|
+
window.removeEventListener('mouseup', this.stopDragging);
|
|
128716
|
+
window.removeEventListener('touchend', this.stopDragging);
|
|
128717
|
+
window.removeEventListener('touchcancel', this.stopDragging);
|
|
128718
|
+
window.removeEventListener('mousemove', this.drag);
|
|
128719
|
+
window.removeEventListener('touchmove', this.drag);
|
|
128720
|
+
|
|
128721
|
+
if (this.grid) {
|
|
128722
|
+
this.grid.removeEventListener('selectstart', NOOP);
|
|
128723
|
+
this.grid.removeEventListener('dragstart', NOOP);
|
|
128724
|
+
|
|
128725
|
+
this.grid.style.userSelect = '';
|
|
128726
|
+
this.grid.style.webkitUserSelect = '';
|
|
128727
|
+
this.grid.style.MozUserSelect = '';
|
|
128728
|
+
this.grid.style.pointerEvents = '';
|
|
128729
|
+
|
|
128730
|
+
this.grid.style.cursor = '';
|
|
128731
|
+
}
|
|
128732
|
+
|
|
128733
|
+
window.document.body.style.cursor = '';
|
|
128734
|
+
};
|
|
128735
|
+
|
|
128736
|
+
Gutter.prototype.destroy = function destroy (immediate, cb) {
|
|
128737
|
+
if ( immediate === void 0 ) immediate = true;
|
|
128738
|
+
|
|
128739
|
+
if (immediate || this.dragging === false) {
|
|
128740
|
+
this.cleanup();
|
|
128741
|
+
if (this.element) {
|
|
128742
|
+
this.element.removeEventListener(
|
|
128743
|
+
'mousedown',
|
|
128744
|
+
this.startDragging
|
|
128745
|
+
);
|
|
128746
|
+
this.element.removeEventListener(
|
|
128747
|
+
'touchstart',
|
|
128748
|
+
this.startDragging
|
|
128749
|
+
);
|
|
128750
|
+
}
|
|
128751
|
+
|
|
128752
|
+
if (cb) {
|
|
128753
|
+
cb();
|
|
128754
|
+
}
|
|
128755
|
+
} else {
|
|
128756
|
+
this.needsDestroy = true;
|
|
128757
|
+
if (cb) {
|
|
128758
|
+
this.destroyCb = cb;
|
|
128759
|
+
}
|
|
128760
|
+
}
|
|
128761
|
+
};
|
|
128762
|
+
|
|
128763
|
+
var getTrackOption = function (options, track, defaultValue) {
|
|
128764
|
+
if (track in options) {
|
|
128765
|
+
return options[track]
|
|
128766
|
+
}
|
|
128767
|
+
|
|
128768
|
+
return defaultValue
|
|
128769
|
+
};
|
|
128770
|
+
|
|
128771
|
+
var createGutter = function (direction, options) { return function (gutterOptions) {
|
|
128772
|
+
if (gutterOptions.track < 1) {
|
|
128773
|
+
throw Error(
|
|
128774
|
+
("Invalid track index: " + (gutterOptions.track) + ". Track must be between two other tracks.")
|
|
128775
|
+
)
|
|
128776
|
+
}
|
|
128777
|
+
|
|
128778
|
+
var trackMinSizes =
|
|
128779
|
+
direction === 'column'
|
|
128780
|
+
? options.columnMinSizes || {}
|
|
128781
|
+
: options.rowMinSizes || {};
|
|
128782
|
+
var trackMinSize = direction === 'column' ? 'columnMinSize' : 'rowMinSize';
|
|
128783
|
+
|
|
128784
|
+
return new Gutter(
|
|
128785
|
+
direction,
|
|
128786
|
+
Object.assign({}, {minSizeStart: getTrackOption(
|
|
128787
|
+
trackMinSizes,
|
|
128788
|
+
gutterOptions.track - 1,
|
|
128789
|
+
getOption(
|
|
128790
|
+
options,
|
|
128791
|
+
trackMinSize,
|
|
128792
|
+
getOption(options, 'minSize', 0)
|
|
128793
|
+
)
|
|
128794
|
+
),
|
|
128795
|
+
minSizeEnd: getTrackOption(
|
|
128796
|
+
trackMinSizes,
|
|
128797
|
+
gutterOptions.track + 1,
|
|
128798
|
+
getOption(
|
|
128799
|
+
options,
|
|
128800
|
+
trackMinSize,
|
|
128801
|
+
getOption(options, 'minSize', 0)
|
|
128802
|
+
)
|
|
128803
|
+
)},
|
|
128804
|
+
gutterOptions),
|
|
128805
|
+
options
|
|
128806
|
+
)
|
|
128807
|
+
}; };
|
|
128808
|
+
|
|
128809
|
+
var Grid = function Grid(options) {
|
|
128810
|
+
var this$1 = this;
|
|
128811
|
+
|
|
128812
|
+
this.columnGutters = {};
|
|
128813
|
+
this.rowGutters = {};
|
|
128814
|
+
|
|
128815
|
+
this.options = Object.assign({}, {columnGutters: options.columnGutters || [],
|
|
128816
|
+
rowGutters: options.rowGutters || [],
|
|
128817
|
+
columnMinSizes: options.columnMinSizes || {},
|
|
128818
|
+
rowMinSizes: options.rowMinSizes || {}},
|
|
128819
|
+
options);
|
|
128820
|
+
|
|
128821
|
+
this.options.columnGutters.forEach(function (gutterOptions) {
|
|
128822
|
+
this$1.columnGutters[gutterOptions.track] = createGutter(
|
|
128823
|
+
'column',
|
|
128824
|
+
this$1.options
|
|
128825
|
+
)(gutterOptions);
|
|
128826
|
+
});
|
|
128827
|
+
|
|
128828
|
+
this.options.rowGutters.forEach(function (gutterOptions) {
|
|
128829
|
+
this$1.rowGutters[gutterOptions.track] = createGutter(
|
|
128830
|
+
'row',
|
|
128831
|
+
this$1.options
|
|
128832
|
+
)(gutterOptions);
|
|
128833
|
+
});
|
|
128834
|
+
};
|
|
128835
|
+
|
|
128836
|
+
Grid.prototype.addColumnGutter = function addColumnGutter (element, track) {
|
|
128837
|
+
if (this.columnGutters[track]) {
|
|
128838
|
+
this.columnGutters[track].destroy();
|
|
128839
|
+
}
|
|
128840
|
+
|
|
128841
|
+
this.columnGutters[track] = createGutter(
|
|
128842
|
+
'column',
|
|
128843
|
+
this.options
|
|
128844
|
+
)({
|
|
128845
|
+
element: element,
|
|
128846
|
+
track: track,
|
|
128847
|
+
});
|
|
128848
|
+
};
|
|
128849
|
+
|
|
128850
|
+
Grid.prototype.addRowGutter = function addRowGutter (element, track) {
|
|
128851
|
+
if (this.rowGutters[track]) {
|
|
128852
|
+
this.rowGutters[track].destroy();
|
|
128853
|
+
}
|
|
128854
|
+
|
|
128855
|
+
this.rowGutters[track] = createGutter(
|
|
128856
|
+
'row',
|
|
128857
|
+
this.options
|
|
128858
|
+
)({
|
|
128859
|
+
element: element,
|
|
128860
|
+
track: track,
|
|
128861
|
+
});
|
|
128862
|
+
};
|
|
128863
|
+
|
|
128864
|
+
Grid.prototype.removeColumnGutter = function removeColumnGutter (track, immediate) {
|
|
128865
|
+
var this$1 = this;
|
|
128866
|
+
if ( immediate === void 0 ) immediate = true;
|
|
128867
|
+
|
|
128868
|
+
if (this.columnGutters[track]) {
|
|
128869
|
+
this.columnGutters[track].destroy(immediate, function () {
|
|
128870
|
+
delete this$1.columnGutters[track];
|
|
128871
|
+
});
|
|
128872
|
+
}
|
|
128873
|
+
};
|
|
128874
|
+
|
|
128875
|
+
Grid.prototype.removeRowGutter = function removeRowGutter (track, immediate) {
|
|
128876
|
+
var this$1 = this;
|
|
128877
|
+
if ( immediate === void 0 ) immediate = true;
|
|
128878
|
+
|
|
128879
|
+
if (this.rowGutters[track]) {
|
|
128880
|
+
this.rowGutters[track].destroy(immediate, function () {
|
|
128881
|
+
delete this$1.rowGutters[track];
|
|
128882
|
+
});
|
|
128883
|
+
}
|
|
128884
|
+
};
|
|
128885
|
+
|
|
128886
|
+
Grid.prototype.handleDragStart = function handleDragStart (e, direction, track) {
|
|
128887
|
+
if (direction === 'column') {
|
|
128888
|
+
if (this.columnGutters[track]) {
|
|
128889
|
+
this.columnGutters[track].destroy();
|
|
128890
|
+
}
|
|
128891
|
+
|
|
128892
|
+
this.columnGutters[track] = createGutter(
|
|
128893
|
+
'column',
|
|
128894
|
+
this.options
|
|
128895
|
+
)({
|
|
128896
|
+
track: track,
|
|
128897
|
+
});
|
|
128898
|
+
this.columnGutters[track].startDragging(e);
|
|
128899
|
+
} else if (direction === 'row') {
|
|
128900
|
+
if (this.rowGutters[track]) {
|
|
128901
|
+
this.rowGutters[track].destroy();
|
|
128902
|
+
}
|
|
128903
|
+
|
|
128904
|
+
this.rowGutters[track] = createGutter(
|
|
128905
|
+
'row',
|
|
128906
|
+
this.options
|
|
128907
|
+
)({
|
|
128908
|
+
track: track,
|
|
128909
|
+
});
|
|
128910
|
+
this.rowGutters[track].startDragging(e);
|
|
128911
|
+
}
|
|
128912
|
+
};
|
|
128913
|
+
|
|
128914
|
+
Grid.prototype.destroy = function destroy (immediate) {
|
|
128915
|
+
var this$1 = this;
|
|
128916
|
+
if ( immediate === void 0 ) immediate = true;
|
|
128917
|
+
|
|
128918
|
+
Object.keys(this.columnGutters).forEach(function (track) { return this$1.columnGutters[track].destroy(immediate, function () {
|
|
128919
|
+
delete this$1.columnGutters[track];
|
|
128920
|
+
}); }
|
|
128921
|
+
);
|
|
128922
|
+
Object.keys(this.rowGutters).forEach(function (track) { return this$1.rowGutters[track].destroy(immediate, function () {
|
|
128923
|
+
delete this$1.rowGutters[track];
|
|
128924
|
+
}); }
|
|
128925
|
+
);
|
|
128926
|
+
};
|
|
128927
|
+
|
|
128928
|
+
function index (options) { return new Grid(options); }
|
|
128929
|
+
|
|
128930
|
+
const ezSplitPanelCss = ".ez-split-gutter{cursor:grab;background-color:transparent}";
|
|
128931
|
+
|
|
128932
|
+
const SplitPanel = class extends HTMLElement$1 {
|
|
128933
|
+
constructor() {
|
|
128934
|
+
super();
|
|
128935
|
+
this.__registerHost();
|
|
128936
|
+
this._items = [];
|
|
128937
|
+
this.direction = 'column';
|
|
128938
|
+
}
|
|
128939
|
+
componentDidLoad() {
|
|
128940
|
+
this._panelID = StringUtils$1.generateUUID();
|
|
128941
|
+
this._element.dataset.panelId = this._panelID;
|
|
128942
|
+
let itemsElements = Array.from(this._element.children);
|
|
128943
|
+
this._items = itemsElements.filter(child => { var _a; return ((_a = child.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'EZ-SPLIT-ITEM'; });
|
|
128944
|
+
let trackCount = 1;
|
|
128945
|
+
this._items.forEach((item, index) => {
|
|
128946
|
+
item.dataset.trackNumber = trackCount.toString();
|
|
128947
|
+
if (this._items.length > 1 && index != this._items.length - 1) {
|
|
128948
|
+
this.addItemGutter(item);
|
|
128949
|
+
}
|
|
128950
|
+
trackCount += 2;
|
|
128951
|
+
});
|
|
128952
|
+
this.initSplit();
|
|
128953
|
+
}
|
|
128954
|
+
initSplit() {
|
|
128955
|
+
if (!this._items.length) {
|
|
128956
|
+
return;
|
|
128957
|
+
}
|
|
128958
|
+
this._element.style[this.direction == 'row' ? 'grid-template-rows' : 'grid-template-columns'] = this.getGridTemplate();
|
|
128959
|
+
index(this.getGutters());
|
|
128960
|
+
}
|
|
128961
|
+
getGutters() {
|
|
128962
|
+
const gutters = {
|
|
128963
|
+
columnGutters: [],
|
|
128964
|
+
rowGutters: []
|
|
128965
|
+
};
|
|
128966
|
+
if (!this._items.length) {
|
|
128967
|
+
return gutters;
|
|
128968
|
+
}
|
|
128969
|
+
const proToChange = this.direction == 'row' ? 'rowGutters' : 'columnGutters';
|
|
128970
|
+
this._items.forEach((item, index) => {
|
|
128971
|
+
if (index == this._items.length - 1)
|
|
128972
|
+
return;
|
|
128973
|
+
let gutterTrack = item.dataset.trackNumber;
|
|
128974
|
+
if (index === (this._items.length - 1)) {
|
|
128975
|
+
gutterTrack = this._items.length.toString();
|
|
128976
|
+
}
|
|
128977
|
+
gutters[proToChange].push({
|
|
128978
|
+
track: Number(gutterTrack),
|
|
128979
|
+
element: this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${item.dataset.trackNumber}"]`)
|
|
128980
|
+
});
|
|
128981
|
+
});
|
|
128982
|
+
return gutters;
|
|
128983
|
+
}
|
|
128984
|
+
addItemGutter(item) {
|
|
128985
|
+
const gutter = document.createElement('div');
|
|
128986
|
+
gutter.classList.add("ez-split-gutter");
|
|
128987
|
+
gutter.classList.add(this.direction);
|
|
128988
|
+
gutter.dataset.itemTrack = `${item.dataset.trackNumber}`;
|
|
128989
|
+
gutter.dataset.trackNumber = (Number(item.dataset.trackNumber) + 1).toString();
|
|
128990
|
+
item.parentNode.insertBefore(gutter, item.nextSibling);
|
|
128991
|
+
}
|
|
128992
|
+
getElementStyle() {
|
|
128993
|
+
const style = {
|
|
128994
|
+
'display': "grid",
|
|
128995
|
+
'height': '100%',
|
|
128996
|
+
'width': '100%'
|
|
128997
|
+
};
|
|
128998
|
+
return style;
|
|
128999
|
+
}
|
|
129000
|
+
getGridTemplate() {
|
|
129001
|
+
let template = '';
|
|
129002
|
+
this._items.forEach((_col, index) => {
|
|
129003
|
+
if (index === this._items.length - 1) {
|
|
129004
|
+
template += ` 1fr`;
|
|
129005
|
+
return;
|
|
129006
|
+
}
|
|
129007
|
+
if (index === 0) {
|
|
129008
|
+
template += `1fr 5px`;
|
|
129009
|
+
return;
|
|
129010
|
+
}
|
|
129011
|
+
template += ` 1fr 5px`;
|
|
129012
|
+
});
|
|
129013
|
+
return template;
|
|
129014
|
+
}
|
|
129015
|
+
render() {
|
|
129016
|
+
return (h(Host, { style: this.getElementStyle() }));
|
|
129017
|
+
}
|
|
129018
|
+
get _element() { return this; }
|
|
129019
|
+
static get style() { return ezSplitPanelCss; }
|
|
129020
|
+
};
|
|
129021
|
+
|
|
127267
129022
|
const ezTabselectorCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--tabselector--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;background-color:unset;min-width:100px;max-width:260px;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Roboto\");font-size:var(--title--small, 14px);flex-shrink:0}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:\"\";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}";
|
|
127268
129023
|
|
|
127269
129024
|
const EzTabselector$1 = class extends HTMLElement$1 {
|
|
@@ -127774,6 +129529,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
127774
129529
|
this.restrict = undefined;
|
|
127775
129530
|
this.mode = "regular";
|
|
127776
129531
|
this.noBorder = false;
|
|
129532
|
+
this.password = false;
|
|
127777
129533
|
}
|
|
127778
129534
|
observeErrorMessage() {
|
|
127779
129535
|
if (this._inputElem) {
|
|
@@ -127986,7 +129742,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
127986
129742
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
127987
129743
|
return (h(Host, { style: this._hostElement.classList.contains("grid_editor") ? { "height": "100%" } : null }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
127988
129744
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
127989
|
-
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
129745
|
+
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
127990
129746
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
127991
129747
|
}
|
|
127992
129748
|
get _hostElement() { return this; }
|
|
@@ -128282,14 +130038,16 @@ const TreeItem = (props) => {
|
|
|
128282
130038
|
itemsList.push(treeItem);
|
|
128283
130039
|
}
|
|
128284
130040
|
return (h("ul", { class: level === 1 ? "first-level" : undefined },
|
|
128285
|
-
h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class:
|
|
130041
|
+
h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? 'tree-item-error' : ""}`, onClick: () => available && itemClick(treeItem) }, {
|
|
128286
130042
|
disabled,
|
|
128287
130043
|
selected: treeItem.id === selectedId,
|
|
128288
130044
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
|
|
128289
130045
|
}),
|
|
128290
|
-
h("div", { class: "item-
|
|
128291
|
-
h("
|
|
128292
|
-
|
|
130046
|
+
h("div", { class: "item-label-container" },
|
|
130047
|
+
h("div", { class: "item-icon-box" }, expandable &&
|
|
130048
|
+
h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })),
|
|
130049
|
+
h("label", { class: "item-label" }, treeItem.label)),
|
|
130050
|
+
h("div", { class: `tree-item-badge ${(treeItem.id !== selectedId) ? treeItem.badge : null}` }, treeItem.badge === 'error' ? (h("ez-icon", { id: `${treeItem.id}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" })) : null)),
|
|
128293
130051
|
expanded
|
|
128294
130052
|
&& node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
|
|
128295
130053
|
};
|
|
@@ -128536,7 +130294,7 @@ class Tree extends Node$1 {
|
|
|
128536
130294
|
}
|
|
128537
130295
|
}
|
|
128538
130296
|
|
|
128539
|
-
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{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)}.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)}";
|
|
130297
|
+
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)}";
|
|
128540
130298
|
|
|
128541
130299
|
const EzTree$1 = class extends HTMLElement$1 {
|
|
128542
130300
|
constructor() {
|
|
@@ -129304,19 +131062,23 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129304
131062
|
super();
|
|
129305
131063
|
this.__registerHost();
|
|
129306
131064
|
this.applyFilterColumnOptions = createEvent(this, "applyFilterColumnOptions", 7);
|
|
129307
|
-
this.TOP_POSITION = '
|
|
131065
|
+
this.TOP_POSITION = '65';
|
|
129308
131066
|
this.TOP_POSITION_HEADER_HIDDEN = '18';
|
|
131067
|
+
this.TOP_POSITION_NO_TASKBAR = '32';
|
|
131068
|
+
this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
|
|
129309
131069
|
this.DEFAULT_HEIGHT = 430;
|
|
129310
131070
|
this.opened = true;
|
|
129311
131071
|
this.columnName = undefined;
|
|
129312
131072
|
this.columnLabel = undefined;
|
|
129313
131073
|
this.gridHeaderHidden = false;
|
|
131074
|
+
this.noHeaderTaskBar = false;
|
|
129314
131075
|
this.dataSource = undefined;
|
|
129315
131076
|
this.dataUnit = undefined;
|
|
129316
131077
|
this.options = undefined;
|
|
129317
131078
|
this.selectedItems = undefined;
|
|
129318
131079
|
this.fieldDescriptor = undefined;
|
|
129319
131080
|
this.useOptions = false;
|
|
131081
|
+
this.isTextSearch = false;
|
|
129320
131082
|
}
|
|
129321
131083
|
async hide() {
|
|
129322
131084
|
await this.ezPopoverElement.hide();
|
|
@@ -129330,26 +131092,45 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129330
131092
|
if (this.canShow(configs)) {
|
|
129331
131093
|
await this.hide();
|
|
129332
131094
|
this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
|
|
129333
|
-
this.
|
|
131095
|
+
this.buildIsTextSearch();
|
|
129334
131096
|
this.columnName = configs.columnName;
|
|
129335
131097
|
this.columnLabel = configs.columnLabel;
|
|
129336
|
-
await this.
|
|
131098
|
+
await this.setOptions(configs.filteredOptions);
|
|
131099
|
+
await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
|
|
131100
|
+
}
|
|
131101
|
+
}
|
|
131102
|
+
calculateLeftPosition(configs) {
|
|
131103
|
+
if (!configs.fromIcon) {
|
|
131104
|
+
return configs.leftPosition;
|
|
129337
131105
|
}
|
|
131106
|
+
const difference = this.ezPopoverElement.getBoundingClientRect().left;
|
|
131107
|
+
const leftReference = parseInt(configs.leftPosition.replace('px', ''));
|
|
131108
|
+
const leftResolved = (leftReference + 16) - difference;
|
|
131109
|
+
return `${(leftResolved > 0 ? leftResolved : 0)}px`;
|
|
131110
|
+
}
|
|
131111
|
+
buildIsTextSearch() {
|
|
131112
|
+
var _a, _b;
|
|
131113
|
+
const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
|
|
131114
|
+
this.isTextSearch = !(userInterface === UserInterface.DECIMALNUMBER || userInterface === UserInterface.INTEGERNUMBER);
|
|
129338
131115
|
}
|
|
129339
131116
|
calcTopPosition() {
|
|
129340
|
-
const referencePosition = this.
|
|
129341
|
-
? this.TOP_POSITION_HEADER_HIDDEN
|
|
129342
|
-
: this.TOP_POSITION.replace('px', '');
|
|
131117
|
+
const referencePosition = this.buildReferenceTopPosition();
|
|
129343
131118
|
const totalPopoverHeight = parseInt(referencePosition) + this.DEFAULT_HEIGHT;
|
|
129344
131119
|
const popoverPosition = Math.round(this.ezPopoverElement.getBoundingClientRect().top);
|
|
129345
131120
|
const popoverBottomPosition = popoverPosition + totalPopoverHeight;
|
|
129346
131121
|
const windowHeight = window.innerHeight;
|
|
129347
131122
|
if (windowHeight > popoverBottomPosition) {
|
|
129348
|
-
return referencePosition
|
|
131123
|
+
return `${referencePosition}px`;
|
|
129349
131124
|
}
|
|
129350
131125
|
const differenceBetween = windowHeight - popoverBottomPosition;
|
|
129351
131126
|
return `${differenceBetween}px`;
|
|
129352
131127
|
}
|
|
131128
|
+
buildReferenceTopPosition() {
|
|
131129
|
+
if (this.noHeaderTaskBar) {
|
|
131130
|
+
return this.gridHeaderHidden ? this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN : this.TOP_POSITION_NO_TASKBAR;
|
|
131131
|
+
}
|
|
131132
|
+
return this.gridHeaderHidden ? this.TOP_POSITION_HEADER_HIDDEN : this.TOP_POSITION;
|
|
131133
|
+
}
|
|
129353
131134
|
async clearConfigs() {
|
|
129354
131135
|
var _a;
|
|
129355
131136
|
await ((_a = this.ezMultiSelectionList) === null || _a === void 0 ? void 0 : _a.clearFilteredOptions());
|
|
@@ -129379,10 +131160,22 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129379
131160
|
return this.fieldDescriptor.userInterface === UserInterface.SWITCH
|
|
129380
131161
|
|| this.fieldDescriptor.userInterface === UserInterface.CHECKBOX;
|
|
129381
131162
|
}
|
|
129382
|
-
setOptions(selectedItems) {
|
|
131163
|
+
async setOptions(selectedItems) {
|
|
129383
131164
|
const validateFieldUserInterfaceOptionSelector = this.hasToUseOptions();
|
|
129384
|
-
|
|
129385
|
-
|
|
131165
|
+
if (validateFieldUserInterfaceOptionSelector) {
|
|
131166
|
+
this.useOptions = validateFieldUserInterfaceOptionSelector;
|
|
131167
|
+
this.options = validateFieldUserInterfaceOptionSelector ? this.buildOptions(selectedItems) : (selectedItems !== null && selectedItems !== void 0 ? selectedItems : null);
|
|
131168
|
+
return;
|
|
131169
|
+
}
|
|
131170
|
+
const options = await this.dataSource.getStaticOptions(this.columnName);
|
|
131171
|
+
if (options != undefined) {
|
|
131172
|
+
const selected = new Set((selectedItems || []).filter(item => item.check).map(item => item.label));
|
|
131173
|
+
this.useOptions = true;
|
|
131174
|
+
this.options = selected.size === 0 ? options : options.map(option => (Object.assign(Object.assign({}, option), { check: selected.has(option.label) })));
|
|
131175
|
+
return;
|
|
131176
|
+
}
|
|
131177
|
+
this.useOptions = false;
|
|
131178
|
+
this.options = null;
|
|
129386
131179
|
}
|
|
129387
131180
|
buildOptions(selectedItems) {
|
|
129388
131181
|
var _a, _b;
|
|
@@ -129407,7 +131200,7 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129407
131200
|
}
|
|
129408
131201
|
}
|
|
129409
131202
|
render() {
|
|
129410
|
-
return (h("ez-popover", { class: 'filter-column__popover', "overlay-type": 'none', ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: 'filter-column' }, h("header", { class: 'filter-column__header' }, h("span", { class: 'ez-text ez-text--medium filter-column__header-title' }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: 'icon', "icon-name": 'close', class: 'ez-button--tertiary', onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail) }), h("footer", { class: 'filter-column__footer' }, h("ez-button", { label: 'Aplicar', class: 'ez-button--primary', onClick: this.submit.bind(this) })))));
|
|
131203
|
+
return (h("ez-popover", { class: 'filter-column__popover', "overlay-type": 'none', ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: 'filter-column' }, h("header", { class: 'filter-column__header' }, h("span", { class: 'ez-text ez-text--medium filter-column__header-title' }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: 'icon', "icon-name": 'close', class: 'ez-button--tertiary', onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail), isTextSearch: this.isTextSearch }), h("footer", { class: 'filter-column__footer' }, h("ez-button", { label: 'Aplicar', class: 'ez-button--primary', onClick: this.submit.bind(this) })))));
|
|
129411
131204
|
}
|
|
129412
131205
|
static get style() { return filterColumnCss; }
|
|
129413
131206
|
};
|
|
@@ -129428,6 +131221,7 @@ const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
|
|
|
129428
131221
|
|
|
129429
131222
|
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]}]);
|
|
129430
131223
|
const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
|
|
131224
|
+
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]}]);
|
|
129431
131225
|
const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
|
|
129432
131226
|
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]}]);
|
|
129433
131227
|
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]}]);
|
|
@@ -129437,47 +131231,50 @@ const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-ite
|
|
|
129437
131231
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
129438
131232
|
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"]}]);
|
|
129439
131233
|
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]}]);
|
|
129440
|
-
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"
|
|
131234
|
+
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"]]]);
|
|
129441
131235
|
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"]}]);
|
|
129442
131236
|
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"]}]);
|
|
129443
|
-
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]}]);
|
|
129444
|
-
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]}]);
|
|
131237
|
+
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"]]]);
|
|
131238
|
+
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]]);
|
|
129445
131239
|
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]}]);
|
|
129446
131240
|
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"]}]);
|
|
129447
|
-
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
|
|
131241
|
+
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"]}]);
|
|
129448
131242
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16]}]);
|
|
129449
|
-
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],"
|
|
131243
|
+
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"]]]);
|
|
129450
131244
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
129451
131245
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
129452
131246
|
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]}]);
|
|
129453
131247
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
129454
131248
|
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]}]);
|
|
129455
131249
|
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"]}]);
|
|
129456
|
-
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[
|
|
131250
|
+
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]}]);
|
|
129457
131251
|
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]}]);
|
|
129458
131252
|
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"]}]);
|
|
129459
131253
|
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"]}]);
|
|
129460
131254
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
129461
131255
|
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"]]]);
|
|
129462
|
-
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"],"listOptionsPosition":[16]}]);
|
|
131256
|
+
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"]]]);
|
|
129463
131257
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
129464
131258
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
131259
|
+
const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [0,"ez-split-item"]);
|
|
131260
|
+
const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-panel",{"direction":[1]}]);
|
|
129465
131261
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
129466
131262
|
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"]}]);
|
|
129467
131263
|
const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
|
|
129468
|
-
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"]}]);
|
|
131264
|
+
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4]}]);
|
|
129469
131265
|
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
129470
131266
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
|
|
129471
131267
|
const EzTree = /*@__PURE__*/proxyCustomElement(EzTree$1, [1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32]},[[2,"keydown","onKeyDownListener"]]]);
|
|
129472
131268
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040]}]);
|
|
129473
131269
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
129474
|
-
const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32]}]);
|
|
131270
|
+
const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32]}]);
|
|
129475
131271
|
const MultiSelectionBoxMessage = /*@__PURE__*/proxyCustomElement(MultiSelectionBoxMessage$1, [0,"multi-selection-box-message",{"message":[1]}]);
|
|
129476
131272
|
const defineCustomElements = (opts) => {
|
|
129477
131273
|
if (typeof customElements !== 'undefined') {
|
|
129478
131274
|
[
|
|
129479
131275
|
EzActionsButton,
|
|
129480
131276
|
EzAlert,
|
|
131277
|
+
EzAlertList,
|
|
129481
131278
|
EzApplication,
|
|
129482
131279
|
EzBadge,
|
|
129483
131280
|
EzBreadcrumb,
|
|
@@ -129512,6 +131309,8 @@ const defineCustomElements = (opts) => {
|
|
|
129512
131309
|
EzSearch,
|
|
129513
131310
|
EzSidebarButton,
|
|
129514
131311
|
EzSkeleton,
|
|
131312
|
+
EzSplitItem,
|
|
131313
|
+
EzSplitPanel,
|
|
129515
131314
|
EzTabselector,
|
|
129516
131315
|
EzTextArea,
|
|
129517
131316
|
EzTextEdit,
|
|
@@ -129531,4 +131330,4 @@ const defineCustomElements = (opts) => {
|
|
|
129531
131330
|
}
|
|
129532
131331
|
};
|
|
129533
131332
|
|
|
129534
|
-
export { EzActionsButton, EzAlert, 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, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
|
|
131333
|
+
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 };
|