@acorex/components 6.0.16 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/src/alert.component.d.ts +4 -4
- package/avatar/src/avatar.component.d.ts +6 -9
- package/badge/src/badge.component.d.ts +1 -1
- package/breadcrumbs/src/breadcrumbs-item.component.d.ts +4 -4
- package/button/src/button-group.component.d.ts +4 -4
- package/button/src/button-item.class.d.ts +2 -1
- package/button/src/button-item.component.d.ts +4 -4
- package/button/src/button.component.d.ts +3 -1
- package/calendar/src/calendar.component.d.ts +20 -20
- package/color-picker/src/color-picker.component.d.ts +18 -21
- package/common/public-api.d.ts +1 -0
- package/common/src/auto-focus.directive.d.ts +2 -1
- package/common/src/common.module.d.ts +4 -3
- package/common/src/debounce-time.directive.d.ts +17 -0
- package/common/src/events.class.d.ts +2 -2
- package/date-picker/src/datepicker.component.d.ts +23 -23
- package/decorators/public-api.d.ts +1 -0
- package/decorators/src/decorators.module.d.ts +3 -2
- package/decorators/src/text.component.d.ts +9 -0
- package/dialog/src/dialog.service.d.ts +3 -1
- package/dropdown/src/dropdown-panel.component.d.ts +1 -0
- package/dropdown/src/dropdown.module.d.ts +7 -5
- package/esm2020/action-sheet/src/action-sheet-item.component.mjs +1 -1
- package/esm2020/alert/src/alert.component.mjs +4 -8
- package/esm2020/avatar/src/avatar.component.mjs +14 -21
- package/esm2020/badge/src/badge.component.mjs +3 -3
- package/esm2020/button/src/button-item.class.mjs +1 -1
- package/esm2020/button/src/button-item.component.mjs +3 -3
- package/esm2020/button/src/button.component.mjs +9 -6
- package/esm2020/calendar/src/calendar.component.mjs +7 -4
- package/esm2020/collapse/src/collapse.component.mjs +3 -3
- package/esm2020/color-palette/src/color-palette-input.component.mjs +1 -1
- package/esm2020/color-picker/src/color-picker.component.mjs +4 -4
- package/esm2020/common/public-api.mjs +2 -1
- package/esm2020/common/src/auto-focus.directive.mjs +7 -3
- package/esm2020/common/src/common.module.mjs +6 -1
- package/esm2020/common/src/debounce-time.directive.mjs +47 -0
- package/esm2020/common/src/events.class.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-input-selector.component.mjs +5 -4
- package/esm2020/data-pager/src/data-pager-next-buttons.components.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-numeric-selector.component.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-pagesize-dropdown.component.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-prev-buttons.component.mjs +1 -1
- package/esm2020/date-picker/src/datepicker.component.mjs +10 -9
- package/esm2020/decorators/public-api.mjs +2 -1
- package/esm2020/decorators/src/decorators.module.mjs +8 -4
- package/esm2020/decorators/src/icon.component.mjs +3 -2
- package/esm2020/decorators/src/text.component.mjs +21 -0
- package/esm2020/dialog/src/dialog.class.mjs +1 -1
- package/esm2020/dialog/src/dialog.component.mjs +1 -1
- package/esm2020/dialog/src/dialog.service.mjs +11 -7
- package/esm2020/dropdown/src/dropdown-panel.component.mjs +14 -3
- package/esm2020/dropdown/src/dropdown.module.mjs +6 -4
- package/esm2020/form/src/form.component.mjs +10 -3
- package/esm2020/form/src/validation-summary.component.mjs +1 -1
- package/esm2020/image/src/image.component.mjs +36 -9
- package/esm2020/menu/src/menu.component.mjs +5 -3
- package/esm2020/mixin/src/textbox-mixin.class.mjs +52 -83
- package/esm2020/number-box/src/number-box.component.mjs +10 -5
- package/esm2020/password-box/src/password-box.component.mjs +12 -6
- package/esm2020/popover/src/popover.component.mjs +9 -18
- package/esm2020/popup/src/popup.component.mjs +14 -6
- package/esm2020/popup/src/popup.module.mjs +4 -3
- package/esm2020/popup/src/popup.service.mjs +8 -4
- package/esm2020/search-box/src/search-box.component.mjs +4 -3
- package/esm2020/select-box/src/selectbox.component.mjs +5 -5
- package/esm2020/textarea/src/textarea.component.mjs +11 -5
- package/esm2020/textbox/public-api.mjs +2 -1
- package/esm2020/textbox/src/mask-options.directive.mjs +22 -0
- package/esm2020/textbox/src/textbox.component.mjs +66 -9
- package/esm2020/textbox/src/textbox.module.mjs +12 -11
- package/esm2020/time-box/src/time-box.component.mjs +11 -5
- package/esm2020/toast/src/toast.component.mjs +1 -1
- package/esm2020/uploader/src/uploader.component.mjs +17 -4
- package/fesm2015/acorex-components-action-sheet.mjs +1 -1
- package/fesm2015/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2015/acorex-components-alert.mjs +3 -7
- package/fesm2015/acorex-components-alert.mjs.map +1 -1
- package/fesm2015/acorex-components-avatar.mjs +13 -20
- package/fesm2015/acorex-components-avatar.mjs.map +1 -1
- package/fesm2015/acorex-components-badge.mjs +2 -2
- package/fesm2015/acorex-components-badge.mjs.map +1 -1
- package/fesm2015/acorex-components-button.mjs +10 -7
- package/fesm2015/acorex-components-button.mjs.map +1 -1
- package/fesm2015/acorex-components-calendar.mjs +5 -3
- package/fesm2015/acorex-components-calendar.mjs.map +1 -1
- package/fesm2015/acorex-components-collapse.mjs +2 -2
- package/fesm2015/acorex-components-collapse.mjs.map +1 -1
- package/fesm2015/acorex-components-color-palette.mjs +1 -1
- package/fesm2015/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2015/acorex-components-color-picker.mjs +3 -3
- package/fesm2015/acorex-components-color-picker.mjs.map +1 -1
- package/fesm2015/acorex-components-common.mjs +67 -14
- package/fesm2015/acorex-components-common.mjs.map +1 -1
- package/fesm2015/acorex-components-data-pager.mjs +8 -7
- package/fesm2015/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2015/acorex-components-date-picker.mjs +11 -9
- package/fesm2015/acorex-components-date-picker.mjs.map +1 -1
- package/fesm2015/acorex-components-decorators.mjs +27 -5
- package/fesm2015/acorex-components-decorators.mjs.map +1 -1
- package/fesm2015/acorex-components-dialog.mjs +11 -7
- package/fesm2015/acorex-components-dialog.mjs.map +1 -1
- package/fesm2015/acorex-components-dropdown.mjs +18 -5
- package/fesm2015/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2015/acorex-components-form.mjs +10 -3
- package/fesm2015/acorex-components-form.mjs.map +1 -1
- package/fesm2015/acorex-components-image.mjs +35 -8
- package/fesm2015/acorex-components-image.mjs.map +1 -1
- package/fesm2015/acorex-components-menu.mjs +5 -3
- package/fesm2015/acorex-components-menu.mjs.map +1 -1
- package/fesm2015/acorex-components-mixin.mjs +3 -33
- package/fesm2015/acorex-components-mixin.mjs.map +1 -1
- package/fesm2015/acorex-components-number-box.mjs +10 -5
- package/fesm2015/acorex-components-number-box.mjs.map +1 -1
- package/fesm2015/acorex-components-password-box.mjs +11 -5
- package/fesm2015/acorex-components-password-box.mjs.map +1 -1
- package/fesm2015/acorex-components-popover.mjs +9 -18
- package/fesm2015/acorex-components-popover.mjs.map +1 -1
- package/fesm2015/acorex-components-popup.mjs +23 -11
- package/fesm2015/acorex-components-popup.mjs.map +1 -1
- package/fesm2015/acorex-components-search-box.mjs +3 -2
- package/fesm2015/acorex-components-search-box.mjs.map +1 -1
- package/fesm2015/acorex-components-select-box.mjs +4 -4
- package/fesm2015/acorex-components-select-box.mjs.map +1 -1
- package/fesm2015/acorex-components-textarea.mjs +10 -4
- package/fesm2015/acorex-components-textarea.mjs.map +1 -1
- package/fesm2015/acorex-components-textbox.mjs +96 -20
- package/fesm2015/acorex-components-textbox.mjs.map +1 -1
- package/fesm2015/acorex-components-time-box.mjs +11 -5
- package/fesm2015/acorex-components-time-box.mjs.map +1 -1
- package/fesm2015/acorex-components-toast.mjs +1 -1
- package/fesm2015/acorex-components-toast.mjs.map +1 -1
- package/fesm2015/acorex-components-uploader.mjs +16 -3
- package/fesm2015/acorex-components-uploader.mjs.map +1 -1
- package/fesm2020/acorex-components-action-sheet.mjs +1 -1
- package/fesm2020/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2020/acorex-components-alert.mjs +3 -7
- package/fesm2020/acorex-components-alert.mjs.map +1 -1
- package/fesm2020/acorex-components-avatar.mjs +13 -20
- package/fesm2020/acorex-components-avatar.mjs.map +1 -1
- package/fesm2020/acorex-components-badge.mjs +2 -2
- package/fesm2020/acorex-components-badge.mjs.map +1 -1
- package/fesm2020/acorex-components-button.mjs +10 -7
- package/fesm2020/acorex-components-button.mjs.map +1 -1
- package/fesm2020/acorex-components-calendar.mjs +5 -3
- package/fesm2020/acorex-components-calendar.mjs.map +1 -1
- package/fesm2020/acorex-components-collapse.mjs +2 -2
- package/fesm2020/acorex-components-collapse.mjs.map +1 -1
- package/fesm2020/acorex-components-color-palette.mjs +1 -1
- package/fesm2020/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2020/acorex-components-color-picker.mjs +3 -3
- package/fesm2020/acorex-components-color-picker.mjs.map +1 -1
- package/fesm2020/acorex-components-common.mjs +66 -14
- package/fesm2020/acorex-components-common.mjs.map +1 -1
- package/fesm2020/acorex-components-data-pager.mjs +8 -7
- package/fesm2020/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2020/acorex-components-date-picker.mjs +10 -9
- package/fesm2020/acorex-components-date-picker.mjs.map +1 -1
- package/fesm2020/acorex-components-decorators.mjs +27 -5
- package/fesm2020/acorex-components-decorators.mjs.map +1 -1
- package/fesm2020/acorex-components-dialog.mjs +11 -7
- package/fesm2020/acorex-components-dialog.mjs.map +1 -1
- package/fesm2020/acorex-components-dropdown.mjs +18 -5
- package/fesm2020/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2020/acorex-components-form.mjs +10 -3
- package/fesm2020/acorex-components-form.mjs.map +1 -1
- package/fesm2020/acorex-components-image.mjs +35 -8
- package/fesm2020/acorex-components-image.mjs.map +1 -1
- package/fesm2020/acorex-components-menu.mjs +5 -3
- package/fesm2020/acorex-components-menu.mjs.map +1 -1
- package/fesm2020/acorex-components-mixin.mjs +51 -81
- package/fesm2020/acorex-components-mixin.mjs.map +1 -1
- package/fesm2020/acorex-components-number-box.mjs +10 -5
- package/fesm2020/acorex-components-number-box.mjs.map +1 -1
- package/fesm2020/acorex-components-password-box.mjs +11 -5
- package/fesm2020/acorex-components-password-box.mjs.map +1 -1
- package/fesm2020/acorex-components-popover.mjs +8 -17
- package/fesm2020/acorex-components-popover.mjs.map +1 -1
- package/fesm2020/acorex-components-popup.mjs +23 -11
- package/fesm2020/acorex-components-popup.mjs.map +1 -1
- package/fesm2020/acorex-components-search-box.mjs +3 -2
- package/fesm2020/acorex-components-search-box.mjs.map +1 -1
- package/fesm2020/acorex-components-select-box.mjs +4 -4
- package/fesm2020/acorex-components-select-box.mjs.map +1 -1
- package/fesm2020/acorex-components-textarea.mjs +10 -4
- package/fesm2020/acorex-components-textarea.mjs.map +1 -1
- package/fesm2020/acorex-components-textbox.mjs +95 -20
- package/fesm2020/acorex-components-textbox.mjs.map +1 -1
- package/fesm2020/acorex-components-time-box.mjs +11 -5
- package/fesm2020/acorex-components-time-box.mjs.map +1 -1
- package/fesm2020/acorex-components-toast.mjs +1 -1
- package/fesm2020/acorex-components-toast.mjs.map +1 -1
- package/fesm2020/acorex-components-uploader.mjs +16 -3
- package/fesm2020/acorex-components-uploader.mjs.map +1 -1
- package/form/src/form.component.d.ts +2 -0
- package/image/src/image.component.d.ts +16 -7
- package/menu/src/menu.component.d.ts +1 -0
- package/mixin/src/base-components.class.d.ts +1 -1
- package/mixin/src/base-menu-mixin.class.d.ts +4 -4
- package/mixin/src/button-mixin.class.d.ts +1 -1
- package/mixin/src/clickable-mixin.class.d.ts +1 -1
- package/mixin/src/color-look-mixing.class.d.ts +1 -1
- package/mixin/src/datalist-component.class.d.ts +9 -9
- package/mixin/src/dropdown-mixin.class.d.ts +1 -1
- package/mixin/src/interactive-mixin.class.d.ts +3 -3
- package/mixin/src/loading-mixin.class.d.ts +1 -1
- package/mixin/src/mixin.class.d.ts +42 -47
- package/mixin/src/page-component.class.d.ts +1 -1
- package/mixin/src/selection-component.class.d.ts +1 -1
- package/mixin/src/sizable-mixin.class.d.ts +1 -1
- package/mixin/src/textbox-mixin.class.d.ts +4 -13
- package/mixin/src/value-mixin.class.d.ts +7 -7
- package/number-box/src/number-box.component.d.ts +3 -1
- package/package.json +1 -9
- package/password-box/src/password-box.component.d.ts +3 -1
- package/popover/src/popover.component.d.ts +2 -2
- package/popup/src/popup.module.d.ts +7 -6
- package/select-box/src/selectbox.component.d.ts +1 -1
- package/tabs/src/tab-item.component.d.ts +1 -1
- package/textarea/src/textarea.component.d.ts +3 -1
- package/textbox/public-api.d.ts +1 -0
- package/textbox/src/mask-options.directive.d.ts +13 -0
- package/textbox/src/textbox.component.d.ts +14 -3
- package/textbox/src/textbox.module.d.ts +7 -6
- package/time-box/src/time-box.component.d.ts +4 -2
- package/uploader/src/uploader.component.d.ts +4 -0
- package/esm2020/input-mask/acorex-components-input-mask.mjs +0 -5
- package/esm2020/input-mask/public-api.mjs +0 -3
- package/esm2020/input-mask/src/input-mask.component.mjs +0 -58
- package/esm2020/input-mask/src/input-mask.module.mjs +0 -24
- package/fesm2015/acorex-components-input-mask.mjs +0 -86
- package/fesm2015/acorex-components-input-mask.mjs.map +0 -1
- package/fesm2020/acorex-components-input-mask.mjs +0 -86
- package/fesm2020/acorex-components-input-mask.mjs.map +0 -1
- package/input-mask/index.d.ts +0 -5
- package/input-mask/public-api.d.ts +0 -2
- package/input-mask/src/input-mask.component.d.ts +0 -25
- package/input-mask/src/input-mask.module.d.ts +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../projects/acorex/components/toast/src/toast.component.ts","../../../../projects/acorex/components/toast/src/toast.component.html","../../../../projects/acorex/components/toast/src/toast.module.ts","../../../../projects/acorex/components/toast/src/toast.service.ts","../../../../projects/acorex/components/toast/acorex-components-toast.ts"],"sourcesContent":["import { AXClosbaleComponent } from '@acorex/components/common';\r\nimport { AXButtonItem } from '@acorex/components/button';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport { AXToastOptions } from './toast.class';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-toast',\r\n templateUrl: './toast.component.html',\r\n host: { class: 'ax-toast' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\r\n})\r\nexport class AXToastComponent extends AXBaseComponentMixin {\r\n options: AXToastOptions;\r\n _toastWidth: number = 100;\r\n _icon: string;\r\n close: () => void;\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n if (this.options.timeOut) {\r\n setTimeout(() => {\r\n this.close();\r\n }, this.options.timeOut);\r\n }\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-ic ax-ic-check-filled';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-ic ax-ic-warning-filled';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-ic ax-ic-error-filled';\r\n break;\r\n default:\r\n this._icon = '';\r\n break;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n}\r\n","<ax-alert [color]=\"options.color\" [look]=\"options.look\" [timeOut]=\"options.timeOut\">\r\n <ax-header *ngIf=\"options.title\">\r\n <ax-prefix>\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n </ax-prefix>\r\n <ax-suffix>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n </ax-suffix>\r\n </ax-header>\r\n <ax-content *ngIf=\"options.content\">\r\n <ax-icon *ngIf=\"_icon && !options.title\" [icon]=\"_icon\"></ax-icon>\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ng-container>\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ng-container>\r\n </ax-footer>\r\n</ax-alert>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXToastComponent } from './toast.component';\r\nimport { AXAlertModule } from '@acorex/components/alert';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\n\r\nconst COMPONENT = [AXToastComponent];\r\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXAlertModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXToastModule {\r\n \r\n}\r\n","import { AXConfig } from '@acorex/core/config';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { AXToastOptions, AXToastRef } from './toast.class';\r\nimport { AXToastComponent } from './toast.component';\r\n\r\n\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXToastService {\r\n\r\n\r\n private readonly _defaults = {\r\n gap: 5,\r\n timeOut: 2500,\r\n location: 'bottom-center',\r\n }\r\n\r\n constructor(private overlayService: Overlay, private parentInjector: Injector) {\r\n\r\n }\r\n\r\n private _activeList: AXToastComponent[] = [];\r\n\r\n primary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'primary',\r\n content: content\r\n });\r\n }\r\n secondary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'secondary',\r\n content: content\r\n });\r\n }\r\n info(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'info',\r\n content: content\r\n });\r\n }\r\n\r\n success(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'success',\r\n content: content\r\n });\r\n }\r\n\r\n warning(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'warning',\r\n content: content\r\n });\r\n }\r\n\r\n danger(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'danger',\r\n content: content\r\n });\r\n }\r\n light(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'light',\r\n content: content\r\n });\r\n }\r\n dark(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'dark',\r\n content: content\r\n });\r\n }\r\n\r\n show(options: AXToastOptions): AXToastRef {\r\n const opt = Object.assign(\r\n {\r\n closeable: true,\r\n location: AXConfig.get('toast.location') || this._defaults.location\r\n },\r\n options\r\n );\r\n const gap = AXConfig.get('toast.gap') || this._defaults.gap;\r\n\r\n let positionStrategy = this.overlayService.position().global();\r\n const pos = this.getPosition(opt.location) + gap + 'px';\r\n switch (opt.location) {\r\n case 'bottom-center':\r\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally()\r\n break;\r\n case 'bottom-end':\r\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\r\n break;\r\n case 'bottom-start':\r\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\r\n break;\r\n case 'top-center':\r\n positionStrategy = positionStrategy.top(pos).centerHorizontally()\r\n break;\r\n case 'top-end':\r\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\r\n break;\r\n case 'top-start':\r\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\r\n break;\r\n case 'center-start':\r\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\r\n break;\r\n case 'center-end':\r\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\r\n break;\r\n default:\r\n break;\r\n }\r\n const overlayRef = this.overlayService.create(\r\n {\r\n positionStrategy,\r\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\r\n });\r\n const toastPortal = new ComponentPortal(AXToastComponent, null, this.parentInjector);\r\n\r\n const host = overlayRef.attach(toastPortal);\r\n (host.instance as any).visibleIndex = this._activeList.length;\r\n this._activeList.push(host.instance);\r\n if (host.instance) {\r\n Object.assign(host.instance, {\r\n options: opt,\r\n close: () => {\r\n this._activeList = this._activeList.filter(c => c != host.instance);\r\n overlayRef.dispose()\r\n }\r\n });\r\n setTimeout(() => {\r\n host.changeDetectorRef.detectChanges();\r\n }, 0);\r\n }\r\n\r\n return {\r\n close: () => {\r\n host.instance.close();\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n public hideAll() {\r\n this._activeList.forEach(c => c.close());\r\n }\r\n\r\n private getPosition(location: string) {\r\n const list = this._activeList.filter(c => c.options.location == location);\r\n if (list.length == 0) return 0;\r\n if (location.split('-')[0] == 'bottom') {\r\n return window.innerHeight - list[list.length - 1]._getHostElement().offsetTop;\r\n }\r\n else {\r\n return list[list.length - 1]._getHostElement().offsetTop + list[list.length - 1]._getHostElement().offsetHeight;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;AAYA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,oBAAoB,CAAA;AAKxD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAPzB,QAAA,IAAW,CAAA,WAAA,GAAW,GAAG,CAAC;KAQzB;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACxB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;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AAC,CAAC,IAAI,QAAQ,EAAE;AACpC,YAAA,OAAO,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC;AACjF,SAAA;AACI,aAAA;YACD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,YAAY,CAAC;AACnH,SAAA;KACJ;;2GAhKQ,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA,CAAA;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACTlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../projects/acorex/components/toast/src/toast.component.ts","../../../../projects/acorex/components/toast/src/toast.component.html","../../../../projects/acorex/components/toast/src/toast.module.ts","../../../../projects/acorex/components/toast/src/toast.service.ts","../../../../projects/acorex/components/toast/acorex-components-toast.ts"],"sourcesContent":["import { AXClosbaleComponent } from '@acorex/components/common';\r\nimport { AXButtonItem } from '@acorex/components/button';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport { AXToastOptions } from './toast.class';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-toast',\r\n templateUrl: './toast.component.html',\r\n host: { class: 'ax-toast' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\r\n})\r\nexport class AXToastComponent extends AXBaseComponentMixin {\r\n options: AXToastOptions;\r\n _toastWidth: number = 100;\r\n _icon: string;\r\n close: () => void;\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n if (this.options.timeOut) {\r\n setTimeout(() => {\r\n this.close();\r\n }, this.options.timeOut);\r\n }\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-ic ax-ic-check-filled';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-ic ax-ic-warning-filled';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-ic ax-ic-error-filled';\r\n break;\r\n default:\r\n this._icon = '';\r\n break;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n}\r\n","<ax-alert [color]=\"options.color\" [look]=\"options.look\" [timeOut]=\"options.timeOut\">\r\n <ax-header *ngIf=\"options.title\">\r\n <ax-prefix>\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n </ax-prefix>\r\n <ax-suffix>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n </ax-suffix>\r\n </ax-header>\r\n <ax-content *ngIf=\"options.content\">\r\n <ax-icon *ngIf=\"_icon && !options.title\" [icon]=\"_icon\"></ax-icon>\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ng-container>\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ng-container>\r\n </ax-footer>\r\n</ax-alert>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXToastComponent } from './toast.component';\r\nimport { AXAlertModule } from '@acorex/components/alert';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\n\r\nconst COMPONENT = [AXToastComponent];\r\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXAlertModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXToastModule {\r\n \r\n}\r\n","import { AXConfig } from '@acorex/core/config';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { AXToastOptions, AXToastRef } from './toast.class';\r\nimport { AXToastComponent } from './toast.component';\r\n\r\n\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXToastService {\r\n\r\n\r\n private readonly _defaults = {\r\n gap: 5,\r\n timeOut: 2500,\r\n location: 'bottom-center',\r\n }\r\n\r\n constructor(private overlayService: Overlay, private parentInjector: Injector) {\r\n\r\n }\r\n\r\n private _activeList: AXToastComponent[] = [];\r\n\r\n primary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'primary',\r\n content: content\r\n });\r\n }\r\n secondary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'secondary',\r\n content: content\r\n });\r\n }\r\n info(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'info',\r\n content: content\r\n });\r\n }\r\n\r\n success(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'success',\r\n content: content\r\n });\r\n }\r\n\r\n warning(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'warning',\r\n content: content\r\n });\r\n }\r\n\r\n danger(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'danger',\r\n content: content\r\n });\r\n }\r\n light(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'light',\r\n content: content\r\n });\r\n }\r\n dark(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'dark',\r\n content: content\r\n });\r\n }\r\n\r\n show(options: AXToastOptions): AXToastRef {\r\n const opt = Object.assign(\r\n {\r\n closeable: true,\r\n location: AXConfig.get('toast.location') || this._defaults.location\r\n },\r\n options\r\n );\r\n const gap = AXConfig.get('toast.gap') || this._defaults.gap;\r\n\r\n let positionStrategy = this.overlayService.position().global();\r\n const pos = this.getPosition(opt.location) + gap + 'px';\r\n switch (opt.location) {\r\n case 'bottom-center':\r\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally()\r\n break;\r\n case 'bottom-end':\r\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\r\n break;\r\n case 'bottom-start':\r\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\r\n break;\r\n case 'top-center':\r\n positionStrategy = positionStrategy.top(pos).centerHorizontally()\r\n break;\r\n case 'top-end':\r\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\r\n break;\r\n case 'top-start':\r\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\r\n break;\r\n case 'center-start':\r\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\r\n break;\r\n case 'center-end':\r\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\r\n break;\r\n default:\r\n break;\r\n }\r\n const overlayRef = this.overlayService.create(\r\n {\r\n positionStrategy,\r\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\r\n });\r\n const toastPortal = new ComponentPortal(AXToastComponent, null, this.parentInjector);\r\n\r\n const host = overlayRef.attach(toastPortal);\r\n (host.instance as any).visibleIndex = this._activeList.length;\r\n this._activeList.push(host.instance);\r\n if (host.instance) {\r\n Object.assign(host.instance, {\r\n options: opt,\r\n close: () => {\r\n this._activeList = this._activeList.filter(c => c != host.instance);\r\n overlayRef.dispose()\r\n }\r\n });\r\n setTimeout(() => {\r\n host.changeDetectorRef.detectChanges();\r\n }, 0);\r\n }\r\n\r\n return {\r\n close: () => {\r\n host.instance.close();\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n public hideAll() {\r\n this._activeList.forEach(c => c.close());\r\n }\r\n\r\n private getPosition(location: string) {\r\n const list = this._activeList.filter(c => c.options.location == location);\r\n if (list.length == 0) return 0;\r\n if (location.split('-')[0] == 'bottom') {\r\n return window.innerHeight - list[list.length - 1]._getHostElement().offsetTop;\r\n }\r\n else {\r\n return list[list.length - 1]._getHostElement().offsetTop + list[list.length - 1]._getHostElement().offsetHeight;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;AAYA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,oBAAoB,CAAA;AAKxD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAPzB,QAAA,IAAW,CAAA,WAAA,GAAW,GAAG,CAAC;KAQzB;IAED,MA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AC1E,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC;AAAE,YAAA,OAAO,CAAC,CAAC;QAC/B,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE;AACpC,YAAA,OAAO,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC;AACjF,SAAA;AACI,aAAA;YACD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,YAAY,CAAC;AACnH,SAAA;KACJ;;2GAhKQ,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA,CAAA;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACTlC;;AAEG;;;;"}
|
|
@@ -12,6 +12,8 @@ class AXUploaderComponent extends AXBaseComponentMixin {
|
|
|
12
12
|
super(elementRef, cdr);
|
|
13
13
|
this._fileService = _fileService;
|
|
14
14
|
this.onValueChanged = new EventEmitter();
|
|
15
|
+
this.firstInit = true;
|
|
16
|
+
this._showText = true;
|
|
15
17
|
this.multiple = false;
|
|
16
18
|
this.accept = '*/*';
|
|
17
19
|
}
|
|
@@ -37,7 +39,7 @@ class AXUploaderComponent extends AXBaseComponentMixin {
|
|
|
37
39
|
component: this,
|
|
38
40
|
isUserInteraction: true,
|
|
39
41
|
value: files,
|
|
40
|
-
htmlElement: this._getHostElement()
|
|
42
|
+
htmlElement: this._getHostElement(),
|
|
41
43
|
});
|
|
42
44
|
}
|
|
43
45
|
onInit() {
|
|
@@ -52,6 +54,17 @@ class AXUploaderComponent extends AXBaseComponentMixin {
|
|
|
52
54
|
this._dropArea.addEventListener(eventName, this._handleUnhighlight.bind(this), false);
|
|
53
55
|
});
|
|
54
56
|
}
|
|
57
|
+
ngDoCheck() {
|
|
58
|
+
this.checkIsBoxHasMinWidth();
|
|
59
|
+
}
|
|
60
|
+
checkIsBoxHasMinWidth() {
|
|
61
|
+
this.firstInit = false;
|
|
62
|
+
let boxWidth = this._getHostElement().getBoundingClientRect().width;
|
|
63
|
+
console.log(boxWidth);
|
|
64
|
+
if (boxWidth <= 176 && this.firstInit === false) {
|
|
65
|
+
this._showText = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
55
68
|
preventDefaults(e) {
|
|
56
69
|
e.preventDefault();
|
|
57
70
|
e.stopPropagation();
|
|
@@ -68,10 +81,10 @@ class AXUploaderComponent extends AXBaseComponentMixin {
|
|
|
68
81
|
}
|
|
69
82
|
}
|
|
70
83
|
AXUploaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXUploaderComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.AXFileService }], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
-
AXUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXUploaderComponent, selector: "ax-uploader", inputs: { multiple: "multiple", accept: "accept" }, outputs: { onValueChanged: "onValueChanged" }, host: { listeners: { "click": "_handleClick($event)", "drop": "_handleDrop($event)" }, properties: { "class.ax-look-default": "this.__defaultClass" } }, viewQueries: [{ propertyName: "_placeholder", first: true, predicate: ["contentRef"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
84
|
+
AXUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXUploaderComponent, selector: "ax-uploader", inputs: { multiple: "multiple", accept: "accept" }, outputs: { onValueChanged: "onValueChanged" }, host: { listeners: { "click": "_handleClick($event)", "drop": "_handleDrop($event)" }, properties: { "class.ax-look-default": "this.__defaultClass" } }, viewQueries: [{ propertyName: "_placeholder", first: true, predicate: ["contentRef"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\" *ngIf=\"_showText\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
72
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXUploaderComponent, decorators: [{
|
|
73
86
|
type: Component,
|
|
74
|
-
args: [{ selector: 'ax-uploader', encapsulation: ViewEncapsulation.None, template: "<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>" }]
|
|
87
|
+
args: [{ selector: 'ax-uploader', encapsulation: ViewEncapsulation.None, template: "<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\" *ngIf=\"_showText\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>" }]
|
|
75
88
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.AXFileService }]; }, propDecorators: { onValueChanged: [{
|
|
76
89
|
type: Output
|
|
77
90
|
}], _placeholder: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-uploader.mjs","sources":["../../../../projects/acorex/components/uploader/src/uploader.component.ts","../../../../projects/acorex/components/uploader/src/uploader.component.html","../../../../projects/acorex/components/uploader/src/uploader.module.ts","../../../../projects/acorex/components/uploader/acorex-components-uploader.ts"],"sourcesContent":["import { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXFileService } from '@acorex/core/file';\r\nimport {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n Input,\r\n Output,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-uploader',\r\n templateUrl: './uploader.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXUploaderComponent extends AXBaseComponentMixin {\r\n
|
|
1
|
+
{"version":3,"file":"acorex-components-uploader.mjs","sources":["../../../../projects/acorex/components/uploader/src/uploader.component.ts","../../../../projects/acorex/components/uploader/src/uploader.component.html","../../../../projects/acorex/components/uploader/src/uploader.module.ts","../../../../projects/acorex/components/uploader/acorex-components-uploader.ts"],"sourcesContent":["import { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXFileService } from '@acorex/core/file';\r\nimport {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n Input,\r\n Output,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-uploader',\r\n templateUrl: './uploader.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXUploaderComponent extends AXBaseComponentMixin {\r\n @Output()\r\n onValueChanged: EventEmitter<AXValueChangedEvent<File[]>> = new EventEmitter<\r\n AXValueChangedEvent<File[]>\r\n >();\r\n\r\n firstInit: boolean = true;\r\n _showText: boolean = true;\r\n\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef,\r\n private _fileService: AXFileService\r\n ) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n @ViewChild('contentRef', { static: true })\r\n _placeholder: ElementRef;\r\n\r\n @Input()\r\n multiple: boolean = false;\r\n\r\n @Input()\r\n accept: string = '*/*';\r\n\r\n private _dropArea: HTMLDivElement;\r\n\r\n @HostListener('click', ['$event'])\r\n async _handleClick(e: MouseEvent) {\r\n const files = await this._fileService.choose({\r\n accept: this.accept,\r\n multiple: this.multiple,\r\n });\r\n this._handleFiles(files);\r\n }\r\n\r\n @HostListener('drop', ['$event'])\r\n async _handleDrop(e: any) {\r\n let dt = e.dataTransfer;\r\n let files = dt.files;\r\n this._handleFiles(Array.from(files));\r\n e.preventDefault();\r\n }\r\n\r\n _handleFiles(files: File[]) {\r\n this.onValueChanged.emit({\r\n component: this,\r\n isUserInteraction: true,\r\n value: files,\r\n htmlElement: this._getHostElement(),\r\n });\r\n }\r\n\r\n onInit(): void {\r\n this._dropArea = this._getHostElement();\r\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\r\n this._dropArea.addEventListener(eventName, this.preventDefaults, false);\r\n });\r\n ['dragenter', 'dragover'].forEach((eventName) => {\r\n this._dropArea.addEventListener(\r\n eventName,\r\n this._handleHighlight.bind(this),\r\n false\r\n );\r\n });\r\n\r\n ['dragleave', 'drop'].forEach((eventName) => {\r\n this._dropArea.addEventListener(\r\n eventName,\r\n this._handleUnhighlight.bind(this),\r\n false\r\n );\r\n });\r\n }\r\n\r\n ngDoCheck() {\r\n this.checkIsBoxHasMinWidth()\r\n }\r\n \r\n checkIsBoxHasMinWidth(){\r\n this.firstInit = false;\r\n let boxWidth: number = this._getHostElement().getBoundingClientRect().width;\r\n console.log(boxWidth);\r\n \r\n if (boxWidth <= 176 && this.firstInit === false) {\r\n this._showText = false;\r\n }\r\n }\r\n\r\n preventDefaults(e: any) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n _handleHighlight(e) {\r\n this._dropArea.classList.add('ax-state-hover');\r\n }\r\n\r\n _handleUnhighlight(e) {\r\n this._dropArea.classList.remove('ax-state-hover');\r\n }\r\n\r\n @HostBinding('class.ax-look-default')\r\n get __defaultClass() {\r\n return !this._placeholder?.nativeElement.childNodes.length;\r\n }\r\n}\r\n","<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\" *ngIf=\"_showText\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXUploaderComponent } from './uploader.component';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\n\r\n@NgModule({\r\n declarations: [AXUploaderComponent],\r\n imports: [CommonModule,AXDecoratorModule],\r\n exports: [AXUploaderComponent],\r\n providers: [],\r\n})\r\nexport class AXUploaderModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAqBM,MAAO,mBAAoB,SAAQ,oBAAoB,CAAA;AAS3D,IAAA,WAAA,CACE,UAAsB,EACtB,GAAsB,EACd,YAA2B,EAAA;AAEnC,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAFf,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAe;AAVrC,QAAA,IAAA,CAAA,cAAc,GAA8C,IAAI,YAAY,EAEzE,CAAC;AAEJ,QAAA,IAAS,CAAA,SAAA,GAAY,IAAI,CAAC;AAC1B,QAAA,IAAS,CAAA,SAAA,GAAY,IAAI,CAAC;AAc1B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;AAG1B,QAAA,IAAM,CAAA,MAAA,GAAW,KAAK,CAAC;KATtB;AAcK,IAAA,YAAY,CAAC,CAAa,EAAA;;YAC9B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;gBAC3C,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,aAAA,CAAC,CAAC;AACH,YAAA,IAAI,CAAC,YAAY,CAAC,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CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBALZ,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACxB,YAAY,EAAC,iBAAiB,aAC9B,mBAAmB,CAAA,EAAA,CAAA,CAAA;8GAGlB,gBAAgB,EAAA,OAAA,EAAA,CAJjB,YAAY,EAAC,iBAAiB,CAAA,EAAA,CAAA,CAAA;2FAI7B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAC,iBAAiB,CAAC;oBACzC,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -110,7 +110,7 @@ AXActionSheetItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
110
110
|
[text]="text"
|
|
111
111
|
(onClick)="_handleOnClick($event)"
|
|
112
112
|
></ax-button>
|
|
113
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }] });
|
|
113
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }] });
|
|
114
114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXActionSheetItemComponent, decorators: [{
|
|
115
115
|
type: Component,
|
|
116
116
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet-item.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXBaseComponent } from '@acorex/components/mixin';\r\nimport {\r\n trigger,\r\n state,\r\n style,\r\n transition,\r\n animate,\r\n} from '@angular/animations';\r\nimport { ChangeDetectorRef, Component, ElementRef, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n animations: [\r\n trigger('backdrop', [\r\n state(\r\n 'show',\r\n style({\r\n opacity: 1,\r\n visibility: 'visible',\r\n })\r\n ),\r\n state(\r\n 'hide',\r\n style({\r\n visibility: 'hidden',\r\n opacity: 0,\r\n })\r\n ),\r\n transition('show <=> hide', [animate('0.2s')]),\r\n ]),\r\n\r\n trigger('openClose', [\r\n state(\r\n 'open',\r\n style({\r\n bottom: '0',\r\n opacity: 1,\r\n })\r\n ),\r\n state(\r\n 'closed',\r\n style({\r\n bottom: '-100%',\r\n opacity: 0.5,\r\n })\r\n ),\r\n transition('open <=> closed', [animate('0.2s')]),\r\n ]),\r\n ],\r\n host: { class: 'ax-action-sheet' },\r\n})\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n @Input() caption = '';\r\n @Input() closeOnBackdrop = true;\r\n isOpen = false;\r\n\r\n _backdrop: HTMLElement;\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleBackdropClick() {\r\n if (!this.closeOnBackdrop) return;\r\n this.close();\r\n }\r\n\r\n open() {\r\n this.isOpen = true;\r\n }\r\n\r\n close() {\r\n this.isOpen = false;\r\n }\r\n\r\n toggle() {\r\n this.isOpen = !this.isOpen;\r\n }\r\n}\r\n","<div class=\"ax-action-sheet-backdrop\" [@backdrop]=\"isOpen ? 'show' : 'hide'\" (click)=\"_handleBackdropClick()\"></div>\r\n<div class=\"ax-action-sheet-container\" [@openClose]=\"isOpen ? 'open' : 'closed'\">\r\n <div class=\"ax-bg-white ax-h-full dark:ax-bg-dark-700\">\r\n <div class=\"ax-action-sheet-caption\" *ngIf=\"caption\">\r\n {{caption}}\r\n </div>\r\n <ng-content select=\"ax-content\"></ng-content>\r\n <div class=\"ax-action-sheet-items\">\r\n <ng-content select=\"ax-action-sheet-item\"></ng-content>\r\n </div>\r\n </div>\r\n</div>","import {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n} from '@angular/core';\r\nimport {\r\n AXButtonClickEvent,\r\n AXStyleColorType,\r\n} from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet-item',\r\n template: `\r\n <ax-button\r\n [color]=\"color\"\r\n look=\"blank\"\r\n [text]=\"text\"\r\n (onClick)=\"_handleOnClick($event)\"\r\n ></ax-button>\r\n `,\r\n})\r\nexport class AXActionSheetItemComponent extends AXBaseComponent {\r\n @Input()\r\n text: string;\r\n\r\n @Input()\r\n color: AXStyleColorType = 'light';\r\n\r\n @Output()\r\n onClick: EventEmitter<AXButtonClickEvent> = new EventEmitter<AXButtonClickEvent>();\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleOnClick(e: any) {\r\n this.onClick.emit(e);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetItemComponent } from './action-sheet-item.component';\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n imports: [CommonModule, AXButtonModule],\r\n exports: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAoDM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAMzD;;AAEG;IACH,WAAY,CAAA,WAAuB,EAAE,IAAuB,EAAA;AAC1D,QAAA,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QATlB,IAAO,CAAA,OAAA,GAAG,EAAE,CAAC;QACb,IAAe,CAAA,eAAA,GAAG,IAAI,CAAC;QAChC,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;KAQd;IAED,oBAAoB,GAAA;QAClB,IAAI,CAAC,IAAI,CAAC,eAAe;YAAE,OAAO;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;KACd;IAED,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;KACpB;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;KACrB;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;KAC5B;;mHA5BU,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;uGAAtB,sBAAsB,EAAA,Q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AAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,CAAA;;;;;;;AAOT,EAAA,CAAA;AACF,iBAAA,CAAA;iIAGC,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,KAAK,EAAA,CAAA;sBADJ,KAAK;gBAIN,OAAO,EAAA,CAAA;sBADN,MAAM;;;MCpBI,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAnB,mBAAmB,EAAA,YAAA,EAAA,CALf,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,OAAA,EAAA,CACvD,YAAY,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAC5B,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;iHAGjD,mBAAmB,EAAA,OAAA,EAAA,CAJpB,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;2FAI3B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;AACvC,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAC7D,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet-item.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXBaseComponent } from '@acorex/components/mixin';\r\nimport {\r\n trigger,\r\n state,\r\n style,\r\n transition,\r\n animate,\r\n} from '@angular/animations';\r\nimport { ChangeDetectorRef, Component, ElementRef, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n animations: [\r\n trigger('backdrop', [\r\n state(\r\n 'show',\r\n style({\r\n opacity: 1,\r\n visibility: 'visible',\r\n })\r\n ),\r\n state(\r\n 'hide',\r\n style({\r\n visibility: 'hidden',\r\n opacity: 0,\r\n })\r\n ),\r\n transition('show <=> hide', [animate('0.2s')]),\r\n ]),\r\n\r\n trigger('openClose', [\r\n state(\r\n 'open',\r\n style({\r\n bottom: '0',\r\n opacity: 1,\r\n })\r\n ),\r\n state(\r\n 'closed',\r\n style({\r\n bottom: '-100%',\r\n opacity: 0.5,\r\n })\r\n ),\r\n transition('open <=> closed', [animate('0.2s')]),\r\n ]),\r\n ],\r\n host: { class: 'ax-action-sheet' },\r\n})\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n @Input() caption = '';\r\n @Input() closeOnBackdrop = true;\r\n isOpen = false;\r\n\r\n _backdrop: HTMLElement;\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleBackdropClick() {\r\n if (!this.closeOnBackdrop) return;\r\n this.close();\r\n }\r\n\r\n open() {\r\n this.isOpen = true;\r\n }\r\n\r\n close() {\r\n this.isOpen = false;\r\n }\r\n\r\n toggle() {\r\n this.isOpen = !this.isOpen;\r\n }\r\n}\r\n","<div class=\"ax-action-sheet-backdrop\" [@backdrop]=\"isOpen ? 'show' : 'hide'\" (click)=\"_handleBackdropClick()\"></div>\r\n<div class=\"ax-action-sheet-container\" [@openClose]=\"isOpen ? 'open' : 'closed'\">\r\n <div class=\"ax-bg-white ax-h-full dark:ax-bg-dark-700\">\r\n <div class=\"ax-action-sheet-caption\" *ngIf=\"caption\">\r\n {{caption}}\r\n </div>\r\n <ng-content select=\"ax-content\"></ng-content>\r\n <div class=\"ax-action-sheet-items\">\r\n <ng-content select=\"ax-action-sheet-item\"></ng-content>\r\n </div>\r\n </div>\r\n</div>","import {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n} from '@angular/core';\r\nimport {\r\n AXButtonClickEvent,\r\n AXStyleColorType,\r\n} from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet-item',\r\n template: `\r\n <ax-button\r\n [color]=\"color\"\r\n look=\"blank\"\r\n [text]=\"text\"\r\n (onClick)=\"_handleOnClick($event)\"\r\n ></ax-button>\r\n `,\r\n})\r\nexport class AXActionSheetItemComponent extends AXBaseComponent {\r\n @Input()\r\n text: string;\r\n\r\n @Input()\r\n color: AXStyleColorType = 'light';\r\n\r\n @Output()\r\n onClick: EventEmitter<AXButtonClickEvent> = new EventEmitter<AXButtonClickEvent>();\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleOnClick(e: any) {\r\n this.onClick.emit(e);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetItemComponent } from './action-sheet-item.component';\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n imports: [CommonModule, AXButtonModule],\r\n exports: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAoDM,MAAO,sBAA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AA,EAAA,CALf,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,OAAA,EAAA,CACvD,YAAY,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAC5B,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;iHAGjD,mBAAmB,EAAA,OAAA,EAAA,CAJpB,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;2FAI3B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;AACvC,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAC7D,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
|
|
2
1
|
import { AXButtonComponent } from '@acorex/components/button';
|
|
3
2
|
import { AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
|
|
4
3
|
import * as i0 from '@angular/core';
|
|
@@ -8,7 +7,6 @@ import { _ColorLookComponentMixin, AXBaseComponent } from '@acorex/components/mi
|
|
|
8
7
|
import * as i1 from '@angular/common';
|
|
9
8
|
import { CommonModule } from '@angular/common';
|
|
10
9
|
|
|
11
|
-
var _AXAlertComponent_visible;
|
|
12
10
|
const AXBaseAlertMixin = _ColorLookComponentMixin(AXBaseComponent);
|
|
13
11
|
/**
|
|
14
12
|
* Regular description
|
|
@@ -22,7 +20,6 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
|
22
20
|
constructor(elementRef, cdr) {
|
|
23
21
|
super(elementRef, cdr);
|
|
24
22
|
this.onDismissed = new EventEmitter();
|
|
25
|
-
_AXAlertComponent_visible.set(this, void 0);
|
|
26
23
|
}
|
|
27
24
|
_onOptionChanged(option) {
|
|
28
25
|
if (option.name == 'color') {
|
|
@@ -64,11 +61,11 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
|
64
61
|
* set the visibility of the Alert
|
|
65
62
|
*/
|
|
66
63
|
get visible() {
|
|
67
|
-
return
|
|
64
|
+
return this._visible;
|
|
68
65
|
}
|
|
69
66
|
set visible(v) {
|
|
70
|
-
if (
|
|
71
|
-
|
|
67
|
+
if (this._visible != v) {
|
|
68
|
+
this._visible = v;
|
|
72
69
|
const host = this._getHostElement();
|
|
73
70
|
if (v) {
|
|
74
71
|
host.classList.remove('ax-state-hidden');
|
|
@@ -132,7 +129,6 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
|
132
129
|
this.visible = true;
|
|
133
130
|
}
|
|
134
131
|
}
|
|
135
|
-
_AXAlertComponent_visible = new WeakMap();
|
|
136
132
|
AXAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXAlertComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
137
133
|
AXAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXAlertComponent, selector: "ax-alert", inputs: { color: "color", look: "look", timeOut: "timeOut", visible: "visible" }, outputs: { onDismissed: "onDismissed" }, host: { properties: { "class": "this.__hostClass" }, classAttribute: "ax-alert" }, queries: [{ propertyName: "_icon", first: true, predicate: AXDecoratorIconComponent, descendants: true, static: true }, { propertyName: "_buttons", predicate: AXButtonComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-header,ng-container,ng-template\">\r\n</ng-content>\r\n<div class=\"ax-alert-body\">\r\n <div class=\"ax-flex ax-items-center ax-justify-between\">\r\n <div class=\"ax-flex\">\r\n <ng-content select=\"ax-icon,ng-container,ng-template\">\r\n </ng-content>\r\n <div class=\"ax-flex ax-flex-col ax-justify-center\">\r\n <ng-content select=\"ax-content,ng-container,ng-template\">\r\n </ng-content>\r\n <ng-content select=\"ax-footer,ng-container,ng-template\">\r\n </ng-content>\r\n </div>\r\n </div>\r\n <ng-content select=\"ax-suffix,ng-container,ng-template\">\r\n </ng-content>\r\n </div>\r\n</div>\r\n\r\n<div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut\" *ngIf=\"timeOut\">\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
138
134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXAlertComponent, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../projects/acorex/components/alert/src/alert.component.ts","../../../../projects/acorex/components/alert/src/alert.component.html","../../../../projects/acorex/components/alert/src/alert.module.ts","../../../../projects/acorex/components/alert/acorex-components-alert.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\r\nimport { AXDecoratorIconComponent } from '@acorex/components/decorators';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n ContentChild,\r\n EventEmitter,\r\n Output,\r\n QueryList,\r\n ContentChildren,\r\n} from '@angular/core';\r\nimport { startWith } from 'rxjs/operators';\r\nimport { AXEvent } from '@acorex/components/common';\r\nimport {\r\n AXBaseComponent,\r\n AXComponentOptionChanged,\r\n _ColorLookComponentMixin,\r\n} from '@acorex/components/mixin';\r\n\r\nexport const AXBaseAlertMixin = _ColorLookComponentMixin(AXBaseComponent);\r\n\r\n/**\r\n * Regular description\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-alert',\r\n templateUrl: './alert.component.html',\r\n inputs: ['color', 'look'],\r\n host: { class: 'ax-alert' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXAlertComponent extends AXBaseAlertMixin {\r\n @ContentChild(AXDecoratorIconComponent, { static: true })\r\n private _icon!: AXDecoratorIconComponent;\r\n\r\n @ContentChildren(AXButtonComponent, { descendants: true })\r\n private _buttons!: QueryList<AXButtonComponent>;\r\n\r\n @Output()\r\n onDismissed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n\r\n override _onOptionChanged(option: AXComponentOptionChanged) {\r\n if (option.name == 'color') {\r\n this._setIcon();\r\n }\r\n }\r\n\r\n ngDoCheck() {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n }\r\n\r\n private _setIcon() {\r\n if (!this._icon || this._icon.icon) return;\r\n switch (this.color) {\r\n case 'success':\r\n this._icon.icon = 'ax-ic ax-ic-check-filled';\r\n break;\r\n case 'warning':\r\n this._icon.icon = 'ax-ic-warning-filled';\r\n break;\r\n case 'danger':\r\n this._icon.icon = 'ax-ic-error-filled';\r\n break;\r\n default:\r\n this._icon.icon = 'ax-ic ax-ic-info-filled';\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n @HostBinding('class')\r\n get __hostClass(): string {\r\n const _class = this.look\r\n ? `ax-${this.color}-${this.look}`\r\n : `ax-${this.color}-default`;\r\n return `ax-alert ax-none ${_class}`;\r\n }\r\n\r\n @Input()\r\n timeOut!: number;\r\n\r\n #visible: boolean;\r\n\r\n /**\r\n * set the visibility of the Alert\r\n */\r\n @Input()\r\n public get visible(): boolean {\r\n return this.#visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (this.#visible != v) {\r\n this.#visible = v;\r\n const host = this._getHostElement();\r\n if (v) {\r\n host.classList.remove('ax-state-hidden');\r\n host.classList.add('ax-state-visible');\r\n } else {\r\n host.classList.add('ax-state-hidden');\r\n host.classList.toggle('ax-state-visible');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n if (this.timeOut) {\r\n setTimeout(() => {\r\n this.dismiss();\r\n }, this.timeOut);\r\n }\r\n }\r\n\r\n onViewInit() {\r\n if (this.visible == undefined) {\r\n this.visible = true;\r\n }\r\n }\r\n\r\n ngAfterContentInit() {\r\n this._buttons.changes\r\n .pipe(startWith(0))\r\n .subscribe((change) => this._applyButtonStyle());\r\n this._applyButtonStyle();\r\n }\r\n\r\n private _applyButtonStyle() {\r\n this._buttons?.forEach((c: any) => {\r\n c.color = this.color;\r\n c.look = 'default'//this.look === 'outline' ? 'blank' : this.look;\r\n });\r\n }\r\n\r\n /**\r\n * Remove the alert from the container\r\n */\r\n dismiss(): void {\r\n const host = this._getHostElement();\r\n this.visible = false;\r\n const func = () => {\r\n host.parentElement?.removeChild(host);\r\n this.onDismissed.emit({\r\n component: this,\r\n });\r\n host.removeEventListener('transitionend', func);\r\n };\r\n host.addEventListener('transitionend', func);\r\n }\r\n\r\n /**\r\n * Hide the alert\r\n */\r\n hide(): void {\r\n this.visible = false;\r\n }\r\n\r\n /**\r\n * Show the alert\r\n */\r\n show() {\r\n this.visible = true;\r\n }\r\n}\r\n","<ng-content select=\"ax-header,ng-container,ng-template\">\r\n</ng-content>\r\n<div class=\"ax-alert-body\">\r\n <div class=\"ax-flex ax-items-center ax-justify-between\">\r\n <div class=\"ax-flex\">\r\n <ng-content select=\"ax-icon,ng-container,ng-template\">\r\n </ng-content>\r\n <div class=\"ax-flex ax-flex-col ax-justify-center\">\r\n <ng-content select=\"ax-content,ng-container,ng-template\">\r\n </ng-content>\r\n <ng-content select=\"ax-footer,ng-container,ng-template\">\r\n </ng-content>\r\n </div>\r\n </div>\r\n <ng-content select=\"ax-suffix,ng-container,ng-template\">\r\n </ng-content>\r\n </div>\r\n</div>\r\n\r\n<div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut\" *ngIf=\"timeOut\">\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXAlertComponent } from './alert.component';\r\n\r\nconst COMPONENT = [AXAlertComponent];\r\nconst MODULES = [CommonModule, AXDecoratorModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXAlertModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAwBa,gBAAgB,GAAG,wBAAwB,CAAC,eAAe,EAAE;AAE1E;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AA4EpD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAxEzB,QAAA,IAAA,CAAA,WAAW,GAA0B,IAAI,YAAY,EAAW,CAAC;QA6CjE,yBAAkB,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;KA4BjB;AAvEQ,IAAA,gBAAgB,CAAC,MAAgC,EAAA;AACxD,QAAA,IAAI,MAAM,CAAC,IAAI,IAAI,OAAO,EAAE;YAC1B,IAAI,CAAC,QAAQ,EAAE,CAAC;AACjB,SAAA;KACF;IAED,SAAS,GAAA;QACP,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAEO,QAAQ,GAAA;QACd,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,OAAO;QAC3C,QAAQ,IAAI,CAAC,KAAK;AAChB,YAAA,KAAK,SAAS;AACZ,g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AA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATP,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAClB,YAAY,EAAE,iBAAiB,aAD7B,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../projects/acorex/components/alert/src/alert.component.ts","../../../../projects/acorex/components/alert/src/alert.component.html","../../../../projects/acorex/components/alert/src/alert.module.ts","../../../../projects/acorex/components/alert/acorex-components-alert.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\r\nimport { AXDecoratorIconComponent } from '@acorex/components/decorators';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n ContentChild,\r\n EventEmitter,\r\n Output,\r\n QueryList,\r\n ContentChildren,\r\n} from '@angular/core';\r\nimport { startWith } from 'rxjs/operators';\r\nimport { AXEvent } from '@acorex/components/common';\r\nimport {\r\n AXBaseComponent,\r\n AXComponentOptionChanged,\r\n _ColorLookComponentMixin,\r\n} from '@acorex/components/mixin';\r\n\r\nexport const AXBaseAlertMixin = _ColorLookComponentMixin(AXBaseComponent);\r\n\r\n/**\r\n * Regular description\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-alert',\r\n templateUrl: './alert.component.html',\r\n inputs: ['color', 'look'],\r\n host: { class: 'ax-alert' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXAlertComponent extends AXBaseAlertMixin {\r\n @ContentChild(AXDecoratorIconComponent, { static: true })\r\n private _icon!: AXDecoratorIconComponent;\r\n\r\n @ContentChildren(AXButtonComponent, { descendants: true })\r\n private _buttons!: QueryList<AXButtonComponent>;\r\n\r\n @Output()\r\n onDismissed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n\r\n override _onOptionChanged(option: AXComponentOptionChanged) {\r\n if (option.name == 'color') {\r\n this._setIcon();\r\n }\r\n }\r\n\r\n protected ngDoCheck() {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n }\r\n\r\n private _setIcon() {\r\n if (!this._icon || this._icon.icon) return;\r\n switch (this.color) {\r\n case 'success':\r\n this._icon.icon = 'ax-ic ax-ic-check-filled';\r\n break;\r\n case 'warning':\r\n this._icon.icon = 'ax-ic-warning-filled';\r\n break;\r\n case 'danger':\r\n this._icon.icon = 'ax-ic-error-filled';\r\n break;\r\n default:\r\n this._icon.icon = 'ax-ic ax-ic-info-filled';\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n @HostBinding('class')\r\n get __hostClass(): string {\r\n const _class = this.look\r\n ? `ax-${this.color}-${this.look}`\r\n : `ax-${this.color}-default`;\r\n return `ax-alert ax-none ${_class}`;\r\n }\r\n\r\n @Input()\r\n timeOut!: number;\r\n\r\n protected _visible: boolean;\r\n\r\n /**\r\n * set the visibility of the Alert\r\n */\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (this._visible != v) {\r\n this._visible = v;\r\n const host = this._getHostElement();\r\n if (v) {\r\n host.classList.remove('ax-state-hidden');\r\n host.classList.add('ax-state-visible');\r\n } else {\r\n host.classList.add('ax-state-hidden');\r\n host.classList.toggle('ax-state-visible');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n if (this.timeOut) {\r\n setTimeout(() => {\r\n this.dismiss();\r\n }, this.timeOut);\r\n }\r\n }\r\n\r\n onViewInit() {\r\n if (this.visible == undefined) {\r\n this.visible = true;\r\n }\r\n }\r\n\r\n protected ngAfterContentInit() {\r\n this._buttons.changes\r\n .pipe(startWith(0))\r\n .subscribe((change) => this._applyButtonStyle());\r\n this._applyButtonStyle();\r\n }\r\n\r\n private _applyButtonStyle() {\r\n this._buttons?.forEach((c: any) => {\r\n c.color = this.color;\r\n c.look = 'default'//this.look === 'outline' ? 'blank' : this.look;\r\n });\r\n }\r\n\r\n /**\r\n * Remove the alert from the container\r\n */\r\n dismiss(): void {\r\n const host = this._getHostElement();\r\n this.visible = false;\r\n const func = () => {\r\n host.parentElement?.removeChild(host);\r\n this.onDismissed.emit({\r\n component: this,\r\n });\r\n host.removeEventListener('transitionend', func);\r\n };\r\n host.addEventListener('transitionend', func);\r\n }\r\n\r\n /**\r\n * Hide the alert\r\n */\r\n hide(): void {\r\n this.visible = false;\r\n }\r\n\r\n /**\r\n * Show the alert\r\n */\r\n show() {\r\n this.visible = true;\r\n }\r\n}\r\n","<ng-content select=\"ax-header,ng-container,ng-template\">\r\n</ng-content>\r\n<div class=\"ax-alert-body\">\r\n <div class=\"ax-flex ax-items-center ax-justify-between\">\r\n <div class=\"ax-flex\">\r\n <ng-content select=\"ax-icon,ng-container,ng-template\">\r\n </ng-content>\r\n <div class=\"ax-flex ax-flex-col ax-justify-center\">\r\n <ng-content select=\"ax-content,ng-container,ng-template\">\r\n </ng-content>\r\n <ng-content select=\"ax-footer,ng-container,ng-template\">\r\n </ng-content>\r\n </div>\r\n </div>\r\n <ng-content select=\"ax-suffix,ng-container,ng-template\">\r\n </ng-content>\r\n </div>\r\n</div>\r\n\r\n<div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut\" *ngIf=\"timeOut\">\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXAlertComponent } from './alert.component';\r\n\r\nconst COMPONENT = [AXAlertComponent];\r\nconst MODULES = [CommonModule, AXDecoratorModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXAlertModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAwBa,gBAAgB,GAAG,wBAAwB,CAAC,eAAe,EAAE;AAE1E;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AA4EpD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAxEzB,QAAA,IAAA,CAAA,WAAW,GAA0B,IAAI,YAAY,EAAW,CAAC;KAyEhE;AAvEQ,IAAA,gBAAgB,CAAC,MAAgC,EAAA;AACxD,QAAA,IAAI,MAAM,CAAC,IAAI,IAAI,OAAO,EAAE;YAC1B,IAAI,CAAC,QAAQ,EAAE,CAAC;AACjB,SAAA;KACF;IAES,SAAS,GAAA;QACjB,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAEO,QAAQ,GAAA;QACd,IAAI,CAAC,IAAI,CAAC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AAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATP,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAClB,YAAY,EAAE,iBAAiB,aAD7B,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy,
|
|
2
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChildren, HostBinding, NgModule } from '@angular/core';
|
|
3
3
|
import { AXAvatarMixin } from '@acorex/components/mixin';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -26,35 +26,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
26
26
|
*/
|
|
27
27
|
class AXAvatarComponent extends AXAvatarMixin {
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
* @ignore
|
|
30
|
+
*/
|
|
31
31
|
constructor(elementRef, cdr) {
|
|
32
32
|
super(elementRef, cdr);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
}
|
|
34
|
+
ngAfterViewInit() {
|
|
35
|
+
this._children.changes.subscribe(() => {
|
|
36
|
+
this._cdr.markForCheck();
|
|
37
|
+
});
|
|
38
38
|
}
|
|
39
39
|
get __hostClass() {
|
|
40
40
|
return `ax-${this.color}-default`;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
AXAvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXAvatarComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
-
AXAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXAvatarComponent, selector: "ax-avatar", inputs: { color: "color", look: "look",
|
|
44
|
+
AXAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXAvatarComponent, selector: "ax-avatar", inputs: { color: "color", look: "look" }, host: { properties: { "class": "this.__hostClass" }, classAttribute: "ax-avatar" }, queries: [{ propertyName: "_children", predicate: ["ax-text, ax-icon, ax-image"] }], usesInheritance: true, ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"default\" *ngIf=\"!_children.length\"></ng-container>\r\n<ng-container [ngTemplateOutlet]=\"custom\" *ngIf=\"_children.length\"></ng-container>\r\n\r\n<ng-template #custom>\r\n <ng-content select='ax-text, ax-image, ax-icon'></ng-content>\r\n</ng-template>\r\n<ng-template #default>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"ax-default\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 512 512\">\r\n <g style=\"isolation:isolate\">\r\n <g id=\"Layer_2\" data-name=\"Layer 2\">\r\n <g id=\"Layer_1-2\" data-name=\"Layer 1\">\r\n <rect width=\"512\" height=\"512\" />\r\n <path\r\n d=\"M419.16,511.94s-2.85-154-142.28-176.19a139.93,139.93,0,0,0-22-1.67h0a55.8,55.8,0,0,0-5.93.29C99.25,350.35,96.26,511.94,96.26,511.94\"\r\n style=\"fill:#fff;opacity:0.7\" />\r\n <path\r\n d=\"M256,355.18c-17.29,0-32.22-4.63-46.38-12.41-3.86,1.31-8.15,2.93-11.75,4.46A96.48,96.48,0,0,0,256,366.62a100.29,100.29,0,0,0,60.07-20c-3.6-1.49-6.41-2.55-10.27-3.83C291.48,350.79,273.58,355.18,256,355.18Z\"\r\n style=\"opacity:0.05\" />\r\n <circle cx=\"257.71\" cy=\"255.94\" r=\"99.24\" style=\"fill:#fff\" />\r\n </g>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
45
45
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXAvatarComponent, decorators: [{
|
|
46
46
|
type: Component,
|
|
47
|
-
args: [{ selector: 'ax-avatar', inputs: ['color', 'look'
|
|
48
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: {
|
|
49
|
-
type:
|
|
50
|
-
|
|
51
|
-
type: Input
|
|
52
|
-
}], src: [{
|
|
53
|
-
type: Input
|
|
54
|
-
}], class: [{
|
|
55
|
-
type: Input
|
|
56
|
-
}], type: [{
|
|
57
|
-
type: Input
|
|
47
|
+
args: [{ selector: 'ax-avatar', inputs: ['color', 'look'], host: { class: 'ax-avatar' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngTemplateOutlet]=\"default\" *ngIf=\"!_children.length\"></ng-container>\r\n<ng-container [ngTemplateOutlet]=\"custom\" *ngIf=\"_children.length\"></ng-container>\r\n\r\n<ng-template #custom>\r\n <ng-content select='ax-text, ax-image, ax-icon'></ng-content>\r\n</ng-template>\r\n<ng-template #default>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"ax-default\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 512 512\">\r\n <g style=\"isolation:isolate\">\r\n <g id=\"Layer_2\" data-name=\"Layer 2\">\r\n <g id=\"Layer_1-2\" data-name=\"Layer 1\">\r\n <rect width=\"512\" height=\"512\" />\r\n <path\r\n d=\"M419.16,511.94s-2.85-154-142.28-176.19a139.93,139.93,0,0,0-22-1.67h0a55.8,55.8,0,0,0-5.93.29C99.25,350.35,96.26,511.94,96.26,511.94\"\r\n style=\"fill:#fff;opacity:0.7\" />\r\n <path\r\n d=\"M256,355.18c-17.29,0-32.22-4.63-46.38-12.41-3.86,1.31-8.15,2.93-11.75,4.46A96.48,96.48,0,0,0,256,366.62a100.29,100.29,0,0,0,60.07-20c-3.6-1.49-6.41-2.55-10.27-3.83C291.48,350.79,273.58,355.18,256,355.18Z\"\r\n style=\"opacity:0.05\" />\r\n <circle cx=\"257.71\" cy=\"255.94\" r=\"99.24\" style=\"fill:#fff\" />\r\n </g>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>" }]
|
|
48
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { _children: [{
|
|
49
|
+
type: ContentChildren,
|
|
50
|
+
args: ['ax-text, ax-icon, ax-image']
|
|
58
51
|
}], __hostClass: [{
|
|
59
52
|
type: HostBinding,
|
|
60
53
|
args: ['class']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-avatar.mjs","sources":["../../../../projects/acorex/components/avatar/src/avatar-group.component.ts","../../../../projects/acorex/components/avatar/src/avatar.component.ts","../../../../projects/acorex/components/avatar/src/avatar.component.html","../../../../projects/acorex/components/avatar/src/avatar.module.ts","../../../../projects/acorex/components/avatar/acorex-components-avatar.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-avatar-group',\r\n template: `<ng-content select=\"ax-avatar\"></ng-content>`,\r\n host: { class: 'ax-avatar-group' },\r\n})\r\nexport class AXAvatarGroup implements OnInit {\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n}\r\n","import { COLOR_LOOK_INPUTS, AXAvatarMixin } from '@acorex/components/mixin';\r\nimport {
|
|
1
|
+
{"version":3,"file":"acorex-components-avatar.mjs","sources":["../../../../projects/acorex/components/avatar/src/avatar-group.component.ts","../../../../projects/acorex/components/avatar/src/avatar.component.ts","../../../../projects/acorex/components/avatar/src/avatar.component.html","../../../../projects/acorex/components/avatar/src/avatar.module.ts","../../../../projects/acorex/components/avatar/acorex-components-avatar.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-avatar-group',\r\n template: `<ng-content select=\"ax-avatar\"></ng-content>`,\r\n host: { class: 'ax-avatar-group' },\r\n})\r\nexport class AXAvatarGroup implements OnInit {\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n}\r\n","import { AXDecoratorTextComponent } from '@acorex/components/decorators';\r\nimport { COLOR_LOOK_INPUTS, AXAvatarMixin } from '@acorex/components/mixin';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n ViewChild,\r\n ContentChild,\r\n ContentChildren,\r\n QueryList,\r\n} from '@angular/core';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-avatar',\r\n templateUrl: './avatar.component.html',\r\n inputs: ['color', 'look'],\r\n host: { class: 'ax-avatar' },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXAvatarComponent extends AXAvatarMixin {\r\n\r\n @ContentChildren('ax-text, ax-icon, ax-image')\r\n readonly _children:QueryList<any>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n \r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._children.changes.subscribe(()=>{\r\n this._cdr.markForCheck();\r\n })\r\n }\r\n\r\n @HostBinding('class')\r\n get __hostClass(): string {\r\n return `ax-${this.color}-default`;\r\n }\r\n\r\n}\r\n","<ng-container [ngTemplateOutlet]=\"default\" *ngIf=\"!_children.length\"></ng-container>\r\n<ng-container [ngTemplateOutlet]=\"custom\" *ngIf=\"_children.length\"></ng-container>\r\n\r\n<ng-template #custom>\r\n <ng-content select='ax-text, ax-image, ax-icon'></ng-content>\r\n</ng-template>\r\n<ng-template #default>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"ax-default\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 512 512\">\r\n <g style=\"isolation:isolate\">\r\n <g id=\"Layer_2\" data-name=\"Layer 2\">\r\n <g id=\"Layer_1-2\" data-name=\"Layer 1\">\r\n <rect width=\"512\" height=\"512\" />\r\n <path\r\n d=\"M419.16,511.94s-2.85-154-142.28-176.19a139.93,139.93,0,0,0-22-1.67h0a55.8,55.8,0,0,0-5.93.29C99.25,350.35,96.26,511.94,96.26,511.94\"\r\n style=\"fill:#fff;opacity:0.7\" />\r\n <path\r\n d=\"M256,355.18c-17.29,0-32.22-4.63-46.38-12.41-3.86,1.31-8.15,2.93-11.75,4.46A96.48,96.48,0,0,0,256,366.62a100.29,100.29,0,0,0,60.07-20c-3.6-1.49-6.41-2.55-10.27-3.83C291.48,350.79,273.58,355.18,256,355.18Z\"\r\n style=\"opacity:0.05\" />\r\n <circle cx=\"257.71\" cy=\"255.94\" r=\"99.24\" style=\"fill:#fff\" />\r\n </g>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXAvatarComponent } from './avatar.component';\r\nimport { AXAvatarGroup } from './avatar-group.component';\r\n\r\nconst COMPONENT = [AXAvatarComponent, AXAvatarGroup];\r\nconst MODULES = [CommonModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXAvatarModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAOa,aAAa,CAAA;AACxB,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,QAAQ,MAAW;;0GAHR,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,oGAHd,CAA8C,4CAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAG7C,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,CAA8C,4CAAA,CAAA;AACxD,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE;AACnC,iBAAA,CAAA;;;ACUD;;;;AAIG;AASG,MAA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iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -19,10 +19,10 @@ class AXBadgeComponent extends AXBaseBadgeMixin {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
AXBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXBadgeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
AXBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXBadgeComponent, selector: "ax-badge", inputs: { color: "color", look: "look", text: "text" }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<span class=\"ax-
|
|
22
|
+
AXBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXBadgeComponent, selector: "ax-badge", inputs: { color: "color", look: "look", text: "text" }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<span class=\"ax-truncate\">{{text}}</span>\r\n<ng-content select=\"ax-suffix\"></ng-content>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
23
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXBadgeComponent, decorators: [{
|
|
24
24
|
type: Component,
|
|
25
|
-
args: [{ selector: 'ax-badge', inputs: ['color', 'look',], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<span class=\"ax-
|
|
25
|
+
args: [{ selector: 'ax-badge', inputs: ['color', 'look',], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<span class=\"ax-truncate\">{{text}}</span>\r\n<ng-content select=\"ax-suffix\"></ng-content>" }]
|
|
26
26
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { text: [{
|
|
27
27
|
type: Input
|
|
28
28
|
}], __hostClass: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-badge.mjs","sources":["../../../../projects/acorex/components/badge/src/badge.component.ts","../../../../projects/acorex/components/badge/src/badge.component.html","../../../../projects/acorex/components/badge/src/badge.module.ts","../../../../projects/acorex/components/badge/acorex-components-badge.ts"],"sourcesContent":["import { _ColorLookComponentMixin, AXBaseComponent, COLOR_LOOK_INPUTS } from '@acorex/components/mixin';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n} from '@angular/core';\r\n\r\n\r\nexport const AXBaseBadgeMixin = _ColorLookComponentMixin(AXBaseComponent);\r\n@Component({\r\n selector: 'ax-badge',\r\n templateUrl: './badge.component.html',\r\n inputs: ['color', 'look',],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXBadgeComponent extends AXBaseBadgeMixin {\r\n @Input() text: string = '';\r\n\r\n constructor(private elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n //TODO: ax-badge\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n const _class = this.look\r\n ? `ax-${this.color}-${this.look}`\r\n : `ax-${this.color}-default`;\r\n\r\n return ['ax-badge', _class, !this.text ? 'ax-badge-icon' : ''].join(' ');\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<span class=\"ax-
|
|
1
|
+
{"version":3,"file":"acorex-components-badge.mjs","sources":["../../../../projects/acorex/components/badge/src/badge.component.ts","../../../../projects/acorex/components/badge/src/badge.component.html","../../../../projects/acorex/components/badge/src/badge.module.ts","../../../../projects/acorex/components/badge/acorex-components-badge.ts"],"sourcesContent":["import { _ColorLookComponentMixin, AXBaseComponent, COLOR_LOOK_INPUTS } from '@acorex/components/mixin';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n} from '@angular/core';\r\n\r\n\r\nexport const AXBaseBadgeMixin = _ColorLookComponentMixin(AXBaseComponent);\r\n@Component({\r\n selector: 'ax-badge',\r\n templateUrl: './badge.component.html',\r\n inputs: ['color', 'look',],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXBadgeComponent extends AXBaseBadgeMixin {\r\n @Input() text: string = '';\r\n\r\n constructor(private elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n //TODO: ax-badge\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n const _class = this.look\r\n ? `ax-${this.color}-${this.look}`\r\n : `ax-${this.color}-default`;\r\n\r\n return ['ax-badge', _class, !this.text ? 'ax-badge-icon' : ''].join(' ');\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<span class=\"ax-truncate\">{{text}}</span>\r\n<ng-content select=\"ax-suffix\"></ng-content>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXBadgeComponent } from './badge.component';\r\n\r\nconst COMPONENT = [AXBadgeComponent];\r\nconst MODULES = [CommonModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXBadgeModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAYa,gBAAgB,GAAG,wBAAw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