@acorex/components 7.5.0 → 7.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-sheet/index.d.ts +1 -1
- package/action-sheet/lib/action-sheet.component.d.ts +3 -3
- package/avatar/index.d.ts +1 -1
- package/badge/lib/badge.component.d.ts +3 -3
- package/breadcrumbs/index.d.ts +2 -2
- package/breadcrumbs/lib/breadcrumbs-item.component.d.ts +1 -1
- package/button/lib/button-item.class.d.ts +1 -1
- package/button/lib/button-item.component.d.ts +3 -1
- package/button/lib/button.component.d.ts +1 -1
- package/calendar/lib/calendar.class.d.ts +1 -1
- package/calendar/lib/calendar.component.d.ts +6 -4
- package/chips/lib/chips.component.d.ts +1 -1
- package/collapse/lib/collapse-group.component.d.ts +9 -6
- package/collapse/lib/collapse.component.d.ts +21 -8
- package/collapse/lib/collapse.module.d.ts +2 -1
- package/color-box/lib/color-box.component.d.ts +2 -2
- package/color-palette/lib/color-palette-input.component.d.ts +3 -3
- package/color-palette/lib/color-palette-picker.component.d.ts +1 -1
- package/color-palette/lib/color-palette.class.d.ts +4 -4
- package/common/index.d.ts +1 -1
- package/common/lib/classes/datasource.class.d.ts +55 -0
- package/common/lib/classes/styles.class.d.ts +2 -3
- package/common/lib/components/colorlook-component.class.d.ts +2 -2
- package/common/lib/components/input-base-value-component.class.d.ts +12 -12
- package/common/lib/components/interactive-component.class.d.ts +1 -7
- package/common/lib/components/selection-base.component.class.d.ts +5 -6
- package/common/lib/directives/delayed-value-changed.directive.d.ts +5 -5
- package/common/lib/directives/hotkey.directive.d.ts +2 -2
- package/common/lib/directives/responsive.directive.d.ts +1 -1
- package/common/lib/directives/ripple.directive.d.ts +2 -1
- package/data-table/lib/data-table.component.d.ts +2 -2
- package/datetime-box/lib/datetime-box.component.d.ts +4 -3
- package/datetime-input/lib/datetime-input.component.d.ts +2 -1
- package/datetime-picker/index.d.ts +1 -1
- package/datetime-picker/lib/datetime-picker.component.d.ts +1 -2
- package/dropdown/lib/dropdown-box.component.d.ts +5 -3
- package/dropdown/lib/dropdown-panel.component.d.ts +1 -0
- package/esm2022/action-sheet/index.mjs +2 -2
- package/esm2022/action-sheet/lib/action-sheet.class.mjs +1 -1
- package/esm2022/action-sheet/lib/action-sheet.component.mjs +22 -14
- package/esm2022/action-sheet/lib/action-sheet.module.mjs +3 -3
- package/esm2022/action-sheet/lib/action-sheet.service.mjs +5 -5
- package/esm2022/alert/lib/alert.component.mjs +4 -5
- package/esm2022/avatar/index.mjs +2 -2
- package/esm2022/avatar/lib/avatar-group.component.mjs +1 -1
- package/esm2022/avatar/lib/avatar.component.mjs +4 -4
- package/esm2022/badge/lib/badge.component.mjs +6 -6
- package/esm2022/badge/lib/badge.module.mjs +2 -2
- package/esm2022/breadcrumbs/index.mjs +3 -3
- package/esm2022/breadcrumbs/lib/breadcrumbs-item.class.mjs +1 -1
- package/esm2022/breadcrumbs/lib/breadcrumbs-item.component.mjs +2 -2
- package/esm2022/breadcrumbs/lib/breadcrumbs.component.mjs +1 -1
- package/esm2022/breadcrumbs/lib/breadcrumbs.module.mjs +3 -3
- package/esm2022/button/lib/button-item.class.mjs +1 -1
- package/esm2022/button/lib/button-item.component.mjs +12 -3
- package/esm2022/button/lib/button.component.mjs +3 -3
- package/esm2022/button-group/lib/button-group.component.mjs +3 -3
- package/esm2022/button-group/lib/button-group.module.mjs +2 -2
- package/esm2022/calendar/lib/calendar-range.component.mjs +4 -7
- package/esm2022/calendar/lib/calendar.class.mjs +3 -68
- package/esm2022/calendar/lib/calendar.component.mjs +53 -43
- package/esm2022/calendar/lib/calendar.module.mjs +4 -4
- package/esm2022/check-box/lib/check-box.component.mjs +9 -9
- package/esm2022/check-box/lib/check-box.module.mjs +3 -3
- package/esm2022/chips/lib/chips.component.mjs +6 -6
- package/esm2022/chips/lib/chips.module.mjs +2 -2
- package/esm2022/collapse/lib/collapse-group.component.mjs +23 -14
- package/esm2022/collapse/lib/collapse.component.mjs +68 -20
- package/esm2022/collapse/lib/collapse.module.mjs +7 -6
- package/esm2022/color-box/lib/color-box.component.mjs +7 -7
- package/esm2022/color-box/lib/color-box.module.mjs +4 -4
- package/esm2022/color-palette/lib/color-palette-input.component.mjs +10 -14
- package/esm2022/color-palette/lib/color-palette-picker.component.mjs +29 -31
- package/esm2022/color-palette/lib/color-palette-preview.component.mjs +8 -16
- package/esm2022/color-palette/lib/color-palette-swatches.component.mjs +5 -5
- package/esm2022/color-palette/lib/color-palette.class.mjs +2 -2
- package/esm2022/color-palette/lib/color-palette.component.mjs +14 -6
- package/esm2022/color-palette/lib/color-palette.module.mjs +12 -12
- package/esm2022/common/index.mjs +2 -2
- package/esm2022/common/lib/classes/components.class.mjs +1 -1
- package/esm2022/common/lib/classes/datalist.class.mjs +1 -53
- package/esm2022/common/lib/classes/datasource.class.mjs +106 -0
- package/esm2022/common/lib/classes/styles.class.mjs +2 -10
- package/esm2022/common/lib/common.module.mjs +4 -2
- package/esm2022/common/lib/components/button-base-component.class.mjs +4 -4
- package/esm2022/common/lib/components/color-component.class.mjs +2 -2
- package/esm2022/common/lib/components/colorlook-component.class.mjs +4 -4
- package/esm2022/common/lib/components/input-base-value-component.class.mjs +15 -15
- package/esm2022/common/lib/components/interactive-component.class.mjs +13 -13
- package/esm2022/common/lib/components/look-component.class.mjs +2 -2
- package/esm2022/common/lib/components/selection-base.component.class.mjs +63 -29
- package/esm2022/common/lib/components/value-component.class.mjs +3 -3
- package/esm2022/common/lib/directives/auto-focus.directive.mjs +4 -12
- package/esm2022/common/lib/directives/delayed-value-changed.directive.mjs +16 -14
- package/esm2022/common/lib/directives/hotkey.directive.mjs +14 -15
- package/esm2022/common/lib/directives/infinite-scroll.directive.mjs +7 -9
- package/esm2022/common/lib/directives/responsive.directive.mjs +12 -10
- package/esm2022/common/lib/directives/ripple.directive.mjs +14 -8
- package/esm2022/common/lib/services/dom.service.mjs +2 -2
- package/esm2022/common/lib/services/hotkey.service.mjs +4 -5
- package/esm2022/common/lib/types/direction.mjs +1 -1
- package/esm2022/common/lib/types/orientation.mjs +1 -1
- package/esm2022/common/lib/types/placement.mjs +23 -23
- package/esm2022/common/lib/types/range.mjs +1 -1
- package/esm2022/data-pager/lib/data-pager-info.component.mjs +3 -3
- package/esm2022/data-pager/lib/data-pager-input-selector.component.mjs +1 -1
- package/esm2022/data-pager/lib/data-pager-next-buttons.components.mjs +21 -8
- package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +3 -3
- package/esm2022/data-pager/lib/data-pager-pagesize-dropdown.component.mjs +17 -5
- package/esm2022/data-pager/lib/data-pager-prev-buttons.component.mjs +19 -7
- package/esm2022/data-pager/lib/data-pager.component.mjs +2 -2
- package/esm2022/data-pager/lib/data-pager.module.mjs +30 -16
- package/esm2022/data-table/lib/data-column.directive.mjs +2 -2
- package/esm2022/data-table/lib/data-table.component.mjs +2 -2
- package/esm2022/data-table/lib/data-table.module.mjs +7 -7
- package/esm2022/datetime-box/lib/datetime-box.component.mjs +10 -7
- package/esm2022/datetime-box/lib/datetime-box.module.mjs +7 -7
- package/esm2022/datetime-input/lib/datetime-input.component.mjs +144 -137
- package/esm2022/datetime-input/lib/datetime-input.module.mjs +4 -4
- package/esm2022/datetime-picker/index.mjs +2 -2
- package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +4 -4
- package/esm2022/datetime-picker/lib/datetime-picker.config.mjs +4 -4
- package/esm2022/decorators/lib/components/clear-button.component.mjs +2 -2
- package/esm2022/decorators/lib/components/close-button.component.mjs +8 -4
- package/esm2022/decorators/lib/components/generic-content.component.mjs +1 -1
- package/esm2022/decorators/lib/components/icon.component.mjs +2 -2
- package/esm2022/dialog/lib/dialog.component.mjs +3 -3
- package/esm2022/dialog/lib/dialog.module.mjs +26 -10
- package/esm2022/drawer/lib/drawer-container.component.mjs +2 -2
- package/esm2022/drawer/lib/drawer.component.mjs +2 -2
- package/esm2022/drawer/lib/drawer.module.mjs +3 -3
- package/esm2022/dropdown/lib/dropdown-box.class.mjs +1 -1
- package/esm2022/dropdown/lib/dropdown-box.component.mjs +14 -11
- package/esm2022/dropdown/lib/dropdown-panel.component.mjs +5 -4
- package/esm2022/dropdown/lib/dropdown.module.mjs +29 -9
- package/esm2022/form/index.mjs +2 -2
- package/esm2022/form/lib/form-field.component.mjs +4 -4
- package/esm2022/form/lib/form.component.mjs +3 -4
- package/esm2022/form/lib/form.config.mjs +6 -6
- package/esm2022/form/lib/form.module.mjs +3 -11
- package/esm2022/form/lib/validation-summary.component.mjs +40 -30
- package/esm2022/form/lib/validation.class.mjs +1 -1
- package/esm2022/image/lib/image.component.mjs +1 -1
- package/esm2022/image/lib/image.module.mjs +2 -2
- package/esm2022/label/lib/label.component.mjs +4 -8
- package/esm2022/label/lib/label.module.mjs +2 -2
- package/esm2022/list/lib/list.component.mjs +77 -80
- package/esm2022/list/lib/list.module.mjs +3 -3
- package/esm2022/loading/index.mjs +2 -2
- package/esm2022/loading/lib/loading-spinner.component.mjs +13 -7
- package/esm2022/loading/lib/loading.component.mjs +8 -16
- package/esm2022/loading/lib/loading.config.mjs +2 -2
- package/esm2022/loading/lib/loading.directive.mjs +2 -2
- package/esm2022/menu/index.mjs +1 -2
- package/esm2022/menu/lib/class/root-menu.class.mjs +1 -1
- package/esm2022/menu/lib/menu-item/menu-item.component.mjs +60 -19
- package/esm2022/menu/lib/menu.component.mjs +37 -342
- package/esm2022/menu/lib/menu.module.mjs +3 -4
- package/esm2022/mixin/lib/base-components.class.mjs +2 -3
- package/esm2022/mixin/lib/base-menu-mixin.class.mjs +1 -1
- package/esm2022/mixin/lib/button-mixin.class.mjs +1 -1
- package/esm2022/mixin/lib/clickable-mixin.class.mjs +8 -8
- package/esm2022/mixin/lib/color-look-mixing.class.mjs +3 -3
- package/esm2022/mixin/lib/constratctor.mjs +1 -1
- package/esm2022/mixin/lib/datalist-component.class.mjs +3 -5
- package/esm2022/mixin/lib/datalist.class.mjs +5 -6
- package/esm2022/mixin/lib/dropdown-mixin.class.mjs +2 -4
- package/esm2022/mixin/lib/interactive-mixin.class.mjs +29 -28
- package/esm2022/mixin/lib/mixin.class.mjs +13 -13
- package/esm2022/mixin/lib/page-component.class.mjs +3 -3
- package/esm2022/mixin/lib/selection-component.class.mjs +1 -1
- package/esm2022/mixin/lib/textbox-mixin.class.mjs +29 -20
- package/esm2022/mixin/lib/value-mixin.class.mjs +1 -1
- package/esm2022/notification/index.mjs +2 -2
- package/esm2022/notification/lib/notification.class.mjs +1 -1
- package/esm2022/notification/lib/notification.component.mjs +2 -2
- package/esm2022/notification/lib/notification.config.mjs +1 -1
- package/esm2022/notification/lib/notification.module.mjs +21 -9
- package/esm2022/notification/lib/notification.service.mjs +11 -11
- package/esm2022/number-box/lib/number-box.component.mjs +6 -6
- package/esm2022/number-box/lib/number-box.module.mjs +6 -16
- package/esm2022/otp/lib/otp.component.mjs +6 -5
- package/esm2022/otp/lib/otp.module.mjs +5 -4
- package/esm2022/page/lib/base-page.class.mjs +6 -4
- package/esm2022/page/lib/page.component.mjs +3 -3
- package/esm2022/page/lib/page.module.mjs +1 -1
- package/esm2022/password-box/lib/password-box.component.mjs +6 -6
- package/esm2022/password-box/lib/password-box.module.mjs +7 -15
- package/esm2022/picker/lib/picker-column.directive.mjs +9 -16
- package/esm2022/picker/lib/picker.component.mjs +2 -2
- package/esm2022/picker/lib/picker.module.mjs +3 -3
- package/esm2022/popover/lib/popover.component.mjs +1 -1
- package/esm2022/popover/lib/popover.module.mjs +2 -2
- package/esm2022/popup/index.mjs +2 -2
- package/esm2022/popup/lib/popup.interface.mjs +1 -1
- package/esm2022/popup/lib/popup.module.mjs +2 -2
- package/esm2022/progress-bar/lib/progress-bar.component.mjs +5 -5
- package/esm2022/progress-bar/lib/progress-bar.module.mjs +2 -2
- package/esm2022/radio/lib/radio.component.mjs +8 -8
- package/esm2022/radio/lib/radio.module.mjs +2 -2
- package/esm2022/range-slider/lib/range-slider.component.mjs +9 -9
- package/esm2022/range-slider/lib/range-slider.module.mjs +4 -4
- package/esm2022/result/lib/result.component.mjs +4 -4
- package/esm2022/result/lib/result.module.mjs +2 -2
- package/esm2022/routing-progress/acorex-components-routing-progress.mjs +5 -0
- package/esm2022/routing-progress/index.mjs +3 -0
- package/esm2022/routing-progress/lib/routing-progress.component.mjs +58 -0
- package/esm2022/routing-progress/lib/routing-progress.module.mjs +21 -0
- package/esm2022/scheduler/lib/scheduler-month-view.component.mjs +4 -2
- package/esm2022/scheduler/lib/scheduler.component.mjs +1 -1
- package/esm2022/search-box/lib/search-box.component.mjs +45 -20
- package/esm2022/search-box/lib/search-box.module.mjs +8 -8
- package/esm2022/select-box/index.mjs +2 -2
- package/esm2022/select-box/lib/select-box.component.mjs +168 -308
- package/esm2022/select-box/lib/select-box.module.mjs +12 -13
- package/esm2022/selection-list/lib/selection-list.component.mjs +20 -10
- package/esm2022/selection-list/lib/selection-list.module.mjs +6 -6
- package/esm2022/side-menu/acorex-components-side-menu.mjs +5 -0
- package/esm2022/side-menu/index.mjs +4 -0
- package/esm2022/side-menu/lib/side-menu-item/side-menu-item.compoent.mjs +116 -0
- package/esm2022/side-menu/lib/side-menu.component.mjs +15 -0
- package/esm2022/side-menu/lib/side-menu.module.mjs +23 -0
- package/esm2022/skeleton/acorex-components-skeleton.mjs +5 -0
- package/esm2022/skeleton/index.mjs +3 -0
- package/esm2022/skeleton/lib/skeleton.component.mjs +24 -0
- package/esm2022/skeleton/lib/skeleton.module.mjs +18 -0
- package/esm2022/switch/lib/switch-content.component.mjs +1 -1
- package/esm2022/switch/lib/switch.component.mjs +11 -18
- package/esm2022/switch/lib/switch.module.mjs +4 -4
- package/esm2022/tabs/lib/tab-content.directive.mjs +1 -1
- package/esm2022/tabs/lib/tab-item.component.mjs +9 -2
- package/esm2022/tabs/lib/tabs.component.mjs +2 -2
- package/esm2022/tabs/lib/tabs.module.mjs +5 -5
- package/esm2022/tag/lib/tag.component.mjs +7 -13
- package/esm2022/tag/lib/tag.module.mjs +2 -2
- package/esm2022/text-area/lib/text-area.component.mjs +14 -16
- package/esm2022/text-area/lib/text-area.module.mjs +2 -2
- package/esm2022/text-box/lib/text-box.component.mjs +6 -6
- package/esm2022/text-box/lib/text-box.module.mjs +4 -18
- package/esm2022/toast/index.mjs +2 -2
- package/esm2022/toast/lib/toast.class.mjs +1 -1
- package/esm2022/toast/lib/toast.component.mjs +4 -4
- package/esm2022/toast/lib/toast.config.mjs +3 -3
- package/esm2022/toast/lib/toast.module.mjs +6 -10
- package/esm2022/toast/lib/toast.service.mjs +16 -14
- package/esm2022/tooltip/lib/tooltip.component.mjs +2 -2
- package/esm2022/tooltip/lib/tooltip.directive.mjs +4 -4
- package/esm2022/tooltip/lib/tooltip.module.mjs +3 -3
- package/esm2022/uploader/index.mjs +3 -1
- package/esm2022/uploader/lib/uploader-drop-zone.component.mjs +3 -3
- package/esm2022/uploader/lib/uploader-list.component.mjs +41 -7
- package/esm2022/uploader/lib/uploader-overlay.component.mjs +2 -2
- package/esm2022/uploader/lib/uploader-zone.directive.mjs +53 -0
- package/esm2022/uploader/lib/uploader.module.mjs +26 -7
- package/esm2022/uploader/lib/uploader.service.mjs +30 -0
- package/fesm2022/acorex-components-action-sheet.mjs +23 -15
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +3 -4
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +16 -16
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +5 -5
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +2 -2
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +13 -4
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +52 -110
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +9 -9
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +5 -5
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +92 -34
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +6 -6
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +53 -59
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +277 -223
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +70 -19
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +1 -1
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +10 -7
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +143 -136
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +9 -9
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +8 -4
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +20 -4
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +1 -1
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +43 -19
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +76 -75
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +2 -6
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +77 -80
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +19 -21
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +78 -382
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-mixin.mjs +70 -66
- package/fesm2022/acorex-components-mixin.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +45 -33
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +7 -17
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +8 -6
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +6 -4
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +7 -15
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +10 -17
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +1 -1
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +3 -3
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +6 -6
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +7 -7
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +2 -2
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +83 -0
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -0
- package/fesm2022/acorex-components-scheduler.mjs +3 -1
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +48 -25
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +171 -401
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +22 -12
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +153 -0
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -0
- package/fesm2022/acorex-components-skeleton.mjs +46 -0
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -0
- package/fesm2022/acorex-components-switch.mjs +9 -16
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +11 -4
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +5 -11
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +13 -15
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +8 -22
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +43 -45
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +2 -2
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +146 -18
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/form/index.d.ts +1 -1
- package/form/lib/form.component.d.ts +2 -2
- package/form/lib/validation-summary.component.d.ts +3 -3
- package/list/lib/list.component.d.ts +26 -27
- package/loading/index.d.ts +1 -1
- package/loading/lib/loading.component.d.ts +1 -1
- package/menu/index.d.ts +0 -1
- package/menu/lib/class/root-menu.class.d.ts +2 -0
- package/menu/lib/menu-item/menu-item.component.d.ts +19 -6
- package/menu/lib/menu.component.d.ts +10 -40
- package/menu/lib/menu.module.d.ts +7 -8
- package/mixin/lib/base-components.class.d.ts +2 -2
- package/mixin/lib/base-menu-mixin.class.d.ts +5 -5
- package/mixin/lib/button-mixin.class.d.ts +2 -2
- package/mixin/lib/clickable-mixin.class.d.ts +9 -9
- package/mixin/lib/color-look-mixing.class.d.ts +2 -2
- package/mixin/lib/datalist-component.class.d.ts +10 -10
- package/mixin/lib/datalist.class.d.ts +1 -1
- package/mixin/lib/dropdown-mixin.class.d.ts +3 -3
- package/mixin/lib/interactive-mixin.class.d.ts +25 -22
- package/mixin/lib/mixin.class.d.ts +62 -62
- package/mixin/lib/page-component.class.d.ts +4 -4
- package/mixin/lib/selection-component.class.d.ts +3 -3
- package/mixin/lib/sizable-mixin.class.d.ts +2 -2
- package/mixin/lib/textbox-mixin.class.d.ts +20 -20
- package/mixin/lib/value-mixin.class.d.ts +9 -9
- package/notification/index.d.ts +1 -1
- package/notification/lib/notification.class.d.ts +3 -3
- package/notification/lib/notification.config.d.ts +1 -1
- package/number-box/lib/number-box.component.d.ts +3 -3
- package/otp/lib/otp.component.d.ts +3 -3
- package/otp/lib/otp.module.d.ts +2 -1
- package/package.json +19 -7
- package/page/lib/base-page.class.d.ts +1 -1
- package/page/lib/page.component.d.ts +1 -1
- package/password-box/lib/password-box.component.d.ts +4 -4
- package/popup/index.d.ts +1 -1
- package/popup/lib/popup.interface.d.ts +2 -2
- package/routing-progress/README.md +3 -0
- package/routing-progress/index.d.ts +2 -0
- package/routing-progress/lib/routing-progress.component.d.ts +14 -0
- package/routing-progress/lib/routing-progress.module.d.ts +8 -0
- package/search-box/lib/search-box.component.d.ts +11 -4
- package/select-box/index.d.ts +1 -1
- package/select-box/lib/select-box.component.d.ts +37 -59
- package/select-box/lib/select-box.module.d.ts +14 -15
- package/selection-list/lib/selection-list.component.d.ts +6 -3
- package/side-menu/README.md +3 -0
- package/side-menu/index.d.ts +3 -0
- package/side-menu/lib/side-menu-item/side-menu-item.compoent.d.ts +37 -0
- package/side-menu/lib/side-menu.component.d.ts +8 -0
- package/side-menu/lib/side-menu.module.d.ts +10 -0
- package/skeleton/README.md +3 -0
- package/skeleton/index.d.ts +2 -0
- package/skeleton/lib/skeleton.component.d.ts +8 -0
- package/skeleton/lib/skeleton.module.d.ts +8 -0
- package/tabs/lib/tab-item.component.d.ts +2 -1
- package/tag/lib/tag.component.d.ts +3 -4
- package/text-area/lib/text-area.component.d.ts +3 -3
- package/text-box/lib/text-box.component.d.ts +3 -3
- package/toast/index.d.ts +1 -1
- package/toast/lib/toast.class.d.ts +1 -1
- package/toast/lib/toast.component.d.ts +2 -1
- package/toast/lib/toast.config.d.ts +1 -1
- package/tooltip/lib/tooltip.directive.d.ts +1 -1
- package/uploader/index.d.ts +2 -0
- package/uploader/lib/uploader-list.component.d.ts +14 -1
- package/uploader/lib/uploader-zone.directive.d.ts +18 -0
- package/uploader/lib/uploader.module.d.ts +6 -4
- package/uploader/lib/uploader.service.d.ts +10 -0
- package/common/lib/components/appearance-component.class.d.ts +0 -12
- package/context-menu/README.md +0 -3
- package/context-menu/index.d.ts +0 -2
- package/context-menu/lib/context-menu.component.d.ts +0 -34
- package/context-menu/lib/context-menu.module.d.ts +0 -13
- package/esm2022/common/lib/components/appearance-component.class.mjs +0 -25
- package/esm2022/context-menu/acorex-components-context-menu.mjs +0 -5
- package/esm2022/context-menu/index.mjs +0 -3
- package/esm2022/context-menu/lib/context-menu.component.mjs +0 -262
- package/esm2022/context-menu/lib/context-menu.module.mjs +0 -36
- package/esm2022/menu/lib/menu2.component.mjs +0 -45
- package/esm2022/select-box/lib/select-box2.component.mjs +0 -97
- package/fesm2022/acorex-components-context-menu.mjs +0 -300
- package/fesm2022/acorex-components-context-menu.mjs.map +0 -1
- package/menu/lib/menu2.component.d.ts +0 -12
- package/select-box/lib/select-box2.component.d.ts +0 -25
@@ -1,10 +1,11 @@
|
|
1
1
|
import { flatten, clone } from 'lodash-es';
|
2
2
|
import * as i0 from '@angular/core';
|
3
3
|
import { Injectable, Directive, Host, Self, Optional, Input, Inject, NgModule, inject, ChangeDetectorRef, ElementRef, ViewContainerRef, EventEmitter, Output } from '@angular/core';
|
4
|
+
import _ from 'lodash';
|
5
|
+
import { Subject, fromEvent, noop, skip, distinctUntilChanged, debounceTime } from 'rxjs';
|
4
6
|
import { DOCUMENT } from '@angular/common';
|
5
7
|
import * as i1 from '@angular/platform-browser';
|
6
8
|
import { Observable } from 'rxjs/internal/Observable';
|
7
|
-
import { fromEvent, noop, skip, distinctUntilChanged, debounceTime } from 'rxjs';
|
8
9
|
import { map, pairwise, filter, startWith, exhaustMap } from 'rxjs/operators';
|
9
10
|
import { classes } from 'polytype';
|
10
11
|
import { AXHtmlUtil } from '@acorex/core/utils';
|
@@ -18,7 +19,7 @@ function convertToPlacement(value) {
|
|
18
19
|
if (value == null)
|
19
20
|
return result;
|
20
21
|
if (Array.isArray(value)) {
|
21
|
-
const list = flatten(value.map(m => convertToPlacement(m)).filter(m => m != null)).map(m =>
|
22
|
+
const list = flatten(value.map((m) => convertToPlacement(m)).filter((m) => m != null)).map((m) => clone(m));
|
22
23
|
result.push(...list);
|
23
24
|
}
|
24
25
|
else {
|
@@ -41,99 +42,99 @@ const AX_PLACEMENT_TOP = {
|
|
41
42
|
originY: 'top',
|
42
43
|
overlayX: 'center',
|
43
44
|
overlayY: 'bottom',
|
44
|
-
offsetY: -defaultOffset
|
45
|
+
offsetY: -defaultOffset,
|
45
46
|
};
|
46
47
|
const AX_PLACEMENT_TOP_START = {
|
47
48
|
originX: 'start',
|
48
49
|
originY: 'top',
|
49
50
|
overlayX: 'start',
|
50
51
|
overlayY: 'bottom',
|
51
|
-
offsetY: -defaultOffset
|
52
|
+
offsetY: -defaultOffset,
|
52
53
|
};
|
53
54
|
const AX_PLACEMENT_TOP_END = {
|
54
55
|
originX: 'end',
|
55
56
|
originY: 'top',
|
56
57
|
overlayX: 'start',
|
57
58
|
overlayY: 'bottom',
|
58
|
-
offsetY: -defaultOffset
|
59
|
+
offsetY: -defaultOffset,
|
59
60
|
};
|
60
61
|
const AX_PLACEMENT_BOTTOM = {
|
61
62
|
originX: 'center',
|
62
63
|
originY: 'bottom',
|
63
64
|
overlayX: 'center',
|
64
65
|
overlayY: 'top',
|
65
|
-
offsetY: defaultOffset
|
66
|
+
offsetY: defaultOffset,
|
66
67
|
};
|
67
68
|
const AX_PLACEMENT_BOTTOM_START = {
|
68
69
|
originX: 'start',
|
69
70
|
originY: 'bottom',
|
70
71
|
overlayX: 'start',
|
71
72
|
overlayY: 'top',
|
72
|
-
offsetY: defaultOffset
|
73
|
+
offsetY: defaultOffset,
|
73
74
|
};
|
74
75
|
const AX_PLACEMENT_BOTTOM_END = {
|
75
76
|
originX: 'end',
|
76
77
|
originY: 'bottom',
|
77
78
|
overlayX: 'end',
|
78
79
|
overlayY: 'top',
|
79
|
-
offsetY: defaultOffset
|
80
|
+
offsetY: defaultOffset,
|
80
81
|
};
|
81
82
|
const AX_PLACEMENT_START = {
|
82
83
|
originX: 'start',
|
83
84
|
originY: 'center',
|
84
85
|
overlayX: 'end',
|
85
86
|
overlayY: 'center',
|
86
|
-
offsetX: -defaultOffset
|
87
|
+
offsetX: -defaultOffset,
|
87
88
|
};
|
88
89
|
const AX_PLACEMENT_START_TOP = {
|
89
90
|
originX: 'start',
|
90
91
|
originY: 'top',
|
91
92
|
overlayX: 'end',
|
92
93
|
overlayY: 'top',
|
93
|
-
offsetX: -defaultOffset
|
94
|
+
offsetX: -defaultOffset,
|
94
95
|
};
|
95
96
|
const AX_PLACEMENT_START_BOTTOM = {
|
96
97
|
originX: 'start',
|
97
98
|
originY: 'bottom',
|
98
99
|
overlayX: 'end',
|
99
100
|
overlayY: 'bottom',
|
100
|
-
offsetX: -defaultOffset
|
101
|
+
offsetX: -defaultOffset,
|
101
102
|
};
|
102
103
|
const AX_PLACEMENT_END = {
|
103
104
|
originX: 'end',
|
104
105
|
originY: 'center',
|
105
106
|
overlayX: 'start',
|
106
107
|
overlayY: 'center',
|
107
|
-
offsetX: defaultOffset
|
108
|
+
offsetX: defaultOffset,
|
108
109
|
};
|
109
110
|
const AX_PLACEMENT_END_TOP = {
|
110
111
|
originX: 'end',
|
111
112
|
originY: 'top',
|
112
113
|
overlayX: 'start',
|
113
114
|
overlayY: 'top',
|
114
|
-
offsetX: defaultOffset
|
115
|
+
offsetX: defaultOffset,
|
115
116
|
};
|
116
117
|
const AX_PLACEMENT_END_BOTTOM = {
|
117
118
|
originX: 'end',
|
118
119
|
originY: 'bottom',
|
119
120
|
overlayX: 'start',
|
120
121
|
overlayY: 'bottom',
|
121
|
-
offsetX: defaultOffset
|
122
|
+
offsetX: defaultOffset,
|
122
123
|
};
|
123
124
|
const AX_PLACEMENT_MAP = {
|
124
|
-
|
125
|
+
top: {
|
125
126
|
origin: AX_PLACEMENT_TOP,
|
126
|
-
alts: [AX_PLACEMENT_BOTTOM]
|
127
|
+
alts: [AX_PLACEMENT_BOTTOM],
|
127
128
|
},
|
128
129
|
'top-start': {
|
129
130
|
origin: AX_PLACEMENT_TOP_START,
|
130
|
-
alts: [AX_PLACEMENT_BOTTOM_START]
|
131
|
+
alts: [AX_PLACEMENT_BOTTOM_START],
|
131
132
|
},
|
132
133
|
'top-end': {
|
133
134
|
origin: AX_PLACEMENT_TOP_END,
|
134
|
-
alts: [AX_PLACEMENT_BOTTOM_END]
|
135
|
+
alts: [AX_PLACEMENT_BOTTOM_END],
|
135
136
|
},
|
136
|
-
|
137
|
+
bottom: {
|
137
138
|
origin: AX_PLACEMENT_BOTTOM,
|
138
139
|
alts: [AX_PLACEMENT_BOTTOM],
|
139
140
|
},
|
@@ -145,7 +146,7 @@ const AX_PLACEMENT_MAP = {
|
|
145
146
|
origin: AX_PLACEMENT_BOTTOM_END,
|
146
147
|
alts: [AX_PLACEMENT_TOP_END],
|
147
148
|
},
|
148
|
-
|
149
|
+
end: {
|
149
150
|
origin: AX_PLACEMENT_END,
|
150
151
|
alts: [AX_PLACEMENT_START],
|
151
152
|
},
|
@@ -157,7 +158,7 @@ const AX_PLACEMENT_MAP = {
|
|
157
158
|
origin: AX_PLACEMENT_END_BOTTOM,
|
158
159
|
alts: [AX_PLACEMENT_END_TOP, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP],
|
159
160
|
},
|
160
|
-
|
161
|
+
start: {
|
161
162
|
origin: AX_PLACEMENT_START,
|
162
163
|
alts: [AX_PLACEMENT_END],
|
163
164
|
},
|
@@ -168,7 +169,7 @@ const AX_PLACEMENT_MAP = {
|
|
168
169
|
'start-bottom': {
|
169
170
|
origin: AX_PLACEMENT_START_BOTTOM,
|
170
171
|
alts: [AX_PLACEMENT_START_TOP, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP],
|
171
|
-
}
|
172
|
+
},
|
172
173
|
};
|
173
174
|
|
174
175
|
/**
|
@@ -327,68 +328,111 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
|
|
327
328
|
type: Injectable
|
328
329
|
}] });
|
329
330
|
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
331
|
+
class AXDateSource {
|
332
|
+
get totalCount() {
|
333
|
+
return this._totalCount;
|
334
|
+
}
|
335
|
+
;
|
336
|
+
get totalPages() {
|
337
|
+
return Math.floor(this.totalCount / this.config.pageSize);
|
338
|
+
}
|
339
|
+
;
|
340
|
+
get cachedItems() {
|
341
|
+
return this._cachedItems;
|
342
|
+
}
|
343
|
+
get items() {
|
344
|
+
return this._items;
|
345
|
+
}
|
346
|
+
get isLoading() {
|
347
|
+
return this._isLoading;
|
348
|
+
}
|
349
|
+
constructor(config) {
|
350
|
+
this._totalCount = 0;
|
351
|
+
this._items = [];
|
352
|
+
this.fetchedPages = new Set();
|
353
|
+
this._page = 0;
|
354
|
+
this.onChanged = new Subject();
|
355
|
+
this.onLoadingChanged = new Subject();
|
356
|
+
this._isLoading = false;
|
357
|
+
this.config = config;
|
358
|
+
this._cachedItems = new Array(this.config.pageSize);
|
359
|
+
this._items = new Array(0);
|
360
|
+
this._query = { skip: 0, take: this.config.pageSize };
|
361
|
+
}
|
362
|
+
load() {
|
363
|
+
const page = this._page;
|
364
|
+
if (this.fetchedPages.has(page)) {
|
365
|
+
return;
|
366
|
+
}
|
367
|
+
this.setLoadingState(true);
|
368
|
+
this.fetchedPages.add(page);
|
369
|
+
this._query.skip = page * this.config.pageSize;
|
370
|
+
this.config.load({ ...this._query }).then(result => {
|
371
|
+
if (this._totalCount != result.total) {
|
372
|
+
this._cachedItems = new Array(result.total);
|
373
|
+
this._totalCount = result.total;
|
374
|
+
}
|
375
|
+
this._items = result.items;
|
376
|
+
this._cachedItems.splice(page * this.config.pageSize, this.config.pageSize, ...result.items);
|
377
|
+
const event = {
|
378
|
+
cachedItems: this.cachedItems,
|
379
|
+
items: this.items,
|
380
|
+
page: page,
|
381
|
+
totalCount: this.totalCount,
|
382
|
+
totalPages: this.totalPages
|
383
|
+
};
|
384
|
+
this.onChanged.next(event);
|
385
|
+
}).finally(() => {
|
386
|
+
this.setLoadingState(false);
|
387
|
+
});
|
388
|
+
}
|
389
|
+
setLoadingState(value) {
|
390
|
+
this._isLoading = value;
|
391
|
+
this.onLoadingChanged.next(this._isLoading);
|
392
|
+
}
|
393
|
+
setPage(page) {
|
394
|
+
if (this._page != page || this._items.length == 0) {
|
395
|
+
this._page = page;
|
396
|
+
this.load();
|
397
|
+
}
|
398
|
+
}
|
399
|
+
filter(predicate = null) {
|
400
|
+
this.reset();
|
401
|
+
this._query.predicate = predicate;
|
402
|
+
this.load();
|
403
|
+
}
|
404
|
+
reset() {
|
405
|
+
this._query.predicate = null;
|
406
|
+
this._query.skip = 0;
|
407
|
+
this._cachedItems = new Array(this.config.pageSize);
|
408
|
+
this.fetchedPages.clear();
|
409
|
+
this._page = 0;
|
410
|
+
this._totalCount = 0;
|
411
|
+
}
|
412
|
+
find(key) {
|
413
|
+
const fromCache = this.cachedItems.find(c => (!this.config.key && c == key) || (c && this.config.key && c[this.config.key] == key));
|
414
|
+
if (fromCache)
|
415
|
+
return fromCache;
|
416
|
+
return this.config.byKey ? this.config.byKey(key) : null;
|
417
|
+
}
|
418
|
+
}
|
419
|
+
function convertArrayToDataSource(items, options = { key: 'id', pageSize: 20 }) {
|
420
|
+
const config = {
|
421
|
+
key: options.key,
|
422
|
+
pageSize: options.pageSize,
|
423
|
+
load: (e) => {
|
424
|
+
const result = e.predicate ? _.filter(items, e.predicate) : items;
|
425
|
+
return Promise.resolve({
|
426
|
+
items: result.slice(e.skip, e.skip + e.take),
|
427
|
+
total: result.length
|
428
|
+
});
|
429
|
+
},
|
430
|
+
byKey: (v) => Promise.resolve(items.find(c => c[options.key] == v))
|
431
|
+
};
|
432
|
+
return new AXDateSource(config);
|
433
|
+
}
|
382
434
|
|
383
|
-
const AX_STYLE_COLOR_TYPES = [
|
384
|
-
'primary',
|
385
|
-
'secondary',
|
386
|
-
'success',
|
387
|
-
'warning',
|
388
|
-
'danger',
|
389
|
-
'info',
|
390
|
-
'default',
|
391
|
-
];
|
435
|
+
const AX_STYLE_COLOR_TYPES = ['primary', 'secondary', 'success', 'warning', 'danger', 'info', 'ghost'];
|
392
436
|
const AX_LOCATIONS = [
|
393
437
|
'bottom-start',
|
394
438
|
'bottom-center',
|
@@ -416,16 +460,8 @@ class AXAutoFocusDirective {
|
|
416
460
|
}, this.time);
|
417
461
|
return;
|
418
462
|
}
|
419
|
-
const list = [
|
420
|
-
|
421
|
-
'input',
|
422
|
-
'[href]',
|
423
|
-
'select',
|
424
|
-
'textarea',
|
425
|
-
'[tabindex]',
|
426
|
-
].map((c) => c + ':not([tabindex="-1"])');
|
427
|
-
const focusable = this.el.nativeElement.querySelector(list.join(', ')) ??
|
428
|
-
this.el.nativeElement;
|
463
|
+
const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex="-1"])');
|
464
|
+
const focusable = this.el.nativeElement.querySelector(list.join(', ')) ?? this.el.nativeElement;
|
429
465
|
const attr = document.createAttribute('autofocus');
|
430
466
|
focusable.setAttributeNode(attr);
|
431
467
|
const hasTabindex = focusable.hasAttribute('tabindex');
|
@@ -470,7 +506,7 @@ class AXHotkeysService {
|
|
470
506
|
addShortcut(options) {
|
471
507
|
const merged = { ...this.defaults, ...options };
|
472
508
|
const event = `keydown.${merged.keys}`;
|
473
|
-
return new Observable(observer => {
|
509
|
+
return new Observable((observer) => {
|
474
510
|
const handler = (e) => {
|
475
511
|
e.preventDefault();
|
476
512
|
observer.next(e);
|
@@ -489,11 +525,10 @@ class AXHotkeysService {
|
|
489
525
|
});
|
490
526
|
}
|
491
527
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXHotkeysService, deps: [{ token: i1.EventManager }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
492
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXHotkeysService
|
528
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXHotkeysService }); }
|
493
529
|
}
|
494
530
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXHotkeysService, decorators: [{
|
495
|
-
type: Injectable
|
496
|
-
args: [{ providedIn: 'root' }]
|
531
|
+
type: Injectable
|
497
532
|
}], ctorParameters: function () { return [{ type: i1.EventManager }, { type: Document, decorators: [{
|
498
533
|
type: Inject,
|
499
534
|
args: [DOCUMENT]
|
@@ -504,20 +539,20 @@ class AXHotkeyDirective {
|
|
504
539
|
this.el = el;
|
505
540
|
this._host = _host;
|
506
541
|
this.hs = hs;
|
507
|
-
this.
|
542
|
+
this.axHotkey = '';
|
508
543
|
this._subs = [];
|
509
544
|
}
|
510
545
|
ngAfterViewInit() {
|
511
|
-
if (!this.
|
546
|
+
if (!this.axHotkey || !this._host)
|
512
547
|
return;
|
513
|
-
if (typeof this.
|
514
|
-
this._addDefaultAction(this.
|
548
|
+
if (typeof this.axHotkey == 'string') {
|
549
|
+
this._addDefaultAction(this.axHotkey);
|
515
550
|
}
|
516
|
-
else if (typeof this.
|
517
|
-
this._addHotKeyAction([this.
|
551
|
+
else if (typeof this.axHotkey == 'object' && !Array.isArray(this.axHotkey)) {
|
552
|
+
this._addHotKeyAction([this.axHotkey]);
|
518
553
|
}
|
519
|
-
else if (Array.isArray(this.
|
520
|
-
this._addHotKeyAction(this.
|
554
|
+
else if (Array.isArray(this.axHotkey)) {
|
555
|
+
this._addHotKeyAction(this.axHotkey);
|
521
556
|
}
|
522
557
|
}
|
523
558
|
_addDefaultAction(hotkey) {
|
@@ -556,12 +591,12 @@ class AXHotkeyDirective {
|
|
556
591
|
});
|
557
592
|
}
|
558
593
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXHotkeyDirective, deps: [{ token: i0.ElementRef }, { token: AXComponent, host: true, optional: true, self: true }, { token: AXHotkeysService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
559
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXHotkeyDirective, selector: "[
|
594
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXHotkeyDirective, selector: "[axHotkey]", inputs: { axHotkey: "axHotkey" }, ngImport: i0 }); }
|
560
595
|
}
|
561
596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXHotkeyDirective, decorators: [{
|
562
597
|
type: Directive,
|
563
598
|
args: [{
|
564
|
-
selector: '[
|
599
|
+
selector: '[axHotkey]',
|
565
600
|
}]
|
566
601
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: AXComponent, decorators: [{
|
567
602
|
type: Host
|
@@ -569,16 +604,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
|
|
569
604
|
type: Self
|
570
605
|
}, {
|
571
606
|
type: Optional
|
572
|
-
}] }, { type: AXHotkeysService }]; }, propDecorators: {
|
573
|
-
type: Input
|
574
|
-
args: ['hotkey']
|
607
|
+
}] }, { type: AXHotkeysService }]; }, propDecorators: { axHotkey: [{
|
608
|
+
type: Input
|
575
609
|
}] } });
|
576
610
|
|
577
|
-
;
|
578
611
|
const AX_DEFAULT_SCROLL_POSITION = {
|
579
612
|
scrollHeight: 0,
|
580
613
|
scrollTop: 0,
|
581
|
-
clientHeight: 0
|
614
|
+
clientHeight: 0,
|
582
615
|
};
|
583
616
|
class AXInfiniteScrollerDirective {
|
584
617
|
constructor(elm) {
|
@@ -588,7 +621,7 @@ class AXInfiniteScrollerDirective {
|
|
588
621
|
return positions[0].sT < positions[1].sT;
|
589
622
|
};
|
590
623
|
this.isScrollExpectedPercent = (position) => {
|
591
|
-
return (
|
624
|
+
return (position.sT + position.cH) / position.sH > this.scrollPercent / 100;
|
592
625
|
};
|
593
626
|
}
|
594
627
|
ngAfterViewInit() {
|
@@ -600,12 +633,11 @@ class AXInfiniteScrollerDirective {
|
|
600
633
|
this.scrollEvent$ = fromEvent(this.elm.nativeElement, 'scroll');
|
601
634
|
}
|
602
635
|
streamScrollEvents() {
|
603
|
-
this.userScrolledDown$ = this.scrollEvent
|
604
|
-
.pipe(map((e) => ({
|
636
|
+
this.userScrolledDown$ = this.scrollEvent$.pipe(map((e) => ({
|
605
637
|
scrollHeight: e.target.scrollHeight,
|
606
638
|
scrollTop: e.target.scrollTop,
|
607
|
-
clientHeight: e.target.clientHeight
|
608
|
-
})), pairwise(), filter(positions => this.isUserScrollingDown(positions) && this.isScrollExpectedPercent(positions[1])));
|
639
|
+
clientHeight: e.target.clientHeight,
|
640
|
+
})), pairwise(), filter((positions) => this.isUserScrollingDown(positions) && this.isScrollExpectedPercent(positions[1])));
|
609
641
|
}
|
610
642
|
requestCallbackOnScroll() {
|
611
643
|
this.requestOnScroll$ = this.userScrolledDown$;
|
@@ -623,7 +655,7 @@ class AXInfiniteScrollerDirective {
|
|
623
655
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXInfiniteScrollerDirective, decorators: [{
|
624
656
|
type: Directive,
|
625
657
|
args: [{
|
626
|
-
selector: '[axInfiniteScroller]'
|
658
|
+
selector: '[axInfiniteScroller]',
|
627
659
|
}]
|
628
660
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { scrollCallback: [{
|
629
661
|
type: Input
|
@@ -636,20 +668,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
|
|
636
668
|
class AXResponsiveDirective {
|
637
669
|
constructor(_elementRef) {
|
638
670
|
this._elementRef = _elementRef;
|
639
|
-
this._observer = new ResizeObserver(entries => {
|
640
|
-
for (
|
671
|
+
this._observer = new ResizeObserver((entries) => {
|
672
|
+
for (const entry of entries) {
|
641
673
|
if (entry.target) {
|
642
674
|
const e = entry.target;
|
643
675
|
const elements = [e, ...Array.from(e.querySelectorAll(`[class*='sm:']`))];
|
644
676
|
elements
|
645
|
-
.map(c => ({
|
677
|
+
.map((c) => ({
|
646
678
|
element: c,
|
647
679
|
classList: Array.from(c.classList)
|
648
|
-
.filter(c => c.includes('sm'))
|
649
|
-
.map(c => c.slice(3)),
|
680
|
+
.filter((c) => c.includes('sm'))
|
681
|
+
.map((c) => c.slice(3)),
|
650
682
|
}))
|
651
|
-
.forEach(c => {
|
652
|
-
e.clientWidth < 320
|
683
|
+
.forEach((c) => {
|
684
|
+
e.clientWidth < 320
|
685
|
+
? c.element.classList.add(...c.classList)
|
686
|
+
: c.element.classList.remove(...c.classList);
|
653
687
|
});
|
654
688
|
}
|
655
689
|
}
|
@@ -661,22 +695,24 @@ class AXResponsiveDirective {
|
|
661
695
|
this._observer?.unobserve(this._elementRef.nativeElement);
|
662
696
|
}
|
663
697
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXResponsiveDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
664
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXResponsiveDirective, selector: "[
|
698
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXResponsiveDirective, selector: "[axResponsive]", ngImport: i0 }); }
|
665
699
|
}
|
666
700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXResponsiveDirective, decorators: [{
|
667
701
|
type: Directive,
|
668
|
-
args: [{ selector: '[
|
702
|
+
args: [{ selector: '[axResponsive]' }]
|
669
703
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
670
704
|
|
671
705
|
class AXRippleDirective {
|
672
706
|
constructor(el) {
|
673
707
|
this.el = el;
|
674
|
-
|
708
|
+
this.axRippleColor = 'rgb(0, 0, 0 , 0.1)';
|
709
|
+
el.nativeElement.addEventListener('click', this.createRipple.bind(this));
|
675
710
|
}
|
676
711
|
ngOnDestroy() {
|
677
|
-
this.el.nativeElement.removeEventListener('click', this.createRipple);
|
712
|
+
this.el.nativeElement.removeEventListener('click', this.createRipple.bind(this));
|
678
713
|
}
|
679
714
|
createRipple(event) {
|
715
|
+
this.el.nativeElement.style.overflow = 'hidden';
|
680
716
|
const element = event.currentTarget;
|
681
717
|
const rect = element.getBoundingClientRect();
|
682
718
|
const x = Math.floor(((event.clientX - rect.left) / (rect.right - rect.left)) * element.clientWidth);
|
@@ -687,22 +723,26 @@ class AXRippleDirective {
|
|
687
723
|
circle.style.width = circle.style.height = `${diameter}px`;
|
688
724
|
circle.style.left = `${x - radius}px`;
|
689
725
|
circle.style.top = `${y - radius}px`;
|
690
|
-
circle.
|
691
|
-
|
726
|
+
circle.style.backgroundColor = `${this.axRippleColor}`;
|
727
|
+
circle.classList.add('ax-ripple');
|
728
|
+
const ripple = element.getElementsByClassName('ax-ripple')[0];
|
692
729
|
if (ripple) {
|
693
730
|
ripple.remove();
|
731
|
+
// this.el.nativeElement.style.overflow = 'initial';
|
694
732
|
}
|
695
733
|
element.appendChild(circle);
|
696
734
|
}
|
697
735
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXRippleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
698
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXRippleDirective, selector: "[axRipple]", ngImport: i0 }); }
|
736
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXRippleDirective, selector: "[axRipple]", inputs: { axRippleColor: "axRippleColor" }, ngImport: i0 }); }
|
699
737
|
}
|
700
738
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXRippleDirective, decorators: [{
|
701
739
|
type: Directive,
|
702
740
|
args: [{
|
703
741
|
selector: '[axRipple]',
|
704
742
|
}]
|
705
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }
|
743
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { axRippleColor: [{
|
744
|
+
type: Input
|
745
|
+
}] } });
|
706
746
|
|
707
747
|
class AXCommonModule {
|
708
748
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
@@ -715,7 +755,7 @@ class AXCommonModule {
|
|
715
755
|
AXAutoFocusDirective,
|
716
756
|
AXHotkeyDirective,
|
717
757
|
AXRippleDirective] }); }
|
718
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXCommonModule }); }
|
758
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXCommonModule, providers: [AXHotkeysService] }); }
|
719
759
|
}
|
720
760
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXCommonModule, decorators: [{
|
721
761
|
type: NgModule,
|
@@ -735,6 +775,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
|
|
735
775
|
AXHotkeyDirective,
|
736
776
|
AXRippleDirective,
|
737
777
|
],
|
778
|
+
providers: [AXHotkeysService],
|
738
779
|
}]
|
739
780
|
}] });
|
740
781
|
|
@@ -826,34 +867,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
|
|
826
867
|
type: Injectable
|
827
868
|
}] });
|
828
869
|
|
829
|
-
class MXAppearanceComponent extends MXBaseComponent {
|
830
|
-
constructor() {
|
831
|
-
super(...arguments);
|
832
|
-
this.appearanceChange = new EventEmitter();
|
833
|
-
this._appearance = 'solid';
|
834
|
-
}
|
835
|
-
/**
|
836
|
-
* Predefined color schemes
|
837
|
-
*/
|
838
|
-
get appearance() {
|
839
|
-
return this._appearance;
|
840
|
-
}
|
841
|
-
set appearance(value) {
|
842
|
-
this.setOption({
|
843
|
-
name: 'appearance',
|
844
|
-
value,
|
845
|
-
afterCallback: () => {
|
846
|
-
this.cdr.markForCheck();
|
847
|
-
},
|
848
|
-
});
|
849
|
-
}
|
850
|
-
}
|
851
|
-
|
852
870
|
class MXColorComponent extends MXBaseComponent {
|
853
871
|
constructor() {
|
854
872
|
super(...arguments);
|
855
873
|
this.colorChange = new EventEmitter();
|
856
|
-
this._color = '
|
874
|
+
this._color = 'ghost';
|
857
875
|
}
|
858
876
|
/**
|
859
877
|
* Predefined color schemes
|
@@ -876,7 +894,7 @@ class MXLookComponent extends MXBaseComponent {
|
|
876
894
|
constructor() {
|
877
895
|
super(...arguments);
|
878
896
|
this.lookChange = new EventEmitter();
|
879
|
-
this._look = '
|
897
|
+
this._look = 'solid';
|
880
898
|
}
|
881
899
|
/**
|
882
900
|
* Predefined look schemes
|
@@ -916,11 +934,6 @@ class MXInteractiveComponent extends MXBaseComponent {
|
|
916
934
|
* @event
|
917
935
|
*/
|
918
936
|
this.onBlur = new EventEmitter();
|
919
|
-
/**
|
920
|
-
* Fires each time the user clicks the button.
|
921
|
-
* @event
|
922
|
-
*/
|
923
|
-
this.onClick = new EventEmitter();
|
924
937
|
}
|
925
938
|
registerOnTouched(fn) {
|
926
939
|
this.onTouchedCallback = fn;
|
@@ -977,13 +990,18 @@ class MXInteractiveComponent extends MXBaseComponent {
|
|
977
990
|
nativeEvent: e,
|
978
991
|
});
|
979
992
|
}
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
993
|
+
// /**
|
994
|
+
// * Fires each time the user clicks the button.
|
995
|
+
// * @event
|
996
|
+
// */
|
997
|
+
// onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();
|
998
|
+
// protected emitOnClickEvent(e: MouseEvent): void {
|
999
|
+
// this.onClick.emit({
|
1000
|
+
// component: this,
|
1001
|
+
// htmlElement: this.getHostElement(),
|
1002
|
+
// nativeEvent: e,
|
1003
|
+
// });
|
1004
|
+
// }
|
987
1005
|
focus() {
|
988
1006
|
AXHtmlUtil.focusElement(this.getHostElement());
|
989
1007
|
}
|
@@ -1055,7 +1073,7 @@ class MXButtonBaseComponent extends classes(MXInteractiveComponent, MXColorLookC
|
|
1055
1073
|
'ax-state-disabled': this.disabled,
|
1056
1074
|
'ax-state-selected': this.selected,
|
1057
1075
|
};
|
1058
|
-
cssClasses[`ax-${this['color'] || '
|
1076
|
+
cssClasses[`ax-${this['color'] || 'solid'}${this['look'] ? '-' + this['look'] : '-solid'}`] = true;
|
1059
1077
|
return cssClasses;
|
1060
1078
|
}
|
1061
1079
|
}
|
@@ -1173,7 +1191,7 @@ class MXValueComponent extends MXInteractiveComponent {
|
|
1173
1191
|
const container = this.getHostElement().classList.contains('ax-editor-container')
|
1174
1192
|
? this.getHostElement()
|
1175
1193
|
: this.getHostElement().querySelector('.ax-editor-container');
|
1176
|
-
const formField = container?.closest('
|
1194
|
+
const formField = container?.closest('ax-form-field');
|
1177
1195
|
const label = formField?.querySelector('ax-label')?.__axContext__;
|
1178
1196
|
if (label)
|
1179
1197
|
label.required = true;
|
@@ -1290,37 +1308,37 @@ class MXInputBaseValueComponent extends MXValueComponent {
|
|
1290
1308
|
constructor() {
|
1291
1309
|
super(...arguments);
|
1292
1310
|
/**
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1311
|
+
* Fires each time the user press a key.
|
1312
|
+
* @event
|
1313
|
+
*/
|
1296
1314
|
this.onKeyDown = new EventEmitter();
|
1297
1315
|
/**
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1316
|
+
* Fires each time the user press a key.
|
1317
|
+
* @event
|
1318
|
+
*/
|
1301
1319
|
this.onKeyUp = new EventEmitter();
|
1302
1320
|
/**
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1321
|
+
* Fires each time the user press a key.
|
1322
|
+
* @event
|
1323
|
+
*/
|
1306
1324
|
this.onKeyPress = new EventEmitter();
|
1307
1325
|
}
|
1308
1326
|
emitOnKeydownEvent(e) {
|
1309
1327
|
this.onKeyDown.emit({
|
1310
1328
|
component: this,
|
1311
|
-
nativeEvent: e
|
1329
|
+
nativeEvent: e,
|
1312
1330
|
});
|
1313
1331
|
}
|
1314
1332
|
emitOnKeyupEvent(e) {
|
1315
1333
|
this.onKeyUp.emit({
|
1316
1334
|
component: this,
|
1317
|
-
nativeEvent: e
|
1335
|
+
nativeEvent: e,
|
1318
1336
|
});
|
1319
1337
|
}
|
1320
1338
|
emitOnKeypressEvent(e) {
|
1321
1339
|
this.onKeyPress.emit({
|
1322
1340
|
component: this,
|
1323
|
-
nativeEvent: e
|
1341
|
+
nativeEvent: e,
|
1324
1342
|
});
|
1325
1343
|
}
|
1326
1344
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: MXInputBaseValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
@@ -1335,10 +1353,10 @@ class MXSelectionValueComponent extends MXValueComponent {
|
|
1335
1353
|
super(...arguments);
|
1336
1354
|
this._valueField = 'id';
|
1337
1355
|
this._textField = 'text';
|
1338
|
-
this._hintField = 'hint';
|
1339
1356
|
this._disabledField = 'disabled';
|
1340
1357
|
this._multiple = false;
|
1341
1358
|
this._selectedItems = [];
|
1359
|
+
this._cacheList = [];
|
1342
1360
|
}
|
1343
1361
|
get valueField() {
|
1344
1362
|
return this._valueField;
|
@@ -1358,15 +1376,6 @@ class MXSelectionValueComponent extends MXValueComponent {
|
|
1358
1376
|
value: v,
|
1359
1377
|
});
|
1360
1378
|
}
|
1361
|
-
get hintField() {
|
1362
|
-
return this._hintField;
|
1363
|
-
}
|
1364
|
-
set hintField(v) {
|
1365
|
-
this.setOption({
|
1366
|
-
name: 'hintField',
|
1367
|
-
value: v,
|
1368
|
-
});
|
1369
|
-
}
|
1370
1379
|
get disabledField() {
|
1371
1380
|
return this._disabledField;
|
1372
1381
|
}
|
@@ -1389,40 +1398,79 @@ class MXSelectionValueComponent extends MXValueComponent {
|
|
1389
1398
|
return this._selectedItems || [];
|
1390
1399
|
}
|
1391
1400
|
internalSetValue(value) {
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1401
|
+
const isArray = Array.isArray(value);
|
1402
|
+
if (value == null || (isArray && value.length == 0)) {
|
1403
|
+
return this.multiple ? [] : null;
|
1404
|
+
}
|
1405
|
+
const normalizedItems = isArray
|
1406
|
+
? this.normalizeItemsList(value, true)
|
1407
|
+
: this.normalizeItemsList([value], true);
|
1408
|
+
if (normalizedItems.length == 0) {
|
1409
|
+
return this.multiple ? [] : null;
|
1410
|
+
}
|
1411
|
+
const result = this.multiple
|
1412
|
+
? normalizedItems.map((c) => c[this.valueField])
|
1413
|
+
: normalizedItems[0][this.valueField];
|
1414
|
+
return result;
|
1397
1415
|
}
|
1398
1416
|
emitOnValueChangedEvent(oldValue, newValue) {
|
1399
1417
|
this._normalizeSelectedItems();
|
1400
1418
|
super.emitOnValueChangedEvent(oldValue, newValue);
|
1401
1419
|
}
|
1402
|
-
normalizeItemsList(items) {
|
1420
|
+
normalizeItemsList(items, findBykey = false) {
|
1403
1421
|
if (items == null)
|
1404
1422
|
return [];
|
1405
|
-
return items.filter((c) => c != null).map((i) => this.normalizeItem(i));
|
1423
|
+
return items.filter((c) => c != null).map((i) => this.normalizeItem(i, findBykey));
|
1406
1424
|
}
|
1407
|
-
normalizeItem(item) {
|
1425
|
+
normalizeItem(item, findBykey = false) {
|
1426
|
+
const complex = typeof item == 'object';
|
1427
|
+
const key = complex ? item[this.valueField] : `${item}`;
|
1428
|
+
const cacheKey = `k-${key}`;
|
1429
|
+
const hasText = !complex || item[this.textField] != null;
|
1430
|
+
//
|
1431
|
+
if (this._cacheList[cacheKey])
|
1432
|
+
return this._cacheList[cacheKey];
|
1433
|
+
//
|
1408
1434
|
const obj = {};
|
1409
|
-
if (
|
1435
|
+
if (complex && hasText) {
|
1410
1436
|
Object.assign(obj, item);
|
1411
1437
|
}
|
1412
|
-
else
|
1413
|
-
const existsItem = this.getItemByKey(
|
1414
|
-
if (existsItem)
|
1415
|
-
|
1438
|
+
else {
|
1439
|
+
const existsItem = findBykey ? this.getItemByKey(key) : null;
|
1440
|
+
if (existsItem && existsItem instanceof Promise) {
|
1441
|
+
obj[this.valueField] = key;
|
1442
|
+
obj[this.textField] = key;
|
1443
|
+
obj['isLoading'] = true;
|
1444
|
+
//
|
1445
|
+
existsItem.then((r) => {
|
1446
|
+
if (typeof r === 'object') {
|
1447
|
+
obj[this.valueField] = r[this.valueField];
|
1448
|
+
obj[this.textField] = r[this.textField];
|
1449
|
+
}
|
1450
|
+
else {
|
1451
|
+
obj[this.valueField] = obj[this.textField] = r || key;
|
1452
|
+
}
|
1453
|
+
}).finally(() => {
|
1454
|
+
obj['isLoading'] = false;
|
1455
|
+
this.cdr.markForCheck();
|
1456
|
+
});
|
1457
|
+
}
|
1458
|
+
else if (existsItem) {
|
1459
|
+
obj[this.valueField] = existsItem;
|
1460
|
+
}
|
1416
1461
|
else {
|
1417
1462
|
obj[this.valueField] = item;
|
1418
|
-
obj[this.textField] = item.toString();
|
1419
1463
|
}
|
1420
1464
|
}
|
1465
|
+
if (!obj[this.textField]) {
|
1466
|
+
obj[this.textField] = obj[this.valueField];
|
1467
|
+
}
|
1468
|
+
this._cacheList[cacheKey] = obj;
|
1421
1469
|
return obj;
|
1422
1470
|
}
|
1423
1471
|
_normalizeSelectedItems() {
|
1424
|
-
const values = Array.isArray(this.value) ? this.value :
|
1425
|
-
this._selectedItems = values.map(v => this.normalizeItem(v));
|
1472
|
+
const values = Array.isArray(this.value) ? this.value : this.value != null ? [this.value] : [];
|
1473
|
+
this._selectedItems = values.map((v) => this.normalizeItem(v));
|
1426
1474
|
}
|
1427
1475
|
unselectItems(...items) {
|
1428
1476
|
if (!items || items.length === 0) {
|
@@ -1470,7 +1518,11 @@ class MXSelectionValueComponent extends MXValueComponent {
|
|
1470
1518
|
}
|
1471
1519
|
getDisplayText(item) {
|
1472
1520
|
const normalizeItem = this.normalizeItem(item);
|
1473
|
-
return normalizeItem[this.textField];
|
1521
|
+
return normalizeItem['isLoading'] ? 'Loading...' : normalizeItem[this.textField];
|
1522
|
+
}
|
1523
|
+
getValue(item) {
|
1524
|
+
const normalizeItem = this.normalizeItem(item);
|
1525
|
+
return normalizeItem[this.valueField];
|
1474
1526
|
}
|
1475
1527
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: MXSelectionValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
1476
1528
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: MXSelectionValueComponent }); }
|
@@ -1486,7 +1538,7 @@ class AXNgModelDelayedValueChangedDirective {
|
|
1486
1538
|
set delayTime(v) {
|
1487
1539
|
if (v != this._delayTime) {
|
1488
1540
|
this._delayTime = v;
|
1489
|
-
this.
|
1541
|
+
this.axDelayTimeChange.emit(v);
|
1490
1542
|
this.update();
|
1491
1543
|
}
|
1492
1544
|
}
|
@@ -1495,29 +1547,31 @@ class AXNgModelDelayedValueChangedDirective {
|
|
1495
1547
|
}
|
1496
1548
|
constructor(ngModel) {
|
1497
1549
|
this.ngModel = ngModel;
|
1498
|
-
this.
|
1499
|
-
this.
|
1550
|
+
this.axDelayedValueChanged = new EventEmitter();
|
1551
|
+
this.axDelayTimeChange = new EventEmitter();
|
1500
1552
|
this._delayTime = 0;
|
1501
1553
|
this.delayTime = 0;
|
1502
1554
|
}
|
1503
1555
|
update() {
|
1504
1556
|
this.subscription?.unsubscribe();
|
1505
1557
|
//
|
1506
|
-
this.subscription = this.ngModel.control.valueChanges
|
1507
|
-
|
1558
|
+
this.subscription = this.ngModel.control.valueChanges
|
1559
|
+
.pipe(skip(1), // skip initial value
|
1560
|
+
distinctUntilChanged(), debounceTime(this.delayTime))
|
1561
|
+
.subscribe((value) => this.axDelayedValueChanged.emit(value));
|
1508
1562
|
}
|
1509
1563
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXNgModelDelayedValueChangedDirective, deps: [{ token: i1$1.NgModel }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1510
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXNgModelDelayedValueChangedDirective, isStandalone: true, selector: "[
|
1564
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXNgModelDelayedValueChangedDirective, isStandalone: true, selector: "[axDelayedValueChanged]", inputs: { delayTime: "delayTime" }, outputs: { axDelayedValueChanged: "axDelayedValueChanged", axDelayTimeChange: "axDelayTimeChange" }, ngImport: i0 }); }
|
1511
1565
|
}
|
1512
1566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXNgModelDelayedValueChangedDirective, decorators: [{
|
1513
1567
|
type: Directive,
|
1514
1568
|
args: [{
|
1515
|
-
selector: '[
|
1516
|
-
standalone: true
|
1569
|
+
selector: '[axDelayedValueChanged]',
|
1570
|
+
standalone: true,
|
1517
1571
|
}]
|
1518
|
-
}], ctorParameters: function () { return [{ type: i1$1.NgModel }]; }, propDecorators: {
|
1572
|
+
}], ctorParameters: function () { return [{ type: i1$1.NgModel }]; }, propDecorators: { axDelayedValueChanged: [{
|
1519
1573
|
type: Output
|
1520
|
-
}],
|
1574
|
+
}], axDelayTimeChange: [{
|
1521
1575
|
type: Output
|
1522
1576
|
}], delayTime: [{
|
1523
1577
|
type: Input
|
@@ -1527,5 +1581,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
|
|
1527
1581
|
* Generated bundle index. Do not edit.
|
1528
1582
|
*/
|
1529
1583
|
|
1530
|
-
export { AXAutoFocusDirective, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXItemClickEvent, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_STYLE_COLOR_TYPES,
|
1584
|
+
export { AXAutoFocusDirective, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDateSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXItemClickEvent, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_STYLE_COLOR_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXSelectionValueComponent, MXValueComponent, TAB_META_KEY, convertArrayToDataSource, convertToPlacement };
|
1531
1585
|
//# sourceMappingURL=acorex-components-common.mjs.map
|