@acorex/components 7.3.1 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/lib/button-group.component.d.ts +10 -73
- package/button/lib/button-item.class.d.ts +1 -3
- package/button/lib/button-item.component.d.ts +12 -75
- package/button/lib/button.component.d.ts +1 -1
- package/button-group/README.md +3 -0
- package/button-group/index.d.ts +2 -0
- package/button-group/lib/button-group.component.d.ts +21 -0
- package/button-group/lib/button-group.module.d.ts +8 -0
- package/calendar/lib/calendar-range.component.d.ts +2 -1
- package/calendar/lib/calendar.class.d.ts +9 -8
- package/calendar/lib/calendar.component.d.ts +2 -1
- package/check-box/lib/check-box.component.d.ts +3 -2
- package/color-box/README.md +3 -0
- package/color-box/index.d.ts +2 -0
- package/color-box/lib/color-box.component.d.ts +27 -0
- package/color-box/lib/color-box.module.d.ts +11 -0
- package/common/index.d.ts +6 -5
- package/common/lib/classes/styles.class.d.ts +0 -9
- package/common/lib/components/button-base-component.class.d.ts +0 -2
- package/common/lib/components/interactive-component.class.d.ts +7 -1
- package/common/lib/types/direction.d.ts +4 -0
- package/common/lib/types/orientation.d.ts +4 -0
- package/common/lib/types/placement.d.ts +30 -0
- package/common/lib/types/selection-mode.d.ts +4 -0
- package/data-pager/lib/data-pager.module.d.ts +5 -4
- package/data-table/lib/data-column.directive.d.ts +2 -2
- package/datetime-box/README.md +3 -0
- package/datetime-box/index.d.ts +2 -0
- package/datetime-box/lib/datetime-box.component.d.ts +34 -0
- package/datetime-box/lib/datetime-box.module.d.ts +13 -0
- package/datetime-input/README.md +3 -0
- package/datetime-input/index.d.ts +2 -0
- package/datetime-input/lib/datetime-input.component.d.ts +44 -0
- package/datetime-input/lib/datetime-input.module.d.ts +10 -0
- package/datetime-picker/README.md +3 -0
- package/datetime-picker/index.d.ts +2 -0
- package/datetime-picker/lib/datetime-picker.component.d.ts +42 -0
- package/datetime-picker/lib/datetime-picker.module.d.ts +14 -0
- package/decorators/index.d.ts +4 -4
- package/decorators/lib/decorators.module.d.ts +4 -4
- package/dropdown/index.d.ts +2 -0
- package/dropdown/lib/dropdown-box.class.d.ts +15 -0
- package/dropdown/lib/dropdown-box.component.d.ts +25 -0
- package/dropdown/lib/dropdown-panel.component.d.ts +31 -20
- package/dropdown/lib/dropdown.module.d.ts +9 -8
- package/esm2022/action-sheet/lib/action-sheet.class.mjs +1 -1
- package/esm2022/action-sheet/lib/action-sheet.component.mjs +3 -3
- package/esm2022/action-sheet/lib/action-sheet.module.mjs +4 -4
- package/esm2022/action-sheet/lib/action-sheet.service.mjs +3 -3
- package/esm2022/alert/lib/alert.component.mjs +3 -3
- package/esm2022/alert/lib/alert.module.mjs +4 -4
- package/esm2022/avatar/lib/avatar-group.component.mjs +3 -3
- package/esm2022/avatar/lib/avatar.component.mjs +3 -3
- package/esm2022/avatar/lib/avatar.module.mjs +4 -4
- package/esm2022/badge/lib/badge.component.mjs +3 -3
- package/esm2022/badge/lib/badge.module.mjs +4 -4
- package/esm2022/breadcrumbs/lib/breadcrumbs-item.component.mjs +3 -3
- package/esm2022/breadcrumbs/lib/breadcrumbs.component.mjs +3 -3
- package/esm2022/breadcrumbs/lib/breadcrumbs.module.mjs +4 -4
- package/esm2022/button/lib/button-group.component.mjs +36 -29
- package/esm2022/button/lib/button-item.class.mjs +1 -1
- package/esm2022/button/lib/button-item.component.mjs +46 -32
- package/esm2022/button/lib/button.component.mjs +14 -10
- package/esm2022/button/lib/button.module.mjs +4 -4
- package/esm2022/{color-picker/acorex-components-color-picker.mjs → button-group/acorex-components-button-group.mjs} +1 -1
- package/esm2022/button-group/index.mjs +3 -0
- package/esm2022/button-group/lib/button-group.component.mjs +97 -0
- package/esm2022/button-group/lib/button-group.module.mjs +21 -0
- package/esm2022/calendar/lib/calendar-range.component.mjs +14 -13
- package/esm2022/calendar/lib/calendar.class.mjs +19 -18
- package/esm2022/calendar/lib/calendar.component.mjs +80 -40
- package/esm2022/calendar/lib/calendar.module.mjs +4 -4
- package/esm2022/check-box/lib/check-box.component.mjs +9 -5
- package/esm2022/check-box/lib/check-box.module.mjs +4 -4
- package/esm2022/chips/lib/chips.component.mjs +3 -3
- package/esm2022/chips/lib/chips.module.mjs +4 -4
- package/esm2022/collapse/lib/collapse-group.component.mjs +3 -3
- package/esm2022/collapse/lib/collapse.component.mjs +3 -3
- package/esm2022/collapse/lib/collapse.module.mjs +4 -4
- package/esm2022/color-box/acorex-components-color-box.mjs +5 -0
- package/esm2022/color-box/index.mjs +3 -0
- package/esm2022/color-box/lib/color-box.component.mjs +91 -0
- package/esm2022/color-box/lib/color-box.module.mjs +24 -0
- package/esm2022/color-palette/lib/color-palette-input.component.mjs +3 -3
- package/esm2022/color-palette/lib/color-palette-picker.component.mjs +13 -13
- package/esm2022/color-palette/lib/color-palette-preview.component.mjs +3 -3
- package/esm2022/color-palette/lib/color-palette-swatches.component.mjs +3 -3
- package/esm2022/color-palette/lib/color-palette.class.mjs +6 -6
- package/esm2022/color-palette/lib/color-palette.component.mjs +5 -5
- package/esm2022/color-palette/lib/color-palette.module.mjs +4 -4
- package/esm2022/common/index.mjs +7 -6
- package/esm2022/common/lib/classes/components.class.mjs +22 -22
- package/esm2022/common/lib/classes/styles.class.mjs +1 -2
- package/esm2022/common/lib/common.module.mjs +4 -4
- package/esm2022/common/lib/components/base-component.class.mjs +3 -3
- package/esm2022/common/lib/components/button-base-component.class.mjs +4 -18
- package/esm2022/common/lib/components/input-base-value-component.class.mjs +3 -3
- package/esm2022/common/lib/components/interactive-component.class.mjs +14 -1
- package/esm2022/common/lib/components/value-component.class.mjs +6 -6
- package/esm2022/common/lib/directives/auto-focus.directive.mjs +3 -3
- package/esm2022/common/lib/directives/delayed-value-changed.directive.mjs +3 -3
- package/esm2022/common/lib/directives/hotkey.directive.mjs +3 -3
- package/esm2022/common/lib/directives/infinite-scroll.directive.mjs +3 -3
- package/esm2022/common/lib/directives/responsive.directive.mjs +3 -3
- package/esm2022/common/lib/services/dom.service.mjs +3 -3
- package/esm2022/common/lib/services/hotkey.service.mjs +3 -3
- package/esm2022/common/lib/types/direction.mjs +2 -0
- package/esm2022/common/lib/types/orientation.mjs +2 -0
- package/esm2022/common/lib/types/placement.mjs +160 -0
- package/esm2022/common/lib/types/range.mjs +2 -0
- package/esm2022/common/lib/types/selection-mode.mjs +5 -0
- package/esm2022/context-menu/lib/context-menu.component.mjs +3 -3
- package/esm2022/context-menu/lib/context-menu.module.mjs +4 -4
- package/esm2022/data-pager/lib/data-pager-base.component.mjs +6 -6
- package/esm2022/data-pager/lib/data-pager-info.component.mjs +3 -3
- package/esm2022/data-pager/lib/data-pager-input-selector.component.mjs +3 -3
- package/esm2022/data-pager/lib/data-pager-next-buttons.components.mjs +4 -4
- package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +15 -18
- package/esm2022/data-pager/lib/data-pager-pagesize-dropdown.component.mjs +7 -7
- package/esm2022/data-pager/lib/data-pager-prev-buttons.component.mjs +4 -4
- package/esm2022/data-pager/lib/data-pager.component.mjs +5 -5
- package/esm2022/data-pager/lib/data-pager.module.mjs +8 -7
- package/esm2022/data-table/lib/data-column.directive.mjs +6 -8
- package/esm2022/data-table/lib/data-table.component.mjs +3 -3
- package/esm2022/data-table/lib/data-table.module.mjs +4 -4
- package/esm2022/datetime-box/acorex-components-datetime-box.mjs +5 -0
- package/esm2022/datetime-box/index.mjs +3 -0
- package/esm2022/datetime-box/lib/datetime-box.component.mjs +109 -0
- package/esm2022/datetime-box/lib/datetime-box.module.mjs +38 -0
- package/esm2022/datetime-input/acorex-components-datetime-input.mjs +5 -0
- package/esm2022/datetime-input/index.mjs +3 -0
- package/esm2022/datetime-input/lib/datetime-input.component.mjs +522 -0
- package/esm2022/datetime-input/lib/datetime-input.module.mjs +23 -0
- package/esm2022/datetime-picker/acorex-components-datetime-picker.mjs +5 -0
- package/esm2022/datetime-picker/index.mjs +3 -0
- package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +232 -0
- package/esm2022/datetime-picker/lib/datetime-picker.module.mjs +41 -0
- package/esm2022/decorators/index.mjs +5 -5
- package/esm2022/decorators/lib/components/clear-button.component.mjs +58 -0
- package/esm2022/decorators/lib/components/close-button.component.mjs +43 -0
- package/esm2022/decorators/lib/components/generic-content.component.mjs +17 -0
- package/esm2022/decorators/lib/components/icon.component.mjs +26 -0
- package/esm2022/decorators/lib/decorators.module.mjs +10 -10
- package/esm2022/dialog/lib/dialog.component.mjs +4 -4
- package/esm2022/dialog/lib/dialog.module.mjs +4 -4
- package/esm2022/dialog/lib/dialog.service.mjs +3 -3
- package/esm2022/drawer/lib/drawer-container.component.mjs +3 -3
- package/esm2022/drawer/lib/drawer.component.mjs +3 -3
- package/esm2022/drawer/lib/drawer.module.mjs +4 -4
- package/esm2022/dropdown/index.mjs +3 -1
- package/esm2022/dropdown/lib/dropdown-box.class.mjs +38 -0
- package/esm2022/dropdown/lib/dropdown-box.component.mjs +94 -0
- package/esm2022/dropdown/lib/dropdown-panel.component.mjs +88 -37
- package/esm2022/dropdown/lib/dropdown.module.mjs +8 -7
- package/esm2022/form/index.mjs +2 -1
- package/esm2022/form/lib/form-field.component.mjs +3 -3
- package/esm2022/form/lib/form.component.mjs +3 -3
- package/esm2022/form/lib/form.config.mjs +36 -0
- package/esm2022/form/lib/form.module.mjs +6 -28
- package/esm2022/form/lib/validation-rule.widget.mjs +8 -7
- package/esm2022/form/lib/validation-summary.component.mjs +4 -4
- package/esm2022/image/lib/image.component.mjs +3 -3
- package/esm2022/image/lib/image.module.mjs +4 -4
- package/esm2022/label/lib/label.component.mjs +3 -3
- package/esm2022/label/lib/label.module.mjs +4 -4
- package/esm2022/loading/lib/loading-spinner.component.mjs +3 -3
- package/esm2022/loading/lib/loading.component.mjs +6 -6
- package/esm2022/loading/lib/loading.directive.mjs +20 -51
- package/esm2022/loading/lib/loading.module.mjs +6 -6
- package/esm2022/loading/lib/loading.service.mjs +36 -28
- package/esm2022/menu/lib/menu.component.mjs +3 -3
- package/esm2022/menu/lib/menu.module.mjs +4 -4
- package/esm2022/mixin/index.mjs +1 -2
- package/esm2022/mixin/lib/base-components.class.mjs +3 -3
- package/esm2022/mixin/lib/selection-component.class.mjs +3 -3
- package/esm2022/mixin/lib/value-mixin.class.mjs +3 -3
- package/esm2022/notification/lib/notification.component.mjs +3 -3
- package/esm2022/notification/lib/notification.module.mjs +4 -4
- package/esm2022/notification/lib/notification.service.mjs +3 -3
- package/esm2022/number-box/lib/number-box.component.mjs +3 -3
- package/esm2022/number-box/lib/number-box.module.mjs +4 -4
- package/esm2022/otp/lib/otp.component.mjs +23 -11
- package/esm2022/otp/lib/otp.module.mjs +4 -4
- package/esm2022/page/lib/base-page.class.mjs +20 -21
- package/esm2022/page/lib/page.component.mjs +13 -13
- package/esm2022/page/lib/page.module.mjs +4 -4
- package/esm2022/password-box/lib/password-box.component.mjs +3 -3
- package/esm2022/password-box/lib/password-box.module.mjs +4 -4
- package/esm2022/picker/acorex-components-picker.mjs +5 -0
- package/esm2022/picker/index.mjs +4 -0
- package/esm2022/picker/lib/picker-column.directive.mjs +73 -0
- package/esm2022/picker/lib/picker.component.mjs +148 -0
- package/esm2022/picker/lib/picker.module.mjs +22 -0
- package/esm2022/popover/index.mjs +1 -2
- package/esm2022/popover/lib/popover.component.mjs +270 -166
- package/esm2022/popover/lib/popover.module.mjs +4 -4
- package/esm2022/popup/lib/popup.component.mjs +40 -15
- package/esm2022/popup/lib/popup.module.mjs +6 -6
- package/esm2022/popup/lib/popup.service.mjs +9 -6
- package/esm2022/progress-bar/lib/progress-bar.component.mjs +9 -13
- package/esm2022/progress-bar/lib/progress-bar.module.mjs +4 -4
- package/esm2022/radio/lib/radio.component.mjs +36 -21
- package/esm2022/radio/lib/radio.module.mjs +4 -4
- package/esm2022/range-slider/lib/range-slider.component.mjs +21 -34
- package/esm2022/range-slider/lib/range-slider.module.mjs +4 -4
- package/esm2022/result/lib/result.component.mjs +6 -6
- package/esm2022/result/lib/result.module.mjs +4 -4
- package/esm2022/scheduler/index.mjs +2 -1
- package/esm2022/scheduler/lib/scheduler-month-view.component.mjs +16 -9
- package/esm2022/scheduler/lib/scheduler-week-view.component.mjs +12 -0
- package/esm2022/scheduler/lib/scheduler.component.mjs +27 -14
- package/esm2022/scheduler/lib/scheduler.module.mjs +10 -9
- package/esm2022/search-box/lib/search-box.component.mjs +3 -3
- package/esm2022/search-box/lib/search-box.module.mjs +4 -4
- package/esm2022/select-box/lib/select-box.component.mjs +7 -7
- package/esm2022/select-box/lib/select-box.module.mjs +4 -4
- package/esm2022/selection-list/lib/selection-list.component.mjs +3 -3
- package/esm2022/selection-list/lib/selection-list.module.mjs +4 -4
- package/esm2022/switch/lib/switch-content.component.mjs +3 -3
- package/esm2022/switch/lib/switch.component.mjs +3 -3
- package/esm2022/switch/lib/switch.module.mjs +4 -4
- package/esm2022/tabs/lib/tab-content.directive.mjs +3 -3
- package/esm2022/tabs/lib/tab-item.component.mjs +23 -53
- package/esm2022/tabs/lib/tabs.class.mjs +1 -1
- package/esm2022/tabs/lib/tabs.component.mjs +19 -28
- package/esm2022/tabs/lib/tabs.module.mjs +4 -4
- package/esm2022/tag/lib/tag.component.mjs +8 -10
- package/esm2022/tag/lib/tag.module.mjs +4 -4
- package/esm2022/text-area/lib/text-area.component.mjs +3 -3
- package/esm2022/text-area/lib/text-area.module.mjs +4 -4
- package/esm2022/text-box/lib/mask-options.directive.mjs +3 -3
- package/esm2022/text-box/lib/text-box.component.mjs +3 -3
- package/esm2022/text-box/lib/text-box.module.mjs +4 -4
- package/esm2022/toast/lib/toast.component.mjs +3 -3
- package/esm2022/toast/lib/toast.config.mjs +9 -3
- package/esm2022/toast/lib/toast.module.mjs +10 -6
- package/esm2022/toast/lib/toast.service.mjs +3 -3
- package/esm2022/tooltip/lib/tooltip.component.mjs +9 -13
- package/esm2022/tooltip/lib/tooltip.directive.mjs +35 -143
- package/esm2022/tooltip/lib/tooltip.module.mjs +4 -4
- package/esm2022/uploader/index.mjs +4 -2
- package/esm2022/uploader/lib/uploader-drop-zone.component.mjs +13 -0
- package/esm2022/uploader/lib/uploader-list.component.mjs +14 -0
- package/esm2022/uploader/lib/uploader-overlay.component.mjs +12 -0
- package/esm2022/uploader/lib/uploader.module.mjs +14 -11
- package/fesm2022/acorex-components-action-sheet.mjs +10 -10
- package/fesm2022/acorex-components-alert.mjs +7 -7
- package/fesm2022/acorex-components-avatar.mjs +10 -10
- package/fesm2022/acorex-components-badge.mjs +7 -7
- package/fesm2022/acorex-components-breadcrumbs.mjs +10 -10
- package/fesm2022/acorex-components-button-group.mjs +122 -0
- package/fesm2022/acorex-components-button-group.mjs.map +1 -0
- package/fesm2022/acorex-components-button.mjs +138 -116
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +110 -68
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +12 -8
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +7 -7
- package/fesm2022/acorex-components-collapse.mjs +10 -10
- package/fesm2022/acorex-components-color-box.mjs +116 -0
- package/fesm2022/acorex-components-color-box.mjs.map +1 -0
- package/fesm2022/acorex-components-color-palette.mjs +36 -36
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +238 -301
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-context-menu.mjs +7 -7
- package/fesm2022/acorex-components-data-pager.mjs +52 -54
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +12 -14
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +146 -0
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -0
- package/fesm2022/acorex-components-datetime-input.mjs +547 -0
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -0
- package/fesm2022/acorex-components-datetime-picker.mjs +273 -0
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -0
- package/fesm2022/acorex-components-decorators.mjs +50 -50
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +11 -11
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +10 -10
- package/fesm2022/acorex-components-dropdown.mjs +217 -44
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +58 -44
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +7 -7
- package/fesm2022/acorex-components-label.mjs +7 -7
- package/fesm2022/acorex-components-loading.mjs +93 -116
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +7 -7
- package/fesm2022/acorex-components-mixin.mjs +7 -26
- package/fesm2022/acorex-components-mixin.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +10 -10
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +7 -7
- package/fesm2022/acorex-components-otp.mjs +27 -15
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +55 -56
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +7 -7
- package/fesm2022/acorex-components-picker.mjs +242 -0
- package/fesm2022/acorex-components-picker.mjs.map +1 -0
- package/fesm2022/acorex-components-popover.mjs +275 -241
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +52 -24
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +12 -16
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +39 -25
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +24 -37
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +9 -9
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +50 -25
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +7 -7
- package/fesm2022/acorex-components-select-box.mjs +10 -10
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +7 -7
- package/fesm2022/acorex-components-switch.mjs +10 -10
- package/fesm2022/acorex-components-tabs.mjs +45 -85
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +11 -13
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +7 -7
- package/fesm2022/acorex-components-text-box.mjs +10 -10
- package/fesm2022/acorex-components-toast.mjs +23 -13
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +45 -157
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +38 -103
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/form/index.d.ts +1 -0
- package/form/lib/form.config.d.ts +17 -0
- package/form/lib/form.module.d.ts +0 -1
- package/form/lib/validation-rule.widget.d.ts +1 -0
- package/loading/lib/loading.directive.d.ts +10 -17
- package/loading/lib/loading.module.d.ts +1 -1
- package/loading/lib/loading.service.d.ts +10 -15
- package/mixin/index.d.ts +0 -1
- 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 +2 -2
- package/mixin/lib/color-look-mixing.class.d.ts +2 -2
- package/mixin/lib/datalist-component.class.d.ts +10 -10
- package/mixin/lib/dropdown-mixin.class.d.ts +2 -2
- package/mixin/lib/interactive-mixin.class.d.ts +4 -4
- package/mixin/lib/mixin.class.d.ts +61 -61
- package/mixin/lib/page-component.class.d.ts +2 -2
- package/mixin/lib/selection-component.class.d.ts +2 -2
- package/mixin/lib/sizable-mixin.class.d.ts +2 -2
- package/mixin/lib/textbox-mixin.class.d.ts +2 -2
- package/mixin/lib/value-mixin.class.d.ts +8 -8
- package/otp/lib/otp.component.d.ts +10 -6
- package/package.json +56 -41
- package/page/lib/base-page.class.d.ts +6 -10
- package/page/lib/page.component.d.ts +4 -4
- package/picker/README.md +3 -0
- package/picker/index.d.ts +3 -0
- package/picker/lib/picker-column.directive.d.ts +16 -0
- package/picker/lib/picker.component.d.ts +30 -0
- package/picker/lib/picker.module.d.ts +9 -0
- package/popover/index.d.ts +0 -1
- package/popover/lib/popover.component.d.ts +51 -27
- package/popup/lib/popup.component.d.ts +6 -6
- package/progress-bar/lib/progress-bar.component.d.ts +3 -8
- package/radio/lib/radio.component.d.ts +8 -10
- package/range-slider/lib/range-slider.component.d.ts +12 -12
- package/result/lib/result.component.d.ts +2 -2
- package/scheduler/index.d.ts +1 -0
- package/scheduler/lib/scheduler-month-view.component.d.ts +2 -1
- package/scheduler/lib/scheduler-week-view.component.d.ts +6 -0
- package/scheduler/lib/scheduler.component.d.ts +6 -0
- package/scheduler/lib/scheduler.module.d.ts +7 -6
- package/tabs/lib/tab-item.component.d.ts +7 -38
- package/tabs/lib/tabs.class.d.ts +2 -1
- package/tabs/lib/tabs.component.d.ts +7 -9
- package/tag/lib/tag.component.d.ts +2 -4
- package/tooltip/lib/tooltip.component.d.ts +3 -6
- package/tooltip/lib/tooltip.directive.d.ts +11 -17
- package/uploader/index.d.ts +3 -1
- package/uploader/lib/uploader-drop-zone.component.d.ts +6 -0
- package/uploader/lib/uploader-list.component.d.ts +6 -0
- package/uploader/lib/uploader-overlay.component.d.ts +6 -0
- package/uploader/lib/uploader.module.d.ts +7 -4
- package/color-picker/README.md +0 -3
- package/color-picker/index.d.ts +0 -2
- package/color-picker/lib/color-picker.component.d.ts +0 -191
- package/color-picker/lib/color-picker.module.d.ts +0 -18
- package/common/lib/classes/drawing.class.d.ts +0 -9
- package/common/lib/constant/positions.d.ts +0 -75
- package/common/lib/services/custom-cdk-overlay.service.d.ts +0 -19
- package/common/lib/services/overlay.service.d.ts +0 -34
- package/date-picker/README.md +0 -3
- package/date-picker/index.d.ts +0 -2
- package/date-picker/lib/datepicker.component.d.ts +0 -40
- package/date-picker/lib/datepicker.module.d.ts +0 -15
- package/esm2022/color-picker/index.mjs +0 -3
- package/esm2022/color-picker/lib/color-picker.component.mjs +0 -116
- package/esm2022/color-picker/lib/color-picker.module.mjs +0 -61
- package/esm2022/common/lib/classes/data.class.mjs +0 -2
- package/esm2022/common/lib/classes/drawing.class.mjs +0 -2
- package/esm2022/common/lib/constant/positions.mjs +0 -75
- package/esm2022/common/lib/services/custom-cdk-overlay.service.mjs +0 -49
- package/esm2022/common/lib/services/overlay.service.mjs +0 -113
- package/esm2022/date-picker/acorex-components-date-picker.mjs +0 -5
- package/esm2022/date-picker/index.mjs +0 -3
- package/esm2022/date-picker/lib/datepicker.component.mjs +0 -128
- package/esm2022/date-picker/lib/datepicker.module.mjs +0 -44
- package/esm2022/decorators/lib/clear-button.component.mjs +0 -58
- package/esm2022/decorators/lib/close-button.component.mjs +0 -43
- package/esm2022/decorators/lib/generic-content.component.mjs +0 -17
- package/esm2022/decorators/lib/icon.component.mjs +0 -26
- package/esm2022/mixin/lib/loading-mixin.class.mjs +0 -18
- package/esm2022/popover/lib/dropdown-component.class.mjs +0 -73
- package/esm2022/time-box/acorex-components-time-box.mjs +0 -5
- package/esm2022/time-box/index.mjs +0 -3
- package/esm2022/time-box/lib/time-box.component.mjs +0 -294
- package/esm2022/time-box/lib/time-box.module.mjs +0 -32
- package/esm2022/uploader/lib/uploader.component.mjs +0 -99
- package/fesm2022/acorex-components-color-picker.mjs +0 -178
- package/fesm2022/acorex-components-color-picker.mjs.map +0 -1
- package/fesm2022/acorex-components-date-picker.mjs +0 -173
- package/fesm2022/acorex-components-date-picker.mjs.map +0 -1
- package/fesm2022/acorex-components-time-box.mjs +0 -329
- package/fesm2022/acorex-components-time-box.mjs.map +0 -1
- package/mixin/lib/loading-mixin.class.d.ts +0 -40
- package/popover/lib/dropdown-component.class.d.ts +0 -17
- package/time-box/README.md +0 -3
- package/time-box/index.d.ts +0 -2
- package/time-box/lib/time-box.component.d.ts +0 -50
- package/time-box/lib/time-box.module.d.ts +0 -11
- package/uploader/lib/uploader.component.d.ts +0 -28
- /package/common/lib/{classes/data.class.d.ts → types/range.d.ts} +0 -0
- /package/decorators/lib/{clear-button.component.d.ts → components/clear-button.component.d.ts} +0 -0
- /package/decorators/lib/{close-button.component.d.ts → components/close-button.component.d.ts} +0 -0
- /package/decorators/lib/{generic-content.component.d.ts → components/generic-content.component.d.ts} +0 -0
- /package/decorators/lib/{icon.component.d.ts → components/icon.component.d.ts} +0 -0
@@ -9,10 +9,10 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
9
9
|
import { CommonModule } from '@angular/common';
|
10
10
|
|
11
11
|
class AXMaskOptionsDirective {
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
13
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXMaskOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
13
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXMaskOptionsDirective, selector: "ax-mask-options", inputs: { mask: "mask", updateValue: "updateValue" }, ngImport: i0 }); }
|
14
14
|
}
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXMaskOptionsDirective, decorators: [{
|
16
16
|
type: Directive,
|
17
17
|
args: [{
|
18
18
|
selector: 'ax-mask-options',
|
@@ -71,8 +71,8 @@ class AXTextBoxComponent extends MXInputBaseValueComponent {
|
|
71
71
|
_handleModelChange(value) {
|
72
72
|
this.commitValue(value, true);
|
73
73
|
}
|
74
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
75
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.
|
74
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTextBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
75
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXTextBoxComponent, selector: "ax-text-box", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", value: "value", state: "state", name: "name", id: "id", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", type: "type", autoComplete: "autoComplete", maskOptions: ["mask-options", "maskOptions"] }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", readonlyChange: "readonlyChange", disabledChange: "disabledChange" }, host: { classAttribute: "ax-editor-container" }, providers: [
|
76
76
|
{ provide: AXComponent, useExisting: AXTextBoxComponent },
|
77
77
|
{ provide: AXFocusableComponent, useExisting: AXTextBoxComponent },
|
78
78
|
{ provide: AXClearableComponent, useExisting: AXTextBoxComponent },
|
@@ -84,7 +84,7 @@ class AXTextBoxComponent extends MXInputBaseValueComponent {
|
|
84
84
|
}
|
85
85
|
], queries: [{ propertyName: "_maskOptionsContent", first: true, predicate: AXMaskOptionsDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\n</ng-content>\n<input #input class=\"ax-input\" [id]=\"id\" [name]=\"name\" [attr.autocomplete]=\"autoComplete\" [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\n [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\" [ngModelOptions]=\"{ updateOn:_updateOn }\"\n (keydown)=\"emitOnKeydownEvent($event)\" (keyup)=\"emitOnKeyupEvent($event)\" (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\" (blur)=\"emitOnBlurEvent($event)\">\n<ng-content select=\"ax-clear-button\"></ng-content>\n<ng-content select=\"ax-suffix\">\n</ng-content>\n<ng-content select=\"ax-validation-rule\">\n</ng-content>", dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
86
86
|
}
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTextBoxComponent, decorators: [{
|
88
88
|
type: Component,
|
89
89
|
args: [{ selector: 'ax-text-box', inputs: [
|
90
90
|
'disabled',
|
@@ -128,19 +128,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImpor
|
|
128
128
|
}] } });
|
129
129
|
|
130
130
|
class AXTextBoxModule {
|
131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
132
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTextBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
132
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXTextBoxModule, declarations: [AXTextBoxComponent, AXMaskOptionsDirective], imports: [CommonModule,
|
133
133
|
AXCommonModule,
|
134
134
|
FormsModule,
|
135
135
|
AXButtonModule,
|
136
136
|
AXDecoratorModule], exports: [AXTextBoxComponent, AXMaskOptionsDirective] }); }
|
137
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
137
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTextBoxModule, imports: [CommonModule,
|
138
138
|
AXCommonModule,
|
139
139
|
FormsModule,
|
140
140
|
AXButtonModule,
|
141
141
|
AXDecoratorModule] }); }
|
142
142
|
}
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTextBoxModule, decorators: [{
|
144
144
|
type: NgModule,
|
145
145
|
args: [{
|
146
146
|
imports: [
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding,
|
2
|
+
import { InjectionToken, inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, Injectable, NgModule } from '@angular/core';
|
3
|
+
import { AX_GLOBAL_CONFIG } from '@acorex/core/config';
|
4
|
+
import { set } from 'lodash-es';
|
3
5
|
import { MXBaseComponent, AXClosbaleComponent } from '@acorex/components/common';
|
4
6
|
import * as i1 from '@angular/cdk/dialog';
|
5
7
|
import { DIALOG_DATA, Dialog, DialogModule } from '@angular/cdk/dialog';
|
@@ -13,7 +15,11 @@ import { GlobalPositionStrategy } from '@angular/cdk/overlay';
|
|
13
15
|
|
14
16
|
const AX_TOAST_CONFIG = new InjectionToken('AX_TOAST_CONFIG', {
|
15
17
|
providedIn: 'root',
|
16
|
-
factory: () =>
|
18
|
+
factory: () => {
|
19
|
+
const global = inject(AX_GLOBAL_CONFIG);
|
20
|
+
set(global, "layout.toast", AX_TOAST_CONFIG);
|
21
|
+
return AXToastDefaultConfig;
|
22
|
+
},
|
17
23
|
});
|
18
24
|
const AXToastDefaultConfig = {
|
19
25
|
gap: 5,
|
@@ -87,10 +93,10 @@ class AXToastComponent extends MXBaseComponent {
|
|
87
93
|
htmlElement: this.getHostElement(),
|
88
94
|
});
|
89
95
|
}
|
90
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
91
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXToastComponent, deps: [{ token: DIALOG_DATA }, { token: i1.DialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
97
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXToastComponent, selector: "ax-toast", host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], usesInheritance: true, ngImport: i0, template: "<span [class]=\"'ax-toast-icon {{_icon}}'\"></span>\n<div class=\"ax-toast-content\">\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"config.title && config.content\">{{ config.title }}</div>\n <div class=\"ax-toast-content\" [innerHTML]=\"config.content\"></div>\n</div>\n<ax-close-button *ngIf=\"config.closeButton\"></ax-close-button>\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"config.timeOut\"\n *ngIf=\"config.timeOutProgress && config.timeOut\"></div>", styles: [".ax-dark ax-toast.ax-primary{background-color:rgba(var(--ax-color-primary-600));color:rgba(var(--ax-color-primary-fore));border-color:rgba(var(--ax-color-primary-600))}.ax-dark ax-toast.ax-primary .ax-toast-title{color:rgba(var(--ax-color-primary-fore))}.ax-dark ax-toast.ax-primary ax-button[class$=blank]{color:rgba(var(--ax-color-primary-fore))}.ax-dark ax-toast.ax-primary .ax-toast-progress{background-color:rgba(var(--ax-color-primary-200))}.ax-dark ax-toast.ax-secondary{background-color:rgba(var(--ax-color-secondary-600));color:rgba(var(--ax-color-secondary-fore));border-color:rgba(var(--ax-color-secondary-600))}.ax-dark ax-toast.ax-secondary .ax-toast-title{color:rgba(var(--ax-color-secondary-fore))}.ax-dark ax-toast.ax-secondary ax-button[class$=blank]{color:rgba(var(--ax-color-secondary-fore))}.ax-dark ax-toast.ax-secondary .ax-toast-progress{background-color:rgba(var(--ax-color-secondary-200))}.ax-dark ax-toast.ax-success{background-color:rgba(var(--ax-color-success-600));color:rgba(var(--ax-color-success-fore));border-color:rgba(var(--ax-color-success-600))}.ax-dark ax-toast.ax-success .ax-toast-title{color:rgba(var(--ax-color-success-fore))}.ax-dark ax-toast.ax-success ax-button[class$=blank]{color:rgba(var(--ax-color-success-fore))}.ax-dark ax-toast.ax-success .ax-toast-progress{background-color:rgba(var(--ax-color-success-200))}.ax-dark ax-toast.ax-warning{background-color:rgba(var(--ax-color-warning-600));color:rgba(var(--ax-color-warning-fore));border-color:rgba(var(--ax-color-warning-600))}.ax-dark ax-toast.ax-warning .ax-toast-title{color:rgba(var(--ax-color-warning-fore))}.ax-dark ax-toast.ax-warning ax-button[class$=blank]{color:rgba(var(--ax-color-warning-fore))}.ax-dark ax-toast.ax-warning .ax-toast-progress{background-color:rgba(var(--ax-color-warning-200))}.ax-dark ax-toast.ax-danger{background-color:rgba(var(--ax-color-danger-600));color:rgba(var(--ax-color-danger-fore));border-color:rgba(var(--ax-color-danger-600))}.ax-dark ax-toast.ax-danger .ax-toast-title{color:rgba(var(--ax-color-danger-fore))}.ax-dark ax-toast.ax-danger ax-button[class$=blank]{color:rgba(var(--ax-color-danger-fore))}.ax-dark ax-toast.ax-danger .ax-toast-progress{background-color:rgba(var(--ax-color-danger-200))}.ax-dark ax-toast.ax-info{background-color:rgba(var(--ax-color-info-600));color:rgba(var(--ax-color-info-fore));border-color:rgba(var(--ax-color-info-600))}.ax-dark ax-toast.ax-info .ax-toast-title{color:rgba(var(--ax-color-info-fore))}.ax-dark ax-toast.ax-info ax-button[class$=blank]{color:rgba(var(--ax-color-info-fore))}.ax-dark ax-toast.ax-info .ax-toast-progress{background-color:rgba(var(--ax-color-info-200))}ax-toast{width:max(20vw,380px);display:flex;padding:.75rem 1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;background-color:rgba(var(--ax-color-black));color:rgba(var(--ax-color-white));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}ax-toast.ax-primary{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-toast.ax-primary .ax-toast-progress{background-color:rgba(var(--ax-color-primary-800))}ax-toast.ax-secondary{background-color:rgba(var(--ax-color-secondary-500));color:rgba(var(--ax-color-secondary-fore))}ax-toast.ax-secondary .ax-toast-progress{background-color:rgba(var(--ax-color-secondary-800))}ax-toast.ax-success{background-color:rgba(var(--ax-color-success-500));color:rgba(var(--ax-color-success-fore))}ax-toast.ax-success .ax-toast-progress{background-color:rgba(var(--ax-color-success-800))}ax-toast.ax-warning{background-color:rgba(var(--ax-color-warning-500));color:rgba(var(--ax-color-warning-fore))}ax-toast.ax-warning .ax-toast-progress{background-color:rgba(var(--ax-color-warning-800))}ax-toast.ax-danger{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}ax-toast.ax-danger .ax-toast-progress{background-color:rgba(var(--ax-color-danger-800))}ax-toast.ax-info{background-color:rgba(var(--ax-color-info-500));color:rgba(var(--ax-color-info-fore))}ax-toast.ax-info .ax-toast-progress{background-color:rgba(var(--ax-color-info-800))}@media (max-width: 599px){ax-toast{width:98vw}}ax-toast .ax-toast-icon,ax-toast .ax-icon-close{font-size:1.25rem}ax-toast .ax-toast-icon{padding-inline-end:.75rem}ax-toast .ax-toast-content{display:flex;flex-direction:column;flex:1}ax-toast .ax-toast-content .ax-toast-title{font-weight:500}ax-toast .ax-toast-content .ax-toast-title.ax-mb-2{margin-bottom:.5rem}ax-toast .ax-toast-content .ax-toast-buttons{margin:.75rem 0;display:flex;gap:.5rem}ax-toast .ax-toast-content .ax-toast-buttons ax-button{color:inherit!important;margin-inline-end:.5rem}ax-toast .ax-toast-content .ax-toast-buttons ax-button[class*=default]{background-color:#fff3!important;border-color:transparent!important}ax-toast .ax-toast-content .ax-toast-buttons ax-button[class*=outline]{background-color:transparent!important;color:inherit!important;border-color:currentColor!important;border:2px solid}ax-toast .ax-toast-content .ax-toast-buttons ax-button[class*=blank]{background-color:transparent!important;color:inherit!important}ax-toast ax-icon-close{height:-moz-fit-content;height:fit-content}ax-toast ax-icon-close:hover{opacity:.6}ax-toast .ax-toast-progress{position:absolute;right:0;left:0;bottom:0;height:.25rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:#ffffff75}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
92
98
|
}
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXToastComponent, decorators: [{
|
94
100
|
type: Component,
|
95
101
|
args: [{ selector: 'ax-toast', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], template: "<span [class]=\"'ax-toast-icon {{_icon}}'\"></span>\n<div class=\"ax-toast-content\">\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"config.title && config.content\">{{ config.title }}</div>\n <div class=\"ax-toast-content\" [innerHTML]=\"config.content\"></div>\n</div>\n<ax-close-button *ngIf=\"config.closeButton\"></ax-close-button>\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"config.timeOut\"\n *ngIf=\"config.timeOutProgress && config.timeOut\"></div>", styles: [".ax-dark ax-toast.ax-primary{background-color:rgba(var(--ax-color-primary-600));color:rgba(var(--ax-color-primary-fore));border-color:rgba(var(--ax-color-primary-600))}.ax-dark ax-toast.ax-primary .ax-toast-title{color:rgba(var(--ax-color-primary-fore))}.ax-dark ax-toast.ax-primary ax-button[class$=blank]{color:rgba(var(--ax-color-primary-fore))}.ax-dark ax-toast.ax-primary .ax-toast-progress{background-color:rgba(var(--ax-color-primary-200))}.ax-dark ax-toast.ax-secondary{background-color:rgba(var(--ax-color-secondary-600));color:rgba(var(--ax-color-secondary-fore));border-color:rgba(var(--ax-color-secondary-600))}.ax-dark ax-toast.ax-secondary .ax-toast-title{color:rgba(var(--ax-color-secondary-fore))}.ax-dark ax-toast.ax-secondary ax-button[class$=blank]{color:rgba(var(--ax-color-secondary-fore))}.ax-dark ax-toast.ax-secondary .ax-toast-progress{background-color:rgba(var(--ax-color-secondary-200))}.ax-dark ax-toast.ax-success{background-color:rgba(var(--ax-color-success-600));color:rgba(var(--ax-color-success-fore));border-color:rgba(var(--ax-color-success-600))}.ax-dark ax-toast.ax-success .ax-toast-title{color:rgba(var(--ax-color-success-fore))}.ax-dark ax-toast.ax-success ax-button[class$=blank]{color:rgba(var(--ax-color-success-fore))}.ax-dark ax-toast.ax-success .ax-toast-progress{background-color:rgba(var(--ax-color-success-200))}.ax-dark ax-toast.ax-warning{background-color:rgba(var(--ax-color-warning-600));color:rgba(var(--ax-color-warning-fore));border-color:rgba(var(--ax-color-warning-600))}.ax-dark ax-toast.ax-warning .ax-toast-title{color:rgba(var(--ax-color-warning-fore))}.ax-dark ax-toast.ax-warning ax-button[class$=blank]{color:rgba(var(--ax-color-warning-fore))}.ax-dark ax-toast.ax-warning .ax-toast-progress{background-color:rgba(var(--ax-color-warning-200))}.ax-dark ax-toast.ax-danger{background-color:rgba(var(--ax-color-danger-600));color:rgba(var(--ax-color-danger-fore));border-color:rgba(var(--ax-color-danger-600))}.ax-dark ax-toast.ax-danger .ax-toast-title{color:rgba(var(--ax-color-danger-fore))}.ax-dark ax-toast.ax-danger ax-button[class$=blank]{color:rgba(var(--ax-color-danger-fore))}.ax-dark ax-toast.ax-danger .ax-toast-progress{background-color:rgba(var(--ax-color-danger-200))}.ax-dark ax-toast.ax-info{background-color:rgba(var(--ax-color-info-600));color:rgba(var(--ax-color-info-fore));border-color:rgba(var(--ax-color-info-600))}.ax-dark ax-toast.ax-info .ax-toast-title{color:rgba(var(--ax-color-info-fore))}.ax-dark ax-toast.ax-info ax-button[class$=blank]{color:rgba(var(--ax-color-info-fore))}.ax-dark ax-toast.ax-info .ax-toast-progress{background-color:rgba(var(--ax-color-info-200))}ax-toast{width:max(20vw,380px);display:flex;padding:.75rem 1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;background-color:rgba(var(--ax-color-black));color:rgba(var(--ax-color-white));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}ax-toast.ax-primary{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-toast.ax-primary .ax-toast-progress{background-color:rgba(var(--ax-color-primary-800))}ax-toast.ax-secondary{background-color:rgba(var(--ax-color-secondary-500));color:rgba(var(--ax-color-secondary-fore))}ax-toast.ax-secondary .ax-toast-progress{background-color:rgba(var(--ax-color-secondary-800))}ax-toast.ax-success{background-color:rgba(var(--ax-color-success-500));color:rgba(var(--ax-color-success-fore))}ax-toast.ax-success .ax-toast-progress{background-color:rgba(var(--ax-color-success-800))}ax-toast.ax-warning{background-color:rgba(var(--ax-color-warning-500));color:rgba(var(--ax-color-warning-fore))}ax-toast.ax-warning .ax-toast-progress{background-color:rgba(var(--ax-color-warning-800))}ax-toast.ax-danger{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}ax-toast.ax-danger .ax-toast-progress{background-color:rgba(var(--ax-color-danger-800))}ax-toast.ax-info{background-color:rgba(var(--ax-color-info-500));color:rgba(var(--ax-color-info-fore))}ax-toast.ax-info .ax-toast-progress{background-color:rgba(var(--ax-color-info-800))}@media (max-width: 599px){ax-toast{width:98vw}}ax-toast .ax-toast-icon,ax-toast .ax-icon-close{font-size:1.25rem}ax-toast .ax-toast-icon{padding-inline-end:.75rem}ax-toast .ax-toast-content{display:flex;flex-direction:column;flex:1}ax-toast .ax-toast-content .ax-toast-title{font-weight:500}ax-toast .ax-toast-content .ax-toast-title.ax-mb-2{margin-bottom:.5rem}ax-toast .ax-toast-content .ax-toast-buttons{margin:.75rem 0;display:flex;gap:.5rem}ax-toast .ax-toast-content .ax-toast-buttons ax-button{color:inherit!important;margin-inline-end:.5rem}ax-toast .ax-toast-content .ax-toast-buttons ax-button[class*=default]{background-color:#fff3!important;border-color:transparent!important}ax-toast .ax-toast-content .ax-toast-buttons ax-button[class*=outline]{background-color:transparent!important;color:inherit!important;border-color:currentColor!important;border:2px solid}ax-toast .ax-toast-content .ax-toast-buttons ax-button[class*=blank]{background-color:transparent!important;color:inherit!important}ax-toast ax-icon-close{height:-moz-fit-content;height:fit-content}ax-toast ax-icon-close:hover{opacity:.6}ax-toast .ax-toast-progress{position:absolute;right:0;left:0;bottom:0;height:.25rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:#ffffff75}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"] }]
|
96
102
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
@@ -214,27 +220,31 @@ class AXToastService {
|
|
214
220
|
return list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight;
|
215
221
|
}
|
216
222
|
}
|
217
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
218
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
223
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
224
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXToastService }); }
|
219
225
|
}
|
220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXToastService, decorators: [{
|
221
227
|
type: Injectable
|
222
228
|
}] });
|
223
229
|
|
224
230
|
const COMPONENT = [AXToastComponent];
|
225
231
|
const MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, DialogModule];
|
226
232
|
class AXToastModule {
|
227
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
228
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
229
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
234
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXToastModule, declarations: [AXToastComponent], imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, DialogModule], exports: [AXToastComponent] }); }
|
235
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXToastModule, providers: [
|
236
|
+
AXToastService,
|
237
|
+
], imports: [MODULES] }); }
|
230
238
|
}
|
231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXToastModule, decorators: [{
|
232
240
|
type: NgModule,
|
233
241
|
args: [{
|
234
242
|
declarations: [...COMPONENT],
|
235
243
|
imports: [...MODULES],
|
236
244
|
exports: [...COMPONENT],
|
237
|
-
providers: [
|
245
|
+
providers: [
|
246
|
+
AXToastService,
|
247
|
+
],
|
238
248
|
}]
|
239
249
|
}] });
|
240
250
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../libs/components/toast/src/lib/toast.config.ts","../../../../libs/components/toast/src/lib/toast.component.ts","../../../../libs/components/toast/src/lib/toast.component.html","../../../../libs/components/toast/src/lib/toast.service.ts","../../../../libs/components/toast/src/lib/toast.module.ts","../../../../libs/components/toast/src/acorex-components-toast.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { AXLocation } from '@acorex/components/common';\n\n\nexport interface AXToastConfig {\n gap: number,\n timeOut: number,\n timeOutProgress: boolean,\n location: AXLocation,\n}\n\nexport const AX_TOAST_CONFIG = new InjectionToken<AXToastConfig>(\n 'AX_TOAST_CONFIG',\n {\n providedIn: 'root',\n factory: () => AXToastDefaultConfig,\n }\n);\n\n\nexport const AXToastDefaultConfig: AXToastConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n location: 'bottom-center',\n};\n\n\nexport type PartialToastConfig = Partial<AXToastConfig>;\n\nexport function toastConfig(config: PartialToastConfig = {}): AXToastConfig {\n const result = {\n ...AXToastDefaultConfig,\n ...config,\n };\n return result\n}","import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { AXButtonItem } from '@acorex/components/button';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { AXToastData } from './toast.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-toast',\n templateUrl: './toast.component.html',\n styleUrls: ['./toast.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\n})\nexport class AXToastComponent extends MXBaseComponent {\n\n protected _toastWidth: number = 100;\n\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXToastData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n\n ngOnInit() {\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\n if (!this.config.icon) {\n switch (this.config.color) {\n case 'success':\n this._icon = 'ax-icon ax-icon-check-circle-fill';\n break;\n case 'warning':\n this._icon = 'ax-icon ax-icon-warning-fill';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error-fill';\n break;\n case 'info':\n this._icon = 'ax-icon ax-icon-info-fill';\n break;\n default:\n this._icon = this.config.icon || 'ax-icon ax-icon-check-circle-fill';\n break;\n }\n } else {\n this._icon = this.config.icon;\n }\n }\n\n _handleButtonClick(button: AXButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span [class]=\"'ax-toast-icon {{_icon}}'\"></span>\n<div class=\"ax-toast-content\">\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"config.title && config.content\">{{ config.title }}</div>\n <div class=\"ax-toast-content\" [innerHTML]=\"config.content\"></div>\n</div>\n<ax-close-button *ngIf=\"config.closeButton\"></ax-close-button>\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"config.timeOut\"\n *ngIf=\"config.timeOutProgress && config.timeOut\"></div>","import { Injectable, inject } from '@angular/core';\nimport { AXToastDisplayConfig, AXToastRef } from './toast.class';\nimport { AXToastComponent } from './toast.component';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { AXToastConfig, AX_TOAST_CONFIG } from './toast.config';\n\n\n\n@Injectable()\nexport class AXToastService {\n\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXToastConfig = inject(AX_TOAST_CONFIG);\n\n primary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'primary',\n content: content\n });\n }\n secondary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'secondary',\n content: content\n });\n }\n success(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'success',\n content: content\n });\n }\n\n warning(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'warning',\n content: content\n });\n }\n danger(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'danger',\n content: content\n });\n }\n show(config: AXToastDisplayConfig): AXToastRef {\n const opt = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location\n },\n config\n );\n const gap = this.defaultConfig.gap;\n\n let positionStrategy = new GlobalPositionStrategy();\n const pos = this.getPosition(opt.location) + gap + 'px';\n switch (opt.location) {\n case 'bottom-center':\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally()\n break;\n case 'bottom-end':\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\n break;\n case 'bottom-start':\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\n break;\n case 'top-center':\n positionStrategy = positionStrategy.top(pos).centerHorizontally()\n break;\n case 'top-end':\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\n break;\n case 'top-start':\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\n break;\n case 'center-start':\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\n break;\n case 'center-end':\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\n break;\n }\n\n const dialogRef = this.dialog.open(AXToastComponent, {\n data: config,\n autoFocus: \"__no_element__\",\n restoreFocus: true,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy: positionStrategy\n });\n\n const toastRef = dialogRef.componentInstance as AXToastComponent;\n dialogRef.closed.subscribe(() => {\n this.reposition();\n })\n\n return {\n close: () => {\n toastRef.close();\n }\n }\n }\n\n\n\n public hideAll() {\n this.dialog.closeAll();\n }\n\n private reposition(): void {\n //TODO: reposition vertically afer close toast\n }\n\n private getPosition(location: string) {\n const list = this.dialog.openDialogs.map(c => c.componentInstance as AXToastComponent).filter(c => c.config.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return window.innerHeight - list[list.length - 1].getHostElement().offsetTop;\n }\n else {\n return list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastService } from './toast.service';\n\nconst COMPONENT = [AXToastComponent];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, DialogModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXToastService],\n})\nexport class AXToastModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,eAAe,GAAG,IAAI,cAAc,CAC7C,iBAAiB,EACjB;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,oBAAoB;AACtC,CAAA,EACH;AAGW,MAAA,oBAAoB,GAAkB;AAC/C,IAAA,GAAG,EAAE,CAAC;AACN,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,QAAQ,EAAE,eAAe;EAC3B;AAKc,SAAA,WAAW,CAAC,MAAA,GAA6B,EAAE,EAAA;AACvD,IAAA,MAAM,MAAM,GAAG;AACX,QAAA,GAAG,oBAAoB;AACvB,QAAA,GAAG,MAAM;KACZ,CAAC;AACF,IAAA,OAAO,MAAM,CAAA;AACjB;;ACxBA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,eAAe,CAAA;AAMnD;;AAEE;IACF,WAES,CAAA,MAAmB,EAClB,SAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE,CAAC;QAHD,IAAM,CAAA,MAAA,GAAN,MAAM,CAAa;QAClB,IAAS,CAAA,SAAA,GAAT,SAAS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oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../libs/components/toast/src/lib/toast.config.ts","../../../../libs/components/toast/src/lib/toast.component.ts","../../../../libs/components/toast/src/lib/toast.component.html","../../../../libs/components/toast/src/lib/toast.service.ts","../../../../libs/components/toast/src/lib/toast.module.ts","../../../../libs/components/toast/src/acorex-components-toast.ts"],"sourcesContent":["import { InjectionToken, inject } from '@angular/core';\nimport { AXLocation } from '@acorex/components/common';\nimport { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { set } from 'lodash-es';\n\n\nexport interface AXToastConfig {\n gap: number,\n timeOut: number,\n timeOutProgress: boolean,\n location: AXLocation,\n}\n\nexport const AX_TOAST_CONFIG = new InjectionToken<AXToastConfig>(\n 'AX_TOAST_CONFIG',\n {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, \"layout.toast\", AX_TOAST_CONFIG);\n return AXToastDefaultConfig;\n },\n }\n);\n\n\nexport const AXToastDefaultConfig: AXToastConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n location: 'bottom-center',\n};\n\n\nexport type PartialToastConfig = Partial<AXToastConfig>;\n\nexport function toastConfig(config: PartialToastConfig = {}): AXToastConfig {\n const result = {\n ...AXToastDefaultConfig,\n ...config,\n };\n return result\n}","import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { AXButtonItem } from '@acorex/components/button';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { AXToastData } from './toast.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-toast',\n templateUrl: './toast.component.html',\n styleUrls: ['./toast.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\n})\nexport class AXToastComponent extends MXBaseComponent {\n\n protected _toastWidth: number = 100;\n\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXToastData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n\n ngOnInit() {\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\n if (!this.config.icon) {\n switch (this.config.color) {\n case 'success':\n this._icon = 'ax-icon ax-icon-check-circle-fill';\n break;\n case 'warning':\n this._icon = 'ax-icon ax-icon-warning-fill';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error-fill';\n break;\n case 'info':\n this._icon = 'ax-icon ax-icon-info-fill';\n break;\n default:\n this._icon = this.config.icon || 'ax-icon ax-icon-check-circle-fill';\n break;\n }\n } else {\n this._icon = this.config.icon;\n }\n }\n\n _handleButtonClick(button: AXButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span [class]=\"'ax-toast-icon {{_icon}}'\"></span>\n<div class=\"ax-toast-content\">\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"config.title && config.content\">{{ config.title }}</div>\n <div class=\"ax-toast-content\" [innerHTML]=\"config.content\"></div>\n</div>\n<ax-close-button *ngIf=\"config.closeButton\"></ax-close-button>\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"config.timeOut\"\n *ngIf=\"config.timeOutProgress && config.timeOut\"></div>","import { Injectable, inject } from '@angular/core';\nimport { AXToastDisplayConfig, AXToastRef } from './toast.class';\nimport { AXToastComponent } from './toast.component';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { AXToastConfig, AX_TOAST_CONFIG } from './toast.config';\n\n\n\n@Injectable()\nexport class AXToastService {\n\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXToastConfig = inject(AX_TOAST_CONFIG);\n\n primary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'primary',\n content: content\n });\n }\n secondary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'secondary',\n content: content\n });\n }\n success(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'success',\n content: content\n });\n }\n\n warning(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'warning',\n content: content\n });\n }\n danger(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'danger',\n content: content\n });\n }\n show(config: AXToastDisplayConfig): AXToastRef {\n const opt = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location\n },\n config\n );\n const gap = this.defaultConfig.gap;\n\n let positionStrategy = new GlobalPositionStrategy();\n const pos = this.getPosition(opt.location) + gap + 'px';\n switch (opt.location) {\n case 'bottom-center':\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally()\n break;\n case 'bottom-end':\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\n break;\n case 'bottom-start':\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\n break;\n case 'top-center':\n positionStrategy = positionStrategy.top(pos).centerHorizontally()\n break;\n case 'top-end':\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\n break;\n case 'top-start':\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\n break;\n case 'center-start':\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\n break;\n case 'center-end':\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\n break;\n }\n\n const dialogRef = this.dialog.open(AXToastComponent, {\n data: config,\n autoFocus: \"__no_element__\",\n restoreFocus: true,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy: positionStrategy\n });\n\n const toastRef = dialogRef.componentInstance as AXToastComponent;\n dialogRef.closed.subscribe(() => {\n this.reposition();\n })\n\n return {\n close: () => {\n toastRef.close();\n }\n }\n }\n\n\n\n public hideAll() {\n this.dialog.closeAll();\n }\n\n private reposition(): void {\n //TODO: reposition vertically afer close toast\n }\n\n private getPosition(location: string) {\n const list = this.dialog.openDialogs.map(c => c.componentInstance as AXToastComponent).filter(c => c.config.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return window.innerHeight - list[list.length - 1].getHostElement().offsetTop;\n }\n else {\n return list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastService } from './toast.service';\n\nconst COMPONENT = [AXToastComponent];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, DialogModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [\n AXToastService,\n ],\n})\nexport class AXToastModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAaa,eAAe,GAAG,IAAI,cAAc,CAC7C,iBAAiB,EACjB;AACI,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACV,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,gB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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAXP,YAAA,EAAA,CAAA,gBAAgB,CAClB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,aAD5E,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;AAWtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAJb,SAAA,EAAA;YACT,cAAc;AACf,SAAA,EAAA,OAAA,EAAA,CAJY,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAMT,aAAa,EAAA,UAAA,EAAA,CAAA;kBARzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE;wBACT,cAAc;AACf,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
@@ -1,188 +1,76 @@
|
|
1
|
-
import {
|
1
|
+
import { MXBaseComponent, convertToPlacement } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { Component, ViewEncapsulation, Input,
|
4
|
-
import
|
5
|
-
import { OverlayModule } from '@angular/cdk/overlay';
|
6
|
-
import { ComponentPortal } from '@angular/cdk/portal';
|
7
|
-
import { AXPositions } from '@acorex/components/common';
|
3
|
+
import { Component, ViewEncapsulation, Input, TemplateRef, Directive, NgModule } from '@angular/core';
|
4
|
+
import { AXPopoverComponent } from '@acorex/components/popover';
|
8
5
|
import { CommonModule } from '@angular/common';
|
6
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
9
7
|
|
10
|
-
class AXTooltipComponent extends
|
11
|
-
|
12
|
-
|
13
|
-
this.text = '';
|
14
|
-
}
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTooltipComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div>\n</div>\n", styles: [".ax-dark .ax-tooltip-container{--ax-tooltip-background: 255, 255, 255;--ax-tooltip-color: 97, 97, 97}.ax-tooltip-container{position:relative;--ax-tooltip-background: 97, 97, 97;--ax-tooltip-color: 255, 255, 255}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgba(var(--ax-tooltip-background));color:rgba(var(--ax-tooltip-color));border-radius:.25rem;font-size:.75rem;font-weight:400}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
8
|
+
class AXTooltipComponent extends MXBaseComponent {
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTooltipComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <!-- <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div> -->\n</div>", styles: [".ax-dark .ax-tooltip-container{--ax-tooltip-background: 255, 255, 255;--ax-tooltip-color: 97, 97, 97}.ax-tooltip-container{position:relative;--ax-tooltip-background: 97, 97, 97;--ax-tooltip-color: 255, 255, 255}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgba(var(--ax-tooltip-background));color:rgba(var(--ax-tooltip-color));border-radius:.25rem;font-size:.75rem;font-weight:400}.ax-tooltip-container .ax-tooltip-tringle{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(var(--ax-tooltip-background));position:absolute}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-bottom{transform:rotate(180deg);left:0;right:0;margin:auto;top:-5px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-right{transform:rotate(90deg);top:0;bottom:0;margin:auto;left:-7px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-top{transform:rotate(0);left:0;right:0;margin:auto}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-left{transform:rotate(270deg);top:0;bottom:0;margin:auto;right:-7px}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
17
11
|
}
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTooltipComponent, decorators: [{
|
19
13
|
type: Component,
|
20
|
-
args: [{ selector: 'ax-tooltip', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div
|
21
|
-
}],
|
14
|
+
args: [{ selector: 'ax-tooltip', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <!-- <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div> -->\n</div>", styles: [".ax-dark .ax-tooltip-container{--ax-tooltip-background: 255, 255, 255;--ax-tooltip-color: 97, 97, 97}.ax-tooltip-container{position:relative;--ax-tooltip-background: 97, 97, 97;--ax-tooltip-color: 255, 255, 255}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgba(var(--ax-tooltip-background));color:rgba(var(--ax-tooltip-color));border-radius:.25rem;font-size:.75rem;font-weight:400}.ax-tooltip-container .ax-tooltip-tringle{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(var(--ax-tooltip-background));position:absolute}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-bottom{transform:rotate(180deg);left:0;right:0;margin:auto;top:-5px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-right{transform:rotate(90deg);top:0;bottom:0;margin:auto;left:-7px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-top{transform:rotate(0);left:0;right:0;margin:auto}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-left{transform:rotate(270deg);top:0;bottom:0;margin:auto;right:-7px}\n"] }]
|
15
|
+
}], propDecorators: { text: [{
|
22
16
|
type: Input
|
23
17
|
}], position: [{
|
24
18
|
type: Input
|
25
19
|
}] } });
|
26
20
|
|
27
21
|
class AXTooltipDirective {
|
28
|
-
|
29
|
-
this.
|
30
|
-
this.overlayPositionBuilder = overlayPositionBuilder;
|
31
|
-
this.elementRef = elementRef;
|
32
|
-
this.cdr = cdr;
|
33
|
-
this.text = '';
|
34
|
-
this.position = 'top-center';
|
35
|
-
}
|
36
|
-
ngOnInit() {
|
37
|
-
//Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
38
|
-
//Add 'implements OnInit' to the class.
|
39
|
-
this.positioning();
|
22
|
+
get placement() {
|
23
|
+
return this._placement;
|
40
24
|
}
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
case 'top-start':
|
46
|
-
this.positions = [
|
47
|
-
{
|
48
|
-
...AXPositions.topStart,
|
49
|
-
offsetY: -offset,
|
50
|
-
},
|
51
|
-
];
|
52
|
-
break;
|
53
|
-
default:
|
54
|
-
case 'top-center':
|
55
|
-
this.positions = [
|
56
|
-
{
|
57
|
-
...AXPositions.topCenter,
|
58
|
-
offsetY: -offset,
|
59
|
-
},
|
60
|
-
];
|
61
|
-
break;
|
62
|
-
case 'top-end':
|
63
|
-
this.positions = [
|
64
|
-
{
|
65
|
-
...AXPositions.topEnd,
|
66
|
-
offsetY: -offset,
|
67
|
-
},
|
68
|
-
];
|
69
|
-
break;
|
70
|
-
case 'start-start':
|
71
|
-
this.positions = [
|
72
|
-
{
|
73
|
-
...AXPositions.startStart,
|
74
|
-
offsetX: -offset,
|
75
|
-
},
|
76
|
-
];
|
77
|
-
break;
|
78
|
-
case 'start-center':
|
79
|
-
this.positions = [
|
80
|
-
{
|
81
|
-
...AXPositions.startCenter,
|
82
|
-
offsetX: -offset,
|
83
|
-
},
|
84
|
-
];
|
85
|
-
break;
|
86
|
-
case 'start-end':
|
87
|
-
this.positions = [
|
88
|
-
{
|
89
|
-
...AXPositions.startEnd,
|
90
|
-
offsetX: -offset,
|
91
|
-
},
|
92
|
-
];
|
93
|
-
break;
|
94
|
-
case 'bottom-start':
|
95
|
-
this.positions = [
|
96
|
-
{
|
97
|
-
...AXPositions.bottomStart,
|
98
|
-
offsetY: offset,
|
99
|
-
},
|
100
|
-
];
|
101
|
-
break;
|
102
|
-
case 'bottom-center':
|
103
|
-
this.positions = [
|
104
|
-
{
|
105
|
-
...AXPositions.bottomCenter,
|
106
|
-
offsetY: offset,
|
107
|
-
},
|
108
|
-
];
|
109
|
-
break;
|
110
|
-
case 'bottom-end':
|
111
|
-
this.positions = [
|
112
|
-
{
|
113
|
-
...AXPositions.bottomEnd,
|
114
|
-
offsetY: offset,
|
115
|
-
},
|
116
|
-
];
|
117
|
-
break;
|
118
|
-
case 'end-start':
|
119
|
-
this.positions = [
|
120
|
-
{
|
121
|
-
...AXPositions.endStart,
|
122
|
-
offsetX: offset,
|
123
|
-
},
|
124
|
-
];
|
125
|
-
break;
|
126
|
-
case 'end-center':
|
127
|
-
this.positions = [
|
128
|
-
{
|
129
|
-
...AXPositions.endCenter,
|
130
|
-
offsetX: offset,
|
131
|
-
},
|
132
|
-
];
|
133
|
-
break;
|
134
|
-
case 'end-end':
|
135
|
-
this.positions = [
|
136
|
-
{
|
137
|
-
...AXPositions.endEnd,
|
138
|
-
offsetX: offset,
|
139
|
-
},
|
140
|
-
];
|
141
|
-
break;
|
25
|
+
set placement(v) {
|
26
|
+
this._placement = v;
|
27
|
+
if (this.popupRef) {
|
28
|
+
this.popupRef.placement = v;
|
142
29
|
}
|
143
|
-
const positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions(this.positions);
|
144
|
-
this.overlayRef = this.overlay.create({ positionStrategy });
|
145
30
|
}
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
});
|
31
|
+
constructor(elementRef, vc) {
|
32
|
+
this.elementRef = elementRef;
|
33
|
+
this.vc = vc;
|
34
|
+
this._placement = convertToPlacement("top");
|
35
|
+
this.popupRef = this.vc.createComponent(AXPopoverComponent).instance;
|
36
|
+
this.popupRef.target = this.elementRef.nativeElement;
|
153
37
|
}
|
154
|
-
|
155
|
-
this.
|
156
|
-
this.
|
38
|
+
ngOnInit() {
|
39
|
+
this.popupRef.target = this.elementRef.nativeElement;
|
40
|
+
this.popupRef.openOn = 'hover';
|
41
|
+
this.popupRef.closeOn = 'leave';
|
42
|
+
this.popupRef.placement = this.placement;
|
43
|
+
if (typeof this.content === 'string') {
|
44
|
+
this.popupRef.content = AXTooltipComponent;
|
45
|
+
this.popupRef.context = { text: this.content };
|
46
|
+
}
|
47
|
+
else if (this.content instanceof TemplateRef) {
|
48
|
+
this.popupRef.content = this.content;
|
49
|
+
//this.popupRef.context = { text: this.content };
|
50
|
+
}
|
157
51
|
}
|
158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
159
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
53
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.9", type: AXTooltipDirective, selector: "[axTooltip]", inputs: { content: ["axTooltip", "content"], placement: ["axTooltipPlacement", "placement"] }, ngImport: i0 }); }
|
160
54
|
}
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTooltipDirective, decorators: [{
|
162
56
|
type: Directive,
|
163
57
|
args: [{ selector: '[axTooltip]' }]
|
164
|
-
}], ctorParameters: function () { return [{ type:
|
58
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { content: [{
|
165
59
|
type: Input,
|
166
60
|
args: ['axTooltip']
|
167
|
-
}],
|
61
|
+
}], placement: [{
|
168
62
|
type: Input,
|
169
|
-
args: ['
|
170
|
-
}], show: [{
|
171
|
-
type: HostListener,
|
172
|
-
args: ['mouseenter']
|
173
|
-
}], hide: [{
|
174
|
-
type: HostListener,
|
175
|
-
args: ['mouseleave']
|
63
|
+
args: ['axTooltipPlacement']
|
176
64
|
}] } });
|
177
65
|
|
178
66
|
const COMPONENT = [AXTooltipComponent, AXTooltipDirective];
|
179
67
|
const MODULES = [CommonModule, OverlayModule];
|
180
68
|
class AXTooltipModule {
|
181
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
182
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
183
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
70
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXTooltipModule, declarations: [AXTooltipComponent, AXTooltipDirective], imports: [CommonModule, OverlayModule], exports: [AXTooltipComponent, AXTooltipDirective] }); }
|
71
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTooltipModule, imports: [MODULES] }); }
|
184
72
|
}
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXTooltipModule, decorators: [{
|
186
74
|
type: NgModule,
|
187
75
|
args: [{
|
188
76
|
declarations: [...COMPONENT],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../libs/components/tooltip/src/lib/tooltip.component.ts","../../../../libs/components/tooltip/src/lib/tooltip.component.html","../../../../libs/components/tooltip/src/lib/tooltip.directive.ts","../../../../libs/components/tooltip/src/lib/tooltip.module.ts","../../../../libs/components/tooltip/src/acorex-components-tooltip.ts"],"sourcesContent":["import { AXPosition } from '@acorex/components/common';\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\nimport { Component, ViewEncapsulation, ElementRef, ChangeDetectorRef, Input } from '@angular/core';\n\n@Component({\n selector: 'ax-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXTooltipComponent extends AXBaseComponentMixin {\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\n super(elementRef, cdr);\n }\n\n @Input()\n text: string = '';\n\n @Input() position: AXPosition;\n}\n","<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div>\n</div>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n ComponentRef,\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnInit,\n} from '@angular/core';\nimport { Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { AXTooltipComponent } from './tooltip.component';\nimport { AXPosition, AXPositions } from '@acorex/components/common';\n\n@Directive({ selector: '[axTooltip]' })\nexport class AXTooltipDirective {\n @Input('axTooltip') text = '';\n @Input('axTooltipPosition') position: AXPosition = 'top-center';\n\n private overlayRef: OverlayRef;\n protected positions: any[];\n\n constructor(\n private overlay: Overlay,\n private overlayPositionBuilder: OverlayPositionBuilder,\n private elementRef: ElementRef,\n private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n //Called after the constructor, initializing input properties, and the first call to ngOnChanges.\n //Add 'implements OnInit' to the class.\n this.positioning();\n }\n ngAfterViewInit(): void {}\n\n protected positioning() {\n const offset = 8;\n switch (this.position) {\n case 'top-start':\n this.positions = [\n {\n ...AXPositions.topStart,\n offsetY: -offset,\n },\n ];\n break;\n default:\n case 'top-center':\n this.positions = [\n {\n ...AXPositions.topCenter,\n offsetY: -offset,\n },\n ];\n break;\n case 'top-end':\n this.positions = [\n {\n ...AXPositions.topEnd,\n offsetY: -offset,\n },\n ];\n break;\n\n case 'start-start':\n this.positions = [\n {\n ...AXPositions.startStart,\n offsetX: -offset,\n },\n ];\n break;\n\n case 'start-center':\n this.positions = [\n {\n ...AXPositions.startCenter,\n offsetX: -offset,\n },\n ];\n break;\n\n case 'start-end':\n this.positions = [\n {\n ...AXPositions.startEnd,\n offsetX: -offset,\n },\n ];\n break;\n\n case 'bottom-start':\n this.positions = [\n {\n ...AXPositions.bottomStart,\n offsetY: offset,\n },\n ];\n break;\n case 'bottom-center':\n this.positions = [\n {\n ...AXPositions.bottomCenter,\n offsetY: offset,\n },\n ];\n break;\n case 'bottom-end':\n this.positions = [\n {\n ...AXPositions.bottomEnd,\n offsetY: offset,\n },\n ];\n break;\n\n case 'end-start':\n this.positions = [\n {\n ...AXPositions.endStart,\n offsetX: offset,\n },\n ];\n break;\n case 'end-center':\n this.positions = [\n {\n ...AXPositions.endCenter,\n offsetX: offset,\n },\n ];\n break;\n case 'end-end':\n this.positions = [\n {\n ...AXPositions.endEnd,\n offsetX: offset,\n },\n ];\n break;\n }\n const positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions(this.positions);\n this.overlayRef = this.overlay.create({ positionStrategy });\n }\n\n @HostListener('mouseenter')\n show() {\n const tooltipRef: ComponentRef<AXTooltipComponent> = this.overlayRef.attach(new ComponentPortal(AXTooltipComponent));\n tooltipRef.instance.text = this.text;\n tooltipRef.instance.position = this.position;\n setTimeout(() => {\n this.cdr.markForCheck();\n });\n }\n\n @HostListener('mouseleave')\n hide() {\n this.overlayRef.detach();\n this.cdr.markForCheck();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXTooltipComponent } from './tooltip.component';\nimport { AXTooltipDirective } from './tooltip.directive';\nimport { OverlayModule } from '@angular/cdk/overlay';\n\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\nconst MODULES = [CommonModule, OverlayModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n})\nexport class AXTooltipModule {}\n","/**\n * Generated b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CAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../libs/components/tooltip/src/lib/tooltip.component.ts","../../../../libs/components/tooltip/src/lib/tooltip.component.html","../../../../libs/components/tooltip/src/lib/tooltip.directive.ts","../../../../libs/components/tooltip/src/lib/tooltip.module.ts","../../../../libs/components/tooltip/src/acorex-components-tooltip.ts"],"sourcesContent":["import { AXPlacement, MXBaseComponent } from '@acorex/components/common';\nimport { Component, ViewEncapsulation, Input } from '@angular/core';\n\n@Component({\n selector: 'ax-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXTooltipComponent extends MXBaseComponent {\n\n @Input()\n text: string;\n\n @Input()\n position: AXPlacement;\n}\n","<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <!-- <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div> -->\n</div>","import {\n Directive,\n ElementRef,\n Input,\n OnInit,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { AXTooltipComponent } from './tooltip.component';\nimport { AXPlacementType, convertToPlacement } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\n\n@Directive({ selector: '[axTooltip]' })\nexport class AXTooltipDirective implements OnInit {\n\n @Input('axTooltip')\n public content: string | TemplateRef<unknown>;\n\n private _placement: AXPlacementType = convertToPlacement(\"top\");\n @Input('axTooltipPlacement')\n public get placement(): AXPlacementType {\n return this._placement;\n }\n public set placement(v: AXPlacementType) {\n this._placement = v;\n if (this.popupRef) {\n this.popupRef.placement = v;\n }\n }\n\n private popupRef: AXPopoverComponent;\n\n constructor(\n private elementRef: ElementRef,\n private vc: ViewContainerRef\n ) {\n this.popupRef = this.vc.createComponent(AXPopoverComponent).instance\n this.popupRef.target = this.elementRef.nativeElement;\n }\n\n ngOnInit(): void {\n this.popupRef.target = this.elementRef.nativeElement;\n this.popupRef.openOn = 'hover';\n this.popupRef.closeOn = 'leave';\n this.popupRef.placement = this.placement;\n if (typeof this.content === 'string') {\n this.popupRef.content = AXTooltipComponent;\n this.popupRef.context = { text: this.content };\n }\n else if (this.content instanceof TemplateRef) {\n this.popupRef.content = this.content;\n //this.popupRef.context = { text: this.content };\n }\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXTooltipComponent } from './tooltip.component';\nimport { AXTooltipDirective } from './tooltip.directive';\nimport { OverlayModule } from '@angular/cdk/overlay';\n\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\nconst MODULES = [CommonModule, OverlayModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n})\nexport class AXTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AASM,MAAO,kBAAmB,SAAQ,eAAe,CAAA;8GAA1C,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,yHCT/B,6LAKM,EAAA,MAAA,EAAA,CAAA,smCAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FDIO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;+BACE,YAAY,EAAA,aAAA,EAGP,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,6LAAA,EAAA,MAAA,EAAA,CAAA,smCAAA,CAAA,EAAA,CAAA;8BAKrC,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,QAAQ,EA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