@acorex/components 7.1.0 → 7.1.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/action-sheet/index.d.ts +5 -5
- package/action-sheet/public-api.d.ts +3 -3
- package/action-sheet/src/action-sheet.component.d.ts +25 -25
- package/action-sheet/src/action-sheet.interface.d.ts +20 -20
- package/action-sheet/src/action-sheet.module.d.ts +14 -14
- package/action-sheet/src/action-sheet.service.d.ts +13 -13
- package/alert/index.d.ts +5 -5
- package/alert/public-api.d.ts +2 -2
- package/alert/src/alert.component.d.ts +88 -88
- package/alert/src/alert.module.d.ts +9 -9
- package/avatar/index.d.ts +5 -5
- package/avatar/public-api.d.ts +3 -3
- package/avatar/src/avatar-group.component.d.ts +8 -8
- package/avatar/src/avatar.component.d.ts +20 -20
- package/avatar/src/avatar.module.d.ts +9 -9
- package/badge/index.d.ts +5 -5
- package/badge/public-api.d.ts +2 -2
- package/badge/src/badge.component.d.ts +41 -41
- package/badge/src/badge.module.d.ts +8 -8
- package/breadcrumbs/index.d.ts +5 -5
- package/breadcrumbs/public-api.d.ts +4 -4
- package/breadcrumbs/src/breadcrumbs-item.class.d.ts +9 -9
- package/breadcrumbs/src/breadcrumbs-item.component.d.ts +77 -79
- package/breadcrumbs/src/breadcrumbs.component.d.ts +13 -13
- package/breadcrumbs/src/breadcrumbs.module.d.ts +9 -9
- package/button/index.d.ts +5 -5
- package/button/public-api.d.ts +5 -5
- package/button/src/button-group.component.d.ts +86 -86
- package/button/src/button-item.class.d.ts +24 -24
- package/button/src/button-item.component.d.ts +82 -80
- package/button/src/button.component.d.ts +23 -23
- package/button/src/button.module.d.ts +11 -11
- package/calendar/index.d.ts +5 -5
- package/calendar/public-api.d.ts +4 -4
- package/calendar/src/calendar-range.component.d.ts +29 -29
- package/calendar/src/calendar.class.d.ts +100 -100
- package/calendar/src/calendar.component.d.ts +44 -44
- package/calendar/src/calendar.module.d.ts +10 -10
- package/card/index.d.ts +5 -5
- package/card/public-api.d.ts +2 -2
- package/card/src/card.component.d.ts +10 -10
- package/card/src/card.module.d.ts +8 -8
- package/checkbox/index.d.ts +5 -5
- package/checkbox/public-api.d.ts +2 -2
- package/checkbox/src/checkbox.component.d.ts +12 -12
- package/checkbox/src/checkbox.module.d.ts +10 -10
- package/chips/index.d.ts +5 -5
- package/chips/public-api.d.ts +2 -2
- package/chips/src/chips.component.d.ts +72 -72
- package/chips/src/chips.module.d.ts +8 -8
- package/collapse/index.d.ts +5 -5
- package/collapse/public-api.d.ts +3 -3
- package/collapse/src/collapse-group.component.d.ts +15 -15
- package/collapse/src/collapse.component.d.ts +17 -17
- package/collapse/src/collapse.module.d.ts +9 -9
- package/color-palette/index.d.ts +5 -5
- package/color-palette/public-api.d.ts +7 -7
- package/color-palette/src/color-palette-input.component.d.ts +22 -22
- package/color-palette/src/color-palette-picker.component.d.ts +32 -32
- package/color-palette/src/color-palette-preview.component.d.ts +11 -11
- package/color-palette/src/color-palette-swatches.component.d.ts +18 -18
- package/color-palette/src/color-palette.class.d.ts +22 -22
- package/color-palette/src/color-palette.component.d.ts +16 -16
- package/color-palette/src/color-palette.module.d.ts +19 -19
- package/color-picker/index.d.ts +5 -5
- package/color-picker/public-api.d.ts +2 -2
- package/color-picker/src/color-picker.component.d.ts +190 -193
- package/color-picker/src/color-picker.module.d.ts +18 -18
- package/common/index.d.ts +5 -5
- package/common/public-api.d.ts +16 -16
- package/common/src/classes/components.class.d.ts +62 -62
- package/common/src/classes/data.class.d.ts +4 -4
- package/common/src/classes/drawing.class.d.ts +9 -9
- package/common/src/classes/events.class.d.ts +95 -95
- package/common/src/classes/styles.class.d.ts +17 -17
- package/common/src/common.module.d.ts +11 -11
- package/common/src/components/base-component.class.d.ts +28 -28
- package/common/src/components/button-base-component.class.d.ts +36 -36
- package/common/src/components/color-component.class.d.ts +15 -15
- package/common/src/components/colorlook-component.class.d.ts +9 -9
- package/common/src/components/index.d.ts +7 -7
- package/common/src/components/interactive-component.class.d.ts +37 -37
- package/common/src/components/look-component.class.d.ts +15 -15
- package/common/src/components/value-component.class.d.ts +45 -45
- package/common/src/constant/positions.d.ts +75 -75
- package/common/src/directives/auto-focus.directive.d.ts +13 -13
- package/common/src/directives/debounce-time.directive.d.ts +17 -17
- package/common/src/directives/hotkey.directive.d.ts +22 -22
- package/common/src/directives/infinite-scroll.directive.d.ts +25 -25
- package/common/src/directives/responsive.directive.d.ts +10 -10
- package/common/src/services/custom-cdk-overlay.service.d.ts +19 -19
- package/common/src/services/hotkey.service.d.ts +17 -17
- package/common/src/services/overlay.service.d.ts +34 -34
- package/context-menu/index.d.ts +5 -5
- package/context-menu/public-api.d.ts +2 -2
- package/context-menu/src/context-menu.component.d.ts +34 -34
- package/context-menu/src/context-menu.module.d.ts +13 -13
- package/data-pager/index.d.ts +5 -5
- package/data-pager/public-api.d.ts +9 -9
- package/data-pager/src/data-pager-base.component.d.ts +49 -49
- package/data-pager/src/data-pager-info.component.d.ts +15 -15
- package/data-pager/src/data-pager-input-selector.component.d.ts +15 -15
- package/data-pager/src/data-pager-next-buttons.components.d.ts +16 -16
- package/data-pager/src/data-pager-numeric-selector.component.d.ts +18 -18
- package/data-pager/src/data-pager-pagesize-dropdown.component.d.ts +18 -18
- package/data-pager/src/data-pager-prev-buttons.component.d.ts +15 -15
- package/data-pager/src/data-pager.component.d.ts +35 -35
- package/data-pager/src/data-pager.module.d.ts +18 -18
- package/data-table/index.d.ts +5 -5
- package/data-table/public-api.d.ts +4 -4
- package/data-table/src/data-column-cell-template.directive.d.ts +8 -8
- package/data-table/src/data-column.directive.d.ts +16 -16
- package/data-table/src/data-table.component.d.ts +37 -37
- package/data-table/src/data-table.module.d.ts +14 -14
- package/date-picker/index.d.ts +5 -5
- package/date-picker/public-api.d.ts +2 -2
- package/date-picker/src/datepicker.component.d.ts +154 -154
- package/date-picker/src/datepicker.module.d.ts +15 -15
- package/decorators/index.d.ts +5 -5
- package/decorators/public-api.d.ts +14 -14
- package/decorators/src/close-button.component.d.ts +14 -14
- package/decorators/src/content.component.d.ts +8 -8
- package/decorators/src/decorators.module.d.ts +20 -20
- package/decorators/src/footer.component.d.ts +8 -8
- package/decorators/src/form-hint.component.d.ts +8 -8
- package/decorators/src/header.component.d.ts +8 -8
- package/decorators/src/icon.component.d.ts +10 -10
- package/decorators/src/overlay.component.d.ts +6 -6
- package/decorators/src/placeholder.component.d.ts +5 -5
- package/decorators/src/prefix.component.d.ts +8 -8
- package/decorators/src/sub-title.component.d.ts +9 -9
- package/decorators/src/suffix.component.d.ts +8 -8
- package/decorators/src/text.component.d.ts +9 -9
- package/decorators/src/title.component.d.ts +8 -8
- package/dialog/index.d.ts +5 -5
- package/dialog/public-api.d.ts +4 -4
- package/dialog/src/dialog.class.d.ts +13 -13
- package/dialog/src/dialog.component.d.ts +16 -16
- package/dialog/src/dialog.module.d.ts +14 -14
- package/dialog/src/dialog.service.d.ts +38 -38
- package/drawer/index.d.ts +5 -5
- package/drawer/public-api.d.ts +3 -3
- package/drawer/src/drawer-container.component.d.ts +10 -10
- package/drawer/src/drawer.component.d.ts +36 -36
- package/drawer/src/drawer.module.d.ts +9 -9
- package/dropdown/index.d.ts +5 -5
- package/dropdown/public-api.d.ts +2 -2
- package/dropdown/src/dropdown-panel.component.d.ts +30 -30
- package/dropdown/src/dropdown.module.d.ts +14 -14
- package/esm2022/acorex-components.mjs +4 -4
- package/esm2022/action-sheet/acorex-components-action-sheet.mjs +4 -4
- package/esm2022/action-sheet/public-api.mjs +3 -3
- package/esm2022/action-sheet/src/action-sheet.component.mjs +81 -80
- package/esm2022/action-sheet/src/action-sheet.interface.mjs +2 -2
- package/esm2022/action-sheet/src/action-sheet.module.mjs +27 -26
- package/esm2022/action-sheet/src/action-sheet.service.mjs +94 -93
- package/esm2022/alert/acorex-components-alert.mjs +4 -4
- package/esm2022/alert/public-api.mjs +2 -2
- package/esm2022/alert/src/alert.component.mjs +189 -188
- package/esm2022/alert/src/alert.module.mjs +23 -22
- package/esm2022/avatar/acorex-components-avatar.mjs +4 -4
- package/esm2022/avatar/public-api.mjs +3 -3
- package/esm2022/avatar/src/avatar-group.component.mjs +17 -16
- package/esm2022/avatar/src/avatar.component.mjs +44 -43
- package/esm2022/avatar/src/avatar.module.mjs +23 -22
- package/esm2022/badge/acorex-components-badge.mjs +4 -4
- package/esm2022/badge/public-api.mjs +2 -2
- package/esm2022/badge/src/badge.component.mjs +29 -28
- package/esm2022/badge/src/badge.module.mjs +22 -21
- package/esm2022/breadcrumbs/acorex-components-breadcrumbs.mjs +4 -4
- package/esm2022/breadcrumbs/public-api.mjs +4 -4
- package/esm2022/breadcrumbs/src/breadcrumbs-item.class.mjs +1 -1
- package/esm2022/breadcrumbs/src/breadcrumbs-item.component.mjs +51 -50
- package/esm2022/breadcrumbs/src/breadcrumbs.component.mjs +28 -27
- package/esm2022/breadcrumbs/src/breadcrumbs.module.mjs +21 -20
- package/esm2022/button/acorex-components-button.mjs +4 -4
- package/esm2022/button/public-api.mjs +5 -5
- package/esm2022/button/src/button-group.component.mjs +92 -91
- package/esm2022/button/src/button-item.class.mjs +1 -1
- package/esm2022/button/src/button-item.component.mjs +70 -69
- package/esm2022/button/src/button.component.mjs +79 -78
- package/esm2022/button/src/button.module.mjs +33 -32
- package/esm2022/calendar/acorex-components-calendar.mjs +4 -4
- package/esm2022/calendar/public-api.mjs +4 -4
- package/esm2022/calendar/src/calendar-range.component.mjs +175 -174
- package/esm2022/calendar/src/calendar.class.mjs +282 -280
- package/esm2022/calendar/src/calendar.component.mjs +373 -372
- package/esm2022/calendar/src/calendar.module.mjs +24 -23
- package/esm2022/card/acorex-components-card.mjs +4 -4
- package/esm2022/card/public-api.mjs +2 -2
- package/esm2022/card/src/card.component.mjs +19 -18
- package/esm2022/card/src/card.module.mjs +20 -19
- package/esm2022/checkbox/acorex-components-checkbox.mjs +4 -4
- package/esm2022/checkbox/public-api.mjs +2 -2
- package/esm2022/checkbox/src/checkbox.component.mjs +43 -42
- package/esm2022/checkbox/src/checkbox.module.mjs +22 -21
- package/esm2022/chips/acorex-components-chips.mjs +4 -4
- package/esm2022/chips/public-api.mjs +2 -2
- package/esm2022/chips/src/chips.component.mjs +34 -33
- package/esm2022/chips/src/chips.module.mjs +20 -19
- package/esm2022/collapse/acorex-components-collapse.mjs +4 -4
- package/esm2022/collapse/public-api.mjs +3 -3
- package/esm2022/collapse/src/collapse-group.component.mjs +53 -52
- package/esm2022/collapse/src/collapse.component.mjs +48 -47
- package/esm2022/collapse/src/collapse.module.mjs +21 -20
- package/esm2022/color-palette/acorex-components-color-palette.mjs +4 -4
- package/esm2022/color-palette/public-api.mjs +7 -7
- package/esm2022/color-palette/src/color-palette-input.component.mjs +131 -130
- package/esm2022/color-palette/src/color-palette-picker.component.mjs +160 -159
- package/esm2022/color-palette/src/color-palette-preview.component.mjs +57 -56
- package/esm2022/color-palette/src/color-palette-swatches.component.mjs +295 -294
- package/esm2022/color-palette/src/color-palette.class.mjs +19 -17
- package/esm2022/color-palette/src/color-palette.component.mjs +76 -75
- package/esm2022/color-palette/src/color-palette.module.mjs +61 -60
- package/esm2022/color-picker/acorex-components-color-picker.mjs +4 -4
- package/esm2022/color-picker/public-api.mjs +2 -2
- package/esm2022/color-picker/src/color-picker.component.mjs +120 -119
- package/esm2022/color-picker/src/color-picker.module.mjs +62 -61
- package/esm2022/common/acorex-components-common.mjs +4 -4
- package/esm2022/common/public-api.mjs +16 -16
- package/esm2022/common/src/classes/components.class.mjs +78 -72
- package/esm2022/common/src/classes/data.class.mjs +1 -1
- package/esm2022/common/src/classes/drawing.class.mjs +1 -1
- package/esm2022/common/src/classes/events.class.mjs +95 -95
- package/esm2022/common/src/classes/styles.class.mjs +12 -12
- package/esm2022/common/src/common.module.mjs +43 -42
- package/esm2022/common/src/components/base-component.class.mjs +56 -56
- package/esm2022/common/src/components/button-base-component.class.mjs +68 -68
- package/esm2022/common/src/components/color-component.class.mjs +26 -26
- package/esm2022/common/src/components/colorlook-component.class.mjs +10 -10
- package/esm2022/common/src/components/index.mjs +7 -7
- package/esm2022/common/src/components/interactive-component.class.mjs +62 -62
- package/esm2022/common/src/components/look-component.class.mjs +26 -26
- package/esm2022/common/src/components/value-component.class.mjs +207 -206
- package/esm2022/common/src/constant/positions.mjs +74 -74
- package/esm2022/common/src/directives/auto-focus.directive.mjs +58 -57
- package/esm2022/common/src/directives/debounce-time.directive.mjs +50 -49
- package/esm2022/common/src/directives/hotkey.directive.mjs +83 -82
- package/esm2022/common/src/directives/infinite-scroll.directive.mjs +70 -69
- package/esm2022/common/src/directives/responsive.directive.mjs +36 -35
- package/esm2022/common/src/services/custom-cdk-overlay.service.mjs +52 -50
- package/esm2022/common/src/services/hotkey.service.mjs +41 -40
- package/esm2022/common/src/services/overlay.service.mjs +116 -115
- package/esm2022/context-menu/acorex-components-context-menu.mjs +4 -4
- package/esm2022/context-menu/public-api.mjs +2 -2
- package/esm2022/context-menu/src/context-menu.component.mjs +271 -270
- package/esm2022/context-menu/src/context-menu.module.mjs +37 -36
- package/esm2022/data-pager/acorex-components-data-pager.mjs +4 -4
- package/esm2022/data-pager/public-api.mjs +9 -9
- package/esm2022/data-pager/src/data-pager-base.component.mjs +37 -35
- package/esm2022/data-pager/src/data-pager-info.component.mjs +62 -61
- package/esm2022/data-pager/src/data-pager-input-selector.component.mjs +46 -45
- package/esm2022/data-pager/src/data-pager-next-buttons.components.mjs +51 -50
- package/esm2022/data-pager/src/data-pager-numeric-selector.component.mjs +75 -74
- package/esm2022/data-pager/src/data-pager-pagesize-dropdown.component.mjs +67 -66
- package/esm2022/data-pager/src/data-pager-prev-buttons.component.mjs +48 -47
- package/esm2022/data-pager/src/data-pager.component.mjs +147 -146
- package/esm2022/data-pager/src/data-pager.module.mjs +52 -51
- package/esm2022/data-table/acorex-components-data-table.mjs +4 -4
- package/esm2022/data-table/public-api.mjs +4 -4
- package/esm2022/data-table/src/data-column-cell-template.directive.mjs +19 -18
- package/esm2022/data-table/src/data-column.directive.mjs +51 -50
- package/esm2022/data-table/src/data-table.component.mjs +140 -139
- package/esm2022/data-table/src/data-table.module.mjs +28 -27
- package/esm2022/date-picker/acorex-components-date-picker.mjs +4 -4
- package/esm2022/date-picker/public-api.mjs +2 -2
- package/esm2022/date-picker/src/datepicker.component.mjs +241 -240
- package/esm2022/date-picker/src/datepicker.module.mjs +45 -44
- package/esm2022/decorators/acorex-components-decorators.mjs +4 -4
- package/esm2022/decorators/public-api.mjs +14 -14
- package/esm2022/decorators/src/close-button.component.mjs +44 -43
- package/esm2022/decorators/src/content.component.mjs +22 -21
- package/esm2022/decorators/src/decorators.module.mjs +72 -71
- package/esm2022/decorators/src/footer.component.mjs +22 -21
- package/esm2022/decorators/src/form-hint.component.mjs +21 -20
- package/esm2022/decorators/src/header.component.mjs +22 -21
- package/esm2022/decorators/src/icon.component.mjs +31 -30
- package/esm2022/decorators/src/overlay.component.mjs +21 -20
- package/esm2022/decorators/src/placeholder.component.mjs +15 -14
- package/esm2022/decorators/src/prefix.component.mjs +22 -21
- package/esm2022/decorators/src/sub-title.component.mjs +26 -25
- package/esm2022/decorators/src/suffix.component.mjs +22 -21
- package/esm2022/decorators/src/text.component.mjs +23 -22
- package/esm2022/decorators/src/title.component.mjs +21 -20
- package/esm2022/dialog/acorex-components-dialog.mjs +4 -4
- package/esm2022/dialog/public-api.mjs +4 -4
- package/esm2022/dialog/src/dialog.class.mjs +1 -1
- package/esm2022/dialog/src/dialog.component.mjs +56 -55
- package/esm2022/dialog/src/dialog.module.mjs +28 -27
- package/esm2022/dialog/src/dialog.service.mjs +155 -154
- package/esm2022/drawer/acorex-components-drawer.mjs +4 -4
- package/esm2022/drawer/public-api.mjs +3 -3
- package/esm2022/drawer/src/drawer-container.component.mjs +31 -30
- package/esm2022/drawer/src/drawer.component.mjs +139 -138
- package/esm2022/drawer/src/drawer.module.mjs +23 -22
- package/esm2022/dropdown/acorex-components-dropdown.mjs +4 -4
- package/esm2022/dropdown/public-api.mjs +2 -2
- package/esm2022/dropdown/src/dropdown-panel.component.mjs +106 -105
- package/esm2022/dropdown/src/dropdown.module.mjs +26 -25
- package/esm2022/form/acorex-components-form.mjs +4 -4
- package/esm2022/form/public-api.mjs +6 -6
- package/esm2022/form/src/form-field.component.mjs +16 -15
- package/esm2022/form/src/form.component.mjs +164 -163
- package/esm2022/form/src/form.module.mjs +64 -63
- package/esm2022/form/src/validation-rule.widget.mjs +114 -113
- package/esm2022/form/src/validation-summary.component.mjs +82 -81
- package/esm2022/form/src/validation.class.mjs +1 -1
- package/esm2022/image/acorex-components-image.mjs +4 -4
- package/esm2022/image/public-api.mjs +2 -2
- package/esm2022/image/src/image.component.mjs +80 -79
- package/esm2022/image/src/image.module.mjs +20 -19
- package/esm2022/label/acorex-components-label.mjs +4 -4
- package/esm2022/label/public-api.mjs +2 -2
- package/esm2022/label/src/label.component.mjs +49 -48
- package/esm2022/label/src/label.module.mjs +22 -21
- package/esm2022/loading/acorex-components-loading.mjs +4 -4
- package/esm2022/loading/public-api.mjs +5 -5
- package/esm2022/loading/src/loading-spinner.component.mjs +18 -17
- package/esm2022/loading/src/loading.component.mjs +58 -57
- package/esm2022/loading/src/loading.directive.mjs +77 -76
- package/esm2022/loading/src/loading.module.mjs +36 -35
- package/esm2022/loading/src/loading.service.mjs +159 -158
- package/esm2022/menu/acorex-components-menu.mjs +4 -4
- package/esm2022/menu/public-api.mjs +2 -2
- package/esm2022/menu/src/menu.component.mjs +347 -346
- package/esm2022/menu/src/menu.module.mjs +34 -33
- package/esm2022/mixin/acorex-components-mixin.mjs +4 -4
- package/esm2022/mixin/public-api.mjs +17 -17
- package/esm2022/mixin/src/base-components.class.mjs +111 -110
- package/esm2022/mixin/src/base-menu-mixin.class.mjs +133 -133
- package/esm2022/mixin/src/button-mixin.class.mjs +70 -70
- package/esm2022/mixin/src/clickable-mixin.class.mjs +23 -23
- package/esm2022/mixin/src/color-look-mixing.class.mjs +47 -47
- package/esm2022/mixin/src/constratctor.mjs +1 -1
- package/esm2022/mixin/src/datalist-component.class.mjs +150 -150
- package/esm2022/mixin/src/datalist.class.mjs +2 -2
- package/esm2022/mixin/src/dropdown-mixin.class.mjs +98 -98
- package/esm2022/mixin/src/interactive-mixin.class.mjs +80 -80
- package/esm2022/mixin/src/loading-mixin.class.mjs +25 -25
- package/esm2022/mixin/src/mixin.class.mjs +25 -25
- package/esm2022/mixin/src/page-component.class.mjs +10 -10
- package/esm2022/mixin/src/selection-component.class.mjs +182 -182
- package/esm2022/mixin/src/sizable-mixin.class.mjs +21 -21
- package/esm2022/mixin/src/textbox-mixin.class.mjs +65 -65
- package/esm2022/mixin/src/value-mixin.class.mjs +219 -219
- package/esm2022/notification/acorex-components-notification.mjs +4 -4
- package/esm2022/notification/public-api.mjs +4 -4
- package/esm2022/notification/src/notification.class.mjs +1 -1
- package/esm2022/notification/src/notification.component.mjs +93 -92
- package/esm2022/notification/src/notification.module.mjs +24 -23
- package/esm2022/notification/src/notification.service.mjs +110 -109
- package/esm2022/number-box/acorex-components-number-box.mjs +4 -4
- package/esm2022/number-box/public-api.mjs +2 -2
- package/esm2022/number-box/src/number-box.component.mjs +269 -268
- package/esm2022/number-box/src/number-box.module.mjs +36 -35
- package/esm2022/page/acorex-components-page.mjs +4 -4
- package/esm2022/page/public-api.mjs +3 -3
- package/esm2022/page/src/base-page.class.mjs +64 -63
- package/esm2022/page/src/page.component.mjs +47 -46
- package/esm2022/page/src/page.module.mjs +19 -18
- package/esm2022/password-box/acorex-components-password-box.mjs +4 -4
- package/esm2022/password-box/public-api.mjs +2 -2
- package/esm2022/password-box/src/password-box.component.mjs +64 -63
- package/esm2022/password-box/src/password-box.module.mjs +33 -32
- package/esm2022/picker/acorex-components-picker.mjs +4 -4
- package/esm2022/picker/public-api.mjs +3 -3
- package/esm2022/picker/src/picker-column.component.mjs +21 -20
- package/esm2022/picker/src/picker.component.mjs +17 -16
- package/esm2022/picker/src/picker.module.mjs +38 -37
- package/esm2022/popover/acorex-components-popover.mjs +4 -4
- package/esm2022/popover/public-api.mjs +2 -2
- package/esm2022/popover/src/popover.component.mjs +263 -262
- package/esm2022/popover/src/popover.module.mjs +20 -19
- package/esm2022/popup/acorex-components-popup.mjs +4 -4
- package/esm2022/popup/public-api.mjs +3 -3
- package/esm2022/popup/src/popup.component.mjs +146 -145
- package/esm2022/popup/src/popup.module.mjs +28 -27
- package/esm2022/popup/src/popup.service.mjs +117 -116
- package/esm2022/progress-bar/acorex-components-progress-bar.mjs +4 -4
- package/esm2022/progress-bar/public-api.mjs +2 -2
- package/esm2022/progress-bar/src/progress-bar.component.mjs +34 -33
- package/esm2022/progress-bar/src/progress-bar.module.mjs +20 -19
- package/esm2022/public-api.mjs +4 -4
- package/esm2022/radio/acorex-components-radio.mjs +4 -4
- package/esm2022/radio/public-api.mjs +2 -2
- package/esm2022/radio/src/radio.component.mjs +40 -39
- package/esm2022/radio/src/radio.module.mjs +23 -22
- package/esm2022/range-slider/acorex-components-range-slider.mjs +4 -4
- package/esm2022/range-slider/public-api.mjs +2 -2
- package/esm2022/range-slider/src/range-slider.component.mjs +118 -117
- package/esm2022/range-slider/src/range-slider.module.mjs +23 -22
- package/esm2022/rating/acorex-components-rating.mjs +4 -4
- package/esm2022/rating/public-api.mjs +2 -2
- package/esm2022/rating/src/rating.component.mjs +42 -41
- package/esm2022/rating/src/rating.component.module.mjs +20 -19
- package/esm2022/result/acorex-components-result.mjs +4 -4
- package/esm2022/result/public-api.mjs +2 -2
- package/esm2022/result/src/result.component.mjs +27 -26
- package/esm2022/result/src/result.module.mjs +20 -19
- package/esm2022/search-box/acorex-components-search-box.mjs +4 -4
- package/esm2022/search-box/public-api.mjs +2 -2
- package/esm2022/search-box/src/search-box.component.mjs +55 -54
- package/esm2022/search-box/src/search-box.module.mjs +26 -25
- package/esm2022/select-box/acorex-components-select-box.mjs +4 -4
- package/esm2022/select-box/public-api.mjs +2 -2
- package/esm2022/select-box/src/selectbox.component.mjs +392 -391
- package/esm2022/select-box/src/selectbox.module.mjs +65 -64
- package/esm2022/selection-list/acorex-components-selection-list.mjs +4 -4
- package/esm2022/selection-list/public-api.mjs +2 -2
- package/esm2022/selection-list/src/selection-list.component.mjs +60 -60
- package/esm2022/selection-list/src/selection-list.module.mjs +25 -24
- package/esm2022/switch/acorex-components-switch.mjs +4 -4
- package/esm2022/switch/public-api.mjs +3 -3
- package/esm2022/switch/src/switch-content.component.mjs +17 -16
- package/esm2022/switch/src/switch.component.mjs +55 -54
- package/esm2022/switch/src/switch.module.mjs +23 -22
- package/esm2022/tabs/acorex-components-tabs.mjs +4 -4
- package/esm2022/tabs/public-api.mjs +5 -5
- package/esm2022/tabs/src/tab-content.directive.mjs +32 -31
- package/esm2022/tabs/src/tab-item.component.mjs +91 -90
- package/esm2022/tabs/src/tabs.class.mjs +5 -5
- package/esm2022/tabs/src/tabs.component.mjs +103 -102
- package/esm2022/tabs/src/tabs.module.mjs +26 -25
- package/esm2022/tag/acorex-components-tag.mjs +4 -4
- package/esm2022/tag/public-api.mjs +2 -2
- package/esm2022/tag/src/tag.component.mjs +30 -29
- package/esm2022/tag/src/tag.module.mjs +20 -19
- package/esm2022/textarea/acorex-components-textarea.mjs +4 -4
- package/esm2022/textarea/public-api.mjs +2 -2
- package/esm2022/textarea/src/textarea.component.mjs +30 -29
- package/esm2022/textarea/src/textarea.module.mjs +20 -19
- package/esm2022/textbox/acorex-components-textbox.mjs +4 -4
- package/esm2022/textbox/public-api.mjs +3 -3
- package/esm2022/textbox/src/mask-options.directive.mjs +20 -19
- package/esm2022/textbox/src/textbox.component.mjs +96 -95
- package/esm2022/textbox/src/textbox.module.mjs +39 -38
- package/esm2022/time-box/acorex-components-time-box.mjs +4 -4
- package/esm2022/time-box/public-api.mjs +2 -2
- package/esm2022/time-box/src/time-box.component.mjs +306 -305
- package/esm2022/time-box/src/time-box.module.mjs +33 -32
- package/esm2022/toast/acorex-components-toast.mjs +4 -4
- package/esm2022/toast/public-api.mjs +4 -4
- package/esm2022/toast/src/toast.class.mjs +1 -1
- package/esm2022/toast/src/toast.component.mjs +68 -67
- package/esm2022/toast/src/toast.module.mjs +23 -22
- package/esm2022/toast/src/toast.service.mjs +137 -136
- package/esm2022/tooltip/acorex-components-tooltip.mjs +4 -4
- package/esm2022/tooltip/public-api.mjs +3 -3
- package/esm2022/tooltip/src/tooltip.component.mjs +22 -21
- package/esm2022/tooltip/src/tooltip.directive.mjs +164 -163
- package/esm2022/tooltip/src/tooltip.module.mjs +23 -22
- package/esm2022/tree-view/acorex-components-tree-view.mjs +4 -4
- package/esm2022/tree-view/public-api.mjs +2 -2
- package/esm2022/tree-view/src/tree-view.component.mjs +108 -107
- package/esm2022/tree-view/src/tree-view.module.mjs +21 -20
- package/esm2022/uploader/acorex-components-uploader.mjs +4 -4
- package/esm2022/uploader/public-api.mjs +2 -2
- package/esm2022/uploader/src/uploader.component.mjs +102 -101
- package/esm2022/uploader/src/uploader.module.mjs +21 -20
- package/fesm2022/acorex-components-action-sheet.mjs +170 -170
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +196 -196
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +66 -66
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +39 -39
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +78 -78
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +245 -245
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +815 -815
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-card.mjs +28 -28
- package/fesm2022/acorex-components-card.mjs.map +1 -1
- package/fesm2022/acorex-components-checkbox.mjs +51 -51
- package/fesm2022/acorex-components-checkbox.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +42 -42
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +102 -102
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +717 -717
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-color-picker.mjs +153 -153
- package/fesm2022/acorex-components-color-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +1150 -1150
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-context-menu.mjs +287 -287
- package/fesm2022/acorex-components-context-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +487 -487
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +205 -205
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-date-picker.mjs +256 -256
- package/fesm2022/acorex-components-date-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +287 -287
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +207 -207
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +174 -174
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +111 -111
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +392 -392
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +88 -88
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +59 -59
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +308 -308
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +359 -359
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-mixin.mjs +1214 -1214
- package/fesm2022/acorex-components-mixin.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +200 -200
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +284 -284
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +112 -112
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +81 -81
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +54 -54
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +266 -266
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +258 -258
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +43 -43
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +50 -50
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +127 -127
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rating.mjs +51 -51
- package/fesm2022/acorex-components-rating.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +35 -35
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +59 -59
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +422 -422
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +68 -69
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +74 -74
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +227 -227
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +38 -38
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-textarea.mjs +37 -37
- package/fesm2022/acorex-components-textarea.mjs.map +1 -1
- package/fesm2022/acorex-components-textbox.mjs +130 -130
- package/fesm2022/acorex-components-textbox.mjs.map +1 -1
- package/fesm2022/acorex-components-time-box.mjs +319 -319
- package/fesm2022/acorex-components-time-box.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +204 -204
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +187 -187
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +116 -116
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +109 -109
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs +5 -5
- package/form/index.d.ts +5 -5
- package/form/public-api.d.ts +6 -6
- package/form/src/form-field.component.d.ts +8 -8
- package/form/src/form.component.d.ts +51 -51
- package/form/src/form.module.d.ts +15 -15
- package/form/src/validation-rule.widget.d.ts +18 -18
- package/form/src/validation-summary.component.d.ts +23 -23
- package/form/src/validation.class.d.ts +18 -18
- package/image/index.d.ts +5 -5
- package/image/public-api.d.ts +2 -2
- package/image/src/image.component.d.ts +27 -27
- package/image/src/image.module.d.ts +8 -8
- package/index.d.ts +5 -5
- package/label/index.d.ts +5 -5
- package/label/public-api.d.ts +2 -2
- package/label/src/label.component.d.ts +17 -17
- package/label/src/label.module.d.ts +8 -8
- package/loading/index.d.ts +5 -5
- package/loading/public-api.d.ts +5 -5
- package/loading/src/loading-spinner.component.d.ts +6 -6
- package/loading/src/loading.component.d.ts +21 -21
- package/loading/src/loading.directive.d.ts +22 -22
- package/loading/src/loading.module.d.ts +13 -13
- package/loading/src/loading.service.d.ts +48 -48
- package/menu/index.d.ts +5 -5
- package/menu/public-api.d.ts +2 -2
- package/menu/src/menu.component.d.ts +39 -39
- package/menu/src/menu.module.d.ts +12 -12
- package/mixin/index.d.ts +5 -5
- package/mixin/public-api.d.ts +17 -17
- package/mixin/src/base-components.class.d.ts +84 -84
- package/mixin/src/base-menu-mixin.class.d.ts +53 -53
- package/mixin/src/button-mixin.class.d.ts +53 -53
- package/mixin/src/clickable-mixin.class.d.ts +36 -36
- package/mixin/src/color-look-mixing.class.d.ts +44 -44
- package/mixin/src/constratctor.d.ts +4 -4
- package/mixin/src/datalist-component.class.d.ts +59 -59
- package/mixin/src/datalist.class.d.ts +11 -11
- package/mixin/src/dropdown-mixin.class.d.ts +47 -47
- package/mixin/src/interactive-mixin.class.d.ts +63 -63
- package/mixin/src/loading-mixin.class.d.ts +40 -40
- package/mixin/src/mixin.class.d.ts +679 -679
- package/mixin/src/page-component.class.d.ts +28 -28
- package/mixin/src/selection-component.class.d.ts +61 -61
- package/mixin/src/sizable-mixin.class.d.ts +34 -34
- package/mixin/src/textbox-mixin.class.d.ts +72 -72
- package/mixin/src/value-mixin.class.d.ts +63 -63
- package/notification/index.d.ts +5 -5
- package/notification/public-api.d.ts +4 -4
- package/notification/src/notification.class.d.ts +18 -18
- package/notification/src/notification.component.d.ts +30 -30
- package/notification/src/notification.module.d.ts +10 -10
- package/notification/src/notification.service.d.ts +16 -16
- package/number-box/index.d.ts +5 -5
- package/number-box/public-api.d.ts +2 -2
- package/number-box/src/number-box.component.d.ts +77 -77
- package/number-box/src/number-box.module.d.ts +12 -12
- package/package.json +8 -8
- package/page/index.d.ts +5 -5
- package/page/public-api.d.ts +3 -3
- package/page/src/base-page.class.d.ts +25 -25
- package/page/src/page.component.d.ts +14 -14
- package/page/src/page.module.d.ts +6 -6
- package/password-box/index.d.ts +5 -5
- package/password-box/public-api.d.ts +2 -2
- package/password-box/src/password-box.component.d.ts +25 -25
- package/password-box/src/password-box.module.d.ts +11 -11
- package/picker/index.d.ts +5 -5
- package/picker/public-api.d.ts +3 -3
- package/picker/src/picker-column.component.d.ts +11 -11
- package/picker/src/picker.component.d.ts +10 -10
- package/picker/src/picker.module.d.ts +14 -14
- package/popover/index.d.ts +5 -5
- package/popover/public-api.d.ts +2 -2
- package/popover/src/popover.component.d.ts +51 -51
- package/popover/src/popover.module.d.ts +8 -8
- package/popup/index.d.ts +5 -5
- package/popup/public-api.d.ts +3 -3
- package/popup/src/popup.component.d.ts +45 -45
- package/popup/src/popup.module.d.ts +14 -14
- package/popup/src/popup.service.d.ts +42 -42
- package/progress-bar/index.d.ts +5 -5
- package/progress-bar/public-api.d.ts +2 -2
- package/progress-bar/src/progress-bar.component.d.ts +18 -18
- package/progress-bar/src/progress-bar.module.d.ts +8 -8
- package/public-api.d.ts +1 -1
- package/radio/index.d.ts +5 -5
- package/radio/public-api.d.ts +2 -2
- package/radio/src/radio.component.d.ts +18 -18
- package/radio/src/radio.module.d.ts +9 -9
- package/range-slider/index.d.ts +5 -5
- package/range-slider/public-api.d.ts +2 -2
- package/range-slider/src/range-slider.component.d.ts +41 -41
- package/range-slider/src/range-slider.module.d.ts +9 -9
- package/rating/index.d.ts +5 -5
- package/rating/public-api.d.ts +2 -2
- package/rating/src/rating.component.d.ts +21 -21
- package/rating/src/rating.component.module.d.ts +8 -8
- package/result/index.d.ts +5 -5
- package/result/public-api.d.ts +2 -2
- package/result/src/result.component.d.ts +12 -12
- package/result/src/result.module.d.ts +8 -8
- package/search-box/index.d.ts +5 -5
- package/search-box/public-api.d.ts +2 -2
- package/search-box/src/search-box.component.d.ts +18 -18
- package/search-box/src/search-box.module.d.ts +12 -12
- package/select-box/index.d.ts +5 -5
- package/select-box/public-api.d.ts +2 -2
- package/select-box/src/selectbox.component.d.ts +66 -66
- package/select-box/src/selectbox.module.d.ts +19 -19
- package/selection-list/index.d.ts +5 -5
- package/selection-list/public-api.d.ts +2 -2
- package/selection-list/src/selection-list.component.d.ts +23 -23
- package/selection-list/src/selection-list.module.d.ts +13 -13
- package/switch/index.d.ts +5 -5
- package/switch/public-api.d.ts +3 -3
- package/switch/src/switch-content.component.d.ts +8 -8
- package/switch/src/switch.component.d.ts +13 -13
- package/switch/src/switch.module.d.ts +11 -11
- package/tabs/index.d.ts +5 -5
- package/tabs/public-api.d.ts +5 -5
- package/tabs/src/tab-content.directive.d.ts +11 -11
- package/tabs/src/tab-item.component.d.ts +48 -48
- package/tabs/src/tabs.class.d.ts +7 -7
- package/tabs/src/tabs.component.d.ts +29 -29
- package/tabs/src/tabs.module.d.ts +12 -12
- package/tag/index.d.ts +5 -5
- package/tag/public-api.d.ts +2 -2
- package/tag/src/tag.component.d.ts +11 -11
- package/tag/src/tag.module.d.ts +8 -8
- package/textarea/index.d.ts +5 -5
- package/textarea/public-api.d.ts +2 -2
- package/textarea/src/textarea.component.d.ts +14 -14
- package/textarea/src/textarea.module.d.ts +9 -9
- package/textbox/index.d.ts +5 -5
- package/textbox/public-api.d.ts +3 -3
- package/textbox/src/mask-options.directive.d.ts +13 -13
- package/textbox/src/textbox.component.d.ts +27 -27
- package/textbox/src/textbox.module.d.ts +13 -13
- package/time-box/index.d.ts +5 -5
- package/time-box/public-api.d.ts +2 -2
- package/time-box/src/time-box.component.d.ts +50 -50
- package/time-box/src/time-box.module.d.ts +11 -11
- package/toast/index.d.ts +5 -5
- package/toast/public-api.d.ts +4 -4
- package/toast/src/toast.class.d.ts +15 -15
- package/toast/src/toast.component.d.ts +25 -25
- package/toast/src/toast.module.d.ts +9 -9
- package/toast/src/toast.service.d.ts +21 -21
- package/tooltip/index.d.ts +5 -5
- package/tooltip/public-api.d.ts +3 -3
- package/tooltip/src/tooltip.component.d.ts +11 -11
- package/tooltip/src/tooltip.directive.d.ts +22 -22
- package/tooltip/src/tooltip.module.d.ts +10 -10
- package/tree-view/index.d.ts +5 -5
- package/tree-view/public-api.d.ts +2 -2
- package/tree-view/src/tree-view.component.d.ts +33 -33
- package/tree-view/src/tree-view.module.d.ts +9 -9
- package/uploader/index.d.ts +5 -5
- package/uploader/public-api.d.ts +2 -2
- package/uploader/src/uploader.component.d.ts +28 -28
- package/uploader/src/uploader.module.d.ts +9 -9
@@ -11,212 +11,212 @@ import { AXButtonModule } from '@acorex/components/button';
|
|
11
11
|
import { AXConfig } from '@acorex/core/config';
|
12
12
|
import * as i1$1 from '@angular/cdk/overlay';
|
13
13
|
|
14
|
-
/**
|
15
|
-
* The Button is a component which detects user interaction and triggers a corresponding event
|
16
|
-
*
|
17
|
-
* @category Components
|
18
|
-
*/
|
19
|
-
class AXNotificationComponent extends AXBaseComponentMixin {
|
20
|
-
viewRef;
|
21
|
-
options;
|
22
|
-
_selectedPortal;
|
23
|
-
_icon;
|
24
|
-
close;
|
25
|
-
/**
|
26
|
-
* @ignore
|
27
|
-
*/
|
28
|
-
constructor(elementRef, cdr, viewRef) {
|
29
|
-
super(elementRef, cdr);
|
30
|
-
this.viewRef = viewRef;
|
31
|
-
}
|
32
|
-
onInit() {
|
33
|
-
this._initContent();
|
34
|
-
this._initIcon();
|
35
|
-
this._handleTimeOut();
|
36
|
-
}
|
37
|
-
_handleTimeOut() {
|
38
|
-
if (this.options.timeOut) {
|
39
|
-
setTimeout(() => {
|
40
|
-
this.close();
|
41
|
-
}, this.options.timeOut);
|
42
|
-
}
|
43
|
-
}
|
44
|
-
_initContent() {
|
45
|
-
if (this.options.content instanceof (TemplateRef)) {
|
46
|
-
this._selectedPortal = new TemplatePortal(this.options.content, this.viewRef);
|
47
|
-
this._cdr.markForCheck();
|
48
|
-
}
|
49
|
-
else if (typeof this.options.content === 'function') {
|
50
|
-
this._selectedPortal = new ComponentPortal(this.options.content);
|
51
|
-
this._cdr.markForCheck();
|
52
|
-
}
|
53
|
-
}
|
54
|
-
_initIcon() {
|
55
|
-
if (!this.options.icon) {
|
56
|
-
switch (this.options.color) {
|
57
|
-
case 'success':
|
58
|
-
this._icon = 'ax-icon ax-icon-check-circle-fill';
|
59
|
-
break;
|
60
|
-
case 'warning':
|
61
|
-
this._icon = 'ax-icon ax-icon-warning-fill';
|
62
|
-
break;
|
63
|
-
case 'danger':
|
64
|
-
this._icon = 'ax-icon ax-icon-error-fill';
|
65
|
-
break;
|
66
|
-
default:
|
67
|
-
this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';
|
68
|
-
break;
|
69
|
-
}
|
70
|
-
}
|
71
|
-
else {
|
72
|
-
this._icon = this.options.icon;
|
73
|
-
}
|
74
|
-
}
|
75
|
-
_handleButtonClick(button) {
|
76
|
-
if (button.onClick) {
|
77
|
-
button.onClick(this);
|
78
|
-
}
|
79
|
-
}
|
80
|
-
get __hostClass() {
|
81
|
-
return `ax-${this.options.color}`;
|
82
|
-
}
|
83
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
84
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: AXNotificationComponent, selector: "ax-notification", host: { properties: { "class": "this.__hostClass" } }, providers: [
|
85
|
-
{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent },
|
86
|
-
], usesInheritance: true, ngImport: i0, template: "<span [class]=\"'ax-notification-icon' + ' ' + _icon\"></span>\r\n<div class=\"ax-notification-content\">\r\n <div class=\"ax-notification-title\">{{ options.title }}</div>\r\n <ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n </ng-template>\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n <div *ngIf=\"!_selectedPortal\">{{ options.content }}</div>\r\n <div class=\"ax-notification-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <ax-button\r\n *ngFor=\"let button of options.buttons\"\r\n class=\"ax-xs\"\r\n [text]=\"button.text\"\r\n [color]=\"button.color\"\r\n [look]=\"button.look\"\r\n (onClick)=\"_handleButtonClick(button)\">\r\n {{ button.text }}\r\n </ax-button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div\r\n class=\"ax-notification-progress\"\r\n [style.animation-duration.ms]=\"options.timeOut\"\r\n *ngIf=\"options.timeOut\"></div>\r\n", styles: [".ax-dark ax-notification{background-color:rgba(var(--ax-color-on-surface))}ax-notification{width:max(20vw,380px);display:flex;padding:1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;border:1px solid;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}ax-notification.ax-primary .ax-notification-icon{color:rgba(var(--ax-color-primary-500))}ax-notification.ax-primary .ax-notification-progress{background-color:rgba(var(--ax-color-primary-500))}ax-notification.ax-secondary .ax-notification-icon{color:rgba(var(--ax-color-secondary-500))}ax-notification.ax-secondary .ax-notification-progress{background-color:rgba(var(--ax-color-secondary-500))}ax-notification.ax-success .ax-notification-icon{color:rgba(var(--ax-color-success-500))}ax-notification.ax-success .ax-notification-progress{background-color:rgba(var(--ax-color-success-500))}ax-notification.ax-warning .ax-notification-icon{color:rgba(var(--ax-color-warning-500))}ax-notification.ax-warning .ax-notification-progress{background-color:rgba(var(--ax-color-warning-500))}ax-notification.ax-danger .ax-notification-icon{color:rgba(var(--ax-color-danger-500))}ax-notification.ax-danger .ax-notification-progress{background-color:rgba(var(--ax-color-danger-500))}ax-notification.ax-info .ax-notification-icon{color:rgba(var(--ax-color-info-500))}ax-notification.ax-info .ax-notification-progress{background-color:rgba(var(--ax-color-info-500))}@media (max-width: 599px){ax-notification{width:98vw}}ax-notification .ax-notification-icon,ax-notification .ax-icon-close{font-size:1.25rem}ax-notification .ax-notification-icon{padding-inline-end:.75rem}ax-notification .ax-notification-content{display:flex;flex-direction:column;flex:1;color:rgba(var(--ax-color-surface-fore));font-weight:400}ax-notification .ax-notification-content .ax-notification-title{font-weight:500;margin-bottom:.25rem;color:rgba(var(--ax-color-surface-fore))}ax-notification .ax-notification-content .ax-notification-buttons{margin-top:.75rem;display:flex;gap:.75rem}ax-notification .ax-icon-close{cursor:pointer;height:-moz-fit-content;height:fit-content;color:rgba(var(--ax-color-surface-fore))}ax-notification .ax-icon-close:hover{opacity:.6}ax-notification .ax-notification-progress{position:absolute;right:0;left:0;bottom:0;height:.25rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:rgba(var(--ax-color-border-default))}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
87
|
-
}
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationComponent, decorators: [{
|
89
|
-
type: Component,
|
90
|
-
args: [{ selector: 'ax-notification', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
91
|
-
{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent },
|
92
|
-
], template: "<span [class]=\"'ax-notification-icon' + ' ' + _icon\"></span>\r\n<div class=\"ax-notification-content\">\r\n <div class=\"ax-notification-title\">{{ options.title }}</div>\r\n <ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n </ng-template>\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n <div *ngIf=\"!_selectedPortal\">{{ options.content }}</div>\r\n <div class=\"ax-notification-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <ax-button\r\n *ngFor=\"let button of options.buttons\"\r\n class=\"ax-xs\"\r\n [text]=\"button.text\"\r\n [color]=\"button.color\"\r\n [look]=\"button.look\"\r\n (onClick)=\"_handleButtonClick(button)\">\r\n {{ button.text }}\r\n </ax-button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div\r\n class=\"ax-notification-progress\"\r\n [style.animation-duration.ms]=\"options.timeOut\"\r\n *ngIf=\"options.timeOut\"></div>\r\n", styles: [".ax-dark ax-notification{background-color:rgba(var(--ax-color-on-surface))}ax-notification{width:max(20vw,380px);display:flex;padding:1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;border:1px solid;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}ax-notification.ax-primary .ax-notification-icon{color:rgba(var(--ax-color-primary-500))}ax-notification.ax-primary .ax-notification-progress{background-color:rgba(var(--ax-color-primary-500))}ax-notification.ax-secondary .ax-notification-icon{color:rgba(var(--ax-color-secondary-500))}ax-notification.ax-secondary .ax-notification-progress{background-color:rgba(var(--ax-color-secondary-500))}ax-notification.ax-success .ax-notification-icon{color:rgba(var(--ax-color-success-500))}ax-notification.ax-success .ax-notification-progress{background-color:rgba(var(--ax-color-success-500))}ax-notification.ax-warning .ax-notification-icon{color:rgba(var(--ax-color-warning-500))}ax-notification.ax-warning .ax-notification-progress{background-color:rgba(var(--ax-color-warning-500))}ax-notification.ax-danger .ax-notification-icon{color:rgba(var(--ax-color-danger-500))}ax-notification.ax-danger .ax-notification-progress{background-color:rgba(var(--ax-color-danger-500))}ax-notification.ax-info .ax-notification-icon{color:rgba(var(--ax-color-info-500))}ax-notification.ax-info .ax-notification-progress{background-color:rgba(var(--ax-color-info-500))}@media (max-width: 599px){ax-notification{width:98vw}}ax-notification .ax-notification-icon,ax-notification .ax-icon-close{font-size:1.25rem}ax-notification .ax-notification-icon{padding-inline-end:.75rem}ax-notification .ax-notification-content{display:flex;flex-direction:column;flex:1;color:rgba(var(--ax-color-surface-fore));font-weight:400}ax-notification .ax-notification-content .ax-notification-title{font-weight:500;margin-bottom:.25rem;color:rgba(var(--ax-color-surface-fore))}ax-notification .ax-notification-content .ax-notification-buttons{margin-top:.75rem;display:flex;gap:.75rem}ax-notification .ax-icon-close{cursor:pointer;height:-moz-fit-content;height:fit-content;color:rgba(var(--ax-color-surface-fore))}ax-notification .ax-icon-close:hover{opacity:.6}ax-notification .ax-notification-progress{position:absolute;right:0;left:0;bottom:0;height:.25rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:rgba(var(--ax-color-border-default))}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"] }]
|
93
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { __hostClass: [{
|
94
|
-
type: HostBinding,
|
95
|
-
args: ['class']
|
14
|
+
/**
|
15
|
+
* The Button is a component which detects user interaction and triggers a corresponding event
|
16
|
+
*
|
17
|
+
* @category Components
|
18
|
+
*/
|
19
|
+
class AXNotificationComponent extends AXBaseComponentMixin {
|
20
|
+
viewRef;
|
21
|
+
options;
|
22
|
+
_selectedPortal;
|
23
|
+
_icon;
|
24
|
+
close;
|
25
|
+
/**
|
26
|
+
* @ignore
|
27
|
+
*/
|
28
|
+
constructor(elementRef, cdr, viewRef) {
|
29
|
+
super(elementRef, cdr);
|
30
|
+
this.viewRef = viewRef;
|
31
|
+
}
|
32
|
+
onInit() {
|
33
|
+
this._initContent();
|
34
|
+
this._initIcon();
|
35
|
+
this._handleTimeOut();
|
36
|
+
}
|
37
|
+
_handleTimeOut() {
|
38
|
+
if (this.options.timeOut) {
|
39
|
+
setTimeout(() => {
|
40
|
+
this.close();
|
41
|
+
}, this.options.timeOut);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
_initContent() {
|
45
|
+
if (this.options.content instanceof (TemplateRef)) {
|
46
|
+
this._selectedPortal = new TemplatePortal(this.options.content, this.viewRef);
|
47
|
+
this._cdr.markForCheck();
|
48
|
+
}
|
49
|
+
else if (typeof this.options.content === 'function') {
|
50
|
+
this._selectedPortal = new ComponentPortal(this.options.content);
|
51
|
+
this._cdr.markForCheck();
|
52
|
+
}
|
53
|
+
}
|
54
|
+
_initIcon() {
|
55
|
+
if (!this.options.icon) {
|
56
|
+
switch (this.options.color) {
|
57
|
+
case 'success':
|
58
|
+
this._icon = 'ax-icon ax-icon-check-circle-fill';
|
59
|
+
break;
|
60
|
+
case 'warning':
|
61
|
+
this._icon = 'ax-icon ax-icon-warning-fill';
|
62
|
+
break;
|
63
|
+
case 'danger':
|
64
|
+
this._icon = 'ax-icon ax-icon-error-fill';
|
65
|
+
break;
|
66
|
+
default:
|
67
|
+
this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';
|
68
|
+
break;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
this._icon = this.options.icon;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
_handleButtonClick(button) {
|
76
|
+
if (button.onClick) {
|
77
|
+
button.onClick(this);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
get __hostClass() {
|
81
|
+
return `ax-${this.options.color}`;
|
82
|
+
}
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
84
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: AXNotificationComponent, selector: "ax-notification", host: { properties: { "class": "this.__hostClass" } }, providers: [
|
85
|
+
{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent },
|
86
|
+
], usesInheritance: true, ngImport: i0, template: "<span [class]=\"'ax-notification-icon' + ' ' + _icon\"></span>\r\n<div class=\"ax-notification-content\">\r\n <div class=\"ax-notification-title\">{{ options.title }}</div>\r\n <ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n </ng-template>\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n <div *ngIf=\"!_selectedPortal\">{{ options.content }}</div>\r\n <div class=\"ax-notification-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <ax-button\r\n *ngFor=\"let button of options.buttons\"\r\n class=\"ax-xs\"\r\n [text]=\"button.text\"\r\n [color]=\"button.color\"\r\n [look]=\"button.look\"\r\n (onClick)=\"_handleButtonClick(button)\">\r\n {{ button.text }}\r\n </ax-button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div\r\n class=\"ax-notification-progress\"\r\n [style.animation-duration.ms]=\"options.timeOut\"\r\n *ngIf=\"options.timeOut\"></div>\r\n", styles: [".ax-dark ax-notification{background-color:rgba(var(--ax-color-on-surface))}ax-notification{width:max(20vw,380px);display:flex;padding:1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;border:1px solid;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}ax-notification.ax-primary .ax-notification-icon{color:rgba(var(--ax-color-primary-500))}ax-notification.ax-primary .ax-notification-progress{background-color:rgba(var(--ax-color-primary-500))}ax-notification.ax-secondary .ax-notification-icon{color:rgba(var(--ax-color-secondary-500))}ax-notification.ax-secondary .ax-notification-progress{background-color:rgba(var(--ax-color-secondary-500))}ax-notification.ax-success .ax-notification-icon{color:rgba(var(--ax-color-success-500))}ax-notification.ax-success .ax-notification-progress{background-color:rgba(var(--ax-color-success-500))}ax-notification.ax-warning .ax-notification-icon{color:rgba(var(--ax-color-warning-500))}ax-notification.ax-warning .ax-notification-progress{background-color:rgba(var(--ax-color-warning-500))}ax-notification.ax-danger .ax-notification-icon{color:rgba(var(--ax-color-danger-500))}ax-notification.ax-danger .ax-notification-progress{background-color:rgba(var(--ax-color-danger-500))}ax-notification.ax-info .ax-notification-icon{color:rgba(var(--ax-color-info-500))}ax-notification.ax-info .ax-notification-progress{background-color:rgba(var(--ax-color-info-500))}@media (max-width: 599px){ax-notification{width:98vw}}ax-notification .ax-notification-icon,ax-notification .ax-icon-close{font-size:1.25rem}ax-notification .ax-notification-icon{padding-inline-end:.75rem}ax-notification .ax-notification-content{display:flex;flex-direction:column;flex:1;color:rgba(var(--ax-color-surface-fore));font-weight:400}ax-notification .ax-notification-content .ax-notification-title{font-weight:500;margin-bottom:.25rem;color:rgba(var(--ax-color-surface-fore))}ax-notification .ax-notification-content .ax-notification-buttons{margin-top:.75rem;display:flex;gap:.75rem}ax-notification .ax-icon-close{cursor:pointer;height:-moz-fit-content;height:fit-content;color:rgba(var(--ax-color-surface-fore))}ax-notification .ax-icon-close:hover{opacity:.6}ax-notification .ax-notification-progress{position:absolute;right:0;left:0;bottom:0;height:.25rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:rgba(var(--ax-color-border-default))}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
87
|
+
}
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationComponent, decorators: [{
|
89
|
+
type: Component,
|
90
|
+
args: [{ selector: 'ax-notification', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
91
|
+
{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent },
|
92
|
+
], template: "<span [class]=\"'ax-notification-icon' + ' ' + _icon\"></span>\r\n<div class=\"ax-notification-content\">\r\n <div class=\"ax-notification-title\">{{ options.title }}</div>\r\n <ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n </ng-template>\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n <div *ngIf=\"!_selectedPortal\">{{ options.content }}</div>\r\n <div class=\"ax-notification-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <ax-button\r\n *ngFor=\"let button of options.buttons\"\r\n class=\"ax-xs\"\r\n [text]=\"button.text\"\r\n [color]=\"button.color\"\r\n [look]=\"button.look\"\r\n (onClick)=\"_handleButtonClick(button)\">\r\n {{ button.text }}\r\n </ax-button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div\r\n class=\"ax-notification-progress\"\r\n [style.animation-duration.ms]=\"options.timeOut\"\r\n *ngIf=\"options.timeOut\"></div>\r\n", styles: [".ax-dark ax-notification{background-color:rgba(var(--ax-color-on-surface))}ax-notification{width:max(20vw,380px);display:flex;padding:1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;border:1px solid;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}ax-notification.ax-primary .ax-notification-icon{color:rgba(var(--ax-color-primary-500))}ax-notification.ax-primary .ax-notification-progress{background-color:rgba(var(--ax-color-primary-500))}ax-notification.ax-secondary .ax-notification-icon{color:rgba(var(--ax-color-secondary-500))}ax-notification.ax-secondary .ax-notification-progress{background-color:rgba(var(--ax-color-secondary-500))}ax-notification.ax-success .ax-notification-icon{color:rgba(var(--ax-color-success-500))}ax-notification.ax-success .ax-notification-progress{background-color:rgba(var(--ax-color-success-500))}ax-notification.ax-warning .ax-notification-icon{color:rgba(var(--ax-color-warning-500))}ax-notification.ax-warning .ax-notification-progress{background-color:rgba(var(--ax-color-warning-500))}ax-notification.ax-danger .ax-notification-icon{color:rgba(var(--ax-color-danger-500))}ax-notification.ax-danger .ax-notification-progress{background-color:rgba(var(--ax-color-danger-500))}ax-notification.ax-info .ax-notification-icon{color:rgba(var(--ax-color-info-500))}ax-notification.ax-info .ax-notification-progress{background-color:rgba(var(--ax-color-info-500))}@media (max-width: 599px){ax-notification{width:98vw}}ax-notification .ax-notification-icon,ax-notification .ax-icon-close{font-size:1.25rem}ax-notification .ax-notification-icon{padding-inline-end:.75rem}ax-notification .ax-notification-content{display:flex;flex-direction:column;flex:1;color:rgba(var(--ax-color-surface-fore));font-weight:400}ax-notification .ax-notification-content .ax-notification-title{font-weight:500;margin-bottom:.25rem;color:rgba(var(--ax-color-surface-fore))}ax-notification .ax-notification-content .ax-notification-buttons{margin-top:.75rem;display:flex;gap:.75rem}ax-notification .ax-icon-close{cursor:pointer;height:-moz-fit-content;height:fit-content;color:rgba(var(--ax-color-surface-fore))}ax-notification .ax-icon-close:hover{opacity:.6}ax-notification .ax-notification-progress{position:absolute;right:0;left:0;bottom:0;height:.25rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:rgba(var(--ax-color-border-default))}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"] }]
|
93
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { __hostClass: [{
|
94
|
+
type: HostBinding,
|
95
|
+
args: ['class']
|
96
96
|
}] } });
|
97
97
|
|
98
|
-
const COMPONENT = [AXNotificationComponent];
|
99
|
-
const MODULES = [CommonModule, PortalModule, AXButtonModule];
|
100
|
-
class AXNotificationModule {
|
101
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
102
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationModule, declarations: [AXNotificationComponent], imports: [CommonModule, PortalModule, AXButtonModule], exports: [AXNotificationComponent] });
|
103
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationModule, imports: [MODULES] });
|
104
|
-
}
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationModule, decorators: [{
|
106
|
-
type: NgModule,
|
107
|
-
args: [{
|
108
|
-
declarations: [...COMPONENT],
|
109
|
-
imports: [...MODULES],
|
110
|
-
exports: [...COMPONENT],
|
111
|
-
providers: [],
|
112
|
-
}]
|
98
|
+
const COMPONENT = [AXNotificationComponent];
|
99
|
+
const MODULES = [CommonModule, PortalModule, AXButtonModule];
|
100
|
+
class AXNotificationModule {
|
101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
102
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationModule, declarations: [AXNotificationComponent], imports: [CommonModule, PortalModule, AXButtonModule], exports: [AXNotificationComponent] });
|
103
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationModule, imports: [MODULES] });
|
104
|
+
}
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationModule, decorators: [{
|
106
|
+
type: NgModule,
|
107
|
+
args: [{
|
108
|
+
declarations: [...COMPONENT],
|
109
|
+
imports: [...MODULES],
|
110
|
+
exports: [...COMPONENT],
|
111
|
+
providers: [],
|
112
|
+
}]
|
113
113
|
}] });
|
114
114
|
|
115
|
-
class AXNotificationService {
|
116
|
-
overlayService;
|
117
|
-
parentInjector;
|
118
|
-
_defaults = {
|
119
|
-
gap: 5,
|
120
|
-
location: 'top-end',
|
121
|
-
};
|
122
|
-
constructor(overlayService, parentInjector) {
|
123
|
-
this.overlayService = overlayService;
|
124
|
-
this.parentInjector = parentInjector;
|
125
|
-
}
|
126
|
-
_activeList = [];
|
127
|
-
show(options) {
|
128
|
-
const opt = Object.assign({
|
129
|
-
closeable: true,
|
130
|
-
location: AXConfig.get('notification.location') || this._defaults.location,
|
131
|
-
}, options);
|
132
|
-
const gap = AXConfig.get('notification.gap') || this._defaults.gap;
|
133
|
-
let positionStrategy = this.overlayService.position().global();
|
134
|
-
const pos = this.getPosition(opt.location) + gap + 'px';
|
135
|
-
switch (opt.location) {
|
136
|
-
case 'bottom-center':
|
137
|
-
positionStrategy = positionStrategy.bottom(pos).centerHorizontally();
|
138
|
-
break;
|
139
|
-
case 'bottom-end':
|
140
|
-
positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');
|
141
|
-
break;
|
142
|
-
case 'bottom-start':
|
143
|
-
positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');
|
144
|
-
break;
|
145
|
-
case 'top-center':
|
146
|
-
positionStrategy = positionStrategy.top(pos).centerHorizontally();
|
147
|
-
break;
|
148
|
-
case 'top-end':
|
149
|
-
positionStrategy = positionStrategy.top(pos).right(gap + 'px');
|
150
|
-
break;
|
151
|
-
case 'top-start':
|
152
|
-
positionStrategy = positionStrategy.top(pos).left(gap + 'px');
|
153
|
-
break;
|
154
|
-
case 'center-start':
|
155
|
-
positionStrategy = positionStrategy.centerVertically().left(gap + 'px');
|
156
|
-
break;
|
157
|
-
case 'center-end':
|
158
|
-
positionStrategy = positionStrategy
|
159
|
-
.centerVertically()
|
160
|
-
.right(gap + 'px');
|
161
|
-
break;
|
162
|
-
default:
|
163
|
-
break;
|
164
|
-
}
|
165
|
-
const overlayRef = this.overlayService.create({
|
166
|
-
positionStrategy,
|
167
|
-
panelClass: [
|
168
|
-
'ax-animate-animated',
|
169
|
-
'ax-animate-fadeIn',
|
170
|
-
'ax-animate-faster',
|
171
|
-
],
|
172
|
-
});
|
173
|
-
const notificationPortal = new ComponentPortal(AXNotificationComponent, null, this.parentInjector);
|
174
|
-
const host = overlayRef.attach(notificationPortal);
|
175
|
-
host.instance.visibleIndex = this._activeList.length;
|
176
|
-
this._activeList.push(host.instance);
|
177
|
-
if (host.instance) {
|
178
|
-
Object.assign(host.instance, {
|
179
|
-
options: opt,
|
180
|
-
close: () => {
|
181
|
-
this._activeList = this._activeList.filter(c => c != host.instance);
|
182
|
-
overlayRef.dispose();
|
183
|
-
},
|
184
|
-
});
|
185
|
-
setTimeout(() => {
|
186
|
-
host.changeDetectorRef.detectChanges();
|
187
|
-
}, 0);
|
188
|
-
}
|
189
|
-
return {
|
190
|
-
close: () => {
|
191
|
-
host.instance.close();
|
192
|
-
},
|
193
|
-
};
|
194
|
-
}
|
195
|
-
hideAll() {
|
196
|
-
this._activeList.forEach(c => c.close());
|
197
|
-
}
|
198
|
-
getPosition(location) {
|
199
|
-
const list = this._activeList.filter(c => c.options.location == location);
|
200
|
-
if (list.length == 0)
|
201
|
-
return 0;
|
202
|
-
if (location.split('-')[0] == 'bottom') {
|
203
|
-
return (window.innerHeight - list[list.length - 1]._getHostElement().offsetTop);
|
204
|
-
}
|
205
|
-
else {
|
206
|
-
return (list[list.length - 1]._getHostElement().offsetTop +
|
207
|
-
list[list.length - 1]._getHostElement().offsetHeight);
|
208
|
-
}
|
209
|
-
}
|
210
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
211
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationService, providedIn: 'root' });
|
212
|
-
}
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationService, decorators: [{
|
214
|
-
type: Injectable,
|
215
|
-
args: [{ providedIn: 'root' }]
|
115
|
+
class AXNotificationService {
|
116
|
+
overlayService;
|
117
|
+
parentInjector;
|
118
|
+
_defaults = {
|
119
|
+
gap: 5,
|
120
|
+
location: 'top-end',
|
121
|
+
};
|
122
|
+
constructor(overlayService, parentInjector) {
|
123
|
+
this.overlayService = overlayService;
|
124
|
+
this.parentInjector = parentInjector;
|
125
|
+
}
|
126
|
+
_activeList = [];
|
127
|
+
show(options) {
|
128
|
+
const opt = Object.assign({
|
129
|
+
closeable: true,
|
130
|
+
location: AXConfig.get('notification.location') || this._defaults.location,
|
131
|
+
}, options);
|
132
|
+
const gap = AXConfig.get('notification.gap') || this._defaults.gap;
|
133
|
+
let positionStrategy = this.overlayService.position().global();
|
134
|
+
const pos = this.getPosition(opt.location) + gap + 'px';
|
135
|
+
switch (opt.location) {
|
136
|
+
case 'bottom-center':
|
137
|
+
positionStrategy = positionStrategy.bottom(pos).centerHorizontally();
|
138
|
+
break;
|
139
|
+
case 'bottom-end':
|
140
|
+
positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');
|
141
|
+
break;
|
142
|
+
case 'bottom-start':
|
143
|
+
positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');
|
144
|
+
break;
|
145
|
+
case 'top-center':
|
146
|
+
positionStrategy = positionStrategy.top(pos).centerHorizontally();
|
147
|
+
break;
|
148
|
+
case 'top-end':
|
149
|
+
positionStrategy = positionStrategy.top(pos).right(gap + 'px');
|
150
|
+
break;
|
151
|
+
case 'top-start':
|
152
|
+
positionStrategy = positionStrategy.top(pos).left(gap + 'px');
|
153
|
+
break;
|
154
|
+
case 'center-start':
|
155
|
+
positionStrategy = positionStrategy.centerVertically().left(gap + 'px');
|
156
|
+
break;
|
157
|
+
case 'center-end':
|
158
|
+
positionStrategy = positionStrategy
|
159
|
+
.centerVertically()
|
160
|
+
.right(gap + 'px');
|
161
|
+
break;
|
162
|
+
default:
|
163
|
+
break;
|
164
|
+
}
|
165
|
+
const overlayRef = this.overlayService.create({
|
166
|
+
positionStrategy,
|
167
|
+
panelClass: [
|
168
|
+
'ax-animate-animated',
|
169
|
+
'ax-animate-fadeIn',
|
170
|
+
'ax-animate-faster',
|
171
|
+
],
|
172
|
+
});
|
173
|
+
const notificationPortal = new ComponentPortal(AXNotificationComponent, null, this.parentInjector);
|
174
|
+
const host = overlayRef.attach(notificationPortal);
|
175
|
+
host.instance.visibleIndex = this._activeList.length;
|
176
|
+
this._activeList.push(host.instance);
|
177
|
+
if (host.instance) {
|
178
|
+
Object.assign(host.instance, {
|
179
|
+
options: opt,
|
180
|
+
close: () => {
|
181
|
+
this._activeList = this._activeList.filter(c => c != host.instance);
|
182
|
+
overlayRef.dispose();
|
183
|
+
},
|
184
|
+
});
|
185
|
+
setTimeout(() => {
|
186
|
+
host.changeDetectorRef.detectChanges();
|
187
|
+
}, 0);
|
188
|
+
}
|
189
|
+
return {
|
190
|
+
close: () => {
|
191
|
+
host.instance.close();
|
192
|
+
},
|
193
|
+
};
|
194
|
+
}
|
195
|
+
hideAll() {
|
196
|
+
this._activeList.forEach(c => c.close());
|
197
|
+
}
|
198
|
+
getPosition(location) {
|
199
|
+
const list = this._activeList.filter(c => c.options.location == location);
|
200
|
+
if (list.length == 0)
|
201
|
+
return 0;
|
202
|
+
if (location.split('-')[0] == 'bottom') {
|
203
|
+
return (window.innerHeight - list[list.length - 1]._getHostElement().offsetTop);
|
204
|
+
}
|
205
|
+
else {
|
206
|
+
return (list[list.length - 1]._getHostElement().offsetTop +
|
207
|
+
list[list.length - 1]._getHostElement().offsetHeight);
|
208
|
+
}
|
209
|
+
}
|
210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
211
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationService, providedIn: 'root' });
|
212
|
+
}
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNotificationService, decorators: [{
|
214
|
+
type: Injectable,
|
215
|
+
args: [{ providedIn: 'root' }]
|
216
216
|
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }]; } });
|
217
217
|
|
218
|
-
/**
|
219
|
-
* Generated bundle index. Do not edit.
|
218
|
+
/**
|
219
|
+
* Generated bundle index. Do not edit.
|
220
220
|
*/
|
221
221
|
|
222
222
|
export { AXNotificationComponent, AXNotificationModule, AXNotificationService };
|
@@ -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';\r\nimport { AXButtonItem } from '@acorex/components/button';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n HostBinding,\r\n TemplateRef,\r\n ViewContainerRef,\r\n} from '@angular/core';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXNotificationOptions } from './notification.class';\r\nimport { ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-notification',\r\n templateUrl: './notification.component.html',\r\n styleUrls: ['./notification.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n { provide: AXClosbaleComponent, useExisting: AXNotificationComponent },\r\n ],\r\n})\r\nexport class AXNotificationComponent extends AXBaseComponentMixin {\r\n options: AXNotificationOptions;\r\n _selectedPortal: Portal<any>;\r\n _icon: string;\r\n\r\n close: () => void;\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef,\r\n private viewRef: ViewContainerRef\r\n ) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n this._initContent();\r\n this._initIcon();\r\n this._handleTimeOut();\r\n }\r\n\r\n private _handleTimeOut() {\r\n if (this.options.timeOut) {\r\n setTimeout(() => {\r\n this.close();\r\n }, this.options.timeOut);\r\n }\r\n }\r\n private _initContent() {\r\n if (this.options.content instanceof TemplateRef<any>) {\r\n this._selectedPortal = new TemplatePortal(\r\n this.options.content as TemplateRef<any>,\r\n this.viewRef\r\n );\r\n this._cdr.markForCheck();\r\n } else if (typeof this.options.content === 'function') {\r\n this._selectedPortal = new ComponentPortal(this.options.content as any);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n\r\n private _initIcon() {\r\n if (!this.options.icon) {\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n default:\r\n this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n } else {\r\n this._icon = this.options.icon;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.options.color}`;\r\n }\r\n}\r\n","<span [class]=\"'ax-notification-icon' + ' ' + _icon\"></span>\r\n<div class=\"ax-notification-content\">\r\n <div class=\"ax-notification-title\">{{ options.title }}</div>\r\n <ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n </ng-template>\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n <div *ngIf=\"!_selectedPortal\">{{ options.content }}</div>\r\n <div class=\"ax-notification-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <ax-button\r\n *ngFor=\"let button of options.buttons\"\r\n class=\"ax-xs\"\r\n [text]=\"button.text\"\r\n [color]=\"button.color\"\r\n [look]=\"button.look\"\r\n (onClick)=\"_handleButtonClick(button)\">\r\n {{ button.text }}\r\n </ax-button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div\r\n class=\"ax-notification-progress\"\r\n [style.animation-duration.ms]=\"options.timeOut\"\r\n *ngIf=\"options.timeOut\"></div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXNotificationComponent } from './notification.component';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nconst COMPONENT = [AXNotificationComponent];\r\nconst MODULES = [CommonModule, PortalModule, AXButtonModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXNotificationModule {}\r\n","import { AXConfig } from '@acorex/core/config';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector, TemplateRef } from '@angular/core';\r\nimport { AXNotificationOptions, AXNotificationRef } from './notification.class';\r\nimport { AXNotificationComponent } from './notification.component';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXNotificationService {\r\n private readonly _defaults = {\r\n gap: 5,\r\n location: 'top-end',\r\n };\r\n\r\n constructor(\r\n private overlayService: Overlay,\r\n private parentInjector: Injector\r\n ) {}\r\n\r\n private _activeList: AXNotificationComponent[] = [];\r\n\r\n show(options: AXNotificationOptions): AXNotificationRef {\r\n const opt = Object.assign(\r\n {\r\n closeable: true,\r\n location:\r\n AXConfig.get('notification.location') || this._defaults.location,\r\n },\r\n options\r\n );\r\n const gap = AXConfig.get('notification.gap') || this._defaults.gap;\r\n\r\n let positionStrategy = this.overlayService.position().global();\r\n const pos = this.getPosition(opt.location) + gap + 'px';\r\n switch (opt.location) {\r\n case 'bottom-center':\r\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally();\r\n break;\r\n case 'bottom-end':\r\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\r\n break;\r\n case 'bottom-start':\r\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\r\n break;\r\n case 'top-center':\r\n positionStrategy = positionStrategy.top(pos).centerHorizontally();\r\n break;\r\n case 'top-end':\r\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\r\n break;\r\n case 'top-start':\r\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\r\n break;\r\n case 'center-start':\r\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\r\n break;\r\n case 'center-end':\r\n positionStrategy = positionStrategy\r\n .centerVertically()\r\n .right(gap + 'px');\r\n break;\r\n default:\r\n break;\r\n }\r\n const overlayRef = this.overlayService.create({\r\n positionStrategy,\r\n panelClass: [\r\n 'ax-animate-animated',\r\n 'ax-animate-fadeIn',\r\n 'ax-animate-faster',\r\n ],\r\n });\r\n const notificationPortal = new ComponentPortal(\r\n AXNotificationComponent,\r\n null,\r\n this.parentInjector\r\n );\r\n\r\n const host = overlayRef.attach(notificationPortal);\r\n (host.instance as any).visibleIndex = this._activeList.length;\r\n this._activeList.push(host.instance);\r\n if (host.instance) {\r\n Object.assign(host.instance, {\r\n options: opt,\r\n close: () => {\r\n this._activeList = this._activeList.filter(c => c != host.instance);\r\n overlayRef.dispose();\r\n },\r\n });\r\n setTimeout(() => {\r\n host.changeDetectorRef.detectChanges();\r\n }, 0);\r\n }\r\n\r\n return {\r\n close: () => {\r\n host.instance.close();\r\n },\r\n };\r\n }\r\n\r\n public hideAll() {\r\n this._activeList.forEach(c => c.close());\r\n }\r\n\r\n private getPosition(location: string) {\r\n const list = this._activeList.filter(c => c.options.location == location);\r\n if (list.length == 0) return 0;\r\n if (location.split('-')[0] == 'bottom') {\r\n return (\r\n window.innerHeight - list[list.length - 1]._getHostElement().offsetTop\r\n );\r\n } else {\r\n return (\r\n list[list.length - 1]._getHostElement().offsetTop +\r\n list[list.length - 1]._getHostElement().offsetHeight\r\n );\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAgBA;;;;AAIG;AAWG,MAAO,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,KAA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G,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,SAAS;AACjD,gBAAA,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,YAAY,EACpD;AACH,SAAA;KACF;uGA9GU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArB,IAAA,OAAA,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;;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":["../../../../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';\r\nimport { AXButtonItem } from '@acorex/components/button';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n HostBinding,\r\n TemplateRef,\r\n ViewContainerRef,\r\n} from '@angular/core';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXNotificationOptions } from './notification.class';\r\nimport { ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-notification',\r\n templateUrl: './notification.component.html',\r\n styleUrls: ['./notification.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n { provide: AXClosbaleComponent, useExisting: AXNotificationComponent },\r\n ],\r\n})\r\nexport class AXNotificationComponent extends AXBaseComponentMixin {\r\n options: AXNotificationOptions;\r\n _selectedPortal: Portal<any>;\r\n _icon: string;\r\n\r\n close: () => void;\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef,\r\n private viewRef: ViewContainerRef\r\n ) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n this._initContent();\r\n this._initIcon();\r\n this._handleTimeOut();\r\n }\r\n\r\n private _handleTimeOut() {\r\n if (this.options.timeOut) {\r\n setTimeout(() => {\r\n this.close();\r\n }, this.options.timeOut);\r\n }\r\n }\r\n private _initContent() {\r\n if (this.options.content instanceof TemplateRef<any>) {\r\n this._selectedPortal = new TemplatePortal(\r\n this.options.content as TemplateRef<any>,\r\n this.viewRef\r\n );\r\n this._cdr.markForCheck();\r\n } else if (typeof this.options.content === 'function') {\r\n this._selectedPortal = new ComponentPortal(this.options.content as any);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n\r\n private _initIcon() {\r\n if (!this.options.icon) {\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n default:\r\n this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n } else {\r\n this._icon = this.options.icon;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.options.color}`;\r\n }\r\n}\r\n","<span [class]=\"'ax-notification-icon' + ' ' + _icon\"></span>\r\n<div class=\"ax-notification-content\">\r\n <div class=\"ax-notification-title\">{{ options.title }}</div>\r\n <ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n </ng-template>\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\r\n <div *ngIf=\"!_selectedPortal\">{{ options.content }}</div>\r\n <div class=\"ax-notification-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <ax-button\r\n *ngFor=\"let button of options.buttons\"\r\n class=\"ax-xs\"\r\n [text]=\"button.text\"\r\n [color]=\"button.color\"\r\n [look]=\"button.look\"\r\n (onClick)=\"_handleButtonClick(button)\">\r\n {{ button.text }}\r\n </ax-button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div\r\n class=\"ax-notification-progress\"\r\n [style.animation-duration.ms]=\"options.timeOut\"\r\n *ngIf=\"options.timeOut\"></div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXNotificationComponent } from './notification.component';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nconst COMPONENT = [AXNotificationComponent];\r\nconst MODULES = [CommonModule, PortalModule, AXButtonModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXNotificationModule {}\r\n","import { AXConfig } from '@acorex/core/config';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector, TemplateRef } from '@angular/core';\r\nimport { AXNotificationOptions, AXNotificationRef } from './notification.class';\r\nimport { AXNotificationComponent } from './notification.component';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXNotificationService {\r\n private readonly _defaults = {\r\n gap: 5,\r\n location: 'top-end',\r\n };\r\n\r\n constructor(\r\n private overlayService: Overlay,\r\n private parentInjector: Injector\r\n ) {}\r\n\r\n private _activeList: AXNotificationComponent[] = [];\r\n\r\n show(options: AXNotificationOptions): AXNotificationRef {\r\n const opt = Object.assign(\r\n {\r\n closeable: true,\r\n location:\r\n AXConfig.get('notification.location') || this._defaults.location,\r\n },\r\n options\r\n );\r\n const gap = AXConfig.get('notification.gap') || this._defaults.gap;\r\n\r\n let positionStrategy = this.overlayService.position().global();\r\n const pos = this.getPosition(opt.location) + gap + 'px';\r\n switch (opt.location) {\r\n case 'bottom-center':\r\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally();\r\n break;\r\n case 'bottom-end':\r\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\r\n break;\r\n case 'bottom-start':\r\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\r\n break;\r\n case 'top-center':\r\n positionStrategy = positionStrategy.top(pos).centerHorizontally();\r\n break;\r\n case 'top-end':\r\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\r\n break;\r\n case 'top-start':\r\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\r\n break;\r\n case 'center-start':\r\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\r\n break;\r\n case 'center-end':\r\n positionStrategy = positionStrategy\r\n .centerVertically()\r\n .right(gap + 'px');\r\n break;\r\n default:\r\n break;\r\n }\r\n const overlayRef = this.overlayService.create({\r\n positionStrategy,\r\n panelClass: [\r\n 'ax-animate-animated',\r\n 'ax-animate-fadeIn',\r\n 'ax-animate-faster',\r\n ],\r\n });\r\n const notificationPortal = new ComponentPortal(\r\n AXNotificationComponent,\r\n null,\r\n this.parentInjector\r\n );\r\n\r\n const host = overlayRef.attach(notificationPortal);\r\n (host.instance as any).visibleIndex = this._activeList.length;\r\n this._activeList.push(host.instance);\r\n if (host.instance) {\r\n Object.assign(host.instance, {\r\n options: opt,\r\n close: () => {\r\n this._activeList = this._activeList.filter(c => c != host.instance);\r\n overlayRef.dispose();\r\n },\r\n });\r\n setTimeout(() => {\r\n host.changeDetectorRef.detectChanges();\r\n }, 0);\r\n }\r\n\r\n return {\r\n close: () => {\r\n host.instance.close();\r\n },\r\n };\r\n }\r\n\r\n public hideAll() {\r\n this._activeList.forEach(c => c.close());\r\n }\r\n\r\n private getPosition(location: string) {\r\n const list = this._activeList.filter(c => c.options.location == location);\r\n if (list.length == 0) return 0;\r\n if (location.split('-')[0] == 'bottom') {\r\n return (\r\n window.innerHeight - list[list.length - 1]._getHostElement().offsetTop\r\n );\r\n } else {\r\n return (\r\n list[list.length - 1]._getHostElement().offsetTop +\r\n list[list.length - 1]._getHostElement().offsetHeight\r\n );\r\n }\r\n }\r\n}\r\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,MAA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