@sankhyalabs/ezui 7.0.12 → 7.0.14
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.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 +1 -1
- package/dist/cjs/ez-actions-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ez-avatar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-chart.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-text-area.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-combo-box-list_4.cjs.entry.js +2 -2
- package/dist/cjs/ez-combo-box-list_4.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-double-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-dropdown.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
- package/dist/cjs/ez-empty-card.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-form.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-grid.cjs.entry.js +6 -2
- package/dist/cjs/ez-grid.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-guide-navigator.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
- package/dist/cjs/ez-link-builder_6.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-list-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-list-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ez-pagination.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-core.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-progress-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search-plus.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-result-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ez-spinner.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tag-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tag.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tile-medium.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile-medium.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tile.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tooltip.cjs.entry.js +14 -3
- package/dist/cjs/ez-tooltip.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-underface.cjs.entry.js +1 -1
- package/dist/cjs/ez-underface.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/ezui.cjs.js.gz +0 -0
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- 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 → index-9e5554cb.js} +3 -0
- package/dist/cjs/{index-a7b0c73d.js.gz → index-9e5554cb.js.gz} +0 -0
- package/dist/cjs/index.cjs.js.gz +0 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js.gz +0 -0
- package/dist/cjs/purify-e290e2d2.js.gz +0 -0
- package/dist/cjs/{search-column-00a916ae.js → search-column-05c9c8d5.js} +1 -1
- package/dist/cjs/search-column-05c9c8d5.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 +4 -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 +13 -2
- 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-tree/types/UpdateItemConfig.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 +17 -2
- 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 +1 -1
- package/dist/esm/ez-actions-button.entry.js.gz +0 -0
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js.gz +0 -0
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js.gz +0 -0
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-application.entry.js.gz +0 -0
- package/dist/esm/ez-avatar.entry.js +1 -1
- package/dist/esm/ez-avatar.entry.js.gz +0 -0
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js.gz +0 -0
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js.gz +0 -0
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-button.entry.js.gz +0 -0
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js.gz +0 -0
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js.gz +0 -0
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-chart.entry.js.gz +0 -0
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-check.entry.js.gz +0 -0
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js.gz +0 -0
- package/dist/esm/ez-classic-combo-box.entry.js +1 -1
- package/dist/esm/ez-classic-combo-box.entry.js.gz +0 -0
- package/dist/esm/ez-classic-input.entry.js +1 -1
- package/dist/esm/ez-classic-input.entry.js.gz +0 -0
- package/dist/esm/ez-classic-text-area.entry.js +1 -1
- package/dist/esm/ez-classic-text-area.entry.js.gz +0 -0
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js.gz +0 -0
- package/dist/esm/ez-combo-box-list_4.entry.js +2 -2
- package/dist/esm/ez-combo-box-list_4.entry.js.gz +0 -0
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js.gz +0 -0
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-input.entry.js.gz +0 -0
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js.gz +0 -0
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js.gz +0 -0
- package/dist/esm/ez-double-list.entry.js +1 -1
- package/dist/esm/ez-double-list.entry.js.gz +0 -0
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-dropdown.entry.js.gz +0 -0
- package/dist/esm/ez-empty-card.entry.js +1 -1
- package/dist/esm/ez-empty-card.entry.js.gz +0 -0
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js.gz +0 -0
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js.gz +0 -0
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js.gz +0 -0
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-form.entry.js.gz +0 -0
- package/dist/esm/ez-grid-view.entry.js +1 -1
- package/dist/esm/ez-grid-view.entry.js.gz +0 -0
- package/dist/esm/ez-grid.entry.js +6 -2
- package/dist/esm/ez-grid.entry.js.gz +0 -0
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-guide-navigator.entry.js.gz +0 -0
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js.gz +0 -0
- package/dist/esm/ez-link-builder_6.entry.js +1 -1
- package/dist/esm/ez-link-builder_6.entry.js.gz +0 -0
- package/dist/esm/ez-list-item.entry.js +1 -1
- package/dist/esm/ez-list-item.entry.js.gz +0 -0
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-list.entry.js.gz +0 -0
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js.gz +0 -0
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js.gz +0 -0
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js.gz +0 -0
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js.gz +0 -0
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js.gz +0 -0
- package/dist/esm/ez-pagination.entry.js +1 -1
- package/dist/esm/ez-pagination.entry.js.gz +0 -0
- package/dist/esm/ez-popover-core.entry.js +1 -1
- package/dist/esm/ez-popover-core.entry.js.gz +0 -0
- package/dist/esm/ez-popover-plus_3.entry.js +1 -1
- package/dist/esm/ez-popover-plus_3.entry.js.gz +0 -0
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js.gz +0 -0
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js.gz +0 -0
- package/dist/esm/ez-progress-bar.entry.js +1 -1
- package/dist/esm/ez-progress-bar.entry.js.gz +0 -0
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js.gz +0 -0
- package/dist/esm/ez-rich-toolbar-item.entry.js +1 -1
- package/dist/esm/ez-rich-toolbar-item.entry.js.gz +0 -0
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js.gz +0 -0
- package/dist/esm/ez-search-plus.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js.gz +0 -0
- package/dist/esm/ez-search-result-list.entry.js +1 -1
- package/dist/esm/ez-search-result-list.entry.js.gz +0 -0
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-search.entry.js.gz +0 -0
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-sidebar-navigator.entry.js.gz +0 -0
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js.gz +0 -0
- package/dist/esm/ez-sortable-list.entry.js +1 -1
- package/dist/esm/ez-sortable-list.entry.js.gz +0 -0
- package/dist/esm/ez-spinner.entry.js +1 -1
- package/dist/esm/ez-spinner.entry.js.gz +0 -0
- package/dist/esm/ez-split-button.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js.gz +0 -0
- package/dist/esm/ez-split-item.entry.js +1 -1
- package/dist/esm/ez-split-item.entry.js.gz +0 -0
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js.gz +0 -0
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js.gz +0 -0
- package/dist/esm/ez-tag-input.entry.js +1 -1
- package/dist/esm/ez-tag-input.entry.js.gz +0 -0
- package/dist/esm/ez-tag.entry.js +1 -1
- package/dist/esm/ez-tag.entry.js.gz +0 -0
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js.gz +0 -0
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js.gz +0 -0
- package/dist/esm/ez-tile-medium.entry.js +1 -1
- package/dist/esm/ez-tile-medium.entry.js.gz +0 -0
- package/dist/esm/ez-tile.entry.js +1 -1
- package/dist/esm/ez-tile.entry.js.gz +0 -0
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js.gz +0 -0
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js.gz +0 -0
- package/dist/esm/ez-tooltip.entry.js +14 -3
- package/dist/esm/ez-tooltip.entry.js.gz +0 -0
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js.gz +0 -0
- package/dist/esm/ez-underface.entry.js +1 -1
- package/dist/esm/ez-underface.entry.js.gz +0 -0
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js.gz +0 -0
- package/dist/esm/ez-view-stack.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/ezui.js.gz +0 -0
- package/dist/esm/filter-column.entry.js +1 -1
- 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 → index-5a720e56.js} +3 -1
- package/dist/esm/{index-baa5e267.js.gz → index-5a720e56.js.gz} +0 -0
- package/dist/esm/index.js.gz +0 -0
- package/dist/esm/loader.js +2 -2
- 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-cb5f3256.js.gz +0 -0
- package/dist/esm/{search-column-3984faec.js → search-column-74ee33d8.js} +1 -1
- package/dist/esm/{search-column-3984faec.js.gz → search-column-74ee33d8.js.gz} +0 -0
- package/dist/esm/searchFormatters-8229207e.js.gz +0 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/ezui.esm.js.gz +0 -0
- package/dist/ezui/index.esm.js.gz +0 -0
- package/dist/ezui/{p-e75c7a23.entry.js → p-000159dc.entry.js} +1 -1
- package/dist/ezui/p-000159dc.entry.js.gz +0 -0
- package/dist/ezui/{p-110cfb7d.entry.js → p-01ca89ef.entry.js} +1 -1
- package/dist/ezui/p-01ca89ef.entry.js.gz +0 -0
- package/dist/ezui/{p-7f8c1fce.entry.js → p-0391f255.entry.js} +1 -1
- package/dist/ezui/p-0391f255.entry.js.gz +0 -0
- package/dist/ezui/{p-93e1c917.entry.js → p-05e68ab3.entry.js} +1 -1
- package/dist/ezui/p-05e68ab3.entry.js.gz +0 -0
- package/dist/ezui/{p-288631d1.entry.js → p-06f1b8e4.entry.js} +1 -1
- package/dist/ezui/p-06f1b8e4.entry.js.gz +0 -0
- package/dist/ezui/{p-b989a33e.entry.js → p-09c2e631.entry.js} +1 -1
- package/dist/ezui/p-09c2e631.entry.js.gz +0 -0
- package/dist/ezui/{p-18384b91.entry.js → p-0aed37a1.entry.js} +1 -1
- package/dist/ezui/p-0aed37a1.entry.js.gz +0 -0
- package/dist/ezui/{p-6d596a5a.entry.js → p-0b531233.entry.js} +1 -1
- package/dist/ezui/p-0b531233.entry.js.gz +0 -0
- package/dist/ezui/p-112455b1.js.gz +0 -0
- package/dist/ezui/p-14d6aeb8.entry.js +1 -0
- package/dist/ezui/p-14d6aeb8.entry.js.gz +0 -0
- package/dist/ezui/{p-2528e988.entry.js → p-169d460d.entry.js} +1 -1
- package/dist/ezui/p-169d460d.entry.js.gz +0 -0
- package/dist/ezui/{p-6f77a359.entry.js → p-1723f728.entry.js} +1 -1
- package/dist/ezui/p-1723f728.entry.js.gz +0 -0
- package/dist/ezui/{p-2c21b2b6.entry.js → p-172abd0f.entry.js} +1 -1
- package/dist/ezui/p-172abd0f.entry.js.gz +0 -0
- package/dist/ezui/{p-9b215871.entry.js → p-1857cfc0.entry.js} +1 -1
- package/dist/ezui/p-1857cfc0.entry.js.gz +0 -0
- package/dist/ezui/{p-35bfaa88.entry.js → p-201009ae.entry.js} +1 -1
- package/dist/ezui/p-201009ae.entry.js.gz +0 -0
- package/dist/ezui/p-2a806303.js.gz +0 -0
- package/dist/ezui/p-30ffb9ed.js.gz +0 -0
- package/dist/ezui/{p-ef8bd3e8.entry.js → p-35e3715c.entry.js} +1 -1
- package/dist/ezui/p-35e3715c.entry.js.gz +0 -0
- package/dist/ezui/{p-56fc1da0.js → p-3c159a6b.js} +1 -1
- package/dist/ezui/p-3c159a6b.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-05c32903.entry.js → p-4463db7b.entry.js} +1 -1
- package/dist/ezui/p-4463db7b.entry.js.gz +0 -0
- package/dist/ezui/{p-fa6732f2.entry.js → p-44b39e81.entry.js} +1 -1
- package/dist/ezui/p-44b39e81.entry.js.gz +0 -0
- package/dist/ezui/{p-d75a50a7.entry.js → p-45ee32ac.entry.js} +1 -1
- package/dist/ezui/p-45ee32ac.entry.js.gz +0 -0
- package/dist/ezui/{p-d6bb930d.entry.js → p-4837f475.entry.js} +1 -1
- package/dist/ezui/{p-d6bb930d.entry.js.gz → p-4837f475.entry.js.gz} +0 -0
- package/dist/ezui/{p-4d30b703.entry.js → p-4a876b8b.entry.js} +1 -1
- package/dist/ezui/p-4a876b8b.entry.js.gz +0 -0
- package/dist/ezui/{p-f1de2cd6.entry.js → p-4b444fe9.entry.js} +1 -1
- package/dist/ezui/p-4b444fe9.entry.js.gz +0 -0
- package/dist/ezui/{p-3ce867cf.entry.js → p-4ca4d920.entry.js} +1 -1
- package/dist/ezui/p-4ca4d920.entry.js.gz +0 -0
- package/dist/ezui/{p-6ca0815e.entry.js → p-4f72c118.entry.js} +1 -1
- package/dist/ezui/p-4f72c118.entry.js.gz +0 -0
- package/dist/ezui/p-5554704c.js.gz +0 -0
- package/dist/ezui/{p-1b5aa969.entry.js → p-55e30af1.entry.js} +1 -1
- package/dist/ezui/p-55e30af1.entry.js.gz +0 -0
- package/dist/ezui/{p-48effc69.entry.js → p-570cf58a.entry.js} +1 -1
- package/dist/ezui/p-570cf58a.entry.js.gz +0 -0
- package/dist/ezui/{p-dee18824.entry.js → p-5f4a66ec.entry.js} +1 -1
- package/dist/ezui/p-5f4a66ec.entry.js.gz +0 -0
- package/dist/ezui/p-65f019de.js.gz +0 -0
- package/dist/ezui/{p-1f50fa05.entry.js → p-6b51c9cc.entry.js} +1 -1
- package/dist/ezui/p-6b51c9cc.entry.js.gz +0 -0
- package/dist/ezui/{p-721fd999.entry.js → p-6b6efa30.entry.js} +1 -1
- package/dist/ezui/p-6b6efa30.entry.js.gz +0 -0
- package/dist/ezui/{p-859e3134.entry.js → p-6dbf8f75.entry.js} +1 -1
- package/dist/ezui/p-6dbf8f75.entry.js.gz +0 -0
- package/dist/ezui/p-6ec40dec.entry.js +1 -0
- package/dist/ezui/p-6ec40dec.entry.js.gz +0 -0
- package/dist/ezui/{p-5ed81457.entry.js → p-6fc26622.entry.js} +1 -1
- package/dist/ezui/p-6fc26622.entry.js.gz +0 -0
- package/dist/ezui/{p-a4083a7a.entry.js → p-71c55a72.entry.js} +1 -1
- package/dist/ezui/p-71c55a72.entry.js.gz +0 -0
- package/dist/ezui/{p-d6f50207.entry.js → p-770cf2b8.entry.js} +1 -1
- package/dist/ezui/p-770cf2b8.entry.js.gz +0 -0
- package/dist/ezui/{p-91c9d50e.entry.js → p-78e975b4.entry.js} +1 -1
- package/dist/ezui/p-78e975b4.entry.js.gz +0 -0
- package/dist/ezui/p-80dfc50b.js.gz +0 -0
- package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
- package/dist/ezui/p-81461d2f.entry.js.gz +0 -0
- package/dist/ezui/{p-8df1ca33.entry.js → p-82fa4b09.entry.js} +1 -1
- package/dist/ezui/p-82fa4b09.entry.js.gz +0 -0
- package/dist/ezui/{p-59420b0a.entry.js → p-8a36b40d.entry.js} +2 -2
- package/dist/ezui/p-8a36b40d.entry.js.gz +0 -0
- package/dist/ezui/{p-4314f87a.entry.js → p-8f0ed69d.entry.js} +1 -1
- package/dist/ezui/p-8f0ed69d.entry.js.gz +0 -0
- package/dist/ezui/{p-43adc10c.entry.js → p-956d6453.entry.js} +1 -1
- package/dist/ezui/p-956d6453.entry.js.gz +0 -0
- package/dist/ezui/p-98bb8b16.js.gz +0 -0
- package/dist/ezui/{p-4fe123b6.entry.js → p-98dfdeb1.entry.js} +1 -1
- package/dist/ezui/p-98dfdeb1.entry.js.gz +0 -0
- package/dist/ezui/{p-a3075f52.entry.js → p-9bcfa689.entry.js} +1 -1
- package/dist/ezui/p-9bcfa689.entry.js.gz +0 -0
- package/dist/ezui/{p-02d448bb.entry.js → p-9d6c5d17.entry.js} +1 -1
- package/dist/ezui/p-9d6c5d17.entry.js.gz +0 -0
- package/dist/ezui/p-a61fdd20.js.gz +0 -0
- package/dist/ezui/{p-5d910b14.entry.js → p-a75c1bdc.entry.js} +1 -1
- package/dist/ezui/{p-5d910b14.entry.js.gz → p-a75c1bdc.entry.js.gz} +0 -0
- package/dist/ezui/{p-39761eca.entry.js → p-a8eadb43.entry.js} +1 -1
- package/dist/ezui/p-a8eadb43.entry.js.gz +0 -0
- package/dist/ezui/{p-d6742c1e.entry.js → p-a9432878.entry.js} +1 -1
- package/dist/ezui/p-a9432878.entry.js.gz +0 -0
- package/dist/ezui/p-ab574d59.js.gz +0 -0
- package/dist/ezui/{p-9b3f3c02.entry.js → p-ad7c01c1.entry.js} +1 -1
- package/dist/ezui/p-ad7c01c1.entry.js.gz +0 -0
- package/dist/ezui/p-b1e45320.js.gz +0 -0
- package/dist/ezui/{p-e8c57463.entry.js → p-b21efe83.entry.js} +1 -1
- package/dist/ezui/p-b21efe83.entry.js.gz +0 -0
- package/dist/ezui/{p-d5eb2fad.entry.js → p-b2ce629f.entry.js} +1 -1
- package/dist/ezui/p-b2ce629f.entry.js.gz +0 -0
- package/dist/ezui/{p-7fe97ef5.entry.js → p-b7c6ce20.entry.js} +1 -1
- package/dist/ezui/p-b7c6ce20.entry.js.gz +0 -0
- package/dist/ezui/p-b853763b.js.gz +0 -0
- package/dist/ezui/{p-b0a7713d.entry.js → p-b959b5a1.entry.js} +1 -1
- package/dist/ezui/p-b959b5a1.entry.js.gz +0 -0
- package/dist/ezui/p-baec56c9.js.gz +0 -0
- package/dist/ezui/p-bb91c24e.entry.js +1 -0
- package/dist/ezui/p-bb91c24e.entry.js.gz +0 -0
- package/dist/ezui/{p-a0bf1fc7.entry.js → p-bc693db6.entry.js} +1 -1
- package/dist/ezui/p-bc693db6.entry.js.gz +0 -0
- package/dist/ezui/{p-e118a1e0.entry.js → p-c1a9c5c5.entry.js} +1 -1
- package/dist/ezui/p-c1a9c5c5.entry.js.gz +0 -0
- package/dist/ezui/{p-7f37ee99.entry.js → p-c291d6a0.entry.js} +1 -1
- package/dist/ezui/p-c291d6a0.entry.js.gz +0 -0
- package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
- package/dist/ezui/p-c2b20f78.entry.js.gz +0 -0
- package/dist/ezui/{p-6020f3d5.entry.js → p-c754774e.entry.js} +1 -1
- package/dist/ezui/p-c754774e.entry.js.gz +0 -0
- package/dist/ezui/{p-d2645bdf.entry.js → p-c96e536d.entry.js} +1 -1
- package/dist/ezui/p-c96e536d.entry.js.gz +0 -0
- package/dist/ezui/{p-34a476a9.entry.js → p-c9d70dab.entry.js} +1 -1
- package/dist/ezui/p-c9d70dab.entry.js.gz +0 -0
- package/dist/ezui/p-ce2614fc.entry.js +1 -0
- package/dist/ezui/p-ce2614fc.entry.js.gz +0 -0
- package/dist/ezui/{p-20c024f7.entry.js → p-cf33bc48.entry.js} +1 -1
- package/dist/ezui/p-cf33bc48.entry.js.gz +0 -0
- package/dist/ezui/{p-0e49c0ff.entry.js → p-cf4e2a35.entry.js} +1 -1
- package/dist/ezui/p-cf4e2a35.entry.js.gz +0 -0
- package/dist/ezui/{p-0f7971cf.entry.js → p-d1765c77.entry.js} +1 -1
- package/dist/ezui/p-d1765c77.entry.js.gz +0 -0
- package/dist/ezui/{p-9b2e6438.entry.js → p-d3779449.entry.js} +1 -1
- package/dist/ezui/p-d3779449.entry.js.gz +0 -0
- package/dist/ezui/{p-7995dcb4.entry.js → p-d746f545.entry.js} +1 -1
- package/dist/ezui/p-d746f545.entry.js.gz +0 -0
- package/dist/ezui/p-dc628ed3.js.gz +0 -0
- package/dist/ezui/{p-ce0b36d7.entry.js → p-df5b5c3d.entry.js} +1 -1
- package/dist/ezui/p-df5b5c3d.entry.js.gz +0 -0
- package/dist/ezui/{p-a80b1287.entry.js → p-dfca5946.entry.js} +1 -1
- package/dist/ezui/p-dfca5946.entry.js.gz +0 -0
- package/dist/ezui/{p-7f792043.entry.js → p-e195eaad.entry.js} +1 -1
- package/dist/ezui/p-e195eaad.entry.js.gz +0 -0
- package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
- package/dist/ezui/p-e4c7eb39.js.gz +0 -0
- package/dist/ezui/{p-6c51ccd1.entry.js → p-e6eaa5ed.entry.js} +1 -1
- package/dist/ezui/p-e6eaa5ed.entry.js.gz +0 -0
- package/dist/ezui/{p-e7a7c594.entry.js → p-e9b409c1.entry.js} +1 -1
- package/dist/ezui/p-e9b409c1.entry.js.gz +0 -0
- package/dist/ezui/p-ec7db713.js.gz +0 -0
- package/dist/ezui/{p-9ab2add9.entry.js → p-ef8f37b9.entry.js} +1 -1
- package/dist/ezui/p-ef8f37b9.entry.js.gz +0 -0
- package/dist/ezui/{p-a3ada561.entry.js → p-f26b97e9.entry.js} +1 -1
- package/dist/ezui/p-f26b97e9.entry.js.gz +0 -0
- package/dist/ezui/{p-411c0222.entry.js → p-f7ca8634.entry.js} +1 -1
- package/dist/ezui/p-f7ca8634.entry.js.gz +0 -0
- package/dist/ezui/{p-5c3a6717.entry.js → p-fcdc8089.entry.js} +1 -1
- package/dist/ezui/p-fcdc8089.entry.js.gz +0 -0
- package/dist/ezui/{p-14ceb733.entry.js → p-feea8ad8.entry.js} +1 -1
- package/dist/ezui/p-feea8ad8.entry.js.gz +0 -0
- package/dist/ezui/{p-3afa1c6e.entry.js → p-ffdf68cd.entry.js} +1 -1
- package/dist/ezui/p-ffdf68cd.entry.js.gz +0 -0
- package/dist/index.cjs.js.gz +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/search-column-00a916ae.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-110cfb7d.entry.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-1e7a8633.entry.js.gz +0 -0
- package/dist/ezui/p-1f50fa05.entry.js.gz +0 -0
- package/dist/ezui/p-20c024f7.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-2c21b2b6.entry.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-411c0222.entry.js.gz +0 -0
- package/dist/ezui/p-4314f87a.entry.js.gz +0 -0
- package/dist/ezui/p-43adc10c.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-4fe123b6.entry.js.gz +0 -0
- package/dist/ezui/p-56fc1da0.js.gz +0 -0
- package/dist/ezui/p-59420b0a.entry.js.gz +0 -0
- package/dist/ezui/p-5c3a6717.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-7995dcb4.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-859e3134.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-9ab2add9.entry.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-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-a80b1287.entry.js.gz +0 -0
- package/dist/ezui/p-b0a7713d.entry.js.gz +0 -0
- package/dist/ezui/p-b989a33e.entry.js.gz +0 -0
- package/dist/ezui/p-ba7e908a.entry.js +0 -1
- package/dist/ezui/p-ba7e908a.entry.js.gz +0 -0
- package/dist/ezui/p-bc2f844e.entry.js +0 -1
- 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-d6f50207.entry.js.gz +0 -0
- package/dist/ezui/p-d75a50a7.entry.js.gz +0 -0
- package/dist/ezui/p-d8cc640d.entry.js +0 -1
- package/dist/ezui/p-d8cc640d.entry.js.gz +0 -0
- package/dist/ezui/p-dee18824.entry.js.gz +0 -0
- package/dist/ezui/p-e118a1e0.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-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/ezui/p-ff73d5bf.entry.js +0 -1
- package/dist/ezui/p-ff73d5bf.entry.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as o,g as e}from"./p-23a36bb6.js";import{ObjectUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import"./p-baec56c9.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as a}from"./p-a61fdd20.js";import"./p-30ffb9ed.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._changeDeboucingTimeout=null,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._lookupMode=!1,this.isOpen=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.limitCharsToSearch=3,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!0,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.autoFocus=!1,this.preventAutoFocus=!1,this.alternativePlaceholder=void 0,this.textEmptyOption=void 0}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i)try{if("string"==typeof t)return void this.setInputValue();const s=this.getSelectedOption(t),o=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,s)&&(this.value=s),this.isDifferentValues(s,o)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===s?void 0:s)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(t,i){h.equals(t,i)||this.loadOptions(d.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.sanitizeValue(this.value)))}),100)}:t=>t(this.sanitizeValue(this.value)))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}isDifferentValues(t,i){return h.objectToString(t||{})!==h.objectToString(i||{})}getFormattedText(t){if(null!=t)return this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label}getText(){const t=this.getSelectedOption(this.sanitizeValue(this.value)),i=this.getFormattedText(t);if(null!=i)return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t}updateVisibleOptions(){let t=this._source||[];if(this._criteria){const i=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(i)>-1))}this.hasToAddEmptyoption(t)&&(t=[{value:void 0,label:this.textEmptyOption||this.i18n("ez-combo-box.placeholder")}].concat(t)),this._visibleOptions=t,this._maxWidthValue=this.getMaxWidthValue()}hasToAddEmptyoption(t){return!this.suppressEmptyOption&&!t.filter((t=>!t.value)).length}getMaxWidthValue(){var t;if(this.showOptionValue){const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}async showOptions(){var t,i;if(!this.enabled)return;await this.openPopover();const s=null!==(i=null===(t=this.value)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value,o=this._visibleOptions.findIndex((t=>t.value===s));this._preSelection=-1===o?0:o,this._resizeObserver&&this._resizeObserver.observe(this._textInput),this.preventAutoFocus||await this.setFocus()}hideOptions(){var t;null===(t=this._popover)||void 0===t||t.hide(),this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,t.then((t=>{this._showLoading=!1,this.updateSource(t)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1)):this.selectOption(t))}selectOption(t,i=!0){var s,o,e;const h=this.getSelectedOption(this.value);(null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.toString())||null==h&&null!=t&&"value"in t?(this.value=(null==t?void 0:t.value)?t:void 0,null===(e=this._popover)||void 0===e||e.hide()):this.resetOptions(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.sanitizeValue(this.value)?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue(!1)}),this._deboucingTime)}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}sanitizeValue(t){if("undefined"!==t&&"null"!==t)return t}async componentWillLoad(){if(this.i18n=await a(),void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value");s||(s=i),this.options.push({label:i,value:s}),t.hidden=!0}))}this.loadOptions(d.PRELOAD)}setResizeObserver(){this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&this._textInput&&this._comboBoxList&&(this._comboBoxList.width=this._textInput.clientWidth)}))}))}connectedCallback(){this._resizeObserver||this.setResizeObserver()}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this.setResizeObserver(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._popover)||void 0===t||t.remove(),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}handlerIconClick(){this.showOptions()}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim();this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this.updateVisibleOptions(),this.showOptions()):(this._preSelection=void 0,this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.showOptions()}keyDownHandler(t){var i,s,o,e,h,r;if(t.ctrlKey&&("f"===t.key||"F"===t.key))return this.loadOptions(d.ADVANCED),t.preventDefault(),void t.stopPropagation();switch(t.key){case"ArrowDown":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(i=this._comboBoxList)||void 0===i||i.nextOption());break;case"ArrowUp":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(s=this._comboBoxList)||void 0===s||s.previousOption());break;case"Enter":this.isOpen&&(t.preventDefault(),null===(o=this._comboBoxList)||void 0===o||o.selectCurrentOption());break;case"Escape":this.isOpen&&(t.preventDefault(),null===(e=this._popover)||void 0===e||e.hide());break;case"Tab":this._tabPressed=!0,this.isOpen&&(null===(h=this._comboBoxList)||void 0===h||h.selectCurrentOption(),null===(r=this._popover)||void 0===r||r.hide())}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}async openPopover(){var t;this.isOpen=!0,await(null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput))}render(){var t;return r.addIDInfoIfNotExists(this.el,"input"),s(o,null,s("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),class:"text-input-slot-container "+(this.suppressSearch?"suppressed-search-input":""),ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,alternativePlaceholder:this.alternativePlaceholder||this.i18n("ez-combo-box.placeholder")},s("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},s("ez-icon",{iconName:"chevron-down"}))),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none",onEzVisibilityChange:t=>this.isOpen=t.detail,"data-element-id":this.el.getAttribute("data-element-id")},s("ez-combo-box-list",{ref:t=>this._comboBoxList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this.i18n("ez-combo-box.noResults"),showOptionValue:this.showOptionValue,preSelection:this._preSelection,maxWidth:this._maxWidthValue,width:null===(t=this._textInput)||void 0===t?void 0:t.clientWidth,onOptionSelect:t=>this.selectOption(t),onOptionHover:t=>this._preSelection=t})))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var d;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(d||(d={})),l.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{l as ez_combo_box}
|
|
1
|
+
import{r as t,c as i,h as s,H as o,g as e}from"./p-e4c7eb39.js";import{ObjectUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import"./p-baec56c9.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as a}from"./p-a61fdd20.js";import"./p-30ffb9ed.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._changeDeboucingTimeout=null,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._lookupMode=!1,this.isOpen=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.limitCharsToSearch=3,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!0,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.autoFocus=!1,this.preventAutoFocus=!1,this.alternativePlaceholder=void 0,this.textEmptyOption=void 0}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i)try{if("string"==typeof t)return void this.setInputValue();const s=this.getSelectedOption(t),o=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,s)&&(this.value=s),this.isDifferentValues(s,o)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===s?void 0:s)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(t,i){h.equals(t,i)||this.loadOptions(d.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.sanitizeValue(this.value)))}),100)}:t=>t(this.sanitizeValue(this.value)))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}isDifferentValues(t,i){return h.objectToString(t||{})!==h.objectToString(i||{})}getFormattedText(t){if(null!=t)return this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label}getText(){const t=this.getSelectedOption(this.sanitizeValue(this.value)),i=this.getFormattedText(t);if(null!=i)return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t}updateVisibleOptions(){let t=this._source||[];if(this._criteria){const i=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(i)>-1))}this.hasToAddEmptyoption(t)&&(t=[{value:void 0,label:this.textEmptyOption||this.i18n("ez-combo-box.placeholder")}].concat(t)),this._visibleOptions=t,this._maxWidthValue=this.getMaxWidthValue()}hasToAddEmptyoption(t){return!this.suppressEmptyOption&&!t.filter((t=>!t.value)).length}getMaxWidthValue(){var t;if(this.showOptionValue){const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}async showOptions(){var t,i;if(!this.enabled)return;await this.openPopover();const s=null!==(i=null===(t=this.value)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value,o=this._visibleOptions.findIndex((t=>t.value===s));this._preSelection=-1===o?0:o,this._resizeObserver&&this._resizeObserver.observe(this._textInput),this.preventAutoFocus||await this.setFocus()}hideOptions(){var t;null===(t=this._popover)||void 0===t||t.hide(),this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,t.then((t=>{this._showLoading=!1,this.updateSource(t)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1)):this.selectOption(t))}selectOption(t,i=!0){var s,o,e;const h=this.getSelectedOption(this.value);(null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.toString())||null==h&&null!=t&&"value"in t?(this.value=(null==t?void 0:t.value)?t:void 0,null===(e=this._popover)||void 0===e||e.hide()):this.resetOptions(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.sanitizeValue(this.value)?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue(!1)}),this._deboucingTime)}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}sanitizeValue(t){if("undefined"!==t&&"null"!==t)return t}async componentWillLoad(){if(this.i18n=await a(),void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value");s||(s=i),this.options.push({label:i,value:s}),t.hidden=!0}))}this.loadOptions(d.PRELOAD)}setResizeObserver(){this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&this._textInput&&this._comboBoxList&&(this._comboBoxList.width=this._textInput.clientWidth)}))}))}connectedCallback(){this._resizeObserver||this.setResizeObserver()}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this.setResizeObserver(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._popover)||void 0===t||t.remove(),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}handlerIconClick(){this.showOptions()}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim();this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this.updateVisibleOptions(),this.showOptions()):(this._preSelection=void 0,this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.showOptions()}keyDownHandler(t){var i,s,o,e,h,r;if(t.ctrlKey&&("f"===t.key||"F"===t.key))return this.loadOptions(d.ADVANCED),t.preventDefault(),void t.stopPropagation();switch(t.key){case"ArrowDown":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(i=this._comboBoxList)||void 0===i||i.nextOption());break;case"ArrowUp":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(s=this._comboBoxList)||void 0===s||s.previousOption());break;case"Enter":this.isOpen&&(t.preventDefault(),null===(o=this._comboBoxList)||void 0===o||o.selectCurrentOption());break;case"Escape":this.isOpen&&(t.preventDefault(),null===(e=this._popover)||void 0===e||e.hide());break;case"Tab":this._tabPressed=!0,this.isOpen&&(null===(h=this._comboBoxList)||void 0===h||h.selectCurrentOption(),null===(r=this._popover)||void 0===r||r.hide())}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}async openPopover(){var t;this.isOpen=!0,await(null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput))}render(){var t;return r.addIDInfoIfNotExists(this.el,"input"),s(o,null,s("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),class:"text-input-slot-container "+(this.suppressSearch?"suppressed-search-input":""),ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,alternativePlaceholder:this.alternativePlaceholder||this.i18n("ez-combo-box.placeholder")},s("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},s("ez-icon",{iconName:"chevron-down"}))),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none",onEzVisibilityChange:t=>this.isOpen=t.detail,"data-element-id":this.el.getAttribute("data-element-id")},s("ez-combo-box-list",{ref:t=>this._comboBoxList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this.i18n("ez-combo-box.noResults"),showOptionValue:this.showOptionValue,preSelection:this._preSelection,maxWidth:this._maxWidthValue,width:null===(t=this._textInput)||void 0===t?void 0:t.clientWidth,onOptionSelect:t=>this.selectOption(t),onOptionHover:t=>this._preSelection=t})))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var d;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(d||(d={})),l.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{l as ez_combo_box}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as e,g as s}from"./p-
|
|
1
|
+
import{r as t,c as i,h as o,H as e,g as s}from"./p-e4c7eb39.js";import{c as r,f as h,s as n}from"./p-2a806303.js";const a=class{constructor(o){t(this,o),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this.autoClose=!0,this.boxWidth="fit-content",this.opened=!1,this.overlayType="light",this.anchorElement=void 0,this.options={horizontalGap:0,verticalGap:0,fromRight:!1},this.useAnchorSize=!1,this.minWidth=150}observeOpened(t,i){t!==i&&(t?this.openPopover():this.hidePopover())}async updatePosition(t,i){this.updateOptionPosition(t,i),await this.updatePositionPopover()}async show(t,i){this.updateOptionPosition(t,i),this.opened=!0}async showUnder(t,i){i&&(this.options=i),this.anchorElement=t,this.opened=!0}async hide(){this.opened=!1}async setOptions(t){Object.assign(this.options,t)}async setAnchorElement(t){this.anchorElement=t}parseSizePixel(t,i){return t?"string"==typeof t?Number(t.replace("px","")):null!=t?t:0:null!=i?i:0}updateOptionPosition(t,i){Object.assign(this.options,{horizontalGap:this.parseSizePixel(i,this.options.horizontalGap),verticalGap:this.parseSizePixel(t,this.options.verticalGap)})}getElement(t){return"string"==typeof t?document.getElementById(t):t}getAnchorElement(){if(!this.anchorElement)return this._host;if(Array.isArray(this.anchorElement)){for(const t of this.anchorElement){const i=this.getElement(t);if(i)return i}return this._host}return this.getElement(this.anchorElement)}async updatePositionPopover(){if(!this._box||!this.opened)return;const t=this.getAnchorElement();await r(t,this._box,{placement:this.options.fromRight?"bottom-end":"bottom-start",middleware:[h(),n({padding:5})],strategy:"fixed"}).then((({x:t,y:i,placement:o})=>{const e=o.includes("bottom")?i+this.options.verticalGap:i-this.options.verticalGap,s=o.includes("start")?t+this.options.horizontalGap:t-this.options.horizontalGap;Object.assign(this._box.style,{top:`${e}px`,left:`${s}px`})}))}hidePopover(){this._box&&(this._box.style.display="",this.hideOverlay(),this.ezVisibilityChange.emit(!1))}async openPopover(){if(this._box&&this.opened){if(this._box.style.display="flex",this._box.style.visibility="hidden",this.useAnchorSize){const t=this.getAnchorElement().getBoundingClientRect().width;this._box.style.width=`${t<this.minWidth?this.minWidth:t}px`}await this.updatePositionPopover(),this.openOverlay(),this.ezVisibilityChange.emit(!0),this._box.style.visibility="visible"}}openOverlay(){this._overlay&&this._overlayIsActive&&(this._overlay.style.display="block")}hideOverlay(){this._overlay&&(this._overlay.style.display="none")}checkStatusOverlay(){return"none"!==this.overlayType||!("none"!==this.overlayType||!this.autoClose)}handlePositionUpdate(){this.opened&&this.updatePositionPopover()}componentWillLoad(){window.addEventListener("scroll",this.handlePositionUpdate.bind(this),!0),window.addEventListener("resize",this.handlePositionUpdate.bind(this),!0)}componentDidLoad(){this._overlayIsActive=this.checkStatusOverlay(),this._resizeObserver=new ResizeObserver(this.updatePositionPopover.bind(this)),this._resizeObserver.observe(this._box),this.openPopover()}disconnectedCallback(){window.removeEventListener("scroll",this.handlePositionUpdate.bind(this),!0),window.removeEventListener("resize",this.handlePositionUpdate.bind(this),!0),this._resizeObserver.disconnect()}render(){return o(e,null,o("div",{ref:t=>this._overlay=t,onClick:()=>this.hide(),class:`popover__overlay popover__overlay--${this.overlayType}`}),o("section",{ref:t=>this._box=t,class:{popover__box:!0,"popover__box--fit-content":"fit-content"===this.boxWidth,"popover__box--full-width":"fit-content"!==this.boxWidth}},o("slot",null)))}get _host(){return s(this)}static get watchers(){return{opened:["observeOpened"]}}};a.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--100, 100);--ez-popover__box--overlay-z-index:var(--elevation--24, 24);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--ez-popover__box--overlay-z-index)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";export{a as ez_popover_core}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{UserInterface as t,Action as s,StringUtils as i,ApplicationContext as e,ObjectUtils as n,WaitingChangeException as a,DataUnitAction as h}from"@sankhyalabs/core";import{A as r}from"./p-baec56c9.js";import{g as o}from"./p-a61fdd20.js";import{h as l}from"./p-23a36bb6.js";const c=(s,i)=>{var e,n;let a,h,{name:r,label:o,group:l}=Object.assign({},i),{readOnly:c,required:d}=Object.assign({},i);return s&&(o=o||s.label,r=r||s.name,d=null!==(e=s.required)&&void 0!==e?e:null==i?void 0:i.required,c=null!==(n=s.readOnly)&&void 0!==n?n:null==i?void 0:i.readOnly,a=s.properties,h=s.userInterface),{name:r,label:o,group:l,readOnly:c,required:d,props:a,userInterface:h||t.SHORTTEXT}};class d{constructor(t,s,i){this._dataUnit=t,this._validationSource=s,this._validator=i,this._i18n=o()}validate(t=!0){return new Promise(((s,i)=>{const e=this._dataUnit.getModifiedRecords();for(let s=0;s<e.length;s++){const n=e[s],a=[];let h=this.validateRequired(n);if(h&&!h.isValid&&a.push(h),this._validator&&(h=this._validator.validateRecord(n),h&&!h.isValid&&a.push(h)),a.length>0){if(!t&&a[0].invalidFields.length>0){this._validationSource.markAsInvalid(a[0].invalidFields[0],n.__record__id__),i();break}this.processValidationResult(a,n.__record__id__),i();break}}return s()}))}validateRequired(t){const s=this._validationSource.getRequiredFields(),i=[];if(new Set(s).forEach((s=>{const e=t[s];if(null==e||""===e){const e=this._validationSource.getMessageForField(s,t.__record__id__);i.push(e?{name:s,message:e}:{name:s,message:this._i18n("utils.requiredField")})}})),i.length>0)return{isValid:!1,invalidFields:i,infoMessage:this._i18n("utils.requiredFieldMessage")}}processValidationResult(t,s){t.forEach((t=>{const i=t.invalidFields;if(this._dataUnit.savingCanceled(i,s),i&&i.forEach((t=>{this.markAsInvalid(t,s)})),t.infoMessage&&r.info(t.infoMessage),t.errorMessage){const{errorTitle:s,errorMessage:i}=t;r.error(s,i)}}))}markAsInvalid(t,s){this._dataUnit.setInvalidField(t.name,t.message,s),this._validationSource.markAsInvalid(t,s)}}class u{constructor(t){this.onDataUnitEvent=t=>{var i;switch(t.type){case s.MULTIPLE_EDITION_CHANGED:this.clearInvalid(),this.updateAllFieldsValues();break;case s.DATA_LOADED:case s.DATA_SAVED:case s.RECORDS_REMOVED:case s.RECORDS_ADDED:case s.RECORDS_COPIED:case s.EDITION_CANCELED:case s.SELECTION_CHANGED:case s.NEXT_SELECTED:case s.PREVIOUS_SELECTED:this.clearInvalid();case s.DATA_CHANGED:case s.CHANGE_UNDONE:case s.CHANGE_REDONE:case s.RECORD_LOADED:this.updateAllFieldsValues(),this.clearFieldError(Object.keys(t.payload)[0]);break;case s.FIELD_INVALIDATED:null===(i=this._fields)||void 0===i||i.forEach((t=>{this.updateErrorMessage(t.fieldName,t.field)}))}},this._uuid=i.generateUUID(),this._fields=new Map,this._dataUnit=t,this.applyDefaultValues(),this._dataUnit.subscribe(this.onDataUnitEvent),this._dataUnit.addInterceptor(this),this.setContextDataBinder(t)}get dataBinderId(){return this._uuid}setContextDataBinder(t){const s=e.getContextValue("__DATABINDER_BY_DATAUNIT__")||new Map,i=[...s.get(t.dataUnitId)||[],this];s.set(t.dataUnitId,i),e.setContextValue("__DATABINDER_BY_DATAUNIT__",s)}applyDefaultValues(){const t=(this._dataUnit.getAddedRecords()||[]).map((t=>t.__record__id__));if(t.length>0){const s=this.getDefaultValues();s&&Object.keys(s).forEach((i=>{this._dataUnit.setFieldValue(i,s[i],t)}))}}bind(t,s,i,e){t.forEach((t=>{const{fieldName:i,contextName:e}=t.dataset;null!=e&&e!==s||this.updateBind(i,t)})),this._formMetadata=i,this._recordValidatorProcessor=new d(this._dataUnit,{getRequiredFields:()=>this.getFormRequiredFields(),markAsInvalid:t=>this.markInvalid(t),getMessageForField:t=>this.getErrorMessage(t)},e)}getFormRequiredFields(){return this._formMetadata.getRequiredFields()}disconnectDataUnit(){const t=e.getContextValue("__DATABINDER_BY_DATAUNIT__")||new Map,s=t.get(this._dataUnit.dataUnitId).filter((t=>t.dataBinderId!==this.dataBinderId));t.set(this._dataUnit.dataUnitId,s),e.setContextValue("__DATABINDER_BY_DATAUNIT__",t)}onDisconnectedCallback(){this._dataUnit.unsubscribe(this.onDataUnitEvent),this._dataUnit.removeInterceptor(this),this.disconnectDataUnit()}getCurrentRecordId(){const t=this._dataUnit.getSelectedRecord();return null==t?void 0:t.__record__id__}markInvalid(t){if(this._fields.has(t.name)){const s=this._fields.get(t.name).field;this.updateErrorMessage(t.name,s,t.message)}}setFocus(t){if(!this._fields.has(t))return;const s=this._fields.get(t).field;"function"==typeof s.setFocus&&s.setFocus()}clearInvalid(t){this._dataUnit.clearInvalid(t),this._fields.forEach((t=>{t.field.errorMessage=""}))}clearFieldError(t){var s;const i=null===(s=this._fields.get(t))||void 0===s?void 0:s.field;i&&i.errorMessage&&(i.errorMessage="",this._dataUnit.clearInvalid(this.getCurrentRecordId(),t))}updateFieldValue(t,s){const i=this._fields.get(t);try{i&&(i.listen=!1),this._dataUnit.isMultipleEdition&&this.hasMultipleValuesBetweenRecords(t)?(s.value=void 0,s.alternativePlaceholder="Múltiplos Valores"):(s.value=this._dataUnit.getFieldValue(t),s.alternativePlaceholder=void 0),this.updateErrorMessage(t,s)}finally{i&&(i.listen=!0)}}hasMultipleValuesBetweenRecords(t){var s,i;const e=null!==(i=null===(s=this._dataUnit.getSelectionInfo())||void 0===s?void 0:s.records)&&void 0!==i?i:[];if(e.length<=1)return!1;const a=e[0][t];return!e.every((s=>n.equals(s[t],a)))}validate(){return this._recordValidatorProcessor.validate()}static async validateByDataunit(t){try{const s=this.getDataBindersByDataUnit(t);return await Promise.all(s.map((t=>t.validate()))),!0}catch(t){return!1}}static getDataBindersByDataUnit(t){const s=e.getContextValue("__DATABINDER_BY_DATAUNIT__");return(null==s?void 0:s.get(t.dataUnitId))||[]}updateErrorMessage(t,s,i){null==i&&(i=this._dataUnit.getInvalidMessage(this.getCurrentRecordId(),t)),s.errorMessage||(s.errorMessage=i)}getErrorMessage(t){if(this._fields.has(t))return this._fields.get(t).field.errorMessage}updateBind(t,s){const i=this._fields.get(t);i&&i.destroy(),this.bindSearchOptionsLoader(t,s),this.updateFieldValue(t,s),this.updateErrorMessage(t,s),this._fields.set(t,_.create(t,s,((t,s)=>this.changeStarted(t,s)),(t=>this.cancelWaitingChange(t)),((t,s)=>this.setFieldValue(t,s)))),this.applyEzUploadContext(t,s)}changeStarted(t,s){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),!s.blocking&&null==s.promise){const i=this._fields.get(t);i&&(s.promise=new Promise(((t,s)=>{i.waitingChangePromiseResolve=t,i.waitingChangePromiseReject=s})))}this._dataUnit.startChange(t,s)}cancelWaitingChange(t){if(this._dataUnit.waitingForChange(t)){this._dataUnit.cancelWaitingChange(t);const s=this._fields.get(t);s&&s.rejectWaitingChange(new a("Change canceled",t))}}setFieldValue(t,s){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._dataUnit.clearInvalid(this.getCurrentRecordId(),t),this._dataUnit.isMultipleEdition){const i=this._dataUnit.getSelectionInfo();this._dataUnit.setFieldValue(t,s,i.recordIds)}else{const i=this._dataUnit.getSelectedRecord();this._dataUnit.setFieldValue(t,s,i?[i.__record__id__]:void 0)}if(this._dataUnit.waitingForChange(t)){const s=this._fields.get(t);s&&s.acceptWaitingChange()}}bindSearchOptionsLoader(t,s){if(("EZ-SEARCH"===s.nodeName||"EZ-SEARCH-PLUS"===s.nodeName)&&null==s.optionLoader){const i=e.getContextValue("EZ-SEARCH-PLUS"===s.nodeName?"__EZUI__SEARCH__PLUS__OPTION__LOADER__":"__EZUI__SEARCH__OPTION__LOADER__");i&&(s.optionLoader=(s,e)=>i(s,t,this._dataUnit,e))}}applyEzUploadContext(t,s){var i,n;if("EZ-UPLOAD"===s.nodeName){s.urlUpload=e.getContextValue("__EZUI__UPLOAD__ADD__URL__"),s.urlDelete=e.getContextValue("__EZUI__UPLOAD__DEL__URL__");const a=this._dataUnit.getField(t),h=null===(i=a.properties)||void 0===i?void 0:i.DESTINATION;h&&(s.requestHeaders={XTRAINF:`{"destination": "${h}"}`}),s.maxFiles=(null===(n=a.properties)||void 0===n?void 0:n.MAX_FILES)||0}}updateAllFieldsValues(){var t;null===(t=this._fields)||void 0===t||t.forEach((t=>{this.updateFieldValue(t.fieldName,t.field)}))}interceptAction(t){if(t.type===s.RECORDS_COPIED){const i=this._formMetadata.getCleanOnCopyFields();if(i)return new h(s.RECORDS_COPIED,t.payload.map((t=>{const s=Object.assign({},t);return i.forEach((t=>delete s[t])),s})))}if(t.type===s.SAVING_DATA)return new Promise((s=>{this.validate().then((()=>s(t))).catch((()=>{}))}));if(t.type===s.RECORDS_ADDED){const i=this.getDefaultValues();if(i)return new h(s.RECORDS_ADDED,t.payload.map((t=>Object.assign(Object.assign({},t),i))))}return t}getDefaultValues(){var t;const s=null===(t=this._formMetadata)||void 0===t?void 0:t.getDefaultValues();if(s){const t={};for(const i in s)t[i]=this._dataUnit.valueFromString(i,s[i]);return t}}}class _{constructor(){this.listen=!0,this.startChangeEventName="ezStartChange",this.cancelWaitingChangeEventName="ezCancelWaitingChange",this.changeEventName="ezChange"}destroy(){this.field.removeEventListener(this.startChangeEventName,this.startChangeListener),this.field.removeEventListener(this.cancelWaitingChangeEventName,this.cancelWaitingChangeListener),this.field.removeEventListener(this.changeEventName,this.changeListener)}acceptWaitingChange(){this.waitingChangePromiseResolve&&(this.waitingChangePromiseResolve(),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}rejectWaitingChange(t){this.waitingChangePromiseReject&&(this.waitingChangePromiseReject(t),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}static create(t,s,i,e,n){const a=new _;return a.field=s,a.fieldName=t,a.startChangeListener=s=>{a.listen&&i(t,s.detail)},a.field.addEventListener(a.startChangeEventName,a.startChangeListener),a.cancelWaitingChangeListener=()=>{a.listen&&e(t)},a.field.addEventListener(a.cancelWaitingChangeEventName,a.cancelWaitingChangeListener),a.changeListener=s=>{a.listen&&n(t,s.detail)},a.field.addEventListener(a.changeEventName,a.changeListener),a}}const v="ctrl+f",f=240,p=String(210)+"px",A=(t,s,i)=>l("ez-search",{class:"ez-padding--small ez-margin--none",style:{"--ez-text-input__margin-bottom":"0px","--ez-search--width":p},canShowError:!1,showSelectedValue:!1,showOptionValue:!1,suppressEmptyOption:!0,label:t.label,value:null,optionLoader:s,onEzChange:t=>i(t.detail),ignoreLimitCharsToSearch:!0}),g=async t=>{requestAnimationFrame((async()=>{if(t){const s=t.t;if(!s)return;s.value=null,await s.setFocus()}}))};export{u as D,d as R,v as S,A as a,c as b,f as c,g as f}
|
|
1
|
+
import{UserInterface as t,Action as s,StringUtils as i,ApplicationContext as e,ObjectUtils as n,WaitingChangeException as a,DataUnitAction as h}from"@sankhyalabs/core";import{A as r}from"./p-baec56c9.js";import{g as o}from"./p-a61fdd20.js";import{h as l}from"./p-e4c7eb39.js";const c=(s,i)=>{var e,n;let a,h,{name:r,label:o,group:l}=Object.assign({},i),{readOnly:c,required:d}=Object.assign({},i);return s&&(o=o||s.label,r=r||s.name,d=null!==(e=s.required)&&void 0!==e?e:null==i?void 0:i.required,c=null!==(n=s.readOnly)&&void 0!==n?n:null==i?void 0:i.readOnly,a=s.properties,h=s.userInterface),{name:r,label:o,group:l,readOnly:c,required:d,props:a,userInterface:h||t.SHORTTEXT}};class d{constructor(t,s,i){this._dataUnit=t,this._validationSource=s,this._validator=i,this._i18n=o()}validate(t=!0){return new Promise(((s,i)=>{const e=this._dataUnit.getModifiedRecords();for(let s=0;s<e.length;s++){const n=e[s],a=[];let h=this.validateRequired(n);if(h&&!h.isValid&&a.push(h),this._validator&&(h=this._validator.validateRecord(n),h&&!h.isValid&&a.push(h)),a.length>0){if(!t&&a[0].invalidFields.length>0){this._validationSource.markAsInvalid(a[0].invalidFields[0],n.__record__id__),i();break}this.processValidationResult(a,n.__record__id__),i();break}}return s()}))}validateRequired(t){const s=this._validationSource.getRequiredFields(),i=[];if(new Set(s).forEach((s=>{const e=t[s];if(null==e||""===e){const e=this._validationSource.getMessageForField(s,t.__record__id__);i.push(e?{name:s,message:e}:{name:s,message:this._i18n("utils.requiredField")})}})),i.length>0)return{isValid:!1,invalidFields:i,infoMessage:this._i18n("utils.requiredFieldMessage")}}processValidationResult(t,s){t.forEach((t=>{const i=t.invalidFields;if(this._dataUnit.savingCanceled(i,s),i&&i.forEach((t=>{this.markAsInvalid(t,s)})),t.infoMessage&&r.info(t.infoMessage),t.errorMessage){const{errorTitle:s,errorMessage:i}=t;r.error(s,i)}}))}markAsInvalid(t,s){this._dataUnit.setInvalidField(t.name,t.message,s),this._validationSource.markAsInvalid(t,s)}}class u{constructor(t){this.onDataUnitEvent=t=>{var i;switch(t.type){case s.MULTIPLE_EDITION_CHANGED:this.clearInvalid(),this.updateAllFieldsValues();break;case s.DATA_LOADED:case s.DATA_SAVED:case s.RECORDS_REMOVED:case s.RECORDS_ADDED:case s.RECORDS_COPIED:case s.EDITION_CANCELED:case s.SELECTION_CHANGED:case s.NEXT_SELECTED:case s.PREVIOUS_SELECTED:this.clearInvalid();case s.DATA_CHANGED:case s.CHANGE_UNDONE:case s.CHANGE_REDONE:case s.RECORD_LOADED:this.updateAllFieldsValues(),this.clearFieldError(Object.keys(t.payload)[0]);break;case s.FIELD_INVALIDATED:null===(i=this._fields)||void 0===i||i.forEach((t=>{this.updateErrorMessage(t.fieldName,t.field)}))}},this._uuid=i.generateUUID(),this._fields=new Map,this._dataUnit=t,this.applyDefaultValues(),this._dataUnit.subscribe(this.onDataUnitEvent),this._dataUnit.addInterceptor(this),this.setContextDataBinder(t)}get dataBinderId(){return this._uuid}setContextDataBinder(t){const s=e.getContextValue("__DATABINDER_BY_DATAUNIT__")||new Map,i=[...s.get(t.dataUnitId)||[],this];s.set(t.dataUnitId,i),e.setContextValue("__DATABINDER_BY_DATAUNIT__",s)}applyDefaultValues(){const t=(this._dataUnit.getAddedRecords()||[]).map((t=>t.__record__id__));if(t.length>0){const s=this.getDefaultValues();s&&Object.keys(s).forEach((i=>{this._dataUnit.setFieldValue(i,s[i],t)}))}}bind(t,s,i,e){t.forEach((t=>{const{fieldName:i,contextName:e}=t.dataset;null!=e&&e!==s||this.updateBind(i,t)})),this._formMetadata=i,this._recordValidatorProcessor=new d(this._dataUnit,{getRequiredFields:()=>this.getFormRequiredFields(),markAsInvalid:t=>this.markInvalid(t),getMessageForField:t=>this.getErrorMessage(t)},e)}getFormRequiredFields(){return this._formMetadata.getRequiredFields()}disconnectDataUnit(){const t=e.getContextValue("__DATABINDER_BY_DATAUNIT__")||new Map,s=t.get(this._dataUnit.dataUnitId).filter((t=>t.dataBinderId!==this.dataBinderId));t.set(this._dataUnit.dataUnitId,s),e.setContextValue("__DATABINDER_BY_DATAUNIT__",t)}onDisconnectedCallback(){this._dataUnit.unsubscribe(this.onDataUnitEvent),this._dataUnit.removeInterceptor(this),this.disconnectDataUnit()}getCurrentRecordId(){const t=this._dataUnit.getSelectedRecord();return null==t?void 0:t.__record__id__}markInvalid(t){if(this._fields.has(t.name)){const s=this._fields.get(t.name).field;this.updateErrorMessage(t.name,s,t.message)}}setFocus(t){if(!this._fields.has(t))return;const s=this._fields.get(t).field;"function"==typeof s.setFocus&&s.setFocus()}clearInvalid(t){this._dataUnit.clearInvalid(t),this._fields.forEach((t=>{t.field.errorMessage=""}))}clearFieldError(t){var s;const i=null===(s=this._fields.get(t))||void 0===s?void 0:s.field;i&&i.errorMessage&&(i.errorMessage="",this._dataUnit.clearInvalid(this.getCurrentRecordId(),t))}updateFieldValue(t,s){const i=this._fields.get(t);try{i&&(i.listen=!1),this._dataUnit.isMultipleEdition&&this.hasMultipleValuesBetweenRecords(t)?(s.value=void 0,s.alternativePlaceholder="Múltiplos Valores"):(s.value=this._dataUnit.getFieldValue(t),s.alternativePlaceholder=void 0),this.updateErrorMessage(t,s)}finally{i&&(i.listen=!0)}}hasMultipleValuesBetweenRecords(t){var s,i;const e=null!==(i=null===(s=this._dataUnit.getSelectionInfo())||void 0===s?void 0:s.records)&&void 0!==i?i:[];if(e.length<=1)return!1;const a=e[0][t];return!e.every((s=>n.equals(s[t],a)))}validate(){return this._recordValidatorProcessor.validate()}static async validateByDataunit(t){try{const s=this.getDataBindersByDataUnit(t);return await Promise.all(s.map((t=>t.validate()))),!0}catch(t){return!1}}static getDataBindersByDataUnit(t){const s=e.getContextValue("__DATABINDER_BY_DATAUNIT__");return(null==s?void 0:s.get(t.dataUnitId))||[]}updateErrorMessage(t,s,i){null==i&&(i=this._dataUnit.getInvalidMessage(this.getCurrentRecordId(),t)),s.errorMessage||(s.errorMessage=i)}getErrorMessage(t){if(this._fields.has(t))return this._fields.get(t).field.errorMessage}updateBind(t,s){const i=this._fields.get(t);i&&i.destroy(),this.bindSearchOptionsLoader(t,s),this.updateFieldValue(t,s),this.updateErrorMessage(t,s),this._fields.set(t,_.create(t,s,((t,s)=>this.changeStarted(t,s)),(t=>this.cancelWaitingChange(t)),((t,s)=>this.setFieldValue(t,s)))),this.applyEzUploadContext(t,s)}changeStarted(t,s){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),!s.blocking&&null==s.promise){const i=this._fields.get(t);i&&(s.promise=new Promise(((t,s)=>{i.waitingChangePromiseResolve=t,i.waitingChangePromiseReject=s})))}this._dataUnit.startChange(t,s)}cancelWaitingChange(t){if(this._dataUnit.waitingForChange(t)){this._dataUnit.cancelWaitingChange(t);const s=this._fields.get(t);s&&s.rejectWaitingChange(new a("Change canceled",t))}}setFieldValue(t,s){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._dataUnit.clearInvalid(this.getCurrentRecordId(),t),this._dataUnit.isMultipleEdition){const i=this._dataUnit.getSelectionInfo();this._dataUnit.setFieldValue(t,s,i.recordIds)}else{const i=this._dataUnit.getSelectedRecord();this._dataUnit.setFieldValue(t,s,i?[i.__record__id__]:void 0)}if(this._dataUnit.waitingForChange(t)){const s=this._fields.get(t);s&&s.acceptWaitingChange()}}bindSearchOptionsLoader(t,s){if(("EZ-SEARCH"===s.nodeName||"EZ-SEARCH-PLUS"===s.nodeName)&&null==s.optionLoader){const i=e.getContextValue("EZ-SEARCH-PLUS"===s.nodeName?"__EZUI__SEARCH__PLUS__OPTION__LOADER__":"__EZUI__SEARCH__OPTION__LOADER__");i&&(s.optionLoader=(s,e)=>i(s,t,this._dataUnit,e))}}applyEzUploadContext(t,s){var i,n;if("EZ-UPLOAD"===s.nodeName){s.urlUpload=e.getContextValue("__EZUI__UPLOAD__ADD__URL__"),s.urlDelete=e.getContextValue("__EZUI__UPLOAD__DEL__URL__");const a=this._dataUnit.getField(t),h=null===(i=a.properties)||void 0===i?void 0:i.DESTINATION;h&&(s.requestHeaders={XTRAINF:`{"destination": "${h}"}`}),s.maxFiles=(null===(n=a.properties)||void 0===n?void 0:n.MAX_FILES)||0}}updateAllFieldsValues(){var t;null===(t=this._fields)||void 0===t||t.forEach((t=>{this.updateFieldValue(t.fieldName,t.field)}))}interceptAction(t){if(t.type===s.RECORDS_COPIED){const i=this._formMetadata.getCleanOnCopyFields();if(i)return new h(s.RECORDS_COPIED,t.payload.map((t=>{const s=Object.assign({},t);return i.forEach((t=>delete s[t])),s})))}if(t.type===s.SAVING_DATA)return new Promise((s=>{this.validate().then((()=>s(t))).catch((()=>{}))}));if(t.type===s.RECORDS_ADDED){const i=this.getDefaultValues();if(i)return new h(s.RECORDS_ADDED,t.payload.map((t=>Object.assign(Object.assign({},t),i))))}return t}getDefaultValues(){var t;const s=null===(t=this._formMetadata)||void 0===t?void 0:t.getDefaultValues();if(s){const t={};for(const i in s)t[i]=this._dataUnit.valueFromString(i,s[i]);return t}}}class _{constructor(){this.listen=!0,this.startChangeEventName="ezStartChange",this.cancelWaitingChangeEventName="ezCancelWaitingChange",this.changeEventName="ezChange"}destroy(){this.field.removeEventListener(this.startChangeEventName,this.startChangeListener),this.field.removeEventListener(this.cancelWaitingChangeEventName,this.cancelWaitingChangeListener),this.field.removeEventListener(this.changeEventName,this.changeListener)}acceptWaitingChange(){this.waitingChangePromiseResolve&&(this.waitingChangePromiseResolve(),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}rejectWaitingChange(t){this.waitingChangePromiseReject&&(this.waitingChangePromiseReject(t),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}static create(t,s,i,e,n){const a=new _;return a.field=s,a.fieldName=t,a.startChangeListener=s=>{a.listen&&i(t,s.detail)},a.field.addEventListener(a.startChangeEventName,a.startChangeListener),a.cancelWaitingChangeListener=()=>{a.listen&&e(t)},a.field.addEventListener(a.cancelWaitingChangeEventName,a.cancelWaitingChangeListener),a.changeListener=s=>{a.listen&&n(t,s.detail)},a.field.addEventListener(a.changeEventName,a.changeListener),a}}const v="ctrl+f",f=240,p=String(210)+"px",A=(t,s,i)=>l("ez-search",{class:"ez-padding--small ez-margin--none",style:{"--ez-text-input__margin-bottom":"0px","--ez-search--width":p},canShowError:!1,showSelectedValue:!1,showOptionValue:!1,suppressEmptyOption:!0,label:t.label,value:null,optionLoader:s,onEzChange:t=>i(t.detail),ignoreLimitCharsToSearch:!0}),g=async t=>{requestAnimationFrame((async()=>{if(t){const s=t.t;if(!s)return;s.value=null,await s.setFocus()}}))};export{u as D,d as R,v as S,A as a,c as b,f as c,g as f}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as e}from"./p-
|
|
1
|
+
import{r as i,c as t,h as e}from"./p-e4c7eb39.js";import{i as n}from"./p-a61fdd20.js";import"@sankhyalabs/core";const a=class{constructor(e){i(this,e),this.ezPageChange=t(this,"ezPageChange",7),this.handlePreviousPage=()=>{this.currentPage>1&&(this.currentPage--,this.ezPageChange.emit(this.currentPage))},this.handleNextPage=()=>{this.currentPage<this.getTotalPages()&&(this.currentPage++,this.ezPageChange.emit(this.currentPage))},this.handlePageClick=i=>{this.currentPage=i,this.ezPageChange.emit(this.currentPage)},this.type="default",this.currentPage=1,this.totalItems=0,this.pageSize=10,this.hideInfoLabel=!1,this.pageLimit=10}async componentWillLoad(){this.i18n=await n()}getTotalPages(){return Math.ceil(this.totalItems/this.pageSize)}renderNextBtn(){return e("ez-button",{"aria-label":this.i18n("ez-pagination.nextPage"),label:this.i18n("ez-pagination.nextPage"),"data-element-id":"pagination-next-button",size:"small",iconName:"arrow-right",class:"ez-button--primary",mode:"icon",enabled:this.currentPage<this.getTotalPages(),onClick:()=>this.handleNextPage()})}renderPreviousBtn(){return e("ez-button",{label:this.i18n("ez-pagination.previousPage"),"aria-label":this.i18n("ez-pagination.previousPage"),"data-element-id":"pagination-previous-button",size:"small",iconName:"arrow-left",mode:"icon",enabled:this.currentPage>1,onClick:()=>this.handlePreviousPage()})}renderPageButton(i){return e("button",{"aria-label":`page-${i}`,class:{"page-button":!0,"current-page":this.currentPage===i},onClick:()=>this.handlePageClick(i)},i)}renderEllipsis(){return e("span",{"aria-label":"page-ellipsis",class:"ellipsis"},"...")}renderPageButtons(i){return i.map((i=>"..."===i?this.renderEllipsis():this.renderPageButton(i)))}renderInfoLabel(i,t){return!this.hideInfoLabel&&e("div",{class:"info"},e("span",{class:"info-range"},i," até ",t)," de ",this.totalItems)}renderDefault(){const i=(this.currentPage-1)*this.pageSize+1,t=Math.min(this.currentPage*this.pageSize,this.totalItems);return e("div",{class:"pagination-container"},this.renderInfoLabel(i,t),e("div",{class:"controls controls-compact"},this.renderPreviousBtn(),this.renderNextBtn()))}renderNumber(){const i=this.getTotalPages(),{currentPage:t,pageLimit:n}=this,a=[];if(i<=n)for(let t=1;t<=i;t++)a.push(t);else{const e=(i,t)=>Array.from({length:t-i+1},((t,e)=>i+e)),o=n-2;if(t>o)if(t<i-o+1){const o=n-4,s=Math.floor((o-1)/2),r=t-s,p=t+(o-1-s);a.push(1),a.push("..."),a.push(...e(r,p)),a.push("..."),a.push(i)}else a.push(1),a.push("..."),a.push(...e(i-(n-3),i));else a.push(...e(1,n-2)),a.push("..."),a.push(i)}return e("div",{class:"pagination-container"},e("div",{class:"controls"},this.renderPreviousBtn(),e("div",{class:"pages-options"},this.renderPageButtons(a)),this.renderNextBtn()))}render(){return"number"===this.type?this.renderNumber():this.renderDefault()}};a.style=".sc-ez-pagination-h{--ez-pagination__info--color:var(--color--petroleum-500);--ez-pagination__info--margin-right:var(--space--sm);--ez-pagination__info--text-weight:var(--text-weight--medium);--ez-pagination__info--font-size:var(--text--medium);--ez-pagination__info-range--font-weight:var(--font-weight--bold);--ez-pagination__pages-option-padding:var(--space--nano);--ez-pagination__pages-option-color:var(--color--petroleum-500);--ez-pagination__pages-option-weight:var(--text-weight--medium);--ez-pagination__pages-option-size:var(--text--medium)}.pagination-container.sc-ez-pagination{display:flex;align-items:center;justify-content:flex-start;overflow:hidden}.info.sc-ez-pagination{color:var(--ez-pagination__info--color);margin-right:var(--ez-pagination__info--margin-right);font-weight:var(--ez-pagination__info--text-weight);font-size:var(--ez-pagination__info--font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.info-range.sc-ez-pagination{font-weight:var(--ez-pagination__info-range--font-weight)}.controls.sc-ez-pagination{display:flex;align-items:center;flex-shrink:0}.controls-compact.sc-ez-pagination{gap:var(--space--2xs)}.pages-options.sc-ez-pagination{display:flex;align-items:center;padding:0 var(--ez-pagination__pages-option-padding)}.page-button.sc-ez-pagination{color:var(--ez-pagination__pages-option-color);font-weight:var(--ez-pagination__pages-option-weight);font-size:var(--ez-pagination__pages-option-size);background-color:transparent;padding:0;border:none;cursor:pointer;min-width:24px;height:24px;display:flex;align-items:center;justify-content:center}.current-page.sc-ez-pagination{color:var(--color--primary)}.page-info.sc-ez-pagination{margin:0 8px}.ellipsis.sc-ez-pagination{color:var(--ez-pagination__pages-option-color);font-weight:var(--ez-pagination__pages-option-weight);font-size:var(--ez-pagination__pages-option-size);min-width:24px;height:24px;display:flex;align-items:center;justify-content:center}";export{a as ez_pagination}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as h,g as n}from"./p-23a36bb6.js";import{StringUtils as r}from"@sankhyalabs/core";var e=function(t,i){return Number(t.slice(0,-1*i.length))},o=function(t){return t.endsWith("px")?{value:t,type:"px",numeric:e(t,"px")}:t.endsWith("fr")?{value:t,type:"fr",numeric:e(t,"fr")}:t.endsWith("%")?{value:t,type:"%",numeric:e(t,"%")}:"auto"===t?{value:t,type:"auto"}:null},u=function(t){return t.split(" ").map(o)},c=function(t,i,s){return i.concat(s).map((function(i){return i.style[t]})).filter((function(t){return void 0!==t&&""!==t}))},a=function(t){for(var i=0;i<t.length;i++)if(t[i].numeric>0)return i;return null},l=function(){return!1},d=function(t,i,s){t.style[i]=s},f=function(t,i,s){var h=t[i];return void 0!==h?h:s};function m(t){var i;return(i=[]).concat.apply(i,Array.from(t.ownerDocument.styleSheets).map((function(t){var i=[];try{i=Array.from(t.cssRules||[])}catch(t){}return i}))).filter((function(i){var s=!1;try{s=t.matches(i.selectorText)}catch(t){}return s}))}var w=function(t,i,s){this.direction=t,this.element=i.element,this.track=i.track,"column"===t?(this.gridTemplateProp="grid-template-columns",this.gridGapProp="grid-column-gap",this.cursor=f(s,"columnCursor",f(s,"cursor","col-resize")),this.snapOffset=f(s,"columnSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"columnDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientX",this.optionStyle=f(s,"gridTemplateColumns")):"row"===t&&(this.gridTemplateProp="grid-template-rows",this.gridGapProp="grid-row-gap",this.cursor=f(s,"rowCursor",f(s,"cursor","row-resize")),this.snapOffset=f(s,"rowSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"rowDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientY",this.optionStyle=f(s,"gridTemplateRows")),this.onDragStart=f(s,"onDragStart",l),this.onDragEnd=f(s,"onDragEnd",l),this.onDrag=f(s,"onDrag",l),this.writeStyle=f(s,"writeStyle",d),this.startDragging=this.startDragging.bind(this),this.stopDragging=this.stopDragging.bind(this),this.drag=this.drag.bind(this),this.minSizeStart=i.minSizeStart,this.minSizeEnd=i.minSizeEnd,i.element&&(this.element.addEventListener("mousedown",this.startDragging),this.element.addEventListener("touchstart",this.startDragging))};w.prototype.getDimensions=function(){var t=this.grid.getBoundingClientRect(),i=t.width,s=t.height,h=t.bottom,n=t.left,r=t.right;"column"===this.direction?(this.start=t.top,this.end=h,this.size=s):"row"===this.direction&&(this.start=n,this.end=r,this.size=i)},w.prototype.getSizeAtTrack=function(t,i){return function(t,i,s,h){return void 0===s&&(s=0),void 0===h&&(h=!1),i.slice(0,h?t+1:t).reduce((function(t,i){return t+i.numeric}),0)+(s?t*s:0)}(t,this.computedPixels,this.computedGapPixels,i)},w.prototype.getSizeOfTrack=function(t){return this.computedPixels[t].numeric},w.prototype.getRawTracks=function(){var t=c(this.gridTemplateProp,[this.grid],m(this.grid));if(!t.length){if(this.optionStyle)return this.optionStyle;throw Error("Unable to determine grid template tracks from styles.")}return t[0]},w.prototype.getGap=function(){var t=c(this.gridGapProp,[this.grid],m(this.grid));return t.length?t[0]:null},w.prototype.getRawComputedTracks=function(){return window.getComputedStyle(this.grid)[this.gridTemplateProp]},w.prototype.getRawComputedGap=function(){return window.getComputedStyle(this.grid)[this.gridGapProp]},w.prototype.setTracks=function(t){this.tracks=t.split(" "),this.trackValues=u(t)},w.prototype.setComputedTracks=function(t){this.computedTracks=t.split(" "),this.computedPixels=u(t)},w.prototype.setGap=function(t){this.gap=t},w.prototype.setComputedGap=function(t){var i;this.computedGap=t,this.computedGapPixels=((i=this.computedGap).endsWith("px")?Number(i.slice(0,-1*"px".length)):null)||0},w.prototype.getMousePosition=function(t){return"touches"in t?t.touches[0][this.clientAxis]:t[this.clientAxis]},w.prototype.startDragging=function(t){if(!("button"in t)||0===t.button){t.preventDefault(),this.grid=this.element?this.element.parentNode:t.target.parentNode,this.getDimensions(),this.setTracks(this.getRawTracks()),this.setComputedTracks(this.getRawComputedTracks()),this.setGap(this.getGap()),this.setComputedGap(this.getRawComputedGap());var i=this.trackValues.filter((function(t){return"%"===t.type})),s=this.trackValues.filter((function(t){return"fr"===t.type}));if(this.totalFrs=s.length,this.totalFrs){var h=a(s);null!==h&&(this.frToPixels=this.computedPixels[h].numeric/s[h].numeric)}if(i.length){var n=a(i);null!==n&&(this.percentageToPixels=this.computedPixels[n].numeric/i[n].numeric)}var r=this.getSizeAtTrack(this.track,!1)+this.start;if(this.dragStartOffset=this.getMousePosition(t)-r,this.aTrack=this.track-1,!(this.track<this.tracks.length-1))throw Error("Invalid track index: "+this.track+". Track must be between two other tracks and only "+this.tracks.length+" tracks were found.");this.bTrack=this.track+1,this.aTrackStart=this.getSizeAtTrack(this.aTrack,!1)+this.start,this.bTrackEnd=this.getSizeAtTrack(this.bTrack,!0)+this.start,this.dragging=!0,window.addEventListener("mouseup",this.stopDragging),window.addEventListener("touchend",this.stopDragging),window.addEventListener("touchcancel",this.stopDragging),window.addEventListener("mousemove",this.drag),window.addEventListener("touchmove",this.drag),this.grid.addEventListener("selectstart",l),this.grid.addEventListener("dragstart",l),this.grid.style.userSelect="none",this.grid.style.webkitUserSelect="none",this.grid.style.MozUserSelect="none",this.grid.style.pointerEvents="none",this.grid.style.cursor=this.cursor,window.document.body.style.cursor=this.cursor,this.onDragStart(this.direction,this.track)}},w.prototype.stopDragging=function(){this.dragging=!1,this.cleanup(),this.onDragEnd(this.direction,this.track),this.needsDestroy&&(this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),this.destroyCb(),this.needsDestroy=!1,this.destroyCb=null)},w.prototype.drag=function(t){var i=this.getMousePosition(t),s=this.getSizeOfTrack(this.track),h=this.aTrackStart+this.minSizeStart+this.dragStartOffset+this.computedGapPixels,n=this.bTrackEnd-this.minSizeEnd-this.computedGapPixels-(s-this.dragStartOffset);i<h+this.snapOffset&&(i=h),i>n-this.snapOffset&&(i=n),i<h?i=h:i>n&&(i=n);var r=i-this.aTrackStart-this.dragStartOffset-this.computedGapPixels,e=this.bTrackEnd-i+this.dragStartOffset-s-this.computedGapPixels;if(this.dragInterval>1){var o=Math.round(r/this.dragInterval)*this.dragInterval;e-=o-r,r=o}r<this.minSizeStart&&(r=this.minSizeStart),e<this.minSizeEnd&&(e=this.minSizeEnd),"px"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=r+"px":"fr"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=1===this.totalFrs?"1fr":r/this.frToPixels+"fr":"%"===this.trackValues[this.aTrack].type&&(this.tracks[this.aTrack]=r/this.percentageToPixels+"%"),"px"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=e+"px":"fr"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=1===this.totalFrs?"1fr":e/this.frToPixels+"fr":"%"===this.trackValues[this.bTrack].type&&(this.tracks[this.bTrack]=e/this.percentageToPixels+"%");var u=this.tracks.join(" ");this.writeStyle(this.grid,this.gridTemplateProp,u),this.onDrag(this.direction,this.track,u)},w.prototype.cleanup=function(){window.removeEventListener("mouseup",this.stopDragging),window.removeEventListener("touchend",this.stopDragging),window.removeEventListener("touchcancel",this.stopDragging),window.removeEventListener("mousemove",this.drag),window.removeEventListener("touchmove",this.drag),this.grid&&(this.grid.removeEventListener("selectstart",l),this.grid.removeEventListener("dragstart",l),this.grid.style.userSelect="",this.grid.style.webkitUserSelect="",this.grid.style.MozUserSelect="",this.grid.style.pointerEvents="",this.grid.style.cursor=""),window.document.body.style.cursor=""},w.prototype.destroy=function(t,i){void 0===t&&(t=!0),t||!1===this.dragging?(this.cleanup(),this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),i&&i()):(this.needsDestroy=!0,i&&(this.destroyCb=i))};var v=function(t,i,s){return i in t?t[i]:s},p=function(t,i){return function(s){if(s.track<1)throw Error("Invalid track index: "+s.track+". Track must be between two other tracks.");var h="column"===t?i.columnMinSizes||{}:i.rowMinSizes||{},n="column"===t?"columnMinSize":"rowMinSize";return new w(t,Object.assign({},{minSizeStart:v(h,s.track-1,f(i,n,f(i,"minSize",0))),minSizeEnd:v(h,s.track+1,f(i,n,f(i,"minSize",0)))},s),i)}},g=function(t){var i=this;this.columnGutters={},this.rowGutters={},this.options=Object.assign({},{columnGutters:t.columnGutters||[],rowGutters:t.rowGutters||[],columnMinSizes:t.columnMinSizes||{},rowMinSizes:t.rowMinSizes||{}},t),this.options.columnGutters.forEach((function(t){i.columnGutters[t.track]=p("column",i.options)(t)})),this.options.rowGutters.forEach((function(t){i.rowGutters[t.track]=p("row",i.options)(t)}))};g.prototype.addColumnGutter=function(t,i){this.columnGutters[i]&&this.columnGutters[i].destroy(),this.columnGutters[i]=p("column",this.options)({element:t,track:i})},g.prototype.addRowGutter=function(t,i){this.rowGutters[i]&&this.rowGutters[i].destroy(),this.rowGutters[i]=p("row",this.options)({element:t,track:i})},g.prototype.removeColumnGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.columnGutters[t]&&this.columnGutters[t].destroy(i,(function(){delete s.columnGutters[t]}))},g.prototype.removeRowGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.rowGutters[t]&&this.rowGutters[t].destroy(i,(function(){delete s.rowGutters[t]}))},g.prototype.handleDragStart=function(t,i,s){"column"===i?(this.columnGutters[s]&&this.columnGutters[s].destroy(),this.columnGutters[s]=p("column",this.options)({track:s}),this.columnGutters[s].startDragging(t)):"row"===i&&(this.rowGutters[s]&&this.rowGutters[s].destroy(),this.rowGutters[s]=p("row",this.options)({track:s}),this.rowGutters[s].startDragging(t))},g.prototype.destroy=function(t){var i=this;void 0===t&&(t=!0),Object.keys(this.columnGutters).forEach((function(s){return i.columnGutters[s].destroy(t,(function(){delete i.columnGutters[s]}))})),Object.keys(this.rowGutters).forEach((function(s){return i.rowGutters[s].destroy(t,(function(){delete i.rowGutters[s]}))}))};const b=class{constructor(s){t(this,s),this.resizeEnd=i(this,"resizeEnd",7),this._items=[],this._buildInProgress=!1,this.direction="column",this.anchorToExpand=!1,this.structural=!1}rebuildLayout(){Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach((t=>{t.remove()})),Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach((t=>{t.rebuildLayout()})),this.buildItems(),this.initSplit()}buildItems(){this._panelID=r.generateUUID(),this._element.dataset.panelId=this._panelID,this._element.dataset.uniqueId="EzSplitPanel";let t=Array.from(this._element.children);this._items=t.filter((t=>{var i;return"EZ-SPLIT-ITEM"===(null===(i=t.tagName)||void 0===i?void 0:i.toUpperCase())}));let i=1;this._items.forEach(((t,s)=>{t.dataset.trackNumber=i.toString(),this._items.length>1&&s!=this._items.length-1&&this.addItemGutter(t),i+=2}))}componentDidLoad(){this.buildItems(),this.initSplit(),this._mutationObserver=new MutationObserver((t=>{for(const i of t)if("childList"===i.type&&!this._buildInProgress){this._buildInProgress=!0,window.requestAnimationFrame((()=>{this.rebuildLayout()})),window.requestAnimationFrame((()=>this._buildInProgress=!1));break}})),this._mutationObserver.observe(this._element,{childList:!0,subtree:!1})}disconnectedCallback(){null!=this._mutationObserver&&this._mutationObserver.disconnect()}initSplit(){var t;this._items.length&&(this._element.style["row"===this.direction?"grid-template-rows":"grid-template-columns"]=this.getGridTemplate(),this.removeGuttersMargin(),t=this.getGutters(),new g(t))}handlePanelDragEnd(){const t=this._items.map((t=>({id:t.id,height:t.clientHeight,width:t.clientWidth})));this.resizeEnd.emit({panelId:this._element.id,items:t})}getGutters(){const t={columnGutters:[],rowGutters:[],onDragEnd:()=>this.handlePanelDragEnd()};if(!this._items.length)return t;const i="row"===this.direction?"rowGutters":"columnGutters";return this._items.forEach(((s,h)=>{if(h===this._items.length-1)return;let n=s.dataset.trackNumber;h===this._items.length-1&&(n=this._items.length.toString()),t[i].push({track:Number(n),element:this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${s.dataset.trackNumber}"]`)})})),t}addItemGutter(t){const i=document.createElement("div");i.classList.add("ez-split-gutter"),i.classList.add(this.direction),i.classList.add("row"===this.direction?"ez-split-gutter__row":"ez-split-gutter__column"),i.dataset.itemTrack=`${t.dataset.trackNumber}`,i.dataset.trackNumber=(Number(t.dataset.trackNumber)+1).toString(),t.parentNode.insertBefore(i,t.nextSibling)}getElementStyle(){return{display:"grid",height:"100%",width:"100%",position:this.anchorToExpand?"relative":"unset"}}calcFreeSpacePercentage(){const t=this._items.reduce(((t,i)=>{var s;return t+((null===(s=i.size)||void 0===s?void 0:s.includes("%"))?Number(i.size.replace("%","")):0)}),0),i=this._items.filter((t=>void 0===t.size)).length;return i&&t?(100-t)/i:null}getGridTemplate(){let t="";const i=this.calcFreeSpacePercentage();return this._items.forEach(((s,h)=>{let n=s.size||"1fr";!s.size&&i&&(n=`${i}%`),t+=h!==this._items.length-1?0!==h?` ${n} 5px`:`${n} 5px`:` ${n}`})),t}removeGuttersMargin(){this._items.length<=1||("column"!=this.direction?"row"!=this.direction||this.removeGuttersMarginRow():this.removeGuttersMarginColumn())}removeGuttersMarginColumn(){this._items.forEach(((t,i)=>{0!=i?i!==this._items.length-1?(t.style.marginRight="0",t.style.marginLeft="0"):t.style.marginLeft="0":t.style.marginRight="0"}))}removeGuttersMarginRow(){this._items.length<=1||this._items.forEach(((t,i)=>{0!=i?i!==this._items.length-1?(t.style.marginBottom="0",t.style.marginTop="0"):t.style.marginTop="0":t.style.marginBottom="0"}))}render(){return s(h,{class:this.structural?"structural__panel":"content__panel",style:this.getElementStyle()})}get _element(){return n(this)}};b.style=".ez-split-gutter{cursor:grab;background-color:transparent;max-width:100%}.ez-split-gutter__row{cursor:ns-resize}.ez-split-gutter__column{cursor:ew-resize}.structural__panel{background:none;box-shadow:none;outline:none;padding:0;margin:0;border:0}";export{b as ez_split_panel}
|
|
1
|
+
import{r as t,c as i,h as s,H as h,g as n}from"./p-e4c7eb39.js";import{StringUtils as r}from"@sankhyalabs/core";var e=function(t,i){return Number(t.slice(0,-1*i.length))},o=function(t){return t.endsWith("px")?{value:t,type:"px",numeric:e(t,"px")}:t.endsWith("fr")?{value:t,type:"fr",numeric:e(t,"fr")}:t.endsWith("%")?{value:t,type:"%",numeric:e(t,"%")}:"auto"===t?{value:t,type:"auto"}:null},u=function(t){return t.split(" ").map(o)},c=function(t,i,s){return i.concat(s).map((function(i){return i.style[t]})).filter((function(t){return void 0!==t&&""!==t}))},a=function(t){for(var i=0;i<t.length;i++)if(t[i].numeric>0)return i;return null},l=function(){return!1},d=function(t,i,s){t.style[i]=s},f=function(t,i,s){var h=t[i];return void 0!==h?h:s};function m(t){var i;return(i=[]).concat.apply(i,Array.from(t.ownerDocument.styleSheets).map((function(t){var i=[];try{i=Array.from(t.cssRules||[])}catch(t){}return i}))).filter((function(i){var s=!1;try{s=t.matches(i.selectorText)}catch(t){}return s}))}var w=function(t,i,s){this.direction=t,this.element=i.element,this.track=i.track,"column"===t?(this.gridTemplateProp="grid-template-columns",this.gridGapProp="grid-column-gap",this.cursor=f(s,"columnCursor",f(s,"cursor","col-resize")),this.snapOffset=f(s,"columnSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"columnDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientX",this.optionStyle=f(s,"gridTemplateColumns")):"row"===t&&(this.gridTemplateProp="grid-template-rows",this.gridGapProp="grid-row-gap",this.cursor=f(s,"rowCursor",f(s,"cursor","row-resize")),this.snapOffset=f(s,"rowSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"rowDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientY",this.optionStyle=f(s,"gridTemplateRows")),this.onDragStart=f(s,"onDragStart",l),this.onDragEnd=f(s,"onDragEnd",l),this.onDrag=f(s,"onDrag",l),this.writeStyle=f(s,"writeStyle",d),this.startDragging=this.startDragging.bind(this),this.stopDragging=this.stopDragging.bind(this),this.drag=this.drag.bind(this),this.minSizeStart=i.minSizeStart,this.minSizeEnd=i.minSizeEnd,i.element&&(this.element.addEventListener("mousedown",this.startDragging),this.element.addEventListener("touchstart",this.startDragging))};w.prototype.getDimensions=function(){var t=this.grid.getBoundingClientRect(),i=t.width,s=t.height,h=t.bottom,n=t.left,r=t.right;"column"===this.direction?(this.start=t.top,this.end=h,this.size=s):"row"===this.direction&&(this.start=n,this.end=r,this.size=i)},w.prototype.getSizeAtTrack=function(t,i){return function(t,i,s,h){return void 0===s&&(s=0),void 0===h&&(h=!1),i.slice(0,h?t+1:t).reduce((function(t,i){return t+i.numeric}),0)+(s?t*s:0)}(t,this.computedPixels,this.computedGapPixels,i)},w.prototype.getSizeOfTrack=function(t){return this.computedPixels[t].numeric},w.prototype.getRawTracks=function(){var t=c(this.gridTemplateProp,[this.grid],m(this.grid));if(!t.length){if(this.optionStyle)return this.optionStyle;throw Error("Unable to determine grid template tracks from styles.")}return t[0]},w.prototype.getGap=function(){var t=c(this.gridGapProp,[this.grid],m(this.grid));return t.length?t[0]:null},w.prototype.getRawComputedTracks=function(){return window.getComputedStyle(this.grid)[this.gridTemplateProp]},w.prototype.getRawComputedGap=function(){return window.getComputedStyle(this.grid)[this.gridGapProp]},w.prototype.setTracks=function(t){this.tracks=t.split(" "),this.trackValues=u(t)},w.prototype.setComputedTracks=function(t){this.computedTracks=t.split(" "),this.computedPixels=u(t)},w.prototype.setGap=function(t){this.gap=t},w.prototype.setComputedGap=function(t){var i;this.computedGap=t,this.computedGapPixels=((i=this.computedGap).endsWith("px")?Number(i.slice(0,-1*"px".length)):null)||0},w.prototype.getMousePosition=function(t){return"touches"in t?t.touches[0][this.clientAxis]:t[this.clientAxis]},w.prototype.startDragging=function(t){if(!("button"in t)||0===t.button){t.preventDefault(),this.grid=this.element?this.element.parentNode:t.target.parentNode,this.getDimensions(),this.setTracks(this.getRawTracks()),this.setComputedTracks(this.getRawComputedTracks()),this.setGap(this.getGap()),this.setComputedGap(this.getRawComputedGap());var i=this.trackValues.filter((function(t){return"%"===t.type})),s=this.trackValues.filter((function(t){return"fr"===t.type}));if(this.totalFrs=s.length,this.totalFrs){var h=a(s);null!==h&&(this.frToPixels=this.computedPixels[h].numeric/s[h].numeric)}if(i.length){var n=a(i);null!==n&&(this.percentageToPixels=this.computedPixels[n].numeric/i[n].numeric)}var r=this.getSizeAtTrack(this.track,!1)+this.start;if(this.dragStartOffset=this.getMousePosition(t)-r,this.aTrack=this.track-1,!(this.track<this.tracks.length-1))throw Error("Invalid track index: "+this.track+". Track must be between two other tracks and only "+this.tracks.length+" tracks were found.");this.bTrack=this.track+1,this.aTrackStart=this.getSizeAtTrack(this.aTrack,!1)+this.start,this.bTrackEnd=this.getSizeAtTrack(this.bTrack,!0)+this.start,this.dragging=!0,window.addEventListener("mouseup",this.stopDragging),window.addEventListener("touchend",this.stopDragging),window.addEventListener("touchcancel",this.stopDragging),window.addEventListener("mousemove",this.drag),window.addEventListener("touchmove",this.drag),this.grid.addEventListener("selectstart",l),this.grid.addEventListener("dragstart",l),this.grid.style.userSelect="none",this.grid.style.webkitUserSelect="none",this.grid.style.MozUserSelect="none",this.grid.style.pointerEvents="none",this.grid.style.cursor=this.cursor,window.document.body.style.cursor=this.cursor,this.onDragStart(this.direction,this.track)}},w.prototype.stopDragging=function(){this.dragging=!1,this.cleanup(),this.onDragEnd(this.direction,this.track),this.needsDestroy&&(this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),this.destroyCb(),this.needsDestroy=!1,this.destroyCb=null)},w.prototype.drag=function(t){var i=this.getMousePosition(t),s=this.getSizeOfTrack(this.track),h=this.aTrackStart+this.minSizeStart+this.dragStartOffset+this.computedGapPixels,n=this.bTrackEnd-this.minSizeEnd-this.computedGapPixels-(s-this.dragStartOffset);i<h+this.snapOffset&&(i=h),i>n-this.snapOffset&&(i=n),i<h?i=h:i>n&&(i=n);var r=i-this.aTrackStart-this.dragStartOffset-this.computedGapPixels,e=this.bTrackEnd-i+this.dragStartOffset-s-this.computedGapPixels;if(this.dragInterval>1){var o=Math.round(r/this.dragInterval)*this.dragInterval;e-=o-r,r=o}r<this.minSizeStart&&(r=this.minSizeStart),e<this.minSizeEnd&&(e=this.minSizeEnd),"px"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=r+"px":"fr"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=1===this.totalFrs?"1fr":r/this.frToPixels+"fr":"%"===this.trackValues[this.aTrack].type&&(this.tracks[this.aTrack]=r/this.percentageToPixels+"%"),"px"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=e+"px":"fr"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=1===this.totalFrs?"1fr":e/this.frToPixels+"fr":"%"===this.trackValues[this.bTrack].type&&(this.tracks[this.bTrack]=e/this.percentageToPixels+"%");var u=this.tracks.join(" ");this.writeStyle(this.grid,this.gridTemplateProp,u),this.onDrag(this.direction,this.track,u)},w.prototype.cleanup=function(){window.removeEventListener("mouseup",this.stopDragging),window.removeEventListener("touchend",this.stopDragging),window.removeEventListener("touchcancel",this.stopDragging),window.removeEventListener("mousemove",this.drag),window.removeEventListener("touchmove",this.drag),this.grid&&(this.grid.removeEventListener("selectstart",l),this.grid.removeEventListener("dragstart",l),this.grid.style.userSelect="",this.grid.style.webkitUserSelect="",this.grid.style.MozUserSelect="",this.grid.style.pointerEvents="",this.grid.style.cursor=""),window.document.body.style.cursor=""},w.prototype.destroy=function(t,i){void 0===t&&(t=!0),t||!1===this.dragging?(this.cleanup(),this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),i&&i()):(this.needsDestroy=!0,i&&(this.destroyCb=i))};var v=function(t,i,s){return i in t?t[i]:s},p=function(t,i){return function(s){if(s.track<1)throw Error("Invalid track index: "+s.track+". Track must be between two other tracks.");var h="column"===t?i.columnMinSizes||{}:i.rowMinSizes||{},n="column"===t?"columnMinSize":"rowMinSize";return new w(t,Object.assign({},{minSizeStart:v(h,s.track-1,f(i,n,f(i,"minSize",0))),minSizeEnd:v(h,s.track+1,f(i,n,f(i,"minSize",0)))},s),i)}},g=function(t){var i=this;this.columnGutters={},this.rowGutters={},this.options=Object.assign({},{columnGutters:t.columnGutters||[],rowGutters:t.rowGutters||[],columnMinSizes:t.columnMinSizes||{},rowMinSizes:t.rowMinSizes||{}},t),this.options.columnGutters.forEach((function(t){i.columnGutters[t.track]=p("column",i.options)(t)})),this.options.rowGutters.forEach((function(t){i.rowGutters[t.track]=p("row",i.options)(t)}))};g.prototype.addColumnGutter=function(t,i){this.columnGutters[i]&&this.columnGutters[i].destroy(),this.columnGutters[i]=p("column",this.options)({element:t,track:i})},g.prototype.addRowGutter=function(t,i){this.rowGutters[i]&&this.rowGutters[i].destroy(),this.rowGutters[i]=p("row",this.options)({element:t,track:i})},g.prototype.removeColumnGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.columnGutters[t]&&this.columnGutters[t].destroy(i,(function(){delete s.columnGutters[t]}))},g.prototype.removeRowGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.rowGutters[t]&&this.rowGutters[t].destroy(i,(function(){delete s.rowGutters[t]}))},g.prototype.handleDragStart=function(t,i,s){"column"===i?(this.columnGutters[s]&&this.columnGutters[s].destroy(),this.columnGutters[s]=p("column",this.options)({track:s}),this.columnGutters[s].startDragging(t)):"row"===i&&(this.rowGutters[s]&&this.rowGutters[s].destroy(),this.rowGutters[s]=p("row",this.options)({track:s}),this.rowGutters[s].startDragging(t))},g.prototype.destroy=function(t){var i=this;void 0===t&&(t=!0),Object.keys(this.columnGutters).forEach((function(s){return i.columnGutters[s].destroy(t,(function(){delete i.columnGutters[s]}))})),Object.keys(this.rowGutters).forEach((function(s){return i.rowGutters[s].destroy(t,(function(){delete i.rowGutters[s]}))}))};const b=class{constructor(s){t(this,s),this.resizeEnd=i(this,"resizeEnd",7),this._items=[],this._buildInProgress=!1,this.direction="column",this.anchorToExpand=!1,this.structural=!1}rebuildLayout(){Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach((t=>{t.remove()})),Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach((t=>{t.rebuildLayout()})),this.buildItems(),this.initSplit()}buildItems(){this._panelID=r.generateUUID(),this._element.dataset.panelId=this._panelID,this._element.dataset.uniqueId="EzSplitPanel";let t=Array.from(this._element.children);this._items=t.filter((t=>{var i;return"EZ-SPLIT-ITEM"===(null===(i=t.tagName)||void 0===i?void 0:i.toUpperCase())}));let i=1;this._items.forEach(((t,s)=>{t.dataset.trackNumber=i.toString(),this._items.length>1&&s!=this._items.length-1&&this.addItemGutter(t),i+=2}))}componentDidLoad(){this.buildItems(),this.initSplit(),this._mutationObserver=new MutationObserver((t=>{for(const i of t)if("childList"===i.type&&!this._buildInProgress){this._buildInProgress=!0,window.requestAnimationFrame((()=>{this.rebuildLayout()})),window.requestAnimationFrame((()=>this._buildInProgress=!1));break}})),this._mutationObserver.observe(this._element,{childList:!0,subtree:!1})}disconnectedCallback(){null!=this._mutationObserver&&this._mutationObserver.disconnect()}initSplit(){var t;this._items.length&&(this._element.style["row"===this.direction?"grid-template-rows":"grid-template-columns"]=this.getGridTemplate(),this.removeGuttersMargin(),t=this.getGutters(),new g(t))}handlePanelDragEnd(){const t=this._items.map((t=>({id:t.id,height:t.clientHeight,width:t.clientWidth})));this.resizeEnd.emit({panelId:this._element.id,items:t})}getGutters(){const t={columnGutters:[],rowGutters:[],onDragEnd:()=>this.handlePanelDragEnd()};if(!this._items.length)return t;const i="row"===this.direction?"rowGutters":"columnGutters";return this._items.forEach(((s,h)=>{if(h===this._items.length-1)return;let n=s.dataset.trackNumber;h===this._items.length-1&&(n=this._items.length.toString()),t[i].push({track:Number(n),element:this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${s.dataset.trackNumber}"]`)})})),t}addItemGutter(t){const i=document.createElement("div");i.classList.add("ez-split-gutter"),i.classList.add(this.direction),i.classList.add("row"===this.direction?"ez-split-gutter__row":"ez-split-gutter__column"),i.dataset.itemTrack=`${t.dataset.trackNumber}`,i.dataset.trackNumber=(Number(t.dataset.trackNumber)+1).toString(),t.parentNode.insertBefore(i,t.nextSibling)}getElementStyle(){return{display:"grid",height:"100%",width:"100%",position:this.anchorToExpand?"relative":"unset"}}calcFreeSpacePercentage(){const t=this._items.reduce(((t,i)=>{var s;return t+((null===(s=i.size)||void 0===s?void 0:s.includes("%"))?Number(i.size.replace("%","")):0)}),0),i=this._items.filter((t=>void 0===t.size)).length;return i&&t?(100-t)/i:null}getGridTemplate(){let t="";const i=this.calcFreeSpacePercentage();return this._items.forEach(((s,h)=>{let n=s.size||"1fr";!s.size&&i&&(n=`${i}%`),t+=h!==this._items.length-1?0!==h?` ${n} 5px`:`${n} 5px`:` ${n}`})),t}removeGuttersMargin(){this._items.length<=1||("column"!=this.direction?"row"!=this.direction||this.removeGuttersMarginRow():this.removeGuttersMarginColumn())}removeGuttersMarginColumn(){this._items.forEach(((t,i)=>{0!=i?i!==this._items.length-1?(t.style.marginRight="0",t.style.marginLeft="0"):t.style.marginLeft="0":t.style.marginRight="0"}))}removeGuttersMarginRow(){this._items.length<=1||this._items.forEach(((t,i)=>{0!=i?i!==this._items.length-1?(t.style.marginBottom="0",t.style.marginTop="0"):t.style.marginTop="0":t.style.marginBottom="0"}))}render(){return s(h,{class:this.structural?"structural__panel":"content__panel",style:this.getElementStyle()})}get _element(){return n(this)}};b.style=".ez-split-gutter{cursor:grab;background-color:transparent;max-width:100%}.ez-split-gutter__row{cursor:ns-resize}.ez-split-gutter__column{cursor:ew-resize}.structural__panel{background:none;box-shadow:none;outline:none;padding:0;margin:0;border:0}";export{b as ez_split_panel}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as a,c as t,g as n,H as r}from"./p-
|
|
1
|
+
import{h as e,r as a,c as t,g as n,H as r}from"./p-e4c7eb39.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-a61fdd20.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}
|
|
Binary file
|
|
@@ -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-e4c7eb39.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}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as o,r,c as e,H as d,g as n}from"./p-23a36bb6.js";import{ElementIDUtils as i,ObjectUtils as t}from"@sankhyalabs/core";const l=({item:r,hasIcon:e,hasChildren:d,isLockedLevels:n,onSubActionClick:i})=>o("div",{class:"ez-dropdown__item-wrapper",title:r.label},a(r,e),o("span",{class:"ez-dropdown__item-label"},r.label),s(r,d,n,i)),a=(r,e)=>{if(null!=r&&e)return o("ez-icon",r.iconName?Object.assign({class:"ez-dropdown__icon-left",iconName:r.iconName,size:"medium"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.id}_ezDropdownItemIcon`}):{class:"ez-dropdown__icon-left ez-dropdown__hidden",size:"medium"})},s=(r,e,d,n)=>{var t,l;if(null!=r){if(!(null===(t=r.children)||void 0===t?void 0:t.length)&&null!=r.subAction&&Object.keys(r.subAction).length>0)return o("span",Object.assign({onClick:()=>n(r),title:r.subAction.label,class:`ez-dropdown__link ez-dropdown__link--${r.subAction.type||"primary"}`},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.subAction.id}_ezDropdownItemSubAction`}),r.subAction.label);if(!d&&e)return(null===(l=r.children)||void 0===l?void 0:l.length)>0?o("ez-icon",Object.assign({class:"ez-dropdown__icon-right",iconName:"chevron-right",size:"medium"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.id}_ezDropdownIconOpenChildren`})):o("ez-icon",{class:"ez-dropdown__icon-right ez-dropdown__hidden",size:"medium"})}};class p{constructor(){}show(o){const r=null==o?void 0:o.querySelector(".ez-dropdown__submenu");null!=o&&null!=r&&(r.classList.remove("ez-dropdown__submenu--hide"),this.setPosition(o),this.setScrollContainer(o),this.setMaxHeight(r))}hide(o){if(null==o)return;const r=o.querySelector(".ez-dropdown__submenu:not(.ez-dropdown__submenu--hide)");this.reset(r),this.hideChild(r)}hideChild(o){null!=o&&o.querySelectorAll(".ez-dropdown__submenu").forEach((o=>{this.reset(o)}))}setPosition(o){const r=null==o?void 0:o.querySelector(".ez-dropdown__submenu"),e=null==o?void 0:o.closest(".ez-dropdown");if(null==r||null==e)return;r.style.top=this.getPositionTop(o),r.style.left=this.getPositionRight(e);const d=null==r?void 0:r.getBoundingClientRect(),n=document.body.clientWidth;(null==d?void 0:d.right)>n&&this.updatePosition(e,r)}setMaxHeight(o){var r;const e=(null==o?void 0:o.shadowRoot)||o,d=null==e?void 0:e.querySelector(".ez-dropdown"),n=document.body.clientHeight;let i,t;if(null!=(null==e?void 0:e.tagName)?(i=e,t=null==i?void 0:i.getBoundingClientRect()):t=null==d?void 0:d.getBoundingClientRect(),null!=d&&null!=t){if(t.y+t.height>n)if(null!=i){const o=i.closest(".ez-dropdown"),e=null==o?void 0:o.getBoundingClientRect(),l=parseFloat((null===(r=getComputedStyle(i))||void 0===r?void 0:r.marginTop)||"0");if(null==o||null==e)return;e.y+t.height>n?(i.style.top=e.y-l+"px",d.style.maxHeight=n-e.y+"px"):i.style.top=n-t.height-l+"px"}else{let o=n-t.y;o<0&&(o=t.height-n),d.style.maxHeight=o+"px"}this.setSpacerContainer(d)}}setSpacerContainer(o){const r=null==o?void 0:o.querySelector(".ez-dropdown__container");null!=r&&(r.scrollHeight>r.clientHeight?r.classList.add("ez-dropdown__container--spacer"):r.classList.remove("ez-dropdown__container--spacer"))}reset(o){if(null==o)return;o.classList.add("ez-dropdown__submenu--hide"),o.style.left="",o.style.top="";const r=o.querySelector(".ez-dropdown");this.resetDropdown(r)}resetDropdown(o){null!=o&&(o.style.maxHeight="",this.setSpacerContainer(o))}setScrollContainer(o){const r=null==o?void 0:o.closest(".ez-dropdown__container");null!=r&&(r.onscroll=this.onScrollContainer.bind(this))}onScrollContainer(o){this.hideChild(null==o?void 0:o.target)}getPositionTop(o){const r=null==o?void 0:o.getBoundingClientRect();if(null!=r)return r.y+"px"}getPositionRight(o){const r=null==o?void 0:o.getBoundingClientRect();if(null!=r)return r.x+r.width+"px"}getPositionLeft(o,r){const e=null==o?void 0:o.getBoundingClientRect(),d=null==r?void 0:r.getBoundingClientRect();if(null!=e&&null!=d)return e.x-d.width+"px"}updatePosition(o,r){const e=null==o?void 0:o.getBoundingClientRect(),d=null==r?void 0:r.getBoundingClientRect();null!=e&&null!=d&&e.x<d.right&&(r.style.left=this.getPositionLeft(o,r),this.updatePosition(o,r))}}const c=class{constructor(o){r(this,o),this.ezClick=e(this,"ezClick",7),this.ezSubActionClick=e(this,"ezSubActionClick",7),this.ezOutsideClick=e(this,"ezOutsideClick",7),this.ezHover=e(this,"ezHover",7),this._itemList={},this._submenuList=[],this._openedMenuList={},this._levelLimits=3,this.items=[],this.value=void 0,this.itemBuilder=void 0}handleClickOutside(o){this._element.contains(o.target)||this.ezOutsideClick.emit()}defaultItemBuilder(r,e,d,n){return o(l,{item:r,hasIcon:d,hasChildren:n,isLockedLevels:e,onSubActionClick:this.onSubActionClick.bind(this)})}getMaxOrder(o){return null==o||0===o.length?-1:Math.max(...o.map((o=>{var r;const e=null===(r=o.group)||void 0===r?void 0:r.order;return null!=e&&e>=0?e:-1})))}hasIcon(o){return null==o?void 0:o.some((o=>""!==(o.iconName||"")))}hasGroup(o){return null==o?void 0:o.some((o=>""!==(o.group||"")))}hasChildren(o){return null==o?void 0:o.some((o=>(o.children||[]).length>0))}isLockedLevels(o){return!!this._levelLimits&&o===this._levelLimits+1}getItemsByGroup(o,r){let e={};const d=this.getMaxOrder(o);return o.forEach((o=>{const n=o.group&&null!=o.group.label?o.group.label||"noGroup":o.group||"noGroup";let i=e[n];null==i&&(i={items:[],order:o.group&&null!=o.group.order?o.group.order:o.group?d+1:d+2}),this.validateItem(o,r),i.items.push(o),e[n]=i})),t.sortByProperty(e,"order")}validateItem(o,r){if(null==this._itemList&&(this._itemList={}),null==o.type&&(o.type="item"),null==o.id){const e=`level_${r}_${o.type}`,d=Object.keys(this._itemList).filter((o=>o.includes(e))).length;o.id=`${e}_${d+1}`}null==o.label&&(o.label=""),null!=o.subAction&&(null==o.subAction.id&&(o.subAction.id=`subAction_${o.id}`),null==o.subAction.label&&(o.subAction.label="")),null==this._itemList[o.id]&&(this._itemList[o.id]={})}getContainerItemBuilder(r,e,d,n,i){if(null==this.itemBuilder)return;const t=this.itemBuilder(r,e);return null==t?this.defaultItemBuilder(r,d,n,i):"string"!=typeof t?o("div",{class:"ez-dropdown__item-builder"},t):o("div",{class:"ez-dropdown__item-builder",innerHTML:t})}getItemsRender(r,e,d,n){if(null==r)return;let t=e,l=!1;return n&&(t++,l=this.isLockedLevels(t)),r.map((r=>{var a;switch(r.type){case"loading":return o("div",{class:"ez-dropdown__item"},o("ez-skeleton",{width:"200px"}));case"divider":return o("hr",Object.assign({class:"ez-dropdown__divider"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:i.getInternalIDInfo(`${r.id}_ezDropdownDivider`)}));default:return o("div",Object.assign({ref:o=>this._itemList[r.id]=o,class:"ez-dropdown__item","data-level":e},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:i.getInternalIDInfo(`${r.id}_ezDropdownItem`)}),o("div",{class:"ez-dropdown__item-content",onClick:o=>this.onItemClick(o,r),onMouseOver:o=>this.onShowSubmenu(o,r),onMouseEnter:()=>this.ezHover.emit(r)},this.itemBuilder?this.getContainerItemBuilder(r,e,l,d,n):this.defaultItemBuilder(r,l,d,n)),(null===(a=r.children)||void 0===a?void 0:a.length)>0&&!l&&n&&o("div",{ref:o=>this._submenuList.push(o),class:"ez-dropdown__submenu ez-dropdown__submenu--hide"},this.renderDropdown(r.children,t)))}}))}renderDropdown(r=this.items,e=1){if(null==r||this.isLockedLevels(e))return;const d=this.getItemsByGroup(r,e),n=this.hasGroup(r),t=this.hasIcon(r),l=this.hasChildren(r);return o("div",{class:"ez-dropdown ez-dropdown__max-height","data-level":e},o("div",{class:"ez-dropdown__container"},Object.keys(d).map((r=>o("div",Object.assign({class:"ez-dropdown__group"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:i.getInternalIDInfo(`${r}_ezDropdownGroup`)}),"noGroup"!==r&&o("label",{class:"ez-dropdown__group-label",title:r},r),n&&"noGroup"===r&&o("hr",Object.assign({class:"ez-dropdown__divider"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:i.getInternalIDInfo(`${r}_ezDropdownDivider`)})),this.getItemsRender(d[r].items,e,t,l))))))}hasOpenedSubmenu(o){const r=Object.keys(this._openedMenuList);return r.includes(o.toString())||r.some((r=>Number(r)>o))}hasSubmenuOpened(){var o;return null===(o=this._submenuList)||void 0===o?void 0:o.some((o=>!o.classList.contains("ez-dropdown__submenu--hide")))}setEvents(){document.removeEventListener("click",this.onHideAllSubmenu.bind(this)),document.addEventListener("click",this.onHideAllSubmenu.bind(this)),document.removeEventListener("scroll",this.onSubmenuReposition.bind(this)),document.addEventListener("scroll",this.onSubmenuReposition.bind(this))}onShowSubmenu(o,r){var e;if(null==o)return;const d=this._itemList[r.id];if(!(null==d?void 0:d.classList.contains("ez-dropdown__item")))return;const n=Number(d.dataset.level||"0");this.hasOpenedSubmenu(n)&&(this._submenuControl.hide(this._openedMenuList[n]),delete this._openedMenuList[n]),(null===(e=r.children)||void 0===e?void 0:e.length)&&(this._openedMenuList[d.dataset.level]=d,this._submenuControl.show(d))}onItemClick(o,r){const e=null==o?void 0:o.target;(null==e?void 0:e.classList.contains("ez-dropdown__link"))||(this.value=r,this.ezClick.emit(r))}onSubActionClick(o){this.ezSubActionClick.emit(o.subAction)}onHideAllSubmenu(o){const r=null==o?void 0:o.target;this.hasSubmenuOpened()&&(null==r||!r.closest(".ez-dropdown")&&"EZ-DROPDOWN"!==r.tagName)&&(this._openedMenuList={},this._submenuList.forEach(this._submenuControl.reset.bind(this._submenuControl)))}onSubmenuReposition(){null!=this._openedMenuList&&Object.keys(this._openedMenuList).forEach((o=>{this._submenuControl.setPosition(this._openedMenuList[o])}))}componentDidLoad(){i.addIDInfo(this._element),this._submenuControl=new p,this._submenuControl.setMaxHeight(this._element)}componentDidUpdate(){this._submenuControl.setMaxHeight(this._element)}componentDidRender(){this.setEvents()}render(){return o(d,null,this.renderDropdown())}get _element(){return n(this)}};c.style=":host{--ez-dropdown--z-index:var(--more-visible, 2);--ez-dropdown--padding:var(--space--small, 6px);--ez-dropdown--box-shadow:var(--shadow--medium, 0px 8px 24px rgba(0, 38, 111, 0.1));--ez-dropdown--border-radius:var(--border--radius-medium, 12px);--ez-dropdown--background-color:var(--background--xlight, #fff);--ez-dropdown--font-family:var(--font-pattern, 'Roboto');--ez-dropdown--max-height:415px;--ez-dropdown__item--padding:var(--space--small, 6px);--ez-dropdown__item--gap:var(--space--small, 6px);--ez-dropdown__item--border-radius:var(--border--radius-small, 6px);--ez-dropdown__item--color:var(--title--primary, #2b3a54);--ez-dropdown__item--font-weight:var(--text-weight--medium, 400);--ez-dropdown__item--font-size:var(--text--medium, 14px);--ez-dropdown__item--line-height:calc(var(--ez-dropdown__item--font-size) + 4px);--ez-dropdown__item--background-color:var(--background--medium, #f0f3f7);--ez-dropdown__item--transition:var(--transition, .2s linear);--ez-dropdown__item-label--margin-right:var(--space--medium, 12px);--ez-dropdown__icon--size:var(--icon--medium, 18px);--ez-dropdown__divider--background-color:var(--color--disable-secondary, #f2f5f8);--ez-dropdown__divider--margin:var(--space--extra-small, 3px) 0;--ez-dropdown__group-label--color:var(--text--secondary, #A2ABB9);--ez-dropdown__group-label--font-weight:var(--text-weight--large, 600);--ez-dropdown__group-label--font-size:var(--text--small, 12px);--ez-dropdown__group-label--line-height:var(--text--medium, 14px);--ez-dropdown__group-label--padding:var(--space--small, 6px);--ez-dropdown__submenu--z-index:var(--most-visible, 3);--ez-dropdown__link--font-weight:var(--text-weight--large, 600);--ez-dropdown__link--primary--color:var(--color--primary, #008561);--ez-dropdown__link--critical--color:var(--color-alert--error-800, #BD0025);--ez-dropdown__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-dropdown__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-dropdown__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-dropdown__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-dropdown__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-dropdown__scrollbar--width:var(--space--small, 6px);--ez-dropdown__scrollbar--padding-right:var(--space--extra-small, 3px);display:flex;flex-direction:column;height:fit-content;user-select:none;box-sizing:border-box;position:fixed;z-index:var(--ez-dropdown--z-index)}:host *{box-sizing:border-box}.ez-dropdown{display:flex;padding:var(--ez-dropdown--padding);box-shadow:var(--ez-dropdown--box-shadow);border-radius:var(--ez-dropdown--border-radius);background-color:var(--ez-dropdown--background-color);max-width:var(--ez-dropdown--max-width)}.ez-dropdown__max-height{max-height:var(--ez-dropdown--max-height)}.ez-dropdown *{font-family:var(--ez-dropdown--font-family)}.ez-dropdown__container{display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;flex:auto;scrollbar-color:var(--ez-dropdown__scrollbar--color-clicked) var(--ez-dropdown__scrollbar--color-background)}.ez-dropdown__container::-webkit-scrollbar{background-color:var(--ez-dropdown__scrollbar--color-background);width:var(--ez-dropdown__scrollbar--width);max-width:var(--ez-dropdown__scrollbar--width);min-width:var(--ez-dropdown__scrollbar--width)}.ez-dropdown__container::-webkit-scrollbar-track{background-color:var(--ez-dropdown__scrollbar--color-background);border-radius:var(--ez-dropdown__scrollbar--border-radius)}.ez-dropdown__container::-webkit-scrollbar-thumb{background-color:var(--ez-dropdown__scrollbar--color-default);border-radius:var(--ez-dropdown__scrollbar--border-radius)}.ez-dropdown__container::-webkit-scrollbar-thumb:vertical:hover,.ez-dropdown__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-dropdown__scrollbar--color-hover)}.ez-dropdown__container::-webkit-scrollbar-thumb:vertical:active,.ez-dropdown__container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-dropdown__scrollbar--color-clicked)}.ez-dropdown__container--spacer{padding-right:var(--ez-dropdown__scrollbar--padding-right)}.ez-dropdown__item{display:flex;align-items:center;background-color:transparent;border-radius:var(--ez-dropdown__item--border-radius);transition:var(--ez-dropdown__item--transition)}.ez-dropdown__item:hover{background-color:var(--ez-dropdown__item--background-color)}.ez-dropdown__item-wrapper{display:flex;align-items:center;position:relative;cursor:pointer;width:100%;margin:0;white-space:nowrap;gap:var(--ez-dropdown__item--gap);color:var(--ez-dropdown__item--color);font-weight:var(--ez-dropdown__item--font-weight);font-size:var(--ez-dropdown__item--font-size);line-height:var(--ez-dropdown__item--line-height);padding:var(--ez-dropdown__item--padding)}.ez-dropdown__item-wrapper ez-icon{display:flex;justify-content:center;align-items:center;width:var(--ez-dropdown__icon--size);height:var(--ez-dropdown__icon--size);min-width:var(--ez-dropdown__icon--size);min-height:var(--ez-dropdown__icon--size)}.ez-dropdown__item-content{display:flex;align-items:center;flex:auto;overflow:hidden;gap:var(--ez-dropdown__item--gap)}.ez-dropdown__item-label{text-align:left;text-overflow:ellipsis;overflow:hidden;flex:auto}.ez-dropdown__item-label:not(:last-child){margin-right:var(--ez-dropdown__item-label--margin-right)}.ez-dropdown__item-content+.ez-dropdown__link{margin-left:var(--ez-dropdown__item-label--margin-right);margin-right:var(--ez-dropdown__item--padding)}.ez-dropdown__item-builder{flex:auto}.ez-dropdown__divider{width:100%;height:2px;border-radius:1px;border:none;display:block;background-color:var(--ez-dropdown__divider--background-color);margin:var(--ez-dropdown__divider--margin)}.ez-dropdown__hidden{visibility:hidden}.ez-dropdown__group{display:flex;flex-direction:column}.ez-dropdown__group-label{display:block;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ez-dropdown__group-label--color);font-weight:var(--ez-dropdown__group-label--font-weight);font-size:var(--ez-dropdown__group-label--font-size);line-height:var(--ez-dropdown__group-label--line-height);padding:var(--ez-dropdown__group-label--padding)}.ez-dropdown__icon-right{margin-left:auto}.ez-dropdown__submenu{position:fixed;z-index:var(--ez-dropdown__submenu--z-index);margin-top:calc(var(--ez-dropdown__item--padding) * -1)}.ez-dropdown__submenu--hide{display:none}.ez-dropdown__link{display:block;margin-left:auto;cursor:pointer;text-overflow:ellipsis;overflow:hidden;font-weight:var(--ez-dropdown__link--font-weight);max-width:calc(var(--ez-dropdown--max-width) * 0.43)}.ez-dropdown__link--primary{color:var(--ez-dropdown__link--primary--color)}.ez-dropdown__link--critical{color:var(--ez-dropdown__link--critical--color)}.ez-dropdown__link:hover{text-decoration:underline}";export{c as ez_dropdown}
|
|
1
|
+
import{h as o,r,c as e,H as d,g as n}from"./p-e4c7eb39.js";import{ElementIDUtils as i,ObjectUtils as t}from"@sankhyalabs/core";const l=({item:r,hasIcon:e,hasChildren:d,isLockedLevels:n,onSubActionClick:i})=>o("div",{class:"ez-dropdown__item-wrapper",title:r.label},a(r,e),o("span",{class:"ez-dropdown__item-label"},r.label),s(r,d,n,i)),a=(r,e)=>{if(null!=r&&e)return o("ez-icon",r.iconName?Object.assign({class:"ez-dropdown__icon-left",iconName:r.iconName,size:"medium"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.id}_ezDropdownItemIcon`}):{class:"ez-dropdown__icon-left ez-dropdown__hidden",size:"medium"})},s=(r,e,d,n)=>{var t,l;if(null!=r){if(!(null===(t=r.children)||void 0===t?void 0:t.length)&&null!=r.subAction&&Object.keys(r.subAction).length>0)return o("span",Object.assign({onClick:()=>n(r),title:r.subAction.label,class:`ez-dropdown__link ez-dropdown__link--${r.subAction.type||"primary"}`},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.subAction.id}_ezDropdownItemSubAction`}),r.subAction.label);if(!d&&e)return(null===(l=r.children)||void 0===l?void 0:l.length)>0?o("ez-icon",Object.assign({class:"ez-dropdown__icon-right",iconName:"chevron-right",size:"medium"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.id}_ezDropdownIconOpenChildren`})):o("ez-icon",{class:"ez-dropdown__icon-right ez-dropdown__hidden",size:"medium"})}};class p{constructor(){}show(o){const r=null==o?void 0:o.querySelector(".ez-dropdown__submenu");null!=o&&null!=r&&(r.classList.remove("ez-dropdown__submenu--hide"),this.setPosition(o),this.setScrollContainer(o),this.setMaxHeight(r))}hide(o){if(null==o)return;const r=o.querySelector(".ez-dropdown__submenu:not(.ez-dropdown__submenu--hide)");this.reset(r),this.hideChild(r)}hideChild(o){null!=o&&o.querySelectorAll(".ez-dropdown__submenu").forEach((o=>{this.reset(o)}))}setPosition(o){const r=null==o?void 0:o.querySelector(".ez-dropdown__submenu"),e=null==o?void 0:o.closest(".ez-dropdown");if(null==r||null==e)return;r.style.top=this.getPositionTop(o),r.style.left=this.getPositionRight(e);const d=null==r?void 0:r.getBoundingClientRect(),n=document.body.clientWidth;(null==d?void 0:d.right)>n&&this.updatePosition(e,r)}setMaxHeight(o){var r;const e=(null==o?void 0:o.shadowRoot)||o,d=null==e?void 0:e.querySelector(".ez-dropdown"),n=document.body.clientHeight;let i,t;if(null!=(null==e?void 0:e.tagName)?(i=e,t=null==i?void 0:i.getBoundingClientRect()):t=null==d?void 0:d.getBoundingClientRect(),null!=d&&null!=t){if(t.y+t.height>n)if(null!=i){const o=i.closest(".ez-dropdown"),e=null==o?void 0:o.getBoundingClientRect(),l=parseFloat((null===(r=getComputedStyle(i))||void 0===r?void 0:r.marginTop)||"0");if(null==o||null==e)return;e.y+t.height>n?(i.style.top=e.y-l+"px",d.style.maxHeight=n-e.y+"px"):i.style.top=n-t.height-l+"px"}else{let o=n-t.y;o<0&&(o=t.height-n),d.style.maxHeight=o+"px"}this.setSpacerContainer(d)}}setSpacerContainer(o){const r=null==o?void 0:o.querySelector(".ez-dropdown__container");null!=r&&(r.scrollHeight>r.clientHeight?r.classList.add("ez-dropdown__container--spacer"):r.classList.remove("ez-dropdown__container--spacer"))}reset(o){if(null==o)return;o.classList.add("ez-dropdown__submenu--hide"),o.style.left="",o.style.top="";const r=o.querySelector(".ez-dropdown");this.resetDropdown(r)}resetDropdown(o){null!=o&&(o.style.maxHeight="",this.setSpacerContainer(o))}setScrollContainer(o){const r=null==o?void 0:o.closest(".ez-dropdown__container");null!=r&&(r.onscroll=this.onScrollContainer.bind(this))}onScrollContainer(o){this.hideChild(null==o?void 0:o.target)}getPositionTop(o){const r=null==o?void 0:o.getBoundingClientRect();if(null!=r)return r.y+"px"}getPositionRight(o){const r=null==o?void 0:o.getBoundingClientRect();if(null!=r)return r.x+r.width+"px"}getPositionLeft(o,r){const e=null==o?void 0:o.getBoundingClientRect(),d=null==r?void 0:r.getBoundingClientRect();if(null!=e&&null!=d)return e.x-d.width+"px"}updatePosition(o,r){const e=null==o?void 0:o.getBoundingClientRect(),d=null==r?void 0:r.getBoundingClientRect();null!=e&&null!=d&&e.x<d.right&&(r.style.left=this.getPositionLeft(o,r),this.updatePosition(o,r))}}const c=class{constructor(o){r(this,o),this.ezClick=e(this,"ezClick",7),this.ezSubActionClick=e(this,"ezSubActionClick",7),this.ezOutsideClick=e(this,"ezOutsideClick",7),this.ezHover=e(this,"ezHover",7),this._itemList={},this._submenuList=[],this._openedMenuList={},this._levelLimits=3,this.items=[],this.value=void 0,this.itemBuilder=void 0}handleClickOutside(o){this._element.contains(o.target)||this.ezOutsideClick.emit()}defaultItemBuilder(r,e,d,n){return o(l,{item:r,hasIcon:d,hasChildren:n,isLockedLevels:e,onSubActionClick:this.onSubActionClick.bind(this)})}getMaxOrder(o){return null==o||0===o.length?-1:Math.max(...o.map((o=>{var r;const e=null===(r=o.group)||void 0===r?void 0:r.order;return null!=e&&e>=0?e:-1})))}hasIcon(o){return null==o?void 0:o.some((o=>""!==(o.iconName||"")))}hasGroup(o){return null==o?void 0:o.some((o=>""!==(o.group||"")))}hasChildren(o){return null==o?void 0:o.some((o=>(o.children||[]).length>0))}isLockedLevels(o){return!!this._levelLimits&&o===this._levelLimits+1}getItemsByGroup(o,r){let e={};const d=this.getMaxOrder(o);return o.forEach((o=>{const n=o.group&&null!=o.group.label?o.group.label||"noGroup":o.group||"noGroup";let i=e[n];null==i&&(i={items:[],order:o.group&&null!=o.group.order?o.group.order:o.group?d+1:d+2}),this.validateItem(o,r),i.items.push(o),e[n]=i})),t.sortByProperty(e,"order")}validateItem(o,r){if(null==this._itemList&&(this._itemList={}),null==o.type&&(o.type="item"),null==o.id){const e=`level_${r}_${o.type}`,d=Object.keys(this._itemList).filter((o=>o.includes(e))).length;o.id=`${e}_${d+1}`}null==o.label&&(o.label=""),null!=o.subAction&&(null==o.subAction.id&&(o.subAction.id=`subAction_${o.id}`),null==o.subAction.label&&(o.subAction.label="")),null==this._itemList[o.id]&&(this._itemList[o.id]={})}getContainerItemBuilder(r,e,d,n,i){if(null==this.itemBuilder)return;const t=this.itemBuilder(r,e);return null==t?this.defaultItemBuilder(r,d,n,i):"string"!=typeof t?o("div",{class:"ez-dropdown__item-builder"},t):o("div",{class:"ez-dropdown__item-builder",innerHTML:t})}getItemsRender(r,e,d,n){if(null==r)return;let t=e,l=!1;return n&&(t++,l=this.isLockedLevels(t)),r.map((r=>{var a;switch(r.type){case"loading":return o("div",{class:"ez-dropdown__item"},o("ez-skeleton",{width:"200px"}));case"divider":return o("hr",Object.assign({class:"ez-dropdown__divider"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:i.getInternalIDInfo(`${r.id}_ezDropdownDivider`)}));default:return o("div",Object.assign({ref:o=>this._itemList[r.id]=o,class:"ez-dropdown__item","data-level":e},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:i.getInternalIDInfo(`${r.id}_ezDropdownItem`)}),o("div",{class:"ez-dropdown__item-content",onClick:o=>this.onItemClick(o,r),onMouseOver:o=>this.onShowSubmenu(o,r),onMouseEnter:()=>this.ezHover.emit(r)},this.itemBuilder?this.getContainerItemBuilder(r,e,l,d,n):this.defaultItemBuilder(r,l,d,n)),(null===(a=r.children)||void 0===a?void 0:a.length)>0&&!l&&n&&o("div",{ref:o=>this._submenuList.push(o),class:"ez-dropdown__submenu ez-dropdown__submenu--hide"},this.renderDropdown(r.children,t)))}}))}renderDropdown(r=this.items,e=1){if(null==r||this.isLockedLevels(e))return;const d=this.getItemsByGroup(r,e),n=this.hasGroup(r),t=this.hasIcon(r),l=this.hasChildren(r);return o("div",{class:"ez-dropdown ez-dropdown__max-height","data-level":e},o("div",{class:"ez-dropdown__container"},Object.keys(d).map((r=>o("div",Object.assign({class:"ez-dropdown__group"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:i.getInternalIDInfo(`${r}_ezDropdownGroup`)}),"noGroup"!==r&&o("label",{class:"ez-dropdown__group-label",title:r},r),n&&"noGroup"===r&&o("hr",Object.assign({class:"ez-dropdown__divider"},{[i.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:i.getInternalIDInfo(`${r}_ezDropdownDivider`)})),this.getItemsRender(d[r].items,e,t,l))))))}hasOpenedSubmenu(o){const r=Object.keys(this._openedMenuList);return r.includes(o.toString())||r.some((r=>Number(r)>o))}hasSubmenuOpened(){var o;return null===(o=this._submenuList)||void 0===o?void 0:o.some((o=>!o.classList.contains("ez-dropdown__submenu--hide")))}setEvents(){document.removeEventListener("click",this.onHideAllSubmenu.bind(this)),document.addEventListener("click",this.onHideAllSubmenu.bind(this)),document.removeEventListener("scroll",this.onSubmenuReposition.bind(this)),document.addEventListener("scroll",this.onSubmenuReposition.bind(this))}onShowSubmenu(o,r){var e;if(null==o)return;const d=this._itemList[r.id];if(!(null==d?void 0:d.classList.contains("ez-dropdown__item")))return;const n=Number(d.dataset.level||"0");this.hasOpenedSubmenu(n)&&(this._submenuControl.hide(this._openedMenuList[n]),delete this._openedMenuList[n]),(null===(e=r.children)||void 0===e?void 0:e.length)&&(this._openedMenuList[d.dataset.level]=d,this._submenuControl.show(d))}onItemClick(o,r){const e=null==o?void 0:o.target;(null==e?void 0:e.classList.contains("ez-dropdown__link"))||(this.value=r,this.ezClick.emit(r))}onSubActionClick(o){this.ezSubActionClick.emit(o.subAction)}onHideAllSubmenu(o){const r=null==o?void 0:o.target;this.hasSubmenuOpened()&&(null==r||!r.closest(".ez-dropdown")&&"EZ-DROPDOWN"!==r.tagName)&&(this._openedMenuList={},this._submenuList.forEach(this._submenuControl.reset.bind(this._submenuControl)))}onSubmenuReposition(){null!=this._openedMenuList&&Object.keys(this._openedMenuList).forEach((o=>{this._submenuControl.setPosition(this._openedMenuList[o])}))}componentDidLoad(){i.addIDInfo(this._element),this._submenuControl=new p,this._submenuControl.setMaxHeight(this._element)}componentDidUpdate(){this._submenuControl.setMaxHeight(this._element)}componentDidRender(){this.setEvents()}render(){return o(d,null,this.renderDropdown())}get _element(){return n(this)}};c.style=":host{--ez-dropdown--z-index:var(--more-visible, 2);--ez-dropdown--padding:var(--space--small, 6px);--ez-dropdown--box-shadow:var(--shadow--medium, 0px 8px 24px rgba(0, 38, 111, 0.1));--ez-dropdown--border-radius:var(--border--radius-medium, 12px);--ez-dropdown--background-color:var(--background--xlight, #fff);--ez-dropdown--font-family:var(--font-pattern, 'Roboto');--ez-dropdown--max-height:415px;--ez-dropdown__item--padding:var(--space--small, 6px);--ez-dropdown__item--gap:var(--space--small, 6px);--ez-dropdown__item--border-radius:var(--border--radius-small, 6px);--ez-dropdown__item--color:var(--title--primary, #2b3a54);--ez-dropdown__item--font-weight:var(--text-weight--medium, 400);--ez-dropdown__item--font-size:var(--text--medium, 14px);--ez-dropdown__item--line-height:calc(var(--ez-dropdown__item--font-size) + 4px);--ez-dropdown__item--background-color:var(--background--medium, #f0f3f7);--ez-dropdown__item--transition:var(--transition, .2s linear);--ez-dropdown__item-label--margin-right:var(--space--medium, 12px);--ez-dropdown__icon--size:var(--icon--medium, 18px);--ez-dropdown__divider--background-color:var(--color--disable-secondary, #f2f5f8);--ez-dropdown__divider--margin:var(--space--extra-small, 3px) 0;--ez-dropdown__group-label--color:var(--text--secondary, #A2ABB9);--ez-dropdown__group-label--font-weight:var(--text-weight--large, 600);--ez-dropdown__group-label--font-size:var(--text--small, 12px);--ez-dropdown__group-label--line-height:var(--text--medium, 14px);--ez-dropdown__group-label--padding:var(--space--small, 6px);--ez-dropdown__submenu--z-index:var(--most-visible, 3);--ez-dropdown__link--font-weight:var(--text-weight--large, 600);--ez-dropdown__link--primary--color:var(--color--primary, #008561);--ez-dropdown__link--critical--color:var(--color-alert--error-800, #BD0025);--ez-dropdown__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-dropdown__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-dropdown__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-dropdown__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-dropdown__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-dropdown__scrollbar--width:var(--space--small, 6px);--ez-dropdown__scrollbar--padding-right:var(--space--extra-small, 3px);display:flex;flex-direction:column;height:fit-content;user-select:none;box-sizing:border-box;position:fixed;z-index:var(--ez-dropdown--z-index)}:host *{box-sizing:border-box}.ez-dropdown{display:flex;padding:var(--ez-dropdown--padding);box-shadow:var(--ez-dropdown--box-shadow);border-radius:var(--ez-dropdown--border-radius);background-color:var(--ez-dropdown--background-color);max-width:var(--ez-dropdown--max-width)}.ez-dropdown__max-height{max-height:var(--ez-dropdown--max-height)}.ez-dropdown *{font-family:var(--ez-dropdown--font-family)}.ez-dropdown__container{display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;flex:auto;scrollbar-color:var(--ez-dropdown__scrollbar--color-clicked) var(--ez-dropdown__scrollbar--color-background)}.ez-dropdown__container::-webkit-scrollbar{background-color:var(--ez-dropdown__scrollbar--color-background);width:var(--ez-dropdown__scrollbar--width);max-width:var(--ez-dropdown__scrollbar--width);min-width:var(--ez-dropdown__scrollbar--width)}.ez-dropdown__container::-webkit-scrollbar-track{background-color:var(--ez-dropdown__scrollbar--color-background);border-radius:var(--ez-dropdown__scrollbar--border-radius)}.ez-dropdown__container::-webkit-scrollbar-thumb{background-color:var(--ez-dropdown__scrollbar--color-default);border-radius:var(--ez-dropdown__scrollbar--border-radius)}.ez-dropdown__container::-webkit-scrollbar-thumb:vertical:hover,.ez-dropdown__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-dropdown__scrollbar--color-hover)}.ez-dropdown__container::-webkit-scrollbar-thumb:vertical:active,.ez-dropdown__container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-dropdown__scrollbar--color-clicked)}.ez-dropdown__container--spacer{padding-right:var(--ez-dropdown__scrollbar--padding-right)}.ez-dropdown__item{display:flex;align-items:center;background-color:transparent;border-radius:var(--ez-dropdown__item--border-radius);transition:var(--ez-dropdown__item--transition)}.ez-dropdown__item:hover{background-color:var(--ez-dropdown__item--background-color)}.ez-dropdown__item-wrapper{display:flex;align-items:center;position:relative;cursor:pointer;width:100%;margin:0;white-space:nowrap;gap:var(--ez-dropdown__item--gap);color:var(--ez-dropdown__item--color);font-weight:var(--ez-dropdown__item--font-weight);font-size:var(--ez-dropdown__item--font-size);line-height:var(--ez-dropdown__item--line-height);padding:var(--ez-dropdown__item--padding)}.ez-dropdown__item-wrapper ez-icon{display:flex;justify-content:center;align-items:center;width:var(--ez-dropdown__icon--size);height:var(--ez-dropdown__icon--size);min-width:var(--ez-dropdown__icon--size);min-height:var(--ez-dropdown__icon--size)}.ez-dropdown__item-content{display:flex;align-items:center;flex:auto;overflow:hidden;gap:var(--ez-dropdown__item--gap)}.ez-dropdown__item-label{text-align:left;text-overflow:ellipsis;overflow:hidden;flex:auto}.ez-dropdown__item-label:not(:last-child){margin-right:var(--ez-dropdown__item-label--margin-right)}.ez-dropdown__item-content+.ez-dropdown__link{margin-left:var(--ez-dropdown__item-label--margin-right);margin-right:var(--ez-dropdown__item--padding)}.ez-dropdown__item-builder{flex:auto}.ez-dropdown__divider{width:100%;height:2px;border-radius:1px;border:none;display:block;background-color:var(--ez-dropdown__divider--background-color);margin:var(--ez-dropdown__divider--margin)}.ez-dropdown__hidden{visibility:hidden}.ez-dropdown__group{display:flex;flex-direction:column}.ez-dropdown__group-label{display:block;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ez-dropdown__group-label--color);font-weight:var(--ez-dropdown__group-label--font-weight);font-size:var(--ez-dropdown__group-label--font-size);line-height:var(--ez-dropdown__group-label--line-height);padding:var(--ez-dropdown__group-label--padding)}.ez-dropdown__icon-right{margin-left:auto}.ez-dropdown__submenu{position:fixed;z-index:var(--ez-dropdown__submenu--z-index);margin-top:calc(var(--ez-dropdown__item--padding) * -1)}.ez-dropdown__submenu--hide{display:none}.ez-dropdown__link{display:block;margin-left:auto;cursor:pointer;text-overflow:ellipsis;overflow:hidden;font-weight:var(--ez-dropdown__link--font-weight);max-width:calc(var(--ez-dropdown--max-width) * 0.43)}.ez-dropdown__link--primary{color:var(--ez-dropdown__link--primary--color)}.ez-dropdown__link--critical{color:var(--ez-dropdown__link--critical--color)}.ez-dropdown__link:hover{text-decoration:underline}";export{c as ez_dropdown}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,g as e}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,g as e}from"./p-e4c7eb39.js";import{NumberUtils as h,StringUtils as r,ElementIDUtils as n}from"@sankhyalabs/core";import{C as a}from"./p-ec7db713.js";import{i as o}from"./p-a61fdd20.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._focused=!1,this._changePending=!1,this._valuePromiseCallbacks=[],this._value=void 0,this.label=void 0,this.value=void 0,this.enabled=!0,this.canShowError=!0,this.errorMessage=void 0,this.allowNegative=!0,this.precision=void 0,this.prettyPrecision=void 0,this.mode="regular",this.autoFocus=!1,this.alternativePlaceholder=void 0}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){this._textInput&&t!=i&&this.handleNewValue(t,i),this._changePending=!1}observePrecision(){this._textInput&&this.setInputValue()}handleNewValue(t,i){const s=this.validateValue(t),e=this.validateValue(i);if(null===s&&(this._value=""),s===e)return;const h=this.getTextValue(s)||"",r=this.getParsedNumber(h);(this._value||"")===h||void 0===r&&this._focused||(this._value=h,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===s?void 0:s)}validateValue(t){return isNaN(t)||void 0===t?null:t}getTextValue(t){if(null==t)return;let i=this.precision>=0?h.format(t.toString(),Number(this.precision),Number(this.prettyPrecision)):t.toString();return 0===this.precision?r.replaceAll(i,".",""):i}changeValue(t){this.errorMessage="",this.value!=t?this.value=void 0===t?null:t:(this.setInputValue(),this.ezCancelWaitingChange.emit())}setError(t){this.value=null,this.errorMessage=t,this.ezCancelWaitingChange.emit()}handleBlur(){if(this._changePending)try{const t=this.getParsedNumber();if(void 0!==t&&isNaN(t))this.setError(this.i18n("ez-number-input.invalidNumber"));else try{this.changeValue(t)}catch(t){return void this.setError(t.message)}}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}handleInput(){this.getParsedNumber()!==this.value&&(this._focused=!0,this._changePending=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1}))}getParsedNumber(t=this._textInput.value){return(null==t?void 0:t.trim())?h.stringToNumber(t):void 0}setInputValue(){const t=this.getTextValue(this.value)||"";(this._value||"")!==t&&(this._value=t,this._textInput.value=this._value)}async componentWillLoad(){this.i18n=await o()}componentDidLoad(){a.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){n.addIDInfoIfNotExists(this._elem,"input");let t=this.precision>0?"0123456789,.":"0123456789";return this.allowNegative&&(t+="-"),s("ez-text-input",{class:"number__input","data-element-id":n.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),restrict:t,enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError,value:this._value,alternativePlaceholder:this.alternativePlaceholder})}get _elem(){return e(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"],precision:["observePrecision"],prettyPrecision:["observePrecision"]}}};l.style=":host{--ez-number-input__min-width:0px;--ez-number-input__max-width:100%;display:block;width:100%}.number__input{height:100%;min-width:var(--ez-number-input__min-width);max-width:var(--ez-number-input__max-width)}";export{l as ez_number_input}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as d,h as i,H as o,g as l}from"./p-
|
|
1
|
+
import{r as t,c as d,h as i,H as o,g as l}from"./p-e4c7eb39.js";import{FloatingManager as e,KeyboardManager as a}from"@sankhyalabs/core";import{i as n}from"./p-a61fdd20.js";const s=class{constructor(i){t(this,i),this.ezCloseModal=d(this,"ezCloseModal",7),this.ezOpenModal=d(this,"ezOpenModal",7),this.ezModalAction=d(this,"ezModalAction",7),this.modalSize=void 0,this.align=void 0,this.heightMode="regular",this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.closeOutsideLeave=!1,this.scrim="medium"}observeOpened(){this.opened?this._overlayId=e.subscribeOverlayControl(this._modalRef):e.unsubscribeOverlayControl(this._modalRef||this._overlayId)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}async componentWillLoad(){this.i18n=await n()}componentDidLoad(){this.observeOpened(),this._keyboardManager=new a({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezModalAction.emit.bind("OK")).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}componentDidRender(){this.modalFocus()}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}modalFocus(){this.opened&&requestAnimationFrame((()=>{const t=this._element.shadowRoot.querySelector("ez-modal-container");this._modalRef&&null===t&&this._modalRef.focus()}))}onMouseDownHandler(t){this.closeOutsideClick&&t.target===this._overlay&&this.closeModal()}onMouseLeaveHandler(){this.closeOutsideLeave&&this.closeModal()}render(){const t="left"===this.align?"left":"right",d="regular"===this.heightMode?`modal__content--${t}`:"";return i(o,null,this.opened?i("div",{ref:t=>this._modalRef=t,class:`modal modal__screen-${this.scrim} ${"regular"===this.heightMode?"modal__vertical-padding":""}`,onMouseDown:t=>this.onMouseDownHandler(t),tabIndex:-1,"aria-label":this.i18n("ez-modal.close")},i("div",{class:`modal__container modal__container--${t}`,ref:t=>this._overlay=t},i("div",{onMouseLeave:()=>this.onMouseLeaveHandler(),class:`modal__content ${d} ${this.modalSize}`},i("slot",null)))):void 0)}get _element(){return l(this)}static get watchers(){return{opened:["observeOpened"]}}};s.style=":host{--ez-modal-z-index:var(--elevation--22, 22);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;outline:none}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-none{background:none}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";export{s as ez_modal}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i}from"./p-
|
|
1
|
+
import{r as t,h as e,H as i}from"./p-e4c7eb39.js";import"./p-baec56c9.js";import{C as s}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"@sankhyalabs/core";import{i as a}from"./p-a61fdd20.js";import"./p-30ffb9ed.js";const l=class{constructor(e){t(this,e),this.label=void 0,this.enableExpand=!0,this._expanded=!1,this.size=void 0,this.structural=!1}toggleExpandItem(){var t,e;this._expanded=!this._expanded,null===(e=null===(t=this.expandButtonRef.shadowRoot)||void 0===t?void 0:t.querySelector("button"))||void 0===e||e.blur()}async componentWillLoad(){this.i18n=await a()}componentDidLoad(){s.applyVarsGrid(this._element,this._slot.children[0])}render(){return e(i,{class:`box_split-item ${this._expanded?"expanded__item":""} ${this.structural?"structural__item":"content__item"}`,ref:t=>this._element=t},e("div",{class:"ez-split-item--header"},e("slot",{name:"leftButtons"}),e("div",{class:"ez-split-item--header-title"},this.label&&e("h3",{class:"ez-text ez-text--primary ez-title ez-title--medium ez-margin--small",title:this.label},this.label)),e("div",{class:"ez-split-item--header-buttons"},e("slot",{name:"rightButtons"}),this.enableExpand&&e("ez-button",{ref:t=>this.expandButtonRef=t,size:"small",mode:"icon",iconName:"expand",class:"ez-button--tertiary",onClick:()=>this.toggleExpandItem(),title:this.i18n(this._expanded?"app.collapse":"app.expand")}))),e("div",{class:"ez-split-item--content grid_height-0",ref:t=>this._slot=t},e("slot",null)))}};l.style=".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow--xsmall);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center;max-height:20px}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}.structural__item{background:none;box-shadow:none;padding:0;margin:0;border:0}.content__item{margin:var(--space--extra-small);width:calc(100% - 2*(var(--space--extra-small)));height:calc(100% - 2*(var(--space--extra-small)))}";export{l as ez_split_item}
|
|
Binary file
|
|
Binary file
|