@acorex/components 7.1.52 → 7.2.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/README.md +3 -20
- package/action-sheet/README.md +3 -0
- package/action-sheet/index.d.ts +4 -5
- package/alert/README.md +3 -0
- package/alert/index.d.ts +2 -5
- package/avatar/README.md +3 -0
- package/avatar/index.d.ts +3 -5
- package/badge/README.md +3 -0
- package/badge/index.d.ts +2 -5
- package/breadcrumbs/README.md +3 -0
- package/breadcrumbs/index.d.ts +4 -5
- package/breadcrumbs/lib/breadcrumbs-item.component.d.ts +80 -0
- package/button/README.md +3 -0
- package/button/index.d.ts +5 -5
- package/button/lib/button-group.component.d.ts +86 -0
- package/button/lib/button-item.component.d.ts +82 -0
- package/calendar/README.md +3 -0
- package/calendar/index.d.ts +4 -5
- package/calendar/lib/calendar.class.d.ts +81 -0
- package/checkbox/README.md +3 -0
- package/checkbox/index.d.ts +2 -5
- package/chips/README.md +3 -0
- package/chips/index.d.ts +2 -5
- package/chips/lib/chips.component.d.ts +71 -0
- package/collapse/README.md +3 -0
- package/collapse/index.d.ts +3 -5
- package/color-palette/README.md +3 -0
- package/color-palette/index.d.ts +7 -5
- package/color-picker/README.md +3 -0
- package/color-picker/index.d.ts +2 -5
- package/color-picker/lib/color-picker.component.d.ts +197 -0
- package/common/README.md +3 -0
- package/common/index.d.ts +22 -5
- package/common/lib/components/button-base-component.class.d.ts +36 -0
- package/common/lib/components/interactive-component.class.d.ts +37 -0
- package/common/lib/components/look-component.class.d.ts +15 -0
- package/context-menu/README.md +3 -0
- package/context-menu/index.d.ts +2 -5
- package/data-pager/README.md +3 -0
- package/data-pager/index.d.ts +9 -5
- package/data-pager/lib/data-pager-input-selector.component.d.ts +15 -0
- package/data-table/README.md +3 -0
- package/data-table/index.d.ts +4 -5
- package/date-picker/README.md +3 -0
- package/date-picker/index.d.ts +2 -5
- package/decorators/README.md +3 -0
- package/decorators/index.d.ts +14 -5
- package/dialog/README.md +3 -0
- package/dialog/index.d.ts +4 -5
- package/drawer/README.md +3 -0
- package/drawer/index.d.ts +3 -5
- package/dropdown/README.md +3 -0
- package/dropdown/index.d.ts +2 -5
- package/esm2022/acorex-components.mjs +2 -2
- package/esm2022/action-sheet/acorex-components-action-sheet.mjs +2 -2
- package/esm2022/action-sheet/index.mjs +5 -0
- package/esm2022/action-sheet/lib/action-sheet.component.mjs +78 -0
- package/esm2022/action-sheet/lib/action-sheet.interface.mjs +3 -0
- package/esm2022/action-sheet/lib/action-sheet.module.mjs +26 -0
- package/esm2022/action-sheet/lib/action-sheet.service.mjs +88 -0
- package/esm2022/alert/acorex-components-alert.mjs +2 -2
- package/esm2022/alert/index.mjs +3 -0
- package/esm2022/alert/lib/alert.component.mjs +191 -0
- package/esm2022/alert/lib/alert.module.mjs +22 -0
- package/esm2022/avatar/acorex-components-avatar.mjs +2 -2
- package/esm2022/avatar/index.mjs +4 -0
- package/esm2022/avatar/lib/avatar-group.component.mjs +16 -0
- package/esm2022/avatar/lib/avatar.component.mjs +36 -0
- package/esm2022/avatar/lib/avatar.module.mjs +22 -0
- package/esm2022/badge/acorex-components-badge.mjs +2 -2
- package/esm2022/badge/index.mjs +3 -0
- package/esm2022/badge/lib/badge.component.mjs +26 -0
- package/esm2022/badge/lib/badge.module.mjs +19 -0
- package/esm2022/breadcrumbs/acorex-components-breadcrumbs.mjs +2 -2
- package/esm2022/breadcrumbs/index.mjs +5 -0
- package/esm2022/breadcrumbs/lib/breadcrumbs-item.class.mjs +2 -0
- package/esm2022/breadcrumbs/lib/breadcrumbs-item.component.mjs +46 -0
- package/esm2022/breadcrumbs/lib/breadcrumbs.component.mjs +19 -0
- package/esm2022/breadcrumbs/lib/breadcrumbs.module.mjs +20 -0
- package/esm2022/button/acorex-components-button.mjs +2 -2
- package/esm2022/button/index.mjs +6 -0
- package/esm2022/button/lib/button-group.component.mjs +88 -0
- package/esm2022/button/lib/button-item.class.mjs +2 -0
- package/esm2022/button/lib/button-item.component.mjs +77 -0
- package/esm2022/button/lib/button.component.mjs +64 -0
- package/esm2022/button/lib/button.module.mjs +32 -0
- package/esm2022/calendar/acorex-components-calendar.mjs +2 -2
- package/esm2022/calendar/index.mjs +5 -0
- package/esm2022/calendar/lib/calendar-range.component.mjs +175 -0
- package/esm2022/calendar/lib/calendar.class.mjs +233 -0
- package/esm2022/calendar/lib/calendar.component.mjs +417 -0
- package/esm2022/calendar/lib/calendar.module.mjs +23 -0
- package/esm2022/checkbox/acorex-components-checkbox.mjs +2 -2
- package/esm2022/checkbox/index.mjs +3 -0
- package/esm2022/checkbox/lib/checkbox.component.mjs +41 -0
- package/esm2022/checkbox/lib/checkbox.module.mjs +21 -0
- package/esm2022/chips/acorex-components-chips.mjs +2 -2
- package/esm2022/chips/index.mjs +3 -0
- package/esm2022/chips/lib/chips.component.mjs +32 -0
- package/esm2022/chips/lib/chips.module.mjs +19 -0
- package/esm2022/collapse/acorex-components-collapse.mjs +2 -2
- package/esm2022/collapse/index.mjs +4 -0
- package/esm2022/collapse/lib/collapse-group.component.mjs +53 -0
- package/esm2022/collapse/lib/collapse.component.mjs +45 -0
- package/esm2022/collapse/lib/collapse.module.mjs +20 -0
- package/esm2022/color-palette/acorex-components-color-palette.mjs +2 -2
- package/esm2022/color-palette/index.mjs +8 -0
- package/esm2022/color-palette/lib/color-palette-input.component.mjs +129 -0
- package/esm2022/color-palette/lib/color-palette-picker.component.mjs +159 -0
- package/esm2022/color-palette/lib/color-palette-preview.component.mjs +60 -0
- package/esm2022/color-palette/lib/color-palette-swatches.component.mjs +302 -0
- package/esm2022/color-palette/lib/color-palette.class.mjs +17 -0
- package/esm2022/color-palette/lib/color-palette.component.mjs +74 -0
- package/esm2022/color-palette/lib/color-palette.module.mjs +60 -0
- package/esm2022/color-picker/acorex-components-color-picker.mjs +2 -2
- package/esm2022/color-picker/index.mjs +3 -0
- package/esm2022/color-picker/lib/color-picker.component.mjs +113 -0
- package/esm2022/color-picker/lib/color-picker.module.mjs +61 -0
- package/esm2022/common/acorex-components-common.mjs +2 -2
- package/esm2022/common/index.mjs +23 -0
- package/esm2022/common/lib/classes/components.class.mjs +69 -0
- package/esm2022/common/lib/classes/data.class.mjs +2 -0
- package/esm2022/common/lib/classes/drawing.class.mjs +2 -0
- package/esm2022/common/lib/classes/events.class.mjs +79 -0
- package/esm2022/common/lib/classes/styles.class.mjs +4 -0
- package/esm2022/common/lib/common.module.mjs +42 -0
- package/esm2022/common/lib/components/base-component.class.mjs +67 -0
- package/esm2022/common/lib/components/button-base-component.class.mjs +80 -0
- package/esm2022/common/lib/components/color-component.class.mjs +27 -0
- package/esm2022/common/lib/components/colorlook-component.class.mjs +11 -0
- package/esm2022/common/lib/components/interactive-component.class.mjs +64 -0
- package/esm2022/common/lib/components/look-component.class.mjs +27 -0
- package/esm2022/common/lib/components/value-component.class.mjs +202 -0
- package/esm2022/common/lib/constant/positions.mjs +75 -0
- package/esm2022/common/lib/directives/auto-focus.directive.mjs +56 -0
- package/esm2022/common/lib/directives/debounce-time.directive.mjs +48 -0
- package/esm2022/common/lib/directives/hotkey.directive.mjs +81 -0
- package/esm2022/common/lib/directives/infinite-scroll.directive.mjs +63 -0
- package/esm2022/common/lib/directives/responsive.directive.mjs +37 -0
- package/esm2022/common/lib/services/custom-cdk-overlay.service.mjs +49 -0
- package/esm2022/common/lib/services/hotkey.service.mjs +46 -0
- package/esm2022/common/lib/services/overlay.service.mjs +113 -0
- package/esm2022/context-menu/acorex-components-context-menu.mjs +2 -2
- package/esm2022/context-menu/index.mjs +3 -0
- package/esm2022/context-menu/lib/context-menu.component.mjs +262 -0
- package/esm2022/context-menu/lib/context-menu.module.mjs +36 -0
- package/esm2022/data-pager/acorex-components-data-pager.mjs +2 -2
- package/esm2022/data-pager/index.mjs +10 -0
- package/esm2022/data-pager/lib/data-pager-base.component.mjs +38 -0
- package/esm2022/data-pager/lib/data-pager-info.component.mjs +53 -0
- package/esm2022/data-pager/lib/data-pager-input-selector.component.mjs +65 -0
- package/esm2022/data-pager/lib/data-pager-next-buttons.components.mjs +87 -0
- package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +130 -0
- package/esm2022/data-pager/lib/data-pager-pagesize-dropdown.component.mjs +95 -0
- package/esm2022/data-pager/lib/data-pager-prev-buttons.component.mjs +83 -0
- package/esm2022/data-pager/lib/data-pager.component.mjs +143 -0
- package/esm2022/data-pager/lib/data-pager.module.mjs +51 -0
- package/esm2022/data-table/acorex-components-data-table.mjs +2 -2
- package/esm2022/data-table/index.mjs +5 -0
- package/esm2022/data-table/lib/data-column-cell-template.directive.mjs +17 -0
- package/esm2022/data-table/lib/data-column.directive.mjs +43 -0
- package/esm2022/data-table/lib/data-table.component.mjs +137 -0
- package/esm2022/data-table/lib/data-table.module.mjs +27 -0
- package/esm2022/date-picker/acorex-components-date-picker.mjs +2 -2
- package/esm2022/date-picker/index.mjs +3 -0
- package/esm2022/date-picker/lib/datepicker.component.mjs +125 -0
- package/esm2022/date-picker/lib/datepicker.module.mjs +44 -0
- package/esm2022/decorators/acorex-components-decorators.mjs +2 -2
- package/esm2022/decorators/index.mjs +15 -0
- package/esm2022/decorators/lib/close-button.component.mjs +50 -0
- package/esm2022/decorators/lib/content.component.mjs +21 -0
- package/esm2022/decorators/lib/decorators.module.mjs +71 -0
- package/esm2022/decorators/lib/footer.component.mjs +29 -0
- package/esm2022/decorators/lib/form-hint.component.mjs +20 -0
- package/esm2022/decorators/lib/header.component.mjs +29 -0
- package/esm2022/decorators/lib/icon.component.mjs +29 -0
- package/esm2022/decorators/lib/overlay.component.mjs +22 -0
- package/esm2022/decorators/lib/placeholder.component.mjs +14 -0
- package/esm2022/decorators/lib/prefix.component.mjs +21 -0
- package/esm2022/decorators/lib/sub-title.component.mjs +27 -0
- package/esm2022/decorators/lib/suffix.component.mjs +21 -0
- package/esm2022/decorators/lib/text.component.mjs +21 -0
- package/esm2022/decorators/lib/title.component.mjs +20 -0
- package/esm2022/dialog/acorex-components-dialog.mjs +2 -2
- package/esm2022/dialog/index.mjs +5 -0
- package/esm2022/dialog/lib/dialog.class.mjs +2 -0
- package/esm2022/dialog/lib/dialog.component.mjs +52 -0
- package/esm2022/dialog/lib/dialog.module.mjs +27 -0
- package/esm2022/dialog/lib/dialog.service.mjs +152 -0
- package/esm2022/drawer/acorex-components-drawer.mjs +2 -2
- package/esm2022/drawer/index.mjs +4 -0
- package/esm2022/drawer/lib/drawer-container.component.mjs +37 -0
- package/esm2022/drawer/lib/drawer.component.mjs +140 -0
- package/esm2022/drawer/lib/drawer.module.mjs +22 -0
- package/esm2022/dropdown/acorex-components-dropdown.mjs +2 -2
- package/esm2022/dropdown/index.mjs +3 -0
- package/esm2022/dropdown/lib/dropdown-panel.component.mjs +102 -0
- package/esm2022/dropdown/lib/dropdown.module.mjs +25 -0
- package/esm2022/form/acorex-components-form.mjs +2 -2
- package/esm2022/form/index.mjs +7 -0
- package/esm2022/form/lib/form-field.component.mjs +15 -0
- package/esm2022/form/lib/form.component.mjs +166 -0
- package/esm2022/form/lib/form.module.mjs +63 -0
- package/esm2022/form/lib/validation-rule.widget.mjs +115 -0
- package/esm2022/form/lib/validation-summary.component.mjs +106 -0
- package/esm2022/form/lib/validation.class.mjs +2 -0
- package/esm2022/image/acorex-components-image.mjs +2 -2
- package/esm2022/image/index.mjs +3 -0
- package/esm2022/image/lib/image.component.mjs +76 -0
- package/esm2022/image/lib/image.module.mjs +19 -0
- package/esm2022/index.mjs +2 -0
- package/esm2022/label/acorex-components-label.mjs +2 -2
- package/esm2022/label/index.mjs +3 -0
- package/esm2022/label/lib/label.component.mjs +45 -0
- package/esm2022/label/lib/label.module.mjs +21 -0
- package/esm2022/loading/acorex-components-loading.mjs +2 -2
- package/esm2022/loading/index.mjs +6 -0
- package/esm2022/loading/lib/loading-spinner.component.mjs +68 -0
- package/esm2022/loading/lib/loading.component.mjs +64 -0
- package/esm2022/loading/lib/loading.directive.mjs +68 -0
- package/esm2022/loading/lib/loading.module.mjs +35 -0
- package/esm2022/loading/lib/loading.service.mjs +151 -0
- package/esm2022/menu/acorex-components-menu.mjs +2 -2
- package/esm2022/menu/index.mjs +3 -0
- package/esm2022/menu/lib/menu.component.mjs +346 -0
- package/esm2022/menu/lib/menu.module.mjs +33 -0
- package/esm2022/mixin/acorex-components-mixin.mjs +2 -2
- package/esm2022/mixin/index.mjs +18 -0
- package/esm2022/mixin/lib/base-components.class.mjs +109 -0
- package/esm2022/mixin/lib/base-menu-mixin.class.mjs +137 -0
- package/esm2022/mixin/lib/button-mixin.class.mjs +66 -0
- package/esm2022/mixin/lib/clickable-mixin.class.mjs +24 -0
- package/esm2022/mixin/lib/color-look-mixing.class.mjs +45 -0
- package/esm2022/mixin/lib/constratctor.mjs +2 -0
- package/esm2022/mixin/lib/datalist-component.class.mjs +157 -0
- package/esm2022/mixin/lib/datalist.class.mjs +3 -0
- package/esm2022/mixin/lib/dropdown-mixin.class.mjs +97 -0
- package/esm2022/mixin/lib/interactive-mixin.class.mjs +83 -0
- package/esm2022/mixin/lib/loading-mixin.class.mjs +18 -0
- package/esm2022/mixin/lib/mixin.class.mjs +26 -0
- package/esm2022/mixin/lib/page-component.class.mjs +11 -0
- package/esm2022/mixin/lib/selection-component.class.mjs +180 -0
- package/esm2022/mixin/lib/sizable-mixin.class.mjs +16 -0
- package/esm2022/mixin/lib/textbox-mixin.class.mjs +58 -0
- package/esm2022/mixin/lib/value-mixin.class.mjs +224 -0
- package/esm2022/notification/acorex-components-notification.mjs +2 -2
- package/esm2022/notification/index.mjs +5 -0
- package/esm2022/notification/lib/notification.class.mjs +2 -0
- package/esm2022/notification/lib/notification.component.mjs +83 -0
- package/esm2022/notification/lib/notification.module.mjs +23 -0
- package/esm2022/notification/lib/notification.service.mjs +108 -0
- package/esm2022/number-box/acorex-components-number-box.mjs +2 -2
- package/esm2022/number-box/index.mjs +3 -0
- package/esm2022/number-box/lib/number-box.component.mjs +248 -0
- package/esm2022/number-box/lib/number-box.module.mjs +35 -0
- package/esm2022/otp/acorex-components-otp.mjs +5 -0
- package/esm2022/otp/index.mjs +4 -0
- package/esm2022/otp/lib/otp.class.mjs +4 -0
- package/esm2022/otp/lib/otp.component.mjs +113 -0
- package/esm2022/otp/lib/otp.module.mjs +21 -0
- package/esm2022/page/acorex-components-page.mjs +2 -2
- package/esm2022/page/index.mjs +4 -0
- package/esm2022/page/lib/base-page.class.mjs +61 -0
- package/esm2022/page/lib/page.component.mjs +44 -0
- package/esm2022/page/lib/page.module.mjs +18 -0
- package/esm2022/password-box/acorex-components-password-box.mjs +2 -2
- package/esm2022/password-box/index.mjs +3 -0
- package/esm2022/password-box/lib/password-box.component.mjs +65 -0
- package/esm2022/password-box/lib/password-box.module.mjs +32 -0
- package/esm2022/popover/acorex-components-popover.mjs +2 -2
- package/esm2022/popover/index.mjs +4 -0
- package/esm2022/popover/lib/dropdown-component.class.mjs +73 -0
- package/esm2022/popover/lib/popover.component.mjs +264 -0
- package/esm2022/popover/lib/popover.module.mjs +19 -0
- package/esm2022/popup/acorex-components-popup.mjs +2 -2
- package/esm2022/popup/index.mjs +4 -0
- package/esm2022/popup/lib/popup.component.mjs +141 -0
- package/esm2022/popup/lib/popup.module.mjs +27 -0
- package/esm2022/popup/lib/popup.service.mjs +114 -0
- package/esm2022/progress-bar/acorex-components-progress-bar.mjs +2 -2
- package/esm2022/progress-bar/index.mjs +3 -0
- package/esm2022/progress-bar/lib/progress-bar.component.mjs +33 -0
- package/esm2022/progress-bar/lib/progress-bar.module.mjs +19 -0
- package/esm2022/radio/acorex-components-radio.mjs +2 -2
- package/esm2022/radio/index.mjs +3 -0
- package/esm2022/radio/lib/radio.component.mjs +39 -0
- package/esm2022/radio/lib/radio.module.mjs +22 -0
- package/esm2022/range-slider/acorex-components-range-slider.mjs +2 -2
- package/esm2022/range-slider/index.mjs +3 -0
- package/esm2022/range-slider/lib/range-slider.component.mjs +109 -0
- package/esm2022/range-slider/lib/range-slider.module.mjs +22 -0
- package/esm2022/result/acorex-components-result.mjs +2 -2
- package/esm2022/result/index.mjs +3 -0
- package/esm2022/result/lib/result.component.mjs +24 -0
- package/esm2022/result/lib/result.module.mjs +19 -0
- package/esm2022/search-box/acorex-components-search-box.mjs +2 -2
- package/esm2022/search-box/index.mjs +3 -0
- package/esm2022/search-box/lib/search-box.component.mjs +60 -0
- package/esm2022/search-box/lib/search-box.module.mjs +25 -0
- package/esm2022/select-box/acorex-components-select-box.mjs +2 -2
- package/esm2022/select-box/index.mjs +3 -0
- package/esm2022/select-box/lib/select-box.component.mjs +366 -0
- package/esm2022/select-box/lib/select-box.module.mjs +61 -0
- package/esm2022/selection-list/acorex-components-selection-list.mjs +2 -2
- package/esm2022/selection-list/index.mjs +3 -0
- package/esm2022/selection-list/lib/selection-list.component.mjs +60 -0
- package/esm2022/selection-list/lib/selection-list.module.mjs +24 -0
- package/esm2022/switch/acorex-components-switch.mjs +2 -2
- package/esm2022/switch/index.mjs +4 -0
- package/esm2022/switch/lib/switch-content.component.mjs +16 -0
- package/esm2022/switch/lib/switch.component.mjs +51 -0
- package/esm2022/switch/lib/switch.module.mjs +22 -0
- package/esm2022/tabs/acorex-components-tabs.mjs +2 -2
- package/esm2022/tabs/index.mjs +6 -0
- package/esm2022/tabs/lib/tab-content.directive.mjs +29 -0
- package/esm2022/tabs/lib/tab-item.component.mjs +142 -0
- package/esm2022/tabs/lib/tabs.class.mjs +4 -0
- package/esm2022/tabs/lib/tabs.component.mjs +108 -0
- package/esm2022/tabs/lib/tabs.module.mjs +25 -0
- package/esm2022/tag/acorex-components-tag.mjs +2 -2
- package/esm2022/tag/index.mjs +3 -0
- package/esm2022/tag/lib/tag.component.mjs +29 -0
- package/esm2022/tag/lib/tag.module.mjs +19 -0
- package/esm2022/textarea/acorex-components-textarea.mjs +2 -2
- package/esm2022/textarea/index.mjs +3 -0
- package/esm2022/textarea/lib/textarea.component.mjs +37 -0
- package/esm2022/textarea/lib/textarea.module.mjs +19 -0
- package/esm2022/textbox/acorex-components-textbox.mjs +2 -2
- package/esm2022/textbox/index.mjs +4 -0
- package/esm2022/textbox/lib/mask-options.directive.mjs +17 -0
- package/esm2022/textbox/lib/textbox.component.mjs +93 -0
- package/esm2022/textbox/lib/textbox.module.mjs +38 -0
- package/esm2022/time-box/acorex-components-time-box.mjs +2 -2
- package/esm2022/time-box/index.mjs +3 -0
- package/esm2022/time-box/lib/time-box.component.mjs +296 -0
- package/esm2022/time-box/lib/time-box.module.mjs +32 -0
- package/esm2022/toast/acorex-components-toast.mjs +2 -2
- package/esm2022/toast/index.mjs +5 -0
- package/esm2022/toast/lib/toast.class.mjs +2 -0
- package/esm2022/toast/lib/toast.component.mjs +67 -0
- package/esm2022/toast/lib/toast.module.mjs +22 -0
- package/esm2022/toast/lib/toast.service.mjs +135 -0
- package/esm2022/tooltip/acorex-components-tooltip.mjs +2 -2
- package/esm2022/tooltip/index.mjs +4 -0
- package/esm2022/tooltip/lib/tooltip.component.mjs +20 -0
- package/esm2022/tooltip/lib/tooltip.directive.mjs +158 -0
- package/esm2022/tooltip/lib/tooltip.module.mjs +22 -0
- package/esm2022/uploader/acorex-components-uploader.mjs +2 -2
- package/esm2022/uploader/index.mjs +3 -0
- package/esm2022/uploader/lib/uploader.component.mjs +99 -0
- package/esm2022/uploader/lib/uploader.module.mjs +20 -0
- package/fesm2022/acorex-components-action-sheet.mjs +20 -22
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +15 -19
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +22 -24
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +11 -8
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +12 -18
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +33 -35
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +133 -85
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-checkbox.mjs +7 -8
- package/fesm2022/acorex-components-checkbox.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +11 -12
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +24 -25
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +294 -301
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-color-picker.mjs +13 -20
- package/fesm2022/acorex-components-color-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +838 -868
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-context-menu.mjs +12 -22
- package/fesm2022/acorex-components-context-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +198 -110
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +40 -50
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-date-picker.mjs +51 -25
- package/fesm2022/acorex-components-date-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +53 -54
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +11 -17
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +17 -22
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +17 -20
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +59 -62
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +18 -21
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +9 -12
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +86 -88
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +45 -32
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-mixin.mjs +170 -174
- package/fesm2022/acorex-components-mixin.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +17 -28
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +42 -33
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +141 -0
- package/fesm2022/acorex-components-otp.mjs.map +1 -0
- package/fesm2022/acorex-components-page.mjs +17 -21
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +25 -23
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +66 -68
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +39 -48
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +9 -9
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +7 -7
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +17 -25
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +9 -11
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +12 -14
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +42 -43
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +12 -11
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +10 -13
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +63 -68
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +9 -9
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-textarea.mjs +18 -10
- package/fesm2022/acorex-components-textarea.mjs.map +1 -1
- package/fesm2022/acorex-components-textbox.mjs +30 -22
- package/fesm2022/acorex-components-textbox.mjs.map +1 -1
- package/fesm2022/acorex-components-time-box.mjs +38 -23
- package/fesm2022/acorex-components-time-box.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +22 -24
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +15 -22
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +13 -16
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs +1 -6
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/form/README.md +3 -0
- package/form/index.d.ts +6 -5
- package/image/README.md +3 -0
- package/image/index.d.ts +2 -5
- package/image/lib/image.component.d.ts +27 -0
- package/index.d.ts +2 -5
- package/label/README.md +3 -0
- package/label/index.d.ts +2 -5
- package/loading/README.md +3 -0
- package/loading/index.d.ts +5 -5
- package/loading/lib/loading.directive.d.ts +22 -0
- package/menu/README.md +3 -0
- package/menu/index.d.ts +2 -5
- package/menu/lib/menu.component.d.ts +42 -0
- package/mixin/README.md +3 -0
- package/mixin/index.d.ts +17 -5
- package/mixin/lib/base-components.class.d.ts +84 -0
- package/mixin/lib/base-menu-mixin.class.d.ts +53 -0
- package/mixin/lib/button-mixin.class.d.ts +53 -0
- package/mixin/lib/clickable-mixin.class.d.ts +36 -0
- package/mixin/lib/color-look-mixing.class.d.ts +44 -0
- package/mixin/lib/datalist-component.class.d.ts +59 -0
- package/mixin/lib/dropdown-mixin.class.d.ts +47 -0
- package/mixin/lib/interactive-mixin.class.d.ts +60 -0
- package/mixin/lib/loading-mixin.class.d.ts +40 -0
- package/mixin/lib/mixin.class.d.ts +679 -0
- package/mixin/lib/page-component.class.d.ts +28 -0
- package/mixin/lib/selection-component.class.d.ts +61 -0
- package/mixin/lib/sizable-mixin.class.d.ts +34 -0
- package/mixin/lib/textbox-mixin.class.d.ts +68 -0
- package/mixin/lib/value-mixin.class.d.ts +63 -0
- package/notification/README.md +3 -0
- package/notification/index.d.ts +4 -5
- package/number-box/README.md +3 -0
- package/number-box/index.d.ts +2 -5
- package/otp/README.md +3 -0
- package/otp/index.d.ts +3 -0
- package/otp/lib/otp.class.d.ts +4 -0
- package/otp/lib/otp.component.d.ts +25 -0
- package/otp/lib/otp.module.d.ts +8 -0
- package/package.json +18 -34
- package/page/README.md +3 -0
- package/page/index.d.ts +3 -5
- package/page/lib/page.component.d.ts +14 -0
- package/password-box/README.md +3 -0
- package/password-box/index.d.ts +2 -5
- package/popover/README.md +3 -0
- package/popover/index.d.ts +3 -5
- package/popup/README.md +3 -0
- package/popup/index.d.ts +3 -5
- package/progress-bar/README.md +3 -0
- package/progress-bar/index.d.ts +2 -5
- package/radio/README.md +3 -0
- package/radio/index.d.ts +2 -5
- package/range-slider/README.md +3 -0
- package/range-slider/index.d.ts +2 -5
- package/result/README.md +3 -0
- package/result/index.d.ts +2 -5
- package/result/lib/result.component.d.ts +10 -0
- package/search-box/README.md +3 -0
- package/search-box/index.d.ts +2 -5
- package/select-box/README.md +3 -0
- package/select-box/index.d.ts +2 -5
- package/select-box/lib/select-box.module.d.ts +18 -0
- package/selection-list/README.md +3 -0
- package/selection-list/index.d.ts +2 -5
- package/switch/README.md +3 -0
- package/switch/index.d.ts +3 -5
- package/tabs/README.md +3 -0
- package/tabs/index.d.ts +5 -5
- package/tabs/lib/tab-item.component.d.ts +48 -0
- package/tag/README.md +3 -0
- package/tag/index.d.ts +2 -5
- package/textarea/README.md +3 -0
- package/textarea/index.d.ts +2 -5
- package/textbox/README.md +3 -0
- package/textbox/index.d.ts +3 -5
- package/time-box/README.md +3 -0
- package/time-box/index.d.ts +2 -5
- package/toast/README.md +3 -0
- package/toast/index.d.ts +4 -5
- package/tooltip/README.md +3 -0
- package/tooltip/index.d.ts +3 -5
- package/uploader/README.md +3 -0
- package/uploader/index.d.ts +2 -5
- package/action-sheet/public-api.d.ts +0 -4
- package/alert/public-api.d.ts +0 -2
- package/avatar/public-api.d.ts +0 -3
- package/badge/public-api.d.ts +0 -2
- package/breadcrumbs/public-api.d.ts +0 -4
- package/breadcrumbs/src/breadcrumbs-item.component.d.ts +0 -79
- package/button/public-api.d.ts +0 -5
- package/button/src/button-group.component.d.ts +0 -86
- package/button/src/button-item.component.d.ts +0 -80
- package/calendar/public-api.d.ts +0 -4
- package/calendar/src/calendar.class.d.ts +0 -81
- package/card/index.d.ts +0 -5
- package/card/public-api.d.ts +0 -2
- package/card/src/card.component.d.ts +0 -10
- package/card/src/card.module.d.ts +0 -8
- package/checkbox/public-api.d.ts +0 -2
- package/chips/public-api.d.ts +0 -2
- package/chips/src/chips.component.d.ts +0 -72
- package/collapse/public-api.d.ts +0 -3
- package/color-palette/public-api.d.ts +0 -7
- package/color-picker/public-api.d.ts +0 -2
- package/color-picker/src/color-picker.component.d.ts +0 -195
- package/common/public-api.d.ts +0 -16
- package/common/src/components/button-base-component.class.d.ts +0 -36
- package/common/src/components/index.d.ts +0 -7
- package/common/src/components/interactive-component.class.d.ts +0 -37
- package/common/src/components/look-component.class.d.ts +0 -15
- package/context-menu/public-api.d.ts +0 -2
- package/data-pager/public-api.d.ts +0 -9
- package/data-pager/src/data-pager-input-selector.component.d.ts +0 -15
- package/data-table/public-api.d.ts +0 -4
- package/date-picker/public-api.d.ts +0 -2
- package/decorators/public-api.d.ts +0 -14
- package/dialog/public-api.d.ts +0 -4
- package/drawer/public-api.d.ts +0 -3
- package/dropdown/public-api.d.ts +0 -2
- package/esm2022/action-sheet/public-api.mjs +0 -5
- package/esm2022/action-sheet/src/action-sheet.component.mjs +0 -79
- package/esm2022/action-sheet/src/action-sheet.interface.mjs +0 -3
- package/esm2022/action-sheet/src/action-sheet.module.mjs +0 -27
- package/esm2022/action-sheet/src/action-sheet.service.mjs +0 -90
- package/esm2022/alert/public-api.mjs +0 -3
- package/esm2022/alert/src/alert.component.mjs +0 -196
- package/esm2022/alert/src/alert.module.mjs +0 -23
- package/esm2022/avatar/public-api.mjs +0 -4
- package/esm2022/avatar/src/avatar-group.component.mjs +0 -17
- package/esm2022/avatar/src/avatar.component.mjs +0 -39
- package/esm2022/avatar/src/avatar.module.mjs +0 -23
- package/esm2022/badge/public-api.mjs +0 -3
- package/esm2022/badge/src/badge.component.mjs +0 -24
- package/esm2022/badge/src/badge.module.mjs +0 -20
- package/esm2022/breadcrumbs/public-api.mjs +0 -5
- package/esm2022/breadcrumbs/src/breadcrumbs-item.class.mjs +0 -2
- package/esm2022/breadcrumbs/src/breadcrumbs-item.component.mjs +0 -51
- package/esm2022/breadcrumbs/src/breadcrumbs.component.mjs +0 -22
- package/esm2022/breadcrumbs/src/breadcrumbs.module.mjs +0 -21
- package/esm2022/button/public-api.mjs +0 -6
- package/esm2022/button/src/button-group.component.mjs +0 -92
- package/esm2022/button/src/button-item.class.mjs +0 -2
- package/esm2022/button/src/button-item.component.mjs +0 -80
- package/esm2022/button/src/button.component.mjs +0 -62
- package/esm2022/button/src/button.module.mjs +0 -33
- package/esm2022/calendar/public-api.mjs +0 -5
- package/esm2022/calendar/src/calendar-range.component.mjs +0 -174
- package/esm2022/calendar/src/calendar.class.mjs +0 -231
- package/esm2022/calendar/src/calendar.component.mjs +0 -374
- package/esm2022/calendar/src/calendar.module.mjs +0 -24
- package/esm2022/card/acorex-components-card.mjs +0 -5
- package/esm2022/card/public-api.mjs +0 -3
- package/esm2022/card/src/card.component.mjs +0 -19
- package/esm2022/card/src/card.module.mjs +0 -20
- package/esm2022/checkbox/public-api.mjs +0 -3
- package/esm2022/checkbox/src/checkbox.component.mjs +0 -43
- package/esm2022/checkbox/src/checkbox.module.mjs +0 -22
- package/esm2022/chips/public-api.mjs +0 -3
- package/esm2022/chips/src/chips.component.mjs +0 -34
- package/esm2022/chips/src/chips.module.mjs +0 -20
- package/esm2022/collapse/public-api.mjs +0 -4
- package/esm2022/collapse/src/collapse-group.component.mjs +0 -53
- package/esm2022/collapse/src/collapse.component.mjs +0 -48
- package/esm2022/collapse/src/collapse.module.mjs +0 -21
- package/esm2022/color-palette/public-api.mjs +0 -8
- package/esm2022/color-palette/src/color-palette-input.component.mjs +0 -131
- package/esm2022/color-palette/src/color-palette-picker.component.mjs +0 -160
- package/esm2022/color-palette/src/color-palette-preview.component.mjs +0 -63
- package/esm2022/color-palette/src/color-palette-swatches.component.mjs +0 -305
- package/esm2022/color-palette/src/color-palette.class.mjs +0 -19
- package/esm2022/color-palette/src/color-palette.component.mjs +0 -76
- package/esm2022/color-palette/src/color-palette.module.mjs +0 -61
- package/esm2022/color-picker/public-api.mjs +0 -3
- package/esm2022/color-picker/src/color-picker.component.mjs +0 -120
- package/esm2022/color-picker/src/color-picker.module.mjs +0 -62
- package/esm2022/common/public-api.mjs +0 -17
- package/esm2022/common/src/classes/components.class.mjs +0 -78
- package/esm2022/common/src/classes/data.class.mjs +0 -2
- package/esm2022/common/src/classes/drawing.class.mjs +0 -2
- package/esm2022/common/src/classes/events.class.mjs +0 -96
- package/esm2022/common/src/classes/styles.class.mjs +0 -4
- package/esm2022/common/src/common.module.mjs +0 -43
- package/esm2022/common/src/components/base-component.class.mjs +0 -67
- package/esm2022/common/src/components/button-base-component.class.mjs +0 -69
- package/esm2022/common/src/components/color-component.class.mjs +0 -27
- package/esm2022/common/src/components/colorlook-component.class.mjs +0 -11
- package/esm2022/common/src/components/index.mjs +0 -8
- package/esm2022/common/src/components/interactive-component.class.mjs +0 -63
- package/esm2022/common/src/components/look-component.class.mjs +0 -27
- package/esm2022/common/src/components/value-component.class.mjs +0 -204
- package/esm2022/common/src/constant/positions.mjs +0 -75
- package/esm2022/common/src/directives/auto-focus.directive.mjs +0 -58
- package/esm2022/common/src/directives/debounce-time.directive.mjs +0 -50
- package/esm2022/common/src/directives/hotkey.directive.mjs +0 -83
- package/esm2022/common/src/directives/infinite-scroll.directive.mjs +0 -70
- package/esm2022/common/src/directives/responsive.directive.mjs +0 -39
- package/esm2022/common/src/services/custom-cdk-overlay.service.mjs +0 -52
- package/esm2022/common/src/services/hotkey.service.mjs +0 -48
- package/esm2022/common/src/services/overlay.service.mjs +0 -116
- package/esm2022/context-menu/public-api.mjs +0 -3
- package/esm2022/context-menu/src/context-menu.component.mjs +0 -271
- package/esm2022/context-menu/src/context-menu.module.mjs +0 -37
- package/esm2022/data-pager/public-api.mjs +0 -10
- package/esm2022/data-pager/src/data-pager-base.component.mjs +0 -37
- package/esm2022/data-pager/src/data-pager-info.component.mjs +0 -62
- package/esm2022/data-pager/src/data-pager-input-selector.component.mjs +0 -54
- package/esm2022/data-pager/src/data-pager-next-buttons.components.mjs +0 -67
- package/esm2022/data-pager/src/data-pager-numeric-selector.component.mjs +0 -99
- package/esm2022/data-pager/src/data-pager-pagesize-dropdown.component.mjs +0 -87
- package/esm2022/data-pager/src/data-pager-prev-buttons.component.mjs +0 -62
- package/esm2022/data-pager/src/data-pager.component.mjs +0 -147
- package/esm2022/data-pager/src/data-pager.module.mjs +0 -52
- package/esm2022/data-table/public-api.mjs +0 -5
- package/esm2022/data-table/src/data-column-cell-template.directive.mjs +0 -19
- package/esm2022/data-table/src/data-column.directive.mjs +0 -51
- package/esm2022/data-table/src/data-table.component.mjs +0 -140
- package/esm2022/data-table/src/data-table.module.mjs +0 -28
- package/esm2022/date-picker/public-api.mjs +0 -3
- package/esm2022/date-picker/src/datepicker.component.mjs +0 -100
- package/esm2022/date-picker/src/datepicker.module.mjs +0 -45
- package/esm2022/decorators/public-api.mjs +0 -15
- package/esm2022/decorators/src/close-button.component.mjs +0 -52
- package/esm2022/decorators/src/content.component.mjs +0 -22
- package/esm2022/decorators/src/decorators.module.mjs +0 -72
- package/esm2022/decorators/src/footer.component.mjs +0 -30
- package/esm2022/decorators/src/form-hint.component.mjs +0 -21
- package/esm2022/decorators/src/header.component.mjs +0 -30
- package/esm2022/decorators/src/icon.component.mjs +0 -31
- package/esm2022/decorators/src/overlay.component.mjs +0 -21
- package/esm2022/decorators/src/placeholder.component.mjs +0 -15
- package/esm2022/decorators/src/prefix.component.mjs +0 -22
- package/esm2022/decorators/src/sub-title.component.mjs +0 -28
- package/esm2022/decorators/src/suffix.component.mjs +0 -22
- package/esm2022/decorators/src/text.component.mjs +0 -23
- package/esm2022/decorators/src/title.component.mjs +0 -21
- package/esm2022/dialog/public-api.mjs +0 -5
- package/esm2022/dialog/src/dialog.class.mjs +0 -2
- package/esm2022/dialog/src/dialog.component.mjs +0 -56
- package/esm2022/dialog/src/dialog.module.mjs +0 -28
- package/esm2022/dialog/src/dialog.service.mjs +0 -155
- package/esm2022/drawer/public-api.mjs +0 -4
- package/esm2022/drawer/src/drawer-container.component.mjs +0 -39
- package/esm2022/drawer/src/drawer.component.mjs +0 -145
- package/esm2022/drawer/src/drawer.module.mjs +0 -23
- package/esm2022/dropdown/public-api.mjs +0 -3
- package/esm2022/dropdown/src/dropdown-panel.component.mjs +0 -106
- package/esm2022/dropdown/src/dropdown.module.mjs +0 -26
- package/esm2022/form/public-api.mjs +0 -7
- package/esm2022/form/src/form-field.component.mjs +0 -16
- package/esm2022/form/src/form.component.mjs +0 -168
- package/esm2022/form/src/form.module.mjs +0 -64
- package/esm2022/form/src/validation-rule.widget.mjs +0 -114
- package/esm2022/form/src/validation-summary.component.mjs +0 -110
- package/esm2022/form/src/validation.class.mjs +0 -2
- package/esm2022/image/public-api.mjs +0 -3
- package/esm2022/image/src/image.component.mjs +0 -80
- package/esm2022/image/src/image.module.mjs +0 -20
- package/esm2022/label/public-api.mjs +0 -3
- package/esm2022/label/src/label.component.mjs +0 -49
- package/esm2022/label/src/label.module.mjs +0 -22
- package/esm2022/loading/public-api.mjs +0 -6
- package/esm2022/loading/src/loading-spinner.component.mjs +0 -70
- package/esm2022/loading/src/loading.component.mjs +0 -56
- package/esm2022/loading/src/loading.directive.mjs +0 -77
- package/esm2022/loading/src/loading.module.mjs +0 -36
- package/esm2022/loading/src/loading.service.mjs +0 -153
- package/esm2022/menu/public-api.mjs +0 -3
- package/esm2022/menu/src/menu.component.mjs +0 -333
- package/esm2022/menu/src/menu.module.mjs +0 -34
- package/esm2022/mixin/public-api.mjs +0 -18
- package/esm2022/mixin/src/base-components.class.mjs +0 -108
- package/esm2022/mixin/src/base-menu-mixin.class.mjs +0 -134
- package/esm2022/mixin/src/button-mixin.class.mjs +0 -71
- package/esm2022/mixin/src/clickable-mixin.class.mjs +0 -24
- package/esm2022/mixin/src/color-look-mixing.class.mjs +0 -45
- package/esm2022/mixin/src/constratctor.mjs +0 -2
- package/esm2022/mixin/src/datalist-component.class.mjs +0 -151
- package/esm2022/mixin/src/datalist.class.mjs +0 -3
- package/esm2022/mixin/src/dropdown-mixin.class.mjs +0 -95
- package/esm2022/mixin/src/interactive-mixin.class.mjs +0 -81
- package/esm2022/mixin/src/loading-mixin.class.mjs +0 -26
- package/esm2022/mixin/src/mixin.class.mjs +0 -26
- package/esm2022/mixin/src/page-component.class.mjs +0 -11
- package/esm2022/mixin/src/selection-component.class.mjs +0 -176
- package/esm2022/mixin/src/sizable-mixin.class.mjs +0 -22
- package/esm2022/mixin/src/textbox-mixin.class.mjs +0 -66
- package/esm2022/mixin/src/value-mixin.class.mjs +0 -220
- package/esm2022/notification/public-api.mjs +0 -5
- package/esm2022/notification/src/notification.class.mjs +0 -2
- package/esm2022/notification/src/notification.component.mjs +0 -93
- package/esm2022/notification/src/notification.module.mjs +0 -24
- package/esm2022/notification/src/notification.service.mjs +0 -110
- package/esm2022/number-box/public-api.mjs +0 -3
- package/esm2022/number-box/src/number-box.component.mjs +0 -240
- package/esm2022/number-box/src/number-box.module.mjs +0 -36
- package/esm2022/page/public-api.mjs +0 -4
- package/esm2022/page/src/base-page.class.mjs +0 -64
- package/esm2022/page/src/page.component.mjs +0 -47
- package/esm2022/page/src/page.module.mjs +0 -19
- package/esm2022/password-box/public-api.mjs +0 -3
- package/esm2022/password-box/src/password-box.component.mjs +0 -64
- package/esm2022/password-box/src/password-box.module.mjs +0 -33
- package/esm2022/picker/acorex-components-picker.mjs +0 -5
- package/esm2022/picker/public-api.mjs +0 -4
- package/esm2022/picker/src/picker-column.component.mjs +0 -21
- package/esm2022/picker/src/picker.component.mjs +0 -17
- package/esm2022/picker/src/picker.module.mjs +0 -38
- package/esm2022/popover/public-api.mjs +0 -4
- package/esm2022/popover/src/dropdown-component.class.mjs +0 -71
- package/esm2022/popover/src/popover.component.mjs +0 -270
- package/esm2022/popover/src/popover.module.mjs +0 -20
- package/esm2022/popup/public-api.mjs +0 -4
- package/esm2022/popup/src/popup.component.mjs +0 -147
- package/esm2022/popup/src/popup.module.mjs +0 -28
- package/esm2022/popup/src/popup.service.mjs +0 -117
- package/esm2022/progress-bar/public-api.mjs +0 -3
- package/esm2022/progress-bar/src/progress-bar.component.mjs +0 -34
- package/esm2022/progress-bar/src/progress-bar.module.mjs +0 -20
- package/esm2022/public-api.mjs +0 -5
- package/esm2022/radio/public-api.mjs +0 -3
- package/esm2022/radio/src/radio.component.mjs +0 -40
- package/esm2022/radio/src/radio.module.mjs +0 -23
- package/esm2022/range-slider/public-api.mjs +0 -3
- package/esm2022/range-slider/src/range-slider.component.mjs +0 -118
- package/esm2022/range-slider/src/range-slider.module.mjs +0 -23
- package/esm2022/rating/acorex-components-rating.mjs +0 -5
- package/esm2022/rating/public-api.mjs +0 -3
- package/esm2022/rating/src/rating.component.mjs +0 -42
- package/esm2022/rating/src/rating.component.module.mjs +0 -20
- package/esm2022/result/public-api.mjs +0 -3
- package/esm2022/result/src/result.component.mjs +0 -27
- package/esm2022/result/src/result.module.mjs +0 -20
- package/esm2022/search-box/public-api.mjs +0 -3
- package/esm2022/search-box/src/search-box.component.mjs +0 -63
- package/esm2022/search-box/src/search-box.module.mjs +0 -26
- package/esm2022/select-box/public-api.mjs +0 -3
- package/esm2022/select-box/src/selectbox.component.mjs +0 -367
- package/esm2022/select-box/src/selectbox.module.mjs +0 -62
- package/esm2022/selection-list/public-api.mjs +0 -3
- package/esm2022/selection-list/src/selection-list.component.mjs +0 -60
- package/esm2022/selection-list/src/selection-list.module.mjs +0 -25
- package/esm2022/switch/public-api.mjs +0 -4
- package/esm2022/switch/src/switch-content.component.mjs +0 -17
- package/esm2022/switch/src/switch.component.mjs +0 -55
- package/esm2022/switch/src/switch.module.mjs +0 -23
- package/esm2022/tabs/public-api.mjs +0 -6
- package/esm2022/tabs/src/tab-content.directive.mjs +0 -32
- package/esm2022/tabs/src/tab-item.component.mjs +0 -141
- package/esm2022/tabs/src/tabs.class.mjs +0 -6
- package/esm2022/tabs/src/tabs.component.mjs +0 -111
- package/esm2022/tabs/src/tabs.module.mjs +0 -26
- package/esm2022/tag/public-api.mjs +0 -3
- package/esm2022/tag/src/tag.component.mjs +0 -30
- package/esm2022/tag/src/tag.module.mjs +0 -20
- package/esm2022/textarea/public-api.mjs +0 -3
- package/esm2022/textarea/src/textarea.component.mjs +0 -30
- package/esm2022/textarea/src/textarea.module.mjs +0 -20
- package/esm2022/textbox/public-api.mjs +0 -4
- package/esm2022/textbox/src/mask-options.directive.mjs +0 -20
- package/esm2022/textbox/src/textbox.component.mjs +0 -84
- package/esm2022/textbox/src/textbox.module.mjs +0 -39
- package/esm2022/time-box/public-api.mjs +0 -3
- package/esm2022/time-box/src/time-box.component.mjs +0 -282
- package/esm2022/time-box/src/time-box.module.mjs +0 -33
- package/esm2022/toast/public-api.mjs +0 -5
- package/esm2022/toast/src/toast.class.mjs +0 -2
- package/esm2022/toast/src/toast.component.mjs +0 -68
- package/esm2022/toast/src/toast.module.mjs +0 -23
- package/esm2022/toast/src/toast.service.mjs +0 -137
- package/esm2022/tooltip/public-api.mjs +0 -4
- package/esm2022/tooltip/src/tooltip.component.mjs +0 -22
- package/esm2022/tooltip/src/tooltip.directive.mjs +0 -164
- package/esm2022/tooltip/src/tooltip.module.mjs +0 -23
- package/esm2022/tree-view/acorex-components-tree-view.mjs +0 -5
- package/esm2022/tree-view/public-api.mjs +0 -3
- package/esm2022/tree-view/src/tree-view.component.mjs +0 -108
- package/esm2022/tree-view/src/tree-view.module.mjs +0 -21
- package/esm2022/uploader/public-api.mjs +0 -3
- package/esm2022/uploader/src/uploader.component.mjs +0 -102
- package/esm2022/uploader/src/uploader.module.mjs +0 -21
- package/fesm2022/acorex-components-card.mjs +0 -41
- package/fesm2022/acorex-components-card.mjs.map +0 -1
- package/fesm2022/acorex-components-picker.mjs +0 -74
- package/fesm2022/acorex-components-picker.mjs.map +0 -1
- package/fesm2022/acorex-components-rating.mjs +0 -64
- package/fesm2022/acorex-components-rating.mjs.map +0 -1
- package/fesm2022/acorex-components-tree-view.mjs +0 -131
- package/fesm2022/acorex-components-tree-view.mjs.map +0 -1
- package/form/public-api.d.ts +0 -6
- package/image/public-api.d.ts +0 -2
- package/image/src/image.component.d.ts +0 -27
- package/label/public-api.d.ts +0 -2
- package/loading/public-api.d.ts +0 -5
- package/loading/src/loading.directive.d.ts +0 -22
- package/menu/public-api.d.ts +0 -2
- package/menu/src/menu.component.d.ts +0 -42
- package/mixin/public-api.d.ts +0 -17
- package/mixin/src/base-components.class.d.ts +0 -84
- package/mixin/src/base-menu-mixin.class.d.ts +0 -53
- package/mixin/src/button-mixin.class.d.ts +0 -53
- package/mixin/src/clickable-mixin.class.d.ts +0 -36
- package/mixin/src/color-look-mixing.class.d.ts +0 -44
- package/mixin/src/datalist-component.class.d.ts +0 -59
- package/mixin/src/dropdown-mixin.class.d.ts +0 -47
- package/mixin/src/interactive-mixin.class.d.ts +0 -60
- package/mixin/src/loading-mixin.class.d.ts +0 -40
- package/mixin/src/mixin.class.d.ts +0 -679
- package/mixin/src/page-component.class.d.ts +0 -28
- package/mixin/src/selection-component.class.d.ts +0 -61
- package/mixin/src/sizable-mixin.class.d.ts +0 -34
- package/mixin/src/textbox-mixin.class.d.ts +0 -66
- package/mixin/src/value-mixin.class.d.ts +0 -63
- package/notification/public-api.d.ts +0 -4
- package/number-box/public-api.d.ts +0 -2
- package/page/public-api.d.ts +0 -3
- package/page/src/page.component.d.ts +0 -14
- package/password-box/public-api.d.ts +0 -2
- package/picker/index.d.ts +0 -5
- package/picker/public-api.d.ts +0 -3
- package/picker/src/picker-column.component.d.ts +0 -11
- package/picker/src/picker.component.d.ts +0 -10
- package/picker/src/picker.module.d.ts +0 -14
- package/popover/public-api.d.ts +0 -3
- package/popup/public-api.d.ts +0 -3
- package/progress-bar/public-api.d.ts +0 -2
- package/public-api.d.ts +0 -1
- package/radio/public-api.d.ts +0 -2
- package/range-slider/public-api.d.ts +0 -2
- package/rating/index.d.ts +0 -5
- package/rating/public-api.d.ts +0 -2
- package/rating/src/rating.component.d.ts +0 -21
- package/rating/src/rating.component.module.d.ts +0 -8
- package/result/public-api.d.ts +0 -2
- package/result/src/result.component.d.ts +0 -12
- package/scss/_mixin.scss +0 -1
- package/scss/_variable.scss +0 -1
- package/scss/index.scss +0 -2
- package/search-box/public-api.d.ts +0 -2
- package/select-box/public-api.d.ts +0 -2
- package/select-box/src/selectbox.module.d.ts +0 -18
- package/selection-list/public-api.d.ts +0 -2
- package/switch/public-api.d.ts +0 -3
- package/tabs/public-api.d.ts +0 -5
- package/tabs/src/tab-item.component.d.ts +0 -48
- package/tag/public-api.d.ts +0 -2
- package/textarea/public-api.d.ts +0 -2
- package/textbox/public-api.d.ts +0 -3
- package/time-box/public-api.d.ts +0 -2
- package/toast/public-api.d.ts +0 -4
- package/tooltip/public-api.d.ts +0 -3
- package/tree-view/index.d.ts +0 -5
- package/tree-view/public-api.d.ts +0 -2
- package/tree-view/src/tree-view.component.d.ts +0 -33
- package/tree-view/src/tree-view.module.d.ts +0 -9
- package/uploader/public-api.d.ts +0 -2
- /package/action-sheet/{src → lib}/action-sheet.component.d.ts +0 -0
- /package/action-sheet/{src → lib}/action-sheet.interface.d.ts +0 -0
- /package/action-sheet/{src → lib}/action-sheet.module.d.ts +0 -0
- /package/action-sheet/{src → lib}/action-sheet.service.d.ts +0 -0
- /package/alert/{src → lib}/alert.component.d.ts +0 -0
- /package/alert/{src → lib}/alert.module.d.ts +0 -0
- /package/avatar/{src → lib}/avatar-group.component.d.ts +0 -0
- /package/avatar/{src → lib}/avatar.component.d.ts +0 -0
- /package/avatar/{src → lib}/avatar.module.d.ts +0 -0
- /package/badge/{src → lib}/badge.component.d.ts +0 -0
- /package/badge/{src → lib}/badge.module.d.ts +0 -0
- /package/breadcrumbs/{src → lib}/breadcrumbs-item.class.d.ts +0 -0
- /package/breadcrumbs/{src → lib}/breadcrumbs.component.d.ts +0 -0
- /package/breadcrumbs/{src → lib}/breadcrumbs.module.d.ts +0 -0
- /package/button/{src → lib}/button-item.class.d.ts +0 -0
- /package/button/{src → lib}/button.component.d.ts +0 -0
- /package/button/{src → lib}/button.module.d.ts +0 -0
- /package/calendar/{src → lib}/calendar-range.component.d.ts +0 -0
- /package/calendar/{src → lib}/calendar.component.d.ts +0 -0
- /package/calendar/{src → lib}/calendar.module.d.ts +0 -0
- /package/checkbox/{src → lib}/checkbox.component.d.ts +0 -0
- /package/checkbox/{src → lib}/checkbox.module.d.ts +0 -0
- /package/chips/{src → lib}/chips.module.d.ts +0 -0
- /package/collapse/{src → lib}/collapse-group.component.d.ts +0 -0
- /package/collapse/{src → lib}/collapse.component.d.ts +0 -0
- /package/collapse/{src → lib}/collapse.module.d.ts +0 -0
- /package/color-palette/{src → lib}/color-palette-input.component.d.ts +0 -0
- /package/color-palette/{src → lib}/color-palette-picker.component.d.ts +0 -0
- /package/color-palette/{src → lib}/color-palette-preview.component.d.ts +0 -0
- /package/color-palette/{src → lib}/color-palette-swatches.component.d.ts +0 -0
- /package/color-palette/{src → lib}/color-palette.class.d.ts +0 -0
- /package/color-palette/{src → lib}/color-palette.component.d.ts +0 -0
- /package/color-palette/{src → lib}/color-palette.module.d.ts +0 -0
- /package/color-picker/{src → lib}/color-picker.module.d.ts +0 -0
- /package/common/{src → lib}/classes/components.class.d.ts +0 -0
- /package/common/{src → lib}/classes/data.class.d.ts +0 -0
- /package/common/{src → lib}/classes/drawing.class.d.ts +0 -0
- /package/common/{src → lib}/classes/events.class.d.ts +0 -0
- /package/common/{src → lib}/classes/styles.class.d.ts +0 -0
- /package/common/{src → lib}/common.module.d.ts +0 -0
- /package/common/{src → lib}/components/base-component.class.d.ts +0 -0
- /package/common/{src → lib}/components/color-component.class.d.ts +0 -0
- /package/common/{src → lib}/components/colorlook-component.class.d.ts +0 -0
- /package/common/{src → lib}/components/value-component.class.d.ts +0 -0
- /package/common/{src → lib}/constant/positions.d.ts +0 -0
- /package/common/{src → lib}/directives/auto-focus.directive.d.ts +0 -0
- /package/common/{src → lib}/directives/debounce-time.directive.d.ts +0 -0
- /package/common/{src → lib}/directives/hotkey.directive.d.ts +0 -0
- /package/common/{src → lib}/directives/infinite-scroll.directive.d.ts +0 -0
- /package/common/{src → lib}/directives/responsive.directive.d.ts +0 -0
- /package/common/{src → lib}/services/custom-cdk-overlay.service.d.ts +0 -0
- /package/common/{src → lib}/services/hotkey.service.d.ts +0 -0
- /package/common/{src → lib}/services/overlay.service.d.ts +0 -0
- /package/context-menu/{src → lib}/context-menu.component.d.ts +0 -0
- /package/context-menu/{src → lib}/context-menu.module.d.ts +0 -0
- /package/data-pager/{src → lib}/data-pager-base.component.d.ts +0 -0
- /package/data-pager/{src → lib}/data-pager-info.component.d.ts +0 -0
- /package/data-pager/{src → lib}/data-pager-next-buttons.components.d.ts +0 -0
- /package/data-pager/{src → lib}/data-pager-numeric-selector.component.d.ts +0 -0
- /package/data-pager/{src → lib}/data-pager-pagesize-dropdown.component.d.ts +0 -0
- /package/data-pager/{src → lib}/data-pager-prev-buttons.component.d.ts +0 -0
- /package/data-pager/{src → lib}/data-pager.component.d.ts +0 -0
- /package/data-pager/{src → lib}/data-pager.module.d.ts +0 -0
- /package/data-table/{src → lib}/data-column-cell-template.directive.d.ts +0 -0
- /package/data-table/{src → lib}/data-column.directive.d.ts +0 -0
- /package/data-table/{src → lib}/data-table.component.d.ts +0 -0
- /package/data-table/{src → lib}/data-table.module.d.ts +0 -0
- /package/date-picker/{src → lib}/datepicker.component.d.ts +0 -0
- /package/date-picker/{src → lib}/datepicker.module.d.ts +0 -0
- /package/decorators/{src → lib}/close-button.component.d.ts +0 -0
- /package/decorators/{src → lib}/content.component.d.ts +0 -0
- /package/decorators/{src → lib}/decorators.module.d.ts +0 -0
- /package/decorators/{src → lib}/footer.component.d.ts +0 -0
- /package/decorators/{src → lib}/form-hint.component.d.ts +0 -0
- /package/decorators/{src → lib}/header.component.d.ts +0 -0
- /package/decorators/{src → lib}/icon.component.d.ts +0 -0
- /package/decorators/{src → lib}/overlay.component.d.ts +0 -0
- /package/decorators/{src → lib}/placeholder.component.d.ts +0 -0
- /package/decorators/{src → lib}/prefix.component.d.ts +0 -0
- /package/decorators/{src → lib}/sub-title.component.d.ts +0 -0
- /package/decorators/{src → lib}/suffix.component.d.ts +0 -0
- /package/decorators/{src → lib}/text.component.d.ts +0 -0
- /package/decorators/{src → lib}/title.component.d.ts +0 -0
- /package/dialog/{src → lib}/dialog.class.d.ts +0 -0
- /package/dialog/{src → lib}/dialog.component.d.ts +0 -0
- /package/dialog/{src → lib}/dialog.module.d.ts +0 -0
- /package/dialog/{src → lib}/dialog.service.d.ts +0 -0
- /package/drawer/{src → lib}/drawer-container.component.d.ts +0 -0
- /package/drawer/{src → lib}/drawer.component.d.ts +0 -0
- /package/drawer/{src → lib}/drawer.module.d.ts +0 -0
- /package/dropdown/{src → lib}/dropdown-panel.component.d.ts +0 -0
- /package/dropdown/{src → lib}/dropdown.module.d.ts +0 -0
- /package/form/{src → lib}/form-field.component.d.ts +0 -0
- /package/form/{src → lib}/form.component.d.ts +0 -0
- /package/form/{src → lib}/form.module.d.ts +0 -0
- /package/form/{src → lib}/validation-rule.widget.d.ts +0 -0
- /package/form/{src → lib}/validation-summary.component.d.ts +0 -0
- /package/form/{src → lib}/validation.class.d.ts +0 -0
- /package/image/{src → lib}/image.module.d.ts +0 -0
- /package/label/{src → lib}/label.component.d.ts +0 -0
- /package/label/{src → lib}/label.module.d.ts +0 -0
- /package/loading/{src → lib}/loading-spinner.component.d.ts +0 -0
- /package/loading/{src → lib}/loading.component.d.ts +0 -0
- /package/loading/{src → lib}/loading.module.d.ts +0 -0
- /package/loading/{src → lib}/loading.service.d.ts +0 -0
- /package/menu/{src → lib}/menu.module.d.ts +0 -0
- /package/mixin/{src → lib}/constratctor.d.ts +0 -0
- /package/mixin/{src → lib}/datalist.class.d.ts +0 -0
- /package/notification/{src → lib}/notification.class.d.ts +0 -0
- /package/notification/{src → lib}/notification.component.d.ts +0 -0
- /package/notification/{src → lib}/notification.module.d.ts +0 -0
- /package/notification/{src → lib}/notification.service.d.ts +0 -0
- /package/number-box/{src → lib}/number-box.component.d.ts +0 -0
- /package/number-box/{src → lib}/number-box.module.d.ts +0 -0
- /package/page/{src → lib}/base-page.class.d.ts +0 -0
- /package/page/{src → lib}/page.module.d.ts +0 -0
- /package/password-box/{src → lib}/password-box.component.d.ts +0 -0
- /package/password-box/{src → lib}/password-box.module.d.ts +0 -0
- /package/popover/{src → lib}/dropdown-component.class.d.ts +0 -0
- /package/popover/{src → lib}/popover.component.d.ts +0 -0
- /package/popover/{src → lib}/popover.module.d.ts +0 -0
- /package/popup/{src → lib}/popup.component.d.ts +0 -0
- /package/popup/{src → lib}/popup.module.d.ts +0 -0
- /package/popup/{src → lib}/popup.service.d.ts +0 -0
- /package/progress-bar/{src → lib}/progress-bar.component.d.ts +0 -0
- /package/progress-bar/{src → lib}/progress-bar.module.d.ts +0 -0
- /package/radio/{src → lib}/radio.component.d.ts +0 -0
- /package/radio/{src → lib}/radio.module.d.ts +0 -0
- /package/range-slider/{src → lib}/range-slider.component.d.ts +0 -0
- /package/range-slider/{src → lib}/range-slider.module.d.ts +0 -0
- /package/result/{src → lib}/result.module.d.ts +0 -0
- /package/search-box/{src → lib}/search-box.component.d.ts +0 -0
- /package/search-box/{src → lib}/search-box.module.d.ts +0 -0
- /package/select-box/{src/selectbox.component.d.ts → lib/select-box.component.d.ts} +0 -0
- /package/selection-list/{src → lib}/selection-list.component.d.ts +0 -0
- /package/selection-list/{src → lib}/selection-list.module.d.ts +0 -0
- /package/switch/{src → lib}/switch-content.component.d.ts +0 -0
- /package/switch/{src → lib}/switch.component.d.ts +0 -0
- /package/switch/{src → lib}/switch.module.d.ts +0 -0
- /package/tabs/{src → lib}/tab-content.directive.d.ts +0 -0
- /package/tabs/{src → lib}/tabs.class.d.ts +0 -0
- /package/tabs/{src → lib}/tabs.component.d.ts +0 -0
- /package/tabs/{src → lib}/tabs.module.d.ts +0 -0
- /package/tag/{src → lib}/tag.component.d.ts +0 -0
- /package/tag/{src → lib}/tag.module.d.ts +0 -0
- /package/textarea/{src → lib}/textarea.component.d.ts +0 -0
- /package/textarea/{src → lib}/textarea.module.d.ts +0 -0
- /package/textbox/{src → lib}/mask-options.directive.d.ts +0 -0
- /package/textbox/{src → lib}/textbox.component.d.ts +0 -0
- /package/textbox/{src → lib}/textbox.module.d.ts +0 -0
- /package/time-box/{src → lib}/time-box.component.d.ts +0 -0
- /package/time-box/{src → lib}/time-box.module.d.ts +0 -0
- /package/toast/{src → lib}/toast.class.d.ts +0 -0
- /package/toast/{src → lib}/toast.component.d.ts +0 -0
- /package/toast/{src → lib}/toast.module.d.ts +0 -0
- /package/toast/{src → lib}/toast.service.d.ts +0 -0
- /package/tooltip/{src → lib}/tooltip.component.d.ts +0 -0
- /package/tooltip/{src → lib}/tooltip.directive.d.ts +0 -0
- /package/tooltip/{src → lib}/tooltip.module.d.ts +0 -0
- /package/uploader/{src → lib}/uploader.component.d.ts +0 -0
- /package/uploader/{src → lib}/uploader.module.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-notification.mjs","sources":["../../../../projects/acorex/components/notification/src/notification.component.ts","../../../../projects/acorex/components/notification/src/notification.component.html","../../../../projects/acorex/components/notification/src/notification.module.ts","../../../../projects/acorex/components/notification/src/notification.service.ts","../../../../projects/acorex/components/notification/acorex-components-notification.ts"],"sourcesContent":["import { AXClosbaleComponent } from '@acorex/components/common';\nimport { AXButtonItem } from '@acorex/components/button';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n HostBinding,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\nimport { AXNotificationOptions } from './notification.class';\nimport { ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\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-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXClosbaleComponent, useExisting: AXNotificationComponent },\n ],\n})\nexport class AXNotificationComponent extends AXBaseComponentMixin {\n options: AXNotificationOptions;\n _selectedPortal: Portal<any>;\n _icon: string;\n\n close: () => void;\n /**\n * @ignore\n */\n constructor(\n elementRef: ElementRef,\n cdr: ChangeDetectorRef,\n private viewRef: ViewContainerRef\n ) {\n super(elementRef, cdr);\n }\n\n onInit() {\n this._initContent();\n this._initIcon();\n this._handleTimeOut();\n }\n\n private _handleTimeOut() {\n if (this.options.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.options.timeOut);\n }\n }\n private _initContent() {\n if (this.options.content instanceof TemplateRef<any>) {\n this._selectedPortal = new TemplatePortal(\n this.options.content as TemplateRef<any>,\n this.viewRef\n );\n this._cdr.markForCheck();\n } else if (typeof this.options.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.options.content as any);\n this._cdr.markForCheck();\n }\n }\n\n private _initIcon() {\n if (!this.options.icon) {\n switch (this.options.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 default:\n this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';\n break;\n }\n } else {\n this._icon = this.options.icon;\n }\n }\n\n _handleButtonClick(button: AXButtonItem) {\n if (button.onClick) {\n button.onClick(this);\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.options.color}`;\n }\n}\n","<span [class]=\"'ax-notification-icon' + ' ' + _icon\"></span>\n<div class=\"ax-notification-content\">\n <div class=\"ax-notification-title\">{{ options.title }}</div>\n <ng-template *ngIf=\"_selectedPortal\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\n </ng-template>\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\n <div *ngIf=\"!_selectedPortal\">{{ options.content }}</div>\n <div class=\"ax-notification-buttons\" *ngIf=\"options?.buttons?.length\">\n <ax-button\n *ngFor=\"let button of options.buttons\"\n class=\"ax-xs\"\n [text]=\"button.text\"\n [color]=\"button.color\"\n [look]=\"button.look\"\n (onClick)=\"_handleButtonClick(button)\">\n {{ button.text }}\n </ax-button>\n </div>\n</div>\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\n<div\n class=\"ax-notification-progress\"\n [style.animation-duration.ms]=\"options.timeOut\"\n *ngIf=\"options.timeOut\"></div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXNotificationComponent } from './notification.component';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { AXButtonModule } from '@acorex/components/button';\n\nconst COMPONENT = [AXNotificationComponent];\nconst MODULES = [CommonModule, PortalModule, AXButtonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXNotificationModule {}\n","import { AXConfig } from '@acorex/core/config';\nimport { Overlay } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Injectable, Injector, TemplateRef } from '@angular/core';\nimport { AXNotificationOptions, AXNotificationRef } from './notification.class';\nimport { AXNotificationComponent } from './notification.component';\n\n@Injectable({ providedIn: 'root' })\nexport class AXNotificationService {\n private readonly _defaults = {\n gap: 5,\n location: 'top-end',\n };\n\n constructor(\n private overlayService: Overlay,\n private parentInjector: Injector\n ) {}\n\n private _activeList: AXNotificationComponent[] = [];\n\n show(options: AXNotificationOptions): AXNotificationRef {\n const opt = Object.assign(\n {\n closeable: true,\n location:\n AXConfig.get('notification.location') || this._defaults.location,\n },\n options\n );\n const gap = AXConfig.get('notification.gap') || this._defaults.gap;\n\n let positionStrategy = this.overlayService.position().global();\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\n .centerVertically()\n .right(gap + 'px');\n break;\n default:\n break;\n }\n const overlayRef = this.overlayService.create({\n positionStrategy,\n panelClass: [\n 'ax-animate-animated',\n 'ax-animate-fadeIn',\n 'ax-animate-faster',\n ],\n });\n const notificationPortal = new ComponentPortal(\n AXNotificationComponent,\n null,\n this.parentInjector\n );\n\n const host = overlayRef.attach(notificationPortal);\n (host.instance as any).visibleIndex = this._activeList.length;\n this._activeList.push(host.instance);\n if (host.instance) {\n Object.assign(host.instance, {\n options: opt,\n close: () => {\n this._activeList = this._activeList.filter(c => c != host.instance);\n overlayRef.dispose();\n },\n });\n setTimeout(() => {\n host.changeDetectorRef.detectChanges();\n }, 0);\n }\n\n return {\n close: () => {\n host.instance.close();\n },\n };\n }\n\n public hideAll() {\n this._activeList.forEach(c => c.close());\n }\n\n private getPosition(location: string) {\n const list = this._activeList.filter(c => c.options.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return (\n window.innerHeight - list[list.length - 1]._getHostElement().offsetTop\n );\n } else {\n return (\n list[list.length - 1]._getHostElement().offsetTop +\n list[list.length - 1]._getHostElement().offsetHeight\n );\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAgBA;;;;AAIG;AACH,MAUa,uBAAwB,SAAQ,oBAAoB,CAAA;AAYrD,IAAA,OAAA,CAAA;AAXV,IAAA,OAAO,CAAwB;AAC/B,IAAA,eAAe,CAAc;AAC7B,IAAA,KAAK,CAAS;AAEd,IAAA,KAAK,CAAa;AAClB;;AAEG;AACH,IAAA,WAAA,CACE,UAAsB,EACtB,GAAsB,EACd,OAAyB,EAAA;AAEjC,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAFf,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;KAGlC;IAED,MAAM,GAAA;QACJ,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,cAAc,EAAE,CAAC;KACvB;IAEO,cAAc,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACxB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,aAAC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC1B,SAAA;KACF;IACO,YAAY,GAAA;QAClB,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,aAAY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,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA;;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACPlC;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-notification.mjs","sources":["../../../../libs/components/notification/src/lib/notification.component.ts","../../../../libs/components/notification/src/lib/notification.component.html","../../../../libs/components/notification/src/lib/notification.module.ts","../../../../libs/components/notification/src/lib/notification.service.ts","../../../../libs/components/notification/src/acorex-components-notification.ts"],"sourcesContent":["import { AXClosbaleComponent } from '@acorex/components/common';\nimport { AXButtonItem } from '@acorex/components/button';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n HostBinding,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\nimport { AXNotificationOptions } from './notification.class';\nimport { ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\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-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent }],\n})\nexport class AXNotificationComponent extends AXBaseComponentMixin {\n options: AXNotificationOptions;\n _selectedPortal: Portal<any>;\n _icon: string;\n\n close: () => void;\n /**\n * @ignore\n */\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, private viewRef: ViewContainerRef) {\n super(elementRef, cdr);\n }\n\n override onInit() {\n this._initContent();\n this._initIcon();\n this._handleTimeOut();\n }\n\n private _handleTimeOut() {\n if (this.options.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.options.timeOut);\n }\n }\n private _initContent() {\n if (this.options.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(\n this.options.content as TemplateRef<any>,\n this.viewRef\n );\n this._cdr.markForCheck();\n } else if (typeof this.options.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.options.content as any);\n this._cdr.markForCheck();\n }\n }\n\n private _initIcon() {\n if (!this.options.icon) {\n switch (this.options.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 default:\n this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';\n break;\n }\n } else {\n this._icon = this.options.icon;\n }\n }\n\n _handleButtonClick(button: AXButtonItem) {\n if (button.onClick) {\n button.onClick(this);\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.options.color}`;\n }\n}\n","<span [class]=\"'ax-notification-icon' + ' ' + _icon\"></span>\n<div class=\"ax-notification-content\">\n <div class=\"ax-notification-title\">{{ options.title }}</div>\n <ng-template *ngIf=\"_selectedPortal\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\n </ng-template>\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\n <div *ngIf=\"!_selectedPortal\">{{ options.content }}</div>\n <div class=\"ax-notification-buttons\" *ngIf=\"options?.buttons?.length\">\n <ax-button\n *ngFor=\"let button of options.buttons\"\n class=\"ax-xs\"\n [text]=\"button.text\"\n [color]=\"button.color\"\n [look]=\"button.look\"\n (onClick)=\"_handleButtonClick(button)\">\n {{ button.text }}\n </ax-button>\n </div>\n</div>\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\n<div\n class=\"ax-notification-progress\"\n [style.animation-duration.ms]=\"options.timeOut\"\n *ngIf=\"options.timeOut\"></div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXNotificationComponent } from './notification.component';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { AXButtonModule } from '@acorex/components/button';\n\nconst COMPONENT = [AXNotificationComponent];\nconst MODULES = [CommonModule, PortalModule, AXButtonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXNotificationModule {}\n","import { AXConfig } from '@acorex/core/config';\nimport { Overlay } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Injectable, Injector, TemplateRef } from '@angular/core';\nimport { AXNotificationOptions, AXNotificationRef } from './notification.class';\nimport { AXNotificationComponent } from './notification.component';\n\n@Injectable({ providedIn: 'root' })\nexport class AXNotificationService {\n private readonly _defaults = {\n gap: 5,\n location: 'top-end',\n };\n\n constructor(\n private overlayService: Overlay,\n private parentInjector: Injector\n ) {}\n\n private _activeList: AXNotificationComponent[] = [];\n\n show(options: AXNotificationOptions): AXNotificationRef {\n const opt = Object.assign(\n {\n closeable: true,\n location:\n AXConfig.get('notification.location') || this._defaults.location,\n },\n options\n );\n const gap = AXConfig.get('notification.gap') || this._defaults.gap;\n\n let positionStrategy = this.overlayService.position().global();\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\n .centerVertically()\n .right(gap + 'px');\n break;\n default:\n break;\n }\n const overlayRef = this.overlayService.create({\n positionStrategy,\n panelClass: [\n 'ax-animate-animated',\n 'ax-animate-fadeIn',\n 'ax-animate-faster',\n ],\n });\n const notificationPortal = new ComponentPortal(\n AXNotificationComponent,\n null,\n this.parentInjector\n );\n\n const host = overlayRef.attach(notificationPortal);\n (host.instance as any).visibleIndex = this._activeList.length;\n this._activeList.push(host.instance);\n if (host.instance) {\n Object.assign(host.instance, {\n options: opt,\n close: () => {\n this._activeList = this._activeList.filter(c => c != host.instance);\n overlayRef.dispose();\n },\n });\n setTimeout(() => {\n host.changeDetectorRef.detectChanges();\n }, 0);\n }\n\n return {\n close: () => {\n host.instance.close();\n },\n };\n }\n\n public hideAll() {\n this._activeList.forEach(c => c.close());\n }\n\n private getPosition(location: string) {\n const list = this._activeList.filter(c => c.options.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return (\n window.innerHeight - list[list.length - 1]._getHostElement().offsetTop\n );\n } else {\n return (\n list[list.length - 1]._getHostElement().offsetTop +\n list[list.length - 1]._getHostElement().offsetHeight\n );\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAgBA;;;;AAIG;AASG,MAAO,uBAAwB,SAAQ,oBAAoB,CAAA;AAM/D;;AAEG;AACH,IAAA,WAAA,CAAY,UAAsB,EAAE,GAAsB,EAAU,OAAyB,EAAA;AAC3F,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAD2C,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;KAE5F;IAEQ,MAAM,GAAA;QACb,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,cAAc,EAAE,CAAC;KACvB;IAEO,cAAc,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACxB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;A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AAA,EAAA;AAArB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACPlC;;AAEG;;;;"}
|
@@ -18,9 +18,6 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
18
18
|
* @category Components
|
19
19
|
*/
|
20
20
|
class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
21
|
-
cdr;
|
22
|
-
input;
|
23
|
-
_thousandsSeparator;
|
24
21
|
/**
|
25
22
|
* A character value that specifies the separator character.
|
26
23
|
*/
|
@@ -33,7 +30,6 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
|
33
30
|
value: v ?? '',
|
34
31
|
});
|
35
32
|
}
|
36
|
-
_padDecimalZeros = false;
|
37
33
|
/**
|
38
34
|
* A character value that specifies the separator character.
|
39
35
|
*/
|
@@ -46,11 +42,6 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
|
46
42
|
value: v,
|
47
43
|
});
|
48
44
|
}
|
49
|
-
/**
|
50
|
-
* Specifies the value that is used to increment or decrement the **Integer** part of number
|
51
|
-
*/
|
52
|
-
step = 1;
|
53
|
-
_decimals = 0;
|
54
45
|
/**
|
55
46
|
* Specifies the number of decimals that the user can enter
|
56
47
|
*/
|
@@ -63,15 +54,6 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
|
63
54
|
value: v ?? 0,
|
64
55
|
});
|
65
56
|
}
|
66
|
-
/**
|
67
|
-
* Specifies the value that is used to increment or decrement the **Deciaml** part of number
|
68
|
-
*/
|
69
|
-
decimalStep = 'auto';
|
70
|
-
/**
|
71
|
-
* Specifies whether the Up and Down spin buttons will be rendered or not
|
72
|
-
*/
|
73
|
-
showSpinButtons = true;
|
74
|
-
_minValue = Number.MIN_SAFE_INTEGER;
|
75
57
|
/**
|
76
58
|
* Specifies the smallest value that is valid
|
77
59
|
*/
|
@@ -84,7 +66,6 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
|
84
66
|
value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,
|
85
67
|
});
|
86
68
|
}
|
87
|
-
_maxValue = Number.MAX_SAFE_INTEGER;
|
88
69
|
/**
|
89
70
|
* Specifies the greatest value that is valid
|
90
71
|
*/
|
@@ -97,17 +78,28 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
|
97
78
|
value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,
|
98
79
|
});
|
99
80
|
}
|
100
|
-
/**
|
101
|
-
* @ignore
|
102
|
-
*/
|
103
|
-
_maskObj;
|
104
|
-
_maskDirective;
|
105
81
|
/**
|
106
82
|
* @ignore
|
107
83
|
*/
|
108
84
|
constructor(elementRef, cdr) {
|
109
85
|
super(elementRef, cdr);
|
110
86
|
this.cdr = cdr;
|
87
|
+
this._padDecimalZeros = false;
|
88
|
+
/**
|
89
|
+
* Specifies the value that is used to increment or decrement the **Integer** part of number
|
90
|
+
*/
|
91
|
+
this.step = 1;
|
92
|
+
this._decimals = 0;
|
93
|
+
/**
|
94
|
+
* Specifies the value that is used to increment or decrement the **Deciaml** part of number
|
95
|
+
*/
|
96
|
+
this.decimalStep = 'auto';
|
97
|
+
/**
|
98
|
+
* Specifies whether the Up and Down spin buttons will be rendered or not
|
99
|
+
*/
|
100
|
+
this.showSpinButtons = true;
|
101
|
+
this._minValue = Number.MIN_SAFE_INTEGER;
|
102
|
+
this._maxValue = Number.MAX_SAFE_INTEGER;
|
111
103
|
}
|
112
104
|
onViewInit() {
|
113
105
|
super.onViewInit();
|
@@ -212,12 +204,29 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
|
212
204
|
}
|
213
205
|
this.value -= toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep);
|
214
206
|
}
|
215
|
-
static
|
216
|
-
static
|
207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXNumberBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
208
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", state: "state", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", type: "type", autoComplete: "autoComplete", name: "name", checked: "checked", thousandsSeparator: "thousandsSeparator", padDecimalZeros: "padDecimalZeros", step: "step", decimals: "decimals", decimalStep: "decimalStep", showSpinButtons: "showSpinButtons", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "ax-editor-container" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "_maskDirective", first: true, predicate: IMaskDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"> </ng-content>\n<input\n #input\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"autoComplete\"\n [imask]=\"_maskObj\"\n [unmask]=\"'typed'\"\n [attr.min]=\"minValue\"\n [attr.max]=\"maxValue\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [(ngModel)]=\"value\"\n (keydown)=\"_handleOnKeydownEvent($event)\"\n (keyup)=\"_emitOnKeyupEvent($event)\"\n (keypress)=\"_emitOnKeypressEvent($event)\"\n (focus)=\"_emitOnFocusEvent($event)\"\n (blur)=\"_emitOnBlurEvent($event)\" />\n\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\" tabindex=\"-1\">\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\n </button>\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\n <span class=\"ax-icon ax-icon-arrow-down\" tabindex=\"-1\"></span>\n </button>\n</div>\n\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\n <ax-prefix>\n <ax-icon class=\"ax-icon-arrow-fill ax-rotation-90\">\n </ax-icon>\n </ax-prefix>\n </ax-button>\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\n <ax-prefix>\n <ax-icon class=\"ax-icon-arrow-fill -ax-rotation-90\">\n </ax-icon>\n </ax-prefix>\n </ax-button>\n</div> -->\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-number-box-control{display:flex;height:100%;align-items:center;justify-content:center;margin-inline-end:.25rem;flex-direction:column}.ax-number-box-control .ax-general-button{display:flex;width:1.25rem;height:1rem;border-radius:.2rem}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.IMaskDirective, selector: "[imask]", inputs: ["imask", "unmask", "imaskElement"], outputs: ["accept", "complete"], exportAs: ["imask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
217
209
|
}
|
218
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXNumberBoxComponent, decorators: [{
|
219
211
|
type: Component,
|
220
|
-
args: [{ selector: 'ax-number-box', inputs: [
|
212
|
+
args: [{ selector: 'ax-number-box', inputs: [
|
213
|
+
'disabled',
|
214
|
+
'readonly',
|
215
|
+
'tabIndex',
|
216
|
+
'size',
|
217
|
+
'value',
|
218
|
+
'state',
|
219
|
+
'placeholder',
|
220
|
+
'maxLength',
|
221
|
+
'allowNull',
|
222
|
+
'type',
|
223
|
+
'autoComplete',
|
224
|
+
'readonly',
|
225
|
+
'allowNull',
|
226
|
+
'value',
|
227
|
+
'name',
|
228
|
+
'checked',
|
229
|
+
], outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-editor-container' }, template: "<ng-content select=\"ax-prefix\"> </ng-content>\n<input\n #input\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"autoComplete\"\n [imask]=\"_maskObj\"\n [unmask]=\"'typed'\"\n [attr.min]=\"minValue\"\n [attr.max]=\"maxValue\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [(ngModel)]=\"value\"\n (keydown)=\"_handleOnKeydownEvent($event)\"\n (keyup)=\"_emitOnKeyupEvent($event)\"\n (keypress)=\"_emitOnKeypressEvent($event)\"\n (focus)=\"_emitOnFocusEvent($event)\"\n (blur)=\"_emitOnBlurEvent($event)\" />\n\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\" tabindex=\"-1\">\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\n </button>\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\n <span class=\"ax-icon ax-icon-arrow-down\" tabindex=\"-1\"></span>\n </button>\n</div>\n\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\n <ax-prefix>\n <ax-icon class=\"ax-icon-arrow-fill ax-rotation-90\">\n </ax-icon>\n </ax-prefix>\n </ax-button>\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\n <ax-prefix>\n <ax-icon class=\"ax-icon-arrow-fill -ax-rotation-90\">\n </ax-icon>\n </ax-prefix>\n </ax-button>\n</div> -->\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-number-box-control{display:flex;height:100%;align-items:center;justify-content:center;margin-inline-end:.25rem;flex-direction:column}.ax-number-box-control .ax-general-button{display:flex;width:1.25rem;height:1rem;border-radius:.2rem}\n"] }]
|
221
230
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
|
222
231
|
type: ViewChild,
|
223
232
|
args: ['input']
|
@@ -251,15 +260,15 @@ const MODULES = [
|
|
251
260
|
IMaskModule
|
252
261
|
];
|
253
262
|
class AXNumberBoxModule {
|
254
|
-
static
|
255
|
-
static
|
263
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXNumberBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
264
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: AXNumberBoxModule, declarations: [AXNumberBoxComponent], imports: [CommonModule,
|
256
265
|
FormsModule,
|
257
266
|
AXButtonModule,
|
258
267
|
AXDecoratorModule,
|
259
|
-
IMaskModule], exports: [AXNumberBoxComponent] });
|
260
|
-
static
|
268
|
+
IMaskModule], exports: [AXNumberBoxComponent] }); }
|
269
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXNumberBoxModule, imports: [MODULES] }); }
|
261
270
|
}
|
262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXNumberBoxModule, decorators: [{
|
263
272
|
type: NgModule,
|
264
273
|
args: [{
|
265
274
|
declarations: [...COMPONENT],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../projects/acorex/components/number-box/src/number-box.component.ts","../../../../projects/acorex/components/number-box/src/number-box.component.html","../../../../projects/acorex/components/number-box/src/number-box.module.ts","../../../../projects/acorex/components/number-box/acorex-components-number-box.ts"],"sourcesContent":["import { MaskedNumber, createMask } from 'imask';\nimport { IMaskDirective } from 'angular-imask';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, ChangeDetectorRef, Input, ViewChild } from '@angular/core';\n\nimport { toNumber } from 'lodash-es';\nimport { AXBaseTextBoxMixin, AXComponentOptionChanged } from '@acorex/components/mixin';\n\n/**\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-number-box',\n templateUrl: './number-box.component.html',\n styleUrls: ['./number-box.component.scss'],\n inputs: ['disabled', 'readonly', 'tabIndex', 'size', 'value', 'state', 'placeholder', 'maxLength', 'allowNull', 'type', 'autoComplete', 'readonly', 'allowNull', 'value', 'name', 'checked'],\n outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'ax-editor-container' },\n})\nexport class AXNumberBoxComponent extends AXBaseTextBoxMixin {\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n private _thousandsSeparator: string;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n public get thousandsSeparator(): string {\n return this._thousandsSeparator;\n }\n public set thousandsSeparator(v: string) {\n this._setOption({\n name: 'thousandsSeparator',\n value: v ?? '',\n });\n }\n\n private _padDecimalZeros: boolean = false;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n public get padDecimalZeros(): boolean {\n return this._padDecimalZeros;\n }\n public set padDecimalZeros(v: boolean) {\n this._setOption({\n name: 'padDecimalZeros',\n value: v,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Integer** part of number\n */\n @Input()\n step: number = 1;\n\n private _decimals: number = 0;\n /**\n * Specifies the number of decimals that the user can enter\n */\n @Input()\n public get decimals(): number {\n return this._decimals;\n }\n public set decimals(v: number) {\n this._setOption({\n name: 'decimals',\n value: v ?? 0,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\n */\n @Input()\n decimalStep: number | 'auto' = 'auto';\n\n /**\n * Specifies whether the Up and Down spin buttons will be rendered or not\n */\n @Input()\n showSpinButtons: boolean = true;\n\n private _minValue: number = Number.MIN_SAFE_INTEGER;\n /**\n * Specifies the smallest value that is valid\n */\n @Input()\n public get minValue(): number {\n return this._minValue;\n }\n public set minValue(v: number) {\n this._setOption({\n name: 'minValue',\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\n });\n }\n\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\n /**\n * Specifies the greatest value that is valid\n */\n @Input()\n public get maxValue(): number {\n return this._maxValue;\n }\n public set maxValue(v: number) {\n this._setOption({\n name: 'maxValue',\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\n });\n }\n\n /**\n * @ignore\n */\n _maskObj: MaskedNumber;\n\n @ViewChild(IMaskDirective)\n private _maskDirective: IMaskDirective<MaskedNumber>;\n\n /**\n * @ignore\n */\n constructor(elementRef: ElementRef, private cdr: ChangeDetectorRef) {\n super(elementRef, cdr);\n }\n\n onViewInit(): void {\n super.onViewInit();\n this._updateMask();\n }\n\n _onOptionChanged(option: AXComponentOptionChanged): void {\n super._onOptionChanged(option);\n this._updateMask();\n }\n\n focus(): void {\n this.input.nativeElement.focus();\n }\n\n private _updateMask() {\n if (!this._maskObj) {\n this._maskObj = createMask({\n mask: Number,\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n } else {\n this._maskObj.updateOptions({\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n }\n this._maskDirective?.maskRef?.updateValue();\n this._maskDirective?.maskRef?.updateControl();\n }\n\n _handleOnKeydownEvent(e: KeyboardEvent) {\n if (this.disabled || this.readonly) return;\n const ignore = () => {\n e.preventDefault();\n e.stopPropagation();\n };\n this._setUserInteraction();\n const input = e.target as HTMLInputElement;\n const valStr = input.value;\n const decimalPointIndex = valStr.indexOf('.');\n const _cursorPos = input.selectionStart!;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n if (decimalPointIndex > 0 && _cursorPos > decimalPointIndex && this.decimals > 0) {\n e.key === 'ArrowDown' ? this.decimalStepDown() : this.decimalStepUp();\n } else {\n e.key === 'ArrowDown' ? this.stepDown() : this.stepUp();\n }\n ignore();\n setTimeout(() => {\n input.setSelectionRange(_cursorPos, _cursorPos);\n }, 5);\n }\n super._emitOnKeydownEvent(e);\n }\n\n _handleUpDownClick(v: -1 | 1) {\n if (this.disabled || this.readonly) return;\n this._setUserInteraction();\n v == 1 ? this.stepUp() : this.stepDown();\n }\n\n _setValue(value: any) {\n if ((value == null || (value == 0 && !this._maskObj.value)) && this.allowNull) {\n return null;\n }\n const v = toNumber(value);\n if (v < this.minValue) return this.minValue;\n if (v > this.maxValue) return this.maxValue;\n return v;\n }\n\n stepUp() {\n if (!this.value) {\n this.value = Math.max(this.minValue, 0);\n }\n this.value += toNumber(this.step);\n }\n\n stepDown() {\n if (!this.value) {\n this.value = Math.max(this.minValue, 0);\n }\n this.value -= toNumber(this.step);\n }\n\n decimalStepUp() {\n if (!this.value) {\n this.value = Math.max(this.minValue, 0);\n }\n this.value += toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep);\n }\n\n decimalStepDown() {\n if (!this.value) {\n this.value = Math.max(this.minValue, 0);\n }\n this.value -= toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep);\n }\n}\n","<ng-content select=\"ax-prefix\"> </ng-content>\n<input\n #input\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"autoComplete\"\n [imask]=\"_maskObj\"\n [unmask]=\"'typed'\"\n [attr.min]=\"minValue\"\n [attr.max]=\"maxValue\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [(ngModel)]=\"value\"\n (keydown)=\"_handleOnKeydownEvent($event)\"\n (keyup)=\"_emitOnKeyupEvent($event)\"\n (keypress)=\"_emitOnKeypressEvent($event)\"\n (focus)=\"_emitOnFocusEvent($event)\"\n (blur)=\"_emitOnBlurEvent($event)\" />\n\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\" tabindex=\"-1\">\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\n </button>\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\n <span class=\"ax-icon ax-icon-arrow-down\" tabindex=\"-1\"></span>\n </button>\n</div>\n\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\n <ax-prefix>\n <ax-icon class=\"ax-icon-arrow-fill ax-rotation-90\">\n </ax-icon>\n </ax-prefix>\n </ax-button>\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\n <ax-prefix>\n <ax-icon class=\"ax-icon-arrow-fill -ax-rotation-90\">\n </ax-icon>\n </ax-prefix>\n </ax-button>\n</div> -->\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport {IMaskModule} from 'angular-imask';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXNumberBoxComponent } from './number-box.component';\n\nconst COMPONENT = [AXNumberBoxComponent];\nconst MODULES = [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n IMaskModule\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXNumberBoxModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\n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AAc,EAAA,CAAA;sBADrB,SAAS;uBAAC,cAAc,CAAA;;;AEnH3B,MAAM,SAAS,GAAG,CAAC,oBAAoB,CAAC,CAAC;AACzC,MAAM,OAAO,GAAG;IACZ,YAAY;IACZ,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,WAAW;CACd,CAAC;AAEF,MAMa,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAAjB,iBAAiB,EAAA,YAAA,EAAA,CAfX,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAEnC,YAAY;YACZ,WAAW;YACX,cAAc;YACd,iBAAiB;AACjB,YAAA,WAAW,aANI,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAe1B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJb,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,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,EAAE;AAChB,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../libs/components/number-box/src/lib/number-box.component.ts","../../../../libs/components/number-box/src/lib/number-box.component.html","../../../../libs/components/number-box/src/lib/number-box.module.ts","../../../../libs/components/number-box/src/acorex-components-number-box.ts"],"sourcesContent":["import { MaskedNumber, createMask } from 'imask';\nimport { IMaskDirective } from 'angular-imask';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n Input,\n ViewChild,\n} from '@angular/core';\n\nimport { toNumber } from 'lodash-es';\nimport { AXBaseTextBoxMixin, AXComponentOptionChanged } from '@acorex/components/mixin';\n\n/**\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-number-box',\n templateUrl: './number-box.component.html',\n styleUrls: ['./number-box.component.scss'],\n inputs: [\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'size',\n 'value',\n 'state',\n 'placeholder',\n 'maxLength',\n 'allowNull',\n 'type',\n 'autoComplete',\n 'readonly',\n 'allowNull',\n 'value',\n 'name',\n 'checked',\n ],\n outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'ax-editor-container' },\n})\nexport class AXNumberBoxComponent extends AXBaseTextBoxMixin {\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n private _thousandsSeparator: string;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n public get thousandsSeparator(): string {\n return this._thousandsSeparator;\n }\n public set thousandsSeparator(v: string) {\n this._setOption({\n name: 'thousandsSeparator',\n value: v ?? '',\n });\n }\n\n private _padDecimalZeros: boolean = false;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n public get padDecimalZeros(): boolean {\n return this._padDecimalZeros;\n }\n public set padDecimalZeros(v: boolean) {\n this._setOption({\n name: 'padDecimalZeros',\n value: v,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Integer** part of number\n */\n @Input()\n step: number = 1;\n\n private _decimals: number = 0;\n /**\n * Specifies the number of decimals that the user can enter\n */\n @Input()\n public get decimals(): number {\n return this._decimals;\n }\n public set decimals(v: number) {\n this._setOption({\n name: 'decimals',\n value: v ?? 0,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\n */\n @Input()\n decimalStep: number | 'auto' = 'auto';\n\n /**\n * Specifies whether the Up and Down spin buttons will be rendered or not\n */\n @Input()\n showSpinButtons: boolean = true;\n\n private _minValue: number = Number.MIN_SAFE_INTEGER;\n /**\n * Specifies the smallest value that is valid\n */\n @Input()\n public get minValue(): number {\n return this._minValue;\n }\n public set minValue(v: number) {\n this._setOption({\n name: 'minValue',\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\n });\n }\n\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\n /**\n * Specifies the greatest value that is valid\n */\n @Input()\n public get maxValue(): number {\n return this._maxValue;\n }\n public set maxValue(v: number) {\n this._setOption({\n name: 'maxValue',\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\n });\n }\n\n /**\n * @ignore\n */\n _maskObj: MaskedNumber;\n\n @ViewChild(IMaskDirective)\n private _maskDirective: IMaskDirective<MaskedNumber>;\n\n /**\n * @ignore\n */\n constructor(elementRef: ElementRef, private cdr: ChangeDetectorRef) {\n super(elementRef, cdr);\n }\n\n override onViewInit(): void {\n super.onViewInit();\n this._updateMask();\n }\n\n override _onOptionChanged(option: AXComponentOptionChanged): void {\n super._onOptionChanged(option);\n this._updateMask();\n }\n\n override focus(): void {\n this.input.nativeElement.focus();\n }\n\n private _updateMask() {\n if (!this._maskObj) {\n this._maskObj = createMask({\n mask: Number,\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n } else {\n this._maskObj.updateOptions({\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n }\n this._maskDirective?.maskRef?.updateValue();\n this._maskDirective?.maskRef?.updateControl();\n }\n\n _handleOnKeydownEvent(e: KeyboardEvent) {\n if (this.disabled || this.readonly) return;\n const ignore = () => {\n e.preventDefault();\n e.stopPropagation();\n };\n this._setUserInteraction();\n const input = e.target as HTMLInputElement;\n const valStr = input.value;\n const decimalPointIndex = valStr.indexOf('.');\n const _cursorPos = input.selectionStart!;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n if (decimalPointIndex > 0 && _cursorPos > decimalPointIndex && this.decimals > 0) {\n e.key === 'ArrowDown' ? this.decimalStepDown() : this.decimalStepUp();\n } else {\n e.key === 'ArrowDown' ? this.stepDown() : this.stepUp();\n }\n ignore();\n setTimeout(() => {\n input.setSelectionRange(_cursorPos, _cursorPos);\n }, 5);\n }\n super._emitOnKeydownEvent(e);\n }\n\n _handleUpDownClick(v: -1 | 1) {\n if (this.disabled || this.readonly) return;\n this._setUserInteraction();\n v == 1 ? this.stepUp() : this.stepDown();\n }\n\n override _setValue(value: any) {\n if ((value == null || (value == 0 && !this._maskObj.value)) && this.allowNull) {\n return null;\n }\n const v = toNumber(value);\n if (v < this.minValue) return this.minValue;\n if (v > this.maxValue) return this.maxValue;\n return v;\n }\n\n stepUp() {\n if (!this.value) {\n this.value = Math.max(this.minValue, 0);\n }\n this.value += toNumber(this.step);\n }\n\n stepDown() {\n if (!this.value) {\n this.value = Math.max(this.minValue, 0);\n }\n this.value -= toNumber(this.step);\n }\n\n decimalStepUp() {\n if (!this.value) {\n this.value = Math.max(this.minValue, 0);\n }\n this.value += toNumber(\n this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep\n );\n }\n\n decimalStepDown() {\n if (!this.value) {\n this.value = Math.max(this.minValue, 0);\n }\n this.value -= toNumber(\n this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep\n );\n }\n}\n","<ng-content select=\"ax-prefix\"> </ng-content>\n<input\n #input\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"autoComplete\"\n [imask]=\"_maskObj\"\n [unmask]=\"'typed'\"\n [attr.min]=\"minValue\"\n [attr.max]=\"maxValue\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [(ngModel)]=\"value\"\n (keydown)=\"_handleOnKeydownEvent($event)\"\n (keyup)=\"_emitOnKeyupEvent($event)\"\n (keypress)=\"_emitOnKeypressEvent($event)\"\n (focus)=\"_emitOnFocusEvent($event)\"\n (blur)=\"_emitOnBlurEvent($event)\" />\n\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\" tabindex=\"-1\">\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\n </button>\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\n <span class=\"ax-icon ax-icon-arrow-down\" tabindex=\"-1\"></span>\n </button>\n</div>\n\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\n <ax-prefix>\n <ax-icon class=\"ax-icon-arrow-fill ax-rotation-90\">\n </ax-icon>\n </ax-prefix>\n </ax-button>\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\n <ax-prefix>\n <ax-icon class=\"ax-icon-arrow-fill -ax-rotation-90\">\n </ax-icon>\n </ax-prefix>\n </ax-button>\n</div> -->\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport {IMaskModule} from 'angular-imask';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXNumberBoxComponent } from './number-box.component';\n\nconst COMPONENT = [AXNumberBoxComponent];\nconst MODULES = [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n IMaskModule\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXNumberBoxModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAeA;;;;AAIG;AA4BG,MAAO,oBAAqB,SAAQ,kBAAkB,CAAA;AAI1D;;AAEG;AACH,IAAA,IACW,kBAAkB,GAAA;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;KACjC;IACD,IAAW,kBAAkB,CAAC,CAAS,EAAA;QACrC,IAAI,CAAC,UAAU,CAAC;AACd,YAAA,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,IAAI,EAAE;AACf,SAAA,CAAC,CAAC;KACJ;AAGD;;AAEG;AACH,IAAA,IACW,eAAe,GAAA;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;KAC9B;IACD,IAAW,eAAe,CAAC,CAAU,EAAA;QACnC,IAAI,CAAC,UAAU,CAAC;AACd,YAAA,IAAI,EAAE,iBAAiB;AACvB,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,CAAC,CAAC;KACJ;AASD;;AAEG;AACH,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAW,QAAQ,CAAC,CAAS,EAAA;QAC3B,IAAI,CAAC,UAAU,CAAC;AACd,YAAA,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,CAAC,IAAI,CAAC;AACd,SAAA,CAAC,CAAC;KACJ;AAeD;;AAEG;AACH,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAW,QAAQ,CAAC,CAAS,EAAA;QAC3B,IAAI,C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S,EAAE,EAAE;AAChB,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
|
@@ -0,0 +1,141 @@
|
|
1
|
+
import { AXEvent, MXValueComponent, MXInteractiveComponent } from '@acorex/components/common';
|
2
|
+
import * as i0 from '@angular/core';
|
3
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
|
4
|
+
import { classes } from 'polytype';
|
5
|
+
import * as i1 from '@angular/common';
|
6
|
+
import { CommonModule } from '@angular/common';
|
7
|
+
|
8
|
+
class AXOtpCompletedEvent extends AXEvent {
|
9
|
+
}
|
10
|
+
|
11
|
+
class AXOtpComponent extends classes((MXValueComponent), MXInteractiveComponent) {
|
12
|
+
constructor(elementRef) {
|
13
|
+
super();
|
14
|
+
this.elementRef = elementRef;
|
15
|
+
this.length = 6;
|
16
|
+
this.inputs = [];
|
17
|
+
this.onCompleted = new EventEmitter();
|
18
|
+
this._numbers = [];
|
19
|
+
}
|
20
|
+
ngOnInit() {
|
21
|
+
super.ngOnInit();
|
22
|
+
this.inputs = Array(this.length)
|
23
|
+
.fill(1)
|
24
|
+
.map((x, i) => i);
|
25
|
+
}
|
26
|
+
ngAfterViewInit() {
|
27
|
+
this.elementRef.nativeElement.querySelectorAll('.ax-input')[0].focus();
|
28
|
+
}
|
29
|
+
onInput(event, i) {
|
30
|
+
const input = this.elementRef.nativeElement.querySelectorAll('.ax-input');
|
31
|
+
var numberRegex = /^\d+$/;
|
32
|
+
if (!numberRegex.test(event.target.value)) {
|
33
|
+
event.target.value = '';
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
if (event.target.value.length > 1) {
|
37
|
+
const currentValue = event.target.value;
|
38
|
+
event.target.value = '';
|
39
|
+
event.target.value = currentValue.slice(-1);
|
40
|
+
}
|
41
|
+
if (input[i + 1]) {
|
42
|
+
input[i + 1].focus();
|
43
|
+
}
|
44
|
+
this._numbers[i] = event.target.value;
|
45
|
+
if (this._numbers.filter((c) => c).length === this.length) {
|
46
|
+
this.onCompleted.emit({
|
47
|
+
component: AXOtpComponent,
|
48
|
+
value: this._numbers.join(''),
|
49
|
+
});
|
50
|
+
}
|
51
|
+
// console.log(this._numbers);
|
52
|
+
// if (this._numbers.filter(c => c).length === this.length) {
|
53
|
+
// this.setState('success');
|
54
|
+
// this.onCompleted.emit({
|
55
|
+
// component: AXOtpComponent,
|
56
|
+
// value: this._numbers.join(''),
|
57
|
+
// });
|
58
|
+
// } else {
|
59
|
+
// this.setState('error');
|
60
|
+
// }
|
61
|
+
// this.value = '124';
|
62
|
+
}
|
63
|
+
onKeyDown(event, i) {
|
64
|
+
const input = this.elementRef.nativeElement.querySelectorAll('.ax-input');
|
65
|
+
switch (event.key) {
|
66
|
+
case 'Backspace':
|
67
|
+
input[i].value = '';
|
68
|
+
if (input[i - 1]) {
|
69
|
+
input[i - 1].focus();
|
70
|
+
event.preventDefault();
|
71
|
+
}
|
72
|
+
this._numbers[i] = undefined;
|
73
|
+
break;
|
74
|
+
case 'ArrowRight':
|
75
|
+
if (input[i + 1]) {
|
76
|
+
input[i + 1].focus();
|
77
|
+
}
|
78
|
+
break;
|
79
|
+
case 'ArrowLeft':
|
80
|
+
if (input[i - 1]) {
|
81
|
+
input[i - 1].focus();
|
82
|
+
}
|
83
|
+
break;
|
84
|
+
case 'Home':
|
85
|
+
input[0].focus();
|
86
|
+
break;
|
87
|
+
case 'End':
|
88
|
+
input[this.length - 1].focus();
|
89
|
+
break;
|
90
|
+
case 'ArrowUp':
|
91
|
+
case 'ArrowDown':
|
92
|
+
event.preventDefault();
|
93
|
+
break;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
onPaste(event) {
|
97
|
+
let paste = event.clipboardData.getData('text');
|
98
|
+
const input = this.elementRef.nativeElement.querySelectorAll('.ax-input');
|
99
|
+
input[input.length - 1].focus();
|
100
|
+
this._numbers = [];
|
101
|
+
for (let i = 0; i < paste.length; i++) {
|
102
|
+
this._numbers[i] = paste[i];
|
103
|
+
}
|
104
|
+
console.log(this._numbers);
|
105
|
+
console.log(paste);
|
106
|
+
}
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXOtpComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: AXOtpComponent, selector: "ax-otp", inputs: { length: "length" }, outputs: { onCompleted: "onCompleted" }, host: { classAttribute: "ax-otp" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-otp-input-container ax-editor-container\" [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\" (paste)=\"onPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [value]=\"_numbers[i]\" (input)=\"onInput($event, i)\" (keydown)=\"onKeyDown($event, i)\" maxlength=\"1\" [disabled]=\"disabled\" [readonly]=\"readonly\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n", styles: [".ax-otp-input-container{display:grid;gap:.5rem}.ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial}.ax-otp-input-container.ax-editor-container:focus-within,.ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}.ax-otp-input-container.ax-editor-container.ax-state-error .ax-input{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-state-error .ax-input:focus{border-color:rgba(var(--ax-color-danger-500));box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-state-success .ax-input{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-state-success .ax-input:focus{border-color:rgba(var(--ax-color-success-500));box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1;border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}.ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}.ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}.ax-otp-input-container.ax-editor-container .ax-input:focus{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}@media (max-width: 599px){.ax-otp-input-container.ax-editor-container .ax-input{font-size:100%}}.ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}.ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,.ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
109
|
+
}
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXOtpComponent, decorators: [{
|
111
|
+
type: Component,
|
112
|
+
args: [{ selector: 'ax-otp', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-otp' }, template: "<div class=\"ax-otp-input-container ax-editor-container\" [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\" (paste)=\"onPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [value]=\"_numbers[i]\" (input)=\"onInput($event, i)\" (keydown)=\"onKeyDown($event, i)\" maxlength=\"1\" [disabled]=\"disabled\" [readonly]=\"readonly\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n", styles: [".ax-otp-input-container{display:grid;gap:.5rem}.ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial}.ax-otp-input-container.ax-editor-container:focus-within,.ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}.ax-otp-input-container.ax-editor-container.ax-state-error .ax-input{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-state-error .ax-input:focus{border-color:rgba(var(--ax-color-danger-500));box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-state-success .ax-input{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-state-success .ax-input:focus{border-color:rgba(var(--ax-color-success-500));box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1;border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}.ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}.ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}.ax-otp-input-container.ax-editor-container .ax-input:focus{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}@media (max-width: 599px){.ax-otp-input-container.ax-editor-container .ax-input{font-size:100%}}.ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}.ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,.ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"] }]
|
113
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { length: [{
|
114
|
+
type: Input
|
115
|
+
}], onCompleted: [{
|
116
|
+
type: Output
|
117
|
+
}] } });
|
118
|
+
|
119
|
+
const COMPONENT = [AXOtpComponent];
|
120
|
+
const MODULES = [CommonModule];
|
121
|
+
class AXOtpModule {
|
122
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXOtpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
123
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: AXOtpModule, declarations: [AXOtpComponent], imports: [CommonModule], exports: [AXOtpComponent] }); }
|
124
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXOtpModule, imports: [MODULES] }); }
|
125
|
+
}
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AXOtpModule, decorators: [{
|
127
|
+
type: NgModule,
|
128
|
+
args: [{
|
129
|
+
declarations: [...COMPONENT],
|
130
|
+
imports: [...MODULES],
|
131
|
+
exports: [...COMPONENT],
|
132
|
+
providers: [],
|
133
|
+
}]
|
134
|
+
}] });
|
135
|
+
|
136
|
+
/**
|
137
|
+
* Generated bundle index. Do not edit.
|
138
|
+
*/
|
139
|
+
|
140
|
+
export { AXOtpCompletedEvent, AXOtpComponent, AXOtpModule };
|
141
|
+
//# sourceMappingURL=acorex-components-otp.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../libs/components/otp/src/lib/otp.class.ts","../../../../libs/components/otp/src/lib/otp.component.ts","../../../../libs/components/otp/src/lib/otp.component.html","../../../../libs/components/otp/src/lib/otp.module.ts","../../../../libs/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/components/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n}\n","import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n Input,\n ViewChild,\n ViewChildren,\n QueryList,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { classes } from 'polytype';\nimport { MXInteractiveComponent, MXValueComponent } from '@acorex/components/common';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'ax-otp' },\n})\nexport class AXOtpComponent extends classes(MXValueComponent<string>, MXInteractiveComponent) {\n @Input() length: number = 6;\n inputs: number[] = [];\n\n @Output() onCompleted: EventEmitter<AXOtpCompletedEvent> =\n new EventEmitter<AXOtpCompletedEvent>();\n\n _numbers: number[] = [];\n\n constructor(private elementRef: ElementRef) {\n super();\n }\n\n override ngOnInit(): void {\n super.ngOnInit();\n this.inputs = Array(this.length)\n .fill(1)\n .map((x, i) => i);\n }\n\n protected override ngAfterViewInit(): void {\n this.elementRef.nativeElement.querySelectorAll('.ax-input')[0].focus();\n }\n\n onInput(event: any, i: number) {\n const input = this.elementRef.nativeElement.querySelectorAll('.ax-input');\n var numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (input[i + 1]) {\n input[i + 1].focus();\n }\n this._numbers[i] = event.target.value;\n if (this._numbers.filter((c) => c).length === this.length) {\n this.onCompleted.emit({\n component: AXOtpComponent,\n value: this._numbers.join(''),\n });\n }\n // console.log(this._numbers);\n // if (this._numbers.filter(c => c).length === this.length) {\n // this.setState('success');\n // this.onCompleted.emit({\n // component: AXOtpComponent,\n // value: this._numbers.join(''),\n // });\n // } else {\n // this.setState('error');\n // }\n\n // this.value = '124';\n }\n onKeyDown(event: KeyboardEvent, i: number) {\n const input: any[] = this.elementRef.nativeElement.querySelectorAll('.ax-input');\n switch (event.key) {\n case 'Backspace':\n input[i].value = '';\n if (input[i - 1]) {\n input[i - 1].focus();\n event.preventDefault();\n }\n this._numbers[i] = undefined;\n break;\n case 'ArrowRight':\n if (input[i + 1]) {\n input[i + 1].focus();\n }\n break;\n\n case 'ArrowLeft':\n if (input[i - 1]) {\n input[i - 1].focus();\n }\n break;\n case 'Home':\n input[0].focus();\n break;\n case 'End':\n input[this.length - 1].focus();\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n onPaste(event: any) {\n let paste = event.clipboardData.getData('text');\n const input: any[] = this.elementRef.nativeElement.querySelectorAll('.ax-input');\n input[input.length - 1].focus();\n this._numbers = [];\n for (let i = 0; i < paste.length; i++) {\n this._numbers[i] = paste[i];\n }\n console.log(this._numbers);\n console.log(paste);\n }\n}\n","<div class=\"ax-otp-input-container ax-editor-container\" [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\" (paste)=\"onPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [value]=\"_numbers[i]\" (input)=\"onInput($event, i)\" (keydown)=\"onKeyDown($event, i)\" maxlength=\"1\" [disabled]=\"disabled\" [readonly]=\"readonly\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXOtpComponent } from './otp.component';\n\nconst COMPONENT = [AXOtpComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAE/C;;ACqBK,MAAO,cAAe,SAAQ,OAAO,EAAC,gBAAwB,GAAE,sBAAsB,CAAC,CAAA;AAS3F,IAAA,WAAA,CAAoB,UAAsB,EAAA;AACxC,QAAA,KAAK,EAAE,CAAC;QADU,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QARjC,IAAM,CAAA,MAAA,GAAW,CAAC,CAAC;QAC5B,IAAM,CAAA,MAAA,GAAa,EAAE,CAAC;AAEZ,QAAA,IAAA,CAAA,WAAW,GACnB,IAAI,YAAY,EAAuB,CAAC;QAE1C,IAAQ,CAAA,QAAA,GAAa,EAAE,CAAC;KAIvB;IAEQ,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;aAC7B,IAAI,CAAC,CAAC,CAAC;aACP,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;KACrB;IAEkB,eAAe,GAAA;AAChC,QAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;KACxE;IAED,OAAO,CAAC,KAAU,EAAE,CAAS,EAAA;AAC3B,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC1E,IAAI,WAAW,GAAG,OAAO,CAAC;QAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AACzC,YAAA,KAAK,CAA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