@sankhyalabs/ezui 6.1.0-dev.2 → 6.1.0-dev.21
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/dist/cjs/{ApplicationUtils-c9d1205c.js → ApplicationUtils-39807831.js} +43 -15
- package/dist/cjs/RichToolbarHelper-ea12328f.js +33 -0
- package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/app-globals-86776e90.js +12 -0
- package/dist/cjs/{constants-569271bc.js → constants-72b7e05e.js} +0 -2
- package/dist/cjs/ez-actions-button.cjs.entry.js +3 -2
- package/dist/cjs/ez-alert-list.cjs.entry.js +6 -4
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-avatar.cjs.entry.js +7 -2
- 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 +8 -7
- package/dist/cjs/ez-card-item_2.cjs.entry.js +2 -2
- package/dist/cjs/ez-chart.cjs.entry.js +4 -19
- package/dist/cjs/ez-check.cjs.entry.js +2 -2
- package/dist/cjs/ez-chip.cjs.entry.js +3 -2
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +15 -12
- package/dist/cjs/{ez-combo-box-list_3.cjs.entry.js → ez-combo-box-list_4.cjs.entry.js} +292 -6
- package/dist/cjs/ez-combo-box.cjs.entry.js +33 -15
- package/dist/cjs/ez-date-input.cjs.entry.js +6 -2
- package/dist/cjs/ez-date-time-input.cjs.entry.js +6 -2
- package/dist/cjs/ez-dialog.cjs.entry.js +9 -7
- package/dist/cjs/ez-double-list.cjs.entry.js +13 -5
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-empty-card.cjs.entry.js +34 -0
- package/dist/cjs/ez-file-item.cjs.entry.js +10 -7
- package/dist/cjs/ez-filter-input.cjs.entry.js +129 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +13 -5
- package/dist/cjs/ez-form.cjs.entry.js +5 -4
- package/dist/cjs/ez-grid.cjs.entry.js +172 -133
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +6 -2
- package/dist/cjs/ez-icon.cjs.entry.js +2 -2
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +315 -0
- 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 +7 -3
- package/dist/cjs/ez-modal.cjs.entry.js +6 -2
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +10 -6
- package/dist/cjs/ez-number-input.cjs.entry.js +6 -2
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +27 -0
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +19 -10
- package/dist/cjs/ez-search-result-list.cjs.entry.js +25 -8
- package/dist/cjs/ez-search.cjs.entry.js +9 -10
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +6 -8
- package/dist/cjs/ez-skeleton.cjs.entry.js +6 -4
- package/dist/cjs/ez-sortable-list.cjs.entry.js +13 -6
- package/dist/cjs/ez-split-button.cjs.entry.js +6 -5
- package/dist/cjs/ez-split-item.cjs.entry.js +7 -3
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +35 -28
- package/dist/cjs/ez-text-input.cjs.entry.js +3 -2
- package/dist/cjs/ez-tile.cjs.entry.js +62 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +13 -11
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/{ez-filter-input_2.cjs.entry.js → ez-tooltip.cjs.entry.js} +2 -124
- package/dist/cjs/ez-tree.cjs.entry.js +6 -2
- package/dist/cjs/ez-upload.cjs.entry.js +18 -12
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +6 -2
- package/dist/cjs/filter-column.cjs.entry.js +9 -5
- package/dist/cjs/index-02854309.js +3672 -0
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +32 -15
- package/dist/cjs/loader.cjs.js +6 -2
- package/dist/cjs/purify-a7dc3a08.js +1354 -0
- package/dist/cjs/{search-column-1d3c9fa5.js → search-column-82c52e20.js} +11 -5
- package/dist/collection/collection-manifest.json +27 -1
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +5 -3
- package/dist/collection/components/ez-avatar/ez-avatar.js +5 -1
- package/dist/collection/components/ez-calendar/ez-calendar.js +7 -6
- package/dist/collection/components/ez-check/ez-check.css +1 -1
- package/dist/collection/components/ez-chip/ez-chip.js +20 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -9
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +7 -4
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +50 -15
- package/dist/collection/components/ez-date-input/ez-date-input.js +5 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +5 -1
- package/dist/collection/components/ez-dialog/ez-dialog.js +8 -6
- package/dist/collection/components/ez-double-list/ez-double-list.js +12 -4
- package/dist/collection/components/ez-empty-card/ez-empty-card.css +55 -0
- package/dist/collection/components/ez-empty-card/ez-empty-card.js +91 -0
- package/dist/collection/components/ez-file-item/ez-file-item.js +9 -6
- package/dist/collection/components/ez-form/ez-form.js +1 -1
- package/dist/collection/components/ez-form-view/ez-form-view.js +4 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +5 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js +4 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +38 -11
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +14 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +4 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +3 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/utils/buildLocaleText.js +67 -0
- package/dist/collection/components/ez-grid/ez-grid.js +15 -13
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +7 -3
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +2 -2
- package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js +11 -7
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +5 -1
- package/dist/collection/components/ez-icon/ez-icon.css +147 -140
- package/dist/collection/components/ez-list/ez-list.js +4 -2
- package/dist/collection/components/ez-modal/ez-modal.js +5 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +2 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +9 -5
- package/dist/collection/components/ez-number-input/ez-number-input.js +5 -1
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +3 -2
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.css +22 -0
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.js +135 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.css +30 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.js +575 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.js +27 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.css +4 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.js +23 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.css +4 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.js +23 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.css +20 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.js +122 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.css +4 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.js +23 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.css +42 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.js +187 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.css +70 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.js +220 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.js +1 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.js +14 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.js +10 -0
- package/dist/collection/components/ez-search/ez-search.js +7 -8
- package/dist/collection/components/ez-search-plus/ez-search-plus.css +2 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +16 -7
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +27 -7
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js +5 -2
- package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js +0 -1
- package/dist/collection/components/ez-skeleton/ez-skeleton.js +4 -2
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.js +15 -11
- package/dist/collection/components/ez-split-button/ez-split-button.js +6 -6
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +5 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +244 -212
- package/dist/collection/components/ez-text-area/ez-text-area.js +35 -28
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +5 -1
- package/dist/collection/components/ez-text-input/ez-text-input.js +2 -1
- package/dist/collection/components/ez-tile/ez-tile.css +151 -0
- package/dist/collection/components/ez-tile/ez-tile.js +269 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js +12 -10
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +1 -1
- package/dist/collection/components/ez-tree/ez-tree.js +5 -1
- package/dist/collection/components/ez-upload/ez-upload.js +18 -12
- package/dist/collection/global/app-init.js +6 -0
- package/dist/collection/setupTests.js +1 -1
- package/dist/collection/utils/ApplicationUtils.js +43 -15
- package/dist/collection/utils/constants.js +0 -1
- package/dist/collection/utils/i18n/elanguages.js +6 -0
- package/dist/collection/utils/i18n/i18nUtils.js +20 -0
- package/dist/collection/utils/i18n/index.js +30 -0
- package/dist/collection/utils/i18n/locales/en-us.js +275 -0
- package/dist/collection/utils/i18n/locales/es-es.js +275 -0
- package/dist/collection/utils/i18n/locales/pt-br.js +275 -0
- package/dist/collection/utils/i18n/translations.js +9 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +8 -2
- package/dist/custom-elements/index.d.ts +60 -0
- package/dist/custom-elements/index.js +6252 -308
- package/dist/esm/{ApplicationUtils-eaf91331.js → ApplicationUtils-72f474e8.js} +43 -15
- package/dist/esm/RichToolbarHelper-f3a149c4.js +29 -0
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/app-globals-2ccb253f.js +10 -0
- package/dist/esm/{constants-b036528f.js → constants-3fabe81e.js} +1 -2
- package/dist/esm/ez-actions-button.entry.js +3 -2
- package/dist/esm/ez-alert-list.entry.js +6 -4
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-avatar.entry.js +7 -2
- 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 +8 -7
- package/dist/esm/ez-card-item_2.entry.js +2 -2
- package/dist/esm/ez-chart.entry.js +2 -17
- package/dist/esm/ez-check.entry.js +2 -2
- package/dist/esm/ez-chip.entry.js +3 -2
- package/dist/esm/ez-collapsible-box.entry.js +15 -12
- package/dist/esm/{ez-combo-box-list_3.entry.js → ez-combo-box-list_4.entry.js} +293 -8
- package/dist/esm/ez-combo-box.entry.js +33 -15
- package/dist/esm/ez-date-input.entry.js +6 -2
- package/dist/esm/ez-date-time-input.entry.js +6 -2
- package/dist/esm/ez-dialog.entry.js +9 -7
- package/dist/esm/ez-double-list.entry.js +13 -5
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-empty-card.entry.js +30 -0
- package/dist/esm/ez-file-item.entry.js +10 -7
- package/dist/esm/ez-filter-input.entry.js +125 -0
- package/dist/esm/ez-form-view.entry.js +13 -5
- package/dist/esm/ez-form.entry.js +5 -4
- package/dist/esm/ez-grid.entry.js +155 -116
- package/dist/esm/ez-guide-navigator.entry.js +6 -2
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-link-builder_6.entry.js +306 -0
- 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 +7 -3
- package/dist/esm/ez-modal.entry.js +6 -2
- package/dist/esm/ez-multi-selection-list.entry.js +10 -6
- package/dist/esm/ez-number-input.entry.js +6 -2
- package/dist/esm/ez-popover-plus_3.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-rich-toolbar-item.entry.js +23 -0
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +19 -10
- package/dist/esm/ez-search-result-list.entry.js +25 -8
- package/dist/esm/ez-search.entry.js +9 -10
- package/dist/esm/ez-sidebar-navigator.entry.js +6 -8
- package/dist/esm/ez-skeleton.entry.js +6 -4
- package/dist/esm/ez-sortable-list.entry.js +13 -6
- package/dist/esm/ez-split-button.entry.js +6 -5
- package/dist/esm/ez-split-item.entry.js +7 -3
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +35 -28
- package/dist/esm/ez-text-input.entry.js +3 -2
- package/dist/esm/ez-tile.entry.js +58 -0
- package/dist/esm/ez-time-input.entry.js +13 -11
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/{ez-filter-input_2.entry.js → ez-tooltip.entry.js} +3 -124
- package/dist/esm/ez-tree.entry.js +6 -2
- package/dist/esm/ez-upload.entry.js +18 -12
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +7 -3
- package/dist/esm/filter-column.entry.js +9 -5
- package/dist/esm/index-b623906e.js +3669 -0
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +33 -15
- package/dist/esm/loader.js +7 -3
- package/dist/esm/purify-da6317bb.js +1352 -0
- package/dist/esm/{search-column-35f4ad93.js → search-column-5a55f676.js} +10 -4
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0603bcc7.entry.js +1 -0
- package/dist/ezui/p-0ec7aa3a.entry.js +1 -0
- package/dist/ezui/p-0f0f3efe.entry.js +1 -0
- package/dist/ezui/p-112455b1.js +1 -0
- package/dist/ezui/{p-87f5a060.entry.js → p-1bcfd88c.entry.js} +1 -1
- package/dist/ezui/p-1c3efd36.entry.js +1 -0
- package/dist/ezui/p-1c55dda0.js +3 -0
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/p-1ffb75d5.js +1 -0
- package/dist/ezui/p-20c024f7.entry.js +1 -0
- package/dist/ezui/p-22934e19.entry.js +1 -0
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/{p-06f1b8e4.entry.js → p-288631d1.entry.js} +1 -1
- package/dist/ezui/p-2f471aca.entry.js +1 -0
- package/dist/ezui/p-303b3b8c.entry.js +1 -0
- package/dist/ezui/p-3b89a9a0.entry.js +1 -0
- package/dist/ezui/p-3e71ca08.entry.js +1 -0
- package/dist/ezui/p-3e767a74.js +1 -0
- package/dist/ezui/p-3e88fbb6.entry.js +1 -0
- package/dist/ezui/p-4044a7d7.entry.js +1 -0
- package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/p-45c9b292.entry.js +1 -0
- package/dist/ezui/p-45e64547.entry.js +1 -0
- package/dist/ezui/p-46913da7.js +1 -0
- package/dist/ezui/p-4773ff4c.js +1 -0
- package/dist/ezui/{p-769632d5.entry.js → p-4b67138e.entry.js} +1 -1
- package/dist/ezui/{p-4a876b8b.entry.js → p-4d30b703.entry.js} +1 -1
- package/dist/ezui/p-4fc5f926.entry.js +1 -0
- package/dist/ezui/p-53bc30a1.entry.js +1 -0
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/p-627ff5a2.entry.js +1 -0
- package/dist/ezui/p-629e32e2.entry.js +1 -0
- package/dist/ezui/p-6369a0cd.entry.js +1 -0
- package/dist/ezui/{p-80764ff6.entry.js → p-6562b5c8.entry.js} +46 -46
- package/dist/ezui/p-6d596a5a.entry.js +1 -0
- package/dist/ezui/p-6e6fccfb.entry.js +1 -0
- package/dist/ezui/p-713dc93e.entry.js +1 -0
- package/dist/ezui/p-79044c3e.entry.js +1 -0
- package/dist/ezui/{p-5b85d3de.entry.js → p-7f792043.entry.js} +1 -1
- package/dist/ezui/p-80461324.entry.js +1 -0
- package/dist/ezui/p-84a136bf.entry.js +1 -0
- package/dist/ezui/{p-b3b3c99a.entry.js → p-8afb6e8a.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/p-91c9d50e.entry.js +1 -0
- package/dist/ezui/p-973e6a40.entry.js +1 -0
- package/dist/ezui/{p-18e71523.entry.js → p-9c5cd3b2.entry.js} +1 -1
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/p-a12f6074.entry.js +1 -0
- package/dist/ezui/p-a482aae1.entry.js +1 -0
- package/dist/ezui/p-a687f14c.entry.js +7 -0
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/p-adbc3261.entry.js +1 -0
- package/dist/ezui/p-b115058e.entry.js +1 -0
- package/dist/ezui/p-b1e45320.js +1 -0
- package/dist/ezui/p-b4215a04.entry.js +1 -0
- package/dist/ezui/p-b8ed876d.entry.js +1 -0
- package/dist/ezui/p-ba07b3df.js +1 -0
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/p-beb42de1.entry.js +1 -0
- package/dist/ezui/p-c00ad772.entry.js +1 -0
- package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
- package/dist/ezui/p-c2a8139d.entry.js +1 -0
- package/dist/ezui/p-caf2584a.entry.js +1 -0
- package/dist/ezui/p-d1d0868b.entry.js +1 -0
- package/dist/ezui/p-d2645bdf.entry.js +1 -0
- package/dist/ezui/p-e5260556.entry.js +1 -0
- package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
- package/dist/ezui/p-e7a7c594.entry.js +1 -0
- package/dist/ezui/p-ed3bed1e.entry.js +1 -0
- package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +2 -1
- package/dist/types/components/ez-avatar/ez-avatar.d.ts +2 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +2 -3
- package/dist/types/components/ez-chip/ez-chip.d.ts +4 -0
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +2 -0
- package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +2 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +9 -2
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +2 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +2 -0
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -2
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +2 -0
- package/dist/types/components/ez-empty-card/ez-empty-card.d.ts +18 -0
- package/dist/types/components/ez-file-item/ez-file-item.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/RichText.tpl.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +5 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/utils/buildLocaleText.d.ts +66 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +2 -2
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +2 -0
- package/dist/types/components/ez-grid/subcomponents/selection-counter.d.ts +2 -0
- package/dist/types/components/ez-grid/subcomponents/utils/selectionCounterUtils.d.ts +2 -2
- package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +2 -0
- package/dist/types/components/ez-list/ez-list.d.ts +2 -1
- package/dist/types/components/ez-modal/ez-modal.d.ts +2 -0
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +2 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +2 -0
- package/dist/types/components/ez-rich-text/ez-link-builder/ez-link-builder.d.ts +19 -0
- package/dist/types/components/ez-rich-text/ez-rich-text.d.ts +105 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.d.ts +31 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.d.ts +5 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.d.ts +5 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.d.ts +11 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.d.ts +5 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.d.ts +35 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.d.ts +39 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.d.ts +1 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.d.ts +1 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.d.ts +1 -0
- package/dist/types/components/ez-search/ez-search.d.ts +2 -3
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +4 -1
- package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +4 -1
- package/dist/types/components/ez-sidebar-navigator/ez-sidebar-navigator.d.ts +2 -0
- package/dist/types/components/ez-skeleton/ez-skeleton.constants.d.ts +0 -1
- package/dist/types/components/ez-skeleton/ez-skeleton.d.ts +2 -1
- package/dist/types/components/ez-sortable-list/ez-sortable-list.d.ts +2 -0
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +2 -2
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +2 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +6 -3
- package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +2 -0
- package/dist/types/components/ez-tile/ez-tile.d.ts +58 -0
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -1
- package/dist/types/components/ez-tree/ez-tree.d.ts +2 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +3 -1
- package/dist/types/components.d.ts +447 -2
- package/dist/types/global/app-init.d.ts +1 -0
- package/dist/types/utils/ApplicationUtils.d.ts +3 -1
- package/dist/types/utils/constants.d.ts +0 -1
- package/dist/types/utils/i18n/elanguages.d.ts +5 -0
- package/dist/types/utils/i18n/i18nUtils.d.ts +2 -0
- package/dist/types/utils/i18n/index.d.ts +5 -0
- package/dist/types/utils/i18n/locales/en-us.d.ts +276 -0
- package/dist/types/utils/i18n/locales/es-es.d.ts +276 -0
- package/dist/types/utils/i18n/locales/pt-br.d.ts +276 -0
- package/dist/types/utils/i18n/translations.d.ts +828 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -0
- package/package.json +8 -1
- package/react/components.d.ts +10 -0
- package/react/components.js +10 -0
- package/react/components.js.map +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +0 -75
- package/dist/collection/components/ez-sidebar-navigator/messages/constants.js +0 -5
- package/dist/ezui/p-01b72d7e.entry.js +0 -1
- package/dist/ezui/p-07594da0.entry.js +0 -1
- package/dist/ezui/p-11bfeca3.entry.js +0 -1
- package/dist/ezui/p-175154a0.js +0 -1
- package/dist/ezui/p-1fefb37a.entry.js +0 -1
- package/dist/ezui/p-2187f86c.js +0 -1
- package/dist/ezui/p-220b9944.entry.js +0 -1
- package/dist/ezui/p-28987410.entry.js +0 -1
- package/dist/ezui/p-2d10bb18.entry.js +0 -1
- package/dist/ezui/p-2f351332.entry.js +0 -1
- package/dist/ezui/p-4e66eaeb.entry.js +0 -1
- package/dist/ezui/p-545bd5d5.entry.js +0 -7
- package/dist/ezui/p-5eea9886.js +0 -1
- package/dist/ezui/p-61f5c258.entry.js +0 -1
- package/dist/ezui/p-6b2cc9b8.entry.js +0 -1
- package/dist/ezui/p-6b3fddee.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-700c1320.entry.js +0 -1
- package/dist/ezui/p-708b196e.entry.js +0 -1
- package/dist/ezui/p-7567ccdd.entry.js +0 -1
- package/dist/ezui/p-791f4e43.entry.js +0 -1
- package/dist/ezui/p-7db20f8e.entry.js +0 -1
- package/dist/ezui/p-7ec3f335.entry.js +0 -1
- package/dist/ezui/p-85d7b78a.entry.js +0 -1
- package/dist/ezui/p-90c90351.entry.js +0 -1
- package/dist/ezui/p-90e91173.entry.js +0 -1
- package/dist/ezui/p-91ccae0c.entry.js +0 -1
- package/dist/ezui/p-926a0bde.entry.js +0 -1
- package/dist/ezui/p-97d94ef3.entry.js +0 -1
- package/dist/ezui/p-9e95bfeb.entry.js +0 -1
- package/dist/ezui/p-a11827ca.entry.js +0 -1
- package/dist/ezui/p-c7035d65.entry.js +0 -1
- package/dist/ezui/p-c8e6204f.entry.js +0 -1
- package/dist/ezui/p-d2290004.entry.js +0 -1
- package/dist/ezui/p-d4d6d5fe.entry.js +0 -1
- package/dist/ezui/p-ddb22a70.entry.js +0 -1
- package/dist/ezui/p-ddd0bd61.entry.js +0 -1
- package/dist/ezui/p-e4ae4ddb.entry.js +0 -1
- package/dist/ezui/p-e4ead194.entry.js +0 -1
- package/dist/ezui/p-e6b38ade.entry.js +0 -1
- package/dist/ezui/p-ed48a632.entry.js +0 -1
- package/dist/ezui/p-fc194825.entry.js +0 -1
- package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +0 -2
- package/dist/types/components/ez-sidebar-navigator/messages/constants.d.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,H as e,c as s,g as o}from"./p-23a36bb6.js";import{ElementIDUtils as a,ObjectUtils as r,HTMLBuilder as h,StringUtils as l,KeyboardManager as n}from"@sankhyalabs/core";import{i as c}from"./p-4773ff4c.js";import{C as d}from"./p-30ffb9ed.js";import{R as b,a as m}from"./p-3e767a74.js";import{p as u}from"./p-1c55dda0.js";import{A as v}from"./p-46913da7.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-112455b1.js";const p=class{constructor(i){t(this,i),this.showLoading=void 0,this.visibleOptions=void 0,this.textEmptyList=void 0,this.showOptionValue=void 0,this.preSelection=void 0,this.maxWidth=void 0,this.width=void 0,this.onOptionSelect=void 0,this.onOptionHover=void 0}async nextOption(){var t,i;(null===(t=this.visibleOptions)||void 0===t?void 0:t.length)&&(void 0!==this.preSelection&&this.preSelection>=this.visibleOptions.length-1||(this.preSelection=void 0===this.preSelection?0:this.preSelection+1,this.scrollToOption(this.visibleOptions[this.preSelection]),null===(i=this.onOptionHover)||void 0===i||i.call(this,this.preSelection)))}async previousOption(){var t,i;(null===(t=this.visibleOptions)||void 0===t?void 0:t.length)&&(void 0!==this.preSelection&&this.preSelection<=0||(this.preSelection=void 0===this.preSelection?this.visibleOptions.length-1:this.preSelection-1,this.scrollToOption(this.visibleOptions[this.preSelection]),null===(i=this.onOptionHover)||void 0===i||i.call(this,this.preSelection)))}async selectCurrentOption(){void 0!==this.preSelection&&(this.onOptionSelect(this.visibleOptions[this.preSelection]),this.preSelection=void 0)}observeWidth(t,i){t!==i&&this._listWrapper&&(this._listWrapper.style.width=`${this.width}px`)}observeMaxWidth(t,i){t!==i&&this._listWrapper&&(this._listWrapper.style.maxWidth=this.maxWidth?`${this.maxWidth}px`:"")}handleKeyDown(t){switch(t.key){case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.nextOption();break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.preSelection=void 0}}buildItem(t,e){const s=this.showOptionValue&&this.maxWidth>0?`${this.maxWidth}px`:"";return t.label=t.label||t.value,i("li",{tabIndex:1,class:e===this.preSelection?"item preselected":"item",id:`item_${t.value}_${e}`,key:`item_${t.value}_${e}`,onMouseDown:()=>this.onOptionSelect(t),onMouseOver:()=>this.preSelection=e},this.showOptionValue?i("span",{class:"item__value",title:t.value,style:{width:s,minWidth:s,maxWidth:s}},t.value):void 0,i("span",{class:"item__label "+(this.showOptionValue?"item__label--bold":""),title:t.label},t.label))}scrollToOption(t){if(!(null==t?void 0:t.value)||!this._optionsList)return;const i=this.visibleOptions.indexOf(t);if(-1===i)return;const e=this._optionsList.querySelector(`li#item_${CSS.escape(t.value)}_${CSS.escape(String(i))}`);e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}async componentWillLoad(){this.i18n=await c()}componentDidLoad(){this._listWrapper.style.width=`${this.width}px`,this._listWrapper.style.maxWidth=this.maxWidth?`${this.maxWidth}px`:""}componentDidRender(){var t;null===(t=this._optionsList)||void 0===t||t.querySelectorAll(".item").forEach((t=>{a.addIDInfoIfNotExists(t,"itemComboBox")}))}render(){return i("section",{class:"list-container"},i("div",{class:"list-wrapper",ref:t=>this._listWrapper=t},i("ul",{class:"list-options",ref:t=>this._optionsList=t},!this.showLoading&&0===this.visibleOptions.length&&i("div",{class:"message"},i("span",{class:"message__no-result"},this.textEmptyList||this.i18n("ez-combo-box.noResults"))),this.showLoading&&i("div",{class:"message"},i("div",{class:"message__loading"})),this.showOptionValue&&i("span",{class:"item__value item__value--hidden"}),!this.showLoading&&this.visibleOptions.length>0&&this.visibleOptions.map(((t,i)=>this.buildItem(t,i))))))}static get watchers(){return{width:["observeWidth"],maxWidth:["observeMaxWidth"]}}};p.style=":host{--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--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__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--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);--ez-combo-box__list-container--padding:var(--space--extra-small, 3px)}.list-container{padding-top:var(--ez-combo-box__list-container--padding)}.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--medium, 0 8px 24px 0 rgba(43, 58, 84, 0.10));padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;margin: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)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const x=class{constructor(i){t(this,i),this.gui=void 0,this.customEditor=void 0,this.formViewField=void 0,this.value=void 0,this.detailContext=void 0,this.builderFallback=void 0,this.selectedRecord=void 0}async setFocus(){var t,i;null===(i=null===(t=this.gui)||void 0===t?void 0:t.setFocus)||void 0===i||i.call(t)}async setBlur(){var t,i;null===(i=null===(t=this.gui)||void 0===t?void 0:t.setBlur)||void 0===i||i.call(t)}async isInvalid(){var t,i;return(null===(i=null===(t=this.gui)||void 0===t?void 0:t.isInvalid)||void 0===i?void 0:i.call(t))||!1}watchValue(){this.handleValue(this.gui)}watchCustomEditor(){this.getContent()}watchFormViewField(t,i){r.equals(t,i)||this.getContent()}watchDetailContext(){this.getContent()}watchBuilderFallback(){this.getContent()}watchSelectedRecord(t,i){(null==t?void 0:t.__record__id__)!==(null==i?void 0:i.__record__id__)&&this.getContent()}getContent(){var t,e,s,o,a;const r=new Map;for(const t in this.formViewField.props)r.set(t,this.formViewField.props[t]);const n={value:this.value,name:this.formViewField.name,currentEditor:this.builderFallback(this.formViewField),setValue:t=>this.setValue(t),getValue:this.getValue,record:this.selectedRecord,editorMetadata:{label:this.formViewField.label,hidden:!1===(null===(t=this.formViewField.props)||void 0===t?void 0:t.visible),userInterface:this.formViewField.userInterface,options:null===(e=this.formViewField.props)||void 0===e?void 0:e.options,props:this.formViewField.props?r:void 0,optionLoader:this.formViewField.optionLoader},source:d.FORM,detailContext:this.detailContext};let c=this.customEditor.getEditorElement(n);if(!c)return c=this.builderFallback(this.formViewField),this.handleValue(c),void(this.gui=c);if(!(c instanceof HTMLElement)&&"string"!=typeof c)return this.handleValue(c),void(this.gui=c);"string"==typeof c&&(c=h.parseElement(c));const b=null!==(a=null!==(o=null===(s=this.value)||void 0===s?void 0:s.value)&&void 0!==o?o:this.value)&&void 0!==a?a:"";c.setAttribute("value",b),this.gui=i("div",{key:l.generateUUID(),ref:t=>t&&t.appendChild(c)})}setValue(t){this.value=t}getValue(){return this.value}handleValue(t){var i;null===(i=t.t)||void 0===i||i.forEach((t=>{t.i.value=this.value}))}componentWillLoad(){this.getContent()}render(){return i(e,null,this.gui)}static get watchers(){return{value:["watchValue"],customEditor:["watchCustomEditor"],formViewField:["watchFormViewField"],detailContext:["watchDetailContext"],builderFallback:["watchBuilderFallback"],selectedRecord:["watchSelectedRecord"]}}},w=class{constructor(i){t(this,i),this.ezChange=s(this,"ezChange",7),this.historyStack=[],this.historyIndex=-1,this.previewMode=!1,this.showPreview=!0,this.value="",this.label=void 0,this.mode="regular",this.enabled=!0,this.rows=6,this.errorMessage=void 0,this.canShowError=!0,this.showConfigs=!0,this.showTextFormat=!0,this.showUndoRedo=!0}observeValue(t,i){r.equals(t,i)||this.ezChange.emit(t)}observeErrorMessage(t){t&&this.previewMode&&(this.previewMode=!1)}async handleExecuteToolbarCommand(t){const{command:i,value:e}=t.detail;await this.executeCommand(i,e)}async setFocus(){this.handleFocus()}async setBlur(){var t;await(null===(t=this.textAreaRef)||void 0===t?void 0:t.setBlur())}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}bindPreview(){this._keyboardManager&&this.showPreview&&this._keyboardManager.bind("ctrl + p",(async()=>{await this.togglePreview()}),{description:"Entra em modo de pré visualização.",element:this.element})}bindConfigs(){this._keyboardManager&&this.showConfigs&&this._keyboardManager.bind("ctrl + l",(async()=>{await this.handleFormatSelection(b.LIST)}),{description:this.i18n("ez-rich-text.listShortcut"),element:this.element}).bind("ctrl + k",(async()=>{await this.handleLink()}),{description:this.i18n("ez-rich-text.linkShortcut"),element:this.element}).bind("ctrl + o",(async()=>{await this.handleImage()}),{description:this.i18n("ez-rich-text.imageShortcut"),element:this.element})}bindTextFormat(){this._keyboardManager&&this.showTextFormat&&this._keyboardManager.bind("ctrl + b",(async()=>{await this.handleFormatSelection(b.BOLD)}),{description:this.i18n("ez-rich-text.boldShortcut"),element:this.element}).bind("ctrl + i",(async()=>{await this.handleFormatSelection(b.ITALIC)}),{description:this.i18n("ez-rich-text.italicShortcut"),element:this.element}).bind("ctrl + u",(async()=>{await this.handleFormatSelection(b.UNDERLINE)}),{description:this.i18n("ez-rich-text.underlineShortcut"),element:this.element})}initKeyboardManager(){this._keyboardManager=new n({propagate:!1,element:this.element}),this._keyboardManager.bind("ctrl + Enter",(async()=>{await this.handleFormatSelection(b.BREAK_LINE)}),{description:this.i18n("ez-rich-text.breakLineShortcut"),element:this.element}).bind("ctrl + z",(async()=>{await this.handleUndo()}),{description:this.i18n("ez-rich-text.undoShortcut"),element:this.element}).bind("ctrl + x",(async()=>{await this.handleRedo()}),{description:this.i18n("ez-rich-text.redoShortcut"),element:this.element}),this.bindPreview(),this.bindConfigs(),this.bindTextFormat()}async executeCommand(t,i){switch(t){case m.FOCUS:this.handleFocus();break;case m.PREVIEW:await this.togglePreview();break;case m.FORMAT:await this.handleFormatSelection(i);break;case m.UNDO:await this.handleUndo();break;case m.REDO:await this.handleRedo();break;case m.LINK:await this.handleLink();break;case m.IMAGE:await this.handleImage()}}handleFocus(){this.previewMode=!1,requestAnimationFrame((async()=>{await this.textAreaRef.setFocus()}))}async handleLink(){this.previewMode=!1,requestAnimationFrame((async()=>{await this.linkBuilderRef.show(this.getSelectedText())}))}async handleImage(){this.previewMode=!1,await this.imageUploaderRef.show()}async handleRedo(){this.previewMode=!1,requestAnimationFrame((async()=>{this.redo(),await this.textAreaRef.setFocus()}))}async handleUndo(){this.previewMode=!1,requestAnimationFrame((async()=>{this.undo(),await this.textAreaRef.setFocus()}))}async handleFormatSelection(t){t&&(this.previewMode=!1,requestAnimationFrame((async()=>{await this.formatSelection(t),await this.textAreaRef.setFocus()})))}async togglePreview(){this.previewMode=!this.previewMode,this.previewMode&&await this.textAreaRef.setFocus()}getSelectedText(){const t=this.getTextAreaElement();if(t)return(this.textAreaRef.value||"").substring(t.selectionStart,t.selectionEnd)}getTextAreaElement(){return this.element.querySelector("ez-text-area").shadowRoot.querySelector("textarea")}async formatSelection(t){if(!this.textAreaRef)return;const i=t.replace("$selection",this.getSelectedText()||"");await this.textAreaRef.appendTextToSelection(i),this.value=this.textAreaRef.value,this.addToHistory(this.value)}addToHistory(t){this.historyIndex>=0&&t===this.historyStack[this.historyIndex]||(this.historyStack.length>=50&&this.historyStack.splice(0,this.historyStack.length-49),this.historyStack.push(t),this.historyIndex=this.historyStack.length-1)}undo(){if(!this.canExecuteUndo())return;this.historyIndex--;const t=this.historyStack[this.historyIndex];this.value=t,this.textAreaRef.value=t}canExecuteUndo(){return this.historyIndex>0}redo(){this.canExecuteRedo()&&(this.historyIndex++,this.getValueFromHistory())}canExecuteRedo(){return this.historyIndex<this.historyStack.length-1}getValueFromHistory(){const t=this.historyStack[this.historyIndex];this.value=t,this.textAreaRef.value=t}handleTextAreaChanged(t){this.value=t.detail,this.addToHistory(this.value)}async removeShortcuts(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}async componentWillLoad(){this.i18n=await c()}componentDidLoad(){this.initKeyboardManager(),this.addToHistory(this.value)}async disconnectedCallback(){await this.removeShortcuts()}getSanitizedValue(){return u.sanitize(this.value,{ADD_ATTR:["target","rel"]})}renderContent(){return this.previewMode?i("div",{id:"rich-text-preview-container",class:"preview",innerHTML:this.getSanitizedValue()}):i("ez-text-area",{ref:t=>this.textAreaRef=t,label:this.label,value:this.value,enabled:this.enabled,rows:this.rows,mode:this.mode,canShowError:this.canShowError,errorMessage:this.errorMessage,onEzChange:this.handleTextAreaChanged.bind(this)})}render(){return i(e,null,i("div",{class:"editor-container bordered"},i("ez-rich-toolbar",{isPreviewMode:this.previewMode,showPreview:this.showPreview,showConfigs:this.showConfigs&&this.enabled,showTextFormat:this.showTextFormat&&this.enabled,showUndoRedo:this.showUndoRedo&&this.enabled}),this.renderContent()),i("ez-link-builder",{ref:t=>this.linkBuilderRef=t}),i("ez-simple-image-uploader",{ref:t=>this.imageUploaderRef=t}))}get element(){return o(this)}static get watchers(){return{value:["observeValue"],errorMessage:["observeErrorMessage"]}}};w.style=".sc-ez-rich-text-h{display:block;width:100%;font-family:Roboto;--ez-rich-text--box-shadow:0 0 3px 0 #DCE0E8;--ez-rich-text--shadow--outline:var(--shadow--outline) var(--color--strokes)}.editor-container.sc-ez-rich-text{width:100%;overflow:hidden;border-radius:12px;border:1px solid #DCE0E8}ez-text-area.sc-ez-rich-text{--text-area__input--border:1px solid}.preview.sc-ez-rich-text{min-height:20px;padding:12px;resize:both;overflow:auto;max-width:100%;border-top:1px solid #DCE0E8}";const _=class{constructor(i){t(this,i),this.saveEdition=s(this,"saveEdition",7),this.cancelEdition=s(this,"cancelEdition",7),this._newValue=void 0,this.value=void 0,this.styled=void 0}async applyFocusSelect(){this.calcSizeInput(this.value,!0)}calcSizeInput(t,i=!1){var e,s;const o=null===(s=null===(e=this._inputElement)||void 0===e?void 0:e.shadowRoot)||void 0===s?void 0:s.querySelector("input");if(null!=o){const e=this.getWidthValue(t);o.style.width=e+"px",i&&setTimeout((()=>o.select()),100)}}getWidthValue(t){if(null!=this._valueBasis){const i=this._valueBasis;if(null!=t){const e=2;return i.innerHTML=t,i.clientWidth>0?i.clientWidth+e:e}i.innerHTML=""}return 0}setStyledInput(){var t,i;let e="",s="",o="";null!=this.styled&&(e=this.styled.fontSize,s=this.styled.fontWeight,o=this.styled.fontFamily);const a=null===(i=null===(t=this._inputElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("input");null!=a&&(a.style.fontSize=e,a.style.fontWeight=s,a.style.fontFamily=o);const r=this._valueBasis;null!=r&&(r.style.fontSize=e,r.style.fontWeight=s,r.style.fontFamily=o)}handleSaveEdition(){this._newValue?this.saveEdition.emit({value:this.value,newValue:this._newValue}):v.alert(this.i18n("app.warning"),this.i18n("ez-text-edit.emptyFieldWarning")).then((()=>{this.setNewValue(this.value,!0)}))}handleCancelEdition(){this.cancelEdition.emit()}setNewValue(t,i=!1){this._newValue=t,this.calcSizeInput(this._newValue,i)}async componentWillLoad(){this.i18n=await c()}componentDidLoad(){this.applyFocusSelect(),this.setNewValue(this.value)}componentDidRender(){this.setStyledInput()}render(){return a.addIDInfoIfNotExists(this._element,"input"),i(e,null,i("span",{class:"text-edit__hidden-value",ref:t=>this._valueBasis=t}),i("ez-text-input",{"data-element-id":a.getInternalIDInfo("textInput"),onInput:()=>{this.calcSizeInput(this._newValue)},class:"text-edit__form-input",value:this._newValue,ref:t=>this._inputElement=t,mode:"slim",onEzChange:t=>this.setNewValue(null==t?void 0:t.detail),noBorder:!0}),i("ez-button",{class:"text-edit__icon-check",mode:"icon",iconName:"check",size:"small",onClick:()=>{this.handleSaveEdition()}}),i("ez-button",{class:"text-edit__icon-close",mode:"icon",iconName:"close",size:"small",onClick:()=>{this.handleCancelEdition()}}))}get _element(){return o(this)}};_.style=":host{display:flex;align-items:center;gap:5px}.text-edit__form-input{width:auto;--ez-text-input__input--padding:0px}.text-edit__hidden-value{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}";export{p as ez_combo_box_list,x as ez_custom_form_input,w as ez_rich_text,_ as ez_text_edit}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e,t,n,l=!1,o=!1,s=!1,i=!1,c=!1;const r="http://www.w3.org/1999/xlink",f={},a=e=>"object"==(e=typeof e)||"function"===e;function u(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const d=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,c=!1;const r=[],f=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!a(l))&&(l+=""),i&&c?r[r.length-1].t+=l:r.push(i?p(null,l):l),c=i)};if(f(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,m);const u=p(e,null);return u.l=t,r.length>0&&(u.o=r),u.i=o,u.u=s,u},p=(e,t)=>({p:0,$:e,t,m:null,o:null,l:null,i:null,u:null}),$={},m={forEach:(e,t)=>e.map(h).forEach(t),map:(e,t)=>e.map(h).map(t).map(y)},h=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.$,vtext:e.t}),y=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),d(e.vtag,t,...e.vchildren||[])}const t=p(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},b=e=>ce(e).h,v=(e,t,n)=>{const l=b(e);return{emit:e=>w(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},w=(e,t,n)=>{const l=be.ce(t,n);return e.dispatchEvent(l),l},g=new WeakMap,k=e=>"sc-"+e.v,j=(e,t,n,l,o,s)=>{if(n!==l){let i=ae(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=O(n),s=O(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const f=a(l);if((i||f&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let u=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,u=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(u?e.removeAttributeNS(r,t):e.removeAttribute(t)):(!i||4&s||o)&&!f&&(l=!0===l?"":l,u?e.setAttributeNS(r,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ae(me,c)?c.slice(2):c[2]+t.slice(3),n&&be.rel(e,t,n,!1),l&&be.ael(e,t,l,!1)}},S=/\s/,O=e=>e?e.split(S):[],C=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.l||f,i=t.l||f;for(l in s)l in i||j(o,l,s[l],void 0,n,t.p);for(l in i)j(o,l,s[l],i[l],n,t.p)},M=(o,c,r,f)=>{const a=c.o[r];let u,d,p,$=0;if(l||(s=!0,"slot"===a.$&&(e&&f.classList.add(e+"-s"),a.p|=a.o?2:1)),null!==a.t)u=a.m=he.createTextNode(a.t);else if(1&a.p)u=a.m=he.createTextNode("");else{if(i||(i="svg"===a.$),u=a.m=he.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&a.p?"slot-fb":a.$),i&&"foreignObject"===a.$&&(i=!1),C(null,a,i),null!=e&&u["s-si"]!==e&&u.classList.add(u["s-si"]=e),a.o)for($=0;$<a.o.length;++$)d=M(o,a,$,u),d&&u.appendChild(d);"svg"===a.$?i=!1:"foreignObject"===u.tagName&&(i=!0)}return u["s-hn"]=n,3&a.p&&(u["s-sr"]=!0,u["s-cr"]=t,u["s-sn"]=a.u||"",p=o&&o.o&&o.o[r],p&&p.$===a.$&&o.m&&x(o.m,!1)),u},x=(e,t)=>{be.p|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(E(o).insertBefore(o,W(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&x(o,t)}be.p&=-2},R=(e,t,l,o,s,i)=>{let c,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=M(null,l,s,e),c&&(o[s].m=c,r.insertBefore(c,W(t))))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,A(l),o=!0,s["s-ol"]?s["s-ol"].remove():x(s,!0),s.remove())},T=(e,t)=>e.$===t.$&&("slot"===e.$?e.u===t.u:e.i===t.i),W=e=>e&&e["s-ol"]||e,E=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,L=(e,t)=>{const n=t.m=e.m,l=e.o,o=t.o,s=t.$,c=t.t;let r;null===c?(i="svg"===s||"foreignObject"!==s&&i,"slot"===s||C(e,t,i),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,c=0,r=0,f=0,a=t.length-1,u=t[0],d=t[a],p=l.length-1,$=l[0],m=l[p];for(;i<=a&&c<=p;)if(null==u)u=t[++i];else if(null==d)d=t[--a];else if(null==$)$=l[++c];else if(null==m)m=l[--p];else if(T(u,$))L(u,$),u=t[++i],$=l[++c];else if(T(d,m))L(d,m),d=t[--a],m=l[--p];else if(T(u,m))"slot"!==u.$&&"slot"!==m.$||x(u.m.parentNode,!1),L(u,m),e.insertBefore(u.m,d.m.nextSibling),u=t[++i],m=l[--p];else if(T(d,$))"slot"!==u.$&&"slot"!==m.$||x(d.m.parentNode,!1),L(d,$),e.insertBefore(d.m,u.m),d=t[--a],$=l[++c];else{for(r=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].i&&t[f].i===$.i){r=f;break}r>=0?(s=t[r],s.$!==$.$?o=M(t&&t[c],n,r,e):(L(s,$),t[r]=void 0,o=s.m),$=l[++c]):(o=M(t&&t[c],n,c,e),$=l[++c]),o&&E(u.m).insertBefore(o,W(u.m))}i>a?R(e,null==l[p+1]?null:l[p+1].m,n,l,c,p):c>p&&P(t,i,a)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),R(n,null,t,o,0,o.length-1)):null!==l&&P(l,0,l.length-1),i&&"svg"===s&&(i=!1)):(r=n["s-cr"])?r.parentNode.textContent=c:e.t!==c&&(n.data=c)},N=e=>{const t=e.childNodes;let n,l,o,s,i,c;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(c=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===c&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===c||3===c&&""!==t[s].textContent.trim()){n.hidden=!0;break}N(n)}},U=[],D=e=>{let t,n,l,s,i,c,r=0;const f=e.childNodes,a=f.length;for(;r<a;r++){if(t=f[r],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],c=l.length-1;c>=0;c--)n=l[c],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(F(n,s)?(i=U.find((e=>e.g===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.k=t:U.push({k:t,g:n}),n["s-sr"]&&U.map((e=>{F(e.g,n["s-sn"])&&(i=U.find((e=>e.g===n)),i&&!e.k&&(e.k=i.k))}))):U.some((e=>e.g===n))||U.push({g:n}));1===t.nodeType&&D(t)}},F=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,A=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(A)},H=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},q=(e,t)=>{if(e.p|=16,!(4&e.p))return H(e,e.S),Me((()=>z(e,t)));e.p|=512},z=(e,t)=>{const n=e.O;let l;return t?(e.p|=256,e.C&&(e.C.map((([e,t])=>J(n,e,t))),e.C=null),l=J(n,"componentWillLoad")):l=J(n,"componentWillUpdate"),l=K(l,(()=>J(n,"componentWillRender"))),K(l,(()=>V(e,n,t)))},V=async(e,t,n)=>{const l=e.h,o=l["s-rc"];n&&(e=>{const t=e.M,n=e.h,l=t.p,o=((e,t)=>{var n;let l=k(t);const o=$e.get(l);if(e=11===e.nodeType?e:he,o)if("string"==typeof o){let t,s=g.get(e=e.head||e);if(s||g.set(e,s=new Set),!s.has(l)){{t=he.createElement("style"),t.innerHTML=o;const l=null!==(n=be.R)&&void 0!==n?n:u(he);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(e);_(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>B(e);0===t.length?n():(Promise.all(t).then(n),e.p|=4,t.length=0)}},_=(i,c)=>{try{c=c.render(),i.p&=-17,i.p|=2,((i,c)=>{const r=i.h,f=i.M,a=i.P||p(null,null),u=(e=>e&&e.$===$)(c)?c:d(null,null,c);if(n=r.tagName,f.T&&(u.l=u.l||{},f.T.map((([e,t])=>u.l[t]=r[e]))),u.$=null,u.p|=4,i.P=u,u.m=a.m=r.shadowRoot||r,e=r["s-sc"],t=r["s-cr"],l=0!=(1&f.p),o=!1,L(a,u),be.p|=1,s){let e,t,n,l,o,s;D(u.m);let i=0;for(;i<U.length;i++)e=U[i],t=e.g,t["s-ol"]||(n=he.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<U.length;i++)if(e=U[i],t=e.g,e.k){for(l=e.k.parentNode,o=e.k.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&N(u.m),be.p&=-2,U.length=0})(i,c)}catch(e){ue(e,i.h)}return null},B=e=>{const t=e.h,n=e.O,l=e.S;J(n,"componentDidRender"),64&e.p?J(n,"componentDidUpdate"):(e.p|=64,Q(t),J(n,"componentDidLoad"),e.W(t),l||I()),e.L(t),e.j&&(e.j(),e.j=void 0),512&e.p&&Ce((()=>q(e,!1))),e.p&=-517},G=e=>{{const t=ce(e),n=t.h.isConnected;return n&&2==(18&t.p)&&q(t,!1),n}},I=()=>{Q(he.documentElement),Ce((()=>w(me,"appload",{detail:{namespace:"ezui"}})))},J=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ue(e)}},K=(e,t)=>e&&e.then?e.then(t):t(),Q=e=>e.classList.add("hydrated"),X=(e,t,n)=>{if(t.N){e.watchers&&(t.U=e.watchers);const l=Object.entries(t.N),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>ce(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=ce(e),s=o.h,i=o.D.get(t),c=o.p,r=o.O;if(n=((e,t)=>null==e||a(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.D.set(t,n),r)){if(l.U&&128&c){const e=l.U[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){ue(e,s)}}))}2==(18&c)&&q(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=ce(this);return n.F.then((()=>n.O[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){be.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},Y=e=>{J(e,"connectedCallback")},Z=(e,t={})=>{var n;const l=[],o=t.exclude||[],s=me.customElements,i=he.head,c=i.querySelector("meta[charset]"),r=he.createElement("style"),f=[];let a,d=!0;Object.assign(be,t),be.A=new URL(t.resourcesUrl||"./",he.baseURI).href,e.map((e=>{e[1].map((t=>{const n={p:t[0],v:t[1],N:t[2],H:t[3]};n.N=t[2],n.H=t[3],n.T=[],n.U={};const i=n.v,c=class extends HTMLElement{constructor(e){super(e),fe(e=this,n),1&n.p&&e.attachShadow({mode:"open"})}connectedCallback(){a&&(clearTimeout(a),a=null),d?f.push(this):be.jmp((()=>(e=>{if(0==(1&be.p)){const t=ce(e),n=t.M,l=()=>{};if(1&t.p)te(e,t,n.H),Y(t.O);else{t.p|=1,12&n.p&&(e=>{const t=e["s-cr"]=he.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){H(t,t.S=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.p)){{if(t.p|=32,(o=pe(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.U=o.watchers,X(o,n,2),o.isProxied=!0);const e=()=>{};t.p|=8;try{new o(t)}catch(e){ue(e)}t.p&=-9,t.p|=128,e(),Y(t.O)}if(o.style){let e=o.style;const t=k(n);if(!$e.has(t)){const l=()=>{};((e,t,n)=>{let l=$e.get(e);we&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,$e.set(e,l)})(t,e,!!(1&n.p)),l()}}}const s=t.S,i=()=>q(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){be.jmp((()=>(()=>{if(0==(1&be.p)){const e=ce(this),t=e.O;e.q&&(e.q.map((e=>e())),e.q=void 0),J(t,"disconnectedCallback")}})()))}componentOnReady(){return ce(this).V}};n._=e[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,X(c,n,1)))}))}));{r.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles","");const e=null!==(n=be.R)&&void 0!==n?n:u(he);null!=e&&r.setAttribute("nonce",e),i.insertBefore(r,c?c.nextSibling:i.firstChild)}d=!1,f.length?f.map((e=>e.connectedCallback())):be.jmp((()=>a=setTimeout(I,30)))},ee=(e,t)=>t,te=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=le(e,n),i=ne(t,o),c=oe(n);be.ael(s,l,i,c),(t.q=t.q||[]).push((()=>be.rel(s,l,i,c)))}))},ne=(e,t)=>n=>{try{256&e.p?e.O[t](n):(e.C=e.C||[]).push([t,n])}catch(e){ue(e)}},le=(e,t)=>4&t?he:8&t?me:e,oe=e=>0!=(2&e),se=e=>be.R=e,ie=new WeakMap,ce=e=>ie.get(e),re=(e,t)=>ie.set(t.O=e,t),fe=(e,t)=>{const n={p:0,h:e,M:t,D:new Map};return n.F=new Promise((e=>n.L=e)),n.V=new Promise((e=>n.W=e)),e["s-p"]=[],e["s-rc"]=[],te(e,n,t.H),ie.set(e,n)},ae=(e,t)=>t in e,ue=(e,t)=>(0,console.error)(e,t),de=new Map,pe=e=>{const t=e.v.replace(/-/g,"_"),n=e._,l=de.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(de.set(n,e),e[t])),ue)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},$e=new Map,me="undefined"!=typeof window?window:{},he=me.document||{head:{}},ye=
|
|
1
|
+
let e,t,n,l=!1,o=!1,s=!1,i=!1,c=!1;const r="http://www.w3.org/1999/xlink",f={},a=e=>"object"==(e=typeof e)||"function"===e;function u(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const d=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,c=!1;const r=[],f=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!a(l))&&(l+=""),i&&c?r[r.length-1].t+=l:r.push(i?p(null,l):l),c=i)};if(f(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,m);const u=p(e,null);return u.l=t,r.length>0&&(u.o=r),u.i=o,u.u=s,u},p=(e,t)=>({p:0,$:e,t,m:null,o:null,l:null,i:null,u:null}),$={},m={forEach:(e,t)=>e.map(h).forEach(t),map:(e,t)=>e.map(h).map(t).map(y)},h=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.$,vtext:e.t}),y=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),d(e.vtag,t,...e.vchildren||[])}const t=p(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},b=e=>ce(e).h,v=(e,t,n)=>{const l=b(e);return{emit:e=>w(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},w=(e,t,n)=>{const l=ye.ce(t,n);return e.dispatchEvent(l),l},g=new WeakMap,k=e=>"sc-"+e.v,j=(e,t,n,l,o,s)=>{if(n!==l){let i=ae(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=O(n),s=O(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const f=a(l);if((i||f&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let u=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,u=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(u?e.removeAttributeNS(r,t):e.removeAttribute(t)):(!i||4&s||o)&&!f&&(l=!0===l?"":l,u?e.setAttributeNS(r,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ae(me,c)?c.slice(2):c[2]+t.slice(3),n&&ye.rel(e,t,n,!1),l&&ye.ael(e,t,l,!1)}},S=/\s/,O=e=>e?e.split(S):[],C=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.l||f,i=t.l||f;for(l in s)l in i||j(o,l,s[l],void 0,n,t.p);for(l in i)j(o,l,s[l],i[l],n,t.p)},M=(o,c,r,f)=>{const a=c.o[r];let u,d,p,$=0;if(l||(s=!0,"slot"===a.$&&(e&&f.classList.add(e+"-s"),a.p|=a.o?2:1)),null!==a.t)u=a.m=he.createTextNode(a.t);else if(1&a.p)u=a.m=he.createTextNode("");else{if(i||(i="svg"===a.$),u=a.m=he.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&a.p?"slot-fb":a.$),i&&"foreignObject"===a.$&&(i=!1),C(null,a,i),null!=e&&u["s-si"]!==e&&u.classList.add(u["s-si"]=e),a.o)for($=0;$<a.o.length;++$)d=M(o,a,$,u),d&&u.appendChild(d);"svg"===a.$?i=!1:"foreignObject"===u.tagName&&(i=!0)}return u["s-hn"]=n,3&a.p&&(u["s-sr"]=!0,u["s-cr"]=t,u["s-sn"]=a.u||"",p=o&&o.o&&o.o[r],p&&p.$===a.$&&o.m&&x(o.m,!1)),u},x=(e,t)=>{ye.p|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(E(o).insertBefore(o,W(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&x(o,t)}ye.p&=-2},R=(e,t,l,o,s,i)=>{let c,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=M(null,l,s,e),c&&(o[s].m=c,r.insertBefore(c,W(t))))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,A(l),o=!0,s["s-ol"]?s["s-ol"].remove():x(s,!0),s.remove())},T=(e,t)=>e.$===t.$&&("slot"===e.$?e.u===t.u:e.i===t.i),W=e=>e&&e["s-ol"]||e,E=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,L=(e,t)=>{const n=t.m=e.m,l=e.o,o=t.o,s=t.$,c=t.t;let r;null===c?(i="svg"===s||"foreignObject"!==s&&i,"slot"===s||C(e,t,i),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,c=0,r=0,f=0,a=t.length-1,u=t[0],d=t[a],p=l.length-1,$=l[0],m=l[p];for(;i<=a&&c<=p;)if(null==u)u=t[++i];else if(null==d)d=t[--a];else if(null==$)$=l[++c];else if(null==m)m=l[--p];else if(T(u,$))L(u,$),u=t[++i],$=l[++c];else if(T(d,m))L(d,m),d=t[--a],m=l[--p];else if(T(u,m))"slot"!==u.$&&"slot"!==m.$||x(u.m.parentNode,!1),L(u,m),e.insertBefore(u.m,d.m.nextSibling),u=t[++i],m=l[--p];else if(T(d,$))"slot"!==u.$&&"slot"!==m.$||x(d.m.parentNode,!1),L(d,$),e.insertBefore(d.m,u.m),d=t[--a],$=l[++c];else{for(r=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].i&&t[f].i===$.i){r=f;break}r>=0?(s=t[r],s.$!==$.$?o=M(t&&t[c],n,r,e):(L(s,$),t[r]=void 0,o=s.m),$=l[++c]):(o=M(t&&t[c],n,c,e),$=l[++c]),o&&E(u.m).insertBefore(o,W(u.m))}i>a?R(e,null==l[p+1]?null:l[p+1].m,n,l,c,p):c>p&&P(t,i,a)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),R(n,null,t,o,0,o.length-1)):null!==l&&P(l,0,l.length-1),i&&"svg"===s&&(i=!1)):(r=n["s-cr"])?r.parentNode.textContent=c:e.t!==c&&(n.data=c)},N=e=>{const t=e.childNodes;let n,l,o,s,i,c;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(c=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===c&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===c||3===c&&""!==t[s].textContent.trim()){n.hidden=!0;break}N(n)}},U=[],D=e=>{let t,n,l,s,i,c,r=0;const f=e.childNodes,a=f.length;for(;r<a;r++){if(t=f[r],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],c=l.length-1;c>=0;c--)n=l[c],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(F(n,s)?(i=U.find((e=>e.g===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.k=t:U.push({k:t,g:n}),n["s-sr"]&&U.map((e=>{F(e.g,n["s-sn"])&&(i=U.find((e=>e.g===n)),i&&!e.k&&(e.k=i.k))}))):U.some((e=>e.g===n))||U.push({g:n}));1===t.nodeType&&D(t)}},F=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,A=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(A)},H=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},q=(e,t)=>{if(e.p|=16,!(4&e.p))return H(e,e.S),Ce((()=>z(e,t)));e.p|=512},z=(e,t)=>{const n=e.O;let l;return t?(e.p|=256,e.C&&(e.C.map((([e,t])=>J(n,e,t))),e.C=null),l=J(n,"componentWillLoad")):l=J(n,"componentWillUpdate"),l=K(l,(()=>J(n,"componentWillRender"))),K(l,(()=>V(e,n,t)))},V=async(e,t,n)=>{const l=e.h,o=l["s-rc"];n&&(e=>{const t=e.M,n=e.h,l=t.p,o=((e,t)=>{var n;let l=k(t);const o=$e.get(l);if(e=11===e.nodeType?e:he,o)if("string"==typeof o){let t,s=g.get(e=e.head||e);if(s||g.set(e,s=new Set),!s.has(l)){{t=he.createElement("style"),t.innerHTML=o;const l=null!==(n=ye.R)&&void 0!==n?n:u(he);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(e);_(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>B(e);0===t.length?n():(Promise.all(t).then(n),e.p|=4,t.length=0)}},_=(i,c)=>{try{c=c.render(),i.p&=-17,i.p|=2,((i,c)=>{const r=i.h,f=i.M,a=i.P||p(null,null),u=(e=>e&&e.$===$)(c)?c:d(null,null,c);if(n=r.tagName,f.T&&(u.l=u.l||{},f.T.map((([e,t])=>u.l[t]=r[e]))),u.$=null,u.p|=4,i.P=u,u.m=a.m=r.shadowRoot||r,e=r["s-sc"],t=r["s-cr"],l=0!=(1&f.p),o=!1,L(a,u),ye.p|=1,s){let e,t,n,l,o,s;D(u.m);let i=0;for(;i<U.length;i++)e=U[i],t=e.g,t["s-ol"]||(n=he.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<U.length;i++)if(e=U[i],t=e.g,e.k){for(l=e.k.parentNode,o=e.k.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&N(u.m),ye.p&=-2,U.length=0})(i,c)}catch(e){ue(e,i.h)}return null},B=e=>{const t=e.h,n=e.O,l=e.S;J(n,"componentDidRender"),64&e.p?J(n,"componentDidUpdate"):(e.p|=64,Q(t),J(n,"componentDidLoad"),e.W(t),l||I()),e.L(t),e.j&&(e.j(),e.j=void 0),512&e.p&&Oe((()=>q(e,!1))),e.p&=-517},G=e=>{{const t=ce(e),n=t.h.isConnected;return n&&2==(18&t.p)&&q(t,!1),n}},I=()=>{Q(he.documentElement),Oe((()=>w(me,"appload",{detail:{namespace:"ezui"}})))},J=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ue(e)}},K=(e,t)=>e&&e.then?e.then(t):t(),Q=e=>e.classList.add("hydrated"),X=(e,t,n)=>{if(t.N){e.watchers&&(t.U=e.watchers);const l=Object.entries(t.N),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>ce(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=ce(e),s=o.h,i=o.D.get(t),c=o.p,r=o.O;if(n=((e,t)=>null==e||a(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.D.set(t,n),r)){if(l.U&&128&c){const e=l.U[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){ue(e,s)}}))}2==(18&c)&&q(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=ce(this);return n.F.then((()=>n.O[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){ye.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},Y=e=>{J(e,"connectedCallback")},Z=(e,t={})=>{var n;const l=[],o=t.exclude||[],s=me.customElements,i=he.head,c=i.querySelector("meta[charset]"),r=he.createElement("style"),f=[];let a,d=!0;Object.assign(ye,t),ye.A=new URL(t.resourcesUrl||"./",he.baseURI).href,e.map((e=>{e[1].map((t=>{const n={p:t[0],v:t[1],N:t[2],H:t[3]};n.N=t[2],n.H=t[3],n.T=[],n.U={};const i=n.v,c=class extends HTMLElement{constructor(e){super(e),fe(e=this,n),1&n.p&&e.attachShadow({mode:"open"})}connectedCallback(){a&&(clearTimeout(a),a=null),d?f.push(this):ye.jmp((()=>(e=>{if(0==(1&ye.p)){const t=ce(e),n=t.M,l=()=>{};if(1&t.p)te(e,t,n.H),Y(t.O);else{t.p|=1,12&n.p&&(e=>{const t=e["s-cr"]=he.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){H(t,t.S=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.p)){{if(t.p|=32,(o=pe(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.U=o.watchers,X(o,n,2),o.isProxied=!0);const e=()=>{};t.p|=8;try{new o(t)}catch(e){ue(e)}t.p&=-9,t.p|=128,e(),Y(t.O)}if(o.style){let e=o.style;const t=k(n);if(!$e.has(t)){const l=()=>{};((e,t,n)=>{let l=$e.get(e);ve&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,$e.set(e,l)})(t,e,!!(1&n.p)),l()}}}const s=t.S,i=()=>q(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){ye.jmp((()=>(()=>{if(0==(1&ye.p)){const e=ce(this),t=e.O;e.q&&(e.q.map((e=>e())),e.q=void 0),J(t,"disconnectedCallback")}})()))}componentOnReady(){return ce(this).V}};n._=e[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,X(c,n,1)))}))}));{r.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles","");const e=null!==(n=ye.R)&&void 0!==n?n:u(he);null!=e&&r.setAttribute("nonce",e),i.insertBefore(r,c?c.nextSibling:i.firstChild)}d=!1,f.length?f.map((e=>e.connectedCallback())):ye.jmp((()=>a=setTimeout(I,30)))},ee=(e,t)=>t,te=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=le(e,n),i=ne(t,o),c=oe(n);ye.ael(s,l,i,c),(t.q=t.q||[]).push((()=>ye.rel(s,l,i,c)))}))},ne=(e,t)=>n=>{try{256&e.p?e.O[t](n):(e.C=e.C||[]).push([t,n])}catch(e){ue(e)}},le=(e,t)=>4&t?he:8&t?me:e,oe=e=>0!=(2&e),se=e=>ye.R=e,ie=new WeakMap,ce=e=>ie.get(e),re=(e,t)=>ie.set(t.O=e,t),fe=(e,t)=>{const n={p:0,h:e,M:t,D:new Map};return n.F=new Promise((e=>n.L=e)),n.V=new Promise((e=>n.W=e)),e["s-p"]=[],e["s-rc"]=[],te(e,n,t.H),ie.set(e,n)},ae=(e,t)=>t in e,ue=(e,t)=>(0,console.error)(e,t),de=new Map,pe=e=>{const t=e.v.replace(/-/g,"_"),n=e._,l=de.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(de.set(n,e),e[t])),ue)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},$e=new Map,me="undefined"!=typeof window?window:{},he=me.document||{head:{}},ye={p:0,A:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},be=e=>Promise.resolve(e),ve=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),we=[],ge=[],ke=(e,t)=>n=>{e.push(n),c||(c=!0,t&&4&ye.p?Oe(Se):ye.raf(Se))},je=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ue(e)}e.length=0},Se=()=>{je(we),je(ge),(c=we.length>0)&&ye.raf(Se)},Oe=e=>be().then(e),Ce=ke(ge,!0);export{ee as F,$ as H,Z as b,v as c,G as f,b as g,d as h,be as p,re as r,se as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as e,H as o,c as t,g as l}from"./p-e4c7eb39.js";import{JSUtils as a,ElementIDUtils as s}from"@sankhyalabs/core";import{E as i}from"./p-98bb8b16.js";const c=class{constructor(e){r(this,e),this._shadowStart="ez-scroller__wrapper--shadow-start",this._shadowEnd="ez-scroller__wrapper--shadow-end",this.isActive=!1,this.direction=void 0,this.locked=!1,this.activeShadow=!1}getContainerClass(){return`ez-scroller__container ez-scroller__container--${this.direction}\n ${this.locked||!this.isActive?" ez-scroller__container--locked":""}\n `}getWrapperClass(){return`ez-scroller__wrapper ez-scroller__wrapper--${this.direction}`}finishDrag(){this._controller&&this._container.classList.remove("dragging")}updateScroller(){const r=this._container;if(null==r)return;let e;if(this.direction===i.HORIZONTAL){const{scrollWidth:o,clientWidth:t,scrollLeft:l}=r;e=o-t-Math.ceil(l),this._startHidden=r.scrollLeft>0}else if(this.direction===i.VERTICAL){const{scrollHeight:o,clientHeight:t,scrollTop:l}=r;e=o-t-Math.ceil(l),this._startHidden=r.scrollTop>0}this._endHidden=e>0,this.isActive=this._startHidden||this._endHidden||this.isActiveScroller(),this.updateShadow()}updateShadow(){const r=this._wrapper;if(!this.activeShadow||null==r)return;const e=["","start","end","middle"][Number(this._startHidden)|Number(this._endHidden)<<1];"start"===e?(r.classList.add(this._shadowStart),r.classList.remove(this._shadowEnd)):"end"===e?(r.classList.remove(this._shadowStart),r.classList.add(this._shadowEnd)):"middle"===e?(r.classList.add(this._shadowStart),r.classList.add(this._shadowEnd)):(r.classList.remove(this._shadowStart),r.classList.remove(this._shadowEnd))}configResize(){const r=this._container;null!=r&&(null!=this._resizeObserver&&this._resizeObserver.unobserve(r),this._resizeObserver=new ResizeObserver(a.debounce(this.updateScroller.bind(this),200)),this._resizeObserver.observe(r))}getContainerElement(){return e("div",{ref:r=>this._container=r,class:this.getContainerClass()},e("slot",null))}isActiveScroller(){return null!=this._container&&(this._container.scrollWidth>this._container.clientWidth||this._container.scrollHeight>this._container.clientHeight)}clickListener(r){this._controller&&this._controller.didScroll()&&(r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation())}mouseDownHandler(r){this.locked?this.finishDrag():(this._controller||(this._controller=new n(this._container)),this._controller.startDragg(r),this._container.classList.add("dragging"))}mouseUpHandler(){this.finishDrag()}mouseMoveHandler(r){this.locked?this.finishDrag():this._controller&&(0===r.buttons?this.finishDrag():this._controller.doScroll(r))}componentDidRender(){var r,e;if(null!=this._container){if(this.direction===i.BOTH)return null===(r=this._wrapper)||void 0===r||r.classList.remove(this._shadowStart),null===(e=this._wrapper)||void 0===e||e.classList.remove(this._shadowEnd),void(this.isActive=this.isActiveScroller());this._container.onscroll=this.updateScroller.bind(this),this.configResize(),this.updateScroller()}}render(){return e(o,null,this.activeShadow?e("div",{ref:r=>this._wrapper=r,class:this.getWrapperClass()},this.getContainerElement()):this.getContainerElement())}};class n{constructor(r){this.scrollablePanel=r}startDragg(r){this.startX=this.measureX(r),this.startY=this.measureY(r),this.scrollWidth=0,this.scrollHeight=0}measureX(r){return r.pageX-this.scrollablePanel.offsetLeft}measureY(r){return r.pageY-this.scrollablePanel.offsetTop}doScroll(r){const e=this.measureX(r),o=this.measureY(r);if(e!=this.startX||o!=this.startY){const r=e-this.startX,t=o-this.startY;this.startX+=r,this.startY+=t,this.scrollWidth+=Math.abs(r),this.scrollHeight+=Math.abs(t),this.scrollablePanel.scrollLeft=Math.max(0,this.scrollablePanel.scrollLeft-r),this.scrollablePanel.scrollTop=Math.max(0,this.scrollablePanel.scrollTop-t)}}didScroll(){return this.scrollHeight>5||this.scrollWidth>5}}c.style=':host{--ez-scroller--box-shadow-color:var(--background--body, #fafcff);--ez-scroller__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-scroller__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-scroller__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-scroller__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-scroller__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-scroller__scrollbar--width:var(--space--small, 6px);--ez-scroller__max-height:unset;--ez-scroller__scrollbar--padding-right:var(--space-extra-small, 3px);display:flex;cursor:grab;width:100%;overflow:hidden}.dragging{cursor:grabbing}.ez-scroller__container{display:flex;overflow-y:hidden;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked),.ez-scroller__container:not(.ez-scroller__container--locked):hover{scrollbar-color:var(--ez-scroller__scrollbar--color-clicked) var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container--both{overflow-y:scroll;overflow-x:scroll;flex-wrap:wrap}.ez-scroller__container--horizontal{overflow-x:scroll;flex-direction:row;padding-right:var(--ez-scroller__scrollbar--padding-right)}.ez-scroller__container--vertical{overflow-y:scroll;flex-direction:column;width:100%;max-height:var(--ez-scroller__max-height)}.ez-scroller__container::-webkit-scrollbar{background-color:transparent;width:var(--ez-scroller__scrollbar--width);height:var(--ez-scroller__scrollbar--width);max-width:var(--ez-scroller__scrollbar--width);min-width:var(--ez-scroller__scrollbar--width)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-track{visibility:hidden;background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-track,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-track{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-thumb{background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb{background-color:var(--ez-scroller__scrollbar--color-default)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-scroller__scrollbar--color-hover)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:active{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-scroller__scrollbar--color-clicked)}.ez-scroller__wrapper{display:flex;position:relative;width:100%;height:auto}.ez-scroller__wrapper--horizontal{flex-direction:row}.ez-scroller__wrapper--vertical{flex-direction:column}.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--shadow-end::after{content:"";display:flex;position:absolute;z-index:1}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{width:24px;min-height:calc(100% - 10px)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before{left:0;background:linear-gradient(to right, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{right:0;background:linear-gradient(to left, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{min-width:calc(100% - 10px);height:24px}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before{top:0;background:linear-gradient(to bottom, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{bottom:0;background:linear-gradient(to top, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}';const h=class{constructor(e){r(this,e),this.ezClick=t(this,"ezClick",7)}componentDidLoad(){this._element&&s.addIDInfo(this._element),this._button&&s.addIDInfo(this._button,"button",{id:"embedded"})}render(){return e("button",{type:"button",onClick:()=>{this.ezClick.emit()},ref:r=>this._button=r},e("span",null),e("ez-icon",{iconName:"chevron-right",size:"small"}))}get _element(){return l(this)}};h.style=":host{position:relative;--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-navigator-button--z-index:var(--elevation--20, 20);--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{z-index:var(--ez-sidebar-navigator-button--z-index);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;align-items:center}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) 0 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}ez-icon{--ez-icon--color:var(--ez-sidebar-button--background-color--primary)}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) 0 var(--ez-sidebar-button--space--medium) 0}";export{c as ez_scroller,h as ez_sidebar_button}
|
|
1
|
+
import{r,h as e,H as o,c as t,g as l}from"./p-23a36bb6.js";import{JSUtils as a,ElementIDUtils as s}from"@sankhyalabs/core";import{E as i}from"./p-98bb8b16.js";const c=class{constructor(e){r(this,e),this._shadowStart="ez-scroller__wrapper--shadow-start",this._shadowEnd="ez-scroller__wrapper--shadow-end",this.isActive=!1,this.direction=void 0,this.locked=!1,this.activeShadow=!1}getContainerClass(){return`ez-scroller__container ez-scroller__container--${this.direction}\n ${this.locked||!this.isActive?" ez-scroller__container--locked":""}\n `}getWrapperClass(){return`ez-scroller__wrapper ez-scroller__wrapper--${this.direction}`}finishDrag(){this._controller&&this._container.classList.remove("dragging")}updateScroller(){const r=this._container;if(null==r)return;let e;if(this.direction===i.HORIZONTAL){const{scrollWidth:o,clientWidth:t,scrollLeft:l}=r;e=o-t-Math.ceil(l),this._startHidden=r.scrollLeft>0}else if(this.direction===i.VERTICAL){const{scrollHeight:o,clientHeight:t,scrollTop:l}=r;e=o-t-Math.ceil(l),this._startHidden=r.scrollTop>0}this._endHidden=e>0,this.isActive=this._startHidden||this._endHidden||this.isActiveScroller(),this.updateShadow()}updateShadow(){const r=this._wrapper;if(!this.activeShadow||null==r)return;const e=["","start","end","middle"][Number(this._startHidden)|Number(this._endHidden)<<1];"start"===e?(r.classList.add(this._shadowStart),r.classList.remove(this._shadowEnd)):"end"===e?(r.classList.remove(this._shadowStart),r.classList.add(this._shadowEnd)):"middle"===e?(r.classList.add(this._shadowStart),r.classList.add(this._shadowEnd)):(r.classList.remove(this._shadowStart),r.classList.remove(this._shadowEnd))}configResize(){const r=this._container;null!=r&&(null!=this._resizeObserver&&this._resizeObserver.unobserve(r),this._resizeObserver=new ResizeObserver(a.debounce(this.updateScroller.bind(this),200)),this._resizeObserver.observe(r))}getContainerElement(){return e("div",{ref:r=>this._container=r,class:this.getContainerClass()},e("slot",null))}isActiveScroller(){return null!=this._container&&(this._container.scrollWidth>this._container.clientWidth||this._container.scrollHeight>this._container.clientHeight)}clickListener(r){this._controller&&this._controller.didScroll()&&(r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation())}mouseDownHandler(r){this.locked?this.finishDrag():(this._controller||(this._controller=new n(this._container)),this._controller.startDragg(r),this._container.classList.add("dragging"))}mouseUpHandler(){this.finishDrag()}mouseMoveHandler(r){this.locked?this.finishDrag():this._controller&&(0===r.buttons?this.finishDrag():this._controller.doScroll(r))}componentDidRender(){var r,e;if(null!=this._container){if(this.direction===i.BOTH)return null===(r=this._wrapper)||void 0===r||r.classList.remove(this._shadowStart),null===(e=this._wrapper)||void 0===e||e.classList.remove(this._shadowEnd),void(this.isActive=this.isActiveScroller());this._container.onscroll=this.updateScroller.bind(this),this.configResize(),this.updateScroller()}}render(){return e(o,null,this.activeShadow?e("div",{ref:r=>this._wrapper=r,class:this.getWrapperClass()},this.getContainerElement()):this.getContainerElement())}};class n{constructor(r){this.scrollablePanel=r}startDragg(r){this.startX=this.measureX(r),this.startY=this.measureY(r),this.scrollWidth=0,this.scrollHeight=0}measureX(r){return r.pageX-this.scrollablePanel.offsetLeft}measureY(r){return r.pageY-this.scrollablePanel.offsetTop}doScroll(r){const e=this.measureX(r),o=this.measureY(r);if(e!=this.startX||o!=this.startY){const r=e-this.startX,t=o-this.startY;this.startX+=r,this.startY+=t,this.scrollWidth+=Math.abs(r),this.scrollHeight+=Math.abs(t),this.scrollablePanel.scrollLeft=Math.max(0,this.scrollablePanel.scrollLeft-r),this.scrollablePanel.scrollTop=Math.max(0,this.scrollablePanel.scrollTop-t)}}didScroll(){return this.scrollHeight>5||this.scrollWidth>5}}c.style=':host{--ez-scroller--box-shadow-color:var(--background--body, #fafcff);--ez-scroller__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-scroller__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-scroller__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-scroller__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-scroller__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-scroller__scrollbar--width:var(--space--small, 6px);--ez-scroller__max-height:unset;--ez-scroller__scrollbar--padding-right:var(--space-extra-small, 3px);display:flex;cursor:grab;width:100%;overflow:hidden}.dragging{cursor:grabbing}.ez-scroller__container{display:flex;overflow-y:hidden;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked),.ez-scroller__container:not(.ez-scroller__container--locked):hover{scrollbar-color:var(--ez-scroller__scrollbar--color-clicked) var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container--both{overflow-y:scroll;overflow-x:scroll;flex-wrap:wrap}.ez-scroller__container--horizontal{overflow-x:scroll;flex-direction:row;padding-right:var(--ez-scroller__scrollbar--padding-right)}.ez-scroller__container--vertical{overflow-y:scroll;flex-direction:column;width:100%;max-height:var(--ez-scroller__max-height)}.ez-scroller__container::-webkit-scrollbar{background-color:transparent;width:var(--ez-scroller__scrollbar--width);height:var(--ez-scroller__scrollbar--width);max-width:var(--ez-scroller__scrollbar--width);min-width:var(--ez-scroller__scrollbar--width)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-track{visibility:hidden;background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-track,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-track{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-thumb{background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb{background-color:var(--ez-scroller__scrollbar--color-default)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-scroller__scrollbar--color-hover)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:active{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-scroller__scrollbar--color-clicked)}.ez-scroller__wrapper{display:flex;position:relative;width:100%;height:auto}.ez-scroller__wrapper--horizontal{flex-direction:row}.ez-scroller__wrapper--vertical{flex-direction:column}.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--shadow-end::after{content:"";display:flex;position:absolute;z-index:1}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{width:24px;min-height:calc(100% - 10px)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before{left:0;background:linear-gradient(to right, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{right:0;background:linear-gradient(to left, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{min-width:calc(100% - 10px);height:24px}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before{top:0;background:linear-gradient(to bottom, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{bottom:0;background:linear-gradient(to top, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}';const h=class{constructor(e){r(this,e),this.ezClick=t(this,"ezClick",7)}componentDidLoad(){this._element&&s.addIDInfo(this._element),this._button&&s.addIDInfo(this._button,"button",{id:"embedded"})}render(){return e("button",{type:"button",onClick:()=>{this.ezClick.emit()},ref:r=>this._button=r},e("span",null),e("ez-icon",{iconName:"chevron-right",size:"small"}))}get _element(){return l(this)}};h.style=":host{position:relative;--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-navigator-button--z-index:var(--elevation--20, 20);--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{z-index:var(--ez-sidebar-navigator-button--z-index);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;align-items:center}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) 0 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}ez-icon{--ez-icon--color:var(--ez-sidebar-button--background-color--primary)}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) 0 var(--ez-sidebar-button--space--medium) 0}";export{c as ez_scroller,h as ez_sidebar_button}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as a,h as i,H as t,g as s}from"./p-23a36bb6.js";import{ElementIDUtils as r}from"@sankhyalabs/core";import{E as o}from"./p-98bb8b16.js";import{i as n}from"./p-4773ff4c.js";var d,l,h;!function(e){e.FLOAT="float",e.FIXED="fixed"}(d||(d={})),function(e){e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg"}(l||(l={})),function(e){e.FLOAT="float",e.FIXED="fixed",e.DYNAMIC="dynamic"}(h||(h={}));const b=class{constructor(i){e(this,i),this.ezChangeMode=a(this,"ezChangeMode",7),this.handleToggleSidebar=()=>{this.open=!this.open},this.handleToggleMode=()=>{this.mode=this.mode===d.FIXED?d.FLOAT:d.FIXED,this.ezChangeMode.emit(this.mode)},this.type=h.DYNAMIC,this.mode=d.FLOAT,this.size=l.SMALL,this.isResponsive=!1,this.titleMenu="",this.showCollapseMenu=!0,this.showFixedButton=!0,this.open=!1}async changeModeMenu(){this.type===h.DYNAMIC&&this.handleToggleMode()}async closeSidebar(){this.open=!1}async openSidebar(){this.open=!0}async componentWillLoad(){this.i18n=await n()}componentDidLoad(){this.type===h.FIXED&&(this.mode=d.FIXED,this.open=!0)}render(){return r.addIDInfoIfNotExists(this._element),i(t,null,i("ez-sidebar-button",{class:this.open?"hidden":"",onEzClick:this.mode===d.FIXED?this.handleToggleSidebar:void 0,onMouseEnter:this.mode===d.FLOAT?this.handleToggleSidebar:void 0,"aria-controls":"navigator","aria-expanded":this.open,"data-element-id":r.getInternalIDInfo("openButton")}),this.open?i("aside",{tabIndex:-1,id:"navigator",class:`ez-col ez-col--sd-12 ez-col--tb-3 ez-sidebar-navigator ${this.mode===d.FLOAT?"dynamic":"fixed"} ${this.isResponsive?"responsive":this.size} ${this.open?"show":"hidden"}`,"data-element-id":r.getInternalIDInfo("sidebar"),onMouseLeave:this.type!==h.FIXED&&this.mode===d.FLOAT?this.handleToggleSidebar:void 0},i("header",{class:"ez-sidebar-navigator__header"},i("slot",{name:"start"}),""!==this.titleMenu&&i("div",{class:"ez-sidebar-navigator__title",title:this.titleMenu},this.titleMenu),!this.titleMenu&&i("slot",{name:"content"}),i("div",{class:"ez-sidebar-navigator__end"},i("slot",{name:"end"}),this.type===h.DYNAMIC&&this.showFixedButton&&i("ez-button",{onClick:this.handleToggleMode,mode:"icon",size:"small",iconName:this.mode===d.FIXED?"un-pin":"push-pin",title:this.i18n(this.mode===d.FIXED?"ez-sidebar.unPinMenu":"ez-sidebar.pushPinMenu"),"aria-label":this.i18n(this.mode===d.FIXED?"ez-sidebar.unPinMenu":"ez-sidebar.pushPinMenu"),"aria-controls":"navigator","data-element-id":r.getInternalIDInfo("pinButton")}),this.mode===d.FIXED&&this.showCollapseMenu&&i("ez-button",{onClick:this.handleToggleSidebar,class:"inverted",mode:"icon",size:"small",iconName:"show_menu",title:this.i18n("ez-sidebar.hideMenu"),"aria-label":this.i18n("ez-sidebar.hideMenu"),"aria-controls":"navigator","data-element-id":r.getInternalIDInfo("closeButton")}))),this.titleMenu&&i("slot",{name:"content"}),i("ez-scroller",{class:"ez-sidebar-navigator__content",direction:o.VERTICAL,activeShadow:!0},i("slot",null)),i("footer",{class:"ez-sidebar-navigator__footer"},i("slot",{name:"footer"}))):void 0)}get _element(){return s(this)}};b.style=':host{--ez-sidebar-navigator--padding-left:var(--space--xs, 12px);--ez-sidebar-navigator--padding-right:var(--space--xs, 12px);--ez-sidebar-navigator--gap:var(--space--xs, 12px);--ez-sidebar-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-sidebar-navigator--background-color:var(--color--inverted);--ez-sidebar-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-sidebar-navigator--height:calc(100vh - var(--space--lg, 24px));--ez-sidebar-navigator--z-index:var(--elevation--20, 20);--ez-sidebar-navigator--header-gap:var(--space--xs, 12px);--ez-sidebar-navigator--footer-gap:var(--space--xs, 12px);--ez-ez-sidebar-navigator__title--font-family:var(--font-pattern, "Roboto");--ez-ez-sidebar-navigator__title--font-size:var(--title--medium, 16px);--ez-ez-sidebar-navigator__title--color:var(--title--primary, #2b3a54);--ez-ez-sidebar-navigator__title--font-weight:var(--text-weight--extra-large, 700)}.inverted{transform:rotate(180deg)}.ez-sidebar-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:var(--ez-sidebar-navigator--height);padding-top:var(--space--xs, 12px);padding-bottom:var(--space--xs, 12px);outline:none;gap:var(--ez-sidebar-navigator--gap);padding-left:var(--ez-sidebar-navigator--padding-left);padding-right:var(--ez-sidebar-navigator--padding-right);background-color:var(--ez-sidebar-navigator--background-color);-webkit-box-shadow:var(--ez-sidebar-navigator--box-shadow);box-shadow:var(--ez-sidebar-navigator--box-shadow);border-radius:var(--ez-sidebar-navigator--border-radius)}.ez-sidebar-navigator__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-content:space-between;gap:var(--ez-sidebar-navigator--header-gap)}.ez-sidebar-navigator__content{height:100%}.ez-sidebar-navigator__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-sidebar-navigator--footer-gap)}.ez-sidebar-navigator__title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-family:var(--ez-ez-sidebar-navigator__title--font-family);font-size:var(--ez-ez-sidebar-navigator__title--font-size);font-weight:var(--ez-ez-sidebar-navigator__title--font-weight);color:var(--ez-ez-sidebar-navigator__title--color)}.ez-sidebar-navigator__end{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;gap:var(--ez-sidebar-navigator--gap)}.dynamic{position:absolute;z-index:var(--ez-sidebar-navigator--z-index)}.fixed{position:relative}.hidden{display:none}.show{animation:fadeIn .1s ease-in-out 1}@keyframes fadeIn{from{transform:translate(-100%)}}.sm{width:240px}.md{width:280px}.lg{width:320px}@media screen and (max-width: 991px){.responsive{width:240px}}@media screen and (min-width: 992px){.responsive{width:280px}}@media screen and (min-width: 1200px){.responsive{width:320px}}';export{b as ez_sidebar_navigator}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as o,H as a,g as i}from"./p-23a36bb6.js";import{KeyboardManager as n}from"@sankhyalabs/core";import{i as s}from"./p-4773ff4c.js";var l;!function(e){e.CLOSE="CLOSE",e.OK="OK",e.CANCEL="CANCEL",e.LOAD="LOAD"}(l||(l={}));const r=l;var c;!function(e){e.ENABLED="ENABLED",e.DISABLED="DISABLED",e.HIDDEN="HIDDEN"}(c||(c={}));const d=c,h=class{constructor(o){e(this,o),this.ezModalAction=t(this,"ezModalAction",7),this.modalTitle=void 0,this.modalSubTitle=void 0,this.showTitleBar=!0,this.cancelButtonLabel=void 0,this.okButtonLabel=void 0,this.cancelButtonStatus=void 0,this.okButtonStatus=void 0,this.showCloseButton=!0}async handleEzModalAction(e){var t;(null==e?void 0:e.target)&&(null==e?void 0:e.target)===(null===(t=this._element)||void 0===t?void 0:t.parentElement)&&this.closeModal()}cancelIsVisible(){return this.cancelButtonStatus!==d.HIDDEN&&null!=this.cancelButtonLabel}okIsVisible(){return this.okButtonStatus!==d.HIDDEN&&null!=this.okButtonLabel}async componentWillLoad(){this.i18n=await s()}componentDidLoad(){window.requestAnimationFrame((()=>{this.ezModalAction.emit(r.LOAD),this._modalRef.focus()})),this._keyboardManager=new n({propagate:!1,element:this._element}).bind("Enter",this.ezModalAction.emit.bind(r.OK)).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}disconnectedCallback(){var e;null===(e=this._keyboardManager)||void 0===e||e.unbindAllShortcutKeys()}closeModal(){this.ezModalAction.emit("CLOSE")}focusLast(){null!=this._okButton&&this._okButton.setFocus()}focusFirst(){this._closeButton.focus()}render(){return o(a,null,o("button",{class:"ez-modal-container__focus-ctrl",onFocusin:()=>this.focusLast()}),o("div",{ref:e=>this._modalRef=e,tabIndex:-1,class:"ez-modal-container__header-container"},this.showTitleBar&&o("div",{class:"ez-modal-container__header ez-margin-bottom--medium"},o("div",{class:"ez-col ez-align--middle ez-modal-container__title"},o("h2",{class:"ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small"},this.modalTitle),this.modalSubTitle&&o("div",{class:"ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small"},this.modalSubTitle)),this.showCloseButton&&o("button",{ref:e=>this._closeButton=e,class:"ez-modal-container__close-button",onClick:()=>this.ezModalAction.emit(r.CLOSE),"aria-label":this.i18n("app.close")},o("ez-icon",{class:"ez-modal-container__close-icon",size:"medium",iconName:"close"})))),o("div",{tabIndex:-1,class:"ez-modal-container__content"},o("slot",null)),o("div",{tabIndex:-1,class:"ez-modal-container__footer"},this.cancelIsVisible()&&o("ez-button",{label:this.cancelButtonLabel||this.i18n("app.cancel"),enabled:this.cancelButtonStatus!==d.DISABLED,onClick:()=>this.ezModalAction.emit(r.CANCEL)}),this.okIsVisible()&&o("ez-button",{ref:e=>this._okButton=e,class:"ez-button--primary",label:this.okButtonLabel||this.i18n("app.ok"),enabled:this.okButtonStatus!==d.DISABLED,onClick:()=>this.ezModalAction.emit(r.OK)})),o("button",{class:"ez-modal-container__focus-ctrl",onFocusin:()=>this.focusFirst()}))}get _element(){return i(this)}};h.style=".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:hidden;display:grid;grid-template-rows:0 auto 1fr auto 0;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between;align-items:start}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x);outline:none}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none;outline:none;padding:var(--space--6, 6px) 0px}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";export{h as ez_modal_container}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as d,h as i,H as o,g as l}from"./p-23a36bb6.js";import{FloatingManager as e,KeyboardManager as a}from"@sankhyalabs/core";import{i as n}from"./p-4773ff4c.js";const s=class{constructor(i){t(this,i),this.ezCloseModal=d(this,"ezCloseModal",7),this.ezOpenModal=d(this,"ezOpenModal",7),this.ezModalAction=d(this,"ezModalAction",7),this.modalSize=void 0,this.align=void 0,this.heightMode="regular",this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.closeOutsideLeave=!1,this.scrim="medium"}observeOpened(){this.opened?this._overlayId=e.subscribeOverlayControl(this._modalRef):e.unsubscribeOverlayControl(this._modalRef||this._overlayId)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}async componentWillLoad(){this.i18n=await n()}componentDidLoad(){this.observeOpened(),this._keyboardManager=new a({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezModalAction.emit.bind("OK")).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}componentDidRender(){this.modalFocus()}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}modalFocus(){this.opened&&requestAnimationFrame((()=>{const t=this._element.shadowRoot.querySelector("ez-modal-container");this._modalRef&&null===t&&this._modalRef.focus()}))}onMouseDownHandler(t){this.closeOutsideClick&&t.target===this._overlay&&this.closeModal()}onMouseLeaveHandler(){this.closeOutsideLeave&&this.closeModal()}render(){const t="left"===this.align?"left":"right",d="regular"===this.heightMode?`modal__content--${t}`:"";return i(o,null,this.opened?i("div",{ref:t=>this._modalRef=t,class:`modal modal__screen-${this.scrim} ${"regular"===this.heightMode?"modal__vertical-padding":""}`,onMouseDown:t=>this.onMouseDownHandler(t),tabIndex:-1,"aria-label":this.i18n("ez-modal.close")},i("div",{class:`modal__container modal__container--${t}`,ref:t=>this._overlay=t},i("div",{onMouseLeave:()=>this.onMouseLeaveHandler(),class:`modal__content ${d} ${this.modalSize}`},i("slot",null)))):void 0)}get _element(){return l(this)}static get watchers(){return{opened:["observeOpened"]}}};s.style=":host{--ez-modal-z-index:var(--elevation--22, 22);--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;outline:none}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-none{background:none}.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%}}";export{s as ez_modal}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as s}from"./p-23a36bb6.js";import{ObjectUtils as o}from"@sankhyalabs/core";import{i as l}from"./p-80dfc50b.js";import{i as n}from"./p-4773ff4c.js";function h(t,e,i){if(!t.length)return[...e];if(!e.length)return[];const s=function(t,e){return t.map((t=>e.findIndex((e=>e.id===t))))}(t,e),o=0===(l=s).length?0:l.reduce(((t,e)=>e<t?e:t),l[0]);var l;const n=function(t){return 0===t.length?0:t.reduce(((t,e)=>e>t?e:t),t[0])}(s);return function(t,e,i,s){return t<0||e>=s.length||t>e?s:i?function(t,e,i){if(t===i.length-1)return i;const s=i.slice(0,e),o=i.slice(e,t+1),l=i.slice(t+1),n=l.shift();return n?[...s,n,...o,...l]:i}(e,t,s):function(t,e,i){if(0===t)return i;const s=i.slice(0,t-1),o=i.slice(t,e+1),l=i.slice(e+1);return[...s,...o,i[t-1],...l]}(t,e,s)}(o,n,i,e)}function r({from:t,to:e,selectedFrom:i,selectedTo:s}){return e=[...e.map((t=>d(t,!1))),...t.map((t=>d(t,!0)))],i=[],s=[...t.map((({id:t})=>t))],{from:t=[],to:e,selectedFrom:i,selectedTo:s}}function a({from:t,to:e,selectedFrom:i,selectedTo:s,insertIndex:o=e.length}){if(!t.length)return{from:t,to:e,selectedFrom:i,selectedTo:s};const l=function(t,e,i){const s=t.map((t=>t.id)),o=e.filter((t=>!s.includes(t)));return i.filter((({id:t})=>o.includes(t)))}(e,i,t);if(!l.length)return{from:t,to:e,selectedFrom:i,selectedTo:s};let n=e.map((t=>d(t,!1)));return n.splice(o,0,...l.map((t=>d(t,!0)))),{from:t.filter((t=>!i.includes(t.id))),to:n,selectedFrom:[],selectedTo:[...i]}}function d(t,e){return Object.assign(Object.assign({},t),{selected:e})}const c=class{constructor(i){t(this,i),this.ezLeftListChanged=e(this,"ezLeftListChanged",7),this.ezRightListChanged=e(this,"ezRightListChanged",7),this.LEFT_LIST_ID="LEFT-LIST-ID",this.RIGHT_LIST_ID="RIGHT-LIST-ID",this.leftList=[],this.leftTitle=void 0,this.rightList=[],this.entityLabel="item",this.entityLabelPlural="itens",this.leftListLabel="disponíveis",this.rightListLabel="selecionados",this.useOnlyRightList=!1,this.rightTitle=void 0,this.emptyMessage=void 0,this.slotsListBuilder=void 0,this.leftFilteredList=[],this.rightFilteredList=[],this.selectedLeftList=[],this.selectedRightList=[],this.isFilteringLeft=!1,this.isFilteringRight=!1}async resetSelectedLists(){this.selectedLeftList=[],this.selectedRightList=[]}observeLeftList(t,e){o.equals(t,e)||this.ezLeftListChanged.emit(t)}observeRightList(t,e){o.equals(t,e)||this.ezRightListChanged.emit(t)}async componentWillLoad(){this.i18n=await n()}async handleChangeLeft({detail:t}){t.to.getAttribute("id")&&t.to.getAttribute("id")===this.RIGHT_LIST_ID?(t.selectItens=t.selectItens.filter((t=>this.rightList.every((e=>e.id!==t)))),this.leftList=[...t.dataSource],this.selectedLeftList=[...t.selectItens],this.transferToRight(null==t?void 0:t.newIndex)):this.leftList=[...this.reorderArray(t.dataSource,t.selectItens,t.newIndex)]}async handleChangeRight({detail:t}){t.to.getAttribute("id")&&t.to.getAttribute("id")===this.LEFT_LIST_ID?(t.selectItens=t.selectItens.filter((t=>this.leftList.every((e=>e.id!==t)))),this.rightList=[...t.dataSource],this.selectedRightList=[...t.selectItens],this.transferToLeft(null==t?void 0:t.newIndex)):this.rightList=[...this.reorderArray(t.dataSource,t.selectItens,t.newIndex)]}reorderArray(t,e,i){const s=t.filter((t=>!e.includes(t.id))),o=t.filter((t=>e.includes(t.id)));return s.splice(i,0,...o),s}enableTransferAllToRight(){return this.leftList.length>0}enableTransferAllToLeft(){return this.rightList.length>0}enableTransferToRight(){return this.selectedLeftList.length>0}enableTransferToLeft(){return this.selectedRightList.length>0}enableMoveUp(t){if(this.isFilteringRight)return!1;const e=this.getRightSelectedItemsIndex();return this.selectedRightList.length>0&&!e.includes(0)&&(!!t||l(e))}enableMoveDown(t){if(this.isFilteringRight)return!1;const e=this.getRightSelectedItemsIndex();return this.selectedRightList.length>0&&!e.includes(this.rightList.length-1)&&(!!t||l(e))}getRightSelectedItemsIndex(){return this.selectedRightList.map((t=>this.rightList.findIndex((e=>e.id===t))))}transferToRight(t){const{from:e,to:i,selectedFrom:s,selectedTo:o}=a(Object.assign(Object.assign({},this.buildTransferToRightConfig()),{insertIndex:null!=t?t:0}));this.leftList=[],requestAnimationFrame((()=>this.leftList=[...e])),this.rightList=[...i],this.selectedLeftList=[...s],this.selectedRightList=[...o]}transferToLeft(t){const{from:e,to:i,selectedFrom:s,selectedTo:o}=a(Object.assign(Object.assign({},this.buildTransferToLeftConfig()),{insertIndex:null!=t?t:0}));this.rightList=[],requestAnimationFrame((()=>this.rightList=[...e])),this.leftList=[...i],this.selectedRightList=[...s],this.selectedLeftList=[...o]}async handleTransferAllToRight(){const{from:t,to:e,selectedFrom:i,selectedTo:s}=r(this.buildTransferToRightConfig());this.leftList=[...t],this.rightList=[...e],this.selectedLeftList=[...i],this.selectedRightList=[...s],requestAnimationFrame((async()=>{await this.clearSelectionAll()}))}async handleTransferAllToLeft(){const{from:t,to:e,selectedFrom:i,selectedTo:s}=r(this.buildTransferToLeftConfig());this.rightList=[...t],this.leftList=[...e],this.selectedRightList=[...i],this.selectedLeftList=[...s],requestAnimationFrame((async()=>{await this.clearSelectionAll()}))}buildTransferToRightConfig(){return{from:this.leftList,to:this.rightList,selectedFrom:this.selectedLeftList,selectedTo:this.selectedRightList}}buildTransferToLeftConfig(){return{from:this.rightList,to:this.leftList,selectedFrom:this.selectedRightList,selectedTo:this.selectedLeftList}}handleMoveUp(){this.rightList=[...h(this.selectedRightList,this.rightList,!1)]}handleMoveDown(){this.rightList=[...h(this.selectedRightList,this.rightList,!0)]}handleMoveToTop(){const{itemsToKeep:t,itemsToMove:e}=this.getItemsToKeepAndToMove();this.rightList=[...e,...t]}handleMoveToBottom(){const{itemsToKeep:t,itemsToMove:e}=this.getItemsToKeepAndToMove();this.rightList=[...t,...e]}handleSelectLeftItem({detail:t}){this.selectedLeftList=[...t.map((({id:t})=>t))]}handleSelectRightItem({detail:t}){this.selectedRightList=[...t.map((({id:t})=>t))]}getItemsToKeepAndToMove(){return{itemsToKeep:this.rightList.filter((t=>!this.selectedRightList.includes(t.id))),itemsToMove:this.rightList.filter((t=>this.selectedRightList.includes(t.id)))}}async handleTransferToRight(){this.transferToRight(),this.leftFilteredList=[],await this.leftEzListInstance.clearSelection()}async handleTransferToLeft(){this.transferToLeft(),this.rightFilteredList=[],await this.rightEzListInstance.clearSelection()}async clearSelectionAll(){await this.rightEzListInstance.clearSelection(),await this.leftEzListInstance.clearSelection()}handleChooseLeft(){requestAnimationFrame((async()=>{await this.rightEzListInstance.clearSelection()}))}handleChooseRight(){this.useOnlyRightList||requestAnimationFrame((async()=>{await this.leftEzListInstance.clearSelection()}))}renderList(t){const{idSortableList:e,list:s,isFiltering:o,filteredList:l,emptyMessage:n,slotConfig:h,callbacks:r,title:a}=t;return i("ez-sortable-list",{ref:null==r?void 0:r.setRef,title:a,idSortableList:e,emptyMessage:n,class:"ez-size-height--full",dataSource:o?l:s,hoverFeedback:!0,enableMultipleSelection:!0,removeItensMoved:!0,entityLabel:this.entityLabel,entityLabelPlural:this.entityLabelPlural,itemRightSlotBuilder:null==h?void 0:h.itemRightSlotBuilder,itemLeftSlotBuilder:null==h?void 0:h.itemLeftSlotBuilder,onItemsReordered:null==r?void 0:r.onChange.bind(this),onEzSelectItens:null==r?void 0:r.onSelect.bind(this),onEzDoubleClick:null==r?void 0:r.onDoubleClick.bind(this),onEzChoose:null==r?void 0:r.onChoose.bind(this)})}render(){var t,e,o,l,n,h,r,a,d,c;return i(s,null,!this.useOnlyRightList&&i("div",{class:"list__container"},this.leftList&&this.renderList({idSortableList:this.LEFT_LIST_ID,list:this.leftList,title:this.leftTitle,isFiltering:this.isFilteringLeft,filteredList:this.leftFilteredList,emptyMessage:(null===(t=this.emptyMessage)||void 0===t?void 0:t.LEFT_LIST)?this.emptyMessage.LEFT_LIST:this.i18n("ez-double-list.noItemsAvailable",{entity:this.entityLabel}),slotConfig:{itemRightSlotBuilder:null===(o=null===(e=this.slotsListBuilder)||void 0===e?void 0:e.LEFT_LIST)||void 0===o?void 0:o.itemRightSlotBuilder,itemLeftSlotBuilder:null===(n=null===(l=this.slotsListBuilder)||void 0===l?void 0:l.LEFT_LIST)||void 0===n?void 0:n.itemLeftSlotBuilder},callbacks:{setRef:t=>this.leftEzListInstance=t,onChange:t=>this.handleChangeLeft(t),onSelect:this.handleSelectLeftItem.bind(this),onDoubleClick:this.handleTransferToRight.bind(this),onChoose:this.handleChooseLeft.bind(this)}})),!this.useOnlyRightList&&i("div",{class:"actions__column"},i("ez-button",{mode:"icon",iconName:"dual-chevron-right",enabled:this.enableTransferAllToRight(),title:this.i18n("ez-double-list.moveAllTo",{list:this.rightListLabel}),size:"small",onClick:this.handleTransferAllToRight.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-right",enabled:this.enableTransferToRight(),title:this.i18n("ez-double-list.moveTo",{list:this.rightListLabel}),size:"small",onClick:this.handleTransferToRight.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-left",enabled:this.enableTransferToLeft(),title:this.i18n("ez-double-list.moveTo",{list:this.leftListLabel}),size:"small",onClick:this.handleTransferToLeft.bind(this)}),i("ez-button",{mode:"icon",iconName:"dual-chevron-left",enabled:this.enableTransferAllToLeft(),title:this.i18n("ez-double-list.moveAllTo",{list:this.leftListLabel}),size:"small",onClick:this.handleTransferAllToLeft.bind(this)})),i("div",{class:"list__container"},this.rightList&&this.renderList({idSortableList:this.RIGHT_LIST_ID,list:this.rightList,title:this.rightTitle,isFiltering:this.isFilteringRight,filteredList:this.rightFilteredList,emptyMessage:(null===(h=this.emptyMessage)||void 0===h?void 0:h.RIGHT_LIST)?this.emptyMessage.RIGHT_LIST:this.i18n("ez-double-list.noItemsSelected",{entity:this.entityLabel}),slotConfig:{itemRightSlotBuilder:null===(a=null===(r=this.slotsListBuilder)||void 0===r?void 0:r.RIGHT_LIST)||void 0===a?void 0:a.itemRightSlotBuilder,itemLeftSlotBuilder:null===(c=null===(d=this.slotsListBuilder)||void 0===d?void 0:d.RIGHT_LIST)||void 0===c?void 0:c.itemLeftSlotBuilder},callbacks:{setRef:t=>this.rightEzListInstance=t,onChange:t=>this.handleChangeRight(t),onSelect:this.handleSelectRightItem.bind(this),onDoubleClick:this.handleTransferToLeft.bind(this),onChoose:this.handleChooseRight.bind(this)}})),i("div",{class:"actions__column"},i("ez-button",{mode:"icon",iconName:"dual-chevron-up",enabled:this.enableMoveUp(!0),title:this.i18n("ez-double-list.moveToFirstPosition"),size:"small",onClick:this.handleMoveToTop.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-up",enabled:this.enableMoveUp(),title:this.i18n("ez-double-list.moveUp"),size:"small",onClick:this.handleMoveUp.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-down",enabled:this.enableMoveDown(),title:this.i18n("ez-double-list.moveDown"),size:"small",onClick:this.handleMoveDown.bind(this)}),i("ez-button",{mode:"icon",iconName:"dual-chevron-down",enabled:this.enableMoveDown(!0),title:this.i18n("ez-double-list.moveToLastPosition"),size:"small",onClick:this.handleMoveToBottom.bind(this)})))}static get watchers(){return{leftList:["observeLeftList"],rightList:["observeRightList"]}}};c.style='.sc-ez-double-list-h{display:flex;flex-direction:row;gap:8px;align-items:center;font-family:var(--font-pattern, "Roboto");width:100%}@media screen and (max-width: 1366px){.group.sc-ez-double-list{height:350px}}.list__container.sc-ez-double-list{height:100%;width:100%;min-height:150px;overflow:auto;display:flex}.actions__column.sc-ez-double-list{display:flex;flex-direction:column;gap:4px}';export{c as ez_double_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={PREVIEW:"preview",UNDO:"undo",REDO:"redo",FORMAT:"format",LINK:"link",IMAGE:"image",FOCUS:"focus"},l={BOLD:"<strong>$selection</strong>",ITALIC:"<em>$selection</em>",UNDERLINE:"<u>$selection</u>",LIST:"<ul><li>$selection</li></ul>",BREAK_LINE:"\n<br/>\n"},i={PREVIEW:"Ctrl + P",UNDO:"undo",REDO:"redo",LINK:"link",IMAGE:"image-plus",LIST:"list",UNDERLINE:"underline",ITALIC:"italic",BOLD:"bold"};export{l as R,e as a,i as b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,F as s,H as r}from"./p-23a36bb6.js";import{StringUtils as l,ElementIDUtils as o}from"@sankhyalabs/core";import{p as a}from"./p-80dfc50b.js";import{i as c}from"./p-4773ff4c.js";const n=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezSelectItem=i(this,"ezSelectItem",7),this.ezSelectMultipleItems=i(this,"ezSelectMultipleItems",7),this.ezCheckChange=i(this,"ezCheckChange",7),this.ezDoubleClick=i(this,"ezDoubleClick",7),this._listItemsHistory=[],this._listItems=[],this._listGroupItems=[],this.dataSource=[],this.listMode="regular",this.useGroups=!1,this.ezDraggable=!1,this.ezSelectable=!1,this.itemSlotBuilder=void 0,this.itemLeftSlotBuilder=void 0,this.hoverFeedback=!1,this.enableMultipleSelection=!1}async clearHistory(){this._listItemsHistory=[]}async scrollToTop(){this.useGroups?this._element.querySelector(".group-container").scrollTop=0:this._element.querySelector(".items-container").scrollTop=0}async setSelection(t,i,e,s){t&&this.ezSelectable?this.useGroups?this.setSelectionWithGroups(t,i):this.enableMultipleSelection&&s?this.setSelectionMultiple(t):this.enableMultipleSelection&&e?this.setSelectionRange(t):(this.setSelectionSingleItem(t,i),this.emitSelectedItems(t)):await this.removeSelection()}emitSelectedItems(t,i){this.ezSelectItem.emit(t),this.ezSelectMultipleItems.emit(null!=i?i:[t])}setSelectionRange(t){const i=this._listItems.findIndex((t=>t.selected)),e=this._listItems.findIndex((i=>i.id===t.id));if(i<0||i===e)return void this.setSelectionSingleItem(t);const s=Math.min(i,e),r=Math.max(i,e);let l=[...this._listItems];l.forEach(((t,i)=>{t.selected=i>=s&&i<=r})),this._listItems=[...l];const o=this._listItems.filter((t=>t.selected));this.emitSelectedItems(t,o)}setSelectionMultiple(t){let i=[...this._listItems];i.forEach((i=>{i.selected=i.id===t.id?!i.selected:i.selected})),this._listItems=[...i];const e=this._listItems.filter((t=>t.selected));this.emitSelectedItems(t,e)}setSelectionSingleItem(t,i){this.emitSelectedItems(t);let e=[...this._listItems];if(e.forEach((i=>{i.selected=i.id===t.id})),this._listItems=e,!i)return;let s=this._itemContainer.querySelector("li#item_"+t.id);s&&s.scrollIntoView()}setSelectionWithGroups(t,i){this.emitSelectedItems(t);let e=[...this._listGroupItems];if(e.forEach((i=>{i.items.forEach((i=>{i.selected=i.id===t.id}))})),this._listGroupItems=e,!i)return;let s=this._groupContainer.querySelector("li#item_"+t.id);s&&s.scrollIntoView()}async getSelection(){if(!this.useGroups)return this._listItems.find((t=>1==t.selected));let t;return this._listGroupItems.every((i=>{let e=i.items.find((t=>1==t.selected));return!e||(t=e,!1)})),t}async getList(){return this.useGroups?this._listGroupItems:this._listItems}async removeSelection(){if(this.useGroups){let t=[...this._listGroupItems];return t.forEach((t=>{t.items.forEach((t=>{t.selected=!1}))})),void(this._listGroupItems=t)}let t=[...this._listItems];t.forEach((t=>t.selected=!1)),this._listItems=t}applyUUID(t){t.id||(t.id=l.generateUUID())}createList(){if(this.useGroups){let t=this.dataSource.map((t=>t));t.forEach((t=>{t.items.map(this.applyUUID),this.sortGroup(t)})),this._listGroupItems=t}else this._listItems=this._listItemsHistory.length>0?this._listItemsHistory:this.dataSource.map((t=>(this.applyUUID(t),t)))}sortGroup(t){t.sort&&(t.items.sort((function(t,i){return t.label<i.label?-1:t.label>i.label?1:0})),"DSC"===t.sort&&t.items.reverse())}buildIdDraggableListAndSelectable(){const t=this._element.querySelectorAll(".draggable-list");null==t||t.forEach(((t,i)=>{var e,s;let r="draggableList";const l=null===(s=null===(e=this._listGroupItems)||void 0===e?void 0:e[i])||void 0===s?void 0:s.group;this.useGroups&&l&&(r=r.concat("_",l)),o.addIDInfoIfNotExists(t,r)}));const i=this._element.querySelectorAll(".selectable-container");null==i||i.forEach((t=>{o.addIDInfoIfNotExists(t,"selectable")}))}async componentWillLoad(){this.i18n=await c(),this._listItemsHistory=[]}componentWillRender(){this.createList(),this._element&&this.buildIdDraggableListAndSelectable()}componentDidLoad(){o.addIDInfo(this._element)}onDrop(t,i){t.stopPropagation(),this.removeOverClass(),this._dragStartItem&&(this.useGroups?this.onDropWithGroups(i):(this._listItems=[...a(this.buildDragHandlerConfig(i.index,!1))],this._listItemsHistory=[...this._listItems],this.ezChange.emit(this._listItems)))}buildDragHandlerConfig(t,i){return{listItems:this._listItems,dragItem:this._dragStartItem,enableMultipleSelection:this.enableMultipleSelection,targetIndex:t,moveToFinal:i,clearSelection:()=>this.setSelection(void 0)}}onDropWithGroups(t){this.setSelection(void 0);let i=[...this._listGroupItems],e=this._listGroupItems.find((i=>t.groupName==i.group));if(i.find((t=>t.group==this._dragStartItem.groupName)).items.splice(this._dragStartItem.index,1),e.sort)i.find((i=>i.group==t.groupName)).items.push(this._dragStartItem.item),i.find((i=>i.group==t.groupName)).items.sort((function(t,i){return t.label<i.label?-1:t.label>i.label?1:0})),"DSC"===e.sort&&i.find((i=>i.group==t.groupName)).items.reverse();else{let e=t.index>this._dragStartItem.index?t.index-1:t.index;i.find((i=>i.group==t.groupName)).items.splice(e,0,this._dragStartItem.item)}this._listGroupItems=i,this.ezChange.emit(this._listGroupItems)}onDropLastIndex(t,i){t.stopPropagation(),this.removeOverClass(),this._dragStartItem&&(this.useGroups?this.onDropLastItemWithGroups(i):(this._listItems=[...a(this.buildDragHandlerConfig(this._listItems.length-1,!0))],this._listItemsHistory=[...this._listItems],this.ezChange.emit(this._listItems)))}onDropLastItemWithGroups(t){this.setSelection(void 0);let i=[...this._listGroupItems],e=this._listGroupItems.find((i=>t.group==i.group));i.find((t=>t.group==this._dragStartItem.groupName)).items.splice(this._dragStartItem.index,1),i.find((i=>i.group==t.group)).items.push(this._dragStartItem.item),e.sort&&(i.find((i=>i.group==t.group)).items.sort((function(t,i){return t.label<i.label?-1:t.label>i.label?1:0})),"DSC"===e.sort&&i.find((i=>i.group==t.group)).items.reverse()),this._listGroupItems=i,this.ezChange.emit(this._listGroupItems)}onDropGroup(t){var i;let e=[...this._listGroupItems];this.setSelection(void 0);let s=e.find((i=>i.group===t.group));if(s){if((null===(i=s.items)||void 0===i?void 0:i.length)>0){let t;s.items.forEach(((i,e)=>{i.id===this._dragStartItem.item.id&&(t={item:i,index:e})})),t?(s.items.splice(t.index,1),s.items.unshift(t.item),this.sortGroup(s)):(s.items.unshift(this._dragStartItem.item),this.sortGroup(s),e.find((t=>t.group===this._dragStartItem.groupName)).items.splice(this._dragStartItem.index,1))}else e.find((t=>t.group===this._dragStartItem.groupName)).items.splice(this._dragStartItem.index,1),s.items=[this._dragStartItem.item];this._listGroupItems=e}}onDragEnd(){this._dragStartItem=void 0,this.useGroups&&this.hideOverlays()}addOverClass(t){(null==t?void 0:t.__proto__)==HTMLDivElement.prototype&&t.classList.contains("draggable")?t.classList.add("over"):(null==t?void 0:t.parentElement)&&!t.parentElement.classList.contains("draggable-list")&&this.addOverClass(t.parentElement)}addOverGroupClass(t,i){if(t.target){let t=this._groupContainer.querySelector("div#"+this.getDivGroupId(i.group)).getElementsByClassName("group-overlay")[0];i.items.length>0?t.setAttribute("style","display:grid"):(t.classList.add("presetedHeight"),t.setAttribute("style","display:grid"),t.scrollIntoView(!1))}}removeOverClass(){var t,i;let e,s;this.useGroups?(e=null===(t=this._groupContainer)||void 0===t?void 0:t.getElementsByClassName("over"),s=this._groupContainer.getElementsByClassName("last-droppable-space")):(e=null===(i=this._itemContainer)||void 0===i?void 0:i.getElementsByClassName("over"),s=this._itemContainer.getElementsByClassName("last-droppable-space")),e&&Array.from(e).forEach((function(t){t.classList.remove("over")})),s&&Array.from(s).forEach((function(t){t.classList.remove("over")}))}removeOverGroupClass(t,i){if(t.target){let t=this._groupContainer.querySelector("div#"+this.getDivGroupId(i.group)).getElementsByClassName("group-overlay")[0];t&&(t.classList.remove("presetedHeight"),t.setAttribute("style","display:none"))}}onDragStart(t,i,e){this._changeDeboucingTimeout&&window.clearTimeout(this._changeDeboucingTimeout),this.useGroups?this.onDragStartWithGroups(i,t,e):this._dragStartItem={item:t.item,index:t.index}}onDragStartWithGroups(t,i,e){this._dragStartItem={groupName:t.group,item:i,index:e},this._changeDeboucingTimeout=window.setTimeout((()=>{this.showOverlays(t)}),10)}selectFirstItem(){this.setSelection(this.useGroups?this._listGroupItems[0].items[0]:this._listItems[0])}nextOption(t){if(this.useGroups)return void this.setSelection(this.nextOptionWithGroups(t),!0);let i,e=this._listItems.findIndex((i=>i.id===t.id));e>=0&&e<this._listItems.length&&(i=this._listItems[e+1]),this.setSelection(i,!0)}nextOptionWithGroups(t){let i;return this._listGroupItems.every(((e,s,r)=>{let l,o=e.items.findIndex((i=>i.id==t.id));return null!=o&&-1!=o&&(o===e.items.length-1?s+1<=r.length-1&&(l={label:r[s+1].items[0].label}):l={label:e.items[o+1].label}),null==l||(i=l,!1)})),i}previousOption(t){if(this.useGroups)return void this.setSelection(this.previousOptionWithGroups(t),!0);let i,e=this._listItems.findIndex((i=>i.id===t.id));e>0&&e<this._listItems.length&&(i=this._listItems[e-1]),this.setSelection(i,!0)}previousOptionWithGroups(t){let i;return this._listGroupItems.every(((e,s,r)=>{let l,o=e.items.findIndex((i=>i.id===t.id));return null!=o&&-1!=o&&(0===o?s-1>=0&&(l={label:r[s-1].items[r[s-1].items.length-1].label}):l={label:e.items[o-1].label}),null==l||(i=l,!1)})),i}keyDownHandler(t){t.ctrlKey||t.preventDefault(),this.getSelection().then((i=>{if(i)switch(t.key){case"ArrowDown":this.nextOption(i);break;case"ArrowUp":this.previousOption(i)}else this.selectFirstItem()})),t.stopPropagation()}getDivGroupId(t){if(t)return"group-"+t.replace(/[^a-z0-9_]/gi,"_")}getGroupOverlayId(t){if(t)return"group-overlay-"+t.replace(/[^a-z0-9_]/gi,"_")}onDragOverGroup(t,i){this._dragStartItem&&this._dragStartItem.groupName!==i.group&&i.sort&&(t.preventDefault(),this.addOverGroupClass(t,i))}onDragOverItem(t){this._dragStartItem&&(t.preventDefault(),this.addOverClass(t.target),t.stopPropagation())}onDragOverLastIndex(t){t.preventDefault(),this._dragStartItem&&(t.target.classList.add("over"),t.stopPropagation())}showOverlays(t){let i=this._groupContainer.getElementsByClassName("group-overlay");Array.from(i).forEach((i=>{let e=this.getGroupOverlayId(t.group);e&&i.getAttribute("id")&&e!=i.getAttribute("id")&&(i.classList.add("presetedHeight"),i.setAttribute("style","display:grid"))}))}hideOverlays(){var t;let i=null===(t=this._groupContainer)||void 0===t?void 0:t.getElementsByClassName("group-overlay");Array.from(i).forEach((t=>{t.classList.remove("presetedHeight"),t.setAttribute("style","display:none")}))}getContainerItemBuilder(t,i,s,r){var l,o;const a="left"===t?null===(l=this.itemLeftSlotBuilder)||void 0===l?void 0:l.call(this,i,s):null===(o=this.itemSlotBuilder)||void 0===o?void 0:o.call(this,i,s);if(null!=a)return"string"!=typeof a?e("div",{class:r},a):e("div",{class:r,innerHTML:a})}doubleClickItem(t){this.ezDoubleClick.emit(t)}buildItem(t,i){return{id:t.id,label:t.label,check:i.detail}}renderListWithGroups(){return e("div",{class:"group-container",ref:t=>this._groupContainer=t,tabIndex:this.ezSelectable?0:void 0,onKeyDown:t=>this.keyDownHandler(t)},this._listGroupItems.map((t=>e("div",{id:this.getDivGroupId(t.group),class:"group",key:t.group+t.items.length,onDrop:()=>this.onDropGroup(t)},e("label",{draggable:!1,class:"group-name",title:t.group},t.group),e("section",{class:"section-container",onDragOver:t=>t.preventDefault()},e("div",{class:"group-items-container"},e("div",{class:"draggable-list"},t.items.map(((i,r)=>e("li",Object.assign({id:"item_"+i.id,class:{"selectable-container":this.ezSelectable,"hover-feedback":this.hoverFeedback},key:"item_"+i.id},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:o.getInternalIDInfo(`ezListItem__${l.replaceAccentuatedChars(i.label)}`)}),e("div",{class:"draggable"+(1==i.selected?" selected-item ":"")+(1==this.ezSelectable?" selectable ":""),onDblClick:()=>this.doubleClickItem(i),onClick:()=>this.setSelection(i),onDragLeave:()=>t.sort?void 0:this.removeOverClass(),onDragEnd:()=>this.onDragEnd(),onDragStart:()=>this.onDragStart(i,t,r),onDragOver:i=>t.sort?void 0:this.onDragOverItem(i),onDrop:e=>this.onDrop(e,{groupName:t.group,item:i,index:r}),draggable:this.ezDraggable},e("div",{class:"item-content"},this.ezDraggable?e("span",{class:"draggable-icon"}):void 0,"regular"===this.listMode?e(s,null,!!this.itemLeftSlotBuilder&&this.getContainerItemBuilder("left",i,t),e("p",{title:i.label,class:"person-name text--ellipsis"},i.label)):e("ez-check",{label:i.label,value:i.check,onEzChange:t=>this.ezCheckChange.emit(this.buildItem(i,t))})),!!this.itemSlotBuilder&&this.getContainerItemBuilder("right",i,t,"slot-item")))))),e("div",{class:"last-droppable-space",onDragLeave:()=>this.removeOverClass(),onDragOver:t=>this.onDragOverLastIndex(t),onDragEnd:()=>this.onDragEnd(),onDrop:i=>this.onDropLastIndex(i,t)})),t.sort?e("div",{id:this.getGroupOverlayId(t.group),class:"group-overlay"},this.i18n("ez-list.moveToGroup",{groupName:t.group})):void 0)))))}renderList(){return e("div",{class:"items-container",ref:t=>this._itemContainer=t,tabIndex:this.ezSelectable?0:void 0,onKeyDown:t=>{this.keyDownHandler(t)}},e("div",{class:"draggable-list"},this._listItems.map(((t,i)=>e("li",Object.assign({id:"item_"+t.id,class:{"selectable-container":this.ezSelectable,"hover-feedback":this.hoverFeedback},key:"item_"+t.id},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:o.getInternalIDInfo(`ezListItem__${l.replaceAccentuatedChars(t.label)}`)}),e("div",{class:"draggable"+(1==t.selected?" selected-item ":"")+(1==this.ezSelectable?" selectable ":""),onDblClick:()=>this.doubleClickItem(t),onClick:i=>this.setSelection(t,!1,i.shiftKey,i.altKey||i.metaKey),onDragStart:()=>this.onDragStart({item:t,index:i}),onDragOver:t=>this.onDragOverItem(t),onDragLeave:()=>this.removeOverClass(),onDragEnd:()=>this.onDragEnd(),onDrop:e=>this.onDrop(e,{item:t,index:i}),draggable:this.ezDraggable},e("div",{class:"item-content"},"regular"===this.listMode?e(s,null,this.ezDraggable?e("span",{class:"draggable-icon"}):void 0,!!this.itemLeftSlotBuilder&&this.getContainerItemBuilder("left",t),e("p",{title:t.label,class:"person-name text--ellipsis"},t.label)):e(s,null,this.ezDraggable?e("span",{class:"draggable-icon"}):void 0,e("ez-check",{label:t.label,value:t.check,onEzChange:i=>this.ezCheckChange.emit({id:t.id,label:t.label,check:i.detail})}))),!!this.itemSlotBuilder&&this.getContainerItemBuilder("right",t))))),e("div",{class:"last-droppable-space",onDragLeave:()=>this.removeOverClass(),onDragOver:t=>this.onDragOverLastIndex(t),onDragEnd:()=>this.onDragEnd(),onDrop:t=>this.onDropLastIndex(t)})))}render(){return e(r,{ref:t=>this._element=t},this.useGroups?this.renderListWithGroups():this.renderList())}};n.style='.sc-ez-list-h{--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:none;--ez-list__item--border-bottom-color:none;--ez-list__item--font-family:var(--font-pattern, "Roboto");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__item--white-space:var(--ez-list__item--white-space, nowrap);--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--small, 6px);max-height:100%;width:100%;background-color:#fff;display:flex;outline:none;z-index:var(--ez-list__host--z-index)}p.sc-ez-list{margin:0}.draggable.sc-ez-list{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.sc-ez-list{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.sc-ez-list{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container.sc-ez-list{margin:0px !important}.hover-feedback.sc-ez-list:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.item-content.sc-ez-list{display:flex;align-items:center;overflow:hidden;justify-content:flex-start;width:100%}.draggable-list.sc-ez-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.sc-ez-list li.sc-ez-list{display:flex;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);border-bottom:var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color)}.draggable-list.sc-ez-list li.sc-ez-list>div.sc-ez-list{padding:var(--space--3xs, 4px) var(--space--3xs, 4px);margin:var(--ez-list__item--margin)}.over.sc-ez-list{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space.sc-ez-list{height:var(--ez-list__last-droppable-space--height)}.draggable-selected.sc-ez-list{background-color:var(--background--strong) !important}.draggable-selected.sc-ez-list div.sc-ez-list:hover{background-color:var(--background--strong) !important}.draggable-list.sc-ez-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.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.draggable-icon.sc-ez-list{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon.sc-ez-list::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)}*.sc-ez-list{box-sizing:border-box}.checkbox.sc-ez-list{width:fit-content}.text--ellipsis.sc-ez-list{overflow:hidden;text-overflow:ellipsis;white-space:var(--ez-list__item--white-space)}.group-container.sc-ez-list{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.sc-ez-list{-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.sc-ez-list{display:flex;flex-direction:column}.group-container.sc-ez-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)}.group-container.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.section-container.sc-ez-list{display:flex;position:relative;height:100%}.items-container.sc-ez-list{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.sc-ez-list{width:100%;max-height:100%;height:100%;outline:none}.items-container.sc-ez-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)}.items-container.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.group-overlay.sc-ez-list{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.sc-ez-list{min-height:100px}.overlay-text.sc-ez-list{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item.sc-ez-list{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item.sc-ez-list{align-items:flex-end}.overGroup.sc-ez-list{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}';export{n as ez_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as s,g as a}from"./p-23a36bb6.js";import{DateUtils as n,ElementIDUtils as o}from"@sankhyalabs/core";import{C as r}from"./p-ec7db713.js";import{i as h}from"./p-4773ff4c.js";const l=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.ezStartChange=e(this,"ezStartChange",7),this.ezCancelWaitingChange=e(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.mode="regular",this.canShowError=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,e){if(this._textInput&&t!=e){const i=n.validateDate(t),s=n.validateDate(e);if((null==i?void 0:i.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(i)||"";!n.strToDate(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===i?void 0:i)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}changeValue(t){const e=n.validateDate(this.value),i=n.validateDate(t);(null==e?void 0:e.getTime())!==(null==i?void 0:i.getTime())?this.value=i:this._changePending=!1}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}handleBlur(){if(this._changePending)try{const t=this._textInput.value,e=n.strToDate(t);if(e||!t){this.errorMessage="";const t=n.validateDate(this.value),i=n.validateDate(e);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):(this._focused=!1,this.changeValue(i))}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-date-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){return t?n.formatDate(t):void 0}handleInput(t){const e=n.strToDate(this._textInput.value),i=n.validateDate(this.value),s=n.validateDate(e);(null==i?void 0:i.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}async componentWillLoad(){this.i18n=await h()}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return o.addIDInfoIfNotExists(this._elem,"input"),i(s,null,i("ez-text-input",{"data-element-id":o.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError,alternativePlaceholder:this.alternativePlaceholder},i("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},slot:"leftIcon"})),i("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none"},i("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":o.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()}})))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};l.style=':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:not-allowed}.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)}';export{l as ez_date_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,g as s,H as e}from"./p-
|
|
1
|
+
import{r as t,h as i,g as s,H as e}from"./p-23a36bb6.js";import{JSUtils as h,ElementIDUtils as o}from"@sankhyalabs/core";const l=class{constructor(i){t(this,i),this._dataKey=""}async show(t){t!==this._focusedIndex&&0<=t&&t<this._totalStackItems&&(this.policyHideRemove(),this.policyShowAppend(t),this._focusedIndex=t)}async getSelectedIndex(){return this._focusedIndex}policyHideRemove(){let t=this._hostElem.querySelector(`#${this._dataKey}_el_${this._focusedIndex}`);this.checkElementVisibility(t)}policyShowAppend(t){let i=this._hostElem.querySelector(`#${this._dataKey}_el_${t}`);i?i.removeAttribute("style"):this._hostElem.append(this._elemList[t])}checkElementVisibility(t){"hide"!==t.getAttribute("hidePolicy")&&t.getAttribute("hidePolicy")?"remove"===t.getAttribute("hidePolicy")&&t.remove():t.setAttribute("style","display: none")}componentWillRender(){this._dataKey="id_".concat(h.generateUUID()),this._elemList||(this._elemList=[],this._focusedIndex=0,this._totalStackItems=0,this._hostElem.classList.add("ez-view-stack__container"),this._hostElem.querySelectorAll(":scope > stack-item").forEach(((t,i)=>{t.setAttribute("id",`${this._dataKey}_el_${i}`),0!==i&&this.checkElementVisibility(t),this._totalStackItems++,this._elemList.push(t)})))}componentDidLoad(){o.addIDInfo(this._hostElem)}disconectCallback(){this._hostElem=null,this._elemList=null}render(){return i(e,null)}get _hostElem(){return s(this)}};l.style=":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";export{l as ez_view_stack}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as i,h as a,H as t,g as r}from"./p-23a36bb6.js";import{ElementIDUtils as s}from"@sankhyalabs/core";import{E as n}from"./p-98bb8b16.js";import{i as o}from"./p-4773ff4c.js";const d=class{constructor(a){e(this,a),this.ezSelectionChange=i(this,"ezSelectionChange",7),this.open=!0,this.selectedId=void 0,this.items=[],this.tooltipResolver=void 0,this.filterText=""}async disableItem(e){[].concat(e).forEach((e=>this._tree.disableItem(e)))}async openGuideNavidator(){this.open=!0}async enableItem(e){[].concat(e).forEach((e=>this._tree.enableItem(e)))}async updateItem(e){[].concat(e).forEach((e=>this._tree.updateItem(e)))}async getItem(e){return this._tree.getItem(e)}async getCurrentPath(){var e;return null===(e=this._tree)||void 0===e?void 0:e.getCurrentPath()}async selectGuide(e){null!=this._tree&&null!=e&&(this._tree.selectItem(e),this.getCurrentPath().then((e=>{null==e||e.forEach((e=>{this._tree.openItem(e.id)}))})))}async getParent(e){return this._tree.getParent(e)}async componentWillLoad(){this.i18n=await o()}async handleToggleSidebar(){this.open=!this.open}handleFilterTree(e){"Enter"===e.key&&this._tree.applyFilter(this.filterText)}onFilterChanged(e){this.filterText=e.detail,e.stopPropagation()}render(){return s.addIDInfoIfNotExists(this._element),a(t,null,a("ez-sidebar-button",{class:this.open?"hidden":"",onEzClick:this.handleToggleSidebar.bind(this),"aria-controls":"navigator","aria-expanded":this.open,"data-element-id":s.getInternalIDInfo("openButton")}),a("aside",{tabIndex:-1,id:"navigator",class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-guide-navigator "+(this.open?"":"hidden"),"data-element-id":s.getInternalIDInfo("sidebar")},a("div",{role:"search",class:"ez-guide-navigator__actions"},a("ez-filter-input",{mode:"slim",value:this.filterText,onEzChange:e=>this.onFilterChanged(e),label:this.i18n("ez-guide-navigator.searchGuide"),"aria-placeholder":this.i18n("ez-guide-navigator.searchGuide"),onKeyUp:this.handleFilterTree.bind(this),"data-element-id":s.getInternalIDInfo("textinput")}),a("ez-button",{onClick:this.handleToggleSidebar.bind(this),class:"inverted",mode:"icon",size:"small",iconName:"show_menu",title:this.i18n("ez-guide-navigator.hideMenu"),"aria-label":this.i18n("ez-guide-navigator.hideMenu"),"aria-controls":"navigator","data-element-id":s.getInternalIDInfo("closeButton")})),a("ez-scroller",{direction:n.VERTICAL,activeShadow:!0},a("ez-tree",{ref:e=>this._tree=e,items:this.items,"data-element-id":s.getInternalIDInfo("tree"),tooltipResolver:this.tooltipResolver,onEzChange:e=>this.ezSelectionChange.emit(e.detail),selectedId:this.selectedId}))))}get _element(){return r(this)}};d.style=":host{--ez-guide-navigator--padding-left:var(--space--large);--ez-guide-navigator--padding-right:var(--space--small);--ez-guide-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-guide-navigator--background-color:var(--color--inverted);--ez-guide-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-guide-navigator--actions-gap:var(--space--medium);--ez-guide-navigator--actions-margin:var(--space--large) 0 var(--space--medium);--ez-guide-navigator--actions-padding-right:calc(var(--space--medium, 12px) + var(--space--small, 6px))}.inverted{transform:rotate(180deg)}.ez-guide-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;padding-left:var(--ez-guide-navigator--padding-left);padding-right:var(--ez-guide-navigator--padding-right);background-color:var(--ez-guide-navigator--background-color);-webkit-box-shadow:var(--ez-guide-navigator--box-shadow);box-shadow:var(--ez-guide-navigator--box-shadow);border-radius:var(--ez-guide-navigator--border-radius)}.ez-guide-navigator__actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-guide-navigator--actions-gap);margin:var(--ez-guide-navigator--actions-margin);padding-right:var(--ez-guide-navigator--actions-padding-right)}.hidden{display:none}";export{d as ez_guide_navigator}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as o,g as e}from"./p-23a36bb6.js";import{ObjectUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import"./p-46913da7.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as l}from"./p-4773ff4c.js";import"./p-30ffb9ed.js";const a=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._lookupMode=!1,this.isOpen=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.limitCharsToSearch=3,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!0,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.autoFocus=!1,this.preventAutoFocus=!1,this.alternativePlaceholder=void 0,this.textEmptyOption=void 0}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i)try{if("string"==typeof t)return void this.setInputValue();const s=this.getSelectedOption(t),o=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,s)&&(this.value=s),this.isDifferentValues(s,o)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===s?void 0:s)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(t,i){h.equals(t,i)||this.loadOptions(d.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.sanitizeValue(this.value)))}),100)}:t=>t(this.sanitizeValue(this.value)))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}isDifferentValues(t,i){return h.objectToString(t||{})!==h.objectToString(i||{})}getFormattedText(t){if(null!=t)return this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label}getText(){const t=this.getSelectedOption(this.sanitizeValue(this.value)),i=this.getFormattedText(t);if(null!=i)return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t}updateVisibleOptions(){let t=this._source||[];if(this._criteria){const i=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(i)>-1))}this.hasToAddEmptyoption(t)&&(t=[{value:void 0,label:this.textEmptyOption||this.i18n("ez-combo-box.placeholder")}].concat(t)),this._visibleOptions=t,this._maxWidthValue=this.getMaxWidthValue()}hasToAddEmptyoption(t){return!this.suppressEmptyOption&&!t.filter((t=>!t.value)).length}getMaxWidthValue(){var t;if(this.showOptionValue){const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}async showOptions(){var t,i;if(!this.enabled)return;await this.openPopover();const s=null!==(i=null===(t=this.value)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value,o=this._visibleOptions.findIndex((t=>t.value===s));this._preSelection=-1===o?0:o,this._resizeObserver&&this._resizeObserver.observe(this._textInput),this.preventAutoFocus||await this.setFocus()}hideOptions(){var t;null===(t=this._popover)||void 0===t||t.hide(),this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,t.then((t=>{this._showLoading=!1,this.updateSource(t)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1)):this.selectOption(t))}selectOption(t,i=!0){var s,o,e;const h=this.getSelectedOption(this.value);(null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.toString())||null==h&&null!=t&&"value"in t?(this.value=(null==t?void 0:t.value)?t:void 0,null===(e=this._popover)||void 0===e||e.hide()):this.resetOptions(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.sanitizeValue(this.value)?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue(!1)}),this._deboucingTime)}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}sanitizeValue(t){if("undefined"!==t&&"null"!==t)return t}async componentWillLoad(){if(this.i18n=await l(),void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value");s||(s=i),this.options.push({label:i,value:s}),t.hidden=!0}))}this.loadOptions(d.PRELOAD)}setResizeObserver(){this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&this._textInput&&this._comboBoxList&&(this._comboBoxList.width=this._textInput.clientWidth)}))}))}connectedCallback(){this._resizeObserver||this.setResizeObserver()}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this.setResizeObserver(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._popover)||void 0===t||t.remove(),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}handlerIconClick(){this.showOptions()}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim();this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this.updateVisibleOptions(),this.showOptions()):(this._preSelection=void 0,this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.showOptions()}keyDownHandler(t){var i,s,o,e,h,r;if(t.ctrlKey&&("f"===t.key||"F"===t.key))return this.loadOptions(d.ADVANCED),t.preventDefault(),void t.stopPropagation();switch(t.key){case"ArrowDown":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(i=this._comboBoxList)||void 0===i||i.nextOption());break;case"ArrowUp":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(s=this._comboBoxList)||void 0===s||s.previousOption());break;case"Enter":this.isOpen&&(t.preventDefault(),null===(o=this._comboBoxList)||void 0===o||o.selectCurrentOption());break;case"Escape":this.isOpen&&(t.preventDefault(),null===(e=this._popover)||void 0===e||e.hide());break;case"Tab":this._tabPressed=!0,this.isOpen&&(null===(h=this._comboBoxList)||void 0===h||h.selectCurrentOption(),null===(r=this._popover)||void 0===r||r.hide())}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}async openPopover(){var t;this.isOpen=!0,await(null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput))}render(){var t;return r.addIDInfoIfNotExists(this.el,"input"),s(o,null,s("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),class:"text-input-slot-container "+(this.suppressSearch?"suppressed-search-input":""),ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,alternativePlaceholder:this.alternativePlaceholder||this.i18n("ez-combo-box.placeholder")},s("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},s("ez-icon",{iconName:"chevron-down"}))),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none",onEzVisibilityChange:t=>this.isOpen=t.detail},s("ez-combo-box-list",{ref:t=>this._comboBoxList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this.i18n("ez-combo-box.noResults"),showOptionValue:this.showOptionValue,preSelection:this._preSelection,maxWidth:this._maxWidthValue,width:null===(t=this._textInput)||void 0===t?void 0:t.clientWidth,onOptionSelect:t=>this.selectOption(t),onOptionHover:t=>this._preSelection=t})))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var d;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(d||(d={})),a.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--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__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);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)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;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}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{a as ez_combo_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as t}from"./p-ab574d59.js";import{i as e}from"./p-4773ff4c.js";let n;const o=new Uint8Array(16);function s(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)}const i=[];for(let t=0;t<256;++t)i.push((t+256).toString(16).slice(1));const c={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function r(t,e,n){if(c.randomUUID&&!e&&!t)return c.randomUUID();const o=(t=t||{}).random||(t.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=o[t];return e}return function(t,e=0){return i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]}(o)}class a{static async getDefaultMessageOptions(){return this.i18n||(this.i18n=await e()),{canClose:!0,labelCancel:this.i18n("app.no"),labelConfirm:this.i18n("app.yes"),btnConfirmDanger:!1}}static async showDialog(e,n,o=null,s,i=t.DEFAULT,c){if(c){const t=await this.getDefaultMessageOptions();c=Object.assign(Object.assign({},t),c)}return new Promise((t=>{let r=document.createElement("ez-dialog");window.document.body.appendChild(r),r.show(e,n,i,s,o,c.labelCancel,c.labelConfirm,c.btnConfirmDanger,c.beforeClose).then((e=>(r.remove(),t(e))))}))}static async alert(e,n,o=null,s){return s||(s=await this.getDefaultMessageOptions()),a.showDialog(e,n,o,!1,t.WARN,s)}static async error(e,n,o=null,s){return s||(s=await this.getDefaultMessageOptions()),a.showDialog(e,n,o,!1,t.CRITICAL,s)}static async success(e,n,o=null,s){return s||(s=await this.getDefaultMessageOptions()),a.showDialog(e,n,o,!1,t.SUCCESS,s)}static async confirm(e,n,o=null,s=t.WARN,i){return i||(i=await this.getDefaultMessageOptions()),a.showDialog(e,n,o,!0,s,i)}static async message(e,n,o=null,s){return s||(s=await this.getDefaultMessageOptions()),a.showDialog(e,n,o,!1,t.DEFAULT,s)}static async info(t,e){const n=await this.getDefaultMessageOptions();e!==n&&(e=Object.assign(Object.assign({},n),e));let o=!1,s=document.querySelector("ez-toast");if(!s){s=document.createElement("ez-toast");const t=document.createElement("ez-icon");t.className="ez-margin-right--small",t.slot="icon",t.style.setProperty("--ez-icon--color","var(--color--success)"),s.appendChild(t),window.document.body.appendChild(s)}if(e.iconName){const t=s.querySelector("ez-icon");t&&(t.iconName=e.iconName,o=!0)}else o=!1;s.show(t,5e3,o,e.canClose)}static isModalContent(t){return t instanceof HTMLElement&&"EZ-MODAL-CONTAINER"===t.tagName}static async showPopup(t){var e,n;const o=document.createElement("ez-popup");window.document.body.appendChild(o);const{content:s}=t;return o.setAttribute("id",r()),o.heightMode=null!==(e=t.size)&&void 0!==e?e:"auto",o.opened=!0,a.isModalContent(s)?(o.appendChild(s),o.useHeader=!1):(o.ezTitle=null!==(n=t.title)&&void 0!==n?n:"",o.innerHTML=s),()=>o.remove()}static async showModal(t){t=Object.assign(Object.assign({},a.defaultModalProps),t);const e=document.createElement("ez-modal");return window.document.body.appendChild(e),e.setAttribute("id",r()),e.modalSize=t.size,e.align=t.position,e.heightMode=t.heightMode,e.closeEsc=t.closeEsc,e.closeOutsideClick=t.closeOutsideClick,e.scrim=t.useScrimLight?"light":"medium",t.content instanceof String||"string"==typeof t.content?e.innerHTML=t.content:e.appendChild(t.content),e.opened=!0,()=>e.remove()}static showAlerts(t){const e="EzAlertList";let n=document.getElementById(e);n||(n=document.createElement("ez-alert-list"),n.setAttribute("id",e),window.document.body.appendChild(n)),t=Object.assign(Object.assign({},a.defaultAlertListProps),t),n.itemRightSlotBuilder=t.itemRightSlotBuilder,n.enableDragAndDrop=t.enableDragAndDrop,n.enableExpand=t.enableExpand,n.opened=t.opened,n.alerts=t.alerts}}a.defaultModalProps={content:null,position:"right",size:"small",heightMode:"regular",closeOutsideClick:!0,closeEsc:!0},a.defaultAlertListProps={alerts:[],enableDragAndDrop:!0,enableExpand:!0,itemRightSlotBuilder:null,opened:!0};export{a as A}
|