@sankhyalabs/ezui 7.0.2 → 7.1.0-dev.1
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-5cc05979.js → ApplicationUtils-d04f5c94.js} +1 -1
- package/dist/cjs/{app-globals-2fbe4b17.js → app-globals-c128c97e.js} +1 -1
- package/dist/cjs/ez-actions-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
- package/dist/cjs/ez-combo-box-list_4.cjs.entry.js +3 -3
- package/dist/cjs/ez-combo-box.cjs.entry.js +2 -2
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +3 -3
- package/dist/cjs/ez-grid.cjs.entry.js +768 -108
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +2 -2
- package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +41 -4
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-item.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +2 -2
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- package/dist/cjs/{index-1be40f19.js → index-00d0166b.js} +3 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{purify-3dbde2f7.js → purify-47a2f27b.js} +1 -0
- package/dist/cjs/{search-column-39c6b195.js → search-column-9aa090ec.js} +2 -2
- package/dist/collection/components/ez-search/ez-search.js +74 -2
- package/dist/collection/utils/i18n/locales/en-us.js +1 -0
- package/dist/collection/utils/i18n/locales/es-es.js +1 -0
- package/dist/collection/utils/i18n/locales/pt-br.js +1 -0
- package/dist/custom-elements/index.js +809 -108
- package/dist/esm/{ApplicationUtils-1569f757.js → ApplicationUtils-12768f5a.js} +1 -1
- package/dist/esm/{app-globals-c0ac93c0.js → app-globals-9507c20e.js} +1 -1
- package/dist/esm/ez-actions-button.entry.js +2 -2
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-avatar.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +2 -2
- package/dist/esm/ez-combo-box-list_4.entry.js +3 -3
- package/dist/esm/ez-combo-box.entry.js +2 -2
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-double-list.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +3 -3
- package/dist/esm/ez-grid.entry.js +768 -108
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-link-builder_6.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-pagination.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +2 -2
- package/dist/esm/ez-search-result-list.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +41 -4
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-sortable-list.entry.js +1 -1
- package/dist/esm/ez-spinner.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +1 -1
- package/dist/esm/ez-split-item.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +2 -2
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +1 -1
- package/dist/esm/{index-41363fa6.js → index-62fc771e.js} +3 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{purify-2b94dec9.js → purify-dc6814bf.js} +1 -0
- package/dist/esm/{search-column-55666829.js → search-column-83562552.js} +2 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-1f8775ef.entry.js → p-02f6e3b0.entry.js} +1 -1
- package/dist/ezui/p-0b333f09.entry.js +1 -0
- package/dist/ezui/{p-859e3134.entry.js → p-0c0eb410.entry.js} +1 -1
- package/dist/ezui/{p-0f7971cf.entry.js → p-124699e0.entry.js} +1 -1
- package/dist/ezui/{p-6ca0815e.entry.js → p-1266fe78.entry.js} +1 -1
- package/dist/ezui/p-14807f4e.js +1 -0
- package/dist/ezui/{p-18384b91.entry.js → p-1730ee24.entry.js} +1 -1
- package/dist/ezui/{p-8803e321.entry.js → p-191cfbc8.entry.js} +1 -1
- package/dist/ezui/{p-39761eca.entry.js → p-1adf7139.entry.js} +1 -1
- package/dist/ezui/{p-3ce867cf.entry.js → p-1bfef8e5.entry.js} +1 -1
- package/dist/ezui/{p-d6bb930d.entry.js → p-1cde96f9.entry.js} +1 -1
- package/dist/ezui/{p-a1c0233e.js → p-228a4d2f.js} +1 -1
- package/dist/ezui/{p-7f37ee99.entry.js → p-2a70f094.entry.js} +1 -1
- package/dist/ezui/{p-5c3a6717.entry.js → p-2ba2d792.entry.js} +1 -1
- package/dist/ezui/{p-23739494.entry.js → p-2df50161.entry.js} +1 -1
- package/dist/ezui/{p-9b215871.entry.js → p-3fe05d6b.entry.js} +1 -1
- package/dist/ezui/{p-778939b2.entry.js → p-4c4f0850.entry.js} +1 -1
- package/dist/ezui/{p-d75a50a7.entry.js → p-4e1df756.entry.js} +1 -1
- package/dist/ezui/{p-4314f87a.entry.js → p-59092a66.entry.js} +1 -1
- package/dist/ezui/{p-34a476a9.entry.js → p-59a98e31.entry.js} +1 -1
- package/dist/ezui/{p-baec56c9.js → p-5a11cf56.js} +1 -1
- package/dist/ezui/{p-d5eb2fad.entry.js → p-5ab08b60.entry.js} +1 -1
- package/dist/ezui/{p-57321fc3.js → p-623161e2.js} +1 -1
- package/dist/ezui/p-6369a0cd.entry.js +1 -0
- package/dist/ezui/{p-a61fdd20.js → p-641ee538.js} +1 -1
- package/dist/ezui/{p-ce0b36d7.entry.js → p-6a9a20a0.entry.js} +1 -1
- package/dist/ezui/{p-721fd999.entry.js → p-6f119d5f.entry.js} +1 -1
- package/dist/ezui/{p-a4083a7a.entry.js → p-79277e43.entry.js} +1 -1
- package/dist/ezui/{p-f1de2cd6.entry.js → p-8bb3aeb0.entry.js} +1 -1
- package/dist/ezui/{p-35bfaa88.entry.js → p-8dc267ff.entry.js} +1 -1
- package/dist/ezui/{p-6c51ccd1.entry.js → p-957d08cd.entry.js} +1 -1
- package/dist/ezui/{p-b989a33e.entry.js → p-a401041c.entry.js} +1 -1
- package/dist/ezui/{p-9b3f3c02.entry.js → p-a7eab406.entry.js} +1 -1
- package/dist/ezui/{p-79abad9e.entry.js → p-bd6146c5.entry.js} +1 -1
- package/dist/ezui/{p-1ba2d983.entry.js → p-c943f7c4.entry.js} +1 -1
- package/dist/ezui/{p-1b5aa969.entry.js → p-d0e6911e.entry.js} +1 -1
- package/dist/ezui/p-d66bf34e.entry.js +309 -0
- package/dist/ezui/{p-14ceb733.entry.js → p-e27d7dc2.entry.js} +1 -1
- package/dist/ezui/{p-5d910b14.entry.js → p-e46a4d06.entry.js} +1 -1
- package/dist/ezui/{p-05c32903.entry.js → p-e882635e.entry.js} +1 -1
- package/dist/ezui/{p-3afa1c6e.entry.js → p-e8c6c973.entry.js} +1 -1
- package/dist/ezui/{p-02d448bb.entry.js → p-e99cbb51.entry.js} +1 -1
- package/dist/ezui/{p-2c21b2b6.entry.js → p-eee3c7ff.entry.js} +1 -1
- package/dist/types/components/ez-search/ez-search.d.ts +11 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/types/utils/i18n/locales/en-us.d.ts +1 -0
- package/dist/types/utils/i18n/locales/es-es.d.ts +1 -0
- package/dist/types/utils/i18n/locales/pt-br.d.ts +1 -0
- package/dist/types/utils/i18n/translations.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/ApplicationUtils-5cc05979.js.gz +0 -0
- package/dist/cjs/CSSVarsUtils-f20973d1.js.gz +0 -0
- package/dist/cjs/CheckMode-ecb90b87.js.gz +0 -0
- package/dist/cjs/DialogType-2114c337.js.gz +0 -0
- package/dist/cjs/EzScrollDirection-b2c99895.js.gz +0 -0
- package/dist/cjs/FocusResolver-885f2173.js.gz +0 -0
- package/dist/cjs/FormLayout-18853e70.js.gz +0 -0
- package/dist/cjs/RichToolbarHelper-ea12328f.js.gz +0 -0
- package/dist/cjs/_commonjsHelpers-537d719a.js.gz +0 -0
- package/dist/cjs/app-globals-2fbe4b17.js.gz +0 -0
- package/dist/cjs/constants-72b7e05e.js.gz +0 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-alert-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-alert.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-application.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-avatar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-badge.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-breadcrumb.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-calendar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-card-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-chart.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-check.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-chip.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-text-area.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-combo-box-list_4.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-date-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-dialog.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-double-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-dropdown.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-empty-card.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-file-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-filter-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-form-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-form.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-grid-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-grid.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-guide-navigator.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-icon.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-link-builder_6.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-list-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-loading-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-modal-container.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-modal.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-number-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-pagination.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover-core.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popup.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-progress-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-radio-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-scroller_2.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search-plus.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-skeleton.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-sortable-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-spinner.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-panel.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tabselector.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tag-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tag.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-text-area.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-text-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tile-medium.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tile.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-time-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-toast.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tooltip.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tree.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-underface.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-upload.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-view-stack.cjs.entry.js.gz +0 -0
- package/dist/cjs/ezListHelper-0d3970b4.js.gz +0 -0
- package/dist/cjs/ezui.cjs.js.gz +0 -0
- package/dist/cjs/filter-column.cjs.entry.js.gz +0 -0
- package/dist/cjs/floating-ui.dom.esm-f4d87617.js.gz +0 -0
- package/dist/cjs/index-1be40f19.js.gz +0 -0
- package/dist/cjs/index-a7b0c73d.js.gz +0 -0
- package/dist/cjs/index.cjs.js.gz +0 -0
- package/dist/cjs/loader.cjs.js.gz +0 -0
- package/dist/cjs/purify-3dbde2f7.js.gz +0 -0
- package/dist/cjs/search-column-39c6b195.js.gz +0 -0
- package/dist/cjs/searchFormatters-b7e1ed1e.js.gz +0 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.css.gz +0 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.js.gz +0 -0
- package/dist/collection/components/ez-alert/ez-alert.css.gz +0 -0
- package/dist/collection/components/ez-alert/ez-alert.js.gz +0 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.css.gz +0 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.js.gz +0 -0
- package/dist/collection/components/ez-application/ez-application.css.gz +0 -0
- package/dist/collection/components/ez-application/ez-application.js.gz +0 -0
- package/dist/collection/components/ez-avatar/ez-avatar.css.gz +0 -0
- package/dist/collection/components/ez-avatar/ez-avatar.js.gz +0 -0
- package/dist/collection/components/ez-badge/enum/sizes.js.gz +0 -0
- package/dist/collection/components/ez-badge/ez-badge.css.gz +0 -0
- package/dist/collection/components/ez-badge/ez-badge.js.gz +0 -0
- package/dist/collection/components/ez-badge/interfaces/IPosition.js.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.css.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/subcomponents/breadcrumb-item.js.gz +0 -0
- package/dist/collection/components/ez-button/ez-button.css.gz +0 -0
- package/dist/collection/components/ez-button/ez-button.js.gz +0 -0
- package/dist/collection/components/ez-calendar/ez-calendar.css.gz +0 -0
- package/dist/collection/components/ez-calendar/ez-calendar.js.gz +0 -0
- package/dist/collection/components/ez-card-item/ez-card-item.css.gz +0 -0
- package/dist/collection/components/ez-card-item/ez-card-item.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/BarChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/ColumnChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/DonutChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/LineChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/PieChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/index.js.gz +0 -0
- package/dist/collection/components/ez-chart/ez-chart.css.gz +0 -0
- package/dist/collection/components/ez-chart/ez-chart.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartAxis.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartContext.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartOptions.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartSerie.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartType.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartTypeValue.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-chart/test/mock-chart.js.gz +0 -0
- package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js.gz +0 -0
- package/dist/collection/components/ez-check/CheckMode.js.gz +0 -0
- package/dist/collection/components/ez-check/ez-check.css.gz +0 -0
- package/dist/collection/components/ez-check/ez-check.js.gz +0 -0
- package/dist/collection/components/ez-chip/ez-chip.css.gz +0 -0
- package/dist/collection/components/ez-chip/ez-chip.js.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.css.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/interfaces/IOption.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/ez-classic-input.css.gz +0 -0
- package/dist/collection/components/ez-classic-input/ez-classic-input.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/utils/maskFormatter.js.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.css.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.js.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css.gz +0 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js.gz +0 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css.gz +0 -0
- package/dist/collection/components/ez-date-input/ez-date-input.js.gz +0 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css.gz +0 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js.gz +0 -0
- package/dist/collection/components/ez-dialog/DialogType.js.gz +0 -0
- package/dist/collection/components/ez-dialog/ez-dialog.css.gz +0 -0
- package/dist/collection/components/ez-dialog/ez-dialog.js.gz +0 -0
- package/dist/collection/components/ez-double-list/doubleListHelper.js.gz +0 -0
- package/dist/collection/components/ez-double-list/ez-double-list.css.gz +0 -0
- package/dist/collection/components/ez-double-list/ez-double-list.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.css.gz +0 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/structure/DropdownItem.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/structure/SubmenuControl.js.gz +0 -0
- package/dist/collection/components/ez-empty-card/ez-empty-card.css.gz +0 -0
- package/dist/collection/components/ez-empty-card/ez-empty-card.js.gz +0 -0
- package/dist/collection/components/ez-file-item/ez-file-item.css.gz +0 -0
- package/dist/collection/components/ez-file-item/ez-file-item.js.gz +0 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.css.gz +0 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.js.gz +0 -0
- package/dist/collection/components/ez-form/ez-form.css.gz +0 -0
- package/dist/collection/components/ez-form/ez-form.js.gz +0 -0
- package/dist/collection/components/ez-form/store/form.slice.js.gz +0 -0
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js.gz +0 -0
- package/dist/collection/components/ez-form-view/ez-form-view.css.gz +0 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/interfaces/IFormViewField.js.gz +0 -0
- package/dist/collection/components/ez-form-view/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-form-view/structure/index.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/selectionHeader.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/utils/buildLocaleText.js.gz +0 -0
- package/dist/collection/components/ez-grid/ez-grid.css.gz +0 -0
- package/dist/collection/components/ez-grid/ez-grid.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/IColumnFilter.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/IGridMode.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ISelection.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ISelectionToastConfig.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js.gz +0 -0
- package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/index.js.gz +0 -0
- package/dist/collection/components/ez-grid-view/ez-grid-view.css.gz +0 -0
- package/dist/collection/components/ez-grid-view/ez-grid-view.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.css.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/interfaces/IGuideItem.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-icon/ez-icon.css.gz +0 -0
- package/dist/collection/components/ez-icon/ez-icon.js.gz +0 -0
- package/dist/collection/components/ez-list/ez-list.css.gz +0 -0
- package/dist/collection/components/ez-list/ez-list.js.gz +0 -0
- package/dist/collection/components/ez-list/ezListHelper.js.gz +0 -0
- package/dist/collection/components/ez-list-item/ez-list-item.css.gz +0 -0
- package/dist/collection/components/ez-list-item/ez-list-item.js.gz +0 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.css.gz +0 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.js.gz +0 -0
- package/dist/collection/components/ez-modal/ez-modal.css.gz +0 -0
- package/dist/collection/components/ez-modal/ez-modal.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.css.gz +0 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/index.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/modal-action.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/modal-button-status.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.css.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.js.gz +0 -0
- package/dist/collection/components/ez-number-input/ez-number-input.css.gz +0 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js.gz +0 -0
- package/dist/collection/components/ez-pagination/ez-pagination.css.gz +0 -0
- package/dist/collection/components/ez-pagination/ez-pagination.js.gz +0 -0
- package/dist/collection/components/ez-popover/ez-popover.css.gz +0 -0
- package/dist/collection/components/ez-popover/ez-popover.js.gz +0 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.css.gz +0 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js.gz +0 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css.gz +0 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js.gz +0 -0
- package/dist/collection/components/ez-popup/ez-popup.css.gz +0 -0
- package/dist/collection/components/ez-popup/ez-popup.js.gz +0 -0
- package/dist/collection/components/ez-popup/interfaces/EzButtonProps.js.gz +0 -0
- package/dist/collection/components/ez-progress-bar/ez-progress-bar.css.gz +0 -0
- package/dist/collection/components/ez-progress-bar/ez-progress-bar.js.gz +0 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.css.gz +0 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.js.gz +0 -0
- package/dist/collection/components/ez-scroller/EzScrollDirection.js.gz +0 -0
- package/dist/collection/components/ez-scroller/ez-scroller.css.gz +0 -0
- package/dist/collection/components/ez-scroller/ez-scroller.js.gz +0 -0
- package/dist/collection/components/ez-search/ez-search.css.gz +0 -0
- package/dist/collection/components/ez-search/ez-search.js.gz +0 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css.gz +0 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js.gz +0 -0
- package/dist/collection/components/ez-search/utils/searchFormatters.js.gz +0 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.css.gz +0 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js.gz +0 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css.gz +0 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css.gz +0 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.css.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.js.gz +0 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.css.gz +0 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.js.gz +0 -0
- package/dist/collection/components/ez-spinner/ez-spinner.css.gz +0 -0
- package/dist/collection/components/ez-spinner/ez-spinner.js.gz +0 -0
- package/dist/collection/components/ez-split-button/ez-split-button.css.gz +0 -0
- package/dist/collection/components/ez-split-button/ez-split-button.js.gz +0 -0
- package/dist/collection/components/ez-split-button/test/dropdownItems.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.css.gz +0 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css.gz +0 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js.gz +0 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.css.gz +0 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.js.gz +0 -0
- package/dist/collection/components/ez-tag/ez-tag.css.gz +0 -0
- package/dist/collection/components/ez-tag/ez-tag.js.gz +0 -0
- package/dist/collection/components/ez-tag-input/ez-tag-input.css.gz +0 -0
- package/dist/collection/components/ez-tag-input/ez-tag-input.js.gz +0 -0
- package/dist/collection/components/ez-tag-input/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-text-area/ez-text-area.css.gz +0 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js.gz +0 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.css.gz +0 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.js.gz +0 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css.gz +0 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js.gz +0 -0
- package/dist/collection/components/ez-tile/ez-tile.css.gz +0 -0
- package/dist/collection/components/ez-tile/ez-tile.js.gz +0 -0
- package/dist/collection/components/ez-tile-medium/ez-tile-medium.css.gz +0 -0
- package/dist/collection/components/ez-tile-medium/ez-tile-medium.js.gz +0 -0
- package/dist/collection/components/ez-time-input/ez-time-input.css.gz +0 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js.gz +0 -0
- package/dist/collection/components/ez-toast/ez-toast.css.gz +0 -0
- package/dist/collection/components/ez-toast/ez-toast.js.gz +0 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.css.gz +0 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js.gz +0 -0
- package/dist/collection/components/ez-tree/ez-tree.css.gz +0 -0
- package/dist/collection/components/ez-tree/ez-tree.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITree.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITreeItem.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/DefaultIconResolver.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/DefaultTooltipResolver.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/index.js.gz +0 -0
- package/dist/collection/components/ez-tree/types/Node.js.gz +0 -0
- package/dist/collection/components/ez-tree/types/Tree.js.gz +0 -0
- package/dist/collection/components/ez-underface/ez-underface.css.gz +0 -0
- package/dist/collection/components/ez-underface/ez-underface.js.gz +0 -0
- package/dist/collection/components/ez-upload/RemoteFile.js.gz +0 -0
- package/dist/collection/components/ez-upload/ez-upload.css.gz +0 -0
- package/dist/collection/components/ez-upload/ez-upload.js.gz +0 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.css.gz +0 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.js.gz +0 -0
- package/dist/collection/global/app-init.js.gz +0 -0
- package/dist/collection/index.js.gz +0 -0
- package/dist/collection/servidor.js.gz +0 -0
- package/dist/collection/setupTests.js.gz +0 -0
- package/dist/collection/sw.js.gz +0 -0
- package/dist/collection/utils/ApplicationUtils.js.gz +0 -0
- package/dist/collection/utils/AssetsUtils.js.gz +0 -0
- package/dist/collection/utils/CSSVarsUtils.js.gz +0 -0
- package/dist/collection/utils/FocusResolver.js.gz +0 -0
- package/dist/collection/utils/ag-grid-license.js.gz +0 -0
- package/dist/collection/utils/constants.js.gz +0 -0
- package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js.gz +0 -0
- package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js.gz +0 -0
- package/dist/collection/utils/customRender/interfaces/ICustomRender.js.gz +0 -0
- package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js.gz +0 -0
- package/dist/collection/utils/form/DataBinder.js.gz +0 -0
- package/dist/collection/utils/form/FormMetadata.js.gz +0 -0
- package/dist/collection/utils/form/index.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/FormLayout.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IDefaultConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormCardConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormSheetMetadata.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/ISummaryField.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/ITabConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/index.js.gz +0 -0
- package/dist/collection/utils/form/test/DataBinder.test.js.gz +0 -0
- package/dist/collection/utils/form/test/resources/metadataTest.js.gz +0 -0
- package/dist/collection/utils/i18n/elanguages.js.gz +0 -0
- package/dist/collection/utils/i18n/index.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/en-us.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/es-es.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/pt-br.js.gz +0 -0
- package/dist/collection/utils/i18n/translations.js.gz +0 -0
- package/dist/collection/utils/index.js.gz +0 -0
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js.gz +0 -0
- package/dist/collection/utils/interfaces/IAction.js.gz +0 -0
- package/dist/collection/utils/interfaces/IFieldConfig.js.gz +0 -0
- package/dist/collection/utils/mock/ez-upload-mock.js.gz +0 -0
- package/dist/collection/utils/search/types.js.gz +0 -0
- package/dist/collection/utils/searchColumn/search-column.js.gz +0 -0
- package/dist/collection/utils/utils.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidField.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IRecordValidator.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationResult.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationSource.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js.gz +0 -0
- package/dist/custom-elements/index.js.gz +0 -0
- package/dist/esm/ApplicationUtils-1569f757.js.gz +0 -0
- package/dist/esm/CSSVarsUtils-acba92d7.js.gz +0 -0
- package/dist/esm/CheckMode-bdb2ec19.js.gz +0 -0
- package/dist/esm/DialogType-54a62731.js.gz +0 -0
- package/dist/esm/EzScrollDirection-2df26c93.js.gz +0 -0
- package/dist/esm/FocusResolver-1ccbf850.js.gz +0 -0
- package/dist/esm/FormLayout-071d324c.js.gz +0 -0
- package/dist/esm/RichToolbarHelper-f3a149c4.js.gz +0 -0
- package/dist/esm/_commonjsHelpers-9943807e.js.gz +0 -0
- package/dist/esm/app-globals-c0ac93c0.js.gz +0 -0
- package/dist/esm/constants-3fabe81e.js.gz +0 -0
- package/dist/esm/ez-actions-button.entry.js.gz +0 -0
- package/dist/esm/ez-alert-list.entry.js.gz +0 -0
- package/dist/esm/ez-alert.entry.js.gz +0 -0
- package/dist/esm/ez-application.entry.js.gz +0 -0
- package/dist/esm/ez-avatar.entry.js.gz +0 -0
- package/dist/esm/ez-badge.entry.js.gz +0 -0
- package/dist/esm/ez-breadcrumb.entry.js.gz +0 -0
- package/dist/esm/ez-button.entry.js.gz +0 -0
- package/dist/esm/ez-calendar.entry.js.gz +0 -0
- package/dist/esm/ez-card-item.entry.js.gz +0 -0
- package/dist/esm/ez-chart.entry.js.gz +0 -0
- package/dist/esm/ez-check.entry.js.gz +0 -0
- package/dist/esm/ez-chip.entry.js.gz +0 -0
- package/dist/esm/ez-classic-combo-box.entry.js.gz +0 -0
- package/dist/esm/ez-classic-input.entry.js.gz +0 -0
- package/dist/esm/ez-classic-text-area.entry.js.gz +0 -0
- package/dist/esm/ez-collapsible-box.entry.js.gz +0 -0
- package/dist/esm/ez-combo-box-list_4.entry.js.gz +0 -0
- package/dist/esm/ez-combo-box.entry.js.gz +0 -0
- package/dist/esm/ez-date-input.entry.js.gz +0 -0
- package/dist/esm/ez-date-time-input.entry.js.gz +0 -0
- package/dist/esm/ez-dialog.entry.js.gz +0 -0
- package/dist/esm/ez-double-list.entry.js.gz +0 -0
- package/dist/esm/ez-dropdown.entry.js.gz +0 -0
- package/dist/esm/ez-empty-card.entry.js.gz +0 -0
- package/dist/esm/ez-file-item.entry.js.gz +0 -0
- package/dist/esm/ez-filter-input.entry.js.gz +0 -0
- package/dist/esm/ez-form-view.entry.js.gz +0 -0
- package/dist/esm/ez-form.entry.js.gz +0 -0
- package/dist/esm/ez-grid-view.entry.js.gz +0 -0
- package/dist/esm/ez-grid.entry.js.gz +0 -0
- package/dist/esm/ez-guide-navigator.entry.js.gz +0 -0
- package/dist/esm/ez-icon.entry.js.gz +0 -0
- package/dist/esm/ez-link-builder_6.entry.js.gz +0 -0
- package/dist/esm/ez-list-item.entry.js.gz +0 -0
- package/dist/esm/ez-list.entry.js.gz +0 -0
- package/dist/esm/ez-loading-bar.entry.js.gz +0 -0
- package/dist/esm/ez-modal-container.entry.js.gz +0 -0
- package/dist/esm/ez-modal.entry.js.gz +0 -0
- package/dist/esm/ez-multi-selection-list.entry.js.gz +0 -0
- package/dist/esm/ez-number-input.entry.js.gz +0 -0
- package/dist/esm/ez-pagination.entry.js.gz +0 -0
- package/dist/esm/ez-popover-core.entry.js.gz +0 -0
- package/dist/esm/ez-popover-plus_3.entry.js.gz +0 -0
- package/dist/esm/ez-popover.entry.js.gz +0 -0
- package/dist/esm/ez-popup.entry.js.gz +0 -0
- package/dist/esm/ez-progress-bar.entry.js.gz +0 -0
- package/dist/esm/ez-radio-button.entry.js.gz +0 -0
- package/dist/esm/ez-rich-toolbar-item.entry.js.gz +0 -0
- package/dist/esm/ez-scroller_2.entry.js.gz +0 -0
- package/dist/esm/ez-search-plus.entry.js.gz +0 -0
- package/dist/esm/ez-search-result-list.entry.js.gz +0 -0
- package/dist/esm/ez-search.entry.js.gz +0 -0
- package/dist/esm/ez-sidebar-navigator.entry.js.gz +0 -0
- package/dist/esm/ez-skeleton.entry.js.gz +0 -0
- package/dist/esm/ez-sortable-list.entry.js.gz +0 -0
- package/dist/esm/ez-spinner.entry.js.gz +0 -0
- package/dist/esm/ez-split-button.entry.js.gz +0 -0
- package/dist/esm/ez-split-item.entry.js.gz +0 -0
- package/dist/esm/ez-split-panel.entry.js.gz +0 -0
- package/dist/esm/ez-tabselector.entry.js.gz +0 -0
- package/dist/esm/ez-tag-input.entry.js.gz +0 -0
- package/dist/esm/ez-tag.entry.js.gz +0 -0
- package/dist/esm/ez-text-area.entry.js.gz +0 -0
- package/dist/esm/ez-text-input.entry.js.gz +0 -0
- package/dist/esm/ez-tile-medium.entry.js.gz +0 -0
- package/dist/esm/ez-tile.entry.js.gz +0 -0
- package/dist/esm/ez-time-input.entry.js.gz +0 -0
- package/dist/esm/ez-toast.entry.js.gz +0 -0
- package/dist/esm/ez-tooltip.entry.js.gz +0 -0
- package/dist/esm/ez-tree.entry.js.gz +0 -0
- package/dist/esm/ez-underface.entry.js.gz +0 -0
- package/dist/esm/ez-upload.entry.js.gz +0 -0
- package/dist/esm/ez-view-stack.entry.js.gz +0 -0
- package/dist/esm/ezListHelper-00fb9b8d.js.gz +0 -0
- package/dist/esm/ezui.js.gz +0 -0
- package/dist/esm/filter-column.entry.js.gz +0 -0
- package/dist/esm/floating-ui.dom.esm-ad30f2f0.js.gz +0 -0
- package/dist/esm/index-41363fa6.js.gz +0 -0
- package/dist/esm/index-baa5e267.js.gz +0 -0
- package/dist/esm/index.js.gz +0 -0
- package/dist/esm/loader.js.gz +0 -0
- package/dist/esm/polyfills/core-js.js.gz +0 -0
- package/dist/esm/polyfills/css-shim.js.gz +0 -0
- package/dist/esm/polyfills/dom.js.gz +0 -0
- package/dist/esm/polyfills/es5-html-element.js.gz +0 -0
- package/dist/esm/polyfills/index.js.gz +0 -0
- package/dist/esm/polyfills/system.js.gz +0 -0
- package/dist/esm/purify-2b94dec9.js.gz +0 -0
- package/dist/esm/search-column-55666829.js.gz +0 -0
- package/dist/esm/searchFormatters-8229207e.js.gz +0 -0
- package/dist/ezui/ezui.esm.js.gz +0 -0
- package/dist/ezui/index.esm.js.gz +0 -0
- package/dist/ezui/p-02d448bb.entry.js.gz +0 -0
- package/dist/ezui/p-05c32903.entry.js.gz +0 -0
- package/dist/ezui/p-0e49c0ff.entry.js.gz +0 -0
- package/dist/ezui/p-0f7971cf.entry.js.gz +0 -0
- package/dist/ezui/p-112455b1.js.gz +0 -0
- package/dist/ezui/p-14ceb733.entry.js.gz +0 -0
- package/dist/ezui/p-18384b91.entry.js.gz +0 -0
- package/dist/ezui/p-1b5aa969.entry.js.gz +0 -0
- package/dist/ezui/p-1ba2d983.entry.js.gz +0 -0
- package/dist/ezui/p-1dfe17a1.entry.js +0 -309
- package/dist/ezui/p-1dfe17a1.entry.js.gz +0 -0
- package/dist/ezui/p-1e7a8633.entry.js.gz +0 -0
- package/dist/ezui/p-1f50fa05.entry.js.gz +0 -0
- package/dist/ezui/p-1f8775ef.entry.js.gz +0 -0
- package/dist/ezui/p-20c024f7.entry.js.gz +0 -0
- package/dist/ezui/p-23739494.entry.js.gz +0 -0
- package/dist/ezui/p-23a36bb6.js.gz +0 -0
- package/dist/ezui/p-2528e988.entry.js.gz +0 -0
- package/dist/ezui/p-288631d1.entry.js.gz +0 -0
- package/dist/ezui/p-2a806303.js.gz +0 -0
- package/dist/ezui/p-2c21b2b6.entry.js.gz +0 -0
- package/dist/ezui/p-30ffb9ed.js.gz +0 -0
- package/dist/ezui/p-34a476a9.entry.js.gz +0 -0
- package/dist/ezui/p-35bfaa88.entry.js.gz +0 -0
- package/dist/ezui/p-39761eca.entry.js.gz +0 -0
- package/dist/ezui/p-3afa1c6e.entry.js.gz +0 -0
- package/dist/ezui/p-3ce867cf.entry.js.gz +0 -0
- package/dist/ezui/p-3e767a74.js.gz +0 -0
- package/dist/ezui/p-40a60148.js.gz +0 -0
- package/dist/ezui/p-411c0222.entry.js.gz +0 -0
- package/dist/ezui/p-4314f87a.entry.js.gz +0 -0
- package/dist/ezui/p-48effc69.entry.js.gz +0 -0
- package/dist/ezui/p-4d30b703.entry.js.gz +0 -0
- package/dist/ezui/p-5554704c.js +0 -1
- package/dist/ezui/p-5554704c.js.gz +0 -0
- package/dist/ezui/p-57321fc3.js.gz +0 -0
- package/dist/ezui/p-5c3a6717.entry.js.gz +0 -0
- package/dist/ezui/p-5d910b14.entry.js.gz +0 -0
- package/dist/ezui/p-5ed81457.entry.js.gz +0 -0
- package/dist/ezui/p-6020f3d5.entry.js.gz +0 -0
- package/dist/ezui/p-6c51ccd1.entry.js.gz +0 -0
- package/dist/ezui/p-6ca0815e.entry.js.gz +0 -0
- package/dist/ezui/p-6d596a5a.entry.js.gz +0 -0
- package/dist/ezui/p-6f77a359.entry.js.gz +0 -0
- package/dist/ezui/p-721fd999.entry.js.gz +0 -0
- package/dist/ezui/p-778939b2.entry.js.gz +0 -0
- package/dist/ezui/p-7995dcb4.entry.js +0 -1
- package/dist/ezui/p-7995dcb4.entry.js.gz +0 -0
- package/dist/ezui/p-79abad9e.entry.js.gz +0 -0
- package/dist/ezui/p-7f37ee99.entry.js.gz +0 -0
- package/dist/ezui/p-7f792043.entry.js.gz +0 -0
- package/dist/ezui/p-7f8c1fce.entry.js.gz +0 -0
- package/dist/ezui/p-7fe97ef5.entry.js.gz +0 -0
- package/dist/ezui/p-80dfc50b.js.gz +0 -0
- package/dist/ezui/p-859e3134.entry.js.gz +0 -0
- package/dist/ezui/p-8803e321.entry.js.gz +0 -0
- package/dist/ezui/p-8df1ca33.entry.js.gz +0 -0
- package/dist/ezui/p-91c9d50e.entry.js.gz +0 -0
- package/dist/ezui/p-93e1c917.entry.js.gz +0 -0
- package/dist/ezui/p-98bb8b16.js.gz +0 -0
- package/dist/ezui/p-9b215871.entry.js.gz +0 -0
- package/dist/ezui/p-9b2e6438.entry.js.gz +0 -0
- package/dist/ezui/p-9b3f3c02.entry.js.gz +0 -0
- package/dist/ezui/p-9f5fa3f9.entry.js.gz +0 -0
- package/dist/ezui/p-a0bf1fc7.entry.js.gz +0 -0
- package/dist/ezui/p-a1c0233e.js.gz +0 -0
- package/dist/ezui/p-a3075f52.entry.js.gz +0 -0
- package/dist/ezui/p-a3ada561.entry.js.gz +0 -0
- package/dist/ezui/p-a4083a7a.entry.js.gz +0 -0
- package/dist/ezui/p-a61fdd20.js.gz +0 -0
- package/dist/ezui/p-a80b1287.entry.js.gz +0 -0
- package/dist/ezui/p-ab574d59.js.gz +0 -0
- package/dist/ezui/p-b0a7713d.entry.js +0 -1
- package/dist/ezui/p-b0a7713d.entry.js.gz +0 -0
- package/dist/ezui/p-b1e45320.js.gz +0 -0
- package/dist/ezui/p-b853763b.js.gz +0 -0
- package/dist/ezui/p-b989a33e.entry.js.gz +0 -0
- package/dist/ezui/p-ba7e908a.entry.js.gz +0 -0
- package/dist/ezui/p-baec56c9.js.gz +0 -0
- package/dist/ezui/p-bc2f844e.entry.js.gz +0 -0
- package/dist/ezui/p-ce0b36d7.entry.js.gz +0 -0
- package/dist/ezui/p-d2645bdf.entry.js.gz +0 -0
- package/dist/ezui/p-d5eb2fad.entry.js.gz +0 -0
- package/dist/ezui/p-d6742c1e.entry.js.gz +0 -0
- package/dist/ezui/p-d6bb930d.entry.js.gz +0 -0
- package/dist/ezui/p-d6f50207.entry.js.gz +0 -0
- package/dist/ezui/p-d75a50a7.entry.js.gz +0 -0
- package/dist/ezui/p-d8cc640d.entry.js.gz +0 -0
- package/dist/ezui/p-dc628ed3.js.gz +0 -0
- package/dist/ezui/p-dee18824.entry.js.gz +0 -0
- package/dist/ezui/p-e75c7a23.entry.js.gz +0 -0
- package/dist/ezui/p-e7a7c594.entry.js.gz +0 -0
- package/dist/ezui/p-e8c57463.entry.js.gz +0 -0
- package/dist/ezui/p-ec7db713.js.gz +0 -0
- package/dist/ezui/p-ef8bd3e8.entry.js.gz +0 -0
- package/dist/ezui/p-f1de2cd6.entry.js.gz +0 -0
- package/dist/ezui/p-fa6732f2.entry.js.gz +0 -0
- package/dist/index.cjs.js.gz +0 -0
- package/dist/index.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,f as e,h as a,g as o}from"./p-23a36bb6.js";import{ElementIDUtils as s}from"@sankhyalabs/core";import{A as d}from"./p-baec56c9.js";import{i as l}from"./p-a61fdd20.js";import"./p-ab574d59.js";class r{constructor(i){this.file=i,this.size=i.size,this.name=i.name}abortUpload(){this._uploadingXhr&&(this._aborted=!0,this._uploadingXhr.abort(),this._uploadingXhr=void 0)}isUploading(){return void 0!==this._uploadingXhr}async upload(i,t,e){return new Promise(((a,o)=>{const s=new XMLHttpRequest;this._uploadingXhr=s,this._aborted=!1,this.progress=0,s.upload.onprogress=i=>{const t=i.loaded,a=i.total;this.progress=~~(t/a*100),e(this,t,a)},s.onreadystatechange=()=>{if(4==s.readyState){this._uploadingXhr=void 0;const i=s.status;this._aborted||(0===i?o("Servidor indisponível"):i>=500?o("Erro inesperado no servidor"):i>=400&&o("Operação não permitida"));const t=s.response;if(t)try{a(JSON.parse(t))}catch(i){o(`Servidor não retornou um objeto válido: ${t}.\n${i}`)}}},s.ontimeout=()=>{o("Tempo limite de transferência atingido.")};const d=new FormData;d.append("ARQUIVO",this.file,this.file.name),s.open("POST",i,!0),t&&t.forEach(((i,t)=>s.setRequestHeader(t,i))),s.send(d)}))}async delete(i,t,e){return new Promise(((a,o)=>{const s=new XMLHttpRequest;s.onreadystatechange=()=>{4==s.readyState&&(0===s.status?o("Servidor indisponível"):s.status>=500?o("Erro inesperado no servidor"):s.status>=400&&o("Operação não permitida"),a(!0))},s.ontimeout=()=>{o("Tempo limite de remoção atingido.")},s.open("DELETE",t,!0),e&&e.forEach(((i,t)=>s.setRequestHeader(t,i))),s.send(JSON.stringify(i))}))}}const n=class{constructor(e){i(this,e),this.ezChange=t(this,"ezChange",7),this.ezStartChange=t(this,"ezStartChange",7),this.ezCancelWaitingChange=t(this,"ezCancelWaitingChange",7),this._filePointers=new Map,this.label=void 0,this.subtitle=void 0,this.enabled=!0,this.maxFileSize=void 0,this.maxFiles=void 0,this.requestHeaders=void 0,this.urlUpload=void 0,this.urlDelete=void 0,this.value=void 0}observeValue(i,t){(i!==this._updatingValue||null==i&&null!=t)&&(this._filePointers.forEach((i=>{this.isRemoteFile(i)&&i.abortUpload()})),this._filePointers=new Map,this.updateFilePointers(),this._updatingValue=void 0)}updateFilePointers(){Array.isArray(this.value)&&this.value.forEach((i=>this._filePointers.set(i.name,i)))}observeRequestHeaders(){if(this._requestHeaders=new Map,"string"==typeof this.requestHeaders)try{this.requestHeaders=JSON.parse(this.requestHeaders)}catch(i){this.requestHeaders=void 0}for(var i in this.requestHeaders)this._requestHeaders.set(i,this.requestHeaders[i])}async addFiles(i){if(this.maxFiles>0){let t=this._filePointers.size;if(i.forEach((i=>{this._filePointers.has(i.name)||t++})),t>this.maxFiles)return void this.showError(this.i18n("ez-upload.maxFilesError",{maxFiles:this.maxFiles}))}Array.prototype.forEach.call(i,this.addFile.bind(this))}async setFocus(){this._fileInput.focus()}async setBlur(){this._fileInput.blur()}async addFile(i){const t=this._filePointers.get(i.name);t?d.confirm(this.i18n("ez-upload.replaceFileTitle"),this.i18n("ez-upload.replaceFileMessage",{fileName:i.name})).then((e=>{e&&(this.isRemoteFile(t)&&t.abortUpload(),this.doAddFile(i))})):this.doAddFile(i)}async doAddFile(i){try{if(this.validateFile(i)){this.ezStartChange.emit({waitmessage:this.i18n("ez-upload.uploadingMessage"),blocking:!0});const t=new r(i),a=this._filePointers.get(i.name);a&&this.isRemoteFile(a)&&a.abortUpload(),this._filePointers.set(i.name,t),t.upload(this.urlUpload,this._requestHeaders,(i=>this.updateFeedback(i))).then((i=>i.forEach((i=>this.finishUpload(t.name,i))))).catch((i=>{this.ezCancelWaitingChange.emit(),this.showError(i)})),e(this)}}catch(i){throw this.ezCancelWaitingChange.emit(),i}}finishUpload(i,t){this._filePointers.set(i,t),this.updateValue()}updateValue(){this._updatingValue=[],this._filePointers.forEach((i=>{this.isRemoteFile(i)||this._updatingValue.push(i)})),this._filePointers.size===this._updatingValue.length&&(this.value=this._updatingValue,this.ezChange.emit(this.value))}buildProgressId(i){return`PROGRESS_${i.name.replace(/[^a-z0-9_]/gi,"_")}_${i.file.lastModified}`}updateFeedback(i){window.requestAnimationFrame((()=>{if(this._host){const t=this._host.shadowRoot.querySelector("#"+this.buildProgressId(i));t&&(t.value=i.progress)}}))}validateFile(i){return!this._filePointers.has(i.name)&&this.maxFiles>0&&this._filePointers.size>=this.maxFiles?(this.showError(this.i18n("ez-upload.maxFilesError",{maxFiles:this.maxFiles})),!1):0===i.size?(this.showError(this.i18n("ez-upload.emptyFileError",{fileName:i.name})),!1):this.urlUpload?!(this.maxFileSize>=0&&i.size>this.maxFileSize&&(this.showError(this.i18n("ez-upload.maxFileSizeError",{maxSize:this.formatBytes(this.maxFileSize)})),1)):(this.showError(this.i18n("ez-upload.missingUploadUrlError")),!1)}showError(i){d.alert(this.i18n("ez-upload.uploadErrorTitle"),i)}formatBytes(i,t=1){if(0===i)return"0 Bytes";const e=t<0?0:t,a=Math.floor(Math.log(i)/Math.log(1024));return parseFloat((i/Math.pow(1024,a)).toFixed(e))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][a]}onFileInputChange(i){this.addFiles(Array.from(i.target.files)),this._fileInput.value=""}isRemoteFile(i){return"file"in i}removeFromList(i){this._filePointers.delete(i),this.updateValue()}removeFile(i){const t=this._filePointers.get(i);if(this.isRemoteFile(t))t.abortUpload(),this.removeFromList(i);else if(this.urlDelete){const e=new r(null);this._filePointers.set(t.name,e),e.delete(t,this.urlDelete,null).then((()=>this.removeFromList(i))).catch((i=>this.showError(i)))}else this.removeFromList(i)}openFilesDialog(){this.enabled&&this._fileInput.click()}componentDidLoad(){this.enabled&&this._dropZone&&window.FileList&&window.File&&(this._dropZone.addEventListener("dragover",(i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy",this._dropZone.style.background="#c2dbff"})),this._dropZone.addEventListener("drop",(i=>{i.stopPropagation(),i.preventDefault(),this.addFiles(Array.from(i.dataTransfer.files)),this._dropZone.style.background=""})),this._dropZone.addEventListener("dragleave",(()=>{this._dropZone.style.background=""}))),this._host&&s.addIDInfo(this._host,"input"),this.observeRequestHeaders()}componentWillRender(){this.value&&this._filePointers.size<this.value.length&&this.updateFilePointers()}async componentWillLoad(){this.i18n=await l()}render(){return a("div",{ref:i=>this._dropZone=i,class:this.evalDisabledClass("iu","background--disabled")},a("div",{class:"iu__container",onClick:()=>this.openFilesDialog()},a("div",{class:"iu_header"},this.label?a("label",{class:this.evalDisabledClass("iu__label","text--disabled"),title:this.label},this.label):null,a("div",{class:"padding-large"},a("div",{class:this.evalDisabledClass("iu__icon-label","mouse-pointer--disabled")},a("button",{class:"iu__file-icon",disabled:!this.enabled}),a("div",{class:this.evalDisabledClass("text text--center text--medium text--primary","text--disabled")},this.i18n(this.enabled?"ez-upload.enable":"ez-upload.disable"))),this.subtitle&&a("div",{class:this.evalDisabledClass("padding-extra-small text text--center text--small text--secondary","text--disabled")},this.subtitle))),this.buildFooter()),a("input",{ref:i=>this._fileInput=i,onChange:i=>this.onFileInputChange(i),type:"file",multiple:!0,class:"appearanceNone"}))}buildFooter(){if(0===this._filePointers.size)return null;const i=[];return this._filePointers.forEach((t=>i.push(this.buildFileItem(t)))),a("div",{class:"iu__footer"},i)}buildFileItem(i){const t=i.name,e=Number(i.progress),o=i.downloadURL,s=i.size>0?`(${this.formatBytes(i.size)})`:"",d=`${t} ${s}`;return a("div",{class:"iu__item",key:t,onClick:i=>i.stopPropagation()},a("div",{class:"iu__item-label modificador"},a("div",{title:d,class:"col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle"},o?a("a",{href:o,download:!0},d):d)),isNaN(e)?null:a("div",{class:"col col--sd-4 col--stretch align--middle"},a("progress",{id:this.buildProgressId(i),value:e,max:"100"})),this.enabled?a("div",{class:"col col--stretch align--middle"},a("button",{class:"btn-cancel ",onClick:()=>this.removeFile(t)})):null)}evalDisabledClass(i,t){return this.enabled?i:`${i} ${t}`}get _host(){return o(this)}static get watchers(){return{value:["observeValue"],requestHeaders:["observeRequestHeaders"]}}};n.style=':host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--text--secondary:var(--text-secondary, #a2abb9);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__btn__cancel-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8x" width="8px"><path d="M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z"/></svg>\');--ez-upload__file-icon-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="11x" width="9px"><path d="M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z"/></svg>\');display:flex;flex-wrap:wrap;position:relative;padding-bottom:16px;font-family:var(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--ez-upload--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--ez-upload__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--ez-upload__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.padding-large{padding:var(--ez-upload--padding--large) 0px}.padding-extra-small{padding:var(--ez-upload--padding--extra-small) 0px}.text{font-family:var(--font-pattern, "Roboto");text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.text--secondary{color:var(--ez-upload--text--secondary);text-shadow:var(--ez-upload--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:\'\';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--ez-upload__file-icon-image);mask-image:var(--ez-upload__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.appearanceNone{width:0px;height:0px}.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{n as ez_upload}
|
|
1
|
+
import{r as i,c as t,f as e,h as a,g as o}from"./p-23a36bb6.js";import{ElementIDUtils as s}from"@sankhyalabs/core";import{A as d}from"./p-5a11cf56.js";import{i as l}from"./p-641ee538.js";import"./p-ab574d59.js";class r{constructor(i){this.file=i,this.size=i.size,this.name=i.name}abortUpload(){this._uploadingXhr&&(this._aborted=!0,this._uploadingXhr.abort(),this._uploadingXhr=void 0)}isUploading(){return void 0!==this._uploadingXhr}async upload(i,t,e){return new Promise(((a,o)=>{const s=new XMLHttpRequest;this._uploadingXhr=s,this._aborted=!1,this.progress=0,s.upload.onprogress=i=>{const t=i.loaded,a=i.total;this.progress=~~(t/a*100),e(this,t,a)},s.onreadystatechange=()=>{if(4==s.readyState){this._uploadingXhr=void 0;const i=s.status;this._aborted||(0===i?o("Servidor indisponível"):i>=500?o("Erro inesperado no servidor"):i>=400&&o("Operação não permitida"));const t=s.response;if(t)try{a(JSON.parse(t))}catch(i){o(`Servidor não retornou um objeto válido: ${t}.\n${i}`)}}},s.ontimeout=()=>{o("Tempo limite de transferência atingido.")};const d=new FormData;d.append("ARQUIVO",this.file,this.file.name),s.open("POST",i,!0),t&&t.forEach(((i,t)=>s.setRequestHeader(t,i))),s.send(d)}))}async delete(i,t,e){return new Promise(((a,o)=>{const s=new XMLHttpRequest;s.onreadystatechange=()=>{4==s.readyState&&(0===s.status?o("Servidor indisponível"):s.status>=500?o("Erro inesperado no servidor"):s.status>=400&&o("Operação não permitida"),a(!0))},s.ontimeout=()=>{o("Tempo limite de remoção atingido.")},s.open("DELETE",t,!0),e&&e.forEach(((i,t)=>s.setRequestHeader(t,i))),s.send(JSON.stringify(i))}))}}const n=class{constructor(e){i(this,e),this.ezChange=t(this,"ezChange",7),this.ezStartChange=t(this,"ezStartChange",7),this.ezCancelWaitingChange=t(this,"ezCancelWaitingChange",7),this._filePointers=new Map,this.label=void 0,this.subtitle=void 0,this.enabled=!0,this.maxFileSize=void 0,this.maxFiles=void 0,this.requestHeaders=void 0,this.urlUpload=void 0,this.urlDelete=void 0,this.value=void 0}observeValue(i,t){(i!==this._updatingValue||null==i&&null!=t)&&(this._filePointers.forEach((i=>{this.isRemoteFile(i)&&i.abortUpload()})),this._filePointers=new Map,this.updateFilePointers(),this._updatingValue=void 0)}updateFilePointers(){Array.isArray(this.value)&&this.value.forEach((i=>this._filePointers.set(i.name,i)))}observeRequestHeaders(){if(this._requestHeaders=new Map,"string"==typeof this.requestHeaders)try{this.requestHeaders=JSON.parse(this.requestHeaders)}catch(i){this.requestHeaders=void 0}for(var i in this.requestHeaders)this._requestHeaders.set(i,this.requestHeaders[i])}async addFiles(i){if(this.maxFiles>0){let t=this._filePointers.size;if(i.forEach((i=>{this._filePointers.has(i.name)||t++})),t>this.maxFiles)return void this.showError(this.i18n("ez-upload.maxFilesError",{maxFiles:this.maxFiles}))}Array.prototype.forEach.call(i,this.addFile.bind(this))}async setFocus(){this._fileInput.focus()}async setBlur(){this._fileInput.blur()}async addFile(i){const t=this._filePointers.get(i.name);t?d.confirm(this.i18n("ez-upload.replaceFileTitle"),this.i18n("ez-upload.replaceFileMessage",{fileName:i.name})).then((e=>{e&&(this.isRemoteFile(t)&&t.abortUpload(),this.doAddFile(i))})):this.doAddFile(i)}async doAddFile(i){try{if(this.validateFile(i)){this.ezStartChange.emit({waitmessage:this.i18n("ez-upload.uploadingMessage"),blocking:!0});const t=new r(i),a=this._filePointers.get(i.name);a&&this.isRemoteFile(a)&&a.abortUpload(),this._filePointers.set(i.name,t),t.upload(this.urlUpload,this._requestHeaders,(i=>this.updateFeedback(i))).then((i=>i.forEach((i=>this.finishUpload(t.name,i))))).catch((i=>{this.ezCancelWaitingChange.emit(),this.showError(i)})),e(this)}}catch(i){throw this.ezCancelWaitingChange.emit(),i}}finishUpload(i,t){this._filePointers.set(i,t),this.updateValue()}updateValue(){this._updatingValue=[],this._filePointers.forEach((i=>{this.isRemoteFile(i)||this._updatingValue.push(i)})),this._filePointers.size===this._updatingValue.length&&(this.value=this._updatingValue,this.ezChange.emit(this.value))}buildProgressId(i){return`PROGRESS_${i.name.replace(/[^a-z0-9_]/gi,"_")}_${i.file.lastModified}`}updateFeedback(i){window.requestAnimationFrame((()=>{if(this._host){const t=this._host.shadowRoot.querySelector("#"+this.buildProgressId(i));t&&(t.value=i.progress)}}))}validateFile(i){return!this._filePointers.has(i.name)&&this.maxFiles>0&&this._filePointers.size>=this.maxFiles?(this.showError(this.i18n("ez-upload.maxFilesError",{maxFiles:this.maxFiles})),!1):0===i.size?(this.showError(this.i18n("ez-upload.emptyFileError",{fileName:i.name})),!1):this.urlUpload?!(this.maxFileSize>=0&&i.size>this.maxFileSize&&(this.showError(this.i18n("ez-upload.maxFileSizeError",{maxSize:this.formatBytes(this.maxFileSize)})),1)):(this.showError(this.i18n("ez-upload.missingUploadUrlError")),!1)}showError(i){d.alert(this.i18n("ez-upload.uploadErrorTitle"),i)}formatBytes(i,t=1){if(0===i)return"0 Bytes";const e=t<0?0:t,a=Math.floor(Math.log(i)/Math.log(1024));return parseFloat((i/Math.pow(1024,a)).toFixed(e))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][a]}onFileInputChange(i){this.addFiles(Array.from(i.target.files)),this._fileInput.value=""}isRemoteFile(i){return"file"in i}removeFromList(i){this._filePointers.delete(i),this.updateValue()}removeFile(i){const t=this._filePointers.get(i);if(this.isRemoteFile(t))t.abortUpload(),this.removeFromList(i);else if(this.urlDelete){const e=new r(null);this._filePointers.set(t.name,e),e.delete(t,this.urlDelete,null).then((()=>this.removeFromList(i))).catch((i=>this.showError(i)))}else this.removeFromList(i)}openFilesDialog(){this.enabled&&this._fileInput.click()}componentDidLoad(){this.enabled&&this._dropZone&&window.FileList&&window.File&&(this._dropZone.addEventListener("dragover",(i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy",this._dropZone.style.background="#c2dbff"})),this._dropZone.addEventListener("drop",(i=>{i.stopPropagation(),i.preventDefault(),this.addFiles(Array.from(i.dataTransfer.files)),this._dropZone.style.background=""})),this._dropZone.addEventListener("dragleave",(()=>{this._dropZone.style.background=""}))),this._host&&s.addIDInfo(this._host,"input"),this.observeRequestHeaders()}componentWillRender(){this.value&&this._filePointers.size<this.value.length&&this.updateFilePointers()}async componentWillLoad(){this.i18n=await l()}render(){return a("div",{ref:i=>this._dropZone=i,class:this.evalDisabledClass("iu","background--disabled")},a("div",{class:"iu__container",onClick:()=>this.openFilesDialog()},a("div",{class:"iu_header"},this.label?a("label",{class:this.evalDisabledClass("iu__label","text--disabled"),title:this.label},this.label):null,a("div",{class:"padding-large"},a("div",{class:this.evalDisabledClass("iu__icon-label","mouse-pointer--disabled")},a("button",{class:"iu__file-icon",disabled:!this.enabled}),a("div",{class:this.evalDisabledClass("text text--center text--medium text--primary","text--disabled")},this.i18n(this.enabled?"ez-upload.enable":"ez-upload.disable"))),this.subtitle&&a("div",{class:this.evalDisabledClass("padding-extra-small text text--center text--small text--secondary","text--disabled")},this.subtitle))),this.buildFooter()),a("input",{ref:i=>this._fileInput=i,onChange:i=>this.onFileInputChange(i),type:"file",multiple:!0,class:"appearanceNone"}))}buildFooter(){if(0===this._filePointers.size)return null;const i=[];return this._filePointers.forEach((t=>i.push(this.buildFileItem(t)))),a("div",{class:"iu__footer"},i)}buildFileItem(i){const t=i.name,e=Number(i.progress),o=i.downloadURL,s=i.size>0?`(${this.formatBytes(i.size)})`:"",d=`${t} ${s}`;return a("div",{class:"iu__item",key:t,onClick:i=>i.stopPropagation()},a("div",{class:"iu__item-label modificador"},a("div",{title:d,class:"col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle"},o?a("a",{href:o,download:!0},d):d)),isNaN(e)?null:a("div",{class:"col col--sd-4 col--stretch align--middle"},a("progress",{id:this.buildProgressId(i),value:e,max:"100"})),this.enabled?a("div",{class:"col col--stretch align--middle"},a("button",{class:"btn-cancel ",onClick:()=>this.removeFile(t)})):null)}evalDisabledClass(i,t){return this.enabled?i:`${i} ${t}`}get _host(){return o(this)}static get watchers(){return{value:["observeValue"],requestHeaders:["observeRequestHeaders"]}}};n.style=':host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--text--secondary:var(--text-secondary, #a2abb9);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__btn__cancel-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8x" width="8px"><path d="M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z"/></svg>\');--ez-upload__file-icon-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="11x" width="9px"><path d="M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z"/></svg>\');display:flex;flex-wrap:wrap;position:relative;padding-bottom:16px;font-family:var(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--ez-upload--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--ez-upload__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--ez-upload__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.padding-large{padding:var(--ez-upload--padding--large) 0px}.padding-extra-small{padding:var(--ez-upload--padding--extra-small) 0px}.text{font-family:var(--font-pattern, "Roboto");text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.text--secondary{color:var(--ez-upload--text--secondary);text-shadow:var(--ez-upload--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:\'\';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--ez-upload__file-icon-image);mask-image:var(--ez-upload__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.appearanceNone{width:0px;height:0px}.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{n as ez_upload}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{c as t,a as e}from"./p-112455b1.js";var n=t((function(t){
|
|
2
2
|
/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
|
|
3
|
-
t.exports=function(){const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object;let{freeze:r,seal:a,create:l}=Object,{apply:s,construct:c}="undefined"!=typeof Reflect&&Reflect;r||(r=function(t){return t}),a||(a=function(t){return t}),s||(s=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return t.apply(e,i)}),c||(c=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return new t(...n)});const u=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),p=k(Array.prototype.pop),m=k(Array.prototype.push),d=k(Array.prototype.splice),h=k(String.prototype.toLowerCase),g=k(String.prototype.toString),y=k(String.prototype.match),b=k(String.prototype.replace),w=k(String.prototype.indexOf),x=k(String.prototype.trim),v=k(Object.prototype.hasOwnProperty),T=k(RegExp.prototype.test),S=(A=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return c(A,e)});var A;function k(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return s(t,e,i)}}function E(t,i){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;e&&e(t,null);let r=i.length;for(;r--;){let e=i[r];if("string"==typeof e){const t=o(e);t!==e&&(n(i)||(i[r]=t),e=t)}t[e]=!0}return t}function R(t){for(let e=0;e<t.length;e++)v(t,e)||(t[e]=null);return t}function _(e){const n=l(null);for(const[i,o]of t(e))v(e,i)&&(n[i]=Array.isArray(o)?R(o):o&&"object"==typeof o&&o.constructor===Object?_(o):o);return n}function z(t,e){for(;null!==t;){const n=o(t,e);if(n){if(n.get)return k(n.get);if("function"==typeof n.value)return k(n.value)}t=i(t)}return function(){return null}}const D=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","slot","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=r(["#text"]),N=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),C=r(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\$\{[\w\W]*/gm),q=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=a(/^(?:\w+script|data):/i),G=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:G,CUSTOM_ELEMENT:V,DATA_ATTR:q,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:$,MUSTACHE_EXPR:B,TMPLIT_EXPR:H});const Q=1,Z=3,tt=7,et=8,nt=9,it=function(){return"undefined"==typeof window?null:window},ot=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return null}};var rt=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:it();const i=t=>e(t);if(i.version="3.2.7",i.removed=[],!n||!n.document||n.document.nodeType!==nt||!n.Element)return i.isSupported=!1,i;let{document:o}=n;const a=o,s=a.currentScript,{DocumentFragment:c,HTMLTemplateElement:A,Node:k,Element:R,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:q,trustedTypes:Y}=n,$=R.prototype,G=z($,"cloneNode"),V=z($,"remove"),rt=z($,"nextSibling"),at=z($,"childNodes"),lt=z($,"parentNode");if("function"==typeof A){const t=o.createElement("template");t.content&&t.content.ownerDocument&&(o=t.content.ownerDocument)}let st,ct="";const{implementation:ut,createNodeIterator:ft,createDocumentFragment:pt,getElementsByTagName:mt}=o,{importNode:dt}=a;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof t&&"function"==typeof lt&&ut&&void 0!==ut.createHTMLDocument;const{MUSTACHE_EXPR:gt,ERB_EXPR:yt,TMPLIT_EXPR:bt,DATA_ATTR:wt,ARIA_ATTR:xt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:Tt,CUSTOM_ELEMENT:St}=J;let{IS_ALLOWED_URI:At}=J,kt=null;const Et=E({},[...D,...O,...L,...I,...P]);let Rt=null;const _t=E({},[...N,...C,...j,...U]);let zt=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,Ot=null,Lt=!0,Mt=!0,It=!1,Ft=!0,Pt=!1,Nt=!0,Ct=!1,jt=!1,Ut=!1,Bt=!1,Wt=!1,Ht=!1,qt=!0,Yt=!1;const Xt="user-content-";let $t=!0,Gt=!1,Kt={},Vt=null;const Jt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qt=null;const Zt=E({},["audio","video","img","source","image","track"]);let te=null;const ee=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ne="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",oe="http://www.w3.org/1999/xhtml";let re=oe,ae=!1,le=null;const se=E({},[ne,ie,oe],g);let ce=E({},["mi","mo","mn","ms","mtext"]),ue=E({},["annotation-xml"]);const fe=E({},["title","style","font","a","script"]);let pe=null;const me=["application/xhtml+xml","text/html"],de="text/html";let he=null,ge=null;const ye=o.createElement("form"),be=function(t){return t instanceof RegExp||t instanceof Function},we=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ge||ge!==t){if(t&&"object"==typeof t||(t={}),t=_(t),pe=-1===me.indexOf(t.PARSER_MEDIA_TYPE)?de:t.PARSER_MEDIA_TYPE,he="application/xhtml+xml"===pe?g:h,kt=v(t,"ALLOWED_TAGS")?E({},t.ALLOWED_TAGS,he):Et,Rt=v(t,"ALLOWED_ATTR")?E({},t.ALLOWED_ATTR,he):_t,le=v(t,"ALLOWED_NAMESPACES")?E({},t.ALLOWED_NAMESPACES,g):se,te=v(t,"ADD_URI_SAFE_ATTR")?E(_(ee),t.ADD_URI_SAFE_ATTR,he):ee,Qt=v(t,"ADD_DATA_URI_TAGS")?E(_(Zt),t.ADD_DATA_URI_TAGS,he):Zt,Vt=v(t,"FORBID_CONTENTS")?E({},t.FORBID_CONTENTS,he):Jt,Dt=v(t,"FORBID_TAGS")?E({},t.FORBID_TAGS,he):_({}),Ot=v(t,"FORBID_ATTR")?E({},t.FORBID_ATTR,he):_({}),Kt=!!v(t,"USE_PROFILES")&&t.USE_PROFILES,Lt=!1!==t.ALLOW_ARIA_ATTR,Mt=!1!==t.ALLOW_DATA_ATTR,It=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Pt=t.SAFE_FOR_TEMPLATES||!1,Nt=!1!==t.SAFE_FOR_XML,Ct=t.WHOLE_DOCUMENT||!1,Bt=t.RETURN_DOM||!1,Wt=t.RETURN_DOM_FRAGMENT||!1,Ht=t.RETURN_TRUSTED_TYPE||!1,Ut=t.FORCE_BODY||!1,qt=!1!==t.SANITIZE_DOM,Yt=t.SANITIZE_NAMED_PROPS||!1,$t=!1!==t.KEEP_CONTENT,Gt=t.IN_PLACE||!1,At=t.ALLOWED_URI_REGEXP||X,re=t.NAMESPACE||oe,ce=t.MATHML_TEXT_INTEGRATION_POINTS||ce,ue=t.HTML_INTEGRATION_POINTS||ue,zt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&be(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(zt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&be(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(zt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(zt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pt&&(Mt=!1),Wt&&(Bt=!0),Kt&&(kt=E({},P),Rt=[],!0===Kt.html&&(E(kt,D),E(Rt,N)),!0===Kt.svg&&(E(kt,O),E(Rt,C),E(Rt,U)),!0===Kt.svgFilters&&(E(kt,L),E(Rt,C),E(Rt,U)),!0===Kt.mathMl&&(E(kt,I),E(Rt,j),E(Rt,U))),t.ADD_TAGS&&(kt===Et&&(kt=_(kt)),E(kt,t.ADD_TAGS,he)),t.ADD_ATTR&&(Rt===_t&&(Rt=_(Rt)),E(Rt,t.ADD_ATTR,he)),t.ADD_URI_SAFE_ATTR&&E(te,t.ADD_URI_SAFE_ATTR,he),t.FORBID_CONTENTS&&(Vt===Jt&&(Vt=_(Vt)),E(Vt,t.FORBID_CONTENTS,he)),$t&&(kt["#text"]=!0),Ct&&E(kt,["html","head","body"]),kt.table&&(E(kt,["tbody"]),delete Dt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');st=t.TRUSTED_TYPES_POLICY,ct=st.createHTML("")}else void 0===st&&(st=ot(Y,s)),null!==st&&"string"==typeof ct&&(ct=st.createHTML(""));r&&r(t),ge=t}},xe=E({},[...O,...L,...M]),ve=E({},[...I,...F]),Te=function(t){let e=lt(t);e&&e.tagName||(e={namespaceURI:re,tagName:"template"});const n=h(t.tagName),i=h(e.tagName);return!!le[t.namespaceURI]&&(t.namespaceURI===ie?e.namespaceURI===oe?"svg"===n:e.namespaceURI===ne?"svg"===n&&("annotation-xml"===i||ce[i]):Boolean(xe[n]):t.namespaceURI===ne?e.namespaceURI===oe?"math"===n:e.namespaceURI===ie?"math"===n&&ue[i]:Boolean(ve[n]):t.namespaceURI===oe?!(e.namespaceURI===ie&&!ue[i])&&!(e.namespaceURI===ne&&!ce[i])&&!ve[n]&&(fe[n]||!xe[n]):!("application/xhtml+xml"!==pe||!le[t.namespaceURI]))},Se=function(t){m(i.removed,{element:t});try{lt(t).removeChild(t)}catch(e){V(t)}},Ae=function(t,e){try{m(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){m(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Bt||Wt)try{Se(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ke=function(t){let e=null,n=null;if(Ut)t="<remove></remove>"+t;else{const e=y(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===pe&&re===oe&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=st?st.createHTML(t):t;if(re===oe)try{e=(new q).parseFromString(i,pe)}catch(t){}if(!e||!e.documentElement){e=ut.createDocument(re,"template",null);try{e.documentElement.innerHTML=ae?ct:i}catch(t){}}const r=e.body||e.documentElement;return t&&n&&r.insertBefore(o.createTextNode(n),r.childNodes[0]||null),re===oe?mt.call(e,Ct?"html":"body")[0]:Ct?e.documentElement:r},Ee=function(t){return ft.call(t.ownerDocument||t,t,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Re=function(t){return t instanceof H&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof W)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},_e=function(t){return"function"==typeof k&&t instanceof k};function ze(t,e,n){u(t,(t=>{t.call(i,e,n,ge)}))}const De=function(t){let e=null;if(ze(ht.beforeSanitizeElements,t,null),Re(t))return Se(t),!0;const n=he(t.nodeName);if(ze(ht.uponSanitizeElement,t,{tagName:n,allowedTags:kt}),Nt&&t.hasChildNodes()&&!_e(t.firstElementChild)&&T(/<[/\w!]/g,t.innerHTML)&&T(/<[/\w!]/g,t.textContent))return Se(t),!0;if(t.nodeType===tt)return Se(t),!0;if(Nt&&t.nodeType===et&&T(/<[/\w]/g,t.data))return Se(t),!0;if(!kt[n]||Dt[n]){if(!Dt[n]&&Le(n)){if(zt.tagNameCheck instanceof RegExp&&T(zt.tagNameCheck,n))return!1;if(zt.tagNameCheck instanceof Function&&zt.tagNameCheck(n))return!1}if($t&&!Vt[n]){const e=lt(t)||t.parentNode,n=at(t)||t.childNodes;if(n&&e)for(let i=n.length-1;i>=0;--i){const o=G(n[i],!0);o.__removalCount=(t.__removalCount||0)+1,e.insertBefore(o,rt(t))}}return Se(t),!0}return t instanceof R&&!Te(t)?(Se(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!T(/<\/no(script|embed|frames)/i,t.innerHTML)?(Pt&&t.nodeType===Z&&(e=t.textContent,u([gt,yt,bt],(t=>{e=b(e,t," ")})),t.textContent!==e&&(m(i.removed,{element:t.cloneNode()}),t.textContent=e)),ze(ht.afterSanitizeElements,t,null),!1):(Se(t),!0)},Oe=function(t,e,n){if(qt&&("id"===e||"name"===e)&&(n in o||n in ye))return!1;if(Mt&&!Ot[e]&&T(wt,e));else if(Lt&&T(xt,e));else if(!Rt[e]||Ot[e]){if(!(Le(t)&&(zt.tagNameCheck instanceof RegExp&&T(zt.tagNameCheck,t)||zt.tagNameCheck instanceof Function&&zt.tagNameCheck(t))&&(zt.attributeNameCheck instanceof RegExp&&T(zt.attributeNameCheck,e)||zt.attributeNameCheck instanceof Function&&zt.attributeNameCheck(e,t))||"is"===e&&zt.allowCustomizedBuiltInElements&&(zt.tagNameCheck instanceof RegExp&&T(zt.tagNameCheck,n)||zt.tagNameCheck instanceof Function&&zt.tagNameCheck(n))))return!1}else if(te[e]);else if(T(At,b(n,Tt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==w(n,"data:")||!Qt[t])if(It&&!T(vt,b(n,Tt,"")));else if(n)return!1;return!0},Le=function(t){return"annotation-xml"!==t&&y(t,St)},Me=function(t){ze(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Re(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Rt,forceKeepAttr:void 0};let o=e.length;for(;o--;){const r=e[o],{name:a,namespaceURI:l,value:s}=r,c=he(a),f=s;let m="value"===a?f:x(f);if(n.attrName=c,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,ze(ht.uponSanitizeAttribute,t,n),m=n.attrValue,!Yt||"id"!==c&&"name"!==c||(Ae(a,t),m=Xt+m),Nt&&T(/((--!?|])>)|<\/(style|title|textarea)/i,m)){Ae(a,t);continue}if("attributename"===c&&y(m,"href")){Ae(a,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ae(a,t);continue}if(!Ft&&T(/\/>/i,m)){Ae(a,t);continue}Pt&&u([gt,yt,bt],(t=>{m=b(m,t," ")}));const d=he(t.nodeName);if(Oe(d,c,m)){if(st&&"object"==typeof Y&&"function"==typeof Y.getAttributeType)if(l);else switch(Y.getAttributeType(d,c)){case"TrustedHTML":m=st.createHTML(m);break;case"TrustedScriptURL":m=st.createScriptURL(m)}if(m!==f)try{l?t.setAttributeNS(l,a,m):t.setAttribute(a,m),Re(t)?Se(t):p(i.removed)}catch(e){Ae(a,t)}}else Ae(a,t)}ze(ht.afterSanitizeAttributes,t,null)},Ie=function t(e){let n=null;const i=Ee(e);for(ze(ht.beforeSanitizeShadowDOM,e,null);n=i.nextNode();)ze(ht.uponSanitizeShadowNode,n,null),De(n),Me(n),n.content instanceof c&&t(n.content);ze(ht.afterSanitizeShadowDOM,e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,r=null,l=null;if(ae=!t,ae&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_e(t)){if("function"!=typeof t.toString)throw S("toString is not a function");if("string"!=typeof(t=t.toString()))throw S("dirty is not a string, aborting")}if(!i.isSupported)return t;if(jt||we(e),i.removed=[],"string"==typeof t&&(Gt=!1),Gt){if(t.nodeName){const e=he(t.nodeName);if(!kt[e]||Dt[e])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof k)n=ke("\x3c!----\x3e"),o=n.ownerDocument.importNode(t,!0),o.nodeType===Q&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Bt&&!Pt&&!Ct&&-1===t.indexOf("<"))return st&&Ht?st.createHTML(t):t;if(n=ke(t),!n)return Bt?null:Ht?ct:""}n&&Ut&&Se(n.firstChild);const s=Ee(Gt?t:n);for(;r=s.nextNode();)De(r),Me(r),r.content instanceof c&&Ie(r.content);if(Gt)return t;if(Bt){if(Wt)for(l=pt.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Rt.shadowroot||Rt.shadowrootmode)&&(l=dt.call(a,l,!0)),l}let f=Ct?n.outerHTML:n.innerHTML;return Ct&&kt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&T(K,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),Pt&&u([gt,yt,bt],(t=>{f=b(f,t," ")})),st&&Ht?st.createHTML(f):f},i.setConfig=function(){we(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),jt=!0},i.clearConfig=function(){ge=null,jt=!1},i.isValidAttribute=function(t,e,n){ge||we({});const i=he(t),o=he(e);return Oe(i,o,n)},i.addHook=function(t,e){"function"==typeof e&&m(ht[t],e)},i.removeHook=function(t,e){if(void 0!==e){const n=f(ht[t],e);return-1===n?void 0:d(ht[t],n,1)[0]}return p(ht[t])},i.removeHooks=function(t){ht[t]=[]},i.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();return rt}()}));export{n as p}
|
|
3
|
+
t.exports=function(){const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:i}=Object;let{freeze:r,seal:a,create:l}=Object,{apply:s,construct:c}="undefined"!=typeof Reflect&&Reflect;r||(r=function(t){return t}),a||(a=function(t){return t}),s||(s=function(t,e){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return t.apply(e,o)}),c||(c=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return new t(...n)});const u=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),p=k(Array.prototype.pop),m=k(Array.prototype.push),d=k(Array.prototype.splice),h=k(String.prototype.toLowerCase),g=k(String.prototype.toString),y=k(String.prototype.match),b=k(String.prototype.replace),w=k(String.prototype.indexOf),x=k(String.prototype.trim),v=k(Object.prototype.hasOwnProperty),T=k(RegExp.prototype.test),S=(A=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return c(A,e)});var A;function k(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return s(t,e,o)}}function E(t,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;e&&e(t,null);let r=o.length;for(;r--;){let e=o[r];if("string"==typeof e){const t=i(e);t!==e&&(n(o)||(o[r]=t),e=t)}t[e]=!0}return t}function R(t){for(let e=0;e<t.length;e++)v(t,e)||(t[e]=null);return t}function _(e){const n=l(null);for(const[o,i]of t(e))v(e,o)&&(n[o]=Array.isArray(i)?R(i):i&&"object"==typeof i&&i.constructor===Object?_(i):i);return n}function z(t,e){for(;null!==t;){const n=i(t,e);if(n){if(n.get)return k(n.get);if("function"==typeof n.value)return k(n.value)}t=o(t)}return function(){return null}}const D=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","slot","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=r(["#text"]),N=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),C=r(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\$\{[\w\W]*/gm),q=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=a(/^(?:\w+script|data):/i),G=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:G,CUSTOM_ELEMENT:V,DATA_ATTR:q,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:$,MUSTACHE_EXPR:B,TMPLIT_EXPR:H});const Q=1,Z=3,tt=7,et=8,nt=9,ot=function(){return"undefined"==typeof window?null:window},it=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(n=e.getAttribute(o));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var rt=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ot();const o=t=>e(t);if(o.version="3.2.7",o.removed=[],!n||!n.document||n.document.nodeType!==nt||!n.Element)return o.isSupported=!1,o;let{document:i}=n;const a=i,s=a.currentScript,{DocumentFragment:c,HTMLTemplateElement:A,Node:k,Element:R,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:q,trustedTypes:Y}=n,$=R.prototype,G=z($,"cloneNode"),V=z($,"remove"),rt=z($,"nextSibling"),at=z($,"childNodes"),lt=z($,"parentNode");if("function"==typeof A){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let st,ct="";const{implementation:ut,createNodeIterator:ft,createDocumentFragment:pt,getElementsByTagName:mt}=i,{importNode:dt}=a;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof t&&"function"==typeof lt&&ut&&void 0!==ut.createHTMLDocument;const{MUSTACHE_EXPR:gt,ERB_EXPR:yt,TMPLIT_EXPR:bt,DATA_ATTR:wt,ARIA_ATTR:xt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:Tt,CUSTOM_ELEMENT:St}=J;let{IS_ALLOWED_URI:At}=J,kt=null;const Et=E({},[...D,...O,...L,...I,...P]);let Rt=null;const _t=E({},[...N,...C,...j,...U]);let zt=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,Ot=null,Lt=!0,Mt=!0,It=!1,Ft=!0,Pt=!1,Nt=!0,Ct=!1,jt=!1,Ut=!1,Bt=!1,Wt=!1,Ht=!1,qt=!0,Yt=!1;const Xt="user-content-";let $t=!0,Gt=!1,Kt={},Vt=null;const Jt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qt=null;const Zt=E({},["audio","video","img","source","image","track"]);let te=null;const ee=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ne="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",ie="http://www.w3.org/1999/xhtml";let re=ie,ae=!1,le=null;const se=E({},[ne,oe,ie],g);let ce=E({},["mi","mo","mn","ms","mtext"]),ue=E({},["annotation-xml"]);const fe=E({},["title","style","font","a","script"]);let pe=null;const me=["application/xhtml+xml","text/html"],de="text/html";let he=null,ge=null;const ye=i.createElement("form"),be=function(t){return t instanceof RegExp||t instanceof Function},we=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ge||ge!==t){if(t&&"object"==typeof t||(t={}),t=_(t),pe=-1===me.indexOf(t.PARSER_MEDIA_TYPE)?de:t.PARSER_MEDIA_TYPE,he="application/xhtml+xml"===pe?g:h,kt=v(t,"ALLOWED_TAGS")?E({},t.ALLOWED_TAGS,he):Et,Rt=v(t,"ALLOWED_ATTR")?E({},t.ALLOWED_ATTR,he):_t,le=v(t,"ALLOWED_NAMESPACES")?E({},t.ALLOWED_NAMESPACES,g):se,te=v(t,"ADD_URI_SAFE_ATTR")?E(_(ee),t.ADD_URI_SAFE_ATTR,he):ee,Qt=v(t,"ADD_DATA_URI_TAGS")?E(_(Zt),t.ADD_DATA_URI_TAGS,he):Zt,Vt=v(t,"FORBID_CONTENTS")?E({},t.FORBID_CONTENTS,he):Jt,Dt=v(t,"FORBID_TAGS")?E({},t.FORBID_TAGS,he):_({}),Ot=v(t,"FORBID_ATTR")?E({},t.FORBID_ATTR,he):_({}),Kt=!!v(t,"USE_PROFILES")&&t.USE_PROFILES,Lt=!1!==t.ALLOW_ARIA_ATTR,Mt=!1!==t.ALLOW_DATA_ATTR,It=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Pt=t.SAFE_FOR_TEMPLATES||!1,Nt=!1!==t.SAFE_FOR_XML,Ct=t.WHOLE_DOCUMENT||!1,Bt=t.RETURN_DOM||!1,Wt=t.RETURN_DOM_FRAGMENT||!1,Ht=t.RETURN_TRUSTED_TYPE||!1,Ut=t.FORCE_BODY||!1,qt=!1!==t.SANITIZE_DOM,Yt=t.SANITIZE_NAMED_PROPS||!1,$t=!1!==t.KEEP_CONTENT,Gt=t.IN_PLACE||!1,At=t.ALLOWED_URI_REGEXP||X,re=t.NAMESPACE||ie,ce=t.MATHML_TEXT_INTEGRATION_POINTS||ce,ue=t.HTML_INTEGRATION_POINTS||ue,zt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&be(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(zt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&be(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(zt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(zt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pt&&(Mt=!1),Wt&&(Bt=!0),Kt&&(kt=E({},P),Rt=[],!0===Kt.html&&(E(kt,D),E(Rt,N)),!0===Kt.svg&&(E(kt,O),E(Rt,C),E(Rt,U)),!0===Kt.svgFilters&&(E(kt,L),E(Rt,C),E(Rt,U)),!0===Kt.mathMl&&(E(kt,I),E(Rt,j),E(Rt,U))),t.ADD_TAGS&&(kt===Et&&(kt=_(kt)),E(kt,t.ADD_TAGS,he)),t.ADD_ATTR&&(Rt===_t&&(Rt=_(Rt)),E(Rt,t.ADD_ATTR,he)),t.ADD_URI_SAFE_ATTR&&E(te,t.ADD_URI_SAFE_ATTR,he),t.FORBID_CONTENTS&&(Vt===Jt&&(Vt=_(Vt)),E(Vt,t.FORBID_CONTENTS,he)),$t&&(kt["#text"]=!0),Ct&&E(kt,["html","head","body"]),kt.table&&(E(kt,["tbody"]),delete Dt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');st=t.TRUSTED_TYPES_POLICY,ct=st.createHTML("")}else void 0===st&&(st=it(Y,s)),null!==st&&"string"==typeof ct&&(ct=st.createHTML(""));r&&r(t),ge=t}},xe=E({},[...O,...L,...M]),ve=E({},[...I,...F]),Te=function(t){let e=lt(t);e&&e.tagName||(e={namespaceURI:re,tagName:"template"});const n=h(t.tagName),o=h(e.tagName);return!!le[t.namespaceURI]&&(t.namespaceURI===oe?e.namespaceURI===ie?"svg"===n:e.namespaceURI===ne?"svg"===n&&("annotation-xml"===o||ce[o]):Boolean(xe[n]):t.namespaceURI===ne?e.namespaceURI===ie?"math"===n:e.namespaceURI===oe?"math"===n&&ue[o]:Boolean(ve[n]):t.namespaceURI===ie?!(e.namespaceURI===oe&&!ue[o])&&!(e.namespaceURI===ne&&!ce[o])&&!ve[n]&&(fe[n]||!xe[n]):!("application/xhtml+xml"!==pe||!le[t.namespaceURI]))},Se=function(t){m(o.removed,{element:t});try{lt(t).removeChild(t)}catch(e){V(t)}},Ae=function(t,e){try{m(o.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){m(o.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Bt||Wt)try{Se(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ke=function(t){let e=null,n=null;if(Ut)t="<remove></remove>"+t;else{const e=y(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===pe&&re===ie&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=st?st.createHTML(t):t;if(re===ie)try{e=(new q).parseFromString(o,pe)}catch(t){}if(!e||!e.documentElement){e=ut.createDocument(re,"template",null);try{e.documentElement.innerHTML=ae?ct:o}catch(t){}}const r=e.body||e.documentElement;return t&&n&&r.insertBefore(i.createTextNode(n),r.childNodes[0]||null),re===ie?mt.call(e,Ct?"html":"body")[0]:Ct?e.documentElement:r},Ee=function(t){return ft.call(t.ownerDocument||t,t,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Re=function(t){return t instanceof H&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof W)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},_e=function(t){return"function"==typeof k&&t instanceof k};function ze(t,e,n){u(t,(t=>{t.call(o,e,n,ge)}))}const De=function(t){let e=null;if(ze(ht.beforeSanitizeElements,t,null),Re(t))return Se(t),!0;const n=he(t.nodeName);if(ze(ht.uponSanitizeElement,t,{tagName:n,allowedTags:kt}),Nt&&t.hasChildNodes()&&!_e(t.firstElementChild)&&T(/<[/\w!]/g,t.innerHTML)&&T(/<[/\w!]/g,t.textContent))return Se(t),!0;if(t.nodeType===tt)return Se(t),!0;if(Nt&&t.nodeType===et&&T(/<[/\w]/g,t.data))return Se(t),!0;if(!kt[n]||Dt[n]){if(!Dt[n]&&Le(n)){if(zt.tagNameCheck instanceof RegExp&&T(zt.tagNameCheck,n))return!1;if(zt.tagNameCheck instanceof Function&&zt.tagNameCheck(n))return!1}if($t&&!Vt[n]){const e=lt(t)||t.parentNode,n=at(t)||t.childNodes;if(n&&e)for(let o=n.length-1;o>=0;--o){const i=G(n[o],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,rt(t))}}return Se(t),!0}return t instanceof R&&!Te(t)?(Se(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!T(/<\/no(script|embed|frames)/i,t.innerHTML)?(Pt&&t.nodeType===Z&&(e=t.textContent,u([gt,yt,bt],(t=>{e=b(e,t," ")})),t.textContent!==e&&(m(o.removed,{element:t.cloneNode()}),t.textContent=e)),ze(ht.afterSanitizeElements,t,null),!1):(Se(t),!0)},Oe=function(t,e,n){if(qt&&("id"===e||"name"===e)&&(n in i||n in ye))return!1;if(Mt&&!Ot[e]&&T(wt,e));else if(Lt&&T(xt,e));else if(!Rt[e]||Ot[e]){if(!(Le(t)&&(zt.tagNameCheck instanceof RegExp&&T(zt.tagNameCheck,t)||zt.tagNameCheck instanceof Function&&zt.tagNameCheck(t))&&(zt.attributeNameCheck instanceof RegExp&&T(zt.attributeNameCheck,e)||zt.attributeNameCheck instanceof Function&&zt.attributeNameCheck(e,t))||"is"===e&&zt.allowCustomizedBuiltInElements&&(zt.tagNameCheck instanceof RegExp&&T(zt.tagNameCheck,n)||zt.tagNameCheck instanceof Function&&zt.tagNameCheck(n))))return!1}else if(te[e]);else if(T(At,b(n,Tt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==w(n,"data:")||!Qt[t])if(It&&!T(vt,b(n,Tt,"")));else if(n)return!1;return!0},Le=function(t){return"annotation-xml"!==t&&y(t,St)},Me=function(t){ze(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Re(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Rt,forceKeepAttr:void 0};let i=e.length;for(;i--;){const r=e[i],{name:a,namespaceURI:l,value:s}=r,c=he(a),f=s;let m="value"===a?f:x(f);if(n.attrName=c,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,ze(ht.uponSanitizeAttribute,t,n),m=n.attrValue,!Yt||"id"!==c&&"name"!==c||(Ae(a,t),m=Xt+m),Nt&&T(/((--!?|])>)|<\/(style|title|textarea)/i,m)){Ae(a,t);continue}if("attributename"===c&&y(m,"href")){Ae(a,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ae(a,t);continue}if(!Ft&&T(/\/>/i,m)){Ae(a,t);continue}Pt&&u([gt,yt,bt],(t=>{m=b(m,t," ")}));const d=he(t.nodeName);if(Oe(d,c,m)){if(st&&"object"==typeof Y&&"function"==typeof Y.getAttributeType)if(l);else switch(Y.getAttributeType(d,c)){case"TrustedHTML":m=st.createHTML(m);break;case"TrustedScriptURL":m=st.createScriptURL(m)}if(m!==f)try{l?t.setAttributeNS(l,a,m):t.setAttribute(a,m),Re(t)?Se(t):p(o.removed)}catch(e){Ae(a,t)}}else Ae(a,t)}ze(ht.afterSanitizeAttributes,t,null)},Ie=function t(e){let n=null;const o=Ee(e);for(ze(ht.beforeSanitizeShadowDOM,e,null);n=o.nextNode();)ze(ht.uponSanitizeShadowNode,n,null),De(n),Me(n),n.content instanceof c&&t(n.content);ze(ht.afterSanitizeShadowDOM,e,null)};return o.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,r=null,l=null;if(ae=!t,ae&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_e(t)){if("function"!=typeof t.toString)throw S("toString is not a function");if("string"!=typeof(t=t.toString()))throw S("dirty is not a string, aborting")}if(!o.isSupported)return t;if(jt||we(e),o.removed=[],"string"==typeof t&&(Gt=!1),Gt){if(t.nodeName){const e=he(t.nodeName);if(!kt[e]||Dt[e])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof k)n=ke("\x3c!----\x3e"),i=n.ownerDocument.importNode(t,!0),i.nodeType===Q&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!Bt&&!Pt&&!Ct&&-1===t.indexOf("<"))return st&&Ht?st.createHTML(t):t;if(n=ke(t),!n)return Bt?null:Ht?ct:""}n&&Ut&&Se(n.firstChild);const s=Ee(Gt?t:n);for(;r=s.nextNode();)De(r),Me(r),r.content instanceof c&&Ie(r.content);if(Gt)return t;if(Bt){if(Wt)for(l=pt.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Rt.shadowroot||Rt.shadowrootmode)&&(l=dt.call(a,l,!0)),l}let f=Ct?n.outerHTML:n.innerHTML;return Ct&&kt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&T(K,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),Pt&&u([gt,yt,bt],(t=>{f=b(f,t," ")})),st&&Ht?st.createHTML(f):f},o.setConfig=function(){we(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),jt=!0},o.clearConfig=function(){ge=null,jt=!1},o.isValidAttribute=function(t,e,n){ge||we({});const o=he(t),i=he(e);return Oe(o,i,n)},o.addHook=function(t,e){"function"==typeof e&&m(ht[t],e)},o.removeHook=function(t,e){if(void 0!==e){const n=f(ht[t],e);return-1===n?void 0:d(ht[t],n,1)[0]}return p(ht[t])},o.removeHooks=function(t){ht[t]=[]},o.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return rt}()}));export{n as p}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,F as e,H as l}from"./p-23a36bb6.js";import{i as h}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,F as e,H as l}from"./p-23a36bb6.js";import{i as h}from"./p-641ee538.js";import{ArrayUtils as n}from"@sankhyalabs/core";var o;!function(t){t.DATASOURCE_RESULTS="DATASOURCE_RESULTS",t.DATASOURCE_RESULTS_EMPTY="DATASOURCE_RESULTS_EMPTY",t.DATASOURCE_INIT="DATASOURCE_INIT",t.OPTIONS_EMPTY="OPTIONS_EMPTY",t.OPTIONS="OPTIONS"}(o||(o={}));const a=class{constructor(s){t(this,s),this.changeFilteredOptions=i(this,"changeFilteredOptions",7),this.columnName=void 0,this.dataSource=void 0,this.useOptions=!1,this.options=void 0,this.isTextSearch=!1,this.filteredOptions=void 0,this.displayOptions=void 0,this.viewScenario=void 0,this.displayOptionToCheckAllItems=!0}async componentWillLoad(){this.i18n=await h()}async clearFilteredOptions(){this.setInitialScenario(),this.filteredOptions=[],this.searchInput&&await this.searchInput.clearValue(),this.filterInput&&(this.filterInput.value="")}onChangeUseOptions(){this.setInitialScenario()}onChangeOptions(){this.options&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.options)),this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.setInitialScenario()}onChangeFilteredOptions(t){this.displayOptions=this.filteredOptions,this.displayOptionToCheckAllItems=this.filteredOptions.length>1,this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.changeFilteredOptions.emit(t)}componentDidLoad(){this.onChangeOptions()}componentDidRender(){this.changeCheckAllValeuFromFilteredOptions()}ordenationByCheckStateAndAlphabetically(t){const i=[],s=[];let e;return t.forEach((t=>{null==t.value||""===t.label?e=Object.assign(Object.assign({},t),{label:this.i18n("ez-multi-selection-list.empty")}):t.check?i.push(t):s.push(t)})),(null==e?[]:[e]).concat(null==this.dataSource?n.sortAlphabetically(i):this.dataSource.sortItems(this.columnName,i)).concat(null==this.dataSource?n.sortAlphabetically(s):this.dataSource.sortItems(this.columnName,s))}changeCheckAllValeuFromFilteredOptions(){var t,i,s,e;const l=null===(t=this.filteredOptions)||void 0===t?void 0:t.every((t=>!0===t.check)),h=null===(i=this.filteredOptions)||void 0===i?void 0:i.every((t=>!1===t.check)),n=(null===(s=this.filteredOptions)||void 0===s?void 0:s.some((t=>!1===t.check)))&&(null===(e=this.filteredOptions)||void 0===e?void 0:e.some((t=>!0===t.check)))&&(!l||!h);return this.checkInput&&l?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!0)):this.checkInput&&n?(this.checkInput.indeterminate=!0,void(this.checkInput.value=!1)):this.checkInput&&h?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!1)):void 0}setInitialScenario(){if(this.useOptions)return this.viewScenario=o.OPTIONS,void this.changeCheckAllValeuFromFilteredOptions();this.viewScenario=this.options&&this.options.length>0?o.DATASOURCE_RESULTS:o.DATASOURCE_INIT}async searchWithDataSource(t,i){const{argument:s,mode:e}=t;if("PRELOAD"!==e&&i)return this.dataSource.fetchData(s,i)}async handleSearchOnDataSource(t){var i;const s=null!==(i=this.filteredOptions)&&void 0!==i?i:[];t.detail&&!s.some((i=>i.value==t.detail.value))&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...s,t.detail])),this.viewScenario=o.DATASOURCE_RESULTS,await this.searchInput.clearValue()}async handleRemoveItemFromOptions(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter((i=>i.value!==t.value))),0===this.filteredOptions.length&&(this.viewScenario=o.DATASOURCE_INIT),this.searchInput&&await this.searchInput.clearValue()}handleSearchOnOption(t){if(t.detail)return this.displayOptions=n.applyStringFilter(t.detail,this.filteredOptions,!0),void(this.viewScenario=0===this.displayOptions.length?o.OPTIONS_EMPTY:o.OPTIONS);this.displayOptions=this.filteredOptions,this.viewScenario=o.OPTIONS}handleChangeSelectAllItems(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...this.filteredOptions.map((i=>(i.check=!!t.detail,i)))])}handleChangeSelectedItem(t){const{detail:i}=t;this.filteredOptions.find((t=>t.label===i.label)).check=i.check,this.changeFilteredOptions.emit(this.filteredOptions)}buildViewList(t){return s(e,null,this.displayOptionToCheckAllItems&&s("ez-check",{ref:t=>this.checkInput=t,label:this.i18n("ez-multi-selection-list.selectAll"),class:"multi-selection__select-all",onEzChange:this.handleChangeSelectAllItems.bind(this)}),s("ez-list",{class:"multi-selection__list",dataSource:this.displayOptions.map((t=>Object.assign(Object.assign({},t),{id:t.value}))),listMode:"check",hoverFeedback:!0,onEzCheckChange:this.handleChangeSelectedItem.bind(this),itemSlotBuilder:t?this.buildDeleteIconSlot.bind(this):null}))}buildDeleteIconSlot(t){return s("ez-icon",{style:{cursor:"pointer"},iconName:"delete",onClick:()=>this.handleRemoveItemFromOptions(t)})}buildInitViewWithDataSource(){return s("multi-selection-box-message",{message:this.i18n("ez-multi-selection-list.initMessage")})}buildViewEmptyResults(){return s("multi-selection-box-message",{message:this.i18n("ez-multi-selection-list.emptyResults")})}scenarioToDisplay(t){const i={[o.DATASOURCE_INIT]:()=>this.buildInitViewWithDataSource(),[o.DATASOURCE_RESULTS]:()=>this.buildViewList(!0),[o.DATASOURCE_RESULTS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS]:()=>this.buildViewList(!1)}[t];return i?i():void 0}render(){return s(l,null,s("div",{class:"multi-selection"},this.useOptions?s("ez-filter-input",{ref:t=>this.filterInput=t,label:this.i18n("ez-multi-selection-list.search"),onEzChange:this.handleSearchOnOption.bind(this)}):s("ez-search",{class:"multi-selection__input",label:this.i18n("ez-multi-selection-list.search"),ref:t=>this.searchInput=t,suppressEmptyOption:!0,showOptionValue:!1,showSelectedValue:!1,optionLoader:t=>this.searchWithDataSource(t,this.columnName),onEzChange:this.handleSearchOnDataSource.bind(this),isTextSearch:this.isTextSearch}),s("ez-scroll",{class:"multi-selection__content-options"},this.scenarioToDisplay(this.viewScenario))))}static get watchers(){return{useOptions:["onChangeUseOptions"],options:["onChangeOptions"],filteredOptions:["onChangeFilteredOptions"]}}};a.style=".sc-ez-multi-selection-list-h{--ez-check--outter-gap:0px;--ez-multi-selection-default-height:322px;display:block;width:304px;height:var(--ez-multi-selection-default-height);min-height:fit-content;max-height:calc(100vh - 350px)}.multi-selection__input.sc-ez-multi-selection-list{margin-bottom:var(--space--2xs, 8px)}.multi-selection__content-options.sc-ez-multi-selection-list{position:relative;left:-4px}.multi-selection__select-all.sc-ez-multi-selection-list{height:var(--space--xl);margin:0 var(--space--small, 6px)}.multi-selection__list.sc-ez-multi-selection-list{max-height:calc(100vh - 435px);overflow-y:auto;overflow-x:clip}.multi-selection__list.sc-ez-multi-selection-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{a as ez_multi_selection_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as i,H as e,g as r}from"./p-23a36bb6.js";import{ElementIDUtils as n}from"@sankhyalabs/core";import{i as s}from"./p-a61fdd20.js";const l=class{constructor(i){t(this,i),this.buttonClick=o(this,"buttonClick",7),this.dropdownItemClick=o(this,"dropdownItemClick",7),this.dropdownSubActionClick=o(this,"dropdownSubActionClick",7),this.rippleCounter=0,this.eventListeners=new WeakMap,this.createRipple=(t,o)=>{const i=o?this.leftButton:this.rightButton;if(!i||this.isButtonDisabled||this.suppressAnimation)return;const e=this.getEventCoordinates(t),r=i.getBoundingClientRect(),n=Object.assign(Object.assign({},{x:e.x-r.left,y:e.y-r.top}),{id:++this.rippleCounter});this.addRippleToButton(n,o)},this.positionDropdown=()=>{this.rightButton&&this.dropdownParent&&requestAnimationFrame((()=>{const{rightButton:t,dropdownParent:o}=this,i=t.getBoundingClientRect(),e=o.getBoundingClientRect(),r=window.innerHeight,n=window.innerWidth,s=this.calculateDropdownPosition(i,e,r-i.bottom<e.height&&i.top>e.height,n-i.left<e.width&&i.left>e.width);Object.assign(o.style,s)}))},this.removeForcedFocusVisibleLeft=()=>{var t;null===(t=this.leftButton)||void 0===t||t.classList.remove("force-focus-visible")},this.removeForcedFocusVisibleRight=()=>{var t;null===(t=this.rightButton)||void 0===t||t.classList.remove("force-focus-visible")},this.leftRipples=[],this.rightRipples=[],this.isLeftPressed=!1,this.isRightPressed=!1,this.show=!1,this.enabled=!0,this.isDisabled=!1,this.iconName=void 0,this.leftIconName=void 0,this.rightIconName=void 0,this.image=void 0,this.items=void 0,this.label=void 0,this.leftTitle=void 0,this.rightTitle=void 0,this.mode="default",this.size="medium",this.variant=void 0,this.suppressAnimation=!1,this.itemBuilder=void 0}async setBlur(){this.leftButton.blur(),this.rightButton.blur()}async setLeftButtonFocus(){this.leftButton.focus(),this.leftButton.classList.add("force-focus-visible")}async setRightButtonFocus(){this.rightButton.focus(),this.rightButton.classList.add("force-focus-visible")}async toggleDropdown(){this.show=!this.show}async isOpenedDropdown(){return this.show}getEventCoordinates(t){return t instanceof MouseEvent?{x:t.clientX,y:t.clientY}:{x:t.touches[0].clientX,y:t.touches[0].clientY}}addRippleToButton(t,o){o?(this.leftRipples=[...this.leftRipples,t],this.setButtonPressed(!0,!0),this.scheduleRippleCleanup(t,!0)):(this.rightRipples=[...this.rightRipples,t],this.setButtonPressed(!1,!0),this.scheduleRippleCleanup(t,!1))}setButtonPressed(t,o){t?this.isLeftPressed=o:this.isRightPressed=o}scheduleRippleCleanup(t,o){setTimeout((()=>{this.setButtonPressed(o,!1)}),150),setTimeout((()=>{this.removeRipple(t.id,o)}),600)}removeRipple(t,o){o?this.leftRipples=this.leftRipples.filter((o=>o.id!==t)):this.rightRipples=this.rightRipples.filter((o=>o.id!==t))}onMouseDown(t){const o=t.composedPath(),i=o.includes(this.leftButton),e=o.includes(this.rightButton);i?this.createRipple(t,!0):e&&this.createRipple(t,!1)}onTouchStart(t){const o=t.composedPath(),i=o.includes(this.leftButton),e=o.includes(this.rightButton);i?this.createRipple(t,!0):e&&this.createRipple(t,!1)}clickListener(t){(!this.enabled||!0===this.isDisabled||""===this.isDisabled||"full"===this.isDisabled)&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}shouldShowLabelOnLeftButton(){return"icon-only"!==this.mode}shouldShowIconOnLeftButton(){return"default"!==this.mode}getIconSize(t="medium"){var o;const i=null===(o=this.size)||void 0===o?void 0:o.toLowerCase();return["small","medium","large"].includes(i)?i:t}closeDropdown(){this.show=!1}handleButtonClick(){this.buttonClick.emit()}handleDropdownItemClick(t){this.dropdownItemClick.emit(t.detail),t.stopPropagation(),this.closeDropdown()}handleDropdownSubActionClick(t){this.dropdownSubActionClick.emit(t.detail),t.stopPropagation(),this.closeDropdown()}calculateDropdownPosition(t,o,i,e){const r=this.offsetParentRect||{top:0,left:0};return{top:i?"auto":`${t.bottom-r.top+window.scrollY}px`,bottom:i?window.innerHeight-t.top-window.scrollY+"px":"auto",left:e?`${t.right-o.width-r.left+window.scrollX}px`:`${t.left-r.left+window.scrollX}px`,maxHeight:i?t.top-r.top+"px":"none"}}setupEventListeners(){const t=new AbortController,{signal:o}=t;window.addEventListener("scroll",this.positionDropdown,{signal:o,passive:!0}),window.addEventListener("resize",this.positionDropdown,{signal:o,passive:!0}),this.eventListeners.set(this._element,t)}cleanupEventListeners(){const t=this.eventListeners.get(this._element);t&&(t.abort(),this.eventListeners.delete(this._element))}async componentWillLoad(){this.i18n=await s()}componentDidLoad(){this.addElementIDs(),this.setupEventListeners(),this.addBlurListeners(),setTimeout((()=>this.positionDropdown()),0)}disconnectedCallback(){this.cleanupEventListeners(),this.removeBlurListeners()}componentDidUpdate(){this.show&&this.positionDropdown()}addElementIDs(){this._element&&n.addIDInfo(this._element),this.leftButton&&n.addIDInfo(this.leftButton,"leftButton",{id:"embedded"}),this.rightButton&&n.addIDInfo(this.rightButton,"rightButton",{id:"embedded"})}renderRipples(t){return t.map((t=>i("span",{key:t.id,class:"ripple",style:{left:t.x-10+"px",top:t.y-10+"px"}})))}render(){const t=this.shouldShowIconOnLeftButton(),o=this.shouldShowLabelOnLeftButton(),r=this.getIconSize();return i(e,{class:this.variant?`ez-split-button--${this.variant}`:""},i("div",{class:`ez-split-button ${this.size} ${this.mode}`},this.renderLeftButton(t,o,r),this.renderDivider(),this.renderDropdownSection(r)))}renderLeftButton(t,o,e){return i("button",{class:`ez-split-button__left-button ${e} ${this.mode} ${this.isLeftPressed?"pressed":""}`,title:this.leftTitle||this.label,type:"button",disabled:this.isButtonDisabled,"aria-disabled":this.isButtonAriaDisabled,onClick:()=>this.handleButtonClick(),ref:t=>this.leftButton=t},t&&this.renderLeftIcon(e),o&&this.renderLabel(),!this.suppressAnimation&&this.renderRipples(this.leftRipples))}renderDivider(){return i("div",{class:`ez-split-button__divider ${this.mode} ez-split-button__divider--${this.size} ${this.isButtonDisabled?"disabled":""}`,"aria-disabled":this.isButtonAriaDisabled})}renderDropdownSection(t){return i("div",{class:"dropdown"},this.renderRightButton(t),this.renderDropdownContent())}renderRightButton(t){return i("button",{class:`ez-split-button__right-button ${t} ez-split-button__right-button--${t} ${this.isRightPressed?"pressed":""}`,title:this.rightTitle||this.i18n("ez-split-button.moreOptions"),type:"button",disabled:this.isButtonDisabled,"aria-disabled":this.isButtonAriaDisabled,onClick:()=>this.toggleDropdown(),ref:t=>this.rightButton=t},this.renderRightIcon(t),!this.suppressAnimation&&this.renderRipples(this.rightRipples))}renderDropdownContent(){return i("div",{class:`dropdown-content dropdown-content--${this.size}`,ref:t=>this.dropdownParent=t},this.show&&this.renderDropdown())}renderLeftIcon(t){return i("ez-icon",{href:this.image,iconName:this.leftIconName||this.iconName,size:t})}renderLabel(){return i("label",{title:this.leftTitle||this.label},this.label)}renderRightIcon(t){return i("ez-icon",{class:"ez-split-button__right-button-container "+(t?`btn-icon--${t}`:""),iconName:this.rightIconName||"chevron-down",size:t})}renderDropdown(){return i("ez-dropdown",{items:this.items,onClick:t=>t.stopPropagation(),onEzOutsideClick:()=>this.closeDropdown(),onEzClick:t=>this.handleDropdownItemClick(t),onEzSubActionClick:t=>this.handleDropdownSubActionClick(t),itemBuilder:this.itemBuilder})}addBlurListeners(){var t,o;this.removeBlurListeners(),null===(t=this.leftButton)||void 0===t||t.addEventListener("blur",this.removeForcedFocusVisibleLeft),null===(o=this.rightButton)||void 0===o||o.addEventListener("blur",this.removeForcedFocusVisibleRight)}removeBlurListeners(){var t,o;null===(t=this.leftButton)||void 0===t||t.removeEventListener("blur",this.removeForcedFocusVisibleLeft),null===(o=this.rightButton)||void 0===o||o.removeEventListener("blur",this.removeForcedFocusVisibleRight)}connectedCallback(){this.addBlurListeners()}get isButtonDisabled(){return"full"===this.isDisabled||!this.enabled}get isButtonAriaDisabled(){return!0===this.isDisabled||""===this.isDisabled}get _element(){return r(this)}};l.style=':host{--ez-split-button--min-width:var(--space--40, 40px);--ez-split-button--width:auto;--ez-split-button--height:var(--space--32, 32px);--ez-split-button__medium-icon--width:var(--space--40, 40px);--ez-split-button__large-icon--width:var(--space--44, 44px);--ez-split-button__label--padding-top:var(--space--0, 0px);--ez-split-button__label--padding-bottom:var(--space--0, 0px);--ez-split-button__right-button--padding-left:var(--space--8, 8px);--ez-split-button__right-button--padding-right:var(--space--12, 12px);--ez-split-button--color:var(--color--ocean-green-600, #008561);--ez-split-button__left-icon--color:var(--color--ocean-green-600, #008561);--ez-split-button__right-icon--color:var(--color--ocean-green-600, #008561);--ez-split-button--background-color:var(--color--gray-70, #FFFFFF);--ez-split-button--border:1px solid var(--color--gray-90, #EAEAEA);--ez-split-button--font-size:var(--font-size--default, 14px);--ez-split-button--line-height:var(--line-height--28, 28px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--font-weight--regular,400);--ez-split-button--border-radius:var(--border--radius-24, 24px);--ez-split-button--hover-color:var(--color--primary-600, #007a5a);--ez-split-button--hover--background-color:var(--color--gray-80, #F9F9F9);--ez-split-button--disabled-color:var(--color--gray-400, #77777A);--ez-split-button--disabled--background-color:var(--color--gray-80, #F9F9F9);--ez-split-button--focus--border:var(--border--medium, 2px) var(--color--primary-300);--ez-split-button--focus--box-shadow:none;display:flex;width:fit-content}:host(.ez-split-button--primary){--ez-split-button--color:var(--color--gray-70);--ez-split-button--background-color:var(--color--ocean-green-500);--ez-split-button--font-weight:var(--font-weight--regular);--ez-split-button--border:none;--ez-split-button__left-icon--color:var(--color--gray-70);--ez-split-button__right-icon--color:var(--color--gray-70);--ez-split-button--hover-color:var(--color--gray-70);--ez-split-button--hover--background-color:var(--color--ocean-green-700);--ez-split-button--hover--border:none;--ez-split-button--left-icon--hover-color:var(--color--gray-70);--ez-split-button--right-icon--hover-color:var(--color--gray-70);--ez-split-button--disabled-color:var(--color--gray-70);--ez-split-button--disabled--background-color:var(--color--gray-400);--ez-split-button--disabled--border:none;--ez-split-button--disabled-icon-color:var(--color--gray-200);--ez-split-button__left-icon--disabled-color:var(--color--gray-200);--ez-split-button__right-icon--disabled-color:var(--color--gray-200)}:host(.ez-split-button--secondary){--ez-split-button--color:var(--color--ocean-green-600);--ez-split-button--background-color:var(--color--gray-70);--ez-split-button--border:1px solid var(--color--gray-90);--ez-split-button--left-icon--color:var(--color--ocean-green-600);--ez-split-button--right-icon--color:var(--color--ocean-green-600);--ez-split-button--hover-color:var(--color--ocean-green-600);--ez-split-button--hover--background-color:var(--color--gray-80);--ez-split-button--hover--border:1px solid var(--color--gray-90);--ez-split-button--left-icon--hover-color:var(--color--ocean-green-600);--ez-split-button--right-icon--hover-color:var(--color--ocean-green-600);--ez-split-button--disabled-color:var(--color--gray-400);--ez-split-button--disabled--background-color:var(--color--gray-80);--ez-split-button--disabled--border:1px solid var(--color--gray-200);--ez-split-button--disabled-icon-color:var(--color--gray-400);--ez-split-button__left-icon--disabled-color:var(--color--gray-300);--ez-split-button__right-icon--disabled-color:var(--color--gray-300)}:host(.ez-split-button--tertiary){--ez-split-button--color:var(--color--ocean-green-600);--ez-split-button--background-color:transparent;--ez-split-button--font-weight:var(--font-weight--regular);--ez-split-button--border:none;--ez-split-button--left-icon--color:var(--color--ocean-green-600);--ez-split-button--right-icon--color:var(--color--ocean-green-600);--ez-split-button--hover-color:var(--color--ocean-green-800);--ez-split-button--hover--background-color:transparent;--ez-split-button--hover--border:none;--ez-split-button--left-icon--hover-color:var(--color--ocean-green-800);--ez-split-button--right-icon--hover-color:var(--color--ocean-green-800);--ez-split-button--disabled-color:var(--color--gray-400);--ez-split-button--disabled--background-color:transparent;--ez-split-button--disabled--border:transparent;--ez-split-button--disabled-icon-color:var(--color--gray-200);--ez-split-button__left-icon--disabled-color:var(--color--gray-200);--ez-split-button__right-icon--disabled-color:var(--color--gray-200)}.ez-split-button.large{--ez-split-button--height:var(--space--42, 42px)}.ez-split-button.medium{--ez-split-button--height:var(--space--32, 32px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear, transform 0.15s ease;white-space:nowrap;overflow:hidden;transform:scale(1);min-width:var(--ez-split-button--min-width);width:var(--ez-split-button--width);height:var(--ez-split-button--height);font-family:var(--ez-split-button--font-family);font-size:var(--ez-split-button--font-size);font-weight:var(--ez-split-button--font-weight);padding:var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;border-top-left-radius:var(--ez-split-button--border-radius);border-bottom-left-radius:var(--ez-split-button--border-radius);background-color:var(--ez-split-button--background-color);color:var(--ez-split-button--color);fill:var(--ez-split-button--color);border:none}label{cursor:pointer;line-height:var(--ez-split-button--line-height)}.ez-split-button__left-button{border:var(--ez-split-button--border);border-right:none;outline:none;gap:var(--space--8, 8px);padding-left:var(--space--12, 12px);padding-right:var(--space--8, 8px)}.ez-split-button__right-button{border:var(--ez-split-button--border);border-left:none;outline:none}.ez-split-button__left-button.force-focus-visible,.ez-split-button__left-button:focus-visible{box-shadow:-1px 1px 0px 1px var(--color--gray-70), \n -1px -1px 0px 1px var(--color--gray-70), \n -2px -2px 0px 2px var(--color--ocean-green-200), \n -2px 2px 0px 2px var(--color--ocean-green-200), \n 0px -2px 0px 2px var(--color--ocean-green-200), \n 0px 2px 0px 2px var(--color--ocean-green-200)}.ez-split-button__right-button.force-focus-visible,.ez-split-button__right-button:focus-visible{box-shadow:1px 1px 0px 1px var(--color--gray-70), \n 1px -1px 0px 1px var(--color--gray-70), \n 2px -2px 0px 2px var(--color--ocean-green-200), \n 2px 2px 0px 2px var(--color--ocean-green-200), \n 0px -2px 0px 2px var(--color--ocean-green-200), \n 0px 2px 0px 2px var(--color--ocean-green-200)}.ez-split-button__left-button[aria-disabled].force-focus-visible,.ez-split-button__left-button[aria-disabled]:focus-visible{box-shadow:-1px 1px 0px 1px var(--color--gray-70), \n -1px -1px 0px 1px var(--color--gray-70), \n -2px -2px 0px 2px var(--color--petroleum-100), \n -2px 2px 0px 2px var(--color--petroleum-100), \n 0px -2px 0px 2px var(--color--petroleum-100), \n 0px 2px 0px 2px var(--color--petroleum-100)}.ez-split-button__right-button[aria-disabled].force-focus-visible,.ez-split-button__right-button[aria-disabled]:focus-visible{box-shadow:1px 1px 0px 1px var(--color--gray-70), \n 1px -1px 0px 1px var(--color--gray-70), \n 2px -2px 0px 2px var(--color--petroleum-100), \n 2px 2px 0px 2px var(--color--petroleum-100), \n 0px -2px 0px 2px var(--color--petroleum-100), \n 0px 2px 0px 2px var(--color--petroleum-100)}.ez-split-button__left-button:hover,.ez-split-button__right-button:hover{outline:none;background-color:var(--ez-split-button--hover--background-color);color:var(--ez-split-button--hover-color);fill:var(--ez-split-button--hover-color);--ez-icon--color:var(--ez-split-button--hover-color)}.ez-split-button__left-button:disabled,.ez-split-button__left-button[aria-disabled],.ez-split-button__left-button:disabled label,.ez-split-button__left-button[aria-disabled] label,.ez-split-button__right-button:disabled,.ez-split-button__right-button[aria-disabled]{background-color:var(--ez-split-button--disabled--background-color);color:var(--ez-split-button--disabled-color);fill:var(--ez-split-button--disabled-color);border:none;--ez-icon--color:var(--ez-split-button__left-icon--disabled-color);cursor:not-allowed}.ez-split-button__left-button:disabled,.ez-split-button__left-button[aria-disabled]{--ez-icon--color:var(--ez-split-button__left-icon--disabled-color);border:var(--ez-split-button--disabled-border);border-right:none}.ez-split-button__right-button:disabled,.ez-split-button__right-button[aria-disabled]{--ez-icon--color:var(--ez-split-button__right-icon--disabled-color);border:var(--ez-split-button--disabled-border);border-left:none}.ez-split-button__right-button{border-top-right-radius:var(--ez-split-button--border-radius);border-bottom-right-radius:var(--ez-split-button--border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-right:var(--ez-split-button--border)}.ez-split-button__divider{width:1px;box-sizing:border-box;position:relative;background-color:var(--ez-split-button--background-color);height:var(--ez-split-button--height);border-top:var(--ez-split-button--border);border-bottom:var(--ez-split-button--border)}.ez-split-button__divider[aria-disabled],.ez-split-button__divider.disabled{cursor:not-allowed;background-color:var(--ez-split-button--disabled--background-color);border-top:var(--ez-split-button--disabled--border);border-bottom:var(--ez-split-button--disabled--border)}.ez-split-button__divider:before{content:"";position:absolute;left:0;border-left:1px solid rgba(0, 0, 0, 10%);border-radius:2px;height:75%;top:10%;bottom:10%}.btn-icon--medium{min-width:--ez-split-button__medium-icon--width}.btn-icon--large{min-width:--ez-split-button__large-icon--width}.ez-split-button__right-button-container{position:absolute;left:0;padding-left:var(--ez-split-button__right-button--padding-left);padding-right:var(--ez-split-button__right-button--padding-right)}.ez-split-button{display:flex;flex-direction:row;align-items:center;color:var(--ez-split-button--color)}.dropdown{display:flex}.dropdown-content{display:block;position:absolute;background-color:#f1f1f1;min-width:160px;z-index:var(--ez-elevation--8);border-radius:var(--ez-split-button--border-radius)}.dropdown-content>ez-dropdown{position:relative}.ripple{position:absolute;width:20px;height:20px;border-radius:50%;background:rgba(255, 255, 255, 0.3);pointer-events:none;transform:scale(0);animation:ripple-animation 0.6s linear;z-index:0}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}:host .ripple,:host(.ez-split-button--secondary) .ripple{background:rgba(0, 133, 97, 0.2)}:host(.ez-split-button--primary) .ripple{background:rgba(255, 255, 255, 0.3)}:host(.ez-split-button--tertiary) .ripple{background:rgba(0, 133, 97, 0.15)}.ez-split-button__left-button.pressed,.ez-split-button__right-button.pressed{transform:scale(0.98)}.ez-split-button__left-button>*:not(.ripple),.ez-split-button__right-button>*:not(.ripple){position:relative;z-index:1}.ez-split-button__left-button:disabled .ripple,.ez-split-button__left-button[aria-disabled] .ripple,.ez-split-button__right-button:disabled .ripple,.ez-split-button__right-button[aria-disabled] .ripple{display:none}.ez-split-button__left-button:disabled,.ez-split-button__left-button[aria-disabled],.ez-split-button__right-button:disabled,.ez-split-button__right-button[aria-disabled]{transform:scale(1) !important}';export{l as ez_split_button}
|
|
1
|
+
import{r as t,c as o,h as i,H as e,g as r}from"./p-23a36bb6.js";import{ElementIDUtils as n}from"@sankhyalabs/core";import{i as s}from"./p-641ee538.js";const l=class{constructor(i){t(this,i),this.buttonClick=o(this,"buttonClick",7),this.dropdownItemClick=o(this,"dropdownItemClick",7),this.dropdownSubActionClick=o(this,"dropdownSubActionClick",7),this.rippleCounter=0,this.eventListeners=new WeakMap,this.createRipple=(t,o)=>{const i=o?this.leftButton:this.rightButton;if(!i||this.isButtonDisabled||this.suppressAnimation)return;const e=this.getEventCoordinates(t),r=i.getBoundingClientRect(),n=Object.assign(Object.assign({},{x:e.x-r.left,y:e.y-r.top}),{id:++this.rippleCounter});this.addRippleToButton(n,o)},this.positionDropdown=()=>{this.rightButton&&this.dropdownParent&&requestAnimationFrame((()=>{const{rightButton:t,dropdownParent:o}=this,i=t.getBoundingClientRect(),e=o.getBoundingClientRect(),r=window.innerHeight,n=window.innerWidth,s=this.calculateDropdownPosition(i,e,r-i.bottom<e.height&&i.top>e.height,n-i.left<e.width&&i.left>e.width);Object.assign(o.style,s)}))},this.removeForcedFocusVisibleLeft=()=>{var t;null===(t=this.leftButton)||void 0===t||t.classList.remove("force-focus-visible")},this.removeForcedFocusVisibleRight=()=>{var t;null===(t=this.rightButton)||void 0===t||t.classList.remove("force-focus-visible")},this.leftRipples=[],this.rightRipples=[],this.isLeftPressed=!1,this.isRightPressed=!1,this.show=!1,this.enabled=!0,this.isDisabled=!1,this.iconName=void 0,this.leftIconName=void 0,this.rightIconName=void 0,this.image=void 0,this.items=void 0,this.label=void 0,this.leftTitle=void 0,this.rightTitle=void 0,this.mode="default",this.size="medium",this.variant=void 0,this.suppressAnimation=!1,this.itemBuilder=void 0}async setBlur(){this.leftButton.blur(),this.rightButton.blur()}async setLeftButtonFocus(){this.leftButton.focus(),this.leftButton.classList.add("force-focus-visible")}async setRightButtonFocus(){this.rightButton.focus(),this.rightButton.classList.add("force-focus-visible")}async toggleDropdown(){this.show=!this.show}async isOpenedDropdown(){return this.show}getEventCoordinates(t){return t instanceof MouseEvent?{x:t.clientX,y:t.clientY}:{x:t.touches[0].clientX,y:t.touches[0].clientY}}addRippleToButton(t,o){o?(this.leftRipples=[...this.leftRipples,t],this.setButtonPressed(!0,!0),this.scheduleRippleCleanup(t,!0)):(this.rightRipples=[...this.rightRipples,t],this.setButtonPressed(!1,!0),this.scheduleRippleCleanup(t,!1))}setButtonPressed(t,o){t?this.isLeftPressed=o:this.isRightPressed=o}scheduleRippleCleanup(t,o){setTimeout((()=>{this.setButtonPressed(o,!1)}),150),setTimeout((()=>{this.removeRipple(t.id,o)}),600)}removeRipple(t,o){o?this.leftRipples=this.leftRipples.filter((o=>o.id!==t)):this.rightRipples=this.rightRipples.filter((o=>o.id!==t))}onMouseDown(t){const o=t.composedPath(),i=o.includes(this.leftButton),e=o.includes(this.rightButton);i?this.createRipple(t,!0):e&&this.createRipple(t,!1)}onTouchStart(t){const o=t.composedPath(),i=o.includes(this.leftButton),e=o.includes(this.rightButton);i?this.createRipple(t,!0):e&&this.createRipple(t,!1)}clickListener(t){(!this.enabled||!0===this.isDisabled||""===this.isDisabled||"full"===this.isDisabled)&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}shouldShowLabelOnLeftButton(){return"icon-only"!==this.mode}shouldShowIconOnLeftButton(){return"default"!==this.mode}getIconSize(t="medium"){var o;const i=null===(o=this.size)||void 0===o?void 0:o.toLowerCase();return["small","medium","large"].includes(i)?i:t}closeDropdown(){this.show=!1}handleButtonClick(){this.buttonClick.emit()}handleDropdownItemClick(t){this.dropdownItemClick.emit(t.detail),t.stopPropagation(),this.closeDropdown()}handleDropdownSubActionClick(t){this.dropdownSubActionClick.emit(t.detail),t.stopPropagation(),this.closeDropdown()}calculateDropdownPosition(t,o,i,e){const r=this.offsetParentRect||{top:0,left:0};return{top:i?"auto":`${t.bottom-r.top+window.scrollY}px`,bottom:i?window.innerHeight-t.top-window.scrollY+"px":"auto",left:e?`${t.right-o.width-r.left+window.scrollX}px`:`${t.left-r.left+window.scrollX}px`,maxHeight:i?t.top-r.top+"px":"none"}}setupEventListeners(){const t=new AbortController,{signal:o}=t;window.addEventListener("scroll",this.positionDropdown,{signal:o,passive:!0}),window.addEventListener("resize",this.positionDropdown,{signal:o,passive:!0}),this.eventListeners.set(this._element,t)}cleanupEventListeners(){const t=this.eventListeners.get(this._element);t&&(t.abort(),this.eventListeners.delete(this._element))}async componentWillLoad(){this.i18n=await s()}componentDidLoad(){this.addElementIDs(),this.setupEventListeners(),this.addBlurListeners(),setTimeout((()=>this.positionDropdown()),0)}disconnectedCallback(){this.cleanupEventListeners(),this.removeBlurListeners()}componentDidUpdate(){this.show&&this.positionDropdown()}addElementIDs(){this._element&&n.addIDInfo(this._element),this.leftButton&&n.addIDInfo(this.leftButton,"leftButton",{id:"embedded"}),this.rightButton&&n.addIDInfo(this.rightButton,"rightButton",{id:"embedded"})}renderRipples(t){return t.map((t=>i("span",{key:t.id,class:"ripple",style:{left:t.x-10+"px",top:t.y-10+"px"}})))}render(){const t=this.shouldShowIconOnLeftButton(),o=this.shouldShowLabelOnLeftButton(),r=this.getIconSize();return i(e,{class:this.variant?`ez-split-button--${this.variant}`:""},i("div",{class:`ez-split-button ${this.size} ${this.mode}`},this.renderLeftButton(t,o,r),this.renderDivider(),this.renderDropdownSection(r)))}renderLeftButton(t,o,e){return i("button",{class:`ez-split-button__left-button ${e} ${this.mode} ${this.isLeftPressed?"pressed":""}`,title:this.leftTitle||this.label,type:"button",disabled:this.isButtonDisabled,"aria-disabled":this.isButtonAriaDisabled,onClick:()=>this.handleButtonClick(),ref:t=>this.leftButton=t},t&&this.renderLeftIcon(e),o&&this.renderLabel(),!this.suppressAnimation&&this.renderRipples(this.leftRipples))}renderDivider(){return i("div",{class:`ez-split-button__divider ${this.mode} ez-split-button__divider--${this.size} ${this.isButtonDisabled?"disabled":""}`,"aria-disabled":this.isButtonAriaDisabled})}renderDropdownSection(t){return i("div",{class:"dropdown"},this.renderRightButton(t),this.renderDropdownContent())}renderRightButton(t){return i("button",{class:`ez-split-button__right-button ${t} ez-split-button__right-button--${t} ${this.isRightPressed?"pressed":""}`,title:this.rightTitle||this.i18n("ez-split-button.moreOptions"),type:"button",disabled:this.isButtonDisabled,"aria-disabled":this.isButtonAriaDisabled,onClick:()=>this.toggleDropdown(),ref:t=>this.rightButton=t},this.renderRightIcon(t),!this.suppressAnimation&&this.renderRipples(this.rightRipples))}renderDropdownContent(){return i("div",{class:`dropdown-content dropdown-content--${this.size}`,ref:t=>this.dropdownParent=t},this.show&&this.renderDropdown())}renderLeftIcon(t){return i("ez-icon",{href:this.image,iconName:this.leftIconName||this.iconName,size:t})}renderLabel(){return i("label",{title:this.leftTitle||this.label},this.label)}renderRightIcon(t){return i("ez-icon",{class:"ez-split-button__right-button-container "+(t?`btn-icon--${t}`:""),iconName:this.rightIconName||"chevron-down",size:t})}renderDropdown(){return i("ez-dropdown",{items:this.items,onClick:t=>t.stopPropagation(),onEzOutsideClick:()=>this.closeDropdown(),onEzClick:t=>this.handleDropdownItemClick(t),onEzSubActionClick:t=>this.handleDropdownSubActionClick(t),itemBuilder:this.itemBuilder})}addBlurListeners(){var t,o;this.removeBlurListeners(),null===(t=this.leftButton)||void 0===t||t.addEventListener("blur",this.removeForcedFocusVisibleLeft),null===(o=this.rightButton)||void 0===o||o.addEventListener("blur",this.removeForcedFocusVisibleRight)}removeBlurListeners(){var t,o;null===(t=this.leftButton)||void 0===t||t.removeEventListener("blur",this.removeForcedFocusVisibleLeft),null===(o=this.rightButton)||void 0===o||o.removeEventListener("blur",this.removeForcedFocusVisibleRight)}connectedCallback(){this.addBlurListeners()}get isButtonDisabled(){return"full"===this.isDisabled||!this.enabled}get isButtonAriaDisabled(){return!0===this.isDisabled||""===this.isDisabled}get _element(){return r(this)}};l.style=':host{--ez-split-button--min-width:var(--space--40, 40px);--ez-split-button--width:auto;--ez-split-button--height:var(--space--32, 32px);--ez-split-button__medium-icon--width:var(--space--40, 40px);--ez-split-button__large-icon--width:var(--space--44, 44px);--ez-split-button__label--padding-top:var(--space--0, 0px);--ez-split-button__label--padding-bottom:var(--space--0, 0px);--ez-split-button__right-button--padding-left:var(--space--8, 8px);--ez-split-button__right-button--padding-right:var(--space--12, 12px);--ez-split-button--color:var(--color--ocean-green-600, #008561);--ez-split-button__left-icon--color:var(--color--ocean-green-600, #008561);--ez-split-button__right-icon--color:var(--color--ocean-green-600, #008561);--ez-split-button--background-color:var(--color--gray-70, #FFFFFF);--ez-split-button--border:1px solid var(--color--gray-90, #EAEAEA);--ez-split-button--font-size:var(--font-size--default, 14px);--ez-split-button--line-height:var(--line-height--28, 28px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--font-weight--regular,400);--ez-split-button--border-radius:var(--border--radius-24, 24px);--ez-split-button--hover-color:var(--color--primary-600, #007a5a);--ez-split-button--hover--background-color:var(--color--gray-80, #F9F9F9);--ez-split-button--disabled-color:var(--color--gray-400, #77777A);--ez-split-button--disabled--background-color:var(--color--gray-80, #F9F9F9);--ez-split-button--focus--border:var(--border--medium, 2px) var(--color--primary-300);--ez-split-button--focus--box-shadow:none;display:flex;width:fit-content}:host(.ez-split-button--primary){--ez-split-button--color:var(--color--gray-70);--ez-split-button--background-color:var(--color--ocean-green-500);--ez-split-button--font-weight:var(--font-weight--regular);--ez-split-button--border:none;--ez-split-button__left-icon--color:var(--color--gray-70);--ez-split-button__right-icon--color:var(--color--gray-70);--ez-split-button--hover-color:var(--color--gray-70);--ez-split-button--hover--background-color:var(--color--ocean-green-700);--ez-split-button--hover--border:none;--ez-split-button--left-icon--hover-color:var(--color--gray-70);--ez-split-button--right-icon--hover-color:var(--color--gray-70);--ez-split-button--disabled-color:var(--color--gray-70);--ez-split-button--disabled--background-color:var(--color--gray-400);--ez-split-button--disabled--border:none;--ez-split-button--disabled-icon-color:var(--color--gray-200);--ez-split-button__left-icon--disabled-color:var(--color--gray-200);--ez-split-button__right-icon--disabled-color:var(--color--gray-200)}:host(.ez-split-button--secondary){--ez-split-button--color:var(--color--ocean-green-600);--ez-split-button--background-color:var(--color--gray-70);--ez-split-button--border:1px solid var(--color--gray-90);--ez-split-button--left-icon--color:var(--color--ocean-green-600);--ez-split-button--right-icon--color:var(--color--ocean-green-600);--ez-split-button--hover-color:var(--color--ocean-green-600);--ez-split-button--hover--background-color:var(--color--gray-80);--ez-split-button--hover--border:1px solid var(--color--gray-90);--ez-split-button--left-icon--hover-color:var(--color--ocean-green-600);--ez-split-button--right-icon--hover-color:var(--color--ocean-green-600);--ez-split-button--disabled-color:var(--color--gray-400);--ez-split-button--disabled--background-color:var(--color--gray-80);--ez-split-button--disabled--border:1px solid var(--color--gray-200);--ez-split-button--disabled-icon-color:var(--color--gray-400);--ez-split-button__left-icon--disabled-color:var(--color--gray-300);--ez-split-button__right-icon--disabled-color:var(--color--gray-300)}:host(.ez-split-button--tertiary){--ez-split-button--color:var(--color--ocean-green-600);--ez-split-button--background-color:transparent;--ez-split-button--font-weight:var(--font-weight--regular);--ez-split-button--border:none;--ez-split-button--left-icon--color:var(--color--ocean-green-600);--ez-split-button--right-icon--color:var(--color--ocean-green-600);--ez-split-button--hover-color:var(--color--ocean-green-800);--ez-split-button--hover--background-color:transparent;--ez-split-button--hover--border:none;--ez-split-button--left-icon--hover-color:var(--color--ocean-green-800);--ez-split-button--right-icon--hover-color:var(--color--ocean-green-800);--ez-split-button--disabled-color:var(--color--gray-400);--ez-split-button--disabled--background-color:transparent;--ez-split-button--disabled--border:transparent;--ez-split-button--disabled-icon-color:var(--color--gray-200);--ez-split-button__left-icon--disabled-color:var(--color--gray-200);--ez-split-button__right-icon--disabled-color:var(--color--gray-200)}.ez-split-button.large{--ez-split-button--height:var(--space--42, 42px)}.ez-split-button.medium{--ez-split-button--height:var(--space--32, 32px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear, transform 0.15s ease;white-space:nowrap;overflow:hidden;transform:scale(1);min-width:var(--ez-split-button--min-width);width:var(--ez-split-button--width);height:var(--ez-split-button--height);font-family:var(--ez-split-button--font-family);font-size:var(--ez-split-button--font-size);font-weight:var(--ez-split-button--font-weight);padding:var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;border-top-left-radius:var(--ez-split-button--border-radius);border-bottom-left-radius:var(--ez-split-button--border-radius);background-color:var(--ez-split-button--background-color);color:var(--ez-split-button--color);fill:var(--ez-split-button--color);border:none}label{cursor:pointer;line-height:var(--ez-split-button--line-height)}.ez-split-button__left-button{border:var(--ez-split-button--border);border-right:none;outline:none;gap:var(--space--8, 8px);padding-left:var(--space--12, 12px);padding-right:var(--space--8, 8px)}.ez-split-button__right-button{border:var(--ez-split-button--border);border-left:none;outline:none}.ez-split-button__left-button.force-focus-visible,.ez-split-button__left-button:focus-visible{box-shadow:-1px 1px 0px 1px var(--color--gray-70), \n -1px -1px 0px 1px var(--color--gray-70), \n -2px -2px 0px 2px var(--color--ocean-green-200), \n -2px 2px 0px 2px var(--color--ocean-green-200), \n 0px -2px 0px 2px var(--color--ocean-green-200), \n 0px 2px 0px 2px var(--color--ocean-green-200)}.ez-split-button__right-button.force-focus-visible,.ez-split-button__right-button:focus-visible{box-shadow:1px 1px 0px 1px var(--color--gray-70), \n 1px -1px 0px 1px var(--color--gray-70), \n 2px -2px 0px 2px var(--color--ocean-green-200), \n 2px 2px 0px 2px var(--color--ocean-green-200), \n 0px -2px 0px 2px var(--color--ocean-green-200), \n 0px 2px 0px 2px var(--color--ocean-green-200)}.ez-split-button__left-button[aria-disabled].force-focus-visible,.ez-split-button__left-button[aria-disabled]:focus-visible{box-shadow:-1px 1px 0px 1px var(--color--gray-70), \n -1px -1px 0px 1px var(--color--gray-70), \n -2px -2px 0px 2px var(--color--petroleum-100), \n -2px 2px 0px 2px var(--color--petroleum-100), \n 0px -2px 0px 2px var(--color--petroleum-100), \n 0px 2px 0px 2px var(--color--petroleum-100)}.ez-split-button__right-button[aria-disabled].force-focus-visible,.ez-split-button__right-button[aria-disabled]:focus-visible{box-shadow:1px 1px 0px 1px var(--color--gray-70), \n 1px -1px 0px 1px var(--color--gray-70), \n 2px -2px 0px 2px var(--color--petroleum-100), \n 2px 2px 0px 2px var(--color--petroleum-100), \n 0px -2px 0px 2px var(--color--petroleum-100), \n 0px 2px 0px 2px var(--color--petroleum-100)}.ez-split-button__left-button:hover,.ez-split-button__right-button:hover{outline:none;background-color:var(--ez-split-button--hover--background-color);color:var(--ez-split-button--hover-color);fill:var(--ez-split-button--hover-color);--ez-icon--color:var(--ez-split-button--hover-color)}.ez-split-button__left-button:disabled,.ez-split-button__left-button[aria-disabled],.ez-split-button__left-button:disabled label,.ez-split-button__left-button[aria-disabled] label,.ez-split-button__right-button:disabled,.ez-split-button__right-button[aria-disabled]{background-color:var(--ez-split-button--disabled--background-color);color:var(--ez-split-button--disabled-color);fill:var(--ez-split-button--disabled-color);border:none;--ez-icon--color:var(--ez-split-button__left-icon--disabled-color);cursor:not-allowed}.ez-split-button__left-button:disabled,.ez-split-button__left-button[aria-disabled]{--ez-icon--color:var(--ez-split-button__left-icon--disabled-color);border:var(--ez-split-button--disabled-border);border-right:none}.ez-split-button__right-button:disabled,.ez-split-button__right-button[aria-disabled]{--ez-icon--color:var(--ez-split-button__right-icon--disabled-color);border:var(--ez-split-button--disabled-border);border-left:none}.ez-split-button__right-button{border-top-right-radius:var(--ez-split-button--border-radius);border-bottom-right-radius:var(--ez-split-button--border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-right:var(--ez-split-button--border)}.ez-split-button__divider{width:1px;box-sizing:border-box;position:relative;background-color:var(--ez-split-button--background-color);height:var(--ez-split-button--height);border-top:var(--ez-split-button--border);border-bottom:var(--ez-split-button--border)}.ez-split-button__divider[aria-disabled],.ez-split-button__divider.disabled{cursor:not-allowed;background-color:var(--ez-split-button--disabled--background-color);border-top:var(--ez-split-button--disabled--border);border-bottom:var(--ez-split-button--disabled--border)}.ez-split-button__divider:before{content:"";position:absolute;left:0;border-left:1px solid rgba(0, 0, 0, 10%);border-radius:2px;height:75%;top:10%;bottom:10%}.btn-icon--medium{min-width:--ez-split-button__medium-icon--width}.btn-icon--large{min-width:--ez-split-button__large-icon--width}.ez-split-button__right-button-container{position:absolute;left:0;padding-left:var(--ez-split-button__right-button--padding-left);padding-right:var(--ez-split-button__right-button--padding-right)}.ez-split-button{display:flex;flex-direction:row;align-items:center;color:var(--ez-split-button--color)}.dropdown{display:flex}.dropdown-content{display:block;position:absolute;background-color:#f1f1f1;min-width:160px;z-index:var(--ez-elevation--8);border-radius:var(--ez-split-button--border-radius)}.dropdown-content>ez-dropdown{position:relative}.ripple{position:absolute;width:20px;height:20px;border-radius:50%;background:rgba(255, 255, 255, 0.3);pointer-events:none;transform:scale(0);animation:ripple-animation 0.6s linear;z-index:0}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}:host .ripple,:host(.ez-split-button--secondary) .ripple{background:rgba(0, 133, 97, 0.2)}:host(.ez-split-button--primary) .ripple{background:rgba(255, 255, 255, 0.3)}:host(.ez-split-button--tertiary) .ripple{background:rgba(0, 133, 97, 0.15)}.ez-split-button__left-button.pressed,.ez-split-button__right-button.pressed{transform:scale(0.98)}.ez-split-button__left-button>*:not(.ripple),.ez-split-button__right-button>*:not(.ripple){position:relative;z-index:1}.ez-split-button__left-button:disabled .ripple,.ez-split-button__left-button[aria-disabled] .ripple,.ez-split-button__right-button:disabled .ripple,.ez-split-button__right-button[aria-disabled] .ripple{display:none}.ez-split-button__left-button:disabled,.ez-split-button__left-button[aria-disabled],.ez-split-button__right-button:disabled,.ez-split-button__right-button[aria-disabled]{transform:scale(1) !important}';export{l as ez_split_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as e,g as l}from"./p-23a36bb6.js";import{KeyboardManager as s,FloatingManager as n}from"@sankhyalabs/core";import{i as a}from"./p-
|
|
1
|
+
import{r as t,c as i,h as o,H as e,g as l}from"./p-23a36bb6.js";import{KeyboardManager as s,FloatingManager as n}from"@sankhyalabs/core";import{i as a}from"./p-641ee538.js";const d=class{constructor(o){t(this,o),this.ezClosePopup=i(this,"ezClosePopup",7),this.ezPopupAction=i(this,"ezPopupAction",7),this.size="medium",this.opened=!1,this.useHeader=!0,this.heightMode="full",this.ezTitle=void 0,this.enabledScroll=!1,this.autoClose=!0,this.footerButtons=[]}observeConfig(){this.manageOverflow()}async componentWillLoad(){this.i18n=await a()}componentDidLoad(){this.popUpFocus(),this._keyboardManager=new s({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezPopupAction.emit.bind("OK")).bind("Escape",(()=>this.closePopup())).bind("Esc",(()=>this.closePopup()))}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}closePopup(){this.opened=!1,this.manageOverflow(),this.ezClosePopup.emit()}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=n.subscribeOverlayControl(this._popupRef):n.unsubscribeOverlayControl(this._popupRef||this._overlayId)}popUpFocus(){this.opened&&this._popupRef&&this._popupRef.focus()}getGridSize(){const t={"x-small":"col--sd-3 ez-popup__size-limit--x-small",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11",default:"ez-popup__size-limit--x-small",auto:""};return this.size&&t.hasOwnProperty(this.size)&&t[this.size]||t.medium}getDialogClass(){let t="popup__container";return"auto"===this.heightMode&&(t+=" popup__container--auto"),this.enabledScroll&&(t+=" popup__overflow-y--auto"),t+=` ${this.getGridSize()}`,t}componentDidRender(){this.manageOverlay(),this.popUpFocus()}handleAutoClose(t){if(!this.opened||!this._popupRef||!this.autoClose)return;if(this._popupRef.contains(t.target))return;const i=this._popupRef.querySelector("slot");if(i&&i.assignedElements().length>0){const o=i.assignedElements();for(const i of o)if(i.contains(t.target))return}this._popupRef.shadowRoot&&this._popupRef.shadowRoot.contains(t.target)||this.closePopup()}handleDefaultPropsButtonsByIndex(t){switch(t){case 0:return{label:this.i18n?this.i18n("app.confirm"):"Confirmar",variant:"primary",size:"small",onClick:()=>{this.closePopup(),this.ezPopupAction.emit("OK")}};case 1:return{label:this.i18n?this.i18n("app.cancel"):"Cancelar",variant:"secondary",size:"small",onClick:()=>{this.closePopup()}};case 2:return{label:this.i18n?this.i18n("app.close"):"Fechar",variant:"tertiary",size:"small",onClick:()=>{this.closePopup()}}}}render(){return o(e,null,this.opened&&o("div",{class:"overlay",tabIndex:-1,onClick:this.handleAutoClose.bind(this)},o("dialog",{ref:t=>this._popupRef=t,class:this.getDialogClass()},this.useHeader&&o("header",{class:"popup__header"},!!this.ezTitle&&o("h1",{class:"popup__title"},this.ezTitle),o("ez-button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",variant:"tertiary",mode:"icon",iconName:"close",size:"small",onClick:this.closePopup.bind(this)})),o("main",{class:"popup__expandable-content"},o("slot",null)),this.footerButtons.length>0&&o("footer",{class:"popup__footer"},this.footerButtons.slice(0,3).map(((t,i)=>o("ez-button",Object.assign({key:i},this.handleDefaultPropsButtonsByIndex(i),t))))))))}get _element(){return l(this)}static get watchers(){return{opened:["observeConfig"]}}};d.style=':host{display:flex;width:auto;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--24, 24px);--ez-popup__title--font-family:var(--font--pattern, "Roboto");--ez-popup__title--font-size:var(--font-size--xxlarge, 22px);--ez-popup__title--color:var(--title--primary, #00281D);--ez-popup__title--font-weight:var(--font-weight--regular, 400)}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-direction:column;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);margin:0;border:none;position:unset;gap:var(--space--16, 16px)}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;flex:1;font-family:var(--font--pattern, "Roboto");font-size:var(--font-size--default, 14px);color:var(--title--primary, #00281D);font-weight:var(--font-weight--regular, 400);line-height:var(--line-height--24, 24px)}.popup__header{width:100%;display:flex;align-items:center}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:var(--line-height--32, 32px)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close--solo{width:100%}.popup__footer{display:flex;width:100%;flex-direction:row-reverse;gap:var(--space--8, 8px)}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{d as ez_popup}
|
|
@@ -1 +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-a61fdd20.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}
|
|
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-641ee538.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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,f as n,H as s,g as r}from"./p-23a36bb6.js";import{DateUtils as o,ApplicationContext as l,Action as a,StringUtils as h,KeyboardManager as u,DataUnit as d,ElementIDUtils as c}from"@sankhyalabs/core";import{b as f,a as v,S as p,f as m,c as b,D as y}from"./p-57321fc3.js";import{g as w,i as g}from"./p-a61fdd20.js";import{F as E}from"./p-30ffb9ed.js";import"./p-baec56c9.js";import"./p-ab574d59.js";import"./p-b853763b.js";const O=/child\[([^\]]+)\]/,C=/\$\{.+\}/;class F{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}static getDetailName(t){const i=O.exec(t);return i?i[1]:void 0}getSheet(t){return this._sheets.get(t)}getAllSheets(){return this._sheets}addSheet(t){this._sheets.set(t.name,t)}addRequiredFields(t){this._requiredFields=this._requiredFields.concat(t)}getRequiredFields(){return this._requiredFields}addCleanOnCopyFields(t){this._cleanOnCopyFields=this._cleanOnCopyFields.concat(t)}getCleanOnCopyFields(){return this._cleanOnCopyFields}addDefaultValues(t){return this._defaultValues=Object.assign(Object.assign({},this._defaultValues),t)}getDefaultValues(){const t={};return Object.entries(this._defaultValues).forEach((([i,e])=>{if("string"==typeof e){const t=C.exec(e);t&&(e=this.getDefaultVar(t[0]))}t[i]=e})),t}getDefaultVar(t){return"${data}"===t?o.getToday():"${datahora}"===t?o.getToday(!0):this._defaultVars?this._defaultVars.get(t):void 0}setDefaultVars(t){this._defaultVars=t}}const _=(t,i)=>"__main"==t[0].label?-1:(t[0].order||1e4)-(i[0].order||1e4);function j(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var z="function"==typeof Symbol&&Symbol.observable||"@@observable",A=function(){return Math.random().toString(36).substring(7).split("").join(".")},S={INIT:"@@redux/INIT"+A(),REPLACE:"@@redux/REPLACE"+A(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+A()}};function x(t){if("object"!=typeof t||null===t)return!1;for(var i=t;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(t)===i}function N(t,i,e){var n;if("function"==typeof i&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(j(0));if("function"==typeof i&&void 0===e&&(e=i,i=void 0),void 0!==e){if("function"!=typeof e)throw new Error(j(1));return e(N)(t,i)}if("function"!=typeof t)throw new Error(j(2));var s=t,r=i,o=[],l=o,a=!1;function h(){l===o&&(l=o.slice())}function u(){if(a)throw new Error(j(3));return r}function d(t){if("function"!=typeof t)throw new Error(j(4));if(a)throw new Error(j(5));var i=!0;return h(),l.push(t),function(){if(i){if(a)throw new Error(j(6));i=!1,h();var e=l.indexOf(t);l.splice(e,1),o=null}}}function c(t){if(!x(t))throw new Error(j(7));if(void 0===t.type)throw new Error(j(8));if(a)throw new Error(j(9));try{a=!0,r=s(r,t)}finally{a=!1}for(var i=o=l,e=0;e<i.length;e++)(0,i[e])();return t}function f(t){if("function"!=typeof t)throw new Error(j(10));s=t,c({type:S.REPLACE})}function v(){var t,i=d;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(j(11));function e(){t.next&&t.next(u())}return e(),{unsubscribe:i(e)}}})[z]=function(){return this},t}return c({type:S.INIT}),(n={dispatch:c,subscribe:d,getState:u,replaceReducer:f})[z]=v,n}const M={};function R(t=M,i){switch(i.type){case I.METADATA_LOADED:return Object.assign(Object.assign({},t),{formMetadata:i.payload,currentSheet:void 0});case I.CHANGE_TAB:return Object.assign(Object.assign({},t),{currentSheet:i.payload});default:return t}}function T(t){return t.formMetadata}function D(t){const i=function(t){return t.currentSheet}(t);return i?t.formMetadata.getSheet(i):Array.from(t.formMetadata.getAllSheets().values())[0]}var I;!function(t){t.METADATA_LOADED="FORM/METADATA_LOADED",t.CHANGE_TAB="FORM/CHANGE_TAB"}(I||(I={}));const P=class{constructor(e){t(this,e),this.ezFormRequestClearFieldToFocus=i(this,"ezFormRequestClearFieldToFocus",7),this.ezFormSetFields=i(this,"ezFormSetFields",7),this.ezReady=i(this,"ezReady",7),this.formItemsReady=i(this,"formItemsReady",7),this._customEditors=new Map,this._application=l.getContextValue("__SNK__APPLICATION__"),this.onDataUnitAction=t=>{t.type===a.METADATA_LOADED&&this.processMetadata()},this._fieldsProps=new Map,this._singleColumn=!1,this.dataUnit=void 0,this.config=void 0,this.recordsValidator=void 0,this.fieldToFocus=void 0,this.onlyStaticFields=!1,this.useSearchField=!0,this.elementFocusSearchField=void 0}validate(){return this._dataBinder.validate()}async addCustomEditor(t,i,e){if(this._formView)return void this._formView.addCustomEditor(t,i,e);const n=new Map(this._customEditors);n.set(t,{customEditor:i,detailContext:e}),this._customEditors=n}observeConfig(){this.processMetadata()}async setFieldProp(t,i,e){const n=new Map(this._fieldsProps),s=this._fieldsProps.get(t);n.set(t,Object.assign(Object.assign({},s),{[i]:e})),this._fieldsProps=n}getDynamicContent(){var t;const i=T(this._store.getState());if(!i)return null;const n=Array.from(i.getAllSheets().values()),s=D(null===(t=this._store)||void 0===t?void 0:t.getState());let r=[];if(n.length>1){const t=n.map(((t,i)=>({tabKey:t.name,label:t.label,index:i}))),i="selector";r.push(e("ez-tabselector",{tabs:this.buildIdTabSelector(t),onEzChange:t=>this._store.dispatch(function(t){return{type:I.CHANGE_TAB,payload:"string"==typeof t?t:t.tabKey}}(t.detail)),selectedTab:s.name,"data-element-id":i}))}return r=r.concat(this.buildFormContent(s)),r}buildFormContent(t){const i=null==t?void 0:t.fields;if(null==t)return;this.ezFormSetFields.emit(i);const n=`${h.replaceAccentuatedChars(h.toCamelCase(null==t?void 0:t.label),!1)}_selectorContainer`;return e("div",{class:"dynamic-content ez-box--no-outline","data-element-id":n,ref:t=>this._container=t,tabindex:"0"},e("ez-popover",{ref:t=>this._ezPopoverSearchField=t,overlayType:"none"},this.renderFieldColumn()),e("ez-form-view",{ref:t=>this._formView=t,class:"ez-row ez-padding-vertical--small",fields:i,singleColumn:this._singleColumn,selectedRecord:this.dataUnit.getSelectedRecord()}))}renderFieldColumn(){return null!=this._fieldSearch||(this._fieldSearch=v({value:h.generateUUID(),label:this._i18n("ez-form.labelSearchField")},(({argument:t})=>this.fieldsOptionLoader(t)),(t=>this.onSelectField(t)))),this._fieldSearch}getFormFields(){var t;return null===(t=this.config)||void 0===t?void 0:t.fields}fieldsOptionLoader(t){const i=null==t?void 0:t.toLowerCase(),e=this.getFormFields().map((t=>{var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getField(t.name)})).filter((t=>{var e,n;return(null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes(i))||(null===(n=t.label)||void 0===n?void 0:n.toLowerCase().includes(i))})).map((t=>({value:t.name,label:t.label})));return Promise.resolve(e)}onSelectField(t){null!=t&&null!=t.value?(this.fieldToFocus=t.value,this._ezPopoverSearchField.hide()):this.fieldToFocus=""}async initKeyboardManager(){var t,i;this._keyboardManager=new u({propagate:!1,element:null!==(t=this.elementFocusSearchField)&&void 0!==t?t:this._element}),this.useSearchField&&this._keyboardManager.bind(p,(async()=>{if(!this._container||!this._ezPopoverSearchField)return;const t=this._container.getBoundingClientRect();await m(this._fieldSearch),this._ezPopoverSearchField.showUnder(this._container,{horizontalGap:t.width-b,verticalGap:-1*t.height})}),{description:this._i18n("ez-form.labelSearchField"),element:null!==(i=this.elementFocusSearchField)&&void 0!==i?i:this._element})}componentDidLoad(){this.initKeyboardManager()}processMetadata(){if(this.bindFields()&&this.dataUnit&&this._store){const t=((t,i,e=!1)=>{var n,s;null!=t&&!0!==(null==t?void 0:t.emptyConfig)||(t=(t=>{const i=t.metadata;let e;return i&&(e=i.fields.filter((t=>!1!==t.visible)).map((t=>({name:t.name,defaultValue:t.defaultValue})))),{emptyConfig:!1,fields:e}})(i));const r=new Map,o=new Map,l=[],a=[],h={};null===(n=null==t?void 0:t.tabs)||void 0===n||n.forEach((t=>{o.has(t.label)||!1!==t.visible||o.set(t.label,t)})),null===(s=null==t?void 0:t.fields)||void 0===s||s.forEach((t=>{var e,n,s;if(!1!==t.visible){const u=((t,i)=>("string"==typeof t?Array.from(i.keys()).find((i=>i.label===t)):t)||{label:t,visible:!0})(t.tab||"__main",r);if(o.has(u.label))return;const d=i.getField(t.name);if(d&&(null==(null==d?void 0:d.visible)||!0===(null==d?void 0:d.visible))&&u.visible){r.has(u)||r.set(u,[]);const i=f(d,t);r.get(u).push(i),i.required&&l.push(t.name),((null==t.cleanOnCopy?null===(e=d.properties)||void 0===e?void 0:e.cleanOnCopy:t.cleanOnCopy)||(null===(n=d.properties)||void 0===n?void 0:n.cleanOnCopy))&&a.push(t.name);let o=null==t.defaultValue?null===(s=d.properties)||void 0===s?void 0:s.defaultValue:t.defaultValue;if(o&&null!=o.value){const{type:i,value:e}=o;if(i)if("V"===i)o=e;else try{const t=JSON.parse(e);o=t&&"value"in t?t:e}catch(t){}h[t.name]=o}}}}));const u=new F;if(u.setDefaultVars(t.defaultVars),e){const t=i.metadata;null!=t&&null!=t.children&&t.children.forEach((t=>{const{label:i,name:e,fields:n}=(t=>({name:`child[${t.name}]`,label:t.label,fields:[]}))(t);r.set({name:e,label:i},n)}))}const d=w();return Array.from(r.entries()).sort(_).forEach((([t,i])=>{u.addSheet({label:"__main"===t.label?d("ez-form.mainTab"):t.label,name:t.name||t.label,fields:i})})),u.addRequiredFields(l),u.addCleanOnCopyFields(a),u.addDefaultValues(h),u})(this.config,this.dataUnit);this._store.dispatch({type:I.METADATA_LOADED,payload:t})}}isStatic(){var t;return(null===(t=this._staticFields)||void 0===t?void 0:t.length)>0}bindFields(){return!this.isStatic()||!1===this.onlyStaticFields}async componentWillLoad(){var t;void 0===this.dataUnit&&(this.dataUnit=new d("ez-form")),this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new y(this.dataUnit),this._store=N(R),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata(),c.addIDInfo(this._element,null,{dataUnit:this.dataUnit});const i=await(null===(t=this._application)||void 0===t?void 0:t.getLayoutFormConfig());this.setSingleColumn(i),this.registerNotifyListeners(i),this._i18n=await g()}async setSingleColumn(t){this._singleColumn=(null==t?void 0:t.config)===E.CASCADE}async registerNotifyListeners(t){t&&t.onConfigChange((t=>{this._singleColumn=t===E.CASCADE}))}componentDidRender(){const t=T(this._store.getState());t.addRequiredFields(this._staticFields.filter((t=>t.dataset.required)).map((t=>t.dataset.fieldName))),this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")),this.dataUnit.dataUnitId,t,this.recordsValidator),this.ezReady.emit(),this.handleFieldToFocus(),this.setCustomEditors(),this.setFieldsProps()}setCustomEditors(){if(this._formView)for(const[t,i]of this._customEditors)this._formView.addCustomEditor(t,i.customEditor,i.detailContext),this._customEditors.delete(t)}handleFieldToFocus(){var t;if(null==this.fieldToFocus)return;const i=D(null===(t=this._store)||void 0===t?void 0:t.getState());(null==i?void 0:i.fields).some((t=>t.name===this.fieldToFocus))&&requestAnimationFrame((()=>{this._dataBinder.setFocus(this.fieldToFocus),this.ezFormRequestClearFieldToFocus.emit(),this.fieldToFocus=null}))}setFieldsProps(){if(this._formView)for(const[t,i]of this._fieldsProps){for(const e in i)this._formView.setFieldProp(t,e,i[e]);this._fieldsProps.delete(t)}}disconnectedCallback(){var t;this.dataUnit.unsubscribe(this.onDataUnitAction),this._dataBinder.onDisconnectedCallback(),null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}buildIdTabSelector(t){return t&&t.forEach((t=>t[c.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=h.toCamelCase(t.label))),t}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};P.style=".sc-ez-form-h{display:flex;flex-direction:column;width:100%}.dynamic-content.sc-ez-form ez-collapsible-box.sc-ez-form{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{P as ez_form}
|
|
1
|
+
import{r as t,c as i,h as e,f as n,H as s,g as r}from"./p-23a36bb6.js";import{DateUtils as o,ApplicationContext as l,Action as a,StringUtils as h,KeyboardManager as u,DataUnit as d,ElementIDUtils as c}from"@sankhyalabs/core";import{b as f,a as v,S as p,f as m,c as b,D as y}from"./p-623161e2.js";import{g as w,i as g}from"./p-641ee538.js";import{F as E}from"./p-30ffb9ed.js";import"./p-5a11cf56.js";import"./p-ab574d59.js";import"./p-b853763b.js";const O=/child\[([^\]]+)\]/,C=/\$\{.+\}/;class F{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}static getDetailName(t){const i=O.exec(t);return i?i[1]:void 0}getSheet(t){return this._sheets.get(t)}getAllSheets(){return this._sheets}addSheet(t){this._sheets.set(t.name,t)}addRequiredFields(t){this._requiredFields=this._requiredFields.concat(t)}getRequiredFields(){return this._requiredFields}addCleanOnCopyFields(t){this._cleanOnCopyFields=this._cleanOnCopyFields.concat(t)}getCleanOnCopyFields(){return this._cleanOnCopyFields}addDefaultValues(t){return this._defaultValues=Object.assign(Object.assign({},this._defaultValues),t)}getDefaultValues(){const t={};return Object.entries(this._defaultValues).forEach((([i,e])=>{if("string"==typeof e){const t=C.exec(e);t&&(e=this.getDefaultVar(t[0]))}t[i]=e})),t}getDefaultVar(t){return"${data}"===t?o.getToday():"${datahora}"===t?o.getToday(!0):this._defaultVars?this._defaultVars.get(t):void 0}setDefaultVars(t){this._defaultVars=t}}const _=(t,i)=>"__main"==t[0].label?-1:(t[0].order||1e4)-(i[0].order||1e4);function j(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var z="function"==typeof Symbol&&Symbol.observable||"@@observable",A=function(){return Math.random().toString(36).substring(7).split("").join(".")},S={INIT:"@@redux/INIT"+A(),REPLACE:"@@redux/REPLACE"+A(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+A()}};function x(t){if("object"!=typeof t||null===t)return!1;for(var i=t;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(t)===i}function N(t,i,e){var n;if("function"==typeof i&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(j(0));if("function"==typeof i&&void 0===e&&(e=i,i=void 0),void 0!==e){if("function"!=typeof e)throw new Error(j(1));return e(N)(t,i)}if("function"!=typeof t)throw new Error(j(2));var s=t,r=i,o=[],l=o,a=!1;function h(){l===o&&(l=o.slice())}function u(){if(a)throw new Error(j(3));return r}function d(t){if("function"!=typeof t)throw new Error(j(4));if(a)throw new Error(j(5));var i=!0;return h(),l.push(t),function(){if(i){if(a)throw new Error(j(6));i=!1,h();var e=l.indexOf(t);l.splice(e,1),o=null}}}function c(t){if(!x(t))throw new Error(j(7));if(void 0===t.type)throw new Error(j(8));if(a)throw new Error(j(9));try{a=!0,r=s(r,t)}finally{a=!1}for(var i=o=l,e=0;e<i.length;e++)(0,i[e])();return t}function f(t){if("function"!=typeof t)throw new Error(j(10));s=t,c({type:S.REPLACE})}function v(){var t,i=d;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(j(11));function e(){t.next&&t.next(u())}return e(),{unsubscribe:i(e)}}})[z]=function(){return this},t}return c({type:S.INIT}),(n={dispatch:c,subscribe:d,getState:u,replaceReducer:f})[z]=v,n}const M={};function R(t=M,i){switch(i.type){case I.METADATA_LOADED:return Object.assign(Object.assign({},t),{formMetadata:i.payload,currentSheet:void 0});case I.CHANGE_TAB:return Object.assign(Object.assign({},t),{currentSheet:i.payload});default:return t}}function T(t){return t.formMetadata}function D(t){const i=function(t){return t.currentSheet}(t);return i?t.formMetadata.getSheet(i):Array.from(t.formMetadata.getAllSheets().values())[0]}var I;!function(t){t.METADATA_LOADED="FORM/METADATA_LOADED",t.CHANGE_TAB="FORM/CHANGE_TAB"}(I||(I={}));const P=class{constructor(e){t(this,e),this.ezFormRequestClearFieldToFocus=i(this,"ezFormRequestClearFieldToFocus",7),this.ezFormSetFields=i(this,"ezFormSetFields",7),this.ezReady=i(this,"ezReady",7),this.formItemsReady=i(this,"formItemsReady",7),this._customEditors=new Map,this._application=l.getContextValue("__SNK__APPLICATION__"),this.onDataUnitAction=t=>{t.type===a.METADATA_LOADED&&this.processMetadata()},this._fieldsProps=new Map,this._singleColumn=!1,this.dataUnit=void 0,this.config=void 0,this.recordsValidator=void 0,this.fieldToFocus=void 0,this.onlyStaticFields=!1,this.useSearchField=!0,this.elementFocusSearchField=void 0}validate(){return this._dataBinder.validate()}async addCustomEditor(t,i,e){if(this._formView)return void this._formView.addCustomEditor(t,i,e);const n=new Map(this._customEditors);n.set(t,{customEditor:i,detailContext:e}),this._customEditors=n}observeConfig(){this.processMetadata()}async setFieldProp(t,i,e){const n=new Map(this._fieldsProps),s=this._fieldsProps.get(t);n.set(t,Object.assign(Object.assign({},s),{[i]:e})),this._fieldsProps=n}getDynamicContent(){var t;const i=T(this._store.getState());if(!i)return null;const n=Array.from(i.getAllSheets().values()),s=D(null===(t=this._store)||void 0===t?void 0:t.getState());let r=[];if(n.length>1){const t=n.map(((t,i)=>({tabKey:t.name,label:t.label,index:i}))),i="selector";r.push(e("ez-tabselector",{tabs:this.buildIdTabSelector(t),onEzChange:t=>this._store.dispatch(function(t){return{type:I.CHANGE_TAB,payload:"string"==typeof t?t:t.tabKey}}(t.detail)),selectedTab:s.name,"data-element-id":i}))}return r=r.concat(this.buildFormContent(s)),r}buildFormContent(t){const i=null==t?void 0:t.fields;if(null==t)return;this.ezFormSetFields.emit(i);const n=`${h.replaceAccentuatedChars(h.toCamelCase(null==t?void 0:t.label),!1)}_selectorContainer`;return e("div",{class:"dynamic-content ez-box--no-outline","data-element-id":n,ref:t=>this._container=t,tabindex:"0"},e("ez-popover",{ref:t=>this._ezPopoverSearchField=t,overlayType:"none"},this.renderFieldColumn()),e("ez-form-view",{ref:t=>this._formView=t,class:"ez-row ez-padding-vertical--small",fields:i,singleColumn:this._singleColumn,selectedRecord:this.dataUnit.getSelectedRecord()}))}renderFieldColumn(){return null!=this._fieldSearch||(this._fieldSearch=v({value:h.generateUUID(),label:this._i18n("ez-form.labelSearchField")},(({argument:t})=>this.fieldsOptionLoader(t)),(t=>this.onSelectField(t)))),this._fieldSearch}getFormFields(){var t;return null===(t=this.config)||void 0===t?void 0:t.fields}fieldsOptionLoader(t){const i=null==t?void 0:t.toLowerCase(),e=this.getFormFields().map((t=>{var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getField(t.name)})).filter((t=>{var e,n;return(null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes(i))||(null===(n=t.label)||void 0===n?void 0:n.toLowerCase().includes(i))})).map((t=>({value:t.name,label:t.label})));return Promise.resolve(e)}onSelectField(t){null!=t&&null!=t.value?(this.fieldToFocus=t.value,this._ezPopoverSearchField.hide()):this.fieldToFocus=""}async initKeyboardManager(){var t,i;this._keyboardManager=new u({propagate:!1,element:null!==(t=this.elementFocusSearchField)&&void 0!==t?t:this._element}),this.useSearchField&&this._keyboardManager.bind(p,(async()=>{if(!this._container||!this._ezPopoverSearchField)return;const t=this._container.getBoundingClientRect();await m(this._fieldSearch),this._ezPopoverSearchField.showUnder(this._container,{horizontalGap:t.width-b,verticalGap:-1*t.height})}),{description:this._i18n("ez-form.labelSearchField"),element:null!==(i=this.elementFocusSearchField)&&void 0!==i?i:this._element})}componentDidLoad(){this.initKeyboardManager()}processMetadata(){if(this.bindFields()&&this.dataUnit&&this._store){const t=((t,i,e=!1)=>{var n,s;null!=t&&!0!==(null==t?void 0:t.emptyConfig)||(t=(t=>{const i=t.metadata;let e;return i&&(e=i.fields.filter((t=>!1!==t.visible)).map((t=>({name:t.name,defaultValue:t.defaultValue})))),{emptyConfig:!1,fields:e}})(i));const r=new Map,o=new Map,l=[],a=[],h={};null===(n=null==t?void 0:t.tabs)||void 0===n||n.forEach((t=>{o.has(t.label)||!1!==t.visible||o.set(t.label,t)})),null===(s=null==t?void 0:t.fields)||void 0===s||s.forEach((t=>{var e,n,s;if(!1!==t.visible){const u=((t,i)=>("string"==typeof t?Array.from(i.keys()).find((i=>i.label===t)):t)||{label:t,visible:!0})(t.tab||"__main",r);if(o.has(u.label))return;const d=i.getField(t.name);if(d&&(null==(null==d?void 0:d.visible)||!0===(null==d?void 0:d.visible))&&u.visible){r.has(u)||r.set(u,[]);const i=f(d,t);r.get(u).push(i),i.required&&l.push(t.name),((null==t.cleanOnCopy?null===(e=d.properties)||void 0===e?void 0:e.cleanOnCopy:t.cleanOnCopy)||(null===(n=d.properties)||void 0===n?void 0:n.cleanOnCopy))&&a.push(t.name);let o=null==t.defaultValue?null===(s=d.properties)||void 0===s?void 0:s.defaultValue:t.defaultValue;if(o&&null!=o.value){const{type:i,value:e}=o;if(i)if("V"===i)o=e;else try{const t=JSON.parse(e);o=t&&"value"in t?t:e}catch(t){}h[t.name]=o}}}}));const u=new F;if(u.setDefaultVars(t.defaultVars),e){const t=i.metadata;null!=t&&null!=t.children&&t.children.forEach((t=>{const{label:i,name:e,fields:n}=(t=>({name:`child[${t.name}]`,label:t.label,fields:[]}))(t);r.set({name:e,label:i},n)}))}const d=w();return Array.from(r.entries()).sort(_).forEach((([t,i])=>{u.addSheet({label:"__main"===t.label?d("ez-form.mainTab"):t.label,name:t.name||t.label,fields:i})})),u.addRequiredFields(l),u.addCleanOnCopyFields(a),u.addDefaultValues(h),u})(this.config,this.dataUnit);this._store.dispatch({type:I.METADATA_LOADED,payload:t})}}isStatic(){var t;return(null===(t=this._staticFields)||void 0===t?void 0:t.length)>0}bindFields(){return!this.isStatic()||!1===this.onlyStaticFields}async componentWillLoad(){var t;void 0===this.dataUnit&&(this.dataUnit=new d("ez-form")),this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new y(this.dataUnit),this._store=N(R),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata(),c.addIDInfo(this._element,null,{dataUnit:this.dataUnit});const i=await(null===(t=this._application)||void 0===t?void 0:t.getLayoutFormConfig());this.setSingleColumn(i),this.registerNotifyListeners(i),this._i18n=await g()}async setSingleColumn(t){this._singleColumn=(null==t?void 0:t.config)===E.CASCADE}async registerNotifyListeners(t){t&&t.onConfigChange((t=>{this._singleColumn=t===E.CASCADE}))}componentDidRender(){const t=T(this._store.getState());t.addRequiredFields(this._staticFields.filter((t=>t.dataset.required)).map((t=>t.dataset.fieldName))),this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")),this.dataUnit.dataUnitId,t,this.recordsValidator),this.ezReady.emit(),this.handleFieldToFocus(),this.setCustomEditors(),this.setFieldsProps()}setCustomEditors(){if(this._formView)for(const[t,i]of this._customEditors)this._formView.addCustomEditor(t,i.customEditor,i.detailContext),this._customEditors.delete(t)}handleFieldToFocus(){var t;if(null==this.fieldToFocus)return;const i=D(null===(t=this._store)||void 0===t?void 0:t.getState());(null==i?void 0:i.fields).some((t=>t.name===this.fieldToFocus))&&requestAnimationFrame((()=>{this._dataBinder.setFocus(this.fieldToFocus),this.ezFormRequestClearFieldToFocus.emit(),this.fieldToFocus=null}))}setFieldsProps(){if(this._formView)for(const[t,i]of this._fieldsProps){for(const e in i)this._formView.setFieldProp(t,e,i[e]);this._fieldsProps.delete(t)}}disconnectedCallback(){var t;this.dataUnit.unsubscribe(this.onDataUnitAction),this._dataBinder.onDisconnectedCallback(),null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}buildIdTabSelector(t){return t&&t.forEach((t=>t[c.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=h.toCamelCase(t.label))),t}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};P.style=".sc-ez-form-h{display:flex;flex-direction:column;width:100%}.dynamic-content.sc-ez-form ez-collapsible-box.sc-ez-form{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{P as ez_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as a,c as t,g as n,H as r}from"./p-23a36bb6.js";import{ObjectUtils as o,StringUtils as l,UserInterface as i,ElementIDUtils as s}from"@sankhyalabs/core";import{C as d}from"./p-b853763b.js";import{g as c}from"./p-
|
|
1
|
+
import{h as e,r as a,c as t,g as n,H as r}from"./p-23a36bb6.js";import{ObjectUtils as o,StringUtils as l,UserInterface as i,ElementIDUtils as s}from"@sankhyalabs/core";import{C as d}from"./p-b853763b.js";import{g as c}from"./p-641ee538.js";function m(a,t,n,r,o){return e("div",{class:"ez-col ez-col--sd-12 ez-align--middle ez-padding-bottom--large"},e("ez-check",{enabled:!n,label:t,mode:o?d.SWITCH:d.REGULAR,"data-field-name":a,"data-context-name":r,key:a}))}function h(a,t,n,r,o,l,i){return e("div",{class:"ez-col ez-col--sd-12"},e("ez-number-input",{class:"ez-input__no-margin",enabled:!n,label:t,precision:r,prettyPrecision:o,"data-field-name":a,"data-context-name":l,key:a,canShowError:i}))}const u=({name:a,label:t,readOnly:n,contextName:r,canShowError:o,props:l})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-text-input",{class:"ez-input__no-margin",label:t,"data-field-name":a,"data-context-name":r,key:a,enabled:!n,canShowError:o,mask:null==l?void 0:l.mask,"clean-value-mask":null==l?void 0:l.cleanValueMask})),p=new Map;p.set(i.CHECKBOX,(e=>m(e.name,e.label,e.readOnly,e.contextName,!1))),p.set(i.SWITCH,(e=>m(e.name,e.label,e.readOnly,e.contextName,!0))),p.set(i.OPTIONSELECTOR,(({name:a,label:t,readOnly:n,required:r,props:o,contextName:l,canShowError:i})=>{const s=null==o?void 0:o.options;let d;if("string"==typeof s){const e=JSON.parse(s);d=Object.keys(e).map((a=>({value:a,label:e[a]})))}else d=s;return e("div",{class:"ez-col ez-col--sd-12"},e("ez-combo-box",{class:"ez-input__no-margin",enabled:!n,suppressEmptyOption:r,label:t,"data-field-name":a,"data-context-name":l,key:a,options:d,canShowError:i}))})),p.set(i.DATE,(({name:a,label:t,readOnly:n,canShowError:r})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-date-input",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,key:a,canShowError:r})))),p.set(i.TIME,(({name:a,label:t,readOnly:n,canShowError:r,props:o})=>{var l;return e("div",{class:"ez-col ez-col--sd-12"},e("ez-time-input",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,key:a,canShowError:r,"show-seconds":null!==(l=null==o?void 0:o.showSeconds)&&void 0!==l&&l}))})),p.set(i.ELAPSEDTIME,(({name:a,label:t,readOnly:n,canShowError:r})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-time-input",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,key:a,canShowError:r,showSeconds:!0})))),p.set(i.DATETIME,(({name:a,label:t,readOnly:n,contextName:r,canShowError:o})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-date-time-input",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,"data-context-name":r,key:a,canShowError:o})))),p.set(i.FILE,(({name:a,label:t,readOnly:n,contextName:r,props:l})=>{const i=o.removeEmptyValues({subTitle:l.subTitle,requestHeaders:Object.assign(Object.assign({},l.STORAGESTRATEGY&&{STORAGESTRATEGY:l.STORAGESTRATEGY}),l.INTERNAL_FILENAME&&{INTERNAL_FILENAME:l.INTERNAL_FILENAME})});return e("div",{class:"ez-col ez-col--sd-12"},e("ez-upload",Object.assign({enabled:!n,label:t,"data-field-name":a,"data-context-name":r,key:a},i)))})),p.set(i.DECIMALNUMBER,(({name:e,label:a,readOnly:t,props:n,contextName:r,canShowError:o})=>{var l,i;const s=Number(null!==(l=null==n?void 0:n.precision)&&void 0!==l?l:2);return h(e,a,t,s,Number(null!==(i=null==n?void 0:n.prettyPrecision)&&void 0!==i?i:s),r,o)})),p.set(i.INTEGERNUMBER,(({name:e,label:a,readOnly:t,contextName:n,canShowError:r})=>h(e,a,t,0,0,n,r))),p.set(i.SEARCH,(({name:a,label:t,readOnly:n,required:r,contextName:o,canShowError:l,optionLoader:i,props:s})=>{var d;return e("div",{class:"ez-col ez-col--sd-12"},e("ez-search",{class:"ez-input__no-margin",enabled:!n,suppressEmptyOption:r,label:t,"data-field-name":a,"data-context-name":o,key:a,canShowError:l,optionLoader:i,ignoreLimitCharsToSearch:null!==(d=null==s?void 0:s.ignoreLimitCharsToSearch)&&void 0!==d&&d}))})),p.set(i.SEARCHPLUS,(({name:a,label:t,readOnly:n,contextName:r,canShowError:o,optionLoader:i,props:s})=>{const d=!l.isEmpty(null==s?void 0:s.DESCRIPTIONFIELD);return e("div",{class:"ez-col ez-col--sd-12"},e("ez-search-plus",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,"data-context-name":r,key:a,canShowError:o,optionLoader:i,hideDescriptionInput:!d}))})),p.set(i.LONGTEXT,(({name:a,label:t,readOnly:n,contextName:r,rows:o,canShowError:l})=>e("div",{class:"ez-col ez-col--sd-12",key:a},e("ez-text-area",{enabled:!n,label:t,"data-field-name":a,"data-context-name":r,rows:o,canShowError:l})))),p.set(i.HTML,(({name:a,label:t,readOnly:n,contextName:r,rows:o,canShowError:l})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-rich-text",{key:a,enabled:!n,label:t,"data-field-name":a,"data-context-name":r,rows:o,canShowError:l}))));const w=e=>{const a=c(),t=p.get(e.userInterface)||u,n=e.required?`${e.label}${a("app.requiredInfo")}`:e.label,r=t(Object.assign(Object.assign({},e),{label:n}));return r.t["data-form-item"]=e.name,r};class z{constructor(e){this.elem=e}addRightElement(e){this.removeRightElement(),e.classList.add("ez-padding-left--small"),e.setAttribute("data-custom-item","true"),this.elem.classList.add("ez-col--nowrap"),this.elem.appendChild(e)}removeRightElement(){Array.from(this.elem.querySelectorAll('[data-custom-item="true"]')).forEach((e=>e.remove()))}get fieldName(){return this.elem.getAttribute("data-form-item")}}class v{constructor(e,a){this.items=new Map,this.formId=a,e.forEach((e=>{const a=new z(e);this.items.set(a.fieldName,a)}))}getItem(e){return this.items.get(e)}get formName(){return this.formId}}const b=class{constructor(e){a(this,e),this.ezContentReady=t(this,"ezContentReady",7),this.formItemsReady=t(this,"formItemsReady",7),this._customEditors=new Map,this.fields=void 0,this.selectedRecord=void 0,this.singleColumn=!1}async showUp(){this.singleColumn||this._element.scrollIntoView({behavior:"smooth",block:"start"})}async addCustomEditor(e,a,t){const n=new Map(this._customEditors);n.set(e,{customEditor:a,detailContext:t}),this._customEditors=n}async setFieldProp(e,a,t){const n=this.fields.map((n=>(n.name!==e||!t&&0!==t||(n.props=n.props||{},n.props[a]=t),n)));this.fields=[...n]}groupFields(e){const a=new Map;return e.forEach((e=>{const t=e.group;if(t){let n=a.get(t);null==n&&(n=[],a.set(t,n)),n.push(e)}else a.set(e.name,e)})),a}componentDidRender(){this._formElements=Array.from(this._element.querySelectorAll("[data-field-name]")),this.ezContentReady.emit(this._formElements);const e=new v(Array.from(this._element.querySelectorAll("[data-form-item]")));this.formItemsReady.emit(e)}isItemFullWidth(e){return[i.FILE,i.LONGTEXT,i.HTML].includes(e)}buildFormItemElement(a,t=""){var n;if(this.isItemFullWidth(a.userInterface)&&(t+=" input-full_width"),this._customEditors.has(a.name)){const r=null===(n=this._formElements.map((e=>({name:e.dataset.fieldName,value:e.value}))).find((e=>e.name===a.name)))||void 0===n?void 0:n.value,o=this._customEditors.get(a.name).customEditor;return e("div",{class:t},e("ez-custom-form-input",{"data-field-name":a.name,customEditor:o,formViewField:a,builderFallback:w,value:r,selectedRecord:this.selectedRecord}))}return e("div",{class:t},w(a))}render(){if(s.addIDInfoIfNotExists(this._element,"ezFormView"),null==this.fields)return;let a=[],t=Array.from(this.groupFields(this.fields).entries()).map((([t,n])=>{if(Array.isArray(n))return e("ez-collapsible-box",{id:`group-${t}`,label:t,"header-size":"large",key:t},e("div",{class:`form-view__content ${this.singleColumn&&"form-view__content--single-column"}`},n.map((e=>this.buildFormItemElement(e)))));a.push(n)})),n=a.map((e=>this.buildFormItemElement(e))),o=e("div",{class:`form-view__content ${this.singleColumn&&"form-view__content--single-column"}`},n);return e(r,null,o,t)}get _element(){return n(this)}};b.style=".sc-ez-form-view-h{display:flex;flex-wrap:wrap;width:100%;--ez-form-view__item--min-width:220px;--ez-form-view__item--max-width:440px;--ez-form-view__item--width:var(--space--small);--ez-form-view__item--padding:var(--space--small)}.form-view__content.sc-ez-form-view{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));gap:var(--ez-form-view__item--width);padding-inline:var(--ez-form-view__item--padding);width:100%}.form-view__content--single-column.sc-ez-form-view{grid-template-columns:repeat(1, minmax(var(--ez-form-view__item--min-width), var(--ez-form-view__item--max-width)))}.input-full_width.sc-ez-form-view{grid-column:1 / -1;width:100%}";export{b as ez_form_view}
|