@acorex/components 6.0.15 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/src/alert.component.d.ts +4 -4
- package/avatar/src/avatar.component.d.ts +6 -9
- package/badge/src/badge.component.d.ts +1 -1
- package/breadcrumbs/src/breadcrumbs-item.component.d.ts +4 -4
- package/button/src/button-group.component.d.ts +4 -4
- package/button/src/button-item.class.d.ts +2 -1
- package/button/src/button-item.component.d.ts +4 -4
- package/button/src/button.component.d.ts +3 -1
- package/calendar/src/calendar.component.d.ts +20 -20
- package/color-picker/src/color-picker.component.d.ts +14 -14
- package/common/src/auto-focus.directive.d.ts +2 -1
- package/common/src/events.class.d.ts +1 -1
- package/date-picker/src/datepicker.component.d.ts +23 -23
- package/decorators/public-api.d.ts +1 -0
- package/decorators/src/decorators.module.d.ts +3 -2
- package/decorators/src/text.component.d.ts +9 -0
- package/dialog/src/dialog.service.d.ts +3 -1
- package/dropdown/src/dropdown-panel.component.d.ts +1 -0
- package/dropdown/src/dropdown.module.d.ts +7 -5
- package/esm2020/action-sheet/src/action-sheet-item.component.mjs +1 -1
- package/esm2020/alert/src/alert.component.mjs +4 -8
- package/esm2020/avatar/src/avatar.component.mjs +14 -21
- package/esm2020/badge/src/badge.component.mjs +3 -3
- package/esm2020/button/src/button-item.class.mjs +1 -1
- package/esm2020/button/src/button-item.component.mjs +3 -3
- package/esm2020/button/src/button.component.mjs +9 -6
- package/esm2020/calendar/src/calendar.component.mjs +7 -4
- package/esm2020/collapse/src/collapse.component.mjs +3 -3
- package/esm2020/color-palette/src/color-palette-input.component.mjs +1 -1
- package/esm2020/color-picker/src/color-picker.component.mjs +1 -1
- package/esm2020/common/src/auto-focus.directive.mjs +7 -3
- package/esm2020/common/src/events.class.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-next-buttons.components.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-numeric-selector.component.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-pagesize-dropdown.component.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-prev-buttons.component.mjs +1 -1
- package/esm2020/date-picker/src/datepicker.component.mjs +9 -7
- package/esm2020/decorators/public-api.mjs +2 -1
- package/esm2020/decorators/src/decorators.module.mjs +8 -4
- package/esm2020/decorators/src/icon.component.mjs +3 -2
- package/esm2020/decorators/src/text.component.mjs +21 -0
- package/esm2020/dialog/src/dialog.class.mjs +1 -1
- package/esm2020/dialog/src/dialog.component.mjs +1 -1
- package/esm2020/dialog/src/dialog.service.mjs +11 -7
- package/esm2020/dropdown/src/dropdown-panel.component.mjs +14 -3
- package/esm2020/dropdown/src/dropdown.module.mjs +6 -4
- package/esm2020/form/src/form.component.mjs +10 -3
- package/esm2020/form/src/validation-summary.component.mjs +1 -1
- package/esm2020/image/src/image.component.mjs +36 -9
- package/esm2020/menu/src/menu.component.mjs +5 -3
- package/esm2020/number-box/src/number-box.component.mjs +10 -4
- package/esm2020/password-box/src/password-box.component.mjs +11 -5
- package/esm2020/popover/src/popover.component.mjs +9 -18
- package/esm2020/popup/src/popup.component.mjs +14 -6
- package/esm2020/popup/src/popup.module.mjs +4 -3
- package/esm2020/popup/src/popup.service.mjs +8 -4
- package/esm2020/search-box/src/search-box.component.mjs +1 -1
- package/esm2020/select-box/src/selectbox.component.mjs +3 -3
- package/esm2020/textarea/src/textarea.component.mjs +11 -5
- package/esm2020/textbox/public-api.mjs +2 -1
- package/esm2020/textbox/src/mask-settings.directive.mjs +23 -0
- package/esm2020/textbox/src/textbox.component.mjs +46 -9
- package/esm2020/textbox/src/textbox.module.mjs +7 -10
- package/esm2020/time-box/src/time-box.component.mjs +10 -4
- package/esm2020/toast/src/toast.component.mjs +1 -1
- package/esm2020/uploader/src/uploader.component.mjs +19 -6
- package/fesm2015/acorex-components-action-sheet.mjs +1 -1
- package/fesm2015/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2015/acorex-components-alert.mjs +3 -7
- package/fesm2015/acorex-components-alert.mjs.map +1 -1
- package/fesm2015/acorex-components-avatar.mjs +13 -20
- package/fesm2015/acorex-components-avatar.mjs.map +1 -1
- package/fesm2015/acorex-components-badge.mjs +2 -2
- package/fesm2015/acorex-components-badge.mjs.map +1 -1
- package/fesm2015/acorex-components-button.mjs +10 -7
- package/fesm2015/acorex-components-button.mjs.map +1 -1
- package/fesm2015/acorex-components-calendar.mjs +5 -3
- package/fesm2015/acorex-components-calendar.mjs.map +1 -1
- package/fesm2015/acorex-components-collapse.mjs +2 -2
- package/fesm2015/acorex-components-collapse.mjs.map +1 -1
- package/fesm2015/acorex-components-color-palette.mjs +1 -1
- package/fesm2015/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2015/acorex-components-color-picker.mjs +1 -1
- package/fesm2015/acorex-components-color-picker.mjs.map +1 -1
- package/fesm2015/acorex-components-common.mjs +6 -2
- package/fesm2015/acorex-components-common.mjs.map +1 -1
- package/fesm2015/acorex-components-data-pager.mjs +4 -4
- package/fesm2015/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2015/acorex-components-date-picker.mjs +10 -7
- package/fesm2015/acorex-components-date-picker.mjs.map +1 -1
- package/fesm2015/acorex-components-decorators.mjs +27 -5
- package/fesm2015/acorex-components-decorators.mjs.map +1 -1
- package/fesm2015/acorex-components-dialog.mjs +11 -7
- package/fesm2015/acorex-components-dialog.mjs.map +1 -1
- package/fesm2015/acorex-components-dropdown.mjs +18 -5
- package/fesm2015/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2015/acorex-components-form.mjs +10 -3
- package/fesm2015/acorex-components-form.mjs.map +1 -1
- package/fesm2015/acorex-components-image.mjs +35 -8
- package/fesm2015/acorex-components-image.mjs.map +1 -1
- package/fesm2015/acorex-components-menu.mjs +5 -3
- package/fesm2015/acorex-components-menu.mjs.map +1 -1
- package/fesm2015/acorex-components-number-box.mjs +10 -4
- package/fesm2015/acorex-components-number-box.mjs.map +1 -1
- package/fesm2015/acorex-components-password-box.mjs +10 -4
- package/fesm2015/acorex-components-password-box.mjs.map +1 -1
- package/fesm2015/acorex-components-popover.mjs +9 -18
- package/fesm2015/acorex-components-popover.mjs.map +1 -1
- package/fesm2015/acorex-components-popup.mjs +23 -11
- package/fesm2015/acorex-components-popup.mjs.map +1 -1
- package/fesm2015/acorex-components-search-box.mjs +1 -1
- package/fesm2015/acorex-components-search-box.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-textarea.mjs +10 -4
- package/fesm2015/acorex-components-textarea.mjs.map +1 -1
- package/fesm2015/acorex-components-textbox.mjs +71 -18
- package/fesm2015/acorex-components-textbox.mjs.map +1 -1
- package/fesm2015/acorex-components-time-box.mjs +10 -4
- package/fesm2015/acorex-components-time-box.mjs.map +1 -1
- package/fesm2015/acorex-components-toast.mjs +1 -1
- package/fesm2015/acorex-components-toast.mjs.map +1 -1
- package/fesm2015/acorex-components-uploader.mjs +18 -5
- package/fesm2015/acorex-components-uploader.mjs.map +1 -1
- package/fesm2020/acorex-components-action-sheet.mjs +1 -1
- package/fesm2020/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2020/acorex-components-alert.mjs +3 -7
- package/fesm2020/acorex-components-alert.mjs.map +1 -1
- package/fesm2020/acorex-components-avatar.mjs +13 -20
- package/fesm2020/acorex-components-avatar.mjs.map +1 -1
- package/fesm2020/acorex-components-badge.mjs +2 -2
- package/fesm2020/acorex-components-badge.mjs.map +1 -1
- package/fesm2020/acorex-components-button.mjs +10 -7
- package/fesm2020/acorex-components-button.mjs.map +1 -1
- package/fesm2020/acorex-components-calendar.mjs +5 -3
- package/fesm2020/acorex-components-calendar.mjs.map +1 -1
- package/fesm2020/acorex-components-collapse.mjs +2 -2
- package/fesm2020/acorex-components-collapse.mjs.map +1 -1
- package/fesm2020/acorex-components-color-palette.mjs +1 -1
- package/fesm2020/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2020/acorex-components-color-picker.mjs +1 -1
- package/fesm2020/acorex-components-color-picker.mjs.map +1 -1
- package/fesm2020/acorex-components-common.mjs +6 -2
- package/fesm2020/acorex-components-common.mjs.map +1 -1
- package/fesm2020/acorex-components-data-pager.mjs +4 -4
- package/fesm2020/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2020/acorex-components-date-picker.mjs +9 -7
- package/fesm2020/acorex-components-date-picker.mjs.map +1 -1
- package/fesm2020/acorex-components-decorators.mjs +27 -5
- package/fesm2020/acorex-components-decorators.mjs.map +1 -1
- package/fesm2020/acorex-components-dialog.mjs +11 -7
- package/fesm2020/acorex-components-dialog.mjs.map +1 -1
- package/fesm2020/acorex-components-dropdown.mjs +18 -5
- package/fesm2020/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2020/acorex-components-form.mjs +10 -3
- package/fesm2020/acorex-components-form.mjs.map +1 -1
- package/fesm2020/acorex-components-image.mjs +35 -8
- package/fesm2020/acorex-components-image.mjs.map +1 -1
- package/fesm2020/acorex-components-menu.mjs +5 -3
- package/fesm2020/acorex-components-menu.mjs.map +1 -1
- package/fesm2020/acorex-components-number-box.mjs +10 -4
- package/fesm2020/acorex-components-number-box.mjs.map +1 -1
- package/fesm2020/acorex-components-password-box.mjs +10 -4
- package/fesm2020/acorex-components-password-box.mjs.map +1 -1
- package/fesm2020/acorex-components-popover.mjs +8 -17
- package/fesm2020/acorex-components-popover.mjs.map +1 -1
- package/fesm2020/acorex-components-popup.mjs +23 -11
- package/fesm2020/acorex-components-popup.mjs.map +1 -1
- package/fesm2020/acorex-components-search-box.mjs +1 -1
- package/fesm2020/acorex-components-search-box.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-textarea.mjs +10 -4
- package/fesm2020/acorex-components-textarea.mjs.map +1 -1
- package/fesm2020/acorex-components-textbox.mjs +71 -18
- package/fesm2020/acorex-components-textbox.mjs.map +1 -1
- package/fesm2020/acorex-components-time-box.mjs +10 -4
- package/fesm2020/acorex-components-time-box.mjs.map +1 -1
- package/fesm2020/acorex-components-toast.mjs +1 -1
- package/fesm2020/acorex-components-toast.mjs.map +1 -1
- package/fesm2020/acorex-components-uploader.mjs +18 -5
- package/fesm2020/acorex-components-uploader.mjs.map +1 -1
- package/form/src/form.component.d.ts +2 -0
- package/image/src/image.component.d.ts +16 -7
- package/menu/src/menu.component.d.ts +1 -0
- package/mixin/src/base-components.class.d.ts +1 -1
- package/mixin/src/base-menu-mixin.class.d.ts +4 -4
- package/mixin/src/button-mixin.class.d.ts +1 -1
- package/mixin/src/clickable-mixin.class.d.ts +1 -1
- package/mixin/src/color-look-mixing.class.d.ts +1 -1
- package/mixin/src/datalist-component.class.d.ts +9 -9
- package/mixin/src/dropdown-mixin.class.d.ts +1 -1
- package/mixin/src/interactive-mixin.class.d.ts +3 -3
- package/mixin/src/loading-mixin.class.d.ts +1 -1
- package/mixin/src/mixin.class.d.ts +42 -42
- package/mixin/src/page-component.class.d.ts +1 -1
- package/mixin/src/selection-component.class.d.ts +1 -1
- package/mixin/src/sizable-mixin.class.d.ts +1 -1
- package/mixin/src/textbox-mixin.class.d.ts +3 -3
- package/mixin/src/value-mixin.class.d.ts +7 -7
- package/number-box/src/number-box.component.d.ts +2 -0
- package/package.json +1 -1
- package/password-box/src/password-box.component.d.ts +3 -1
- package/popover/src/popover.component.d.ts +2 -2
- package/popup/src/popup.module.d.ts +7 -6
- package/tabs/src/tab-item.component.d.ts +1 -1
- package/textarea/src/textarea.component.d.ts +2 -0
- package/textbox/public-api.d.ts +1 -0
- package/textbox/src/mask-settings.directive.d.ts +8 -0
- package/textbox/src/textbox.component.d.ts +6 -1
- package/textbox/src/textbox.module.d.ts +6 -6
- package/time-box/src/time-box.component.d.ts +2 -0
- package/uploader/src/uploader.component.d.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-textbox.mjs","sources":["../../../../projects/acorex/components/textbox/src/textbox.component.ts","../../../../projects/acorex/components/textbox/src/textbox.component.html","../../../../projects/acorex/components/textbox/src/textbox.module.ts","../../../../projects/acorex/components/textbox/acorex-components-textbox.ts"],"sourcesContent":["\r\
|
|
1
|
+
{"version":3,"file":"acorex-components-textbox.mjs","sources":["../../../../projects/acorex/components/textbox/src/mask-settings.directive.ts","../../../../projects/acorex/components/textbox/src/textbox.component.ts","../../../../projects/acorex/components/textbox/src/textbox.component.html","../../../../projects/acorex/components/textbox/src/textbox.module.ts","../../../../projects/acorex/components/textbox/acorex-components-textbox.ts"],"sourcesContent":["import { Directive, Input } from '@angular/core';\r\n\r\n@Directive({\r\n selector: 'ax-mask-settings',\r\n})\r\nexport class AXMaskSettingsDirective { \r\n \r\n @Input()\r\n mask: string;\r\n\r\n @Input()\r\n showMaskTyped: boolean = false;\r\n\r\n @Input()\r\n clearIfNotMatch: boolean = false;\r\n}","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n ViewChild,\r\n ViewEncapsulation,\r\n ContentChild\r\n} from '@angular/core';\r\nimport { AXComponent, AXFocusableComponent } from '@acorex/components/common';\r\nimport { AXBaseTextBoxMixin } from '@acorex/components/mixin';\r\nimport { AXMaskSettingsDirective } from './mask-settings.directive';\r\nimport IMask, { AnyMaskedOptions } from 'imask';\r\n\r\n/**\r\n * The Textbox 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-text-box',\r\n templateUrl: 'textbox.component.html',\r\n inputs: [\r\n 'disabled',\r\n 'tabIndex',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n 'placeholder',\r\n 'maxLength',\r\n 'allowNull',\r\n 'debounceTime',\r\n 'type',\r\n 'autoComplete',\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 host: { class: 'ax-editor-container' },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n { provide: AXComponent, useExisting: AXTextBoxComponent },\r\n { provide: AXFocusableComponent, useExisting: AXTextBoxComponent },\r\n ],\r\n})\r\nexport class AXTextBoxComponent extends AXBaseTextBoxMixin {\r\n /**\r\n * @ignore\r\n */\r\n\r\n @ViewChild('input')\r\n private input: ElementRef<HTMLInputElement>;\r\n\r\n\r\n private _maskObj: IMask.InputMask<AnyMaskedOptions>\r\n\r\n\r\n @ContentChild(AXMaskSettingsDirective)\r\n private maskSettings: AXMaskSettingsDirective;\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.maskSettings) {\r\n this._maskObj = IMask(this.input.nativeElement, {\r\n mask: this.maskSettings.mask,\r\n overwrite:true,\r\n autofix:true,\r\n eager:true\r\n })\r\n }\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\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" [attr.name]=\"name\" [attr.autocomplete]=\"autoComplete\" [attr.type]=\"type\" [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\"\r\n [ngModel]=\"value\" (ngModelChange)=\"_handleModleChange($event)\"\r\n >\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-input-mask\">\r\n</ng-content>\r\n<!-- (keydown)=\"_emitOnKeydownEvent($event)\" \r\n(keyup)=\"_emitOnKeyupEvent($event)\"\r\n(keypress)=\"_emitOnKeypressEvent($event)\"\r\n(focus)=\"_emitOnFocusEvent($event)\"\r\n(blur)=\"_emitOnBlurEvent($event)\" -->","import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXMaskSettingsDirective } from './mask-settings.directive';\r\nimport { AXTextBoxComponent } from './textbox.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n AXDecoratorModule,\r\n\r\n ],\r\n exports: [AXTextBoxComponent, AXMaskSettingsDirective],\r\n declarations: [AXTextBoxComponent, AXMaskSettingsDirective],\r\n providers: [],\r\n})\r\nexport class AXTextBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAKa,uBAAuB,CAAA;AAHpC,IAAA,WAAA,GAAA;AASI,QAAA,IAAa,CAAA,aAAA,GAAY,KAAK,CAAC;AAG/B,QAAA,IAAe,CAAA,eAAA,GAAY,KAAK,CAAC;KACpC;;oHAVY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;wGAAvB,uBAAuB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,aAAA,EAAA,eAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;iBAC/B,CAAA;8BAIG,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,aAAa,EAAA,CAAA;sBADZ,KAAK;gBAIN,eAAe,EAAA,CAAA;sBADd,KAA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,kBAAkB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAI5C,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAVpB,YAAY;QACZ,WAAW;QACX,cAAc;QACd,iBAAiB,CAAA,EAAA,CAAA,CAAA;2FAOZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAZ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,cAAc;wBACd,iBAAiB;AAEpB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AACtD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AAC3D,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXStringUtil } from '@acorex/core/utils';
|
|
2
2
|
import { AXDateTime } from '@acorex/core/dateTime';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output,
|
|
4
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, Output, NgModule } from '@angular/core';
|
|
5
5
|
import IMask from 'imask';
|
|
6
6
|
import * as i2 from 'angular-imask';
|
|
7
7
|
import { IMaskDirective, IMaskModule } from 'angular-imask';
|
|
@@ -75,6 +75,9 @@ class AXTimeBoxComponent extends AXBaseTextBoxMixin {
|
|
|
75
75
|
super._onOptionChanged(option);
|
|
76
76
|
this._updateMask();
|
|
77
77
|
}
|
|
78
|
+
focus() {
|
|
79
|
+
this.input.nativeElement.focus();
|
|
80
|
+
}
|
|
78
81
|
_updateMask() {
|
|
79
82
|
var _a, _b, _c, _d;
|
|
80
83
|
if (!this._maskObj) {
|
|
@@ -259,7 +262,7 @@ class AXTimeBoxComponent extends AXBaseTextBoxMixin {
|
|
|
259
262
|
}
|
|
260
263
|
}
|
|
261
264
|
AXTimeBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTimeBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
262
|
-
AXTimeBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXTimeBoxComponent, selector: "ax-time-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", debounceTime: "debounceTime", type: "type", autoComplete: "autoComplete", name: "name", checked: "checked", minValue: "minValue", maxValue: "maxValue", format: "format", displayText: "displayText" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", formatChange: "formatChange", displayTextChange: "displayTextChange" }, host: { classAttribute: "ax-editor-container ax-drop-down" }, viewQueries: [{ propertyName: "_maskDirective", first: true, predicate: IMaskDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" [imask]=\"_maskObj\" [unmask]=\"false\" type=\"text\" [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"displayText\" \r\n (mouseup)=\"_handleOnInputClickEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n (keyup)=\"_handleKeyUpEvent($event)\" \r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n autocomplete=\"off\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.IMaskDirective, selector: "[imask]", inputs: ["imask", "unmask", "imaskElement"], outputs: ["accept", "complete"], exportAs: ["imask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
265
|
+
AXTimeBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXTimeBoxComponent, selector: "ax-time-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", debounceTime: "debounceTime", type: "type", autoComplete: "autoComplete", name: "name", checked: "checked", minValue: "minValue", maxValue: "maxValue", format: "format", displayText: "displayText" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", formatChange: "formatChange", displayTextChange: "displayTextChange" }, host: { classAttribute: "ax-editor-container ax-drop-down" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "_maskDirective", first: true, predicate: IMaskDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" [imask]=\"_maskObj\" [unmask]=\"false\" type=\"text\" [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"displayText\" \r\n (mouseup)=\"_handleOnInputClickEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n (keyup)=\"_handleKeyUpEvent($event)\" \r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n autocomplete=\"off\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.IMaskDirective, selector: "[imask]", inputs: ["imask", "unmask", "imaskElement"], outputs: ["accept", "complete"], exportAs: ["imask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
263
266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTimeBoxComponent, decorators: [{
|
|
264
267
|
type: Component,
|
|
265
268
|
args: [{ selector: 'ax-time-box', inputs: [
|
|
@@ -275,8 +278,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
275
278
|
'onBlur',
|
|
276
279
|
'onFocus',
|
|
277
280
|
'valueChange', 'onValueChanged',
|
|
278
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-editor-container ax-drop-down' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" [imask]=\"_maskObj\" [unmask]=\"false\" type=\"text\" [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"displayText\" \r\n (mouseup)=\"_handleOnInputClickEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n (keyup)=\"_handleKeyUpEvent($event)\" \r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n autocomplete=\"off\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>" }]
|
|
279
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: {
|
|
281
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-editor-container ax-drop-down' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" [imask]=\"_maskObj\" [unmask]=\"false\" type=\"text\" [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"displayText\" \r\n (mouseup)=\"_handleOnInputClickEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n (keyup)=\"_handleKeyUpEvent($event)\" \r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n autocomplete=\"off\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>" }]
|
|
282
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
|
|
283
|
+
type: ViewChild,
|
|
284
|
+
args: ['input']
|
|
285
|
+
}], minValue: [{
|
|
280
286
|
type: Input
|
|
281
287
|
}], maxValue: [{
|
|
282
288
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-time-box.mjs","sources":["../../../../projects/acorex/components/time-box/src/time-box.component.ts","../../../../projects/acorex/components/time-box/src/time-box.component.html","../../../../projects/acorex/components/time-box/src/time-box.module.ts","../../../../projects/acorex/components/time-box/acorex-components-time-box.ts"],"sourcesContent":["import { AXStringUtil } from '@acorex/core/utils';\r\nimport { AXDateTime } from '@acorex/core/dateTime';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n EventEmitter,\r\n Output,\r\n Input,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport IMask from 'imask';\r\nimport { IMaskDirective } from 'angular-imask';\r\nimport { AXBaseTextBoxMixin, AXComponentOptionChanged } from '@acorex/components/mixin';\r\n\r\n\r\nexport type AX_TIME_FORMAT = 'HH:mm' | 'HH:mm:ss';\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-time-box',\r\n templateUrl: './time-box.component.html',\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'value',\r\n 'placeholder', 'maxLength', 'allowNull', 'debounceTime', 'type', 'autoComplete', 'readonly','allowNull','value','name', 'checked',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus',\r\n 'valueChange', 'onValueChanged',\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-editor-container ax-drop-down' },\r\n})\r\nexport class AXTimeBoxComponent extends AXBaseTextBoxMixin {\r\n private _minValue: Date;\r\n @Input()\r\n public get minValue(): Date {\r\n return this._minValue;\r\n }\r\n public set minValue(v: Date) {\r\n this._minValue = v;\r\n }\r\n\r\n private _maxValue: Date;\r\n @Input()\r\n public get maxValue(): Date {\r\n return this._maxValue;\r\n }\r\n public set maxValue(v: Date) {\r\n this._maxValue = v;\r\n }\r\n\r\n @Output()\r\n formatChange = new EventEmitter<string>();\r\n\r\n private _format: AX_TIME_FORMAT = 'HH:mm';\r\n @Input()\r\n public get format(): AX_TIME_FORMAT {\r\n return this._format;\r\n }\r\n public set format(v: AX_TIME_FORMAT) {\r\n this._setOption({\r\n name: 'format',\r\n value: v,\r\n });\r\n }\r\n\r\n @Output()\r\n public displayTextChange: EventEmitter<string> = new EventEmitter<string>();\r\n private _displayText: string = '';\r\n\r\n @Input()\r\n public get displayText(): string {\r\n return this._displayText;\r\n }\r\n\r\n public set displayText(v: string) {\r\n this._displayText = v;\r\n this.displayTextChange.emit(v);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n _maskObj: IMask.MaskedPattern;\r\n\r\n @ViewChild(IMaskDirective)\r\n private _maskDirective: IMaskDirective<IMask.MaskedNumber>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, private cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onViewInit(): void {\r\n super.onViewInit();\r\n this._updateMask();\r\n }\r\n\r\n _onValueChanged(oldValue?: any, newValue?: any) {\r\n this._updateText();\r\n this._maskDirective?.maskRef?.updateValue();\r\n this._maskDirective?.maskRef?.updateControl();\r\n }\r\n\r\n _updateText() {\r\n this.displayText = this.value\r\n ? AXDateTime.convert(this.value).format(this.format)\r\n : '';\r\n }\r\n\r\n _onOptionChanged(option: AXComponentOptionChanged): void {\r\n super._onOptionChanged(option);\r\n this._updateMask();\r\n }\r\n\r\n private _updateMask() {\r\n if (!this._maskObj) {\r\n this._maskObj = IMask.createMask({\r\n mask: this.format,\r\n lazy: false,\r\n blocks: {\r\n HH: {\r\n mask: IMask.MaskedRange,\r\n from: 0,\r\n to: 23,\r\n maxLength: 2,\r\n placeholderChar: '0',\r\n autofix: 'pad',\r\n },\r\n mm: {\r\n mask: IMask.MaskedRange,\r\n from: 0,\r\n to: 59,\r\n maxLength: 2,\r\n placeholderChar: '0',\r\n autofix: 'pad',\r\n },\r\n ss: {\r\n mask: IMask.MaskedRange,\r\n from: 0,\r\n to: 59,\r\n maxLength: 2,\r\n placeholderChar: '0',\r\n autofix: 'pad',\r\n },\r\n },\r\n });\r\n } else {\r\n this._maskObj.updateOptions({\r\n mask: this.format,\r\n });\r\n }\r\n this._maskDirective?.maskRef?.updateValue();\r\n this._maskDirective?.maskRef?.updateControl();\r\n }\r\n\r\n _handleOnKeydownEvent(e: KeyboardEvent) {\r\n const ignore = () => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n\r\n const nums: string[] = Array(10)\r\n .fill(0)\r\n .map((v, i) => i.toString());\r\n const chars: string[] = [\r\n 'Backspace',\r\n 'ArrowDown',\r\n 'ArrowUp',\r\n 'ArrowRight',\r\n 'ArrowLeft',\r\n 'Tab',\r\n 'Enter',\r\n ];\r\n const input = e.target as HTMLInputElement;\r\n const key = e.key;\r\n const valStr = input.value;\r\n const sStart = input.selectionStart || 0;\r\n const sEnd = input.selectionEnd || 0;\r\n const dateVal = new AXDateTime(this.value);\r\n //\r\n const re = /[a-zA-Z0-9]+/gi;\r\n const parts = Array.from(this.format.matchAll(re));\r\n const word = valStr.substring(sStart, sEnd);\r\n const part = parts.find((c:any) => c.index >= sStart);\r\n const next = Array.from(valStr.substr(sEnd).matchAll(re));\r\n const prev = Array.from(valStr.substring(0, sStart).matchAll(re));\r\n //const part = parts[Array.from(valStr.matchAll(re)).findIndex(c => c[0] == word)];\r\n //\r\n\r\n const goNext = () => {\r\n this._highlightPart(input, sEnd + (next[0]?.index || 0));\r\n };\r\n const goPrev = () => {\r\n this._highlightPart(input, prev[prev.length - 1]?.index);\r\n };\r\n\r\n //\r\n if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\r\n ignore();\r\n e.key === 'ArrowRight' ? goNext() : goPrev();\r\n } else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\r\n if (e.ctrlKey && e.key === 'ArrowDown') {\r\n //this.open();\r\n } else {\r\n const sign = e.key === 'ArrowUp' ? +1 : -1;\r\n if (part) {\r\n switch (part[0]) {\r\n case 'hh':\r\n case 'h':\r\n case 'HH':\r\n case 'H':\r\n this.value = dateVal.add('hour', sign).date;\r\n break;\r\n case 'mm':\r\n this.value = dateVal.add('minute', sign).date;\r\n break;\r\n case 'ss':\r\n case 'SS':\r\n this.value = dateVal.add('second', sign).date;\r\n break;\r\n }\r\n setTimeout(() => {\r\n this._highlightPart(input, sStart);\r\n }, 10);\r\n }\r\n }\r\n ignore();\r\n } else if (e.key == 'Backspace') {\r\n // if (this.allowNull) {\r\n // this.value = null;\r\n // }\r\n // ignore();\r\n } else if (e.key == 'Tab') {\r\n if (sEnd < valStr.length && !e.shiftKey) {\r\n goNext();\r\n ignore();\r\n } else if (sStart != 0 && e.shiftKey) {\r\n goPrev();\r\n ignore();\r\n }\r\n } else {\r\n // const keys = {\r\n // h: {\r\n // v: /^[0-9]$|^[1][0-2]$/,\r\n // p: '0'\r\n // },\r\n // H: {\r\n // v: /^[0-9]$|^1[0-9]$|2[0-3]$/,\r\n // p: '0'\r\n // },\r\n // m: {\r\n // v: /^[0-9]$|^[1-5][0-9]$/,\r\n // p: '0'\r\n // }\r\n // }\r\n // // const re = new RegExp(_.orderBy(Object.keys(keys), c => c.length, ['desc']).join(\"|\"), \"gi\");\r\n // // return format.replace(re, function (matched) {\r\n // // return keys[matched]();\r\n // // });\r\n // const t = keys[part[0]];\r\n // if (!t.v.test(key)) {\r\n // ignore();\r\n // }\r\n // else {\r\n // this._updateText()\r\n // }\r\n }\r\n // super._emitOnKeydownEvent(e);\r\n }\r\n\r\n _handleKeyUpEvent(e: KeyboardEvent) {\r\n // const input = (e.target as HTMLInputElement);\r\n // setTimeout(() => {\r\n // this._highlightPart(input);\r\n // }, 700);\r\n }\r\n\r\n _emitOnFocusEvent(e: FocusEvent): void {\r\n const input = e.target as HTMLInputElement;\r\n this._highlightPart(input);\r\n super._emitOnFocusEvent(e);\r\n }\r\n\r\n _handleOnInputClickEvent(e: MouseEvent): void {\r\n const input = e.target as HTMLInputElement;\r\n this._highlightPart(input);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n private _highlightPart(input: HTMLInputElement, pos?: number) {\r\n const { start, end } = AXStringUtil.getWordBoundsAtPosition(\r\n input.value,\r\n pos != null ? pos : input.selectionStart || 0\r\n );\r\n input.setSelectionRange(start, end);\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" [imask]=\"_maskObj\" [unmask]=\"false\" type=\"text\" [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"displayText\" \r\n (mouseup)=\"_handleOnInputClickEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n (keyup)=\"_handleKeyUpEvent($event)\" \r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n autocomplete=\"off\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n</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 { AXTimeBoxComponent } from './time-box.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { IMaskModule } from 'angular-imask';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nconst COMPONENT = [AXTimeBoxComponent];\r\nconst MODULES = [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n IMaskModule\r\n];\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 AXTimeBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAmBA;;;;AAIG;AAuBG,MAAO,kBAAmB,SAAQ,kBAAkB,CAAA;AAwDxD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAU,GAAsB,EAAA;AAChE,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AADmB,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AAvClE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;AAElC,QAAA,IAAO,CAAA,OAAA,GAAmB,OAAO,CAAC;AAanC,QAAA,IAAA,CAAA,iBAAiB,GAAyB,IAAI,YAAY,EAAU,CAAC;AACpE,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE,CAAC;KAyBjC;AA3DD,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAW,QAAQ,CAAC,CAAO,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;KACpB;AAGD,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAW,QAAQ,CAAC,CAAO,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;KACpB;AAMD,IAAA,IACW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IACD,IAAW,MAAM,CAAC,CAAiB,EAAA;QACjC,IAAI,CAAC,UAAU,CAAC;AACd,YAA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BADhB,KAAK;gBAYC,iBAAiB,EAAA,CAAA;sBADvB,MAAM;gBAKI,WAAW,EAAA,CAAA;sBADrB,KAAK;gBAgBE,cAAc,EAAA,CAAA;sBADrB,SAAS;uBAAC,cAAc,CAAA;;;AE5F3B,MAAM,SAAS,GAAG,CAAC,kBAAkB,CAAC,CAAC;AACvC,MAAM,OAAO,GAAG;IACZ,YAAY;IACZ,WAAW;IACX,cAAc;IACd,WAAW;CACd,CAAC;MAQW,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,CAdT,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAEjC,YAAY;QACZ,WAAW;QACX,cAAc;QACd,WAAW,aALI,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAcxB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,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;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-time-box.mjs","sources":["../../../../projects/acorex/components/time-box/src/time-box.component.ts","../../../../projects/acorex/components/time-box/src/time-box.component.html","../../../../projects/acorex/components/time-box/src/time-box.module.ts","../../../../projects/acorex/components/time-box/acorex-components-time-box.ts"],"sourcesContent":["import { AXStringUtil } from '@acorex/core/utils';\r\nimport { AXDateTime } from '@acorex/core/dateTime';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n EventEmitter,\r\n Output,\r\n Input,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport IMask from 'imask';\r\nimport { IMaskDirective } from 'angular-imask';\r\nimport { AXBaseTextBoxMixin, AXComponentOptionChanged } from '@acorex/components/mixin';\r\n\r\n\r\nexport type AX_TIME_FORMAT = 'HH:mm' | 'HH:mm:ss';\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-time-box',\r\n templateUrl: './time-box.component.html',\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'value',\r\n 'placeholder', 'maxLength', 'allowNull', 'debounceTime', 'type', 'autoComplete', 'readonly','allowNull','value','name', 'checked',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus',\r\n 'valueChange', 'onValueChanged',\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-editor-container ax-drop-down' },\r\n})\r\nexport class AXTimeBoxComponent extends AXBaseTextBoxMixin {\r\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\r\n\r\n private _minValue: Date;\r\n @Input()\r\n public get minValue(): Date {\r\n return this._minValue;\r\n }\r\n public set minValue(v: Date) {\r\n this._minValue = v;\r\n }\r\n\r\n private _maxValue: Date;\r\n @Input()\r\n public get maxValue(): Date {\r\n return this._maxValue;\r\n }\r\n public set maxValue(v: Date) {\r\n this._maxValue = v;\r\n }\r\n\r\n @Output()\r\n formatChange = new EventEmitter<string>();\r\n\r\n private _format: AX_TIME_FORMAT = 'HH:mm';\r\n @Input()\r\n public get format(): AX_TIME_FORMAT {\r\n return this._format;\r\n }\r\n public set format(v: AX_TIME_FORMAT) {\r\n this._setOption({\r\n name: 'format',\r\n value: v,\r\n });\r\n }\r\n\r\n @Output()\r\n public displayTextChange: EventEmitter<string> = new EventEmitter<string>();\r\n private _displayText: string = '';\r\n\r\n @Input()\r\n public get displayText(): string {\r\n return this._displayText;\r\n }\r\n\r\n public set displayText(v: string) {\r\n this._displayText = v;\r\n this.displayTextChange.emit(v);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n _maskObj: IMask.MaskedPattern;\r\n\r\n @ViewChild(IMaskDirective)\r\n private _maskDirective: IMaskDirective<IMask.MaskedNumber>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, private cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onViewInit(): void {\r\n super.onViewInit();\r\n this._updateMask();\r\n }\r\n\r\n _onValueChanged(oldValue?: any, newValue?: any) {\r\n this._updateText();\r\n this._maskDirective?.maskRef?.updateValue();\r\n this._maskDirective?.maskRef?.updateControl();\r\n }\r\n\r\n _updateText() {\r\n this.displayText = this.value\r\n ? AXDateTime.convert(this.value).format(this.format)\r\n : '';\r\n }\r\n\r\n _onOptionChanged(option: AXComponentOptionChanged): void {\r\n super._onOptionChanged(option);\r\n this._updateMask();\r\n }\r\n\r\n focus(): void {\r\n this.input.nativeElement.focus()\r\n }\r\n\r\n\r\n private _updateMask() {\r\n if (!this._maskObj) {\r\n this._maskObj = IMask.createMask({\r\n mask: this.format,\r\n lazy: false,\r\n blocks: {\r\n HH: {\r\n mask: IMask.MaskedRange,\r\n from: 0,\r\n to: 23,\r\n maxLength: 2,\r\n placeholderChar: '0',\r\n autofix: 'pad',\r\n },\r\n mm: {\r\n mask: IMask.MaskedRange,\r\n from: 0,\r\n to: 59,\r\n maxLength: 2,\r\n placeholderChar: '0',\r\n autofix: 'pad',\r\n },\r\n ss: {\r\n mask: IMask.MaskedRange,\r\n from: 0,\r\n to: 59,\r\n maxLength: 2,\r\n placeholderChar: '0',\r\n autofix: 'pad',\r\n },\r\n },\r\n });\r\n } else {\r\n this._maskObj.updateOptions({\r\n mask: this.format,\r\n });\r\n }\r\n this._maskDirective?.maskRef?.updateValue();\r\n this._maskDirective?.maskRef?.updateControl();\r\n }\r\n\r\n _handleOnKeydownEvent(e: KeyboardEvent) {\r\n const ignore = () => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n\r\n const nums: string[] = Array(10)\r\n .fill(0)\r\n .map((v, i) => i.toString());\r\n const chars: string[] = [\r\n 'Backspace',\r\n 'ArrowDown',\r\n 'ArrowUp',\r\n 'ArrowRight',\r\n 'ArrowLeft',\r\n 'Tab',\r\n 'Enter',\r\n ];\r\n const input = e.target as HTMLInputElement;\r\n const key = e.key;\r\n const valStr = input.value;\r\n const sStart = input.selectionStart || 0;\r\n const sEnd = input.selectionEnd || 0;\r\n const dateVal = new AXDateTime(this.value);\r\n //\r\n const re = /[a-zA-Z0-9]+/gi;\r\n const parts = Array.from(this.format.matchAll(re));\r\n const word = valStr.substring(sStart, sEnd);\r\n const part = parts.find((c:any) => c.index >= sStart);\r\n const next = Array.from(valStr.substr(sEnd).matchAll(re));\r\n const prev = Array.from(valStr.substring(0, sStart).matchAll(re));\r\n //const part = parts[Array.from(valStr.matchAll(re)).findIndex(c => c[0] == word)];\r\n //\r\n\r\n const goNext = () => {\r\n this._highlightPart(input, sEnd + (next[0]?.index || 0));\r\n };\r\n const goPrev = () => {\r\n this._highlightPart(input, prev[prev.length - 1]?.index);\r\n };\r\n\r\n //\r\n if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\r\n ignore();\r\n e.key === 'ArrowRight' ? goNext() : goPrev();\r\n } else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\r\n if (e.ctrlKey && e.key === 'ArrowDown') {\r\n //this.open();\r\n } else {\r\n const sign = e.key === 'ArrowUp' ? +1 : -1;\r\n if (part) {\r\n switch (part[0]) {\r\n case 'hh':\r\n case 'h':\r\n case 'HH':\r\n case 'H':\r\n this.value = dateVal.add('hour', sign).date;\r\n break;\r\n case 'mm':\r\n this.value = dateVal.add('minute', sign).date;\r\n break;\r\n case 'ss':\r\n case 'SS':\r\n this.value = dateVal.add('second', sign).date;\r\n break;\r\n }\r\n setTimeout(() => {\r\n this._highlightPart(input, sStart);\r\n }, 10);\r\n }\r\n }\r\n ignore();\r\n } else if (e.key == 'Backspace') {\r\n // if (this.allowNull) {\r\n // this.value = null;\r\n // }\r\n // ignore();\r\n } else if (e.key == 'Tab') {\r\n if (sEnd < valStr.length && !e.shiftKey) {\r\n goNext();\r\n ignore();\r\n } else if (sStart != 0 && e.shiftKey) {\r\n goPrev();\r\n ignore();\r\n }\r\n } else {\r\n // const keys = {\r\n // h: {\r\n // v: /^[0-9]$|^[1][0-2]$/,\r\n // p: '0'\r\n // },\r\n // H: {\r\n // v: /^[0-9]$|^1[0-9]$|2[0-3]$/,\r\n // p: '0'\r\n // },\r\n // m: {\r\n // v: /^[0-9]$|^[1-5][0-9]$/,\r\n // p: '0'\r\n // }\r\n // }\r\n // // const re = new RegExp(_.orderBy(Object.keys(keys), c => c.length, ['desc']).join(\"|\"), \"gi\");\r\n // // return format.replace(re, function (matched) {\r\n // // return keys[matched]();\r\n // // });\r\n // const t = keys[part[0]];\r\n // if (!t.v.test(key)) {\r\n // ignore();\r\n // }\r\n // else {\r\n // this._updateText()\r\n // }\r\n }\r\n // super._emitOnKeydownEvent(e);\r\n }\r\n\r\n _handleKeyUpEvent(e: KeyboardEvent) {\r\n // const input = (e.target as HTMLInputElement);\r\n // setTimeout(() => {\r\n // this._highlightPart(input);\r\n // }, 700);\r\n }\r\n\r\n _emitOnFocusEvent(e: FocusEvent): void {\r\n const input = e.target as HTMLInputElement;\r\n this._highlightPart(input);\r\n super._emitOnFocusEvent(e);\r\n }\r\n\r\n _handleOnInputClickEvent(e: MouseEvent): void {\r\n const input = e.target as HTMLInputElement;\r\n this._highlightPart(input);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n private _highlightPart(input: HTMLInputElement, pos?: number) {\r\n const { start, end } = AXStringUtil.getWordBoundsAtPosition(\r\n input.value,\r\n pos != null ? pos : input.selectionStart || 0\r\n );\r\n input.setSelectionRange(start, end);\r\n }\r\n \r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" [imask]=\"_maskObj\" [unmask]=\"false\" type=\"text\" [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"displayText\" \r\n (mouseup)=\"_handleOnInputClickEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n (keyup)=\"_handleKeyUpEvent($event)\" \r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n autocomplete=\"off\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n</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 { AXTimeBoxComponent } from './time-box.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { IMaskModule } from 'angular-imask';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nconst COMPONENT = [AXTimeBoxComponent];\r\nconst MODULES = [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n IMaskModule\r\n];\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 AXTimeBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAmBA;;;;AAIG;AAuBG,MAAO,kBAAmB,SAAQ,kB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K;gBAgBE,cAAc,EAAA,CAAA;sBADrB,SAAS;uBAAC,cAAc,CAAA;;;AE9F3B,MAAM,SAAS,GAAG,CAAC,kBAAkB,CAAC,CAAC;AACvC,MAAM,OAAO,GAAG;IACZ,YAAY;IACZ,WAAW;IACX,cAAc;IACd,WAAW;CACd,CAAC;MAQW,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,CAdT,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAEjC,YAAY;QACZ,WAAW;QACX,cAAc;QACd,WAAW,aALI,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAcxB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,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;;;ACpBD;;AAEG;;;;"}
|
|
@@ -55,7 +55,7 @@ class AXToastComponent extends AXBaseComponentMixin {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
AXToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXToastComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
-
AXToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXToastComponent, selector: "ax-toast", host: { classAttribute: "ax-toast" }, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], usesInheritance: true, ngImport: i0, template: "<ax-alert [color]=\"options.color\" [look]=\"options.look\" [timeOut]=\"options.timeOut\">\r\n <ax-header *ngIf=\"options.title\">\r\n <ax-prefix>\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n </ax-prefix>\r\n <ax-suffix>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n </ax-suffix>\r\n </ax-header>\r\n <ax-content *ngIf=\"options.content\">\r\n <ax-icon *ngIf=\"_icon && !options.title\" [icon]=\"_icon\"></ax-icon>\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ng-container>\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ng-container>\r\n </ax-footer>\r\n</ax-alert>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }, { kind: "component", type: i3.AXDecoratorPrefixComponent, selector: "ax-prefix" }, { kind: "component", type: i3.AXDecoratorSuffixComponent, selector: "ax-suffix" }, { kind: "component", type: i3.AXDecoratorContentComponent, selector: "ax-content" }, { kind: "component", type: i3.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i3.AXDecoratorFooterComponent, selector: "ax-footer" }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorTitleComponent, selector: "ax-title", inputs: ["text"] }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i4.AXAlertComponent, selector: "ax-alert", inputs: ["color", "look", "timeOut", "visible"], outputs: ["onDismissed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
58
|
+
AXToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXToastComponent, selector: "ax-toast", host: { classAttribute: "ax-toast" }, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], usesInheritance: true, ngImport: i0, template: "<ax-alert [color]=\"options.color\" [look]=\"options.look\" [timeOut]=\"options.timeOut\">\r\n <ax-header *ngIf=\"options.title\">\r\n <ax-prefix>\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n </ax-prefix>\r\n <ax-suffix>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n </ax-suffix>\r\n </ax-header>\r\n <ax-content *ngIf=\"options.content\">\r\n <ax-icon *ngIf=\"_icon && !options.title\" [icon]=\"_icon\"></ax-icon>\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ng-container>\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ng-container>\r\n </ax-footer>\r\n</ax-alert>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }, { kind: "component", type: i3.AXDecoratorPrefixComponent, selector: "ax-prefix" }, { kind: "component", type: i3.AXDecoratorSuffixComponent, selector: "ax-suffix" }, { kind: "component", type: i3.AXDecoratorContentComponent, selector: "ax-content" }, { kind: "component", type: i3.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i3.AXDecoratorFooterComponent, selector: "ax-footer" }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorTitleComponent, selector: "ax-title", inputs: ["text"] }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i4.AXAlertComponent, selector: "ax-alert", inputs: ["color", "look", "timeOut", "visible"], outputs: ["onDismissed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
59
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXToastComponent, decorators: [{
|
|
60
60
|
type: Component,
|
|
61
61
|
args: [{ selector: 'ax-toast', host: { class: 'ax-toast' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], template: "<ax-alert [color]=\"options.color\" [look]=\"options.look\" [timeOut]=\"options.timeOut\">\r\n <ax-header *ngIf=\"options.title\">\r\n <ax-prefix>\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n </ax-prefix>\r\n <ax-suffix>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n </ax-suffix>\r\n </ax-header>\r\n <ax-content *ngIf=\"options.content\">\r\n <ax-icon *ngIf=\"_icon && !options.title\" [icon]=\"_icon\"></ax-icon>\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ng-container>\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ng-container>\r\n </ax-footer>\r\n</ax-alert>" }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../projects/acorex/components/toast/src/toast.component.ts","../../../../projects/acorex/components/toast/src/toast.component.html","../../../../projects/acorex/components/toast/src/toast.module.ts","../../../../projects/acorex/components/toast/src/toast.service.ts","../../../../projects/acorex/components/toast/acorex-components-toast.ts"],"sourcesContent":["import { AXClosbaleComponent } from '@acorex/components/common';\r\nimport { AXButtonItem } from '@acorex/components/button';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport { AXToastOptions } from './toast.class';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-toast',\r\n templateUrl: './toast.component.html',\r\n host: { class: 'ax-toast' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\r\n})\r\nexport class AXToastComponent extends AXBaseComponentMixin {\r\n options: AXToastOptions;\r\n _toastWidth: number = 100;\r\n _icon: string;\r\n close: () => void;\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n if (this.options.timeOut) {\r\n setTimeout(() => {\r\n this.close();\r\n }, this.options.timeOut);\r\n }\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-ic ax-ic-check-filled';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-ic ax-ic-warning-filled';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-ic ax-ic-error-filled';\r\n break;\r\n default:\r\n this._icon = '';\r\n break;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n}\r\n","<ax-alert [color]=\"options.color\" [look]=\"options.look\" [timeOut]=\"options.timeOut\">\r\n <ax-header *ngIf=\"options.title\">\r\n <ax-prefix>\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n </ax-prefix>\r\n <ax-suffix>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n </ax-suffix>\r\n </ax-header>\r\n <ax-content *ngIf=\"options.content\">\r\n <ax-icon *ngIf=\"_icon && !options.title\" [icon]=\"_icon\"></ax-icon>\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ng-container>\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ng-container>\r\n </ax-footer>\r\n</ax-alert>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXToastComponent } from './toast.component';\r\nimport { AXAlertModule } from '@acorex/components/alert';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\n\r\nconst COMPONENT = [AXToastComponent];\r\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXAlertModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXToastModule {\r\n \r\n}\r\n","import { AXConfig } from '@acorex/core/config';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { AXToastOptions, AXToastRef } from './toast.class';\r\nimport { AXToastComponent } from './toast.component';\r\n\r\n\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXToastService {\r\n\r\n\r\n private readonly _defaults = {\r\n gap: 5,\r\n timeOut: 2500,\r\n location: 'bottom-center',\r\n }\r\n\r\n constructor(private overlayService: Overlay, private parentInjector: Injector) {\r\n\r\n }\r\n\r\n private _activeList: AXToastComponent[] = [];\r\n\r\n primary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'primary',\r\n content: content\r\n });\r\n }\r\n secondary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'secondary',\r\n content: content\r\n });\r\n }\r\n info(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'info',\r\n content: content\r\n });\r\n }\r\n\r\n success(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'success',\r\n content: content\r\n });\r\n }\r\n\r\n warning(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'warning',\r\n content: content\r\n });\r\n }\r\n\r\n danger(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'danger',\r\n content: content\r\n });\r\n }\r\n light(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'light',\r\n content: content\r\n });\r\n }\r\n dark(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'dark',\r\n content: content\r\n });\r\n }\r\n\r\n show(options: AXToastOptions): AXToastRef {\r\n const opt = Object.assign(\r\n {\r\n closeable: true,\r\n location: AXConfig.get('toast.location') || this._defaults.location\r\n },\r\n options\r\n );\r\n const gap = AXConfig.get('toast.gap') || this._defaults.gap;\r\n\r\n let positionStrategy = this.overlayService.position().global();\r\n const pos = this.getPosition(opt.location) + gap + 'px';\r\n switch (opt.location) {\r\n case 'bottom-center':\r\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally()\r\n break;\r\n case 'bottom-end':\r\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\r\n break;\r\n case 'bottom-start':\r\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\r\n break;\r\n case 'top-center':\r\n positionStrategy = positionStrategy.top(pos).centerHorizontally()\r\n break;\r\n case 'top-end':\r\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\r\n break;\r\n case 'top-start':\r\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\r\n break;\r\n case 'center-start':\r\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\r\n break;\r\n case 'center-end':\r\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\r\n break;\r\n default:\r\n break;\r\n }\r\n const overlayRef = this.overlayService.create(\r\n {\r\n positionStrategy,\r\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\r\n });\r\n const toastPortal = new ComponentPortal(AXToastComponent, null, this.parentInjector);\r\n\r\n const host = overlayRef.attach(toastPortal);\r\n (host.instance as any).visibleIndex = this._activeList.length;\r\n this._activeList.push(host.instance);\r\n if (host.instance) {\r\n Object.assign(host.instance, {\r\n options: opt,\r\n close: () => {\r\n this._activeList = this._activeList.filter(c => c != host.instance);\r\n overlayRef.dispose()\r\n }\r\n });\r\n setTimeout(() => {\r\n host.changeDetectorRef.detectChanges();\r\n }, 0);\r\n }\r\n\r\n return {\r\n close: () => {\r\n host.instance.close();\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n public hideAll() {\r\n this._activeList.forEach(c => c.close());\r\n }\r\n\r\n private getPosition(location: string) {\r\n const list = this._activeList.filter(c => c.options.location == location);\r\n if (list.length == 0) return 0;\r\n if (location.split('-')[0] == 'bottom') {\r\n return window.innerHeight - list[list.length - 1]._getHostElement().offsetTop;\r\n }\r\n else {\r\n return list[list.length - 1]._getHostElement().offsetTop + list[list.length - 1]._getHostElement().offsetHeight;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;AAYA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,oBAAoB,CAAA;AAKxD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAPzB,QAAA,IAAW,CAAA,WAAA,GAAW,GAAG,CAAC;KAQzB;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACxB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,aAAC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC1B,SAAA;AACD,QAAA,QAAQ,IAAI,CAAC,OAAO,CAAC,KAAK;AACxB,YAAA,KAAK,SAAS;AACZ,gBAAA,IAAI,CAAC,KAAK,GAAG,0BAA0B,CAAC;gBACxC,MAAM;AACR,YAAA,KAAK,SAAS;AACZ,gBAAA,IAAI,CAAC,KAAK,GAAG,4BAA4B,CAAC;gBAC1C,MAAM;AACR,YAAA,KAAK,QAA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AC,CAAC,eAAe,EAAE,CAAC,YAAY,CAAC;AACnH,SAAA;KACJ;;2GAhKQ,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA,CAAA;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACTlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../projects/acorex/components/toast/src/toast.component.ts","../../../../projects/acorex/components/toast/src/toast.component.html","../../../../projects/acorex/components/toast/src/toast.module.ts","../../../../projects/acorex/components/toast/src/toast.service.ts","../../../../projects/acorex/components/toast/acorex-components-toast.ts"],"sourcesContent":["import { AXClosbaleComponent } from '@acorex/components/common';\r\nimport { AXButtonItem } from '@acorex/components/button';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport { AXToastOptions } from './toast.class';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-toast',\r\n templateUrl: './toast.component.html',\r\n host: { class: 'ax-toast' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\r\n})\r\nexport class AXToastComponent extends AXBaseComponentMixin {\r\n options: AXToastOptions;\r\n _toastWidth: number = 100;\r\n _icon: string;\r\n close: () => void;\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n if (this.options.timeOut) {\r\n setTimeout(() => {\r\n this.close();\r\n }, this.options.timeOut);\r\n }\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-ic ax-ic-check-filled';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-ic ax-ic-warning-filled';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-ic ax-ic-error-filled';\r\n break;\r\n default:\r\n this._icon = '';\r\n break;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n}\r\n","<ax-alert [color]=\"options.color\" [look]=\"options.look\" [timeOut]=\"options.timeOut\">\r\n <ax-header *ngIf=\"options.title\">\r\n <ax-prefix>\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n </ax-prefix>\r\n <ax-suffix>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n </ax-suffix>\r\n </ax-header>\r\n <ax-content *ngIf=\"options.content\">\r\n <ax-icon *ngIf=\"_icon && !options.title\" [icon]=\"_icon\"></ax-icon>\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ng-container>\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ng-container>\r\n </ax-footer>\r\n</ax-alert>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXToastComponent } from './toast.component';\r\nimport { AXAlertModule } from '@acorex/components/alert';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\n\r\nconst COMPONENT = [AXToastComponent];\r\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXAlertModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXToastModule {\r\n \r\n}\r\n","import { AXConfig } from '@acorex/core/config';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { AXToastOptions, AXToastRef } from './toast.class';\r\nimport { AXToastComponent } from './toast.component';\r\n\r\n\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXToastService {\r\n\r\n\r\n private readonly _defaults = {\r\n gap: 5,\r\n timeOut: 2500,\r\n location: 'bottom-center',\r\n }\r\n\r\n constructor(private overlayService: Overlay, private parentInjector: Injector) {\r\n\r\n }\r\n\r\n private _activeList: AXToastComponent[] = [];\r\n\r\n primary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'primary',\r\n content: content\r\n });\r\n }\r\n secondary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'secondary',\r\n content: content\r\n });\r\n }\r\n info(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'info',\r\n content: content\r\n });\r\n }\r\n\r\n success(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'success',\r\n content: content\r\n });\r\n }\r\n\r\n warning(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'warning',\r\n content: content\r\n });\r\n }\r\n\r\n danger(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'danger',\r\n content: content\r\n });\r\n }\r\n light(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'light',\r\n content: content\r\n });\r\n }\r\n dark(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'dark',\r\n content: content\r\n });\r\n }\r\n\r\n show(options: AXToastOptions): AXToastRef {\r\n const opt = Object.assign(\r\n {\r\n closeable: true,\r\n location: AXConfig.get('toast.location') || this._defaults.location\r\n },\r\n options\r\n );\r\n const gap = AXConfig.get('toast.gap') || this._defaults.gap;\r\n\r\n let positionStrategy = this.overlayService.position().global();\r\n const pos = this.getPosition(opt.location) + gap + 'px';\r\n switch (opt.location) {\r\n case 'bottom-center':\r\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally()\r\n break;\r\n case 'bottom-end':\r\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\r\n break;\r\n case 'bottom-start':\r\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\r\n break;\r\n case 'top-center':\r\n positionStrategy = positionStrategy.top(pos).centerHorizontally()\r\n break;\r\n case 'top-end':\r\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\r\n break;\r\n case 'top-start':\r\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\r\n break;\r\n case 'center-start':\r\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\r\n break;\r\n case 'center-end':\r\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\r\n break;\r\n default:\r\n break;\r\n }\r\n const overlayRef = this.overlayService.create(\r\n {\r\n positionStrategy,\r\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\r\n });\r\n const toastPortal = new ComponentPortal(AXToastComponent, null, this.parentInjector);\r\n\r\n const host = overlayRef.attach(toastPortal);\r\n (host.instance as any).visibleIndex = this._activeList.length;\r\n this._activeList.push(host.instance);\r\n if (host.instance) {\r\n Object.assign(host.instance, {\r\n options: opt,\r\n close: () => {\r\n this._activeList = this._activeList.filter(c => c != host.instance);\r\n overlayRef.dispose()\r\n }\r\n });\r\n setTimeout(() => {\r\n host.changeDetectorRef.detectChanges();\r\n }, 0);\r\n }\r\n\r\n return {\r\n close: () => {\r\n host.instance.close();\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n public hideAll() {\r\n this._activeList.forEach(c => c.close());\r\n }\r\n\r\n private getPosition(location: string) {\r\n const list = this._activeList.filter(c => c.options.location == location);\r\n if (list.length == 0) return 0;\r\n if (location.split('-')[0] == 'bottom') {\r\n return window.innerHeight - list[list.length - 1]._getHostElement().offsetTop;\r\n }\r\n else {\r\n return list[list.length - 1]._getHostElement().offsetTop + list[list.length - 1]._getHostElement().offsetHeight;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;AAYA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,oBAAoB,CAAA;AAKxD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAPzB,QAAA,IAAW,CAAA,WAAA,GAAW,GAAG,CAAC;KAQzB;IAED,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,QAAQ,IAAI,CAAC,OAAO,CAAC,KAAK;AACxB,YAAA,KAAK,SAAS;AACZ,gBAAA,IAAI,CAAC,KAAK,GAAG,0BAA0B,CAAC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,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,YAAY,CAAC;AACnH,SAAA;KACJ;;2GAhKQ,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA,CAAA;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACTlC;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from 'tslib';
|
|
2
2
|
import { AXBaseComponentMixin } from '@acorex/components/mixin';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Component, ViewEncapsulation,
|
|
4
|
+
import { EventEmitter, Component, ViewEncapsulation, Output, ViewChild, Input, HostListener, HostBinding, NgModule } from '@angular/core';
|
|
5
5
|
import * as i1 from '@acorex/core/file';
|
|
6
6
|
import * as i2 from '@angular/common';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
@@ -12,6 +12,8 @@ class AXUploaderComponent extends AXBaseComponentMixin {
|
|
|
12
12
|
super(elementRef, cdr);
|
|
13
13
|
this._fileService = _fileService;
|
|
14
14
|
this.onValueChanged = new EventEmitter();
|
|
15
|
+
this.firstInit = true;
|
|
16
|
+
this._showText = true;
|
|
15
17
|
this.multiple = false;
|
|
16
18
|
this.accept = '*/*';
|
|
17
19
|
}
|
|
@@ -37,7 +39,7 @@ class AXUploaderComponent extends AXBaseComponentMixin {
|
|
|
37
39
|
component: this,
|
|
38
40
|
isUserInteraction: true,
|
|
39
41
|
value: files,
|
|
40
|
-
htmlElement: this._getHostElement()
|
|
42
|
+
htmlElement: this._getHostElement(),
|
|
41
43
|
});
|
|
42
44
|
}
|
|
43
45
|
onInit() {
|
|
@@ -52,6 +54,17 @@ class AXUploaderComponent extends AXBaseComponentMixin {
|
|
|
52
54
|
this._dropArea.addEventListener(eventName, this._handleUnhighlight.bind(this), false);
|
|
53
55
|
});
|
|
54
56
|
}
|
|
57
|
+
ngDoCheck() {
|
|
58
|
+
this.checkIsBoxHasMinWidth();
|
|
59
|
+
}
|
|
60
|
+
checkIsBoxHasMinWidth() {
|
|
61
|
+
this.firstInit = false;
|
|
62
|
+
let boxWidth = this._getHostElement().getBoundingClientRect().width;
|
|
63
|
+
console.log(boxWidth);
|
|
64
|
+
if (boxWidth <= 176 && this.firstInit === false) {
|
|
65
|
+
this._showText = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
55
68
|
preventDefaults(e) {
|
|
56
69
|
e.preventDefault();
|
|
57
70
|
e.stopPropagation();
|
|
@@ -68,12 +81,12 @@ class AXUploaderComponent extends AXBaseComponentMixin {
|
|
|
68
81
|
}
|
|
69
82
|
}
|
|
70
83
|
AXUploaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXUploaderComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.AXFileService }], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
-
AXUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXUploaderComponent, selector: "ax-uploader", inputs: {
|
|
84
|
+
AXUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXUploaderComponent, selector: "ax-uploader", inputs: { multiple: "multiple", accept: "accept" }, outputs: { onValueChanged: "onValueChanged" }, host: { listeners: { "click": "_handleClick($event)", "drop": "_handleDrop($event)" }, properties: { "class.ax-look-default": "this.__defaultClass" } }, viewQueries: [{ propertyName: "_placeholder", first: true, predicate: ["contentRef"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\" *ngIf=\"_showText\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
72
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXUploaderComponent, decorators: [{
|
|
73
86
|
type: Component,
|
|
74
|
-
args: [{ selector: 'ax-uploader', encapsulation: ViewEncapsulation.None, template: "<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>" }]
|
|
87
|
+
args: [{ selector: 'ax-uploader', encapsulation: ViewEncapsulation.None, template: "<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\" *ngIf=\"_showText\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>" }]
|
|
75
88
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.AXFileService }]; }, propDecorators: { onValueChanged: [{
|
|
76
|
-
type:
|
|
89
|
+
type: Output
|
|
77
90
|
}], _placeholder: [{
|
|
78
91
|
type: ViewChild,
|
|
79
92
|
args: ['contentRef', { static: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-uploader.mjs","sources":["../../../../projects/acorex/components/uploader/src/uploader.component.ts","../../../../projects/acorex/components/uploader/src/uploader.component.html","../../../../projects/acorex/components/uploader/src/uploader.module.ts","../../../../projects/acorex/components/uploader/acorex-components-uploader.ts"],"sourcesContent":["import { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXFileService } from '@acorex/core/file';\r\nimport {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n Input,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-uploader',\r\n templateUrl: './uploader.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXUploaderComponent extends AXBaseComponentMixin {\r\n
|
|
1
|
+
{"version":3,"file":"acorex-components-uploader.mjs","sources":["../../../../projects/acorex/components/uploader/src/uploader.component.ts","../../../../projects/acorex/components/uploader/src/uploader.component.html","../../../../projects/acorex/components/uploader/src/uploader.module.ts","../../../../projects/acorex/components/uploader/acorex-components-uploader.ts"],"sourcesContent":["import { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXFileService } from '@acorex/core/file';\r\nimport {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n Input,\r\n Output,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-uploader',\r\n templateUrl: './uploader.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXUploaderComponent extends AXBaseComponentMixin {\r\n @Output()\r\n onValueChanged: EventEmitter<AXValueChangedEvent<File[]>> = new EventEmitter<\r\n AXValueChangedEvent<File[]>\r\n >();\r\n\r\n firstInit: boolean = true;\r\n _showText: boolean = true;\r\n\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef,\r\n private _fileService: AXFileService\r\n ) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n @ViewChild('contentRef', { static: true })\r\n _placeholder: ElementRef;\r\n\r\n @Input()\r\n multiple: boolean = false;\r\n\r\n @Input()\r\n accept: string = '*/*';\r\n\r\n private _dropArea: HTMLDivElement;\r\n\r\n @HostListener('click', ['$event'])\r\n async _handleClick(e: MouseEvent) {\r\n const files = await this._fileService.choose({\r\n accept: this.accept,\r\n multiple: this.multiple,\r\n });\r\n this._handleFiles(files);\r\n }\r\n\r\n @HostListener('drop', ['$event'])\r\n async _handleDrop(e: any) {\r\n let dt = e.dataTransfer;\r\n let files = dt.files;\r\n this._handleFiles(Array.from(files));\r\n e.preventDefault();\r\n }\r\n\r\n _handleFiles(files: File[]) {\r\n this.onValueChanged.emit({\r\n component: this,\r\n isUserInteraction: true,\r\n value: files,\r\n htmlElement: this._getHostElement(),\r\n });\r\n }\r\n\r\n onInit(): void {\r\n this._dropArea = this._getHostElement();\r\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\r\n this._dropArea.addEventListener(eventName, this.preventDefaults, false);\r\n });\r\n ['dragenter', 'dragover'].forEach((eventName) => {\r\n this._dropArea.addEventListener(\r\n eventName,\r\n this._handleHighlight.bind(this),\r\n false\r\n );\r\n });\r\n\r\n ['dragleave', 'drop'].forEach((eventName) => {\r\n this._dropArea.addEventListener(\r\n eventName,\r\n this._handleUnhighlight.bind(this),\r\n false\r\n );\r\n });\r\n }\r\n\r\n ngDoCheck() {\r\n this.checkIsBoxHasMinWidth()\r\n }\r\n \r\n checkIsBoxHasMinWidth(){\r\n this.firstInit = false;\r\n let boxWidth: number = this._getHostElement().getBoundingClientRect().width;\r\n console.log(boxWidth);\r\n \r\n if (boxWidth <= 176 && this.firstInit === false) {\r\n this._showText = false;\r\n }\r\n }\r\n\r\n preventDefaults(e: any) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n _handleHighlight(e) {\r\n this._dropArea.classList.add('ax-state-hover');\r\n }\r\n\r\n _handleUnhighlight(e) {\r\n this._dropArea.classList.remove('ax-state-hover');\r\n }\r\n\r\n @HostBinding('class.ax-look-default')\r\n get __defaultClass() {\r\n return !this._placeholder?.nativeElement.childNodes.length;\r\n }\r\n}\r\n","<ng-container><div #contentRef><ng-content></ng-content></div></ng-container>\r\n<ng-container *ngIf=\"contentRef.childNodes.length == 0\">\r\n <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2\">\r\n <i class=\"ax-ic ax-ic-cloud-upload upload-icon\"></i>\r\n <div class=\"ax-p-4 ax-text-center\" *ngIf=\"_showText\">Drag your file here or, <span class=\"ax-text-primary-500\">click to browse</span></div>\r\n </div>\r\n</ng-container>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXUploaderComponent } from './uploader.component';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\n\r\n@NgModule({\r\n declarations: [AXUploaderComponent],\r\n imports: [CommonModule,AXDecoratorModule],\r\n exports: [AXUploaderComponent],\r\n providers: [],\r\n})\r\nexport class AXUploaderModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport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A;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAC,iBAAiB,CAAC;oBACzC,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -110,7 +110,7 @@ AXActionSheetItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
110
110
|
[text]="text"
|
|
111
111
|
(onClick)="_handleOnClick($event)"
|
|
112
112
|
></ax-button>
|
|
113
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }] });
|
|
113
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }] });
|
|
114
114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXActionSheetItemComponent, decorators: [{
|
|
115
115
|
type: Component,
|
|
116
116
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet-item.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXBaseComponent } from '@acorex/components/mixin';\r\nimport {\r\n trigger,\r\n state,\r\n style,\r\n transition,\r\n animate,\r\n} from '@angular/animations';\r\nimport { ChangeDetectorRef, Component, ElementRef, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n animations: [\r\n trigger('backdrop', [\r\n state(\r\n 'show',\r\n style({\r\n opacity: 1,\r\n visibility: 'visible',\r\n })\r\n ),\r\n state(\r\n 'hide',\r\n style({\r\n visibility: 'hidden',\r\n opacity: 0,\r\n })\r\n ),\r\n transition('show <=> hide', [animate('0.2s')]),\r\n ]),\r\n\r\n trigger('openClose', [\r\n state(\r\n 'open',\r\n style({\r\n bottom: '0',\r\n opacity: 1,\r\n })\r\n ),\r\n state(\r\n 'closed',\r\n style({\r\n bottom: '-100%',\r\n opacity: 0.5,\r\n })\r\n ),\r\n transition('open <=> closed', [animate('0.2s')]),\r\n ]),\r\n ],\r\n host: { class: 'ax-action-sheet' },\r\n})\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n @Input() caption = '';\r\n @Input() closeOnBackdrop = true;\r\n isOpen = false;\r\n\r\n _backdrop: HTMLElement;\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleBackdropClick() {\r\n if (!this.closeOnBackdrop) return;\r\n this.close();\r\n }\r\n\r\n open() {\r\n this.isOpen = true;\r\n }\r\n\r\n close() {\r\n this.isOpen = false;\r\n }\r\n\r\n toggle() {\r\n this.isOpen = !this.isOpen;\r\n }\r\n}\r\n","<div class=\"ax-action-sheet-backdrop\" [@backdrop]=\"isOpen ? 'show' : 'hide'\" (click)=\"_handleBackdropClick()\"></div>\r\n<div class=\"ax-action-sheet-container\" [@openClose]=\"isOpen ? 'open' : 'closed'\">\r\n <div class=\"ax-bg-white ax-h-full dark:ax-bg-dark-700\">\r\n <div class=\"ax-action-sheet-caption\" *ngIf=\"caption\">\r\n {{caption}}\r\n </div>\r\n <ng-content select=\"ax-content\"></ng-content>\r\n <div class=\"ax-action-sheet-items\">\r\n <ng-content select=\"ax-action-sheet-item\"></ng-content>\r\n </div>\r\n </div>\r\n</div>","import {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n} from '@angular/core';\r\nimport {\r\n AXButtonClickEvent,\r\n AXStyleColorType,\r\n} from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet-item',\r\n template: `\r\n <ax-button\r\n [color]=\"color\"\r\n look=\"blank\"\r\n [text]=\"text\"\r\n (onClick)=\"_handleOnClick($event)\"\r\n ></ax-button>\r\n `,\r\n})\r\nexport class AXActionSheetItemComponent extends AXBaseComponent {\r\n @Input()\r\n text: string;\r\n\r\n @Input()\r\n color: AXStyleColorType = 'light';\r\n\r\n @Output()\r\n onClick: EventEmitter<AXButtonClickEvent> = new EventEmitter<AXButtonClickEvent>();\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleOnClick(e: any) {\r\n this.onClick.emit(e);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetItemComponent } from './action-sheet-item.component';\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n imports: [CommonModule, AXButtonModule],\r\n exports: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAoDM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAMzD;;AAEG;IACH,WAAY,CAAA,WAAuB,EAAE,IAAuB,EAA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,EAAA,OAAA,EAAA,CAC5B,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;iHAGjD,mBAAmB,EAAA,OAAA,EAAA,CAJpB,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;2FAI3B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;AACvC,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAC7D,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet-item.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXBaseComponent } from '@acorex/components/mixin';\r\nimport {\r\n trigger,\r\n state,\r\n style,\r\n transition,\r\n animate,\r\n} from '@angular/animations';\r\nimport { ChangeDetectorRef, Component, ElementRef, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n animations: [\r\n trigger('backdrop', [\r\n state(\r\n 'show',\r\n style({\r\n opacity: 1,\r\n visibility: 'visible',\r\n })\r\n ),\r\n state(\r\n 'hide',\r\n style({\r\n visibility: 'hidden',\r\n opacity: 0,\r\n })\r\n ),\r\n transition('show <=> hide', [animate('0.2s')]),\r\n ]),\r\n\r\n trigger('openClose', [\r\n state(\r\n 'open',\r\n style({\r\n bottom: '0',\r\n opacity: 1,\r\n })\r\n ),\r\n state(\r\n 'closed',\r\n style({\r\n bottom: '-100%',\r\n opacity: 0.5,\r\n })\r\n ),\r\n transition('open <=> closed', [animate('0.2s')]),\r\n ]),\r\n ],\r\n host: { class: 'ax-action-sheet' },\r\n})\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n @Input() caption = '';\r\n @Input() closeOnBackdrop = true;\r\n isOpen = false;\r\n\r\n _backdrop: HTMLElement;\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleBackdropClick() {\r\n if (!this.closeOnBackdrop) return;\r\n this.close();\r\n }\r\n\r\n open() {\r\n this.isOpen = true;\r\n }\r\n\r\n close() {\r\n this.isOpen = false;\r\n }\r\n\r\n toggle() {\r\n this.isOpen = !this.isOpen;\r\n }\r\n}\r\n","<div class=\"ax-action-sheet-backdrop\" [@backdrop]=\"isOpen ? 'show' : 'hide'\" (click)=\"_handleBackdropClick()\"></div>\r\n<div class=\"ax-action-sheet-container\" [@openClose]=\"isOpen ? 'open' : 'closed'\">\r\n <div class=\"ax-bg-white ax-h-full dark:ax-bg-dark-700\">\r\n <div class=\"ax-action-sheet-caption\" *ngIf=\"caption\">\r\n {{caption}}\r\n </div>\r\n <ng-content select=\"ax-content\"></ng-content>\r\n <div class=\"ax-action-sheet-items\">\r\n <ng-content select=\"ax-action-sheet-item\"></ng-content>\r\n </div>\r\n </div>\r\n</div>","import {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n} from '@angular/core';\r\nimport {\r\n AXButtonClickEvent,\r\n AXStyleColorType,\r\n} from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet-item',\r\n template: `\r\n <ax-button\r\n [color]=\"color\"\r\n look=\"blank\"\r\n [text]=\"text\"\r\n (onClick)=\"_handleOnClick($event)\"\r\n ></ax-button>\r\n `,\r\n})\r\nexport class AXActionSheetItemComponent extends AXBaseComponent {\r\n @Input()\r\n text: string;\r\n\r\n @Input()\r\n color: AXStyleColorType = 'light';\r\n\r\n @Output()\r\n onClick: EventEmitter<AXButtonClickEvent> = new EventEmitter<AXButtonClickEvent>();\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleOnClick(e: any) {\r\n this.onClick.emit(e);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetItemComponent } from './action-sheet-item.component';\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n imports: [CommonModule, AXButtonModule],\r\n exports: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAoDM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAMzD;;AAEG;IACH,WAAY,CAAA,WAAuB,EAAE,IAAuB,EAAA;AAC1D,QAAA,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QATlB,IAAO,CAAA,OAAA,GAAG,EAAE,CAAC;QACb,IAAe,CAAA,eAAA,GAAG,IAAI,CAAC;QAChC,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;KAQd;IAED,oBAAoB,GAAA;QAClB,IAAI,CAAC,IAAI,CAAC,eAAe;YAAE,OAAO;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;KACd;IAED,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;KACpB;IAED,KAAK,GAAA;AACH,QAAA,IA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AAC,sBAAsB,EAAE,0BAA0B,CAAC;AAC7D,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
|
|
2
1
|
import { AXButtonComponent } from '@acorex/components/button';
|
|
3
2
|
import { AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
|
|
4
3
|
import * as i0 from '@angular/core';
|
|
@@ -8,7 +7,6 @@ import { _ColorLookComponentMixin, AXBaseComponent } from '@acorex/components/mi
|
|
|
8
7
|
import * as i1 from '@angular/common';
|
|
9
8
|
import { CommonModule } from '@angular/common';
|
|
10
9
|
|
|
11
|
-
var _AXAlertComponent_visible;
|
|
12
10
|
const AXBaseAlertMixin = _ColorLookComponentMixin(AXBaseComponent);
|
|
13
11
|
/**
|
|
14
12
|
* Regular description
|
|
@@ -22,7 +20,6 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
|
22
20
|
constructor(elementRef, cdr) {
|
|
23
21
|
super(elementRef, cdr);
|
|
24
22
|
this.onDismissed = new EventEmitter();
|
|
25
|
-
_AXAlertComponent_visible.set(this, void 0);
|
|
26
23
|
}
|
|
27
24
|
_onOptionChanged(option) {
|
|
28
25
|
if (option.name == 'color') {
|
|
@@ -64,11 +61,11 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
|
64
61
|
* set the visibility of the Alert
|
|
65
62
|
*/
|
|
66
63
|
get visible() {
|
|
67
|
-
return
|
|
64
|
+
return this._visible;
|
|
68
65
|
}
|
|
69
66
|
set visible(v) {
|
|
70
|
-
if (
|
|
71
|
-
|
|
67
|
+
if (this._visible != v) {
|
|
68
|
+
this._visible = v;
|
|
72
69
|
const host = this._getHostElement();
|
|
73
70
|
if (v) {
|
|
74
71
|
host.classList.remove('ax-state-hidden');
|
|
@@ -132,7 +129,6 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
|
132
129
|
this.visible = true;
|
|
133
130
|
}
|
|
134
131
|
}
|
|
135
|
-
_AXAlertComponent_visible = new WeakMap();
|
|
136
132
|
AXAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXAlertComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
137
133
|
AXAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXAlertComponent, selector: "ax-alert", inputs: { color: "color", look: "look", timeOut: "timeOut", visible: "visible" }, outputs: { onDismissed: "onDismissed" }, host: { properties: { "class": "this.__hostClass" }, classAttribute: "ax-alert" }, queries: [{ propertyName: "_icon", first: true, predicate: AXDecoratorIconComponent, descendants: true, static: true }, { propertyName: "_buttons", predicate: AXButtonComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-header,ng-container,ng-template\">\r\n</ng-content>\r\n<div class=\"ax-alert-body\">\r\n <div class=\"ax-flex ax-items-center ax-justify-between\">\r\n <div class=\"ax-flex\">\r\n <ng-content select=\"ax-icon,ng-container,ng-template\">\r\n </ng-content>\r\n <div class=\"ax-flex ax-flex-col ax-justify-center\">\r\n <ng-content select=\"ax-content,ng-container,ng-template\">\r\n </ng-content>\r\n <ng-content select=\"ax-footer,ng-container,ng-template\">\r\n </ng-content>\r\n </div>\r\n </div>\r\n <ng-content select=\"ax-suffix,ng-container,ng-template\">\r\n </ng-content>\r\n </div>\r\n</div>\r\n\r\n<div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut\" *ngIf=\"timeOut\">\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
138
134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXAlertComponent, decorators: [{
|