@acorex/components 7.0.35 → 7.0.37
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 +2 -2
- package/badge/src/badge.component.d.ts +2 -2
- package/breadcrumbs/src/breadcrumbs-item.component.d.ts +6 -6
- package/button/src/button-group.component.d.ts +6 -6
- package/button/src/button-item.component.d.ts +6 -6
- package/button/src/button.component.d.ts +11 -10
- package/chips/src/chips.component.d.ts +6 -6
- package/color-picker/src/color-picker.component.d.ts +16 -16
- package/common/public-api.d.ts +1 -0
- package/common/src/components/base-component.class.d.ts +31 -0
- package/common/src/components/button-base-component.class.d.ts +36 -0
- package/common/src/components/color-component.class.d.ts +15 -0
- package/common/src/components/colorlook-component.class.d.ts +9 -0
- package/common/src/components/index.d.ts +6 -0
- package/common/src/components/interactive-component.class.d.ts +37 -0
- package/common/src/components/look-component.class.d.ts +15 -0
- package/date-picker/src/datepicker.component.d.ts +14 -14
- package/dialog/src/dialog.service.d.ts +8 -8
- package/esm2020/action-sheet/src/action-sheet.component.mjs +20 -7
- package/esm2020/alert/src/alert.component.mjs +2 -2
- package/esm2020/avatar/src/avatar.component.mjs +2 -2
- package/esm2020/badge/src/badge.component.mjs +2 -2
- package/esm2020/breadcrumbs/src/breadcrumbs.component.mjs +2 -2
- package/esm2020/button/src/button.component.mjs +32 -23
- package/esm2020/calendar/src/calendar.component.mjs +2 -2
- package/esm2020/card/src/card.component.mjs +2 -2
- package/esm2020/chips/src/chips.component.mjs +2 -2
- package/esm2020/collapse/src/collapse.component.mjs +2 -2
- package/esm2020/color-palette/src/color-palette.component.mjs +2 -2
- package/esm2020/common/public-api.mjs +2 -1
- package/esm2020/common/src/components/base-component.class.mjs +57 -0
- package/esm2020/common/src/components/button-base-component.class.mjs +68 -0
- package/esm2020/common/src/components/color-component.class.mjs +27 -0
- package/esm2020/common/src/components/colorlook-component.class.mjs +11 -0
- package/esm2020/common/src/components/index.mjs +7 -0
- package/esm2020/common/src/components/interactive-component.class.mjs +62 -0
- package/esm2020/common/src/components/look-component.class.mjs +27 -0
- package/esm2020/context-menu/src/context-menu.component.mjs +2 -2
- package/esm2020/data-pager/src/data-pager.component.mjs +2 -2
- package/esm2020/data-table/src/data-table.component.mjs +2 -2
- package/esm2020/dialog/src/dialog.component.mjs +2 -2
- package/esm2020/dialog/src/dialog.service.mjs +16 -20
- package/esm2020/drawer/src/drawer.component.mjs +2 -2
- package/esm2020/dropdown/src/dropdown-panel.component.mjs +2 -2
- package/esm2020/form/src/form-field.component.mjs +2 -2
- package/esm2020/label/src/label.component.mjs +2 -2
- package/esm2020/loading/src/loading.component.mjs +2 -2
- package/esm2020/menu/src/menu.component.mjs +2 -2
- package/esm2020/notification/src/notification.component.mjs +2 -2
- package/esm2020/number-box/src/number-box.component.mjs +3 -3
- package/esm2020/picker/src/picker-column.component.mjs +2 -2
- package/esm2020/popup/src/popup.component.mjs +2 -2
- package/esm2020/progress-bar/src/progress-bar.component.mjs +2 -2
- package/esm2020/range-slider/src/range-slider.component.mjs +2 -2
- package/esm2020/result/src/result.component.mjs +2 -2
- package/esm2020/select-box/src/selectbox.component.mjs +2 -2
- package/esm2020/selection-list/src/selection-list.component.mjs +2 -2
- package/esm2020/switch/src/switch.component.mjs +2 -2
- package/esm2020/tabs/src/tabs.component.mjs +2 -2
- package/esm2020/tag/src/tag.component.mjs +2 -2
- package/esm2020/textarea/src/textarea.component.mjs +2 -2
- package/esm2020/toast/src/toast.component.mjs +2 -2
- package/esm2020/tooltip/src/tooltip.component.mjs +2 -2
- package/esm2020/tree-view/src/tree-view.component.mjs +2 -2
- package/esm2020/uploader/src/uploader.component.mjs +2 -2
- package/fesm2015/acorex-components-action-sheet.mjs +19 -6
- package/fesm2015/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2015/acorex-components-alert.mjs +2 -3
- package/fesm2015/acorex-components-alert.mjs.map +1 -1
- package/fesm2015/acorex-components-avatar.mjs +2 -2
- 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-breadcrumbs.mjs +2 -2
- package/fesm2015/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2015/acorex-components-button.mjs +32 -22
- package/fesm2015/acorex-components-button.mjs.map +1 -1
- package/fesm2015/acorex-components-calendar.mjs +2 -2
- package/fesm2015/acorex-components-calendar.mjs.map +1 -1
- package/fesm2015/acorex-components-card.mjs +2 -2
- package/fesm2015/acorex-components-card.mjs.map +1 -1
- package/fesm2015/acorex-components-chips.mjs +2 -2
- package/fesm2015/acorex-components-chips.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 +2 -2
- package/fesm2015/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2015/acorex-components-common.mjs +241 -2
- package/fesm2015/acorex-components-common.mjs.map +1 -1
- package/fesm2015/acorex-components-context-menu.mjs +2 -2
- package/fesm2015/acorex-components-context-menu.mjs.map +1 -1
- package/fesm2015/acorex-components-data-pager.mjs +2 -2
- package/fesm2015/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2015/acorex-components-data-table.mjs +2 -2
- package/fesm2015/acorex-components-data-table.mjs.map +1 -1
- package/fesm2015/acorex-components-dialog.mjs +17 -21
- package/fesm2015/acorex-components-dialog.mjs.map +1 -1
- package/fesm2015/acorex-components-drawer.mjs +2 -2
- package/fesm2015/acorex-components-drawer.mjs.map +1 -1
- package/fesm2015/acorex-components-dropdown.mjs +1 -1
- package/fesm2015/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2015/acorex-components-form.mjs +2 -3
- package/fesm2015/acorex-components-form.mjs.map +1 -1
- package/fesm2015/acorex-components-label.mjs +2 -2
- package/fesm2015/acorex-components-label.mjs.map +1 -1
- package/fesm2015/acorex-components-loading.mjs +2 -2
- package/fesm2015/acorex-components-menu.mjs +2 -2
- package/fesm2015/acorex-components-menu.mjs.map +1 -1
- package/fesm2015/acorex-components-notification.mjs +2 -2
- package/fesm2015/acorex-components-notification.mjs.map +1 -1
- package/fesm2015/acorex-components-number-box.mjs +2 -2
- package/fesm2015/acorex-components-number-box.mjs.map +1 -1
- package/fesm2015/acorex-components-picker.mjs +2 -2
- package/fesm2015/acorex-components-picker.mjs.map +1 -1
- package/fesm2015/acorex-components-popup.mjs +2 -2
- package/fesm2015/acorex-components-popup.mjs.map +1 -1
- package/fesm2015/acorex-components-progress-bar.mjs +2 -2
- package/fesm2015/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2015/acorex-components-range-slider.mjs +2 -2
- package/fesm2015/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2015/acorex-components-result.mjs +2 -2
- package/fesm2015/acorex-components-result.mjs.map +1 -1
- package/fesm2015/acorex-components-select-box.mjs +2 -2
- package/fesm2015/acorex-components-select-box.mjs.map +1 -1
- package/fesm2015/acorex-components-selection-list.mjs +2 -3
- package/fesm2015/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2015/acorex-components-switch.mjs +2 -3
- package/fesm2015/acorex-components-switch.mjs.map +1 -1
- package/fesm2015/acorex-components-tabs.mjs +2 -3
- package/fesm2015/acorex-components-tabs.mjs.map +1 -1
- package/fesm2015/acorex-components-tag.mjs +2 -3
- package/fesm2015/acorex-components-tag.mjs.map +1 -1
- package/fesm2015/acorex-components-textarea.mjs +2 -3
- package/fesm2015/acorex-components-textarea.mjs.map +1 -1
- package/fesm2015/acorex-components-time-box.mjs +0 -1
- package/fesm2015/acorex-components-toast.mjs +2 -2
- package/fesm2015/acorex-components-toast.mjs.map +1 -1
- package/fesm2015/acorex-components-tooltip.mjs +2 -3
- package/fesm2015/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2015/acorex-components-tree-view.mjs +2 -3
- package/fesm2015/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2015/acorex-components-uploader.mjs +2 -3
- package/fesm2015/acorex-components-uploader.mjs.map +1 -1
- package/fesm2020/acorex-components-action-sheet.mjs +19 -6
- package/fesm2020/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2020/acorex-components-alert.mjs +2 -3
- package/fesm2020/acorex-components-alert.mjs.map +1 -1
- package/fesm2020/acorex-components-avatar.mjs +2 -2
- 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-breadcrumbs.mjs +2 -2
- package/fesm2020/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2020/acorex-components-button.mjs +32 -22
- package/fesm2020/acorex-components-button.mjs.map +1 -1
- package/fesm2020/acorex-components-calendar.mjs +2 -2
- package/fesm2020/acorex-components-calendar.mjs.map +1 -1
- package/fesm2020/acorex-components-card.mjs +2 -2
- package/fesm2020/acorex-components-card.mjs.map +1 -1
- package/fesm2020/acorex-components-chips.mjs +2 -2
- package/fesm2020/acorex-components-chips.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 +2 -2
- package/fesm2020/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2020/acorex-components-common.mjs +241 -2
- package/fesm2020/acorex-components-common.mjs.map +1 -1
- package/fesm2020/acorex-components-context-menu.mjs +2 -2
- package/fesm2020/acorex-components-context-menu.mjs.map +1 -1
- package/fesm2020/acorex-components-data-pager.mjs +2 -2
- package/fesm2020/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2020/acorex-components-data-table.mjs +2 -2
- package/fesm2020/acorex-components-data-table.mjs.map +1 -1
- package/fesm2020/acorex-components-dialog.mjs +17 -21
- package/fesm2020/acorex-components-dialog.mjs.map +1 -1
- package/fesm2020/acorex-components-drawer.mjs +2 -2
- package/fesm2020/acorex-components-drawer.mjs.map +1 -1
- package/fesm2020/acorex-components-dropdown.mjs +1 -1
- package/fesm2020/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2020/acorex-components-form.mjs +2 -3
- package/fesm2020/acorex-components-form.mjs.map +1 -1
- package/fesm2020/acorex-components-label.mjs +2 -2
- package/fesm2020/acorex-components-label.mjs.map +1 -1
- package/fesm2020/acorex-components-loading.mjs +2 -2
- package/fesm2020/acorex-components-menu.mjs +2 -2
- package/fesm2020/acorex-components-menu.mjs.map +1 -1
- package/fesm2020/acorex-components-notification.mjs +2 -2
- package/fesm2020/acorex-components-notification.mjs.map +1 -1
- package/fesm2020/acorex-components-number-box.mjs +2 -2
- package/fesm2020/acorex-components-number-box.mjs.map +1 -1
- package/fesm2020/acorex-components-picker.mjs +2 -2
- package/fesm2020/acorex-components-picker.mjs.map +1 -1
- package/fesm2020/acorex-components-popup.mjs +2 -2
- package/fesm2020/acorex-components-popup.mjs.map +1 -1
- package/fesm2020/acorex-components-progress-bar.mjs +2 -2
- package/fesm2020/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2020/acorex-components-range-slider.mjs +2 -2
- package/fesm2020/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2020/acorex-components-result.mjs +2 -2
- package/fesm2020/acorex-components-result.mjs.map +1 -1
- package/fesm2020/acorex-components-select-box.mjs +2 -2
- package/fesm2020/acorex-components-select-box.mjs.map +1 -1
- package/fesm2020/acorex-components-selection-list.mjs +2 -3
- package/fesm2020/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2020/acorex-components-switch.mjs +2 -3
- package/fesm2020/acorex-components-switch.mjs.map +1 -1
- package/fesm2020/acorex-components-tabs.mjs +2 -3
- package/fesm2020/acorex-components-tabs.mjs.map +1 -1
- package/fesm2020/acorex-components-tag.mjs +2 -3
- package/fesm2020/acorex-components-tag.mjs.map +1 -1
- package/fesm2020/acorex-components-textarea.mjs +2 -3
- package/fesm2020/acorex-components-textarea.mjs.map +1 -1
- package/fesm2020/acorex-components-time-box.mjs +0 -1
- package/fesm2020/acorex-components-toast.mjs +2 -2
- package/fesm2020/acorex-components-toast.mjs.map +1 -1
- package/fesm2020/acorex-components-tooltip.mjs +2 -3
- package/fesm2020/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2020/acorex-components-tree-view.mjs +2 -3
- package/fesm2020/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2020/acorex-components-uploader.mjs +2 -3
- package/fesm2020/acorex-components-uploader.mjs.map +1 -1
- package/mixin/src/base-components.class.d.ts +2 -2
- package/mixin/src/base-menu-mixin.class.d.ts +5 -5
- package/mixin/src/button-mixin.class.d.ts +2 -2
- package/mixin/src/clickable-mixin.class.d.ts +2 -2
- package/mixin/src/color-look-mixing.class.d.ts +2 -2
- package/mixin/src/datalist-component.class.d.ts +10 -10
- package/mixin/src/dropdown-mixin.class.d.ts +2 -2
- package/mixin/src/interactive-mixin.class.d.ts +4 -4
- package/mixin/src/loading-mixin.class.d.ts +2 -2
- package/mixin/src/mixin.class.d.ts +61 -61
- package/mixin/src/page-component.class.d.ts +2 -2
- package/mixin/src/selection-component.class.d.ts +2 -2
- package/mixin/src/sizable-mixin.class.d.ts +2 -2
- package/mixin/src/textbox-mixin.class.d.ts +2 -2
- package/mixin/src/value-mixin.class.d.ts +8 -8
- package/package.json +3 -2
- package/tabs/src/tab-item.component.d.ts +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-switch.mjs","sources":["../../../../projects/acorex/components/switch/src/switch-content.component.ts","../../../../projects/acorex/components/switch/src/switch.component.ts","../../../../projects/acorex/components/switch/src/switch.component.html","../../../../projects/acorex/components/switch/src/switch.module.ts","../../../../projects/acorex/components/switch/acorex-components-switch.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-switch-handler-content,ax-switch-off-content,ax-switch-on-content',\r\n template: `<ng-content></ng-content>`,\r\n})\r\nexport class AXSwitchContentComponent implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit(): void { }\r\n}\r\n","\r\nimport { AXBaseValueComponentMixin } from '@acorex/components/mixin';\r\nimport {\r\n Component,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n ElementRef,\r\n Input,\r\n HostBinding,\r\n} from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'ax-switch',\r\n templateUrl: './switch.component.html',\r\n styleUrls: ['./switch.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'color',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'cssClass',\r\n 'cssStyle',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n ],\r\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXSwitchComponent extends AXBaseValueComponentMixin {\r\n @Input()\r\n uncheckedText: string;\r\n\r\n @Input()\r\n checkedText: string;\r\n\r\n @Input()\r\n loading: boolean;\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n _handleOnClickEvent(e: MouseEvent) {\r\n if (this.readonly || this.disabled) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n } else {\r\n this.value = !this.value;\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.color ? this.color : 'primary'}-default`\r\n }\r\n}\r\n","<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\"\r\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\r\n <div class=\"ax-switch-handle\">\r\n <ax-loading *ngIf=\"loading\"></ax-loading>\r\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\r\n </div>\r\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\r\n <ng-content select=\"ax-switch-off-content\"></ng-content>\r\n\r\n </span>\r\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\r\n <ng-content select=\"ax-switch-on-content\"></ng-content>\r\n </span>\r\n\r\n</button>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXSwitchComponent } from './switch.component';\r\nimport { AXSwitchContentComponent } from './switch-content.component';\r\n\r\n@NgModule({\r\n declarations: [AXSwitchComponent,AXSwitchContentComponent],\r\n imports: [CommonModule, FormsModule, AXLoadingModule],\r\n exports: [AXSwitchComponent,AXSwitchContentComponent],\r\n providers: [],\r\n})\r\nexport class AXSwitchModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAMa,wBAAwB,CAAA;AACjC,IAAA,WAAA,GAAA,GAAiB;AAEjB,IAAA,QAAQ,MAAY;;qHAHX,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,4GAFvB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAE5B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sEAAsE;AAChF,oBAAA,QAAQ,EAAE,CAA2B,yBAAA,CAAA;iBACxC,CAAA;;;AC8BK,MAAO,iBAAkB,SAAQ,yBAAyB,CAAA;IAU9D,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;KACxB;AAED,IAAA,mBAAmB,CAAC,CAAa,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;AACrB,SAAA;AAAM,aAAA;AACL,YAAA,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;AAC1B,SAAA;KACF;AAED,IAAA,IACY,WAAW,GAAA;AACrB,QAAA,OAAO,CAAM,GAAA,EAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,SAAS,UAAU,CAAA;KAC3D;;8GA1BU,iBAAiB,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;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,kiBCnC9B,qrBAcS,EAAA,MAAA,EAAA,CAAA,
|
1
|
+
{"version":3,"file":"acorex-components-switch.mjs","sources":["../../../../projects/acorex/components/switch/src/switch-content.component.ts","../../../../projects/acorex/components/switch/src/switch.component.ts","../../../../projects/acorex/components/switch/src/switch.component.html","../../../../projects/acorex/components/switch/src/switch.module.ts","../../../../projects/acorex/components/switch/acorex-components-switch.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-switch-handler-content,ax-switch-off-content,ax-switch-on-content',\r\n template: `<ng-content></ng-content>`,\r\n})\r\nexport class AXSwitchContentComponent implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit(): void { }\r\n}\r\n","\r\nimport { AXBaseValueComponentMixin } from '@acorex/components/mixin';\r\nimport {\r\n Component,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n ElementRef,\r\n Input,\r\n HostBinding,\r\n} from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'ax-switch',\r\n templateUrl: './switch.component.html',\r\n styleUrls: ['./switch.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'color',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'cssClass',\r\n 'cssStyle',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n ],\r\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXSwitchComponent extends AXBaseValueComponentMixin {\r\n @Input()\r\n uncheckedText: string;\r\n\r\n @Input()\r\n checkedText: string;\r\n\r\n @Input()\r\n loading: boolean;\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n _handleOnClickEvent(e: MouseEvent) {\r\n if (this.readonly || this.disabled) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n } else {\r\n this.value = !this.value;\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.color ? this.color : 'primary'}-default`\r\n }\r\n}\r\n","<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\"\r\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\r\n <div class=\"ax-switch-handle\">\r\n <ax-loading *ngIf=\"loading\"></ax-loading>\r\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\r\n </div>\r\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\r\n <ng-content select=\"ax-switch-off-content\"></ng-content>\r\n\r\n </span>\r\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\r\n <ng-content select=\"ax-switch-on-content\"></ng-content>\r\n </span>\r\n\r\n</button>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXSwitchComponent } from './switch.component';\r\nimport { AXSwitchContentComponent } from './switch-content.component';\r\n\r\n@NgModule({\r\n declarations: [AXSwitchComponent,AXSwitchContentComponent],\r\n imports: [CommonModule, FormsModule, AXLoadingModule],\r\n exports: [AXSwitchComponent,AXSwitchContentComponent],\r\n providers: [],\r\n})\r\nexport class AXSwitchModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAMa,wBAAwB,CAAA;AACjC,IAAA,WAAA,GAAA,GAAiB;AAEjB,IAAA,QAAQ,MAAY;;qHAHX,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,4GAFvB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAE5B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sEAAsE;AAChF,oBAAA,QAAQ,EAAE,CAA2B,yBAAA,CAAA;iBACxC,CAAA;;;AC8BK,MAAO,iBAAkB,SAAQ,yBAAyB,CAAA;IAU9D,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;KACxB;AAED,IAAA,mBAAmB,CAAC,CAAa,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mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAJf,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;2FAIzC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAC,wBAAwB,CAAC;AAC1D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,eAAe,CAAC;AACrD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAC,wBAAwB,CAAC;AACrD,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;ACZD;;AAEG;;;;"}
|
@@ -221,14 +221,14 @@ AXTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
|
|
221
221
|
<div class="ax-items-wrapper">
|
222
222
|
<ng-content select="ax-tab-item"> </ng-content>
|
223
223
|
</div>
|
224
|
-
`, isInline: true, styles: ["
|
224
|
+
`, isInline: true, styles: [".ax-dark ax-tabs.ax-look-classic ax-tab-item:hover,.ax-dark ax-tabs.ax-look-classic ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-primary-500))!important;border-top-color:rgba(var(--ax-color-primary-500))!important;border-bottom-color:transparent!important;color:rgba(var(--ax-color-primary-fore))!important}ax-tabs{position:relative;display:block}ax-tabs.ax-tabs-fit{width:100%}ax-tabs.ax-tabs-fit ax-tab-item{flex:1}ax-tabs:not(.ax-look-custom) .ax-items-wrapper{position:relative}ax-tabs:not(.ax-look-custom) .ax-items-wrapper ax-tab-item{font-size:.875rem;line-height:1.25rem;padding:.75rem 1rem;cursor:pointer;position:relative;display:flex;gap:.5rem;-webkit-user-select:none;user-select:none}ax-tabs:not(.ax-look-custom) .ax-items-wrapper ax-tab-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-tabs.ax-horizontal .ax-items-wrapper{display:flex}ax-tabs.ax-horizontal .ax-items-wrapper ax-tab-item{text-align:center;align-items:center;justify-content:center}ax-tabs.ax-horizontal.ax-look-pills ax-tab-item{border-radius:var(--ax-rounded-border-default);margin-inline-end:.5rem}ax-tabs.ax-horizontal.ax-look-pills ax-tab-item:hover,ax-tabs.ax-horizontal.ax-look-pills ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-text-default))}ax-tabs.ax-horizontal.ax-look-pills-color ax-tab-item{border-radius:var(--ax-rounded-border-default);margin-inline-end:.25rem}ax-tabs.ax-horizontal.ax-look-pills-color ax-tab-item:hover,ax-tabs.ax-horizontal.ax-look-pills-color ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-tabs.ax-horizontal.ax-look-with-line .ax-items-wrapper{border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-horizontal.ax-look-with-line .ax-items-wrapper ax-tab-item{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-horizontal.ax-look-with-line .ax-items-wrapper ax-tab-item:hover,ax-tabs.ax-horizontal.ax-look-with-line .ax-items-wrapper ax-tab-item.ax-state-active{border-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-500))}ax-tabs.ax-horizontal.ax-look-classic .ax-items-wrapper{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-horizontal.ax-look-classic .ax-items-wrapper ax-tab-item{background:rgba(var(--ax-color-on-surface));border-top-width:1px;border-inline-start-width:1px;border-inline-end-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default));margin-inline-end:.2rem}ax-tabs.ax-horizontal.ax-look-classic .ax-items-wrapper ax-tab-item:hover,ax-tabs.ax-horizontal.ax-look-classic .ax-items-wrapper ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-surface));border-top-color:rgba(var(--ax-color-primary-500));border-bottom-color:transparent;color:rgba(var(--ax-color-primary-500))}ax-tabs.ax-vertical .ax-items-wrapper{display:flex;flex-direction:column}ax-tabs.ax-vertical.ax-look-pills ax-tab-item{border-radius:var(--ax-rounded-border-default);margin-block-end:.25rem}ax-tabs.ax-vertical.ax-look-pills ax-tab-item:hover,ax-tabs.ax-vertical.ax-look-pills ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-text-default))}ax-tabs.ax-vertical.ax-look-pills-color ax-tab-item{border-radius:var(--ax-rounded-border-default);margin-block-end:.25rem}ax-tabs.ax-vertical.ax-look-pills-color ax-tab-item:hover,ax-tabs.ax-vertical.ax-look-pills-color ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-tabs.ax-vertical.ax-look-with-line .ax-items-wrapper{border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-vertical.ax-look-with-line .ax-items-wrapper ax-tab-item{border-inline-start:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-vertical.ax-look-with-line .ax-items-wrapper ax-tab-item:hover,ax-tabs.ax-vertical.ax-look-with-line .ax-items-wrapper ax-tab-item.ax-state-active{border-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-500))}ax-tabs.ax-vertical.ax-look-classic .ax-items-wrapper{border-top-width:1px;border-bottom-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-vertical.ax-look-classic .ax-items-wrapper ax-tab-item{background:rgba(var(--ax-color-on-surface));border-inline-start-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-vertical.ax-look-classic .ax-items-wrapper ax-tab-item:hover,ax-tabs.ax-vertical.ax-look-classic .ax-items-wrapper ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-surface));border-inline-start-color:rgba(var(--ax-color-primary-500));border-inline-end-color:transparent;color:rgba(var(--ax-color-primary-500))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
225
225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTabsComponent, decorators: [{
|
226
226
|
type: Component,
|
227
227
|
args: [{ selector: 'ax-tabs', template: `
|
228
228
|
<div class="ax-items-wrapper">
|
229
229
|
<ng-content select="ax-tab-item"> </ng-content>
|
230
230
|
</div>
|
231
|
-
`, host: { class: 'ax-tabs' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["
|
231
|
+
`, host: { class: 'ax-tabs' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".ax-dark ax-tabs.ax-look-classic ax-tab-item:hover,.ax-dark ax-tabs.ax-look-classic ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-primary-500))!important;border-top-color:rgba(var(--ax-color-primary-500))!important;border-bottom-color:transparent!important;color:rgba(var(--ax-color-primary-fore))!important}ax-tabs{position:relative;display:block}ax-tabs.ax-tabs-fit{width:100%}ax-tabs.ax-tabs-fit ax-tab-item{flex:1}ax-tabs:not(.ax-look-custom) .ax-items-wrapper{position:relative}ax-tabs:not(.ax-look-custom) .ax-items-wrapper ax-tab-item{font-size:.875rem;line-height:1.25rem;padding:.75rem 1rem;cursor:pointer;position:relative;display:flex;gap:.5rem;-webkit-user-select:none;user-select:none}ax-tabs:not(.ax-look-custom) .ax-items-wrapper ax-tab-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-tabs.ax-horizontal .ax-items-wrapper{display:flex}ax-tabs.ax-horizontal .ax-items-wrapper ax-tab-item{text-align:center;align-items:center;justify-content:center}ax-tabs.ax-horizontal.ax-look-pills ax-tab-item{border-radius:var(--ax-rounded-border-default);margin-inline-end:.5rem}ax-tabs.ax-horizontal.ax-look-pills ax-tab-item:hover,ax-tabs.ax-horizontal.ax-look-pills ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-text-default))}ax-tabs.ax-horizontal.ax-look-pills-color ax-tab-item{border-radius:var(--ax-rounded-border-default);margin-inline-end:.25rem}ax-tabs.ax-horizontal.ax-look-pills-color ax-tab-item:hover,ax-tabs.ax-horizontal.ax-look-pills-color ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-tabs.ax-horizontal.ax-look-with-line .ax-items-wrapper{border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-horizontal.ax-look-with-line .ax-items-wrapper ax-tab-item{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-horizontal.ax-look-with-line .ax-items-wrapper ax-tab-item:hover,ax-tabs.ax-horizontal.ax-look-with-line .ax-items-wrapper ax-tab-item.ax-state-active{border-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-500))}ax-tabs.ax-horizontal.ax-look-classic .ax-items-wrapper{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-horizontal.ax-look-classic .ax-items-wrapper ax-tab-item{background:rgba(var(--ax-color-on-surface));border-top-width:1px;border-inline-start-width:1px;border-inline-end-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default));margin-inline-end:.2rem}ax-tabs.ax-horizontal.ax-look-classic .ax-items-wrapper ax-tab-item:hover,ax-tabs.ax-horizontal.ax-look-classic .ax-items-wrapper ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-surface));border-top-color:rgba(var(--ax-color-primary-500));border-bottom-color:transparent;color:rgba(var(--ax-color-primary-500))}ax-tabs.ax-vertical .ax-items-wrapper{display:flex;flex-direction:column}ax-tabs.ax-vertical.ax-look-pills ax-tab-item{border-radius:var(--ax-rounded-border-default);margin-block-end:.25rem}ax-tabs.ax-vertical.ax-look-pills ax-tab-item:hover,ax-tabs.ax-vertical.ax-look-pills ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-text-default))}ax-tabs.ax-vertical.ax-look-pills-color ax-tab-item{border-radius:var(--ax-rounded-border-default);margin-block-end:.25rem}ax-tabs.ax-vertical.ax-look-pills-color ax-tab-item:hover,ax-tabs.ax-vertical.ax-look-pills-color ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-tabs.ax-vertical.ax-look-with-line .ax-items-wrapper{border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-vertical.ax-look-with-line .ax-items-wrapper ax-tab-item{border-inline-start:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-vertical.ax-look-with-line .ax-items-wrapper ax-tab-item:hover,ax-tabs.ax-vertical.ax-look-with-line .ax-items-wrapper ax-tab-item.ax-state-active{border-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-500))}ax-tabs.ax-vertical.ax-look-classic .ax-items-wrapper{border-top-width:1px;border-bottom-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-vertical.ax-look-classic .ax-items-wrapper ax-tab-item{background:rgba(var(--ax-color-on-surface));border-inline-start-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default))}ax-tabs.ax-vertical.ax-look-classic .ax-items-wrapper ax-tab-item:hover,ax-tabs.ax-vertical.ax-look-classic .ax-items-wrapper ax-tab-item.ax-state-active{background-color:rgba(var(--ax-color-surface));border-inline-start-color:rgba(var(--ax-color-primary-500));border-inline-end-color:transparent;color:rgba(var(--ax-color-primary-500))}\n"] }]
|
232
232
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { _contentTabs: [{
|
233
233
|
type: ContentChildren,
|
234
234
|
args: [AXTabItemComponent]
|
@@ -302,4 +302,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
302
302
|
|
303
303
|
export { AXBaseTabItemMixin, AXTabContentDirective, AXTabItemComponent, AXTabStripChangedEvent, AXTabsComponent, AXTabsModule };
|
304
304
|
//# sourceMappingURL=acorex-components-tabs.mjs.map
|
305
|
-
//# sourceMappingURL=acorex-components-tabs.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-tabs.mjs","sources":["../../../../projects/acorex/components/tabs/src/tab-item.component.ts","../../../../projects/acorex/components/tabs/src/tabs.component.ts","../../../../projects/acorex/components/tabs/src/tabs.class.ts","../../../../projects/acorex/components/tabs/src/tab-content.directive.ts","../../../../projects/acorex/components/tabs/src/tabs.module.ts","../../../../projects/acorex/components/tabs/acorex-components-tabs.ts"],"sourcesContent":["\r\nimport { AXBaseComponent, AXComponentOptionChanged, _ClickableComponenetMixin } 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 ViewChild,\r\n TemplateRef,\r\n Output,\r\n EventEmitter,\r\n HostListener,\r\n ContentChild,\r\n} from '@angular/core';\r\n\r\nexport const AXBaseTabItemMixin = _ClickableComponenetMixin(AXBaseComponent);\r\n\r\n@Component({\r\n selector: 'ax-tab-item',\r\n template: `\r\n <ng-container *ngIf=\"headerTemplate; else header\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: {\r\n text: this.text,\r\n key: this.key,\r\n active: this.active,\r\n disabled: this.disabled\r\n }\r\n }\"\r\n ></ng-container>\r\n </ng-container>\r\n <!-- <ng-container *ngIf=\"headerTemplate;else header\">\r\n <ng-content select=\"ax-header\">\r\n </ng-content>\r\n </ng-container> -->\r\n <ng-template #header>\r\n <ng-content select=\"ax-prefix\"></ng-content>\r\n <span>{{ text }}</span>\r\n <ng-content select=\"ax-suffix\"></ng-content>\r\n </ng-template>\r\n <ng-template #content>\r\n <ng-content select=\"ax-content\"> </ng-content>\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXTabItemComponent extends AXBaseTabItemMixin {\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n @Input()\r\n text: string;\r\n\r\n @Input()\r\n key: string;\r\n\r\n @ViewChild('content')\r\n template: TemplateRef<any>;\r\n\r\n @ContentChild('header', { static: true })\r\n headerTemplate: TemplateRef<any>;\r\n\r\n @Output()\r\n activeChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n private _active: boolean = false;\r\n @Input()\r\n public get active(): boolean {\r\n return this._active;\r\n }\r\n public set active(value: boolean) {\r\n this._setOption({\r\n name: 'active',\r\n value,\r\n afterCallback: () => {\r\n this._cdr.markForCheck();\r\n },\r\n });\r\n }\r\n\r\n @Output()\r\n disabledChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n private _disabled: boolean = false;\r\n @Input()\r\n public get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n public set disabled(value: boolean) {\r\n this._setOption({\r\n name: 'disabled',\r\n value,\r\n });\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n private __hostClick(e: MouseEvent) {\r\n if (!this.disabled) {\r\n this.onClick.emit({\r\n component: this,\r\n htmlElement: this._getHostElement(),\r\n nativeEvent: e,\r\n });\r\n }\r\n }\r\n\r\n _onOptionChanged(option: AXComponentOptionChanged): void {\r\n const classListRef = this._getHostElement().classList;\r\n if (option.name == 'disabled') {\r\n option.newValue\r\n ? classListRef.add('ax-state-disabled')\r\n : classListRef.remove('ax-state-disabled');\r\n }\r\n if (option.name == 'active') {\r\n option.newValue\r\n ? classListRef.add('ax-state-active')\r\n : classListRef.remove('ax-state-active');\r\n }\r\n }\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ContentChildren,\r\n QueryList,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n HostBinding,\r\n} from '@angular/core';\r\nimport { AXTabLook, AXTabStripChangedEvent } from './tabs.class';\r\nimport { AXTabItemComponent } from './tab-item.component';\r\nimport { AXTabContentDirective } from './tab-content.directive';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { AXDirection } from '@acorex/components/common';\r\n\r\n@Component({\r\n selector: 'ax-tabs',\r\n template: `\r\n <div class=\"ax-items-wrapper\">\r\n <ng-content select=\"ax-tab-item\"> </ng-content>\r\n </div>\r\n `,\r\n styleUrls: ['tabs.component.scss'],\r\n host: { class: 'ax-tabs' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXTabsComponent extends AXBaseComponent {\r\n @ContentChildren(AXTabItemComponent)\r\n private _contentTabs!: QueryList<AXTabItemComponent>;\r\n\r\n @Input() look: AXTabLook = 'pills';\r\n\r\n\r\n @Input()\r\n orientation: AXDirection = 'horizontal';\r\n\r\n @Input()\r\n fitParent: boolean = false;\r\n\r\n @Input()\r\n minWidth: boolean = false;\r\n\r\n @Input()\r\n content!: AXTabContentDirective;\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n private _isUserInteraction: boolean = false;\r\n\r\n get items(): AXTabItemComponent[] {\r\n return this._contentTabs.toArray();\r\n }\r\n\r\n private _selectedItem!: AXTabItemComponent;\r\n\r\n get selectedIndex(): number {\r\n return this.items.indexOf(this._selectedItem);\r\n }\r\n\r\n get selectedItem(): AXTabItemComponent {\r\n return this._selectedItem;\r\n }\r\n\r\n @Output()\r\n onActiveTabChanged: EventEmitter<AXTabStripChangedEvent> = new EventEmitter<AXTabStripChangedEvent>();\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string[] {\r\n const cssClasses: string[] = [];\r\n cssClasses.push(`ax-look-${this.look}`);\r\n if (this.orientation == 'horizontal')\r\n cssClasses.push(`ax-horizontal`);\r\n else\r\n cssClasses.push(`ax-vertical`);\r\n return cssClasses;\r\n }\r\n\r\n\r\n ngAfterContentInit() {\r\n this._contentTabs.changes.subscribe((v) => {\r\n this._bindOnClickEvent();\r\n });\r\n }\r\n\r\n override ngAfterViewInit() {\r\n this._bindOnClickEvent();\r\n }\r\n\r\n private _bindOnClickEvent() {\r\n const selected = this.items.find((c) => c.active) || this.items[0];\r\n this.select(selected);\r\n this.items.forEach((c) => {\r\n if (!c.onClick.length) {\r\n c.onClick.subscribe((t) => {\r\n this._isUserInteraction = t.nativeEvent?.isTrusted;\r\n this.select(c);\r\n });\r\n }\r\n });\r\n }\r\n\r\n select(tab: number | AXTabItemComponent) {\r\n let tabItem: AXTabItemComponent =\r\n typeof tab == 'number' ? this.items[tab] : tab;\r\n //\r\n if (!tab || this.selectedItem == tabItem) return;\r\n this._selectedItem = tabItem;\r\n //\r\n this.items.forEach((c) => (c.active = false));\r\n tabItem.active = true;\r\n if (this.content) {\r\n this.content.portal = tabItem.template;\r\n }\r\n this._cdr.markForCheck();\r\n this.onActiveTabChanged.emit({\r\n component: this,\r\n isUserInteraction: this._isUserInteraction,\r\n tab: tabItem,\r\n index: this.selectedIndex,\r\n });\r\n this._isUserInteraction = false;\r\n }\r\n}\r\n","import { AXEvent } from '@acorex/components/common';\r\nimport { AXTabItemComponent } from './tab-item.component';\r\n\r\nexport class AXTabStripChangedEvent extends AXEvent {\r\n tab: AXTabItemComponent;\r\n index: number;\r\n}\r\n\r\n\r\nexport type AXTabLook =\r\n | 'pills'\r\n | 'pills-color'\r\n | 'with-line'\r\n | 'classic'\r\n | 'custom';","import { Directive, TemplateRef, ViewContainerRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[axTabContent]',\r\n exportAs: 'axTabContent',\r\n inputs: ['portal: axTabContent'],\r\n})\r\nexport class AXTabContentDirective {\r\n constructor(private _viewContainerRef: ViewContainerRef) {}\r\n\r\n private _portal: TemplateRef<any> | undefined;\r\n public get portal(): TemplateRef<any> | undefined{\r\n return this._portal;\r\n }\r\n public set portal(v: TemplateRef<any> | undefined) {\r\n //;\r\n if (v) {\r\n this._portal = v;\r\n this._viewContainerRef.clear();\r\n const viewRef = this._viewContainerRef.createEmbeddedView(v, null, 0);\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXTabContentDirective } from './tab-content.directive';\r\nimport { AXTabsComponent } from './tabs.component';\r\nimport { AXTabItemComponent } from './tab-item.component';\r\n\r\nconst COMPONENT = [AXTabsComponent, AXTabItemComponent, AXTabContentDirective];\r\nconst MODULES = [CommonModule, PortalModule, 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 AXTabsModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAiBa,kBAAkB,GAAG,yBAAyB,CAAC,eAAe,EAAE;AAkCvE,MAAO,kBAAmB,SAAQ,kBAAkB,CAAA;IACxD,WAAY,CAAA,WAAuB,EAAE,IAAuB,EAAA;AAC1D,QAAA,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAgB3B,QAAA,IAAA,CAAA,YAAY,GAA0B,IAAI,YAAY,EAAW,CAAC;AAE1D,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK,CAAC;AAgBjC,QAAA,IAAA,CAAA,cAAc,GAA0B,IAAI,YAAY,EAAW,CAAC;AAC5D,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK,CAAC;KAlClC;AAkBD,IAAA,IACW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IACD,IAAW,MAAM,CAAC,KAAc,EAAA;QAC9B,IAAI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,YAAY,YAJR,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;AChBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-tabs.mjs","sources":["../../../../projects/acorex/components/tabs/src/tab-item.component.ts","../../../../projects/acorex/components/tabs/src/tabs.component.ts","../../../../projects/acorex/components/tabs/src/tabs.class.ts","../../../../projects/acorex/components/tabs/src/tab-content.directive.ts","../../../../projects/acorex/components/tabs/src/tabs.module.ts","../../../../projects/acorex/components/tabs/acorex-components-tabs.ts"],"sourcesContent":["\r\nimport { AXBaseComponent, AXComponentOptionChanged, _ClickableComponenetMixin } 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 ViewChild,\r\n TemplateRef,\r\n Output,\r\n EventEmitter,\r\n HostListener,\r\n ContentChild,\r\n} from '@angular/core';\r\n\r\nexport const AXBaseTabItemMixin = _ClickableComponenetMixin(AXBaseComponent);\r\n\r\n@Component({\r\n selector: 'ax-tab-item',\r\n template: `\r\n <ng-container *ngIf=\"headerTemplate; else header\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: {\r\n text: this.text,\r\n key: this.key,\r\n active: this.active,\r\n disabled: this.disabled\r\n }\r\n }\"\r\n ></ng-container>\r\n </ng-container>\r\n <!-- <ng-container *ngIf=\"headerTemplate;else header\">\r\n <ng-content select=\"ax-header\">\r\n </ng-content>\r\n </ng-container> -->\r\n <ng-template #header>\r\n <ng-content select=\"ax-prefix\"></ng-content>\r\n <span>{{ text }}</span>\r\n <ng-content select=\"ax-suffix\"></ng-content>\r\n </ng-template>\r\n <ng-template #content>\r\n <ng-content select=\"ax-content\"> </ng-content>\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXTabItemComponent extends AXBaseTabItemMixin {\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n @Input()\r\n text: string;\r\n\r\n @Input()\r\n key: string;\r\n\r\n @ViewChild('content')\r\n template: TemplateRef<any>;\r\n\r\n @ContentChild('header', { static: true })\r\n headerTemplate: TemplateRef<any>;\r\n\r\n @Output()\r\n activeChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n private _active: boolean = false;\r\n @Input()\r\n public get active(): boolean {\r\n return this._active;\r\n }\r\n public set active(value: boolean) {\r\n this._setOption({\r\n name: 'active',\r\n value,\r\n afterCallback: () => {\r\n this._cdr.markForCheck();\r\n },\r\n });\r\n }\r\n\r\n @Output()\r\n disabledChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n private _disabled: boolean = false;\r\n @Input()\r\n public get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n public set disabled(value: boolean) {\r\n this._setOption({\r\n name: 'disabled',\r\n value,\r\n });\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n private __hostClick(e: MouseEvent) {\r\n if (!this.disabled) {\r\n this.onClick.emit({\r\n component: this,\r\n htmlElement: this._getHostElement(),\r\n nativeEvent: e,\r\n });\r\n }\r\n }\r\n\r\n _onOptionChanged(option: AXComponentOptionChanged): void {\r\n const classListRef = this._getHostElement().classList;\r\n if (option.name == 'disabled') {\r\n option.newValue\r\n ? classListRef.add('ax-state-disabled')\r\n : classListRef.remove('ax-state-disabled');\r\n }\r\n if (option.name == 'active') {\r\n option.newValue\r\n ? classListRef.add('ax-state-active')\r\n : classListRef.remove('ax-state-active');\r\n }\r\n }\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ContentChildren,\r\n QueryList,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n HostBinding,\r\n} from '@angular/core';\r\nimport { AXTabLook, AXTabStripChangedEvent } from './tabs.class';\r\nimport { AXTabItemComponent } from './tab-item.component';\r\nimport { AXTabContentDirective } from './tab-content.directive';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { AXDirection } from '@acorex/components/common';\r\n\r\n@Component({\r\n selector: 'ax-tabs',\r\n template: `\r\n <div class=\"ax-items-wrapper\">\r\n <ng-content select=\"ax-tab-item\"> </ng-content>\r\n </div>\r\n `,\r\n styleUrls: ['tabs.component.scss'],\r\n host: { class: 'ax-tabs' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXTabsComponent extends AXBaseComponent {\r\n @ContentChildren(AXTabItemComponent)\r\n private _contentTabs!: QueryList<AXTabItemComponent>;\r\n\r\n @Input() look: AXTabLook = 'pills';\r\n\r\n\r\n @Input()\r\n orientation: AXDirection = 'horizontal';\r\n\r\n @Input()\r\n fitParent: boolean = false;\r\n\r\n @Input()\r\n minWidth: boolean = false;\r\n\r\n @Input()\r\n content!: AXTabContentDirective;\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n private _isUserInteraction: boolean = false;\r\n\r\n get items(): AXTabItemComponent[] {\r\n return this._contentTabs.toArray();\r\n }\r\n\r\n private _selectedItem!: AXTabItemComponent;\r\n\r\n get selectedIndex(): number {\r\n return this.items.indexOf(this._selectedItem);\r\n }\r\n\r\n get selectedItem(): AXTabItemComponent {\r\n return this._selectedItem;\r\n }\r\n\r\n @Output()\r\n onActiveTabChanged: EventEmitter<AXTabStripChangedEvent> = new EventEmitter<AXTabStripChangedEvent>();\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string[] {\r\n const cssClasses: string[] = [];\r\n cssClasses.push(`ax-look-${this.look}`);\r\n if (this.orientation == 'horizontal')\r\n cssClasses.push(`ax-horizontal`);\r\n else\r\n cssClasses.push(`ax-vertical`);\r\n return cssClasses;\r\n }\r\n\r\n\r\n ngAfterContentInit() {\r\n this._contentTabs.changes.subscribe((v) => {\r\n this._bindOnClickEvent();\r\n });\r\n }\r\n\r\n override ngAfterViewInit() {\r\n this._bindOnClickEvent();\r\n }\r\n\r\n private _bindOnClickEvent() {\r\n const selected = this.items.find((c) => c.active) || this.items[0];\r\n this.select(selected);\r\n this.items.forEach((c) => {\r\n if (!c.onClick.length) {\r\n c.onClick.subscribe((t) => {\r\n this._isUserInteraction = t.nativeEvent?.isTrusted;\r\n this.select(c);\r\n });\r\n }\r\n });\r\n }\r\n\r\n select(tab: number | AXTabItemComponent) {\r\n let tabItem: AXTabItemComponent =\r\n typeof tab == 'number' ? this.items[tab] : tab;\r\n //\r\n if (!tab || this.selectedItem == tabItem) return;\r\n this._selectedItem = tabItem;\r\n //\r\n this.items.forEach((c) => (c.active = false));\r\n tabItem.active = true;\r\n if (this.content) {\r\n this.content.portal = tabItem.template;\r\n }\r\n this._cdr.markForCheck();\r\n this.onActiveTabChanged.emit({\r\n component: this,\r\n isUserInteraction: this._isUserInteraction,\r\n tab: tabItem,\r\n index: this.selectedIndex,\r\n });\r\n this._isUserInteraction = false;\r\n }\r\n}\r\n","import { AXEvent } from '@acorex/components/common';\r\nimport { AXTabItemComponent } from './tab-item.component';\r\n\r\nexport class AXTabStripChangedEvent extends AXEvent {\r\n tab: AXTabItemComponent;\r\n index: number;\r\n}\r\n\r\n\r\nexport type AXTabLook =\r\n | 'pills'\r\n | 'pills-color'\r\n | 'with-line'\r\n | 'classic'\r\n | 'custom';","import { Directive, TemplateRef, ViewContainerRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[axTabContent]',\r\n exportAs: 'axTabContent',\r\n inputs: ['portal: axTabContent'],\r\n})\r\nexport class AXTabContentDirective {\r\n constructor(private _viewContainerRef: ViewContainerRef) {}\r\n\r\n private _portal: TemplateRef<any> | undefined;\r\n public get portal(): TemplateRef<any> | undefined{\r\n return this._portal;\r\n }\r\n public set portal(v: TemplateRef<any> | undefined) {\r\n //;\r\n if (v) {\r\n this._portal = v;\r\n this._viewContainerRef.clear();\r\n const viewRef = this._viewContainerRef.createEmbeddedView(v, null, 0);\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXTabContentDirective } from './tab-content.directive';\r\nimport { AXTabsComponent } from './tabs.component';\r\nimport { AXTabItemComponent } from './tab-item.component';\r\n\r\nconst COMPONENT = [AXTabsComponent, AXTabItemComponent, AXTabContentDirective];\r\nconst MODULES = [CommonModule, PortalModule, 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 AXTabsModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAiBa,kBAAkB,GAAG,yBAAyB,CAAC,eAAe,EAAE;AAkCvE,MAAO,kBAAmB,SAAQ,kBAAkB,CAAA;IACxD,WAAY,CAAA,WAAuB,EAAE,IAAuB,EAAA;AAC1D,QAAA,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAgB3B,QAAA,IAAA,CAAA,YAAY,GAA0B,IAAI,YAAY,EAAW,CAAC;AAE1D,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK,CAAC;AAgBjC,QAAA,IAAA,CAAA,cAAc,GAA0B,IAAI,YAAY,EAAW,CAAC;A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AqB,CAAA,EAAA,CAAA,CAAA;AAShE,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAJR,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;AChBD;;AAEG;;;;"}
|
@@ -16,10 +16,10 @@ class AXTagComponent extends AXBaseComponent {
|
|
16
16
|
}
|
17
17
|
}
|
18
18
|
AXTagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
19
|
-
AXTagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTagComponent, selector: "ax-tag", inputs: { text: "text", look: "look" }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-tag-text\" *ngIf=\"text\">{{text }}</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>", styles: ["ax-tag{font-size:.875rem;padding:.25rem .5rem;border-radius:var(--ax-rounded-border-default);display:inline-flex;align-items:center}ax-tag ax-prefix,ax-tag ax-suffix{display:flex;align-items:center;font-size:1rem}ax-tag ax-prefix ax-icon,ax-tag ax-suffix ax-icon{font-size:1rem!important}ax-tag ax-prefix{padding-inline-end:.25rem}ax-tag ax-suffix{padding-inline-start:.25rem}ax-tag.ax-ghost-default{background-color:rgba(var(--ax-color-ghost)
|
19
|
+
AXTagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTagComponent, selector: "ax-tag", inputs: { text: "text", look: "look" }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-tag-text\" *ngIf=\"text\">{{text }}</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>", styles: ["ax-tag{font-size:.875rem;padding:.25rem .5rem;border-radius:var(--ax-rounded-border-default);display:inline-flex;align-items:center}ax-tag ax-prefix,ax-tag ax-suffix{display:flex;align-items:center;font-size:1rem}ax-tag ax-prefix ax-icon,ax-tag ax-suffix ax-icon{font-size:1rem!important}ax-tag ax-prefix{padding-inline-end:.25rem}ax-tag ax-suffix{padding-inline-start:.25rem}ax-tag.ax-ghost-default{background-color:rgba(var(--ax-color-ghost-100));color:rgba(var(--ax-color-ghost-fore))}ax-tag.ax-ghost-outline{border:1px solid;border-color:rgba(var(--ax-color-ghost-500));color:rgba(var(--ax-color-ghost-fore))}.ax-dark ax-tag.ax-ghost-default{background-color:rgba(var(--ax-color-ghost-500));color:rgba(var(--ax-color-ghost-fore))}.ax-dark ax-tag.ax-ghost-outline{border:1px solid;border-color:rgba(var(--ax-color-ghost-300));color:rgba(var(--ax-color-ghost-fore))}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
20
20
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTagComponent, decorators: [{
|
21
21
|
type: Component,
|
22
|
-
args: [{ selector: 'ax-tag', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-tag-text\" *ngIf=\"text\">{{text }}</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>", styles: ["ax-tag{font-size:.875rem;padding:.25rem .5rem;border-radius:var(--ax-rounded-border-default);display:inline-flex;align-items:center}ax-tag ax-prefix,ax-tag ax-suffix{display:flex;align-items:center;font-size:1rem}ax-tag ax-prefix ax-icon,ax-tag ax-suffix ax-icon{font-size:1rem!important}ax-tag ax-prefix{padding-inline-end:.25rem}ax-tag ax-suffix{padding-inline-start:.25rem}ax-tag.ax-ghost-default{background-color:rgba(var(--ax-color-ghost)
|
22
|
+
args: [{ selector: 'ax-tag', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-tag-text\" *ngIf=\"text\">{{text }}</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>", styles: ["ax-tag{font-size:.875rem;padding:.25rem .5rem;border-radius:var(--ax-rounded-border-default);display:inline-flex;align-items:center}ax-tag ax-prefix,ax-tag ax-suffix{display:flex;align-items:center;font-size:1rem}ax-tag ax-prefix ax-icon,ax-tag ax-suffix ax-icon{font-size:1rem!important}ax-tag ax-prefix{padding-inline-end:.25rem}ax-tag ax-suffix{padding-inline-start:.25rem}ax-tag.ax-ghost-default{background-color:rgba(var(--ax-color-ghost-100));color:rgba(var(--ax-color-ghost-fore))}ax-tag.ax-ghost-outline{border:1px solid;border-color:rgba(var(--ax-color-ghost-500));color:rgba(var(--ax-color-ghost-fore))}.ax-dark ax-tag.ax-ghost-default{background-color:rgba(var(--ax-color-ghost-500));color:rgba(var(--ax-color-ghost-fore))}.ax-dark ax-tag.ax-ghost-outline{border:1px solid;border-color:rgba(var(--ax-color-ghost-300));color:rgba(var(--ax-color-ghost-fore))}\n"] }]
|
23
23
|
}], ctorParameters: function () { return []; }, propDecorators: { text: [{
|
24
24
|
type: Input
|
25
25
|
}], look: [{
|
@@ -50,4 +50,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
50
50
|
|
51
51
|
export { AXTagComponent, AXTagModule };
|
52
52
|
//# sourceMappingURL=acorex-components-tag.mjs.map
|
53
|
-
//# sourceMappingURL=acorex-components-tag.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-tag.mjs","sources":["../../../../projects/acorex/components/tag/src/tag.component.ts","../../../../projects/acorex/components/tag/src/tag.component.html","../../../../projects/acorex/components/tag/src/tag.module.ts","../../../../projects/acorex/components/tag/acorex-components-tag.ts"],"sourcesContent":["import { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-tag',\r\n templateUrl: './tag.component.html',\r\n styleUrls: ['./tag.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXTagComponent extends AXBaseComponent {\r\n @Input()\r\n text: string = ''\r\n\r\n @Input()\r\n look: 'default' | 'outline' = 'default'\r\n\r\n constructor() {\r\n super()\r\n }\r\n\r\n\r\n ngOnInit(): void { }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-ghost-${this.look}`;\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-tag-text\" *ngIf=\"text\">{{text }}</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTagComponent } from './tag.component';\r\n\r\n@NgModule({\r\n declarations: [AXTagComponent],\r\n imports: [CommonModule],\r\n exports: [AXTagComponent],\r\n providers: [],\r\n})\r\nexport class AXTagModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAUM,MAAO,cAAe,SAAQ,eAAe,CAAA;AAO/C,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE,CAAA;AANX,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE,CAAA;AAGjB,QAAA,IAAI,CAAA,IAAA,GAA0B,SAAS,CAAA;KAItC;AAGD,IAAA,QAAQ,MAAY;AAEpB,IAAA,IACY,WAAW,GAAA;AACnB,QAAA,OAAO,CAAY,SAAA,EAAA,IAAI,CAAC,IAAI,EAAE,CAAC;KAClC;;2GAjBQ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,oKCV3B,+JAE4C,EAAA,MAAA,EAAA,CAAA,
|
1
|
+
{"version":3,"file":"acorex-components-tag.mjs","sources":["../../../../projects/acorex/components/tag/src/tag.component.ts","../../../../projects/acorex/components/tag/src/tag.component.html","../../../../projects/acorex/components/tag/src/tag.module.ts","../../../../projects/acorex/components/tag/acorex-components-tag.ts"],"sourcesContent":["import { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-tag',\r\n templateUrl: './tag.component.html',\r\n styleUrls: ['./tag.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXTagComponent extends AXBaseComponent {\r\n @Input()\r\n text: string = ''\r\n\r\n @Input()\r\n look: 'default' | 'outline' = 'default'\r\n\r\n constructor() {\r\n super()\r\n }\r\n\r\n\r\n ngOnInit(): void { }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-ghost-${this.look}`;\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-tag-text\" *ngIf=\"text\">{{text }}</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTagComponent } from './tag.component';\r\n\r\n@NgModule({\r\n declarations: [AXTagComponent],\r\n imports: [CommonModule],\r\n exports: [AXTagComponent],\r\n providers: [],\r\n})\r\nexport class AXTagModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAUM,MAAO,cAAe,SAAQ,eAAe,CAAA;AAO/C,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE,CAAA;AANX,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE,CAAA;AAGjB,QAAA,IAAI,CAAA,IAAA,GAA0B,SAAS,CAAA;KAItC;AAGD,IAAA,QAAQ,MAAY;AAEpB,IAAA,IACY,WAAW,GAAA;AACnB,QAAA,OAAO,CAAY,SAAA,EAAA,IAAI,CAAC,IAAI,EAAE,CAAC;KAClC;;2GAjBQ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,oKCV3B,+JAE4C,EAAA,MAAA,EAAA,CAAA,w2BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA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,10 +18,10 @@ class AXTextareaComponent extends AXBaseTextBoxMixin {
|
|
18
18
|
}
|
19
19
|
}
|
20
20
|
AXTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTextareaComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
21
|
-
AXTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTextareaComponent, selector: "ax-textarea", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", value: "value", name: "name", checked: "checked", placeholder: "placeholder", maxLength: "maxLength", rows: "rows" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", onValueChanged: "onValueChanged" }, host: { classAttribute: "ax-editor-container" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", styles: ["ax-textarea{position:relative;width:100%;height:auto!important;flex-direction:column;
|
21
|
+
AXTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTextareaComponent, selector: "ax-textarea", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", value: "value", name: "name", checked: "checked", placeholder: "placeholder", maxLength: "maxLength", rows: "rows" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", onValueChanged: "onValueChanged" }, host: { classAttribute: "ax-editor-container" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", styles: ["ax-textarea{position:relative;width:100%;height:auto!important;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border:rgba(var(--ax-color-border-default));overflow:hidden}ax-textarea textarea{height:-moz-fit-content;height:fit-content;line-height:1.7;width:100%;font-size:.875rem;padding:.625rem;background-color:inherit}ax-textarea textarea:focus{outline-color:transparent}ax-textarea>ax-prefix,ax-textarea>ax-suffix{margin-bottom:.5rem;padding:.375rem}ax-textarea.ax-state-disabled{cursor:not-allowed;opacity:.5}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
22
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTextareaComponent, decorators: [{
|
23
23
|
type: Component,
|
24
|
-
args: [{ selector: 'ax-textarea', inputs: ['disabled', 'tabIndex', 'readonly', 'value', 'name', 'checked', 'placeholder', 'maxLength'], outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'ax-editor-container' }, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", styles: ["ax-textarea{position:relative;width:100%;height:auto!important;flex-direction:column;
|
24
|
+
args: [{ selector: 'ax-textarea', inputs: ['disabled', 'tabIndex', 'readonly', 'value', 'name', 'checked', 'placeholder', 'maxLength'], outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'ax-editor-container' }, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", styles: ["ax-textarea{position:relative;width:100%;height:auto!important;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border:rgba(var(--ax-color-border-default));overflow:hidden}ax-textarea textarea{height:-moz-fit-content;height:fit-content;line-height:1.7;width:100%;font-size:.875rem;padding:.625rem;background-color:inherit}ax-textarea textarea:focus{outline-color:transparent}ax-textarea>ax-prefix,ax-textarea>ax-suffix{margin-bottom:.5rem;padding:.375rem}ax-textarea.ax-state-disabled{cursor:not-allowed;opacity:.5}\n"] }]
|
25
25
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
|
26
26
|
type: ViewChild,
|
27
27
|
args: ['input']
|
@@ -49,4 +49,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
49
49
|
|
50
50
|
export { AXTextareaComponent, AXTextareaModule };
|
51
51
|
//# sourceMappingURL=acorex-components-textarea.mjs.map
|
52
|
-
//# sourceMappingURL=acorex-components-textarea.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-textarea.mjs","sources":["../../../../projects/acorex/components/textarea/src/textarea.component.ts","../../../../projects/acorex/components/textarea/src/textarea.component.html","../../../../projects/acorex/components/textarea/src/textarea.module.ts","../../../../projects/acorex/components/textarea/acorex-components-textarea.ts"],"sourcesContent":["\r\nimport { AXBaseTextBoxMixin } from '@acorex/components/mixin';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'ax-textarea',\r\n templateUrl: './textarea.component.html',\r\n styleUrls: ['./textarea.component.scss'],\r\n inputs: ['disabled', 'tabIndex', 'readonly','value','name', 'checked', 'placeholder', 'maxLength'],\r\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { class: 'ax-editor-container' },\r\n})\r\nexport class AXTextareaComponent extends AXBaseTextBoxMixin {\r\n \r\n @ViewChild('input') \r\n input: ElementRef<HTMLInputElement>;\r\n \r\n @Input()\r\n rows: number = 0;\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 focus(): void {\r\n this.input.nativeElement.focus();\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXTextareaComponent } from './textarea.component';\r\n\r\n@NgModule({\r\n declarations: [AXTextareaComponent],\r\n imports: [CommonModule, FormsModule],\r\n exports: [AXTextareaComponent],\r\n})\r\nexport class AXTextareaModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAuBM,MAAO,mBAAoB,SAAQ,kBAAkB,CAAA;AAQzD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AANzB,QAAA,IAAI,CAAA,IAAA,GAAW,CAAC,CAAC;KAOhB;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;KAClC;;gHAjBU,mBAAmB,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;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,8gBCvBhC,smBAOa,EAAA,MAAA,EAAA,CAAA,
|
1
|
+
{"version":3,"file":"acorex-components-textarea.mjs","sources":["../../../../projects/acorex/components/textarea/src/textarea.component.ts","../../../../projects/acorex/components/textarea/src/textarea.component.html","../../../../projects/acorex/components/textarea/src/textarea.module.ts","../../../../projects/acorex/components/textarea/acorex-components-textarea.ts"],"sourcesContent":["\r\nimport { AXBaseTextBoxMixin } from '@acorex/components/mixin';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'ax-textarea',\r\n templateUrl: './textarea.component.html',\r\n styleUrls: ['./textarea.component.scss'],\r\n inputs: ['disabled', 'tabIndex', 'readonly','value','name', 'checked', 'placeholder', 'maxLength'],\r\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { class: 'ax-editor-container' },\r\n})\r\nexport class AXTextareaComponent extends AXBaseTextBoxMixin {\r\n \r\n @ViewChild('input') \r\n input: ElementRef<HTMLInputElement>;\r\n \r\n @Input()\r\n rows: number = 0;\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 focus(): void {\r\n this.input.nativeElement.focus();\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXTextareaComponent } from './textarea.component';\r\n\r\n@NgModule({\r\n declarations: [AXTextareaComponent],\r\n imports: [CommonModule, FormsModule],\r\n exports: [AXTextareaComponent],\r\n})\r\nexport class AXTextareaModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAuBM,MAAO,mBAAoB,SAAQ,kBAAkB,CAAA;AAQzD;;AAEG;IACH,W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AAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,mBAAmB,CAAC;iBAC/B,CAAA;;;ACTD;;AAEG;;;;"}
|
@@ -57,10 +57,10 @@ class AXToastComponent extends AXBaseComponentMixin {
|
|
57
57
|
}
|
58
58
|
}
|
59
59
|
AXToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXToastComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
60
|
-
AXToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXToastComponent, selector: "ax-toast", host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], usesInheritance: true, ngImport: i0, template: "<span [class]=\"'ax-toast-icon' + ' ' + _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"options.title && options.content\">{{options.title}}</div>\r\n <div class=\"ax-toast-content\" [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" *ngIf=\"options.closeable\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>", styles: ["
|
60
|
+
AXToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXToastComponent, selector: "ax-toast", host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], usesInheritance: true, ngImport: i0, template: "<span [class]=\"'ax-toast-icon' + ' ' + _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"options.title && options.content\">{{options.title}}</div>\r\n <div class=\"ax-toast-content\" [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" *ngIf=\"options.closeable\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>", styles: [".ax-dark ax-toast.ax-primary{background-color:rgba(var(--ax-color-primary-900));color:rgba(var(--ax-color-primary-100));border-color:rgba(var(--ax-color-primary-500))}.ax-dark ax-toast.ax-primary .ax-toast-title{color:rgba(var(--ax-color-primary-100))}.ax-dark ax-toast.ax-primary .ax-toast-progress{background-color:rgba(var(--ax-color-primary-500))}.ax-dark ax-toast.ax-secondary{background-color:rgba(var(--ax-color-secondary-900));color:rgba(var(--ax-color-secondary-100));border-color:rgba(var(--ax-color-secondary-500))}.ax-dark ax-toast.ax-secondary .ax-toast-title{color:rgba(var(--ax-color-secondary-100))}.ax-dark ax-toast.ax-secondary .ax-toast-progress{background-color:rgba(var(--ax-color-secondary-500))}.ax-dark ax-toast.ax-success{background-color:rgba(var(--ax-color-success-900));color:rgba(var(--ax-color-success-100));border-color:rgba(var(--ax-color-success-500))}.ax-dark ax-toast.ax-success .ax-toast-title{color:rgba(var(--ax-color-success-100))}.ax-dark ax-toast.ax-success .ax-toast-progress{background-color:rgba(var(--ax-color-success-500))}.ax-dark ax-toast.ax-warning{background-color:rgba(var(--ax-color-warning-900));color:rgba(var(--ax-color-warning-100));border-color:rgba(var(--ax-color-warning-500))}.ax-dark ax-toast.ax-warning .ax-toast-title{color:rgba(var(--ax-color-warning-100))}.ax-dark ax-toast.ax-warning .ax-toast-progress{background-color:rgba(var(--ax-color-warning-500))}.ax-dark ax-toast.ax-danger{background-color:rgba(var(--ax-color-danger-900));color:rgba(var(--ax-color-danger-100));border-color:rgba(var(--ax-color-danger-500))}.ax-dark ax-toast.ax-danger .ax-toast-title{color:rgba(var(--ax-color-danger-100))}.ax-dark ax-toast.ax-danger .ax-toast-progress{background-color:rgba(var(--ax-color-danger-500))}ax-toast{width:max(20vw,380px);display:flex;padding:.75rem 1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}ax-toast.ax-primary{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-toast.ax-primary .ax-toast-progress{background-color:rgba(var(--ax-color-primary-700))}ax-toast.ax-secondary{background-color:rgba(var(--ax-color-secondary-500));color:rgba(var(--ax-color-secondary-fore))}ax-toast.ax-secondary .ax-toast-progress{background-color:rgba(var(--ax-color-secondary-700))}ax-toast.ax-success{background-color:rgba(var(--ax-color-success-500));color:rgba(var(--ax-color-success-fore))}ax-toast.ax-success .ax-toast-progress{background-color:rgba(var(--ax-color-success-700))}ax-toast.ax-warning{background-color:rgba(var(--ax-color-warning-500));color:rgba(var(--ax-color-warning-fore))}ax-toast.ax-warning .ax-toast-progress{background-color:rgba(var(--ax-color-warning-700))}ax-toast.ax-danger{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}ax-toast.ax-danger .ax-toast-progress{background-color:rgba(var(--ax-color-danger-700))}@media (max-width: 599px){ax-toast{width:98vw}}ax-toast .ax-toast-icon,ax-toast .ax-icon-close{font-size:1.25rem}ax-toast .ax-toast-icon{padding-inline-end:.75rem}ax-toast .ax-toast-content{display:flex;flex-direction:column;flex:1}ax-toast .ax-toast-content .ax-toast-title{font-weight:500}ax-toast .ax-toast-content .ax-toast-title.ax-mb-2{margin-bottom:.5rem}ax-toast .ax-toast-content .ax-toast-buttons{margin-top:.5rem}ax-toast .ax-toast-content .ax-toast-buttons button{font-weight:500}ax-toast .ax-toast-content .ax-toast-buttons button:hover{opacity:.6}ax-toast .ax-icon-close{cursor:pointer;height:-moz-fit-content;height:fit-content}ax-toast .ax-icon-close:hover{opacity:.6}ax-toast .ax-toast-progress{position:absolute;right:0;left:0;bottom:0;height:.375rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:rgba(var(--ax-color-border-default))}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
61
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXToastComponent, decorators: [{
|
62
62
|
type: Component,
|
63
|
-
args: [{ selector: 'ax-toast', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], template: "<span [class]=\"'ax-toast-icon' + ' ' + _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"options.title && options.content\">{{options.title}}</div>\r\n <div class=\"ax-toast-content\" [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" *ngIf=\"options.closeable\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>", styles: ["
|
63
|
+
args: [{ selector: 'ax-toast', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], template: "<span [class]=\"'ax-toast-icon' + ' ' + _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"options.title && options.content\">{{options.title}}</div>\r\n <div class=\"ax-toast-content\" [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" *ngIf=\"options.closeable\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>", styles: [".ax-dark ax-toast.ax-primary{background-color:rgba(var(--ax-color-primary-900));color:rgba(var(--ax-color-primary-100));border-color:rgba(var(--ax-color-primary-500))}.ax-dark ax-toast.ax-primary .ax-toast-title{color:rgba(var(--ax-color-primary-100))}.ax-dark ax-toast.ax-primary .ax-toast-progress{background-color:rgba(var(--ax-color-primary-500))}.ax-dark ax-toast.ax-secondary{background-color:rgba(var(--ax-color-secondary-900));color:rgba(var(--ax-color-secondary-100));border-color:rgba(var(--ax-color-secondary-500))}.ax-dark ax-toast.ax-secondary .ax-toast-title{color:rgba(var(--ax-color-secondary-100))}.ax-dark ax-toast.ax-secondary .ax-toast-progress{background-color:rgba(var(--ax-color-secondary-500))}.ax-dark ax-toast.ax-success{background-color:rgba(var(--ax-color-success-900));color:rgba(var(--ax-color-success-100));border-color:rgba(var(--ax-color-success-500))}.ax-dark ax-toast.ax-success .ax-toast-title{color:rgba(var(--ax-color-success-100))}.ax-dark ax-toast.ax-success .ax-toast-progress{background-color:rgba(var(--ax-color-success-500))}.ax-dark ax-toast.ax-warning{background-color:rgba(var(--ax-color-warning-900));color:rgba(var(--ax-color-warning-100));border-color:rgba(var(--ax-color-warning-500))}.ax-dark ax-toast.ax-warning .ax-toast-title{color:rgba(var(--ax-color-warning-100))}.ax-dark ax-toast.ax-warning .ax-toast-progress{background-color:rgba(var(--ax-color-warning-500))}.ax-dark ax-toast.ax-danger{background-color:rgba(var(--ax-color-danger-900));color:rgba(var(--ax-color-danger-100));border-color:rgba(var(--ax-color-danger-500))}.ax-dark ax-toast.ax-danger .ax-toast-title{color:rgba(var(--ax-color-danger-100))}.ax-dark ax-toast.ax-danger .ax-toast-progress{background-color:rgba(var(--ax-color-danger-500))}ax-toast{width:max(20vw,380px);display:flex;padding:.75rem 1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}ax-toast.ax-primary{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-toast.ax-primary .ax-toast-progress{background-color:rgba(var(--ax-color-primary-700))}ax-toast.ax-secondary{background-color:rgba(var(--ax-color-secondary-500));color:rgba(var(--ax-color-secondary-fore))}ax-toast.ax-secondary .ax-toast-progress{background-color:rgba(var(--ax-color-secondary-700))}ax-toast.ax-success{background-color:rgba(var(--ax-color-success-500));color:rgba(var(--ax-color-success-fore))}ax-toast.ax-success .ax-toast-progress{background-color:rgba(var(--ax-color-success-700))}ax-toast.ax-warning{background-color:rgba(var(--ax-color-warning-500));color:rgba(var(--ax-color-warning-fore))}ax-toast.ax-warning .ax-toast-progress{background-color:rgba(var(--ax-color-warning-700))}ax-toast.ax-danger{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}ax-toast.ax-danger .ax-toast-progress{background-color:rgba(var(--ax-color-danger-700))}@media (max-width: 599px){ax-toast{width:98vw}}ax-toast .ax-toast-icon,ax-toast .ax-icon-close{font-size:1.25rem}ax-toast .ax-toast-icon{padding-inline-end:.75rem}ax-toast .ax-toast-content{display:flex;flex-direction:column;flex:1}ax-toast .ax-toast-content .ax-toast-title{font-weight:500}ax-toast .ax-toast-content .ax-toast-title.ax-mb-2{margin-bottom:.5rem}ax-toast .ax-toast-content .ax-toast-buttons{margin-top:.5rem}ax-toast .ax-toast-content .ax-toast-buttons button{font-weight:500}ax-toast .ax-toast-content .ax-toast-buttons button:hover{opacity:.6}ax-toast .ax-icon-close{cursor:pointer;height:-moz-fit-content;height:fit-content}ax-toast .ax-icon-close:hover{opacity:.6}ax-toast .ax-toast-progress{position:absolute;right:0;left:0;bottom:0;height:.375rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:rgba(var(--ax-color-border-default))}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"] }]
|
64
64
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { __hostClass: [{
|
65
65
|
type: HostBinding,
|
66
66
|
args: ['class']
|
@@ -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 HostBinding,\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 styleUrls: ['./toast.component.scss'],\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\r\n options: AXToastOptions;\r\n\r\n _toastWidth: number = 100;\r\n\r\n _icon: string;\r\n\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 if (!this.options.icon) {\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n default:\r\n this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n } else {\r\n this._icon = this.options.icon;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.options.color}`\r\n }\r\n\r\n}\r\n","<span [class]=\"'ax-toast-icon' + ' ' + _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"options.title && options.content\">{{options.title}}</div>\r\n <div class=\"ax-toast-content\" [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" *ngIf=\"options.closeable\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXToastComponent } from './toast.component';\r\n\r\nconst COMPONENT = [AXToastComponent];\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 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 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 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 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 }\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":";;;;;;;;;;AAaA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,oBAAoB,CAAA;AASxD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AATzB,QAAA,IAAW,CAAA,WAAA,GAAW,GAAG,CAAC;KAUzB;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACxB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,aAAC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC1B,SAAA;AACD,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;AACtB,YAAA,QAAQ,IAAI,CAAC,OAAO,CAAC,KAAK;AACxB,gBAAA,KAAK,SAAS;AACZ,oBAAA,IAAI,CAAC,KAAK,GAAG,mCAAmC,CAAC;oBACjD,MAAM;AACR,gBAAA,KAAK,SAAS;AACZ,oBAAA,IAAI,CAAC,KAAK,GAAG,8BAA8B,CAAC;oBAC5C,MAAM;AACR,gBAAA,KAAK,QAAQ;AACX,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;;;"}
|
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 HostBinding,\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 styleUrls: ['./toast.component.scss'],\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\r\n options: AXToastOptions;\r\n\r\n _toastWidth: number = 100;\r\n\r\n _icon: string;\r\n\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 if (!this.options.icon) {\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n default:\r\n this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n } else {\r\n this._icon = this.options.icon;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.options.color}`\r\n }\r\n\r\n}\r\n","<span [class]=\"'ax-toast-icon' + ' ' + _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"options.title && options.content\">{{options.title}}</div>\r\n <div class=\"ax-toast-content\" [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" *ngIf=\"options.closeable\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXToastComponent } from './toast.component';\r\n\r\nconst COMPONENT = [AXToastComponent];\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 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 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 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 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 }\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":";;;;;;;;;;AAaA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,oBAAoB,CAAA;AASxD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AATzB,QAAA,IAAW,CAAA,WAAA,GAAW,GAAG,CAAC;KAUzB;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACxB,U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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;;;;"}
|
@@ -14,10 +14,10 @@ class AXTooltipComponent extends AXBaseComponentMixin {
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
AXTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTooltipComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
17
|
-
AXTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\">\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div>\r\n</div>\r\n", styles: ["
|
17
|
+
AXTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\">\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div>\r\n</div>\r\n", styles: [".ax-dark .ax-tooltip-container{--ax-tooltip-background: 255, 255, 255;--ax-tooltip-color: 97, 97, 97}.ax-tooltip-container{position:relative;--ax-tooltip-background: 97, 97, 97;--ax-tooltip-color: 255, 255, 255}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgba(var(--ax-tooltip-background));color:rgba(var(--ax-tooltip-color));border-radius:.25rem;font-size:.75rem;font-weight:400}\n"], encapsulation: i0.ViewEncapsulation.None });
|
18
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTooltipComponent, decorators: [{
|
19
19
|
type: Component,
|
20
|
-
args: [{ selector: 'ax-tooltip', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\">\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div>\r\n</div>\r\n", styles: ["
|
20
|
+
args: [{ selector: 'ax-tooltip', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\">\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div>\r\n</div>\r\n", styles: [".ax-dark .ax-tooltip-container{--ax-tooltip-background: 255, 255, 255;--ax-tooltip-color: 97, 97, 97}.ax-tooltip-container{position:relative;--ax-tooltip-background: 97, 97, 97;--ax-tooltip-color: 255, 255, 255}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgba(var(--ax-tooltip-background));color:rgba(var(--ax-tooltip-color));border-radius:.25rem;font-size:.75rem;font-weight:400}\n"] }]
|
21
21
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { text: [{
|
22
22
|
type: Input
|
23
23
|
}], position: [{
|
@@ -161,4 +161,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
161
161
|
|
162
162
|
export { AXTooltipComponent, AXTooltipDirective, AXTooltipModule };
|
163
163
|
//# sourceMappingURL=acorex-components-tooltip.mjs.map
|
164
|
-
//# sourceMappingURL=acorex-components-tooltip.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../projects/acorex/components/tooltip/src/tooltip.component.ts","../../../../projects/acorex/components/tooltip/src/tooltip.component.html","../../../../projects/acorex/components/tooltip/src/tooltip.directive.ts","../../../../projects/acorex/components/tooltip/src/tooltip.module.ts","../../../../projects/acorex/components/tooltip/acorex-components-tooltip.ts"],"sourcesContent":["import { AXPosition } from '@acorex/components/common';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { animate, AnimationTriggerMetadata, style, transition, trigger } from '@angular/animations';\r\nimport { Component, ViewEncapsulation, ElementRef, ChangeDetectorRef, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-tooltip',\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n // animations: [\r\n // trigger('tooltip', [\r\n // transition(':enter', [style({ opacity: 0 }), animate(50, style({ opacity: 1 }))]),\r\n // transition(':leave', [animate(50, style({ opacity: 0 }))]),\r\n // ]),\r\n // ],\r\n})\r\nexport class AXTooltipComponent extends AXBaseComponentMixin {\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n @Input()\r\n text: string = '';\r\n\r\n @Input() position: AXPosition;\r\n}\r\n","<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\">\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div>\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n ComponentRef,\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n} from '@angular/core';\r\nimport { Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\nimport { AXPosition, AXPositions } from '@acorex/components/common';\r\n\r\n@Directive({ selector: '[axTooltip]' })\r\nexport class AXTooltipDirective {\r\n @Input('axTooltip') text = '';\r\n @Input('axTooltipPosition') position: AXPosition = 'top-center';\r\n\r\n private overlayRef: OverlayRef;\r\n protected positions: any[];\r\n\r\n constructor(\r\n private overlay: Overlay,\r\n private overlayPositionBuilder: OverlayPositionBuilder,\r\n private elementRef: ElementRef,\r\n private cdr: ChangeDetectorRef\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n //Called after the constructor, initializing input properties, and the first call to ngOnChanges.\r\n //Add 'implements OnInit' to the class.\r\n this.positioning();\r\n }\r\n ngAfterViewInit(): void {}\r\n\r\n protected positioning() {\r\n const offset = 8;\r\n switch (this.position) {\r\n case 'top-start':\r\n this.positions = [\r\n {\r\n ...AXPositions.topStart,\r\n offsetY: -offset,\r\n },\r\n ];\r\n break;\r\n default:\r\n case 'top-center':\r\n this.positions = [\r\n {\r\n ...AXPositions.topCenter,\r\n offsetY: -offset,\r\n },\r\n ];\r\n break;\r\n case 'top-end':\r\n this.positions = [\r\n {\r\n ...AXPositions.topEnd,\r\n offsetY: -offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'start-start':\r\n this.positions = [\r\n {\r\n ...AXPositions.startStart,\r\n offsetX: -offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'start-center':\r\n this.positions = [\r\n {\r\n ...AXPositions.startCenter,\r\n offsetX: -offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'start-end':\r\n this.positions = [\r\n {\r\n ...AXPositions.startEnd,\r\n offsetX: -offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'bottom-start':\r\n this.positions = [\r\n {\r\n ...AXPositions.bottomStart,\r\n offsetY: offset,\r\n },\r\n ];\r\n break;\r\n case 'bottom-center':\r\n this.positions = [\r\n {\r\n ...AXPositions.bottomCenter,\r\n offsetY: offset,\r\n },\r\n ];\r\n break;\r\n case 'bottom-end':\r\n this.positions = [\r\n {\r\n ...AXPositions.bottomEnd,\r\n offsetY: offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'end-start':\r\n this.positions = [\r\n {\r\n ...AXPositions.endStart,\r\n offsetX: offset,\r\n },\r\n ];\r\n break;\r\n case 'end-center':\r\n this.positions = [\r\n {\r\n ...AXPositions.endCenter,\r\n offsetX: offset,\r\n },\r\n ];\r\n break;\r\n case 'end-end':\r\n this.positions = [\r\n {\r\n ...AXPositions.endEnd,\r\n offsetX: offset,\r\n },\r\n ];\r\n break;\r\n }\r\n const positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions(this.positions);\r\n this.overlayRef = this.overlay.create({ positionStrategy });\r\n }\r\n\r\n @HostListener('mouseenter')\r\n show() {\r\n const tooltipRef: ComponentRef<AXTooltipComponent> = this.overlayRef.attach(new ComponentPortal(AXTooltipComponent));\r\n tooltipRef.instance.text = this.text;\r\n tooltipRef.instance.position = this.position;\r\n setTimeout(() => {\r\n this.cdr.markForCheck();\r\n });\r\n }\r\n\r\n @HostListener('mouseleave')\r\n hide() {\r\n this.overlayRef.detach();\r\n this.cdr.markForCheck();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\nimport { AXTooltipDirective } from './tooltip.directive';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\r\nconst MODULES = [CommonModule, OverlayModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n})\r\nexport class AX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AAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,CART,kBAAkB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CACxC,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CADzB,kBAAkB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAQ5C,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHb,OAAO,CAAA,EAAA,CAAA,CAAA;2FAGT,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,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;iBACxB,CAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../projects/acorex/components/tooltip/src/tooltip.component.ts","../../../../projects/acorex/components/tooltip/src/tooltip.component.html","../../../../projects/acorex/components/tooltip/src/tooltip.directive.ts","../../../../projects/acorex/components/tooltip/src/tooltip.module.ts","../../../../projects/acorex/components/tooltip/acorex-components-tooltip.ts"],"sourcesContent":["import { AXPosition } from '@acorex/components/common';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { animate, AnimationTriggerMetadata, style, transition, trigger } from '@angular/animations';\r\nimport { Component, ViewEncapsulation, ElementRef, ChangeDetectorRef, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-tooltip',\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n // animations: [\r\n // trigger('tooltip', [\r\n // transition(':enter', [style({ opacity: 0 }), animate(50, style({ opacity: 1 }))]),\r\n // transition(':leave', [animate(50, style({ opacity: 0 }))]),\r\n // ]),\r\n // ],\r\n})\r\nexport class AXTooltipComponent extends AXBaseComponentMixin {\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n @Input()\r\n text: string = '';\r\n\r\n @Input() position: AXPosition;\r\n}\r\n","<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\">\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div>\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n ComponentRef,\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n} from '@angular/core';\r\nimport { Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\nimport { AXPosition, AXPositions } from '@acorex/components/common';\r\n\r\n@Directive({ selector: '[axTooltip]' })\r\nexport class AXTooltipDirective {\r\n @Input('axTooltip') text = '';\r\n @Input('axTooltipPosition') position: AXPosition = 'top-center';\r\n\r\n private overlayRef: OverlayRef;\r\n protected positions: any[];\r\n\r\n constructor(\r\n private overlay: Overlay,\r\n private overlayPositionBuilder: OverlayPositionBuilder,\r\n private elementRef: ElementRef,\r\n private cdr: ChangeDetectorRef\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n //Called after the constructor, initializing input properties, and the first call to ngOnChanges.\r\n //Add 'implements OnInit' to the class.\r\n this.positioning();\r\n }\r\n ngAfterViewInit(): void {}\r\n\r\n protected positioning() {\r\n const offset = 8;\r\n switch (this.position) {\r\n case 'top-start':\r\n this.positions = [\r\n {\r\n ...AXPositions.topStart,\r\n offsetY: -offset,\r\n },\r\n ];\r\n break;\r\n default:\r\n case 'top-center':\r\n this.positions = [\r\n {\r\n ...AXPositions.topCenter,\r\n offsetY: -offset,\r\n },\r\n ];\r\n break;\r\n case 'top-end':\r\n this.positions = [\r\n {\r\n ...AXPositions.topEnd,\r\n offsetY: -offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'start-start':\r\n this.positions = [\r\n {\r\n ...AXPositions.startStart,\r\n offsetX: -offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'start-center':\r\n this.positions = [\r\n {\r\n ...AXPositions.startCenter,\r\n offsetX: -offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'start-end':\r\n this.positions = [\r\n {\r\n ...AXPositions.startEnd,\r\n offsetX: -offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'bottom-start':\r\n this.positions = [\r\n {\r\n ...AXPositions.bottomStart,\r\n offsetY: offset,\r\n },\r\n ];\r\n break;\r\n case 'bottom-center':\r\n this.positions = [\r\n {\r\n ...AXPositions.bottomCenter,\r\n offsetY: offset,\r\n },\r\n ];\r\n break;\r\n case 'bottom-end':\r\n this.positions = [\r\n {\r\n ...AXPositions.bottomEnd,\r\n offsetY: offset,\r\n },\r\n ];\r\n break;\r\n\r\n case 'end-start':\r\n this.positions = [\r\n {\r\n ...AXPositions.endStart,\r\n offsetX: offset,\r\n },\r\n ];\r\n break;\r\n case 'end-center':\r\n this.positions = [\r\n {\r\n ...AXPositions.endCenter,\r\n offsetX: offset,\r\n },\r\n ];\r\n break;\r\n case 'end-end':\r\n this.positions = [\r\n {\r\n ...AXPositions.endEnd,\r\n offsetX: offset,\r\n },\r\n ];\r\n break;\r\n }\r\n const positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions(this.positions);\r\n this.overlayRef = this.overlay.create({ positionStrategy });\r\n }\r\n\r\n @HostListener('mouseenter')\r\n show() {\r\n const tooltipRef: ComponentRef<AXTooltipComponent> = this.overlayRef.attach(new ComponentPortal(AXTooltipComponent));\r\n tooltipRef.instance.text = this.text;\r\n tooltipRef.instance.position = this.position;\r\n setTimeout(() => {\r\n this.cdr.markForCheck();\r\n });\r\n }\r\n\r\n @HostListener('mouseleave')\r\n hide() {\r\n this.overlayRef.detach();\r\n this.cdr.markForCheck();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\nimport { AXTooltipDirective } from './tooltip.directive';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\r\nconst MODULES = [CommonModule, OverlayModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n})\r\nexport class AXTooltipModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAiBM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;IAC1D,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAIzB,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;KAHjB;;+GAHU,kBAAkB,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;AAAlB,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,yHCjB/B,kMAMA,EAAA,MAAA,EAAA,CAAA,0aAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,C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