@acorex/components 7.1.0 → 7.1.2
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 +13 -13
- 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
@@ -15,1196 +15,1196 @@ import { OverlayContainer, Overlay } from '@angular/cdk/overlay';
|
|
15
15
|
import * as i2 from '@angular/cdk/bidi';
|
16
16
|
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
17
17
|
|
18
|
-
/**
|
19
|
-
* Contains native event
|
20
|
-
* @category Events
|
21
|
-
*/
|
22
|
-
class AXEvent {
|
23
|
-
/**
|
24
|
-
* The sender component
|
25
|
-
*/
|
26
|
-
component;
|
27
|
-
/**
|
28
|
-
* The root native element
|
29
|
-
*/
|
30
|
-
htmlElement;
|
31
|
-
isUserInteraction = false;
|
32
|
-
}
|
33
|
-
/**
|
34
|
-
* Contains native event
|
35
|
-
* @category Events
|
36
|
-
*/
|
37
|
-
class AXHtmlEvent extends AXEvent {
|
38
|
-
nativeEvent;
|
39
|
-
}
|
40
|
-
/**
|
41
|
-
* Contains native event
|
42
|
-
* @category Events
|
43
|
-
*/
|
44
|
-
class AXValueChangedEvent extends AXEvent {
|
45
|
-
name;
|
46
|
-
value;
|
47
|
-
oldValue;
|
48
|
-
}
|
49
|
-
/**
|
50
|
-
* Contains native event
|
51
|
-
* @category Events
|
52
|
-
*/
|
53
|
-
class AXOptionChangedEvent extends AXEvent {
|
54
|
-
name;
|
55
|
-
newValue;
|
56
|
-
oldValue;
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* Fires each time the user click the element.
|
60
|
-
* @category Events
|
61
|
-
*/
|
62
|
-
class AXClickEvent extends AXHtmlEvent {
|
63
|
-
/**
|
64
|
-
* uses for extra data
|
65
|
-
*/
|
66
|
-
data = null;
|
67
|
-
nativeEvent = null;
|
68
|
-
}
|
69
|
-
/**
|
70
|
-
* Fires each time the user click the element.
|
71
|
-
* @category Events
|
72
|
-
*/
|
73
|
-
class AXButtonClickEvent extends AXClickEvent {
|
74
|
-
name;
|
75
|
-
}
|
76
|
-
/**
|
77
|
-
* Fires each time the user click the element.
|
78
|
-
* @category Events
|
79
|
-
*/
|
80
|
-
class AXItemClickEvent extends AXHtmlEvent {
|
81
|
-
item;
|
82
|
-
}
|
83
|
-
/**
|
84
|
-
* Fires each time the component gets focused.
|
85
|
-
* @category Events
|
86
|
-
*/
|
87
|
-
class AXFocusEvent extends AXHtmlEvent {
|
88
|
-
}
|
89
|
-
/**
|
90
|
-
* Fires each time an item or multiple items selected by the user or value.
|
91
|
-
* @category Events
|
92
|
-
*/
|
93
|
-
class AXSelectionValueChangedEvent extends AXValueChangedEvent {
|
94
|
-
value = null;
|
95
|
-
oldValue = null;
|
96
|
-
selectedKeys = [];
|
97
|
-
selectedItems = [];
|
98
|
-
}
|
99
|
-
/**
|
100
|
-
* Contains range start & end values
|
101
|
-
* @category Events
|
102
|
-
*/
|
103
|
-
class AXRangeChangedEvent extends AXEvent {
|
104
|
-
/**
|
105
|
-
* The range start value
|
106
|
-
*/
|
107
|
-
start;
|
108
|
-
/**
|
109
|
-
* The range end value
|
110
|
-
*/
|
111
|
-
end;
|
18
|
+
/**
|
19
|
+
* Contains native event
|
20
|
+
* @category Events
|
21
|
+
*/
|
22
|
+
class AXEvent {
|
23
|
+
/**
|
24
|
+
* The sender component
|
25
|
+
*/
|
26
|
+
component;
|
27
|
+
/**
|
28
|
+
* The root native element
|
29
|
+
*/
|
30
|
+
htmlElement;
|
31
|
+
isUserInteraction = false;
|
32
|
+
}
|
33
|
+
/**
|
34
|
+
* Contains native event
|
35
|
+
* @category Events
|
36
|
+
*/
|
37
|
+
class AXHtmlEvent extends AXEvent {
|
38
|
+
nativeEvent;
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* Contains native event
|
42
|
+
* @category Events
|
43
|
+
*/
|
44
|
+
class AXValueChangedEvent extends AXEvent {
|
45
|
+
name;
|
46
|
+
value;
|
47
|
+
oldValue;
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Contains native event
|
51
|
+
* @category Events
|
52
|
+
*/
|
53
|
+
class AXOptionChangedEvent extends AXEvent {
|
54
|
+
name;
|
55
|
+
newValue;
|
56
|
+
oldValue;
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* Fires each time the user click the element.
|
60
|
+
* @category Events
|
61
|
+
*/
|
62
|
+
class AXClickEvent extends AXHtmlEvent {
|
63
|
+
/**
|
64
|
+
* uses for extra data
|
65
|
+
*/
|
66
|
+
data = null;
|
67
|
+
nativeEvent = null;
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* Fires each time the user click the element.
|
71
|
+
* @category Events
|
72
|
+
*/
|
73
|
+
class AXButtonClickEvent extends AXClickEvent {
|
74
|
+
name;
|
75
|
+
}
|
76
|
+
/**
|
77
|
+
* Fires each time the user click the element.
|
78
|
+
* @category Events
|
79
|
+
*/
|
80
|
+
class AXItemClickEvent extends AXHtmlEvent {
|
81
|
+
item;
|
82
|
+
}
|
83
|
+
/**
|
84
|
+
* Fires each time the component gets focused.
|
85
|
+
* @category Events
|
86
|
+
*/
|
87
|
+
class AXFocusEvent extends AXHtmlEvent {
|
88
|
+
}
|
89
|
+
/**
|
90
|
+
* Fires each time an item or multiple items selected by the user or value.
|
91
|
+
* @category Events
|
92
|
+
*/
|
93
|
+
class AXSelectionValueChangedEvent extends AXValueChangedEvent {
|
94
|
+
value = null;
|
95
|
+
oldValue = null;
|
96
|
+
selectedKeys = [];
|
97
|
+
selectedItems = [];
|
98
|
+
}
|
99
|
+
/**
|
100
|
+
* Contains range start & end values
|
101
|
+
* @category Events
|
102
|
+
*/
|
103
|
+
class AXRangeChangedEvent extends AXEvent {
|
104
|
+
/**
|
105
|
+
* The range start value
|
106
|
+
*/
|
107
|
+
start;
|
108
|
+
/**
|
109
|
+
* The range end value
|
110
|
+
*/
|
111
|
+
end;
|
112
112
|
}
|
113
113
|
|
114
|
-
const TAB_META_KEY = '__meta__';
|
115
|
-
class AXComponentCloseEvent extends AXEvent {
|
116
|
-
data;
|
117
|
-
}
|
118
|
-
class AXComponentClosing {
|
119
|
-
cancel = false;
|
120
|
-
data;
|
121
|
-
}
|
122
|
-
class AXComponentResult {
|
123
|
-
sender;
|
124
|
-
data;
|
125
|
-
}
|
126
|
-
/**
|
127
|
-
* Defines a CSS class—or multiple classes separated by spaces— which are applied to a span element inside the Button. Allows the usage of custom icons after the primary text.
|
128
|
-
*/
|
129
|
-
class AXComponentClosedPromise extends Promise {
|
130
|
-
closeMethod;
|
131
|
-
constructor(executor) {
|
132
|
-
super(executor);
|
133
|
-
}
|
134
|
-
close() {
|
135
|
-
if (this.closeMethod) {
|
136
|
-
this.closeMethod();
|
137
|
-
}
|
138
|
-
}
|
139
|
-
}
|
140
|
-
class AXComponent {
|
141
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
142
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXComponent });
|
143
|
-
}
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXComponent, decorators: [{
|
145
|
-
type: Injectable
|
146
|
-
}] });
|
147
|
-
class AXClosbaleComponent extends AXComponent {
|
148
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXClosbaleComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
149
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXClosbaleComponent });
|
150
|
-
}
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXClosbaleComponent, decorators: [{
|
152
|
-
type: Injectable
|
153
|
-
}] });
|
154
|
-
class AXSearchableComponent extends AXComponent {
|
155
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXSearchableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
156
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXSearchableComponent });
|
157
|
-
}
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXSearchableComponent, decorators: [{
|
159
|
-
type: Injectable
|
160
|
-
}] });
|
161
|
-
class AXValuableComponent extends AXComponent {
|
162
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXValuableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
163
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXValuableComponent });
|
164
|
-
}
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXValuableComponent, decorators: [{
|
166
|
-
type: Injectable
|
167
|
-
}] });
|
168
|
-
class AXFocusableComponent extends AXComponent {
|
169
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXFocusableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
170
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXFocusableComponent });
|
171
|
-
}
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXFocusableComponent, decorators: [{
|
173
|
-
type: Injectable
|
174
|
-
}] });
|
175
|
-
class AXPagedComponent extends AXComponent {
|
176
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXPagedComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
177
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXPagedComponent });
|
178
|
-
}
|
179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXPagedComponent, decorators: [{
|
180
|
-
type: Injectable
|
114
|
+
const TAB_META_KEY = '__meta__';
|
115
|
+
class AXComponentCloseEvent extends AXEvent {
|
116
|
+
data;
|
117
|
+
}
|
118
|
+
class AXComponentClosing {
|
119
|
+
cancel = false;
|
120
|
+
data;
|
121
|
+
}
|
122
|
+
class AXComponentResult {
|
123
|
+
sender;
|
124
|
+
data;
|
125
|
+
}
|
126
|
+
/**
|
127
|
+
* Defines a CSS class—or multiple classes separated by spaces— which are applied to a span element inside the Button. Allows the usage of custom icons after the primary text.
|
128
|
+
*/
|
129
|
+
class AXComponentClosedPromise extends Promise {
|
130
|
+
closeMethod;
|
131
|
+
constructor(executor) {
|
132
|
+
super(executor);
|
133
|
+
}
|
134
|
+
close() {
|
135
|
+
if (this.closeMethod) {
|
136
|
+
this.closeMethod();
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
class AXComponent {
|
141
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
142
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXComponent });
|
143
|
+
}
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXComponent, decorators: [{
|
145
|
+
type: Injectable
|
146
|
+
}] });
|
147
|
+
class AXClosbaleComponent extends AXComponent {
|
148
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXClosbaleComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
149
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXClosbaleComponent });
|
150
|
+
}
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXClosbaleComponent, decorators: [{
|
152
|
+
type: Injectable
|
153
|
+
}] });
|
154
|
+
class AXSearchableComponent extends AXComponent {
|
155
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXSearchableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
156
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXSearchableComponent });
|
157
|
+
}
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXSearchableComponent, decorators: [{
|
159
|
+
type: Injectable
|
160
|
+
}] });
|
161
|
+
class AXValuableComponent extends AXComponent {
|
162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXValuableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
163
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXValuableComponent });
|
164
|
+
}
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXValuableComponent, decorators: [{
|
166
|
+
type: Injectable
|
167
|
+
}] });
|
168
|
+
class AXFocusableComponent extends AXComponent {
|
169
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXFocusableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
170
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXFocusableComponent });
|
171
|
+
}
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXFocusableComponent, decorators: [{
|
173
|
+
type: Injectable
|
174
|
+
}] });
|
175
|
+
class AXPagedComponent extends AXComponent {
|
176
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXPagedComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
177
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXPagedComponent });
|
178
|
+
}
|
179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXPagedComponent, decorators: [{
|
180
|
+
type: Injectable
|
181
181
|
}] });
|
182
182
|
|
183
|
-
const AX_STYLE_COLOR_TYPES = ['primary', 'secondary', 'info', 'danger', 'success', 'warning', 'light', 'dark'];
|
184
|
-
const AX_LOCATIONS = [
|
185
|
-
'bottom-start',
|
186
|
-
'bottom-center',
|
187
|
-
'bottom-end',
|
188
|
-
'top-start',
|
189
|
-
'top-center',
|
190
|
-
'top-end',
|
191
|
-
'center-end',
|
192
|
-
'center-start',
|
193
|
-
];
|
183
|
+
const AX_STYLE_COLOR_TYPES = ['primary', 'secondary', 'info', 'danger', 'success', 'warning', 'light', 'dark'];
|
184
|
+
const AX_LOCATIONS = [
|
185
|
+
'bottom-start',
|
186
|
+
'bottom-center',
|
187
|
+
'bottom-end',
|
188
|
+
'top-start',
|
189
|
+
'top-center',
|
190
|
+
'top-end',
|
191
|
+
'center-end',
|
192
|
+
'center-start',
|
193
|
+
];
|
194
194
|
const AX_DIRECTIONS = ['vertical', 'horizontal'];
|
195
195
|
|
196
|
-
const AXPositions = {
|
197
|
-
topStart: {
|
198
|
-
originX: 'start',
|
199
|
-
originY: 'top',
|
200
|
-
overlayX: 'start',
|
201
|
-
overlayY: 'bottom',
|
202
|
-
},
|
203
|
-
topCenter: {
|
204
|
-
originX: 'center',
|
205
|
-
originY: 'top',
|
206
|
-
overlayX: 'center',
|
207
|
-
overlayY: 'bottom',
|
208
|
-
},
|
209
|
-
topEnd: {
|
210
|
-
originX: 'end',
|
211
|
-
originY: 'top',
|
212
|
-
overlayX: 'end',
|
213
|
-
overlayY: 'bottom',
|
214
|
-
},
|
215
|
-
startStart: {
|
216
|
-
originX: 'start',
|
217
|
-
originY: 'top',
|
218
|
-
overlayX: 'end',
|
219
|
-
overlayY: 'top',
|
220
|
-
},
|
221
|
-
startCenter: {
|
222
|
-
originX: 'start',
|
223
|
-
originY: 'center',
|
224
|
-
overlayX: 'end',
|
225
|
-
overlayY: 'center',
|
226
|
-
},
|
227
|
-
startEnd: {
|
228
|
-
originX: 'start',
|
229
|
-
originY: 'bottom',
|
230
|
-
overlayX: 'end',
|
231
|
-
overlayY: 'bottom',
|
232
|
-
},
|
233
|
-
bottomStart: {
|
234
|
-
originX: 'start',
|
235
|
-
originY: 'bottom',
|
236
|
-
overlayX: 'start',
|
237
|
-
overlayY: 'top',
|
238
|
-
},
|
239
|
-
bottomCenter: {
|
240
|
-
originX: 'center',
|
241
|
-
originY: 'bottom',
|
242
|
-
overlayX: 'center',
|
243
|
-
overlayY: 'top',
|
244
|
-
},
|
245
|
-
bottomEnd: {
|
246
|
-
originX: 'end',
|
247
|
-
originY: 'bottom',
|
248
|
-
overlayX: 'end',
|
249
|
-
overlayY: 'top',
|
250
|
-
},
|
251
|
-
endStart: {
|
252
|
-
originX: 'end',
|
253
|
-
originY: 'top',
|
254
|
-
overlayX: 'start',
|
255
|
-
overlayY: 'top',
|
256
|
-
},
|
257
|
-
endCenter: {
|
258
|
-
originX: 'end',
|
259
|
-
originY: 'center',
|
260
|
-
overlayX: 'start',
|
261
|
-
overlayY: 'center',
|
262
|
-
},
|
263
|
-
endEnd: {
|
264
|
-
originX: 'end',
|
265
|
-
originY: 'bottom',
|
266
|
-
overlayX: 'start',
|
267
|
-
overlayY: 'bottom',
|
268
|
-
},
|
196
|
+
const AXPositions = {
|
197
|
+
topStart: {
|
198
|
+
originX: 'start',
|
199
|
+
originY: 'top',
|
200
|
+
overlayX: 'start',
|
201
|
+
overlayY: 'bottom',
|
202
|
+
},
|
203
|
+
topCenter: {
|
204
|
+
originX: 'center',
|
205
|
+
originY: 'top',
|
206
|
+
overlayX: 'center',
|
207
|
+
overlayY: 'bottom',
|
208
|
+
},
|
209
|
+
topEnd: {
|
210
|
+
originX: 'end',
|
211
|
+
originY: 'top',
|
212
|
+
overlayX: 'end',
|
213
|
+
overlayY: 'bottom',
|
214
|
+
},
|
215
|
+
startStart: {
|
216
|
+
originX: 'start',
|
217
|
+
originY: 'top',
|
218
|
+
overlayX: 'end',
|
219
|
+
overlayY: 'top',
|
220
|
+
},
|
221
|
+
startCenter: {
|
222
|
+
originX: 'start',
|
223
|
+
originY: 'center',
|
224
|
+
overlayX: 'end',
|
225
|
+
overlayY: 'center',
|
226
|
+
},
|
227
|
+
startEnd: {
|
228
|
+
originX: 'start',
|
229
|
+
originY: 'bottom',
|
230
|
+
overlayX: 'end',
|
231
|
+
overlayY: 'bottom',
|
232
|
+
},
|
233
|
+
bottomStart: {
|
234
|
+
originX: 'start',
|
235
|
+
originY: 'bottom',
|
236
|
+
overlayX: 'start',
|
237
|
+
overlayY: 'top',
|
238
|
+
},
|
239
|
+
bottomCenter: {
|
240
|
+
originX: 'center',
|
241
|
+
originY: 'bottom',
|
242
|
+
overlayX: 'center',
|
243
|
+
overlayY: 'top',
|
244
|
+
},
|
245
|
+
bottomEnd: {
|
246
|
+
originX: 'end',
|
247
|
+
originY: 'bottom',
|
248
|
+
overlayX: 'end',
|
249
|
+
overlayY: 'top',
|
250
|
+
},
|
251
|
+
endStart: {
|
252
|
+
originX: 'end',
|
253
|
+
originY: 'top',
|
254
|
+
overlayX: 'start',
|
255
|
+
overlayY: 'top',
|
256
|
+
},
|
257
|
+
endCenter: {
|
258
|
+
originX: 'end',
|
259
|
+
originY: 'center',
|
260
|
+
overlayX: 'start',
|
261
|
+
overlayY: 'center',
|
262
|
+
},
|
263
|
+
endEnd: {
|
264
|
+
originX: 'end',
|
265
|
+
originY: 'bottom',
|
266
|
+
overlayX: 'start',
|
267
|
+
overlayY: 'bottom',
|
268
|
+
},
|
269
269
|
};
|
270
270
|
|
271
|
-
class MXBaseComponent {
|
272
|
-
id;
|
273
|
-
_cdr = inject(ChangeDetectorRef);
|
274
|
-
_elementRef = inject(ElementRef);
|
275
|
-
get cdr() {
|
276
|
-
return this._cdr;
|
277
|
-
}
|
278
|
-
getHostElement() {
|
279
|
-
return this._elementRef.nativeElement;
|
280
|
-
}
|
281
|
-
onOptionChanging(option) {
|
282
|
-
return option?.value;
|
283
|
-
}
|
284
|
-
onOptionChanged = new EventEmitter();
|
285
|
-
setOption(option) {
|
286
|
-
const oldValue = this[option.name];
|
287
|
-
const newValue = this.onOptionChanging({
|
288
|
-
name: option.name,
|
289
|
-
value: option.value,
|
290
|
-
});
|
291
|
-
//TODO : check real changes
|
292
|
-
if (option.beforeCallback)
|
293
|
-
option.beforeCallback(oldValue, newValue);
|
294
|
-
if (oldValue != newValue) {
|
295
|
-
this[`_${option.name}`] = option.value;
|
296
|
-
this.onOptionChanged.emit({
|
297
|
-
component: this,
|
298
|
-
name: option.name,
|
299
|
-
newValue,
|
300
|
-
oldValue
|
301
|
-
});
|
302
|
-
const emitter = this[`${option.name}Change`];
|
303
|
-
emitter?.emit(newValue);
|
304
|
-
}
|
305
|
-
if (option.afterCallback)
|
306
|
-
option.afterCallback(oldValue, newValue);
|
307
|
-
}
|
308
|
-
_rtl;
|
309
|
-
get rtl() {
|
310
|
-
if (this._rtl)
|
311
|
-
return this._rtl;
|
312
|
-
else
|
313
|
-
return this.getHostElement()
|
314
|
-
.classList
|
315
|
-
.contains('ax-rtl') ||
|
316
|
-
window
|
317
|
-
.getComputedStyle(this.getHostElement(), null)
|
318
|
-
.getPropertyValue('direction') === 'rtl';
|
319
|
-
}
|
320
|
-
set rtl(value) {
|
321
|
-
this.setOption({ name: "rtl", value });
|
322
|
-
}
|
323
|
-
}
|
324
|
-
const BASE_INPUTS = ['rtl'];
|
271
|
+
class MXBaseComponent {
|
272
|
+
id;
|
273
|
+
_cdr = inject(ChangeDetectorRef);
|
274
|
+
_elementRef = inject(ElementRef);
|
275
|
+
get cdr() {
|
276
|
+
return this._cdr;
|
277
|
+
}
|
278
|
+
getHostElement() {
|
279
|
+
return this._elementRef.nativeElement;
|
280
|
+
}
|
281
|
+
onOptionChanging(option) {
|
282
|
+
return option?.value;
|
283
|
+
}
|
284
|
+
onOptionChanged = new EventEmitter();
|
285
|
+
setOption(option) {
|
286
|
+
const oldValue = this[option.name];
|
287
|
+
const newValue = this.onOptionChanging({
|
288
|
+
name: option.name,
|
289
|
+
value: option.value,
|
290
|
+
});
|
291
|
+
//TODO : check real changes
|
292
|
+
if (option.beforeCallback)
|
293
|
+
option.beforeCallback(oldValue, newValue);
|
294
|
+
if (oldValue != newValue) {
|
295
|
+
this[`_${option.name}`] = option.value;
|
296
|
+
this.onOptionChanged.emit({
|
297
|
+
component: this,
|
298
|
+
name: option.name,
|
299
|
+
newValue,
|
300
|
+
oldValue
|
301
|
+
});
|
302
|
+
const emitter = this[`${option.name}Change`];
|
303
|
+
emitter?.emit(newValue);
|
304
|
+
}
|
305
|
+
if (option.afterCallback)
|
306
|
+
option.afterCallback(oldValue, newValue);
|
307
|
+
}
|
308
|
+
_rtl;
|
309
|
+
get rtl() {
|
310
|
+
if (this._rtl)
|
311
|
+
return this._rtl;
|
312
|
+
else
|
313
|
+
return this.getHostElement()
|
314
|
+
.classList
|
315
|
+
.contains('ax-rtl') ||
|
316
|
+
window
|
317
|
+
.getComputedStyle(this.getHostElement(), null)
|
318
|
+
.getPropertyValue('direction') === 'rtl';
|
319
|
+
}
|
320
|
+
set rtl(value) {
|
321
|
+
this.setOption({ name: "rtl", value });
|
322
|
+
}
|
323
|
+
}
|
324
|
+
const BASE_INPUTS = ['rtl'];
|
325
325
|
const BASE_OUTPUT = [];
|
326
326
|
|
327
|
-
class MXInteractiveComponent extends MXBaseComponent {
|
328
|
-
_disabled;
|
329
|
-
/**
|
330
|
-
* If set to true, it disables the component.
|
331
|
-
*/
|
332
|
-
get disabled() {
|
333
|
-
return this._disabled;
|
334
|
-
}
|
335
|
-
set disabled(value) {
|
336
|
-
this.setOption({ name: "disabled", value });
|
337
|
-
}
|
338
|
-
_tabIndex = 0;
|
339
|
-
/**
|
340
|
-
* Specifies the tabindex of the component.
|
341
|
-
*/
|
342
|
-
get tabIndex() { return this.disabled ? -1 : this._tabIndex; }
|
343
|
-
set tabIndex(value) {
|
344
|
-
this.setOption({ name: "tabIndex", value: value != null ? coerceNumberProperty(value) : 0 });
|
345
|
-
}
|
346
|
-
/**
|
347
|
-
* Fires each time the component gets focused.
|
348
|
-
* @event
|
349
|
-
*/
|
350
|
-
onFocus = new EventEmitter();
|
351
|
-
emitOnFocusEvent(e) {
|
352
|
-
this.onFocus.emit({
|
353
|
-
component: this,
|
354
|
-
htmlElement: this.getHostElement(),
|
355
|
-
nativeEvent: e
|
356
|
-
});
|
357
|
-
}
|
358
|
-
/**
|
359
|
-
* Fires each time the component gets blurred.
|
360
|
-
* @event
|
361
|
-
*/
|
362
|
-
onBlur = new EventEmitter();
|
363
|
-
emitOnBlurEvent(e) {
|
364
|
-
this.onBlur.emit({
|
365
|
-
component: this,
|
366
|
-
htmlElement: this.getHostElement(),
|
367
|
-
nativeEvent: e
|
368
|
-
});
|
369
|
-
}
|
370
|
-
constructor() {
|
371
|
-
super();
|
372
|
-
}
|
373
|
-
focus() {
|
374
|
-
AXHtmlUtil.focusElement(this.getHostElement());
|
375
|
-
}
|
376
|
-
/**
|
377
|
-
* Check component is focused or has any focused element.
|
378
|
-
*/
|
379
|
-
hasFocus() {
|
380
|
-
return AXHtmlUtil.hasFocus(this.getHostElement());
|
381
|
-
}
|
382
|
-
}
|
383
|
-
const INTERACTIVE_INPUTS = ['disabled', 'tabIndex', ...BASE_INPUTS];
|
327
|
+
class MXInteractiveComponent extends MXBaseComponent {
|
328
|
+
_disabled;
|
329
|
+
/**
|
330
|
+
* If set to true, it disables the component.
|
331
|
+
*/
|
332
|
+
get disabled() {
|
333
|
+
return this._disabled;
|
334
|
+
}
|
335
|
+
set disabled(value) {
|
336
|
+
this.setOption({ name: "disabled", value });
|
337
|
+
}
|
338
|
+
_tabIndex = 0;
|
339
|
+
/**
|
340
|
+
* Specifies the tabindex of the component.
|
341
|
+
*/
|
342
|
+
get tabIndex() { return this.disabled ? -1 : this._tabIndex; }
|
343
|
+
set tabIndex(value) {
|
344
|
+
this.setOption({ name: "tabIndex", value: value != null ? coerceNumberProperty(value) : 0 });
|
345
|
+
}
|
346
|
+
/**
|
347
|
+
* Fires each time the component gets focused.
|
348
|
+
* @event
|
349
|
+
*/
|
350
|
+
onFocus = new EventEmitter();
|
351
|
+
emitOnFocusEvent(e) {
|
352
|
+
this.onFocus.emit({
|
353
|
+
component: this,
|
354
|
+
htmlElement: this.getHostElement(),
|
355
|
+
nativeEvent: e
|
356
|
+
});
|
357
|
+
}
|
358
|
+
/**
|
359
|
+
* Fires each time the component gets blurred.
|
360
|
+
* @event
|
361
|
+
*/
|
362
|
+
onBlur = new EventEmitter();
|
363
|
+
emitOnBlurEvent(e) {
|
364
|
+
this.onBlur.emit({
|
365
|
+
component: this,
|
366
|
+
htmlElement: this.getHostElement(),
|
367
|
+
nativeEvent: e
|
368
|
+
});
|
369
|
+
}
|
370
|
+
constructor() {
|
371
|
+
super();
|
372
|
+
}
|
373
|
+
focus() {
|
374
|
+
AXHtmlUtil.focusElement(this.getHostElement());
|
375
|
+
}
|
376
|
+
/**
|
377
|
+
* Check component is focused or has any focused element.
|
378
|
+
*/
|
379
|
+
hasFocus() {
|
380
|
+
return AXHtmlUtil.hasFocus(this.getHostElement());
|
381
|
+
}
|
382
|
+
}
|
383
|
+
const INTERACTIVE_INPUTS = ['disabled', 'tabIndex', ...BASE_INPUTS];
|
384
384
|
const INTERACTIVE_OUTPUT = ['onFocus', 'onBlur', ...BASE_OUTPUT];
|
385
385
|
|
386
|
-
class MXColorComponent extends MXBaseComponent {
|
387
|
-
constructor() {
|
388
|
-
super();
|
389
|
-
}
|
390
|
-
colorChange = new EventEmitter();
|
391
|
-
_color = 'primary';
|
392
|
-
/**
|
393
|
-
* Predefined color schemes
|
394
|
-
*/
|
395
|
-
get color() {
|
396
|
-
return this._color;
|
397
|
-
}
|
398
|
-
set color(value) {
|
399
|
-
this.setOption({
|
400
|
-
name: 'color',
|
401
|
-
value,
|
402
|
-
afterCallback: () => {
|
403
|
-
this.cdr.markForCheck();
|
404
|
-
}
|
405
|
-
});
|
406
|
-
}
|
407
|
-
}
|
408
|
-
const COLOR_INPUTS = ['color', ...BASE_INPUTS];
|
386
|
+
class MXColorComponent extends MXBaseComponent {
|
387
|
+
constructor() {
|
388
|
+
super();
|
389
|
+
}
|
390
|
+
colorChange = new EventEmitter();
|
391
|
+
_color = 'primary';
|
392
|
+
/**
|
393
|
+
* Predefined color schemes
|
394
|
+
*/
|
395
|
+
get color() {
|
396
|
+
return this._color;
|
397
|
+
}
|
398
|
+
set color(value) {
|
399
|
+
this.setOption({
|
400
|
+
name: 'color',
|
401
|
+
value,
|
402
|
+
afterCallback: () => {
|
403
|
+
this.cdr.markForCheck();
|
404
|
+
}
|
405
|
+
});
|
406
|
+
}
|
407
|
+
}
|
408
|
+
const COLOR_INPUTS = ['color', ...BASE_INPUTS];
|
409
409
|
const COLOR_OUTPUT = ['colorChange', ...BASE_OUTPUT];
|
410
410
|
|
411
|
-
class MXLookComponent extends MXBaseComponent {
|
412
|
-
constructor() {
|
413
|
-
super();
|
414
|
-
}
|
415
|
-
lookChange = new EventEmitter();
|
416
|
-
_look = 'default';
|
417
|
-
/**
|
418
|
-
* Predefined look schemes
|
419
|
-
*/
|
420
|
-
get look() {
|
421
|
-
return this._look;
|
422
|
-
}
|
423
|
-
set look(value) {
|
424
|
-
this.setOption({
|
425
|
-
name: 'look',
|
426
|
-
value,
|
427
|
-
afterCallback: () => {
|
428
|
-
this.cdr.markForCheck();
|
429
|
-
}
|
430
|
-
});
|
431
|
-
}
|
432
|
-
}
|
433
|
-
const LOOK_INPUTS = ['look', ...BASE_INPUTS];
|
411
|
+
class MXLookComponent extends MXBaseComponent {
|
412
|
+
constructor() {
|
413
|
+
super();
|
414
|
+
}
|
415
|
+
lookChange = new EventEmitter();
|
416
|
+
_look = 'default';
|
417
|
+
/**
|
418
|
+
* Predefined look schemes
|
419
|
+
*/
|
420
|
+
get look() {
|
421
|
+
return this._look;
|
422
|
+
}
|
423
|
+
set look(value) {
|
424
|
+
this.setOption({
|
425
|
+
name: 'look',
|
426
|
+
value,
|
427
|
+
afterCallback: () => {
|
428
|
+
this.cdr.markForCheck();
|
429
|
+
}
|
430
|
+
});
|
431
|
+
}
|
432
|
+
}
|
433
|
+
const LOOK_INPUTS = ['look', ...BASE_INPUTS];
|
434
434
|
const LOOK_OUTPUT = ['lookChange', ...BASE_OUTPUT];
|
435
435
|
|
436
|
-
class MXColorLookComponent extends classes(MXColorComponent, MXLookComponent) {
|
437
|
-
constructor() {
|
438
|
-
super();
|
439
|
-
}
|
440
|
-
}
|
441
|
-
const COLOR_LOOK_INPUTS = [...COLOR_INPUTS, ...LOOK_INPUTS];
|
436
|
+
class MXColorLookComponent extends classes(MXColorComponent, MXLookComponent) {
|
437
|
+
constructor() {
|
438
|
+
super();
|
439
|
+
}
|
440
|
+
}
|
441
|
+
const COLOR_LOOK_INPUTS = [...COLOR_INPUTS, ...LOOK_INPUTS];
|
442
442
|
const COLOR_LOOK_OUTPUT = [...COLOR_OUTPUT, ...LOOK_OUTPUT];
|
443
443
|
|
444
|
-
class MXButtonBaseComponent extends classes(MXInteractiveComponent, MXColorLookComponent) {
|
445
|
-
textChange = new EventEmitter();
|
446
|
-
_text;
|
447
|
-
/**
|
448
|
-
* Defines the primary text to show inside the button.
|
449
|
-
*/
|
450
|
-
get text() {
|
451
|
-
return this._text;
|
452
|
-
}
|
453
|
-
set text(v) {
|
454
|
-
this.setOption({
|
455
|
-
name: 'text',
|
456
|
-
value: v,
|
457
|
-
afterCallback: () => {
|
458
|
-
this.cdr.markForCheck();
|
459
|
-
}
|
460
|
-
});
|
461
|
-
}
|
462
|
-
toggleableChange = new EventEmitter();
|
463
|
-
_toggleable = false;
|
464
|
-
/**
|
465
|
-
* Provides visual styling that indicates if the Button is active
|
466
|
-
*/
|
467
|
-
get toggleable() {
|
468
|
-
return this._toggleable;
|
469
|
-
}
|
470
|
-
set toggleable(value) {
|
471
|
-
this.setOption({
|
472
|
-
name: 'toggleable',
|
473
|
-
value
|
474
|
-
});
|
475
|
-
}
|
476
|
-
selectedChange = new EventEmitter();
|
477
|
-
_selected = false;
|
478
|
-
/**
|
479
|
-
* Indicates if the Button is selected or not
|
480
|
-
*/
|
481
|
-
get selected() {
|
482
|
-
return this._selected;
|
483
|
-
}
|
484
|
-
set selected(value) {
|
485
|
-
this.setOption({
|
486
|
-
name: 'selected',
|
487
|
-
value,
|
488
|
-
afterCallback: () => {
|
489
|
-
this.cdr.markForCheck();
|
490
|
-
}
|
491
|
-
});
|
492
|
-
}
|
493
|
-
constructor() {
|
494
|
-
super();
|
495
|
-
}
|
496
|
-
get cssClasses() {
|
497
|
-
const cssClasses = {
|
498
|
-
'ax-button-icon': !this.text,
|
499
|
-
'ax-state-disabled': this["disabled"],
|
500
|
-
'ax-state-selected': this.selected
|
501
|
-
};
|
502
|
-
cssClasses[`ax-${this['color'] || 'default'}${this['look'] ? '-' + this['look'] : '-default'}`] = true;
|
503
|
-
return cssClasses;
|
504
|
-
}
|
505
|
-
}
|
506
|
-
const BUTTON_INPUTS = ['text', 'toggleable', 'selected', ...INTERACTIVE_INPUTS, COLOR_LOOK_INPUTS];
|
444
|
+
class MXButtonBaseComponent extends classes(MXInteractiveComponent, MXColorLookComponent) {
|
445
|
+
textChange = new EventEmitter();
|
446
|
+
_text;
|
447
|
+
/**
|
448
|
+
* Defines the primary text to show inside the button.
|
449
|
+
*/
|
450
|
+
get text() {
|
451
|
+
return this._text;
|
452
|
+
}
|
453
|
+
set text(v) {
|
454
|
+
this.setOption({
|
455
|
+
name: 'text',
|
456
|
+
value: v,
|
457
|
+
afterCallback: () => {
|
458
|
+
this.cdr.markForCheck();
|
459
|
+
}
|
460
|
+
});
|
461
|
+
}
|
462
|
+
toggleableChange = new EventEmitter();
|
463
|
+
_toggleable = false;
|
464
|
+
/**
|
465
|
+
* Provides visual styling that indicates if the Button is active
|
466
|
+
*/
|
467
|
+
get toggleable() {
|
468
|
+
return this._toggleable;
|
469
|
+
}
|
470
|
+
set toggleable(value) {
|
471
|
+
this.setOption({
|
472
|
+
name: 'toggleable',
|
473
|
+
value
|
474
|
+
});
|
475
|
+
}
|
476
|
+
selectedChange = new EventEmitter();
|
477
|
+
_selected = false;
|
478
|
+
/**
|
479
|
+
* Indicates if the Button is selected or not
|
480
|
+
*/
|
481
|
+
get selected() {
|
482
|
+
return this._selected;
|
483
|
+
}
|
484
|
+
set selected(value) {
|
485
|
+
this.setOption({
|
486
|
+
name: 'selected',
|
487
|
+
value,
|
488
|
+
afterCallback: () => {
|
489
|
+
this.cdr.markForCheck();
|
490
|
+
}
|
491
|
+
});
|
492
|
+
}
|
493
|
+
constructor() {
|
494
|
+
super();
|
495
|
+
}
|
496
|
+
get cssClasses() {
|
497
|
+
const cssClasses = {
|
498
|
+
'ax-button-icon': !this.text,
|
499
|
+
'ax-state-disabled': this["disabled"],
|
500
|
+
'ax-state-selected': this.selected
|
501
|
+
};
|
502
|
+
cssClasses[`ax-${this['color'] || 'default'}${this['look'] ? '-' + this['look'] : '-default'}`] = true;
|
503
|
+
return cssClasses;
|
504
|
+
}
|
505
|
+
}
|
506
|
+
const BUTTON_INPUTS = ['text', 'toggleable', 'selected', ...INTERACTIVE_INPUTS, COLOR_LOOK_INPUTS];
|
507
507
|
const BUTTON_OUTPUT = ['textChange', 'toggleableChange', 'selectedChange', ...INTERACTIVE_OUTPUT, COLOR_LOOK_OUTPUT];
|
508
508
|
|
509
|
-
class MXValueComponent extends MXBaseComponent {
|
510
|
-
/**
|
511
|
-
* Fires each time the user press a key.
|
512
|
-
* @event
|
513
|
-
*/
|
514
|
-
onValueChanged = new EventEmitter();
|
515
|
-
valueChange = new EventEmitter();
|
516
|
-
stateChange = new EventEmitter();
|
517
|
-
_readonly = false;
|
518
|
-
/**
|
519
|
-
* If set to true, user cannot change the value of component.
|
520
|
-
*/
|
521
|
-
get readonly() {
|
522
|
-
return this._readonly;
|
523
|
-
}
|
524
|
-
set readonly(value) {
|
525
|
-
this._readonly = coerceBooleanProperty(value);
|
526
|
-
}
|
527
|
-
_name;
|
528
|
-
get name() {
|
529
|
-
return this._name;
|
530
|
-
}
|
531
|
-
set name(value) {
|
532
|
-
this._name = value;
|
533
|
-
}
|
534
|
-
_isUserInteraction = false;
|
535
|
-
get isUserInteraction() {
|
536
|
-
return this._isUserInteraction;
|
537
|
-
}
|
538
|
-
set isUserInteraction(value) {
|
539
|
-
this._isUserInteraction = value;
|
540
|
-
}
|
541
|
-
initValue;
|
542
|
-
defaultValue;
|
543
|
-
_value;
|
544
|
-
get value() {
|
545
|
-
return this.getValue(this._value) || this.defaultValue;
|
546
|
-
}
|
547
|
-
set value(v) {
|
548
|
-
v = this.setValue(v);
|
549
|
-
//if (!this._isInited ) {
|
550
|
-
const old = AXObjectUtil.deepJSONClone(this.value);
|
551
|
-
// TODO: check real equality
|
552
|
-
if (v != old) {
|
553
|
-
this._value = v;
|
554
|
-
this.emitOnValueChangedEvent(old, this.value);
|
555
|
-
this.cdr.markForCheck();
|
556
|
-
if (v == null || v == undefined || v == '' || (Array.isArray(v) && v.length == 0)) {
|
557
|
-
this.setState('clear');
|
558
|
-
}
|
559
|
-
// else {
|
560
|
-
// if (this._isInited) {
|
561
|
-
// this.validate();
|
562
|
-
// }
|
563
|
-
// }
|
564
|
-
}
|
565
|
-
this._isUserInteraction = false;
|
566
|
-
//}
|
567
|
-
}
|
568
|
-
_state = 'clear';
|
569
|
-
get state() {
|
570
|
-
return this._state;
|
571
|
-
}
|
572
|
-
set state(value) {
|
573
|
-
this.setState(value);
|
574
|
-
this.stateChange.emit(value);
|
575
|
-
}
|
576
|
-
emitOnValueChangedEvent(oldValue, newValue) {
|
577
|
-
this.valueChange.emit(newValue);
|
578
|
-
this.onValueChanged.emit({
|
579
|
-
component: this,
|
580
|
-
value: newValue,
|
581
|
-
oldValue: oldValue,
|
582
|
-
name: this.name,
|
583
|
-
isUserInteraction: this.isUserInteraction,
|
584
|
-
});
|
585
|
-
this._isUserInteraction = false;
|
586
|
-
}
|
587
|
-
setValue(value) {
|
588
|
-
return value;
|
589
|
-
}
|
590
|
-
getValue(value) {
|
591
|
-
return value;
|
592
|
-
}
|
593
|
-
ngOnInit() {
|
594
|
-
this.getHostElement().setAttribute('ax-form-input', 'true');
|
595
|
-
}
|
596
|
-
ngAfterViewInit() {
|
597
|
-
this._checkRequired();
|
598
|
-
}
|
599
|
-
ngOnDestroy() {
|
600
|
-
debugger;
|
601
|
-
this.onValueChanged?.unsubscribe();
|
602
|
-
this.onOptionChanged?.unsubscribe();
|
603
|
-
}
|
604
|
-
clear() {
|
605
|
-
this.value = null;
|
606
|
-
}
|
607
|
-
_checkRequired() {
|
608
|
-
const isRequired = Array.from(this.getHostElement().querySelectorAll('ax-validation-rule')).some(c => c.__axContext__.enabled && c.__axContext__.rule == 'required');
|
609
|
-
//
|
610
|
-
if (isRequired) {
|
611
|
-
const container = this.getHostElement().classList.contains('ax-editor-container')
|
612
|
-
? this.getHostElement()
|
613
|
-
: this.getHostElement().querySelector('.ax-editor-container');
|
614
|
-
const formField = container?.closest('.ax-form-field');
|
615
|
-
const label = formField?.querySelector('ax-label')?.__axContext__;
|
616
|
-
if (label)
|
617
|
-
label.required = true;
|
618
|
-
}
|
619
|
-
}
|
620
|
-
validate() {
|
621
|
-
const rules = Array.from(this.getHostElement().querySelectorAll('ax-validation-rule')).filter(c => c.__axContext__.enabled);
|
622
|
-
//
|
623
|
-
if (!rules || rules.length === 0) {
|
624
|
-
this.setState('clear');
|
625
|
-
return Promise.resolve({
|
626
|
-
result: true,
|
627
|
-
value: this.value,
|
628
|
-
name: this.name,
|
629
|
-
id: this.id,
|
630
|
-
});
|
631
|
-
}
|
632
|
-
return new Promise(resolve => {
|
633
|
-
Promise.all(rules
|
634
|
-
.filter(c => typeof c?.validate === 'function')
|
635
|
-
.map(c => {
|
636
|
-
return c.validate(this.value);
|
637
|
-
})).then(d => {
|
638
|
-
const error = d.find(c => c.result === false);
|
639
|
-
if (error) {
|
640
|
-
this.setState('error', error.message);
|
641
|
-
resolve({
|
642
|
-
result: false,
|
643
|
-
value: this.value,
|
644
|
-
message: error.message,
|
645
|
-
name: this.name,
|
646
|
-
id: this.id,
|
647
|
-
});
|
648
|
-
}
|
649
|
-
else {
|
650
|
-
this.setState('success');
|
651
|
-
resolve({
|
652
|
-
result: true,
|
653
|
-
value: this.value,
|
654
|
-
name: this.name,
|
655
|
-
id: this.id,
|
656
|
-
});
|
657
|
-
}
|
658
|
-
});
|
659
|
-
});
|
660
|
-
}
|
661
|
-
setState(state, ...args) {
|
662
|
-
const container = this.getHostElement().classList.contains('ax-editor-container')
|
663
|
-
? this.getHostElement()
|
664
|
-
: this.getHostElement().querySelector('.ax-editor-container');
|
665
|
-
const formField = container?.closest('.ax-form-field');
|
666
|
-
const label = formField?.querySelector('ax-label') || formField?.querySelector('label');
|
667
|
-
let target = container || this.getHostElement().firstElementChild;
|
668
|
-
if (target?.querySelector('.ax-error-container')) {
|
669
|
-
target = target.querySelector('.ax-error-container');
|
670
|
-
}
|
671
|
-
const parent = target?.parentElement;
|
672
|
-
if (!target || !parent)
|
673
|
-
return;
|
674
|
-
switch (state) {
|
675
|
-
case 'clear':
|
676
|
-
this._state = 'clear';
|
677
|
-
if (parent.querySelector('span.ax-error-message')) {
|
678
|
-
parent.removeChild(parent.querySelector('span.ax-error-message'));
|
679
|
-
}
|
680
|
-
label?.classList.remove('ax-state-error');
|
681
|
-
target.classList.remove('ax-state-error', 'ax-state-success');
|
682
|
-
break;
|
683
|
-
case 'success':
|
684
|
-
this.setState('clear');
|
685
|
-
target.classList.add('ax-state-success');
|
686
|
-
this._state = 'success';
|
687
|
-
break;
|
688
|
-
case 'error':
|
689
|
-
this.setState('clear');
|
690
|
-
if (args[0]) {
|
691
|
-
const span = document.createElement('span');
|
692
|
-
span.innerText = args[0];
|
693
|
-
span.classList.add('ax-error-message');
|
694
|
-
parent.appendChild(span);
|
695
|
-
}
|
696
|
-
label?.classList.add('ax-state-error');
|
697
|
-
target.classList.add('ax-state-error');
|
698
|
-
this._state = 'error';
|
699
|
-
break;
|
700
|
-
}
|
701
|
-
this.cdr.markForCheck();
|
702
|
-
}
|
703
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MXValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
704
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MXValueComponent });
|
705
|
-
}
|
706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MXValueComponent, decorators: [{
|
707
|
-
type: Injectable
|
509
|
+
class MXValueComponent extends MXBaseComponent {
|
510
|
+
/**
|
511
|
+
* Fires each time the user press a key.
|
512
|
+
* @event
|
513
|
+
*/
|
514
|
+
onValueChanged = new EventEmitter();
|
515
|
+
valueChange = new EventEmitter();
|
516
|
+
stateChange = new EventEmitter();
|
517
|
+
_readonly = false;
|
518
|
+
/**
|
519
|
+
* If set to true, user cannot change the value of component.
|
520
|
+
*/
|
521
|
+
get readonly() {
|
522
|
+
return this._readonly;
|
523
|
+
}
|
524
|
+
set readonly(value) {
|
525
|
+
this._readonly = coerceBooleanProperty(value);
|
526
|
+
}
|
527
|
+
_name;
|
528
|
+
get name() {
|
529
|
+
return this._name;
|
530
|
+
}
|
531
|
+
set name(value) {
|
532
|
+
this._name = value;
|
533
|
+
}
|
534
|
+
_isUserInteraction = false;
|
535
|
+
get isUserInteraction() {
|
536
|
+
return this._isUserInteraction;
|
537
|
+
}
|
538
|
+
set isUserInteraction(value) {
|
539
|
+
this._isUserInteraction = value;
|
540
|
+
}
|
541
|
+
initValue;
|
542
|
+
defaultValue;
|
543
|
+
_value;
|
544
|
+
get value() {
|
545
|
+
return this.getValue(this._value) || this.defaultValue;
|
546
|
+
}
|
547
|
+
set value(v) {
|
548
|
+
v = this.setValue(v);
|
549
|
+
//if (!this._isInited ) {
|
550
|
+
const old = AXObjectUtil.deepJSONClone(this.value);
|
551
|
+
// TODO: check real equality
|
552
|
+
if (v != old) {
|
553
|
+
this._value = v;
|
554
|
+
this.emitOnValueChangedEvent(old, this.value);
|
555
|
+
this.cdr.markForCheck();
|
556
|
+
if (v == null || v == undefined || v == '' || (Array.isArray(v) && v.length == 0)) {
|
557
|
+
this.setState('clear');
|
558
|
+
}
|
559
|
+
// else {
|
560
|
+
// if (this._isInited) {
|
561
|
+
// this.validate();
|
562
|
+
// }
|
563
|
+
// }
|
564
|
+
}
|
565
|
+
this._isUserInteraction = false;
|
566
|
+
//}
|
567
|
+
}
|
568
|
+
_state = 'clear';
|
569
|
+
get state() {
|
570
|
+
return this._state;
|
571
|
+
}
|
572
|
+
set state(value) {
|
573
|
+
this.setState(value);
|
574
|
+
this.stateChange.emit(value);
|
575
|
+
}
|
576
|
+
emitOnValueChangedEvent(oldValue, newValue) {
|
577
|
+
this.valueChange.emit(newValue);
|
578
|
+
this.onValueChanged.emit({
|
579
|
+
component: this,
|
580
|
+
value: newValue,
|
581
|
+
oldValue: oldValue,
|
582
|
+
name: this.name,
|
583
|
+
isUserInteraction: this.isUserInteraction,
|
584
|
+
});
|
585
|
+
this._isUserInteraction = false;
|
586
|
+
}
|
587
|
+
setValue(value) {
|
588
|
+
return value;
|
589
|
+
}
|
590
|
+
getValue(value) {
|
591
|
+
return value;
|
592
|
+
}
|
593
|
+
ngOnInit() {
|
594
|
+
this.getHostElement().setAttribute('ax-form-input', 'true');
|
595
|
+
}
|
596
|
+
ngAfterViewInit() {
|
597
|
+
this._checkRequired();
|
598
|
+
}
|
599
|
+
ngOnDestroy() {
|
600
|
+
debugger;
|
601
|
+
this.onValueChanged?.unsubscribe();
|
602
|
+
this.onOptionChanged?.unsubscribe();
|
603
|
+
}
|
604
|
+
clear() {
|
605
|
+
this.value = null;
|
606
|
+
}
|
607
|
+
_checkRequired() {
|
608
|
+
const isRequired = Array.from(this.getHostElement().querySelectorAll('ax-validation-rule')).some(c => c.__axContext__.enabled && c.__axContext__.rule == 'required');
|
609
|
+
//
|
610
|
+
if (isRequired) {
|
611
|
+
const container = this.getHostElement().classList.contains('ax-editor-container')
|
612
|
+
? this.getHostElement()
|
613
|
+
: this.getHostElement().querySelector('.ax-editor-container');
|
614
|
+
const formField = container?.closest('.ax-form-field');
|
615
|
+
const label = formField?.querySelector('ax-label')?.__axContext__;
|
616
|
+
if (label)
|
617
|
+
label.required = true;
|
618
|
+
}
|
619
|
+
}
|
620
|
+
validate() {
|
621
|
+
const rules = Array.from(this.getHostElement().querySelectorAll('ax-validation-rule')).filter(c => c.__axContext__.enabled);
|
622
|
+
//
|
623
|
+
if (!rules || rules.length === 0) {
|
624
|
+
this.setState('clear');
|
625
|
+
return Promise.resolve({
|
626
|
+
result: true,
|
627
|
+
value: this.value,
|
628
|
+
name: this.name,
|
629
|
+
id: this.id,
|
630
|
+
});
|
631
|
+
}
|
632
|
+
return new Promise(resolve => {
|
633
|
+
Promise.all(rules
|
634
|
+
.filter(c => typeof c?.validate === 'function')
|
635
|
+
.map(c => {
|
636
|
+
return c.validate(this.value);
|
637
|
+
})).then(d => {
|
638
|
+
const error = d.find(c => c.result === false);
|
639
|
+
if (error) {
|
640
|
+
this.setState('error', error.message);
|
641
|
+
resolve({
|
642
|
+
result: false,
|
643
|
+
value: this.value,
|
644
|
+
message: error.message,
|
645
|
+
name: this.name,
|
646
|
+
id: this.id,
|
647
|
+
});
|
648
|
+
}
|
649
|
+
else {
|
650
|
+
this.setState('success');
|
651
|
+
resolve({
|
652
|
+
result: true,
|
653
|
+
value: this.value,
|
654
|
+
name: this.name,
|
655
|
+
id: this.id,
|
656
|
+
});
|
657
|
+
}
|
658
|
+
});
|
659
|
+
});
|
660
|
+
}
|
661
|
+
setState(state, ...args) {
|
662
|
+
const container = this.getHostElement().classList.contains('ax-editor-container')
|
663
|
+
? this.getHostElement()
|
664
|
+
: this.getHostElement().querySelector('.ax-editor-container');
|
665
|
+
const formField = container?.closest('.ax-form-field');
|
666
|
+
const label = formField?.querySelector('ax-label') || formField?.querySelector('label');
|
667
|
+
let target = container || this.getHostElement().firstElementChild;
|
668
|
+
if (target?.querySelector('.ax-error-container')) {
|
669
|
+
target = target.querySelector('.ax-error-container');
|
670
|
+
}
|
671
|
+
const parent = target?.parentElement;
|
672
|
+
if (!target || !parent)
|
673
|
+
return;
|
674
|
+
switch (state) {
|
675
|
+
case 'clear':
|
676
|
+
this._state = 'clear';
|
677
|
+
if (parent.querySelector('span.ax-error-message')) {
|
678
|
+
parent.removeChild(parent.querySelector('span.ax-error-message'));
|
679
|
+
}
|
680
|
+
label?.classList.remove('ax-state-error');
|
681
|
+
target.classList.remove('ax-state-error', 'ax-state-success');
|
682
|
+
break;
|
683
|
+
case 'success':
|
684
|
+
this.setState('clear');
|
685
|
+
target.classList.add('ax-state-success');
|
686
|
+
this._state = 'success';
|
687
|
+
break;
|
688
|
+
case 'error':
|
689
|
+
this.setState('clear');
|
690
|
+
if (args[0]) {
|
691
|
+
const span = document.createElement('span');
|
692
|
+
span.innerText = args[0];
|
693
|
+
span.classList.add('ax-error-message');
|
694
|
+
parent.appendChild(span);
|
695
|
+
}
|
696
|
+
label?.classList.add('ax-state-error');
|
697
|
+
target.classList.add('ax-state-error');
|
698
|
+
this._state = 'error';
|
699
|
+
break;
|
700
|
+
}
|
701
|
+
this.cdr.markForCheck();
|
702
|
+
}
|
703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MXValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
704
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MXValueComponent });
|
705
|
+
}
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MXValueComponent, decorators: [{
|
707
|
+
type: Injectable
|
708
708
|
}] });
|
709
709
|
|
710
|
-
class AXAutoFocusDirective {
|
711
|
-
el;
|
712
|
-
_host;
|
713
|
-
autoFocus = true;
|
714
|
-
constructor(el, _host) {
|
715
|
-
this.el = el;
|
716
|
-
this._host = _host;
|
717
|
-
}
|
718
|
-
time = 100;
|
719
|
-
ngAfterContentInit() {
|
720
|
-
if (this.autoFocus) {
|
721
|
-
const list = [
|
722
|
-
'button',
|
723
|
-
'input',
|
724
|
-
'[href]',
|
725
|
-
'select',
|
726
|
-
'textarea',
|
727
|
-
'[tabindex]',
|
728
|
-
].map((c) => c + ':not([tabindex="-1"])');
|
729
|
-
const focusable = this.el.nativeElement.querySelector(list.join(', ')) ??
|
730
|
-
this.el.nativeElement;
|
731
|
-
const attr = document.createAttribute('autofocus');
|
732
|
-
focusable.setAttributeNode(attr);
|
733
|
-
const hasTabindex = focusable.hasAttribute('tabindex');
|
734
|
-
if (!hasTabindex) {
|
735
|
-
focusable.setAttribute('tabIndex', '0');
|
736
|
-
}
|
737
|
-
setTimeout(() => {
|
738
|
-
focusable.focus();
|
739
|
-
}, 100);
|
740
|
-
}
|
741
|
-
}
|
742
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXAutoFocusDirective, deps: [{ token: i0.ElementRef }, { token: AXFocusableComponent, host: true, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
743
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: { autoFocus: ["axAutoFocus", "autoFocus"], time: ["focus-time", "time"] }, ngImport: i0 });
|
744
|
-
}
|
745
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXAutoFocusDirective, decorators: [{
|
746
|
-
type: Directive,
|
747
|
-
args: [{
|
748
|
-
selector: '[axAutoFocus]',
|
749
|
-
}]
|
750
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: AXFocusableComponent, decorators: [{
|
751
|
-
type: Host
|
752
|
-
}, {
|
753
|
-
type: Self
|
754
|
-
}, {
|
755
|
-
type: Optional
|
756
|
-
}] }]; }, propDecorators: { autoFocus: [{
|
757
|
-
type: Input,
|
758
|
-
args: ['axAutoFocus']
|
759
|
-
}], time: [{
|
760
|
-
type: Input,
|
761
|
-
args: ['focus-time']
|
710
|
+
class AXAutoFocusDirective {
|
711
|
+
el;
|
712
|
+
_host;
|
713
|
+
autoFocus = true;
|
714
|
+
constructor(el, _host) {
|
715
|
+
this.el = el;
|
716
|
+
this._host = _host;
|
717
|
+
}
|
718
|
+
time = 100;
|
719
|
+
ngAfterContentInit() {
|
720
|
+
if (this.autoFocus) {
|
721
|
+
const list = [
|
722
|
+
'button',
|
723
|
+
'input',
|
724
|
+
'[href]',
|
725
|
+
'select',
|
726
|
+
'textarea',
|
727
|
+
'[tabindex]',
|
728
|
+
].map((c) => c + ':not([tabindex="-1"])');
|
729
|
+
const focusable = this.el.nativeElement.querySelector(list.join(', ')) ??
|
730
|
+
this.el.nativeElement;
|
731
|
+
const attr = document.createAttribute('autofocus');
|
732
|
+
focusable.setAttributeNode(attr);
|
733
|
+
const hasTabindex = focusable.hasAttribute('tabindex');
|
734
|
+
if (!hasTabindex) {
|
735
|
+
focusable.setAttribute('tabIndex', '0');
|
736
|
+
}
|
737
|
+
setTimeout(() => {
|
738
|
+
focusable.focus();
|
739
|
+
}, 100);
|
740
|
+
}
|
741
|
+
}
|
742
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXAutoFocusDirective, deps: [{ token: i0.ElementRef }, { token: AXFocusableComponent, host: true, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
743
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: { autoFocus: ["axAutoFocus", "autoFocus"], time: ["focus-time", "time"] }, ngImport: i0 });
|
744
|
+
}
|
745
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXAutoFocusDirective, decorators: [{
|
746
|
+
type: Directive,
|
747
|
+
args: [{
|
748
|
+
selector: '[axAutoFocus]',
|
749
|
+
}]
|
750
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: AXFocusableComponent, decorators: [{
|
751
|
+
type: Host
|
752
|
+
}, {
|
753
|
+
type: Self
|
754
|
+
}, {
|
755
|
+
type: Optional
|
756
|
+
}] }]; }, propDecorators: { autoFocus: [{
|
757
|
+
type: Input,
|
758
|
+
args: ['axAutoFocus']
|
759
|
+
}], time: [{
|
760
|
+
type: Input,
|
761
|
+
args: ['focus-time']
|
762
762
|
}] } });
|
763
763
|
|
764
|
-
class AXNgModelChangeDebouncedDirective {
|
765
|
-
ngModel;
|
766
|
-
ngModelChangeDebounced = new EventEmitter();
|
767
|
-
ngModelChangeDebounceTimeChange = new EventEmitter();
|
768
|
-
_ngModelChangeDebounceTime = 0;
|
769
|
-
get ngModelChangeDebounceTime() {
|
770
|
-
return this._ngModelChangeDebounceTime;
|
771
|
-
}
|
772
|
-
set ngModelChangeDebounceTime(v) {
|
773
|
-
if (v != this._ngModelChangeDebounceTime) {
|
774
|
-
this._ngModelChangeDebounceTime = v;
|
775
|
-
this.ngModelChangeDebounceTimeChange.emit(v);
|
776
|
-
this.update();
|
777
|
-
}
|
778
|
-
}
|
779
|
-
subscription;
|
780
|
-
ngOnDestroy() {
|
781
|
-
this.subscription.unsubscribe();
|
782
|
-
}
|
783
|
-
constructor(ngModel) {
|
784
|
-
this.ngModel = ngModel;
|
785
|
-
this.ngModelChangeDebounceTime = 0;
|
786
|
-
}
|
787
|
-
update() {
|
788
|
-
this.subscription?.unsubscribe();
|
789
|
-
//
|
790
|
-
this.subscription = this.ngModel.control.valueChanges.pipe(skip(1), // skip initial value
|
791
|
-
distinctUntilChanged(), debounceTime(this.ngModelChangeDebounceTime)).subscribe((value) => this.ngModelChangeDebounced.emit(value));
|
792
|
-
}
|
793
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNgModelChangeDebouncedDirective, deps: [{ token: i1.NgModel }], target: i0.ɵɵFactoryTarget.Directive });
|
794
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXNgModelChangeDebouncedDirective, selector: "[ngModelChangeDebounced]", inputs: { ngModelChangeDebounceTime: "ngModelChangeDebounceTime" }, outputs: { ngModelChangeDebounced: "ngModelChangeDebounced", ngModelChangeDebounceTimeChange: "ngModelChangeDebounceTimeChange" }, ngImport: i0 });
|
795
|
-
}
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNgModelChangeDebouncedDirective, decorators: [{
|
797
|
-
type: Directive,
|
798
|
-
args: [{
|
799
|
-
selector: '[ngModelChangeDebounced]',
|
800
|
-
}]
|
801
|
-
}], ctorParameters: function () { return [{ type: i1.NgModel }]; }, propDecorators: { ngModelChangeDebounced: [{
|
802
|
-
type: Output
|
803
|
-
}], ngModelChangeDebounceTimeChange: [{
|
804
|
-
type: Output
|
805
|
-
}], ngModelChangeDebounceTime: [{
|
806
|
-
type: Input
|
764
|
+
class AXNgModelChangeDebouncedDirective {
|
765
|
+
ngModel;
|
766
|
+
ngModelChangeDebounced = new EventEmitter();
|
767
|
+
ngModelChangeDebounceTimeChange = new EventEmitter();
|
768
|
+
_ngModelChangeDebounceTime = 0;
|
769
|
+
get ngModelChangeDebounceTime() {
|
770
|
+
return this._ngModelChangeDebounceTime;
|
771
|
+
}
|
772
|
+
set ngModelChangeDebounceTime(v) {
|
773
|
+
if (v != this._ngModelChangeDebounceTime) {
|
774
|
+
this._ngModelChangeDebounceTime = v;
|
775
|
+
this.ngModelChangeDebounceTimeChange.emit(v);
|
776
|
+
this.update();
|
777
|
+
}
|
778
|
+
}
|
779
|
+
subscription;
|
780
|
+
ngOnDestroy() {
|
781
|
+
this.subscription.unsubscribe();
|
782
|
+
}
|
783
|
+
constructor(ngModel) {
|
784
|
+
this.ngModel = ngModel;
|
785
|
+
this.ngModelChangeDebounceTime = 0;
|
786
|
+
}
|
787
|
+
update() {
|
788
|
+
this.subscription?.unsubscribe();
|
789
|
+
//
|
790
|
+
this.subscription = this.ngModel.control.valueChanges.pipe(skip(1), // skip initial value
|
791
|
+
distinctUntilChanged(), debounceTime(this.ngModelChangeDebounceTime)).subscribe((value) => this.ngModelChangeDebounced.emit(value));
|
792
|
+
}
|
793
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNgModelChangeDebouncedDirective, deps: [{ token: i1.NgModel }], target: i0.ɵɵFactoryTarget.Directive });
|
794
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXNgModelChangeDebouncedDirective, selector: "[ngModelChangeDebounced]", inputs: { ngModelChangeDebounceTime: "ngModelChangeDebounceTime" }, outputs: { ngModelChangeDebounced: "ngModelChangeDebounced", ngModelChangeDebounceTimeChange: "ngModelChangeDebounceTimeChange" }, ngImport: i0 });
|
795
|
+
}
|
796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXNgModelChangeDebouncedDirective, decorators: [{
|
797
|
+
type: Directive,
|
798
|
+
args: [{
|
799
|
+
selector: '[ngModelChangeDebounced]',
|
800
|
+
}]
|
801
|
+
}], ctorParameters: function () { return [{ type: i1.NgModel }]; }, propDecorators: { ngModelChangeDebounced: [{
|
802
|
+
type: Output
|
803
|
+
}], ngModelChangeDebounceTimeChange: [{
|
804
|
+
type: Output
|
805
|
+
}], ngModelChangeDebounceTime: [{
|
806
|
+
type: Input
|
807
807
|
}] } });
|
808
808
|
|
809
|
-
class AXHotkeysService {
|
810
|
-
eventManager;
|
811
|
-
document;
|
812
|
-
defaults = {
|
813
|
-
element: this.document,
|
814
|
-
};
|
815
|
-
constructor(eventManager, document) {
|
816
|
-
this.eventManager = eventManager;
|
817
|
-
this.document = document;
|
818
|
-
}
|
819
|
-
addShortcut(options) {
|
820
|
-
const merged = { ...this.defaults, ...options };
|
821
|
-
const event = `keydown.${merged.keys}`;
|
822
|
-
return new Observable((observer) => {
|
823
|
-
const handler = (e) => {
|
824
|
-
e.preventDefault();
|
825
|
-
observer.next(e);
|
826
|
-
};
|
827
|
-
const dispose = this.eventManager.addEventListener(merged.element, event, handler);
|
828
|
-
return () => {
|
829
|
-
dispose();
|
830
|
-
};
|
831
|
-
});
|
832
|
-
}
|
833
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeysService, deps: [{ token: i1$1.EventManager }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
834
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeysService, providedIn: 'root' });
|
835
|
-
}
|
836
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeysService, decorators: [{
|
837
|
-
type: Injectable,
|
838
|
-
args: [{ providedIn: 'root' }]
|
839
|
-
}], ctorParameters: function () { return [{ type: i1$1.EventManager }, { type: Document, decorators: [{
|
840
|
-
type: Inject,
|
841
|
-
args: [DOCUMENT]
|
809
|
+
class AXHotkeysService {
|
810
|
+
eventManager;
|
811
|
+
document;
|
812
|
+
defaults = {
|
813
|
+
element: this.document,
|
814
|
+
};
|
815
|
+
constructor(eventManager, document) {
|
816
|
+
this.eventManager = eventManager;
|
817
|
+
this.document = document;
|
818
|
+
}
|
819
|
+
addShortcut(options) {
|
820
|
+
const merged = { ...this.defaults, ...options };
|
821
|
+
const event = `keydown.${merged.keys}`;
|
822
|
+
return new Observable((observer) => {
|
823
|
+
const handler = (e) => {
|
824
|
+
e.preventDefault();
|
825
|
+
observer.next(e);
|
826
|
+
};
|
827
|
+
const dispose = this.eventManager.addEventListener(merged.element, event, handler);
|
828
|
+
return () => {
|
829
|
+
dispose();
|
830
|
+
};
|
831
|
+
});
|
832
|
+
}
|
833
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeysService, deps: [{ token: i1$1.EventManager }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
834
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeysService, providedIn: 'root' });
|
835
|
+
}
|
836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeysService, decorators: [{
|
837
|
+
type: Injectable,
|
838
|
+
args: [{ providedIn: 'root' }]
|
839
|
+
}], ctorParameters: function () { return [{ type: i1$1.EventManager }, { type: Document, decorators: [{
|
840
|
+
type: Inject,
|
841
|
+
args: [DOCUMENT]
|
842
842
|
}] }]; } });
|
843
843
|
|
844
|
-
class AXHotkeyDirective {
|
845
|
-
el;
|
846
|
-
_host;
|
847
|
-
hs;
|
848
|
-
hotkey = '';
|
849
|
-
_subs = [];
|
850
|
-
constructor(el, _host, hs) {
|
851
|
-
this.el = el;
|
852
|
-
this._host = _host;
|
853
|
-
this.hs = hs;
|
854
|
-
}
|
855
|
-
ngAfterViewInit() {
|
856
|
-
if (!this.hotkey || !this._host)
|
857
|
-
return;
|
858
|
-
if (typeof this.hotkey == 'string') {
|
859
|
-
this._addDefaultAction(this.hotkey);
|
860
|
-
}
|
861
|
-
else if (typeof this.hotkey == 'object' && !Array.isArray(this.hotkey)) {
|
862
|
-
this._addHotKeyAction([this.hotkey]);
|
863
|
-
}
|
864
|
-
else if (Array.isArray(this.hotkey)) {
|
865
|
-
this._addHotKeyAction(this.hotkey);
|
866
|
-
}
|
867
|
-
}
|
868
|
-
_addDefaultAction(hotkey) {
|
869
|
-
this._subs.push(this.hs.addShortcut({ keys: hotkey }).subscribe(() => {
|
870
|
-
['click', 'toggle', 'open', 'focus'].forEach((a) => {
|
871
|
-
if (this._host[a]) {
|
872
|
-
this._host[a]();
|
873
|
-
return;
|
874
|
-
}
|
875
|
-
});
|
876
|
-
}));
|
877
|
-
}
|
878
|
-
_addHotKeyAction(hotkeys) {
|
879
|
-
hotkeys.forEach((k) => {
|
880
|
-
const hotkey = Object.entries(k)[0][0];
|
881
|
-
const action = Object.entries(k)[0][1];
|
882
|
-
if (!action)
|
883
|
-
this._addDefaultAction(hotkey);
|
884
|
-
else {
|
885
|
-
this._subs.push(this.hs.addShortcut({ keys: hotkey }).subscribe(() => {
|
886
|
-
if (typeof action == 'string' && this._host[action]) {
|
887
|
-
this._host[action]();
|
888
|
-
return;
|
889
|
-
}
|
890
|
-
if (typeof action == 'function') {
|
891
|
-
action();
|
892
|
-
return;
|
893
|
-
}
|
894
|
-
}));
|
895
|
-
}
|
896
|
-
});
|
897
|
-
}
|
898
|
-
ngOnDestroy() {
|
899
|
-
this._subs.forEach((s) => {
|
900
|
-
s.unsubscribe();
|
901
|
-
});
|
902
|
-
}
|
903
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeyDirective, deps: [{ token: i0.ElementRef }, { token: AXComponent, host: true, optional: true, self: true }, { token: AXHotkeysService }], target: i0.ɵɵFactoryTarget.Directive });
|
904
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXHotkeyDirective, selector: "[hotkey]", inputs: { hotkey: "hotkey" }, ngImport: i0 });
|
905
|
-
}
|
906
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeyDirective, decorators: [{
|
907
|
-
type: Directive,
|
908
|
-
args: [{
|
909
|
-
selector: '[hotkey]',
|
910
|
-
}]
|
911
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: AXComponent, decorators: [{
|
912
|
-
type: Host
|
913
|
-
}, {
|
914
|
-
type: Self
|
915
|
-
}, {
|
916
|
-
type: Optional
|
917
|
-
}] }, { type: AXHotkeysService }]; }, propDecorators: { hotkey: [{
|
918
|
-
type: Input,
|
919
|
-
args: ['hotkey']
|
844
|
+
class AXHotkeyDirective {
|
845
|
+
el;
|
846
|
+
_host;
|
847
|
+
hs;
|
848
|
+
hotkey = '';
|
849
|
+
_subs = [];
|
850
|
+
constructor(el, _host, hs) {
|
851
|
+
this.el = el;
|
852
|
+
this._host = _host;
|
853
|
+
this.hs = hs;
|
854
|
+
}
|
855
|
+
ngAfterViewInit() {
|
856
|
+
if (!this.hotkey || !this._host)
|
857
|
+
return;
|
858
|
+
if (typeof this.hotkey == 'string') {
|
859
|
+
this._addDefaultAction(this.hotkey);
|
860
|
+
}
|
861
|
+
else if (typeof this.hotkey == 'object' && !Array.isArray(this.hotkey)) {
|
862
|
+
this._addHotKeyAction([this.hotkey]);
|
863
|
+
}
|
864
|
+
else if (Array.isArray(this.hotkey)) {
|
865
|
+
this._addHotKeyAction(this.hotkey);
|
866
|
+
}
|
867
|
+
}
|
868
|
+
_addDefaultAction(hotkey) {
|
869
|
+
this._subs.push(this.hs.addShortcut({ keys: hotkey }).subscribe(() => {
|
870
|
+
['click', 'toggle', 'open', 'focus'].forEach((a) => {
|
871
|
+
if (this._host[a]) {
|
872
|
+
this._host[a]();
|
873
|
+
return;
|
874
|
+
}
|
875
|
+
});
|
876
|
+
}));
|
877
|
+
}
|
878
|
+
_addHotKeyAction(hotkeys) {
|
879
|
+
hotkeys.forEach((k) => {
|
880
|
+
const hotkey = Object.entries(k)[0][0];
|
881
|
+
const action = Object.entries(k)[0][1];
|
882
|
+
if (!action)
|
883
|
+
this._addDefaultAction(hotkey);
|
884
|
+
else {
|
885
|
+
this._subs.push(this.hs.addShortcut({ keys: hotkey }).subscribe(() => {
|
886
|
+
if (typeof action == 'string' && this._host[action]) {
|
887
|
+
this._host[action]();
|
888
|
+
return;
|
889
|
+
}
|
890
|
+
if (typeof action == 'function') {
|
891
|
+
action();
|
892
|
+
return;
|
893
|
+
}
|
894
|
+
}));
|
895
|
+
}
|
896
|
+
});
|
897
|
+
}
|
898
|
+
ngOnDestroy() {
|
899
|
+
this._subs.forEach((s) => {
|
900
|
+
s.unsubscribe();
|
901
|
+
});
|
902
|
+
}
|
903
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeyDirective, deps: [{ token: i0.ElementRef }, { token: AXComponent, host: true, optional: true, self: true }, { token: AXHotkeysService }], target: i0.ɵɵFactoryTarget.Directive });
|
904
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXHotkeyDirective, selector: "[hotkey]", inputs: { hotkey: "hotkey" }, ngImport: i0 });
|
905
|
+
}
|
906
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXHotkeyDirective, decorators: [{
|
907
|
+
type: Directive,
|
908
|
+
args: [{
|
909
|
+
selector: '[hotkey]',
|
910
|
+
}]
|
911
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: AXComponent, decorators: [{
|
912
|
+
type: Host
|
913
|
+
}, {
|
914
|
+
type: Self
|
915
|
+
}, {
|
916
|
+
type: Optional
|
917
|
+
}] }, { type: AXHotkeysService }]; }, propDecorators: { hotkey: [{
|
918
|
+
type: Input,
|
919
|
+
args: ['hotkey']
|
920
920
|
}] } });
|
921
921
|
|
922
|
-
;
|
923
|
-
const AX_DEFAULT_SCROLL_POSITION = {
|
924
|
-
scrollHeight: 0,
|
925
|
-
scrollTop: 0,
|
926
|
-
clientHeight: 0
|
927
|
-
};
|
928
|
-
class AXInfiniteScrollerDirective {
|
929
|
-
elm;
|
930
|
-
scrollEvent$;
|
931
|
-
userScrolledDown$;
|
932
|
-
requestOnScroll$;
|
933
|
-
scrollCallback;
|
934
|
-
immediateCallback;
|
935
|
-
scrollPercent = 70;
|
936
|
-
constructor(elm) {
|
937
|
-
this.elm = elm;
|
938
|
-
}
|
939
|
-
ngAfterViewInit() {
|
940
|
-
this.registerScrollEvent();
|
941
|
-
this.streamScrollEvents();
|
942
|
-
this.requestCallbackOnScroll();
|
943
|
-
}
|
944
|
-
registerScrollEvent() {
|
945
|
-
this.scrollEvent$ = fromEvent(this.elm.nativeElement, 'scroll');
|
946
|
-
}
|
947
|
-
streamScrollEvents() {
|
948
|
-
this.userScrolledDown$ = this.scrollEvent$
|
949
|
-
.pipe(map((e) => ({
|
950
|
-
scrollHeight: e.target.scrollHeight,
|
951
|
-
scrollTop: e.target.scrollTop,
|
952
|
-
clientHeight: e.target.clientHeight
|
953
|
-
})), pairwise(), filter(positions => this.isUserScrollingDown(positions) && this.isScrollExpectedPercent(positions[1])));
|
954
|
-
}
|
955
|
-
requestCallbackOnScroll() {
|
956
|
-
this.requestOnScroll$ = this.userScrolledDown$;
|
957
|
-
if (this.immediateCallback) {
|
958
|
-
this.requestOnScroll$ = this.requestOnScroll$.pipe(startWith([AX_DEFAULT_SCROLL_POSITION, AX_DEFAULT_SCROLL_POSITION]));
|
959
|
-
}
|
960
|
-
this.requestOnScroll$.pipe(exhaustMap(() => {
|
961
|
-
return this.scrollCallback();
|
962
|
-
}));
|
963
|
-
//.subscribe((data) => { console.log(data) }, (err) => console.log(err));
|
964
|
-
}
|
965
|
-
isUserScrollingDown = (positions) => {
|
966
|
-
return positions[0].sT < positions[1].sT;
|
967
|
-
};
|
968
|
-
isScrollExpectedPercent = (position) => {
|
969
|
-
return ((position.sT + position.cH) / position.sH) > (this.scrollPercent / 100);
|
970
|
-
};
|
971
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXInfiniteScrollerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
972
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXInfiniteScrollerDirective, selector: "[axInfiniteScroller]", inputs: { scrollCallback: "scrollCallback", immediateCallback: "immediateCallback", scrollPercent: "scrollPercent" }, ngImport: i0 });
|
973
|
-
}
|
974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXInfiniteScrollerDirective, decorators: [{
|
975
|
-
type: Directive,
|
976
|
-
args: [{
|
977
|
-
selector: '[axInfiniteScroller]'
|
978
|
-
}]
|
979
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { scrollCallback: [{
|
980
|
-
type: Input
|
981
|
-
}], immediateCallback: [{
|
982
|
-
type: Input
|
983
|
-
}], scrollPercent: [{
|
984
|
-
type: Input
|
922
|
+
;
|
923
|
+
const AX_DEFAULT_SCROLL_POSITION = {
|
924
|
+
scrollHeight: 0,
|
925
|
+
scrollTop: 0,
|
926
|
+
clientHeight: 0
|
927
|
+
};
|
928
|
+
class AXInfiniteScrollerDirective {
|
929
|
+
elm;
|
930
|
+
scrollEvent$;
|
931
|
+
userScrolledDown$;
|
932
|
+
requestOnScroll$;
|
933
|
+
scrollCallback;
|
934
|
+
immediateCallback;
|
935
|
+
scrollPercent = 70;
|
936
|
+
constructor(elm) {
|
937
|
+
this.elm = elm;
|
938
|
+
}
|
939
|
+
ngAfterViewInit() {
|
940
|
+
this.registerScrollEvent();
|
941
|
+
this.streamScrollEvents();
|
942
|
+
this.requestCallbackOnScroll();
|
943
|
+
}
|
944
|
+
registerScrollEvent() {
|
945
|
+
this.scrollEvent$ = fromEvent(this.elm.nativeElement, 'scroll');
|
946
|
+
}
|
947
|
+
streamScrollEvents() {
|
948
|
+
this.userScrolledDown$ = this.scrollEvent$
|
949
|
+
.pipe(map((e) => ({
|
950
|
+
scrollHeight: e.target.scrollHeight,
|
951
|
+
scrollTop: e.target.scrollTop,
|
952
|
+
clientHeight: e.target.clientHeight
|
953
|
+
})), pairwise(), filter(positions => this.isUserScrollingDown(positions) && this.isScrollExpectedPercent(positions[1])));
|
954
|
+
}
|
955
|
+
requestCallbackOnScroll() {
|
956
|
+
this.requestOnScroll$ = this.userScrolledDown$;
|
957
|
+
if (this.immediateCallback) {
|
958
|
+
this.requestOnScroll$ = this.requestOnScroll$.pipe(startWith([AX_DEFAULT_SCROLL_POSITION, AX_DEFAULT_SCROLL_POSITION]));
|
959
|
+
}
|
960
|
+
this.requestOnScroll$.pipe(exhaustMap(() => {
|
961
|
+
return this.scrollCallback();
|
962
|
+
}));
|
963
|
+
//.subscribe((data) => { console.log(data) }, (err) => console.log(err));
|
964
|
+
}
|
965
|
+
isUserScrollingDown = (positions) => {
|
966
|
+
return positions[0].sT < positions[1].sT;
|
967
|
+
};
|
968
|
+
isScrollExpectedPercent = (position) => {
|
969
|
+
return ((position.sT + position.cH) / position.sH) > (this.scrollPercent / 100);
|
970
|
+
};
|
971
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXInfiniteScrollerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
972
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXInfiniteScrollerDirective, selector: "[axInfiniteScroller]", inputs: { scrollCallback: "scrollCallback", immediateCallback: "immediateCallback", scrollPercent: "scrollPercent" }, ngImport: i0 });
|
973
|
+
}
|
974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXInfiniteScrollerDirective, decorators: [{
|
975
|
+
type: Directive,
|
976
|
+
args: [{
|
977
|
+
selector: '[axInfiniteScroller]'
|
978
|
+
}]
|
979
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { scrollCallback: [{
|
980
|
+
type: Input
|
981
|
+
}], immediateCallback: [{
|
982
|
+
type: Input
|
983
|
+
}], scrollPercent: [{
|
984
|
+
type: Input
|
985
985
|
}] } });
|
986
986
|
|
987
|
-
class AXResponsiveDirective {
|
988
|
-
_elementRef;
|
989
|
-
_observer = new ResizeObserver(entries => {
|
990
|
-
for (let entry of entries) {
|
991
|
-
if (entry.target) {
|
992
|
-
const e = entry.target;
|
993
|
-
const elements = [e, ...Array.from(e.querySelectorAll(`[class*='sm:']`))];
|
994
|
-
elements.map(c => ({
|
995
|
-
element: c,
|
996
|
-
classList: Array.from(c.classList).filter(c => c.includes('sm')).map(c => c.slice(3))
|
997
|
-
})).forEach(c => {
|
998
|
-
e.clientWidth < 320 ? c.element.classList.add(...c.classList) : c.element.classList.remove(...c.classList);
|
999
|
-
});
|
1000
|
-
}
|
1001
|
-
}
|
1002
|
-
});
|
1003
|
-
;
|
1004
|
-
constructor(_elementRef) {
|
1005
|
-
this._elementRef = _elementRef;
|
1006
|
-
this._observer.observe(_elementRef.nativeElement);
|
1007
|
-
}
|
1008
|
-
ngOnDestroy() {
|
1009
|
-
this._observer.disconnect();
|
1010
|
-
this._observer.unobserve(this._elementRef.nativeElement);
|
1011
|
-
}
|
1012
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXResponsiveDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
1013
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXResponsiveDirective, selector: "[ax-responsive]", ngImport: i0 });
|
1014
|
-
}
|
1015
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXResponsiveDirective, decorators: [{
|
1016
|
-
type: Directive,
|
1017
|
-
args: [{ selector: '[ax-responsive]' }]
|
987
|
+
class AXResponsiveDirective {
|
988
|
+
_elementRef;
|
989
|
+
_observer = new ResizeObserver(entries => {
|
990
|
+
for (let entry of entries) {
|
991
|
+
if (entry.target) {
|
992
|
+
const e = entry.target;
|
993
|
+
const elements = [e, ...Array.from(e.querySelectorAll(`[class*='sm:']`))];
|
994
|
+
elements.map(c => ({
|
995
|
+
element: c,
|
996
|
+
classList: Array.from(c.classList).filter(c => c.includes('sm')).map(c => c.slice(3))
|
997
|
+
})).forEach(c => {
|
998
|
+
e.clientWidth < 320 ? c.element.classList.add(...c.classList) : c.element.classList.remove(...c.classList);
|
999
|
+
});
|
1000
|
+
}
|
1001
|
+
}
|
1002
|
+
});
|
1003
|
+
;
|
1004
|
+
constructor(_elementRef) {
|
1005
|
+
this._elementRef = _elementRef;
|
1006
|
+
this._observer.observe(_elementRef.nativeElement);
|
1007
|
+
}
|
1008
|
+
ngOnDestroy() {
|
1009
|
+
this._observer.disconnect();
|
1010
|
+
this._observer.unobserve(this._elementRef.nativeElement);
|
1011
|
+
}
|
1012
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXResponsiveDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
1013
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: AXResponsiveDirective, selector: "[ax-responsive]", ngImport: i0 });
|
1014
|
+
}
|
1015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXResponsiveDirective, decorators: [{
|
1016
|
+
type: Directive,
|
1017
|
+
args: [{ selector: '[ax-responsive]' }]
|
1018
1018
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
1019
1019
|
|
1020
|
-
class DynamicOverlayContainer extends OverlayContainer {
|
1021
|
-
setContainerElement(containerElement) {
|
1022
|
-
this._containerElement = containerElement;
|
1023
|
-
}
|
1024
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlayContainer, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
1025
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlayContainer, providedIn: 'root' });
|
1026
|
-
}
|
1027
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlayContainer, decorators: [{
|
1028
|
-
type: Injectable,
|
1029
|
-
args: [{
|
1030
|
-
providedIn: 'root',
|
1031
|
-
}]
|
1032
|
-
}] });
|
1033
|
-
class DynamicOverlay extends Overlay {
|
1034
|
-
_dynamicOverlayContainer;
|
1035
|
-
renderer;
|
1036
|
-
constructor(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, rendererFactory, _location, _outsideClickDispatcher) {
|
1037
|
-
super(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher);
|
1038
|
-
this.renderer = rendererFactory.createRenderer(null, null);
|
1039
|
-
this._dynamicOverlayContainer = _overlayContainer;
|
1040
|
-
}
|
1041
|
-
setContainerElement(containerElement) {
|
1042
|
-
this.renderer.setStyle(containerElement, 'transform', 'translateZ(0)');
|
1043
|
-
this._dynamicOverlayContainer.setContainerElement(containerElement);
|
1044
|
-
}
|
1045
|
-
createOn(containerElement, config) {
|
1046
|
-
this.setContainerElement(containerElement);
|
1047
|
-
return super.create(config);
|
1048
|
-
}
|
1049
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlay, deps: [{ token: i1$2.ScrollStrategyOptions }, { token: DynamicOverlayContainer }, { token: i0.ComponentFactoryResolver }, { token: i1$2.OverlayPositionBuilder }, { token: i1$2.OverlayKeyboardDispatcher }, { token: i0.Injector }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i2.Directionality }, { token: i0.RendererFactory2 }, { token: i3.Location }, { token: i1$2.OverlayOutsideClickDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });
|
1050
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlay, providedIn: 'root' });
|
1051
|
-
}
|
1052
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlay, decorators: [{
|
1053
|
-
type: Injectable,
|
1054
|
-
args: [{
|
1055
|
-
providedIn: 'root',
|
1056
|
-
}]
|
1057
|
-
}], ctorParameters: function () { return [{ type: i1$2.ScrollStrategyOptions }, { type: DynamicOverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: i1$2.OverlayPositionBuilder }, { type: i1$2.OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
1058
|
-
type: Inject,
|
1059
|
-
args: [DOCUMENT]
|
1020
|
+
class DynamicOverlayContainer extends OverlayContainer {
|
1021
|
+
setContainerElement(containerElement) {
|
1022
|
+
this._containerElement = containerElement;
|
1023
|
+
}
|
1024
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlayContainer, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
1025
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlayContainer, providedIn: 'root' });
|
1026
|
+
}
|
1027
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlayContainer, decorators: [{
|
1028
|
+
type: Injectable,
|
1029
|
+
args: [{
|
1030
|
+
providedIn: 'root',
|
1031
|
+
}]
|
1032
|
+
}] });
|
1033
|
+
class DynamicOverlay extends Overlay {
|
1034
|
+
_dynamicOverlayContainer;
|
1035
|
+
renderer;
|
1036
|
+
constructor(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, rendererFactory, _location, _outsideClickDispatcher) {
|
1037
|
+
super(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher);
|
1038
|
+
this.renderer = rendererFactory.createRenderer(null, null);
|
1039
|
+
this._dynamicOverlayContainer = _overlayContainer;
|
1040
|
+
}
|
1041
|
+
setContainerElement(containerElement) {
|
1042
|
+
this.renderer.setStyle(containerElement, 'transform', 'translateZ(0)');
|
1043
|
+
this._dynamicOverlayContainer.setContainerElement(containerElement);
|
1044
|
+
}
|
1045
|
+
createOn(containerElement, config) {
|
1046
|
+
this.setContainerElement(containerElement);
|
1047
|
+
return super.create(config);
|
1048
|
+
}
|
1049
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlay, deps: [{ token: i1$2.ScrollStrategyOptions }, { token: DynamicOverlayContainer }, { token: i0.ComponentFactoryResolver }, { token: i1$2.OverlayPositionBuilder }, { token: i1$2.OverlayKeyboardDispatcher }, { token: i0.Injector }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i2.Directionality }, { token: i0.RendererFactory2 }, { token: i3.Location }, { token: i1$2.OverlayOutsideClickDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });
|
1050
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlay, providedIn: 'root' });
|
1051
|
+
}
|
1052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DynamicOverlay, decorators: [{
|
1053
|
+
type: Injectable,
|
1054
|
+
args: [{
|
1055
|
+
providedIn: 'root',
|
1056
|
+
}]
|
1057
|
+
}], ctorParameters: function () { return [{ type: i1$2.ScrollStrategyOptions }, { type: DynamicOverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: i1$2.OverlayPositionBuilder }, { type: i1$2.OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
1058
|
+
type: Inject,
|
1059
|
+
args: [DOCUMENT]
|
1060
1060
|
}] }, { type: i2.Directionality }, { type: i0.RendererFactory2 }, { type: i3.Location }, { type: i1$2.OverlayOutsideClickDispatcher }]; } });
|
1061
1061
|
|
1062
|
-
class AXOverlayService {
|
1063
|
-
overlayService;
|
1064
|
-
overlayService2;
|
1065
|
-
appRef;
|
1066
|
-
portal;
|
1067
|
-
constructor(overlayService, overlayService2, appRef) {
|
1068
|
-
this.overlayService = overlayService;
|
1069
|
-
this.overlayService2 = overlayService2;
|
1070
|
-
this.appRef = appRef;
|
1071
|
-
}
|
1072
|
-
position() {
|
1073
|
-
return this.overlayService.position();
|
1074
|
-
}
|
1075
|
-
show(content, context, configs) {
|
1076
|
-
configs = Object.assign({
|
1077
|
-
hasBackdrop: true,
|
1078
|
-
transparentBackdrop: true,
|
1079
|
-
closeOnClickOutside: true,
|
1080
|
-
}, configs || {});
|
1081
|
-
// get root viewref
|
1082
|
-
const viewRef = this.appRef.components[0].instance.viewRef;
|
1083
|
-
// let portal: Portal<any>;
|
1084
|
-
// get component by route
|
1085
|
-
if (typeof content === 'string') {
|
1086
|
-
// TODO: ???
|
1087
|
-
}
|
1088
|
-
// create portal from component
|
1089
|
-
else if (content instanceof TemplateRef) {
|
1090
|
-
this.portal = new TemplatePortal(content, viewRef, context);
|
1091
|
-
}
|
1092
|
-
else if (typeof content === 'function') {
|
1093
|
-
this.portal = new ComponentPortal(content, viewRef);
|
1094
|
-
}
|
1095
|
-
let positionStrategy;
|
1096
|
-
if (configs.position && configs.targetElement) {
|
1097
|
-
const p = Array.isArray(configs.position)
|
1098
|
-
? configs.position
|
1099
|
-
: [configs.position];
|
1100
|
-
positionStrategy = this.overlayService
|
1101
|
-
.position()
|
1102
|
-
.flexibleConnectedTo(configs.targetElement)
|
1103
|
-
.withPositions(p)
|
1104
|
-
.withPush(true);
|
1105
|
-
}
|
1106
|
-
else {
|
1107
|
-
positionStrategy = configs.position
|
1108
|
-
? configs.position
|
1109
|
-
: this.overlayService
|
1110
|
-
.position()
|
1111
|
-
.global()
|
1112
|
-
.centerHorizontally()
|
1113
|
-
.centerVertically();
|
1114
|
-
}
|
1115
|
-
let scrollStrategy = this.overlayService.scrollStrategies.reposition({ autoClose: true });
|
1116
|
-
if (configs.scroll === 'block') {
|
1117
|
-
scrollStrategy = this.overlayService.scrollStrategies.block();
|
1118
|
-
}
|
1119
|
-
if (configs.scroll === 'close') {
|
1120
|
-
scrollStrategy = this.overlayService.scrollStrategies.close();
|
1121
|
-
}
|
1122
|
-
const config = {
|
1123
|
-
positionStrategy,
|
1124
|
-
scrollStrategy,
|
1125
|
-
hasBackdrop: configs.hasBackdrop,
|
1126
|
-
disposeOnNavigation: true,
|
1127
|
-
backdropClass: configs.backdropClass
|
1128
|
-
? configs.backdropClass
|
1129
|
-
: configs.transparentBackdrop
|
1130
|
-
? 'cdk-overlay-transparent-backdrop'
|
1131
|
-
: undefined,
|
1132
|
-
panelClass: configs.panelClass
|
1133
|
-
? configs.panelClass
|
1134
|
-
: ['ax-animate-animated', 'ax-animate-zoomIn', 'ax-animate-faster'],
|
1135
|
-
};
|
1136
|
-
let overlayRef = configs.containerElement
|
1137
|
-
? this.overlayService.createOn(configs.containerElement, config)
|
1138
|
-
: this.overlayService2.create(config);
|
1139
|
-
const host = overlayRef.attach(this.portal);
|
1140
|
-
if (host.instance) {
|
1141
|
-
Object.assign(host.instance, context);
|
1142
|
-
setTimeout(() => {
|
1143
|
-
host.changeDetectorRef.detectChanges();
|
1144
|
-
}, 0);
|
1145
|
-
}
|
1146
|
-
if (configs.closeOnClickOutside) {
|
1147
|
-
merge(overlayRef.backdropClick(), overlayRef.detachments()).subscribe(() => {
|
1148
|
-
overlayRef.dispose();
|
1149
|
-
overlayRef = undefined;
|
1150
|
-
if (configs.onBackdropClick) {
|
1151
|
-
configs.onBackdropClick();
|
1152
|
-
}
|
1153
|
-
});
|
1154
|
-
}
|
1155
|
-
return {
|
1156
|
-
instance: host.instance,
|
1157
|
-
dispose: overlayRef.dispose.bind(overlayRef),
|
1158
|
-
isOpen: () => {
|
1159
|
-
return overlayRef.hasAttached();
|
1160
|
-
},
|
1161
|
-
};
|
1162
|
-
}
|
1163
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXOverlayService, deps: [{ token: DynamicOverlay }, { token: i1$2.Overlay }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
1164
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXOverlayService, providedIn: 'root' });
|
1165
|
-
}
|
1166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXOverlayService, decorators: [{
|
1167
|
-
type: Injectable,
|
1168
|
-
args: [{ providedIn: 'root' }]
|
1062
|
+
class AXOverlayService {
|
1063
|
+
overlayService;
|
1064
|
+
overlayService2;
|
1065
|
+
appRef;
|
1066
|
+
portal;
|
1067
|
+
constructor(overlayService, overlayService2, appRef) {
|
1068
|
+
this.overlayService = overlayService;
|
1069
|
+
this.overlayService2 = overlayService2;
|
1070
|
+
this.appRef = appRef;
|
1071
|
+
}
|
1072
|
+
position() {
|
1073
|
+
return this.overlayService.position();
|
1074
|
+
}
|
1075
|
+
show(content, context, configs) {
|
1076
|
+
configs = Object.assign({
|
1077
|
+
hasBackdrop: true,
|
1078
|
+
transparentBackdrop: true,
|
1079
|
+
closeOnClickOutside: true,
|
1080
|
+
}, configs || {});
|
1081
|
+
// get root viewref
|
1082
|
+
const viewRef = this.appRef.components[0].instance.viewRef;
|
1083
|
+
// let portal: Portal<any>;
|
1084
|
+
// get component by route
|
1085
|
+
if (typeof content === 'string') {
|
1086
|
+
// TODO: ???
|
1087
|
+
}
|
1088
|
+
// create portal from component
|
1089
|
+
else if (content instanceof TemplateRef) {
|
1090
|
+
this.portal = new TemplatePortal(content, viewRef, context);
|
1091
|
+
}
|
1092
|
+
else if (typeof content === 'function') {
|
1093
|
+
this.portal = new ComponentPortal(content, viewRef);
|
1094
|
+
}
|
1095
|
+
let positionStrategy;
|
1096
|
+
if (configs.position && configs.targetElement) {
|
1097
|
+
const p = Array.isArray(configs.position)
|
1098
|
+
? configs.position
|
1099
|
+
: [configs.position];
|
1100
|
+
positionStrategy = this.overlayService
|
1101
|
+
.position()
|
1102
|
+
.flexibleConnectedTo(configs.targetElement)
|
1103
|
+
.withPositions(p)
|
1104
|
+
.withPush(true);
|
1105
|
+
}
|
1106
|
+
else {
|
1107
|
+
positionStrategy = configs.position
|
1108
|
+
? configs.position
|
1109
|
+
: this.overlayService
|
1110
|
+
.position()
|
1111
|
+
.global()
|
1112
|
+
.centerHorizontally()
|
1113
|
+
.centerVertically();
|
1114
|
+
}
|
1115
|
+
let scrollStrategy = this.overlayService.scrollStrategies.reposition({ autoClose: true });
|
1116
|
+
if (configs.scroll === 'block') {
|
1117
|
+
scrollStrategy = this.overlayService.scrollStrategies.block();
|
1118
|
+
}
|
1119
|
+
if (configs.scroll === 'close') {
|
1120
|
+
scrollStrategy = this.overlayService.scrollStrategies.close();
|
1121
|
+
}
|
1122
|
+
const config = {
|
1123
|
+
positionStrategy,
|
1124
|
+
scrollStrategy,
|
1125
|
+
hasBackdrop: configs.hasBackdrop,
|
1126
|
+
disposeOnNavigation: true,
|
1127
|
+
backdropClass: configs.backdropClass
|
1128
|
+
? configs.backdropClass
|
1129
|
+
: configs.transparentBackdrop
|
1130
|
+
? 'cdk-overlay-transparent-backdrop'
|
1131
|
+
: undefined,
|
1132
|
+
panelClass: configs.panelClass
|
1133
|
+
? configs.panelClass
|
1134
|
+
: ['ax-animate-animated', 'ax-animate-zoomIn', 'ax-animate-faster'],
|
1135
|
+
};
|
1136
|
+
let overlayRef = configs.containerElement
|
1137
|
+
? this.overlayService.createOn(configs.containerElement, config)
|
1138
|
+
: this.overlayService2.create(config);
|
1139
|
+
const host = overlayRef.attach(this.portal);
|
1140
|
+
if (host.instance) {
|
1141
|
+
Object.assign(host.instance, context);
|
1142
|
+
setTimeout(() => {
|
1143
|
+
host.changeDetectorRef.detectChanges();
|
1144
|
+
}, 0);
|
1145
|
+
}
|
1146
|
+
if (configs.closeOnClickOutside) {
|
1147
|
+
merge(overlayRef.backdropClick(), overlayRef.detachments()).subscribe(() => {
|
1148
|
+
overlayRef.dispose();
|
1149
|
+
overlayRef = undefined;
|
1150
|
+
if (configs.onBackdropClick) {
|
1151
|
+
configs.onBackdropClick();
|
1152
|
+
}
|
1153
|
+
});
|
1154
|
+
}
|
1155
|
+
return {
|
1156
|
+
instance: host.instance,
|
1157
|
+
dispose: overlayRef.dispose.bind(overlayRef),
|
1158
|
+
isOpen: () => {
|
1159
|
+
return overlayRef.hasAttached();
|
1160
|
+
},
|
1161
|
+
};
|
1162
|
+
}
|
1163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXOverlayService, deps: [{ token: DynamicOverlay }, { token: i1$2.Overlay }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
1164
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXOverlayService, providedIn: 'root' });
|
1165
|
+
}
|
1166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXOverlayService, decorators: [{
|
1167
|
+
type: Injectable,
|
1168
|
+
args: [{ providedIn: 'root' }]
|
1169
1169
|
}], ctorParameters: function () { return [{ type: DynamicOverlay }, { type: i1$2.Overlay }, { type: i0.ApplicationRef }]; } });
|
1170
1170
|
|
1171
|
-
class AXCommonModule {
|
1172
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1173
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: AXCommonModule, declarations: [AXResponsiveDirective,
|
1174
|
-
AXInfiniteScrollerDirective,
|
1175
|
-
AXNgModelChangeDebouncedDirective,
|
1176
|
-
AXAutoFocusDirective,
|
1177
|
-
AXHotkeyDirective], exports: [AXResponsiveDirective,
|
1178
|
-
AXInfiniteScrollerDirective,
|
1179
|
-
AXAutoFocusDirective,
|
1180
|
-
AXNgModelChangeDebouncedDirective,
|
1181
|
-
AXHotkeyDirective] });
|
1182
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXCommonModule });
|
1183
|
-
}
|
1184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXCommonModule, decorators: [{
|
1185
|
-
type: NgModule,
|
1186
|
-
args: [{
|
1187
|
-
imports: [],
|
1188
|
-
exports: [
|
1189
|
-
AXResponsiveDirective,
|
1190
|
-
AXInfiniteScrollerDirective,
|
1191
|
-
AXAutoFocusDirective,
|
1192
|
-
AXNgModelChangeDebouncedDirective,
|
1193
|
-
AXHotkeyDirective,
|
1194
|
-
],
|
1195
|
-
declarations: [
|
1196
|
-
AXResponsiveDirective,
|
1197
|
-
AXInfiniteScrollerDirective,
|
1198
|
-
AXNgModelChangeDebouncedDirective,
|
1199
|
-
AXAutoFocusDirective,
|
1200
|
-
AXHotkeyDirective,
|
1201
|
-
],
|
1202
|
-
providers: [],
|
1203
|
-
}]
|
1171
|
+
class AXCommonModule {
|
1172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1173
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: AXCommonModule, declarations: [AXResponsiveDirective,
|
1174
|
+
AXInfiniteScrollerDirective,
|
1175
|
+
AXNgModelChangeDebouncedDirective,
|
1176
|
+
AXAutoFocusDirective,
|
1177
|
+
AXHotkeyDirective], exports: [AXResponsiveDirective,
|
1178
|
+
AXInfiniteScrollerDirective,
|
1179
|
+
AXAutoFocusDirective,
|
1180
|
+
AXNgModelChangeDebouncedDirective,
|
1181
|
+
AXHotkeyDirective] });
|
1182
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXCommonModule });
|
1183
|
+
}
|
1184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AXCommonModule, decorators: [{
|
1185
|
+
type: NgModule,
|
1186
|
+
args: [{
|
1187
|
+
imports: [],
|
1188
|
+
exports: [
|
1189
|
+
AXResponsiveDirective,
|
1190
|
+
AXInfiniteScrollerDirective,
|
1191
|
+
AXAutoFocusDirective,
|
1192
|
+
AXNgModelChangeDebouncedDirective,
|
1193
|
+
AXHotkeyDirective,
|
1194
|
+
],
|
1195
|
+
declarations: [
|
1196
|
+
AXResponsiveDirective,
|
1197
|
+
AXInfiniteScrollerDirective,
|
1198
|
+
AXNgModelChangeDebouncedDirective,
|
1199
|
+
AXAutoFocusDirective,
|
1200
|
+
AXHotkeyDirective,
|
1201
|
+
],
|
1202
|
+
providers: [],
|
1203
|
+
}]
|
1204
1204
|
}] });
|
1205
1205
|
|
1206
|
-
/**
|
1207
|
-
* Generated bundle index. Do not edit.
|
1206
|
+
/**
|
1207
|
+
* Generated bundle index. Do not edit.
|
1208
1208
|
*/
|
1209
1209
|
|
1210
1210
|
export { AXAutoFocusDirective, AXButtonClickEvent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXItemClickEvent, AXNgModelChangeDebouncedDirective, AXOptionChangedEvent, AXOverlayService, AXPagedComponent, AXPositions, AXRangeChangedEvent, AXResponsiveDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_DIRECTIONS, AX_LOCATIONS, AX_STYLE_COLOR_TYPES, BASE_INPUTS, BASE_OUTPUT, BUTTON_INPUTS, BUTTON_OUTPUT, COLOR_INPUTS, COLOR_LOOK_INPUTS, COLOR_LOOK_OUTPUT, COLOR_OUTPUT, DynamicOverlay, DynamicOverlayContainer, INTERACTIVE_INPUTS, INTERACTIVE_OUTPUT, LOOK_INPUTS, LOOK_OUTPUT, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInteractiveComponent, MXLookComponent, MXValueComponent, TAB_META_KEY };
|