@acorex/components 5.0.5 → 5.0.9
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/acorex-components.d.ts +5 -0
- package/bundles/acorex-components.umd.js +7633 -0
- package/bundles/acorex-components.umd.js.map +1 -0
- package/esm2015/acorex-components.js +5 -0
- package/esm2015/lib/alert/alert-button.component.js +52 -0
- package/esm2015/lib/alert/alert-contnet.component.js +21 -0
- package/esm2015/lib/alert/alert-footer.component.js +27 -0
- package/esm2015/lib/alert/alert-suffix.component.js +27 -0
- package/esm2015/lib/alert/alert-title.component.js +23 -0
- package/esm2015/lib/alert/alert.component.js +130 -0
- package/esm2015/lib/alert/alert.module.js +43 -0
- package/esm2015/lib/alert/index.js +8 -0
- package/esm2015/lib/avatar/avatar.component.js +55 -0
- package/esm2015/lib/avatar/avatar.module.js +21 -0
- package/esm2015/lib/avatar/index.js +3 -0
- package/esm2015/lib/badge/badge.component.js +34 -0
- package/esm2015/lib/badge/badge.module.js +21 -0
- package/esm2015/lib/badge/index.js +3 -0
- package/esm2015/lib/base/common.module.js +18 -0
- package/esm2015/lib/base/custom-cdk-overlay.service.js +47 -0
- package/esm2015/lib/base/drawing.class.js +11 -0
- package/esm2015/lib/base/events.class.js +53 -0
- package/esm2015/lib/base/index.js +7 -0
- package/esm2015/lib/base/mixin/base-components.class.js +86 -0
- package/esm2015/lib/base/mixin/button-mixin.class.js +129 -0
- package/esm2015/lib/base/mixin/clickable-mixin.class.js +24 -0
- package/esm2015/lib/base/mixin/constratctor.js +2 -0
- package/esm2015/lib/base/mixin/datalist-component.class.js +97 -0
- package/esm2015/lib/base/mixin/dropdown-mixin.class.js +36 -0
- package/esm2015/lib/base/mixin/index.js +3 -0
- package/esm2015/lib/base/mixin/interactive-mixin.class.js +77 -0
- package/esm2015/lib/base/mixin/loading-mixin.class.js +18 -0
- package/esm2015/lib/base/mixin/mixin.class.js +22 -0
- package/esm2015/lib/base/mixin/selection-component.class.js +158 -0
- package/esm2015/lib/base/mixin/sizable-mixin.class.js +18 -0
- package/esm2015/lib/base/mixin/textbox-mixin.class.js +38 -0
- package/esm2015/lib/base/mixin/value-mixin.class.js +190 -0
- package/esm2015/lib/base/overlay.service.js +91 -0
- package/esm2015/lib/base/responsive.directive.js +34 -0
- package/esm2015/lib/base/styles.class.js +4 -0
- package/esm2015/lib/button/button-group.component.js +131 -0
- package/esm2015/lib/button/button-item.class.js +2 -0
- package/esm2015/lib/button/button-item.component.js +81 -0
- package/esm2015/lib/button/button.component.js +73 -0
- package/esm2015/lib/button/button.module.js +33 -0
- package/esm2015/lib/button/index.js +6 -0
- package/esm2015/lib/calendar/calendar.component.js +287 -0
- package/esm2015/lib/calendar/calendar.module.js +25 -0
- package/esm2015/lib/calendar/index.js +3 -0
- package/esm2015/lib/carousel/carousel-arrows.component.js +53 -0
- package/esm2015/lib/carousel/carousel-item.component.js +21 -0
- package/esm2015/lib/carousel/carousel-pager.component.js +74 -0
- package/esm2015/lib/carousel/carousel-splidejs.class.js +82 -0
- package/esm2015/lib/carousel/carousel.class.js +10 -0
- package/esm2015/lib/carousel/carousel.component.js +246 -0
- package/esm2015/lib/carousel/carousel.module.js +24 -0
- package/esm2015/lib/carousel/index.js +7 -0
- package/esm2015/lib/checkbox/checkbox.component.js +59 -0
- package/esm2015/lib/checkbox/checkbox.module.js +20 -0
- package/esm2015/lib/checkbox/index.js +3 -0
- package/esm2015/lib/datalist/datalist.component.js +81 -0
- package/esm2015/lib/datalist/datalist.module.js +22 -0
- package/esm2015/lib/datalist/index.js +3 -0
- package/esm2015/lib/datepicker/datepicker.component.js +80 -0
- package/esm2015/lib/datepicker/datepicker.module.js +23 -0
- package/esm2015/lib/datepicker/index.js +3 -0
- package/esm2015/lib/decorators/content.component.js +26 -0
- package/esm2015/lib/decorators/decorators.module.js +23 -0
- package/esm2015/lib/decorators/index.js +5 -0
- package/esm2015/lib/decorators/prefix.component.js +26 -0
- package/esm2015/lib/decorators/suffix.component.js +26 -0
- package/esm2015/lib/dialog/dialog.class.js +2 -0
- package/esm2015/lib/dialog/dialog.component.js +45 -0
- package/esm2015/lib/dialog/dialog.module.js +26 -0
- package/esm2015/lib/dialog/dialog.service.js +146 -0
- package/esm2015/lib/dialog/index.js +5 -0
- package/esm2015/lib/drawer/drawer-container.component.js +73 -0
- package/esm2015/lib/drawer/drawer-content.component.js +27 -0
- package/esm2015/lib/drawer/drawer.component.js +145 -0
- package/esm2015/lib/drawer/drawer.module.js +23 -0
- package/esm2015/lib/drawer/index.js +5 -0
- package/esm2015/lib/dropdown/dropdown-base.class.js +98 -0
- package/esm2015/lib/dropdown/dropdown-panel.component.js +84 -0
- package/esm2015/lib/dropdown/dropdown.component.js +32 -0
- package/esm2015/lib/dropdown/dropdown.module.js +25 -0
- package/esm2015/lib/dropdown/index.js +4 -0
- package/esm2015/lib/form/form-field.component.js +20 -0
- package/esm2015/lib/form/form-field.module.js +21 -0
- package/esm2015/lib/form/form-hint.component.js +20 -0
- package/esm2015/lib/form/form.component.js +51 -0
- package/esm2015/lib/form/index.js +5 -0
- package/esm2015/lib/icon/icon.component.js +28 -0
- package/esm2015/lib/icon/icon.module.js +21 -0
- package/esm2015/lib/icon/index.js +3 -0
- package/esm2015/lib/input-mask/index.js +3 -0
- package/esm2015/lib/input-mask/input-mask.component.js +42 -0
- package/esm2015/lib/input-mask/input-mask.module.js +23 -0
- package/esm2015/lib/label/index.js +3 -0
- package/esm2015/lib/label/label.component.js +20 -0
- package/esm2015/lib/label/label.module.js +21 -0
- package/esm2015/lib/loading/index.js +6 -0
- package/esm2015/lib/loading/loading-spinner.component.js +32 -0
- package/esm2015/lib/loading/loading.component.js +54 -0
- package/esm2015/lib/loading/loading.directive.js +67 -0
- package/esm2015/lib/loading/loading.module.js +35 -0
- package/esm2015/lib/loading/loading.service.js +155 -0
- package/esm2015/lib/number-box/index.js +3 -0
- package/esm2015/lib/number-box/number-box.component.js +289 -0
- package/esm2015/lib/number-box/number-box.module.js +32 -0
- package/esm2015/lib/page/base-page.class.js +67 -0
- package/esm2015/lib/page/index.js +5 -0
- package/esm2015/lib/page/page-footer.component.js +28 -0
- package/esm2015/lib/page/page.component.js +33 -0
- package/esm2015/lib/page/page.module.js +18 -0
- package/esm2015/lib/password-box/index.js +3 -0
- package/esm2015/lib/password-box/password-box.component.js +74 -0
- package/esm2015/lib/password-box/password-box.module.js +35 -0
- package/esm2015/lib/popover/index.js +3 -0
- package/esm2015/lib/popover/popover.component.js +220 -0
- package/esm2015/lib/popover/popover.module.js +19 -0
- package/esm2015/lib/popup/index.js +4 -0
- package/esm2015/lib/popup/popup.component.js +105 -0
- package/esm2015/lib/popup/popup.module.js +26 -0
- package/esm2015/lib/popup/popup.service.js +94 -0
- package/esm2015/lib/radio/index.js +3 -0
- package/esm2015/lib/radio/radio.component.js +22 -0
- package/esm2015/lib/radio/radio.module.js +21 -0
- package/esm2015/lib/range-slider/index.js +3 -0
- package/esm2015/lib/range-slider/range-slider.component.js +22 -0
- package/esm2015/lib/range-slider/range-slider.module.js +21 -0
- package/esm2015/lib/selectbox/index.js +3 -0
- package/esm2015/lib/selectbox/selectbox.component.js +201 -0
- package/esm2015/lib/selectbox/selectbox.module.js +25 -0
- package/esm2015/lib/selection-list/index.js +3 -0
- package/esm2015/lib/selection-list/selection-list.component.js +47 -0
- package/esm2015/lib/selection-list/selection-list.module.js +21 -0
- package/esm2015/lib/side-menu/index.js +3 -0
- package/esm2015/lib/side-menu/side-menu.component.js +21 -0
- package/esm2015/lib/side-menu/side-menu.module.js +21 -0
- package/esm2015/lib/switch/index.js +3 -0
- package/esm2015/lib/switch/switch.component.js +30 -0
- package/esm2015/lib/switch/switch.module.js +21 -0
- package/esm2015/lib/tabs/index.js +8 -0
- package/esm2015/lib/tabs/tab-content.directive.js +29 -0
- package/esm2015/lib/tabs/tab-item.component.js +91 -0
- package/esm2015/lib/tabs/tab-strip.component.js +69 -0
- package/esm2015/lib/tabs/tab-view.component.js +45 -0
- package/esm2015/lib/tabs/tab.component.js +58 -0
- package/esm2015/lib/tabs/tabs.class.js +4 -0
- package/esm2015/lib/tabs/tabs.component.js +67 -0
- package/esm2015/lib/tabs/tabs.module.js +25 -0
- package/esm2015/lib/textbox/index.js +3 -0
- package/esm2015/lib/textbox/textbox.component.js +62 -0
- package/esm2015/lib/textbox/textbox.module.js +43 -0
- package/esm2015/lib/time-box/index.js +3 -0
- package/esm2015/lib/time-box/time-box.component.js +134 -0
- package/esm2015/lib/time-box/time-box.module.js +32 -0
- package/esm2015/lib/toast/index.js +5 -0
- package/esm2015/lib/toast/toast.class.js +2 -0
- package/esm2015/lib/toast/toast.component.js +50 -0
- package/esm2015/lib/toast/toast.module.js +22 -0
- package/esm2015/lib/toast/toast.service.js +114 -0
- package/esm2015/lib/tooltip/index.js +4 -0
- package/esm2015/lib/tooltip/tooltip.component.js +45 -0
- package/esm2015/lib/tooltip/tooltip.directive.js +86 -0
- package/esm2015/lib/tooltip/tooltip.module.js +23 -0
- package/esm2015/lib/validation/index.js +3 -0
- package/esm2015/lib/validation/validation-rule.widget.js +113 -0
- package/esm2015/lib/validation/validation.class.js +2 -0
- package/esm2015/lib/validation/validation.module.js +32 -0
- package/esm2015/public-api.js +42 -0
- package/fesm2015/acorex-components.js +6537 -0
- package/fesm2015/acorex-components.js.map +1 -0
- package/lib/alert/alert-button.component.d.ts +13 -0
- package/lib/alert/alert-contnet.component.d.ts +5 -0
- package/lib/alert/alert-footer.component.d.ts +5 -0
- package/lib/alert/alert-suffix.component.d.ts +5 -0
- package/lib/alert/alert-title.component.d.ts +5 -0
- package/lib/alert/alert.component.d.ts +46 -0
- package/lib/alert/alert.module.d.ts +13 -0
- package/{src/lib/alert/index.ts → lib/alert/index.d.ts} +0 -0
- package/lib/avatar/avatar.component.d.ts +20 -0
- package/lib/avatar/avatar.module.d.ts +8 -0
- package/{src/lib/avatar/index.ts → lib/avatar/index.d.ts} +0 -0
- package/lib/badge/badge.component.d.ts +11 -0
- package/lib/badge/badge.module.d.ts +8 -0
- package/lib/badge/index.d.ts +2 -0
- package/lib/base/common.module.d.ts +7 -0
- package/lib/base/custom-cdk-overlay.service.d.ts +19 -0
- package/{src/lib/base/drawing.class.ts → lib/base/drawing.class.d.ts} +1 -12
- package/{src/lib/base/events.class.ts → lib/base/events.class.d.ts} +11 -20
- package/{src/lib/base/index.ts → lib/base/index.d.ts} +0 -0
- package/lib/base/mixin/base-components.class.d.ts +86 -0
- package/lib/base/mixin/button-mixin.class.d.ts +82 -0
- package/lib/base/mixin/clickable-mixin.class.d.ts +43 -0
- package/lib/base/mixin/constratctor.d.ts +4 -0
- package/lib/base/mixin/datalist-component.class.d.ts +55 -0
- package/lib/base/mixin/dropdown-mixin.class.d.ts +48 -0
- package/{src/lib/base/mixin/index.ts → lib/base/mixin/index.d.ts} +1 -1
- package/lib/base/mixin/interactive-mixin.class.d.ts +65 -0
- package/lib/base/mixin/loading-mixin.class.d.ts +47 -0
- package/lib/base/mixin/mixin.class.d.ts +607 -0
- package/lib/base/mixin/selection-component.class.d.ts +56 -0
- package/lib/base/mixin/sizable-mixin.class.d.ts +41 -0
- package/lib/base/mixin/textbox-mixin.class.d.ts +59 -0
- package/lib/base/mixin/value-mixin.class.d.ts +71 -0
- package/lib/base/overlay.service.d.ts +31 -0
- package/lib/base/responsive.directive.d.ts +10 -0
- package/lib/base/styles.class.d.ts +17 -0
- package/lib/button/button-group.component.d.ts +36 -0
- package/{src/lib/button/button-item.class.ts → lib/button/button-item.class.d.ts} +4 -6
- package/lib/button/button-item.component.d.ts +94 -0
- package/lib/button/button.component.d.ts +21 -0
- package/lib/button/button.module.d.ts +12 -0
- package/{src/lib/button/index.ts → lib/button/index.d.ts} +1 -1
- package/lib/calendar/calendar.component.d.ts +56 -0
- package/lib/calendar/calendar.module.d.ts +12 -0
- package/{src/lib/calendar/index.ts → lib/calendar/index.d.ts} +0 -0
- package/lib/carousel/carousel-arrows.component.d.ts +14 -0
- package/lib/carousel/carousel-item.component.d.ts +8 -0
- package/lib/carousel/carousel-pager.component.d.ts +22 -0
- package/lib/carousel/carousel-splidejs.class.d.ts +18 -0
- package/{src/lib/carousel/carousel.class.ts → lib/carousel/carousel.class.d.ts} +13 -32
- package/lib/carousel/carousel.component.d.ts +62 -0
- package/lib/carousel/carousel.module.d.ts +11 -0
- package/{src/lib/carousel/index.ts → lib/carousel/index.d.ts} +0 -0
- package/lib/checkbox/checkbox.component.d.ts +13 -0
- package/lib/checkbox/checkbox.module.d.ts +9 -0
- package/{src/lib/checkbox/index.ts → lib/checkbox/index.d.ts} +1 -1
- package/lib/datalist/datalist.component.d.ts +25 -0
- package/lib/datalist/datalist.module.d.ts +9 -0
- package/{src/lib/datalist/index.ts → lib/datalist/index.d.ts} +0 -0
- package/lib/datepicker/datepicker.component.d.ts +18 -0
- package/lib/datepicker/datepicker.module.d.ts +10 -0
- package/{src/lib/datepicker/index.ts → lib/datepicker/index.d.ts} +0 -0
- package/lib/decorators/content.component.d.ts +8 -0
- package/lib/decorators/decorators.module.d.ts +10 -0
- package/{src/lib/decorators/index.ts → lib/decorators/index.d.ts} +1 -0
- package/lib/decorators/prefix.component.d.ts +8 -0
- package/lib/decorators/suffix.component.d.ts +8 -0
- package/{src/lib/dialog/dialog.class.ts → lib/dialog/dialog.class.d.ts} +1 -2
- package/lib/dialog/dialog.component.d.ts +15 -0
- package/lib/dialog/dialog.module.d.ts +13 -0
- package/lib/dialog/dialog.service.d.ts +36 -0
- package/{src/lib/dialog/index.ts → lib/dialog/index.d.ts} +0 -0
- package/lib/drawer/drawer-container.component.d.ts +13 -0
- package/lib/drawer/drawer-content.component.d.ts +8 -0
- package/lib/drawer/drawer.component.d.ts +30 -0
- package/lib/drawer/drawer.module.d.ts +10 -0
- package/{src/lib/drawer/index.ts → lib/drawer/index.d.ts} +0 -0
- package/lib/dropdown/dropdown-base.class.d.ts +94 -0
- package/lib/dropdown/dropdown-panel.component.d.ts +28 -0
- package/lib/dropdown/dropdown.component.d.ts +13 -0
- package/lib/dropdown/dropdown.module.d.ts +14 -0
- package/{src/lib/dropdown/index.ts → lib/dropdown/index.d.ts} +1 -1
- package/lib/form/form-field.component.d.ts +8 -0
- package/lib/form/form-field.module.d.ts +10 -0
- package/lib/form/form-hint.component.d.ts +8 -0
- package/lib/form/form.component.d.ts +13 -0
- package/{src/lib/form/index.ts → lib/form/index.d.ts} +1 -1
- package/lib/icon/icon.component.d.ts +10 -0
- package/lib/icon/icon.module.d.ts +8 -0
- package/{src/lib/icon/index.ts → lib/icon/index.d.ts} +0 -0
- package/{src/lib/input-mask/index.ts → lib/input-mask/index.d.ts} +0 -0
- package/lib/input-mask/input-mask.component.d.ts +14 -0
- package/lib/input-mask/input-mask.module.d.ts +9 -0
- package/{src/lib/label/index.ts → lib/label/index.d.ts} +1 -1
- package/lib/label/label.component.d.ts +8 -0
- package/lib/label/label.module.d.ts +8 -0
- package/{src/lib/loading/index.ts → lib/loading/index.d.ts} +0 -0
- package/lib/loading/loading-spinner.component.d.ts +5 -0
- package/lib/loading/loading.component.d.ts +19 -0
- package/lib/loading/loading.directive.d.ts +22 -0
- package/lib/loading/loading.module.d.ts +13 -0
- package/lib/loading/loading.service.d.ts +48 -0
- package/{src/lib/number-box/index.ts → lib/number-box/index.d.ts} +0 -0
- package/lib/number-box/number-box.component.d.ts +69 -0
- package/lib/number-box/number-box.module.d.ts +11 -0
- package/lib/page/base-page.class.d.ts +37 -0
- package/{src/lib/page/index.ts → lib/page/index.d.ts} +0 -1
- package/lib/page/page-footer.component.d.ts +7 -0
- package/lib/page/page.component.d.ts +13 -0
- package/lib/page/page.module.d.ts +7 -0
- package/lib/password-box/index.d.ts +2 -0
- package/lib/password-box/password-box.component.d.ts +24 -0
- package/lib/password-box/password-box.module.d.ts +12 -0
- package/{src/lib/popover/index.ts → lib/popover/index.d.ts} +1 -2
- package/lib/popover/popover.component.d.ts +44 -0
- package/lib/popover/popover.module.d.ts +8 -0
- package/{src/lib/popup/index.ts → lib/popup/index.d.ts} +0 -0
- package/lib/popup/popup.component.d.ts +34 -0
- package/lib/popup/popup.module.d.ts +12 -0
- package/lib/popup/popup.service.d.ts +37 -0
- package/lib/radio/index.d.ts +2 -0
- package/lib/radio/radio.component.d.ts +8 -0
- package/lib/radio/radio.module.d.ts +8 -0
- package/{src/lib/range-slider/index.ts → lib/range-slider/index.d.ts} +0 -0
- package/lib/range-slider/range-slider.component.d.ts +8 -0
- package/lib/range-slider/range-slider.module.d.ts +8 -0
- package/{src/lib/selectbox/index.ts → lib/selectbox/index.d.ts} +1 -1
- package/lib/selectbox/selectbox.component.d.ts +29 -0
- package/lib/selectbox/selectbox.module.d.ts +14 -0
- package/{src/lib/selection-list/index.ts → lib/selection-list/index.d.ts} +1 -1
- package/lib/selection-list/selection-list.component.d.ts +10 -0
- package/lib/selection-list/selection-list.module.d.ts +10 -0
- package/{src/lib/side-menu/index.ts → lib/side-menu/index.d.ts} +0 -0
- package/lib/side-menu/side-menu.component.d.ts +8 -0
- package/lib/side-menu/side-menu.module.d.ts +8 -0
- package/{src/lib/switch/index.ts → lib/switch/index.d.ts} +1 -1
- package/lib/switch/switch.component.d.ts +9 -0
- package/lib/switch/switch.module.d.ts +9 -0
- package/{src/lib/tabs/index.ts → lib/tabs/index.d.ts} +3 -1
- package/lib/tabs/tab-content.directive.d.ts +11 -0
- package/lib/tabs/tab-item.component.d.ts +17 -0
- package/lib/tabs/tab-strip.component.d.ts +19 -0
- package/lib/tabs/tab-view.component.d.ts +14 -0
- package/lib/tabs/tab.component.d.ts +18 -0
- package/{src/lib/tabs/tabs.class.ts → lib/tabs/tabs.class.d.ts} +5 -8
- package/lib/tabs/tabs.component.d.ts +17 -0
- package/lib/tabs/tabs.module.d.ts +12 -0
- package/{src/lib/textbox/index.ts → lib/textbox/index.d.ts} +1 -1
- package/lib/textbox/textbox.component.d.ts +19 -0
- package/lib/textbox/textbox.module.d.ts +13 -0
- package/{src/lib/time-box/index.ts → lib/time-box/index.d.ts} +0 -0
- package/lib/time-box/time-box.component.d.ts +29 -0
- package/lib/time-box/time-box.module.d.ts +11 -0
- package/{src/lib/toast/index.ts → lib/toast/index.d.ts} +0 -0
- package/{src/lib/toast/toast.class.ts → lib/toast/toast.class.d.ts} +1 -4
- package/lib/toast/toast.component.d.ts +16 -0
- package/lib/toast/toast.module.d.ts +9 -0
- package/lib/toast/toast.service.d.ts +18 -0
- package/{src/lib/tooltip/index.ts → lib/tooltip/index.d.ts} +0 -0
- package/lib/tooltip/tooltip.component.d.ts +10 -0
- package/lib/tooltip/tooltip.directive.d.ts +18 -0
- package/lib/tooltip/tooltip.module.d.ts +10 -0
- package/{src/lib/validation/index.ts → lib/validation/index.d.ts} +1 -1
- package/lib/validation/validation-rule.widget.d.ts +25 -0
- package/lib/validation/validation.class.d.ts +17 -0
- package/lib/validation/validation.module.d.ts +9 -0
- package/package.json +19 -12
- package/{src/public-api.ts → public-api.d.ts} +5 -3
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -11
- package/src/lib/alert/alert-button.component.ts +0 -45
- package/src/lib/alert/alert-contnet.component.ts +0 -14
- package/src/lib/alert/alert-footer.component.ts +0 -16
- package/src/lib/alert/alert-suffix.component.ts +0 -16
- package/src/lib/alert/alert-title.component.ts +0 -14
- package/src/lib/alert/alert.component.html +0 -13
- package/src/lib/alert/alert.component.ts +0 -139
- package/src/lib/alert/alert.module.ts +0 -26
- package/src/lib/avatar/avatar.component.html +0 -2
- package/src/lib/avatar/avatar.component.ts +0 -64
- package/src/lib/avatar/avatar.module.ts +0 -14
- package/src/lib/base/common.module.ts +0 -13
- package/src/lib/base/custom-cdk-overlay.service.ts +0 -83
- package/src/lib/base/mixin/base-components.class.ts +0 -112
- package/src/lib/base/mixin/button-mixin.class.ts +0 -145
- package/src/lib/base/mixin/clickable-mixin.class.ts +0 -33
- package/src/lib/base/mixin/constratctor.ts +0 -3
- package/src/lib/base/mixin/datalist-component.class.ts +0 -105
- package/src/lib/base/mixin/dropdown-mixin.class.ts +0 -55
- package/src/lib/base/mixin/interactive-mixin.class.ts +0 -83
- package/src/lib/base/mixin/loading-mixin.class.ts +0 -32
- package/src/lib/base/mixin/mixin.class.ts +0 -70
- package/src/lib/base/mixin/page-component.class.ts +0 -15
- package/src/lib/base/mixin/selection-component.class.ts +0 -185
- package/src/lib/base/mixin/sizable-mixin.class.ts +0 -30
- package/src/lib/base/mixin/textbox-mixin.class.ts +0 -51
- package/src/lib/base/mixin/value-mixin.class.ts +0 -215
- package/src/lib/base/overlay.service.ts +0 -117
- package/src/lib/base/responsive.directive.ts +0 -31
- package/src/lib/base/styles.class.ts +0 -24
- package/src/lib/button/button-group.component.html +0 -2
- package/src/lib/button/button-group.component.ts +0 -142
- package/src/lib/button/button-item.component.ts +0 -79
- package/src/lib/button/button.component.html +0 -18
- package/src/lib/button/button.component.ts +0 -71
- package/src/lib/button/button.module.ts +0 -23
- package/src/lib/calendar/calendar.component.html +0 -74
- package/src/lib/calendar/calendar.component.ts +0 -60
- package/src/lib/calendar/calendar.module.ts +0 -17
- package/src/lib/carousel/carousel-arrows.component.ts +0 -46
- package/src/lib/carousel/carousel-item.component.ts +0 -19
- package/src/lib/carousel/carousel-pager.component.ts +0 -83
- package/src/lib/carousel/carousel-splidejs.class.ts +0 -104
- package/src/lib/carousel/carousel.component.html +0 -11
- package/src/lib/carousel/carousel.component.ts +0 -273
- package/src/lib/carousel/carousel.module.ts +0 -19
- package/src/lib/checkbox/checkbox.component.html +0 -15
- package/src/lib/checkbox/checkbox.component.ts +0 -43
- package/src/lib/checkbox/checkbox.module.ts +0 -11
- package/src/lib/datalist/datalist.component.html +0 -35
- package/src/lib/datalist/datalist.component.ts +0 -86
- package/src/lib/datalist/datalist.module.ts +0 -17
- package/src/lib/datapager/datapager-base.component.ts +0 -29
- package/src/lib/datapager/datapager-dots-selector.component.ts +0 -0
- package/src/lib/datapager/datapager-info.component.ts +0 -64
- package/src/lib/datapager/datapager-input-selector.component.ts +0 -54
- package/src/lib/datapager/datapager-next-buttons.components.ts +0 -52
- package/src/lib/datapager/datapager-numeric-selector.component.ts +0 -94
- package/src/lib/datapager/datapager-pagesize-dropdown.component.ts +0 -77
- package/src/lib/datapager/datapager-prev-buttons.component.ts +0 -50
- package/src/lib/datapager/datapager.component.html +0 -19
- package/src/lib/datapager/datapager.component.ts +0 -146
- package/src/lib/datapager/datapager.module.ts +0 -32
- package/src/lib/datapager/index.ts +0 -8
- package/src/lib/datepicker/datepicker.component.html +0 -11
- package/src/lib/datepicker/datepicker.component.ts +0 -86
- package/src/lib/datepicker/datepicker.module.ts +0 -16
- package/src/lib/decorators/decorators.module.ts +0 -15
- package/src/lib/decorators/prefix.component.ts +0 -23
- package/src/lib/decorators/suffix.component.ts +0 -25
- package/src/lib/dialog/dialog.component.html +0 -22
- package/src/lib/dialog/dialog.component.ts +0 -48
- package/src/lib/dialog/dialog.module.ts +0 -19
- package/src/lib/dialog/dialog.service.ts +0 -154
- package/src/lib/drawer/drawer-container.component.ts +0 -69
- package/src/lib/drawer/drawer-content.component.ts +0 -24
- package/src/lib/drawer/drawer.component.ts +0 -156
- package/src/lib/drawer/drawer.module.ts +0 -16
- package/src/lib/dropdown/dropdown-base.class.ts +0 -107
- package/src/lib/dropdown/dropdown-panel.component.html +0 -15
- package/src/lib/dropdown/dropdown-panel.component.ts +0 -105
- package/src/lib/dropdown/dropdown.component.html +0 -19
- package/src/lib/dropdown/dropdown.component.ts +0 -31
- package/src/lib/dropdown/dropdown.module.ts +0 -17
- package/src/lib/form/form-field.component.ts +0 -18
- package/src/lib/form/form-field.module.ts +0 -14
- package/src/lib/form/form-hint.component.ts +0 -18
- package/src/lib/form/form.component.ts +0 -54
- package/src/lib/icon/icon.component.ts +0 -27
- package/src/lib/icon/icon.module.ts +0 -14
- package/src/lib/input-mask/input-mask.component.ts +0 -43
- package/src/lib/input-mask/input-mask.module.ts +0 -15
- package/src/lib/label/label.component.html +0 -3
- package/src/lib/label/label.component.ts +0 -16
- package/src/lib/label/label.module.ts +0 -14
- package/src/lib/loading/loading-spinner.component.ts +0 -17
- package/src/lib/loading/loading.component.ts +0 -55
- package/src/lib/loading/loading.directive.ts +0 -86
- package/src/lib/loading/loading.module.ts +0 -32
- package/src/lib/loading/loading.service.ts +0 -172
- package/src/lib/number-box/number-box.component.html +0 -15
- package/src/lib/number-box/number-box.component.ts +0 -297
- package/src/lib/number-box/number-box.module.ts +0 -22
- package/src/lib/page/base-page.class.ts +0 -80
- package/src/lib/page/page-footer.component.ts +0 -19
- package/src/lib/page/page.component.ts +0 -32
- package/src/lib/page/page.module.ts +0 -11
- package/src/lib/popover/popover.component.html +0 -3
- package/src/lib/popover/popover.component.ts +0 -229
- package/src/lib/popover/popover.module.ts +0 -11
- package/src/lib/popup/popup.component.html +0 -25
- package/src/lib/popup/popup.component.ts +0 -118
- package/src/lib/popup/popup.module.ts +0 -19
- package/src/lib/popup/popup.service.ts +0 -112
- package/src/lib/range-slider/range-slider.component.html +0 -1
- package/src/lib/range-slider/range-slider.component.ts +0 -21
- package/src/lib/range-slider/range-slider.module.ts +0 -14
- package/src/lib/selectbox/selectbox.component.html +0 -63
- package/src/lib/selectbox/selectbox.component.ts +0 -211
- package/src/lib/selectbox/selectbox.module.ts +0 -15
- package/src/lib/selection-list/selection-list.component.html +0 -31
- package/src/lib/selection-list/selection-list.component.ts +0 -56
- package/src/lib/selection-list/selection-list.module.ts +0 -13
- package/src/lib/side-menu/side-menu.component.html +0 -2
- package/src/lib/side-menu/side-menu.component.ts +0 -20
- package/src/lib/side-menu/side-menu.module.ts +0 -14
- package/src/lib/switch/switch.component.html +0 -8
- package/src/lib/switch/switch.component.ts +0 -25
- package/src/lib/switch/switch.module.ts +0 -15
- package/src/lib/tabs/tab-strip.component.html +0 -20
- package/src/lib/tabs/tab-strip.component.ts +0 -71
- package/src/lib/tabs/tab-view.component.html +0 -8
- package/src/lib/tabs/tab-view.component.ts +0 -50
- package/src/lib/tabs/tab.component.ts +0 -56
- package/src/lib/tabs/tabs.module.ts +0 -16
- package/src/lib/textbox/textbox.component.html +0 -20
- package/src/lib/textbox/textbox.component.ts +0 -64
- package/src/lib/textbox/textbox.module.ts +0 -24
- package/src/lib/time-box/time-box.component.html +0 -14
- package/src/lib/time-box/time-box.component.ts +0 -145
- package/src/lib/time-box/time-box.module.ts +0 -22
- package/src/lib/toast/toast.component.html +0 -12
- package/src/lib/toast/toast.component.ts +0 -57
- package/src/lib/toast/toast.module.ts +0 -15
- package/src/lib/toast/toast.service.ts +0 -122
- package/src/lib/tooltip/tooltip.component.html +0 -6
- package/src/lib/tooltip/tooltip.component.ts +0 -36
- package/src/lib/tooltip/tooltip.directive.ts +0 -93
- package/src/lib/tooltip/tooltip.module.ts +0 -16
- package/src/lib/validation/validation-rule.widget.ts +0 -120
- package/src/lib/validation/validation.class.ts +0 -23
- package/src/lib/validation/validation.module.ts +0 -26
- package/tsconfig.lib.json +0 -20
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectorRef,
|
|
3
|
-
ComponentFactoryResolver,
|
|
4
|
-
Directive,
|
|
5
|
-
ElementRef,
|
|
6
|
-
Input,
|
|
7
|
-
OnChanges,
|
|
8
|
-
Renderer2,
|
|
9
|
-
SimpleChanges, ViewContainerRef
|
|
10
|
-
} from '@angular/core';
|
|
11
|
-
import { AXLoadingComponent } from './loading.component';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const OVERLAY_CLASS = 'loading-overlay';
|
|
15
|
-
|
|
16
|
-
// This directive places an overlay with a loading spinner over its host element
|
|
17
|
-
// if isLoading equals to true and hides the overlay when isLoading becomes false.
|
|
18
|
-
@Directive({
|
|
19
|
-
selector: '[axIsLoading]'
|
|
20
|
-
})
|
|
21
|
-
export class AXLoadingDirective implements OnChanges {
|
|
22
|
-
@Input('axIsLoading')
|
|
23
|
-
isLoading = false;
|
|
24
|
-
|
|
25
|
-
protected overlayElement!: HTMLDivElement;
|
|
26
|
-
protected spinnerElement!: HTMLDivElement;
|
|
27
|
-
protected hostElement!: HTMLDivElement;
|
|
28
|
-
|
|
29
|
-
constructor(
|
|
30
|
-
protected readonly elementRef: ElementRef,
|
|
31
|
-
protected readonly renderer: Renderer2,
|
|
32
|
-
protected readonly changeDetectorRef: ChangeDetectorRef,
|
|
33
|
-
protected readonly viewContainerRef: ViewContainerRef,
|
|
34
|
-
protected readonly componentFactoryResolver: ComponentFactoryResolver,
|
|
35
|
-
) {
|
|
36
|
-
this.hostElement = this.elementRef.nativeElement;
|
|
37
|
-
this.hostElement.style.position = 'relative';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
41
|
-
if (!this.overlayElement || !this.spinnerElement) {
|
|
42
|
-
this.init();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (changes.isLoading) {
|
|
46
|
-
const isLoadingValue = changes.isLoading.currentValue;
|
|
47
|
-
|
|
48
|
-
if (isLoadingValue) {
|
|
49
|
-
this.addLoadingIndicator();
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.removeLoadingIndicator();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
this.changeDetectorRef.markForCheck();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
protected addLoadingIndicator(): void {
|
|
60
|
-
this.renderer.appendChild(this.hostElement, this.overlayElement);
|
|
61
|
-
this.renderer.appendChild(this.overlayElement, this.spinnerElement);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
protected removeLoadingIndicator(): void {
|
|
65
|
-
this.renderer.removeChild(this.overlayElement, this.spinnerElement);
|
|
66
|
-
this.renderer.removeChild(this.hostElement, this.overlayElement);
|
|
67
|
-
this.viewContainerRef.clear();
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
protected init(): void {
|
|
71
|
-
this.initOverlayElement();
|
|
72
|
-
this.initSpinnerComponent();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
protected initSpinnerComponent(): void {
|
|
76
|
-
const spinnerComponentFactory = this.componentFactoryResolver.resolveComponentFactory(AXLoadingComponent);
|
|
77
|
-
const spinnerComponent = this.viewContainerRef.createComponent(spinnerComponentFactory);
|
|
78
|
-
this.spinnerElement = spinnerComponent.location.nativeElement;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
protected initOverlayElement(): void {
|
|
82
|
-
this.overlayElement = this.renderer.createElement('div');
|
|
83
|
-
this.renderer.addClass(this.overlayElement, OVERLAY_CLASS);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { AXLoadingComponent } from './loading.component';
|
|
4
|
-
import { AXLoadingDirective } from './loading.directive';
|
|
5
|
-
import { OverlayModule } from '@angular/cdk/overlay';
|
|
6
|
-
import { PortalModule } from '@angular/cdk/portal';
|
|
7
|
-
import { AXLoadingSpinnerComponent } from './loading-spinner.component';
|
|
8
|
-
import { AXConfig } from '@acorex/core';
|
|
9
|
-
|
|
10
|
-
const COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];
|
|
11
|
-
const MODULES = [CommonModule, OverlayModule, PortalModule];
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
declarations: [...COMPONENT],
|
|
15
|
-
imports: [...MODULES],
|
|
16
|
-
exports: [...COMPONENT],
|
|
17
|
-
providers: [],
|
|
18
|
-
})
|
|
19
|
-
export class AXLoadingModule {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
constructor() {
|
|
23
|
-
AXConfig.set({
|
|
24
|
-
layout: {
|
|
25
|
-
loading: {
|
|
26
|
-
spinner: AXLoadingSpinnerComponent
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { Injectable, NgZone } from '@angular/core';
|
|
2
|
-
import { asyncScheduler, BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
-
import { finalize, observeOn } from 'rxjs/operators';
|
|
4
|
-
import { AXOverlayService, AXOverlayViewRef } from '../base/overlay.service';
|
|
5
|
-
import { AXLoadingComponent } from './loading.component';
|
|
6
|
-
|
|
7
|
-
type LoadingContext = object;
|
|
8
|
-
type LoaderId = string | number; // expected enum values
|
|
9
|
-
const DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Used for centrally setting/unsetting loading flags for components or services.
|
|
13
|
-
* Should be connected to global HTTP interceptor which will unset
|
|
14
|
-
* the loading flags in case an error happens using the clearLoadings() method.
|
|
15
|
-
*
|
|
16
|
-
* FAQ:
|
|
17
|
-
* Q: How to change loading flag for a parent component?
|
|
18
|
-
* A: Inject the parent component as a dependency to your constructor and
|
|
19
|
-
* call loadingService.setLoading(parentComponent, STATE).
|
|
20
|
-
*
|
|
21
|
-
* Q: How to change loading flag for a child component?
|
|
22
|
-
* A: Use a @ViewChild with component selector and pass the
|
|
23
|
-
* reference of the child to setLoading method.
|
|
24
|
-
*
|
|
25
|
-
* Q: I need more loading indicators in my components. How to?
|
|
26
|
-
* A: Assign a LoaderId to each indicator and then use them
|
|
27
|
-
* with calls to methods of this service.
|
|
28
|
-
*/
|
|
29
|
-
@Injectable({
|
|
30
|
-
providedIn: 'root'
|
|
31
|
-
})
|
|
32
|
-
export class AXLoadingService {
|
|
33
|
-
// WeakMap will remove components from itself upon
|
|
34
|
-
// their garbage collection by JS runtime.
|
|
35
|
-
protected loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();
|
|
36
|
-
// Both loading state maps are kept in-sync such that
|
|
37
|
-
// they can be used by both sync and async methods.
|
|
38
|
-
protected loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();
|
|
39
|
-
|
|
40
|
-
constructor(protected zoneRef: NgZone, private overlayService: AXOverlayService) { }
|
|
41
|
-
|
|
42
|
-
private _stack: { id: number, component: AXOverlayViewRef }[] = [];
|
|
43
|
-
|
|
44
|
-
show(location?: Element): number {
|
|
45
|
-
let host: Element;
|
|
46
|
-
if (location) {
|
|
47
|
-
host = location.closest('.ax-loading-host');
|
|
48
|
-
}
|
|
49
|
-
const containerElement = (host || location) as HTMLDivElement;
|
|
50
|
-
const com = this.overlayService.show(AXLoadingComponent, {},
|
|
51
|
-
{
|
|
52
|
-
closeOnClickOutside: false,
|
|
53
|
-
containerElement,
|
|
54
|
-
hasBackdrop: true,
|
|
55
|
-
backdropClass: ['ax-loading-overlay'],
|
|
56
|
-
scroll: 'block'
|
|
57
|
-
});
|
|
58
|
-
com.instance.visible = true;
|
|
59
|
-
const id = new Date().getTime();
|
|
60
|
-
this._stack.push({ id, component: com });
|
|
61
|
-
return id;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
hide(id): void {
|
|
65
|
-
const f = this._stack.find(c => c.id === id);
|
|
66
|
-
if (f) {
|
|
67
|
-
f.component.dispose();
|
|
68
|
-
this._stack = this._stack.filter(c => c.id !== id);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// Observable creation operator.
|
|
74
|
-
// LoaderId can be used when there are multiple loading indicators associated to a single context.
|
|
75
|
-
// Context can be any object, though in practice, components and services will be the most common contexts.
|
|
76
|
-
// loaderId is a non-mandatory parameter - when not specified, a default loaderId is used.
|
|
77
|
-
// Such a scenario is used when your context has contains only one loading indicator.
|
|
78
|
-
doLoading<V>(source$: Observable<V>, context: LoadingContext, loaderId?: LoaderId): Observable<V> {
|
|
79
|
-
this.startLoading(context, loaderId);
|
|
80
|
-
|
|
81
|
-
return source$.pipe(
|
|
82
|
-
observeOn(asyncScheduler),
|
|
83
|
-
finalize(() => this.endLoading(context, loaderId)),
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// To be used in your html templates.
|
|
88
|
-
// Returns a boolean indicating whether a given loader is active in a given context.
|
|
89
|
-
// If loaderId is unspecified, the method will return a logical disjunction of all
|
|
90
|
-
// loader states in the context.
|
|
91
|
-
isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {
|
|
92
|
-
const loaderStates = this.loadingStates.get(context);
|
|
93
|
-
|
|
94
|
-
if (!loaderStates) {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
if (loaderId !== undefined) {
|
|
99
|
-
return loaderStates.get(this.getLoaderId(loaderId)) ?? false;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
return [...loaderStates.values()].filter(state => state).length > 0;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// To be used in your html templates with async pipes.
|
|
108
|
-
// Returns an Observable of booleans indicating whether a given loader is active in a given context.
|
|
109
|
-
isLoading$(context: LoadingContext, loaderId?: LoaderId): Observable<boolean> {
|
|
110
|
-
const coalescedLoaderId = this.getLoaderId(loaderId);
|
|
111
|
-
|
|
112
|
-
if (!this.hasLoadingStates(context, coalescedLoaderId)) {
|
|
113
|
-
this.setLoadingState(context, false, loaderId);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return this.loadingStates$.get(context).get(coalescedLoaderId);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// The startLoading and endLoading methods are intended to be used when handling
|
|
120
|
-
// complex scenarios where a need for extended usage flexibility is desired.
|
|
121
|
-
startLoading(context: LoadingContext, loaderId?: LoaderId): void {
|
|
122
|
-
this.setLoadingState(context, true, this.getLoaderId(loaderId));
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
endLoading(context: LoadingContext, loaderId?: LoaderId): void {
|
|
126
|
-
this.setLoadingState(context, false, this.getLoaderId(loaderId));
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// To be called by middleware code (HTTP interceptors/routing listeners, etc.).
|
|
130
|
-
clearLoadings(): void {
|
|
131
|
-
this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();
|
|
132
|
-
this.loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
protected setLoadingState(context: LoadingContext, state: boolean, loaderId: LoaderId): void {
|
|
136
|
-
if (!this.hasLoadingStates(context, loaderId)) {
|
|
137
|
-
if (this.hasContextLoadingState(context)) {
|
|
138
|
-
this.loadingStates.get(context).set(loaderId, state);
|
|
139
|
-
this.loadingStates$.get(context).set(loaderId, new BehaviorSubject<boolean>(state));
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
this.loadingStates.set(context, new Map<LoaderId, boolean>([
|
|
143
|
-
[loaderId, state]
|
|
144
|
-
]));
|
|
145
|
-
this.loadingStates$.set(context, new Map<LoaderId, BehaviorSubject<boolean>>([
|
|
146
|
-
[loaderId, new BehaviorSubject<boolean>(state)]
|
|
147
|
-
]));
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
// @ts-ignore - loadingStates[context] is surely defined in this branch
|
|
152
|
-
this.loadingStates.get(context).set(loaderId, state);
|
|
153
|
-
this.loadingStates$.get(context).get(loaderId).next(state);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {
|
|
158
|
-
return this.hasContextLoadingState(context) && this.hasLoaderLoadingState(context, loaderId);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
protected hasContextLoadingState(context: LoadingContext) {
|
|
162
|
-
return this.loadingStates.has(context) && this.loadingStates$.has(context);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {
|
|
166
|
-
return this.loadingStates.get(context).has(loaderId) && this.loadingStates$.get(context).has(loaderId);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
protected getLoaderId(loaderId?: LoaderId): LoaderId {
|
|
170
|
-
return loaderId ?? DEFAULT_LOADER_ID;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<ng-content select="ax-prefix">
|
|
2
|
-
</ng-content>
|
|
3
|
-
<input class="ax-input" type="text" [attr.pattern]="'[\d\.]*'" [attr.placeholder]="placeholder" [attr.min]="minValue"
|
|
4
|
-
[attr.max]="maxValue" [class.ax-state-disabled]="disabled" [class.ax-state-readonly]="readonly"
|
|
5
|
-
[disabled]="disabled" [readonly]="readonly" [tabindex]="tabIndex" [ngModel]="displayText"
|
|
6
|
-
(focus)="_emitOnFocusEvent($event)" (blur)="_handleOnBlurEvent($event)" (keydown)="_handleOnKeydownEvent($event)"
|
|
7
|
-
autocomplete="off">
|
|
8
|
-
<ax-button color="light" look="blank" (onClick)="clear()" [tabIndex]="-1"
|
|
9
|
-
*ngIf="value && allowNull && !(disabled || readonly)">
|
|
10
|
-
<i class="ax-icon-x icon"></i>
|
|
11
|
-
</ax-button>
|
|
12
|
-
<ng-content select="ax-suffix">
|
|
13
|
-
</ng-content>
|
|
14
|
-
<ng-content select="ax-validation-rule">
|
|
15
|
-
</ng-content>
|
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
ViewEncapsulation,
|
|
4
|
-
ChangeDetectionStrategy,
|
|
5
|
-
ElementRef,
|
|
6
|
-
ChangeDetectorRef,
|
|
7
|
-
Input,
|
|
8
|
-
Output,
|
|
9
|
-
EventEmitter,
|
|
10
|
-
HostBinding,
|
|
11
|
-
} from '@angular/core';
|
|
12
|
-
import { MaskApplierService } from 'ngx-mask';
|
|
13
|
-
import { AXBaseTextBoxMixin } from '../base';
|
|
14
|
-
import {
|
|
15
|
-
TEXTBOX_INPUTS,
|
|
16
|
-
TEXTBOX_OUTPUT,
|
|
17
|
-
} from '../base/mixin/textbox-mixin.class';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The NumberBox is a component which detects user interaction and triggers a corresponding event
|
|
21
|
-
*
|
|
22
|
-
* @category Components
|
|
23
|
-
*/
|
|
24
|
-
@Component({
|
|
25
|
-
selector: 'ax-number-box',
|
|
26
|
-
templateUrl: './number-box.component.html',
|
|
27
|
-
inputs: [
|
|
28
|
-
'disabled',
|
|
29
|
-
'readonly',
|
|
30
|
-
'tabIndex',
|
|
31
|
-
'size',
|
|
32
|
-
'value',
|
|
33
|
-
...TEXTBOX_INPUTS,
|
|
34
|
-
],
|
|
35
|
-
outputs: [
|
|
36
|
-
'valueChange',
|
|
37
|
-
'onValueChanged',
|
|
38
|
-
'onBlur',
|
|
39
|
-
'onFocus',
|
|
40
|
-
...TEXTBOX_OUTPUT,
|
|
41
|
-
],
|
|
42
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
43
|
-
encapsulation: ViewEncapsulation.None,
|
|
44
|
-
host: { class: 'ax-number-box ax-editor-container' },
|
|
45
|
-
})
|
|
46
|
-
export class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
|
47
|
-
|
|
48
|
-
@HostBinding('class')
|
|
49
|
-
private get __hostClass(): string {
|
|
50
|
-
return `${this.cssClass} ax-${this.size}`;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* A character value that specifies the separator character.
|
|
55
|
-
*/
|
|
56
|
-
@Input()
|
|
57
|
-
separator: string = ',';
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Specifies whether the Separator character will be displayed or not
|
|
61
|
-
*/
|
|
62
|
-
@Input()
|
|
63
|
-
thousandSeparator: boolean = false;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Specifies the value that is used to increment or decrement the **Integer** part of number
|
|
67
|
-
*/
|
|
68
|
-
@Input()
|
|
69
|
-
step: number = 1;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Specifies the number of decimals that the user can enter
|
|
73
|
-
*/
|
|
74
|
-
@Input()
|
|
75
|
-
scale: number = 0;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Specifies the value that is used to increment or decrement the **Deciaml** part of number
|
|
79
|
-
*/
|
|
80
|
-
@Input()
|
|
81
|
-
decimalStep: number = 0.1;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Specifies whether the Up and Down spin buttons will be rendered or not
|
|
85
|
-
*/
|
|
86
|
-
@Input()
|
|
87
|
-
showSpinButtons: boolean = true;
|
|
88
|
-
|
|
89
|
-
private _minValue: number = Number.MIN_VALUE;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Specifies the smallest value that is valid
|
|
93
|
-
*/
|
|
94
|
-
@Input()
|
|
95
|
-
public get minValue(): number {
|
|
96
|
-
return this._minValue;
|
|
97
|
-
}
|
|
98
|
-
public set minValue(v: number) {
|
|
99
|
-
this._minValue = v ? Number(v) : Number.MIN_VALUE;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
private _maxValue: number = Number.MAX_VALUE;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Specifies the greatest value that is valid
|
|
106
|
-
*/
|
|
107
|
-
@Input()
|
|
108
|
-
public get maxValue(): number {
|
|
109
|
-
return this._maxValue;
|
|
110
|
-
}
|
|
111
|
-
public set maxValue(v: number) {
|
|
112
|
-
this._maxValue = v ? Number(v) : Number.MAX_VALUE;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
@Output()
|
|
116
|
-
public displayTextChange: EventEmitter<string> = new EventEmitter<string>();
|
|
117
|
-
private _displayText: string;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* The formatted string which is displaying in the numberbox
|
|
121
|
-
*/
|
|
122
|
-
@Input()
|
|
123
|
-
public get displayText(): string {
|
|
124
|
-
return this._displayText;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
public set displayText(v: string) {
|
|
128
|
-
this._displayText = v;
|
|
129
|
-
this.displayTextChange.emit(v);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* @ignore
|
|
135
|
-
*/
|
|
136
|
-
constructor(
|
|
137
|
-
elementRef: ElementRef,
|
|
138
|
-
private cdr: ChangeDetectorRef,
|
|
139
|
-
private _maskService: MaskApplierService
|
|
140
|
-
) {
|
|
141
|
-
super(elementRef, cdr);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
_handleOnKeydownEvent(e: KeyboardEvent) {
|
|
145
|
-
const ignore = () => {
|
|
146
|
-
e.preventDefault();
|
|
147
|
-
e.stopPropagation();
|
|
148
|
-
};
|
|
149
|
-
const toNum = (val: string) => {
|
|
150
|
-
return Number(val.replace(/[^0-9.-]+/g, ''));
|
|
151
|
-
};
|
|
152
|
-
const nums: string[] = Array(10)
|
|
153
|
-
.fill(0)
|
|
154
|
-
.map((v, i) => i.toString());
|
|
155
|
-
const chars: string[] = [
|
|
156
|
-
'.',
|
|
157
|
-
'-',
|
|
158
|
-
'Backspace',
|
|
159
|
-
'ArrowDown',
|
|
160
|
-
'ArrowUp',
|
|
161
|
-
'ArrowRight',
|
|
162
|
-
'ArrowLeft',
|
|
163
|
-
'Tab',
|
|
164
|
-
'Enter',
|
|
165
|
-
];
|
|
166
|
-
const input = e.target as HTMLInputElement;
|
|
167
|
-
const key = e.key;
|
|
168
|
-
const valStr = input.value;
|
|
169
|
-
const val = toNum(valStr);
|
|
170
|
-
const decimalPointIndex = valStr.indexOf('.');
|
|
171
|
-
const selectionStart = input.selectionStart;
|
|
172
|
-
const selectionEnd = input.selectionEnd;
|
|
173
|
-
//
|
|
174
|
-
|
|
175
|
-
//
|
|
176
|
-
if (![...nums, ...chars].includes(key)) {
|
|
177
|
-
ignore();
|
|
178
|
-
}
|
|
179
|
-
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
180
|
-
const stepVal =
|
|
181
|
-
decimalPointIndex > -1
|
|
182
|
-
? selectionStart >= decimalPointIndex
|
|
183
|
-
? this.decimalStep
|
|
184
|
-
: this.step
|
|
185
|
-
: this.step;
|
|
186
|
-
if (e.key === 'ArrowDown') {
|
|
187
|
-
this.value = val - stepVal;
|
|
188
|
-
} else {
|
|
189
|
-
this.value = val + stepVal;
|
|
190
|
-
}
|
|
191
|
-
ignore();
|
|
192
|
-
input.setSelectionRange(selectionStart, selectionStart);
|
|
193
|
-
} else if (e.key == 'Backspace') {
|
|
194
|
-
const chr = valStr.substr(selectionStart - 1, 1);
|
|
195
|
-
if (!nums.includes(chr)) {
|
|
196
|
-
ignore();
|
|
197
|
-
input.setSelectionRange(selectionStart - 1, selectionStart - 1);
|
|
198
|
-
} else {
|
|
199
|
-
const newVal = toNum(
|
|
200
|
-
valStr.substr(0, selectionStart - 1) + valStr.substr(selectionEnd)
|
|
201
|
-
);
|
|
202
|
-
input.value = this._format(newVal);
|
|
203
|
-
this.value = newVal;
|
|
204
|
-
ignore();
|
|
205
|
-
if (newVal == 0) {
|
|
206
|
-
input.setSelectionRange(1, 1);
|
|
207
|
-
} else {
|
|
208
|
-
input.setSelectionRange(selectionStart - 1, selectionStart - 1);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
} else if (e.key == '.') {
|
|
212
|
-
if (!this.scale) {
|
|
213
|
-
ignore();
|
|
214
|
-
} else if (decimalPointIndex > -1) {
|
|
215
|
-
input.setSelectionRange(decimalPointIndex + 1, decimalPointIndex + 1);
|
|
216
|
-
ignore();
|
|
217
|
-
} else {
|
|
218
|
-
if (input.selectionEnd != valStr.length) {
|
|
219
|
-
input.setSelectionRange(valStr.length, valStr.length);
|
|
220
|
-
ignore();
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
} else if (e.key == '-') {
|
|
224
|
-
const index = valStr.indexOf('-');
|
|
225
|
-
if (index > -1) {
|
|
226
|
-
ignore();
|
|
227
|
-
} else {
|
|
228
|
-
this.value = Math.abs(this.value) * -1;
|
|
229
|
-
input.setSelectionRange(index + 1, index + 1);
|
|
230
|
-
ignore();
|
|
231
|
-
}
|
|
232
|
-
} else if (nums.includes(key)) {
|
|
233
|
-
const newVal = toNum(
|
|
234
|
-
valStr.substr(0, selectionStart) + key + valStr.substr(selectionEnd)
|
|
235
|
-
);
|
|
236
|
-
if (newVal < this.minValue) {
|
|
237
|
-
//TODO : highlight correct number
|
|
238
|
-
//input.value = this._format(this.minValue);
|
|
239
|
-
//const diff = this.minValue - val;
|
|
240
|
-
//this.value = this.minValue;
|
|
241
|
-
//ignore();
|
|
242
|
-
// setTimeout(() => {
|
|
243
|
-
// input.setSelectionRange(input.selectionStart + 1, this.minValue.toString().length);
|
|
244
|
-
// }, 50);
|
|
245
|
-
} else if (newVal > this.maxValue) {
|
|
246
|
-
input.value = this._format(this.maxValue);
|
|
247
|
-
this.value = this.maxValue;
|
|
248
|
-
ignore();
|
|
249
|
-
} else {
|
|
250
|
-
input.value = this._format(newVal);
|
|
251
|
-
this.value = newVal;
|
|
252
|
-
ignore();
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
super._emitOnKeydownEvent(e);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
_onValueChanging(value: number) {
|
|
259
|
-
return this._fixValue(value);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
_fixValue(value: number): number {
|
|
263
|
-
if (value == null || value == undefined) {
|
|
264
|
-
return this.allowNull ? null : this.minValue;
|
|
265
|
-
} else if (value > this.maxValue) {
|
|
266
|
-
return this.maxValue;
|
|
267
|
-
} else if (value < this.minValue) {
|
|
268
|
-
return this.minValue;
|
|
269
|
-
}
|
|
270
|
-
return parseFloat(value.toFixed(this.scale));
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
_format(value: number): string {
|
|
274
|
-
if (this.thousandSeparator) {
|
|
275
|
-
this._maskService.thousandSeparator = this.separator;
|
|
276
|
-
this._maskService.allowNegativeNumbers = true;
|
|
277
|
-
const format = `separator.${this.scale}`;
|
|
278
|
-
return this._maskService.applyMask(value?.toString(), format);
|
|
279
|
-
} else {
|
|
280
|
-
this._maskService.thousandSeparator = '';
|
|
281
|
-
this._maskService.allowNegativeNumbers = true;
|
|
282
|
-
const format = `separator.${this.scale}`;
|
|
283
|
-
return this._maskService.applyMask(value?.toString(), format);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
_onValueChanged(oldValue: any, newValue: any): void {
|
|
288
|
-
this.displayText = this._format(newValue);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
_handleOnBlurEvent(e: FocusEvent) {
|
|
292
|
-
const input = e.target as HTMLInputElement;
|
|
293
|
-
this.value = this._fixValue(this.value);
|
|
294
|
-
input.value = this._format(this.value);
|
|
295
|
-
this._emitOnFocusEvent(e);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { AXNumberBoxComponent } from './number-box.component';
|
|
4
|
-
import { FormsModule } from '@angular/forms';
|
|
5
|
-
import { AXButtonModule } from '../button';
|
|
6
|
-
import { NgxMaskModule } from 'ngx-mask';
|
|
7
|
-
|
|
8
|
-
const COMPONENT = [AXNumberBoxComponent];
|
|
9
|
-
const MODULES = [
|
|
10
|
-
CommonModule,
|
|
11
|
-
FormsModule,
|
|
12
|
-
AXButtonModule,
|
|
13
|
-
NgxMaskModule.forChild()
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
@NgModule({
|
|
17
|
-
declarations: [...COMPONENT],
|
|
18
|
-
imports: [...MODULES],
|
|
19
|
-
exports: [...COMPONENT],
|
|
20
|
-
providers: [],
|
|
21
|
-
})
|
|
22
|
-
export class AXNumberBoxModule { }
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, Injectable, ViewChild } from '@angular/core';
|
|
2
|
-
import { AXEvent } from '../base/events.class';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { AXPageComponent } from './page.component';
|
|
6
|
-
import { AXPageFooterComponent } from './page-footer.component';
|
|
7
|
-
|
|
8
|
-
export const TAB_META_KEY = '__meta__';
|
|
9
|
-
|
|
10
|
-
export class AXPageCloseEvent extends AXEvent {
|
|
11
|
-
data?: any
|
|
12
|
-
}
|
|
13
|
-
export class AXPageClosing {
|
|
14
|
-
cancel: boolean = false;
|
|
15
|
-
data?: any;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export class AXPageResult {
|
|
19
|
-
sender: AXBasePageComponent;
|
|
20
|
-
data?: any;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Defines a CSS class—or multiple classes separated by spaces— which are applied to a span element inside the Button. Allows the usage of custom icons after the primary text.
|
|
25
|
-
*/
|
|
26
|
-
export class AXPageClosedPromise extends Promise<AXPageResult> {
|
|
27
|
-
|
|
28
|
-
private closeMethod: () => void;
|
|
29
|
-
constructor(
|
|
30
|
-
executor: (resolve: (value?: AXPageResult | PromiseLike<AXPageResult>) => void,
|
|
31
|
-
reject: (reason?: any) => void) => void
|
|
32
|
-
) {
|
|
33
|
-
super(executor);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public close() {
|
|
37
|
-
if (this.closeMethod) {
|
|
38
|
-
this.closeMethod();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
@Injectable()
|
|
45
|
-
export class AXBasePageComponent {
|
|
46
|
-
|
|
47
|
-
@ViewChild(AXPageComponent, { static: true })
|
|
48
|
-
private pageContainer: AXPageComponent;
|
|
49
|
-
|
|
50
|
-
@ViewChild(AXPageFooterComponent, { static: true })
|
|
51
|
-
footer: AXPageFooterComponent;
|
|
52
|
-
|
|
53
|
-
private _isLoading: boolean = false;
|
|
54
|
-
public get isLoading(): boolean {
|
|
55
|
-
return this._isLoading;
|
|
56
|
-
}
|
|
57
|
-
public set isLoading(v: boolean) {
|
|
58
|
-
this._isLoading = v;
|
|
59
|
-
if (this.pageContainer) {
|
|
60
|
-
this.pageContainer.isLoading = this.isLoading;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
onClosed: EventEmitter<AXPageCloseEvent> = new EventEmitter<AXPageCloseEvent>();
|
|
66
|
-
|
|
67
|
-
close(data?: any) {
|
|
68
|
-
this.onClosed.emit({
|
|
69
|
-
component: this,
|
|
70
|
-
data: data
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
onClosing(e: AXPageClosing): void | Promise<void> {
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
ngOnDestroy() {
|
|
78
|
-
this.onClosed.unsubscribe();
|
|
79
|
-
}
|
|
80
|
-
}
|