@acorex/components 6.0.16 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/src/alert.component.d.ts +4 -4
- package/avatar/src/avatar.component.d.ts +6 -9
- package/badge/src/badge.component.d.ts +1 -1
- package/breadcrumbs/src/breadcrumbs-item.component.d.ts +4 -4
- package/button/src/button-group.component.d.ts +4 -4
- package/button/src/button-item.class.d.ts +2 -1
- package/button/src/button-item.component.d.ts +4 -4
- package/button/src/button.component.d.ts +3 -1
- package/calendar/src/calendar.component.d.ts +20 -20
- package/color-picker/src/color-picker.component.d.ts +18 -21
- package/common/public-api.d.ts +1 -0
- package/common/src/auto-focus.directive.d.ts +2 -1
- package/common/src/common.module.d.ts +4 -3
- package/common/src/debounce-time.directive.d.ts +17 -0
- package/common/src/events.class.d.ts +2 -2
- package/date-picker/src/datepicker.component.d.ts +23 -23
- package/decorators/public-api.d.ts +1 -0
- package/decorators/src/decorators.module.d.ts +3 -2
- package/decorators/src/text.component.d.ts +9 -0
- package/dialog/src/dialog.service.d.ts +3 -1
- package/dropdown/src/dropdown-panel.component.d.ts +1 -0
- package/dropdown/src/dropdown.module.d.ts +7 -5
- package/esm2020/action-sheet/src/action-sheet-item.component.mjs +1 -1
- package/esm2020/alert/src/alert.component.mjs +4 -8
- package/esm2020/avatar/src/avatar.component.mjs +14 -21
- package/esm2020/badge/src/badge.component.mjs +3 -3
- package/esm2020/button/src/button-item.class.mjs +1 -1
- package/esm2020/button/src/button-item.component.mjs +3 -3
- package/esm2020/button/src/button.component.mjs +9 -6
- package/esm2020/calendar/src/calendar.component.mjs +7 -4
- package/esm2020/collapse/src/collapse.component.mjs +3 -3
- package/esm2020/color-palette/src/color-palette-input.component.mjs +1 -1
- package/esm2020/color-picker/src/color-picker.component.mjs +4 -4
- package/esm2020/common/public-api.mjs +2 -1
- package/esm2020/common/src/auto-focus.directive.mjs +7 -3
- package/esm2020/common/src/common.module.mjs +6 -1
- package/esm2020/common/src/debounce-time.directive.mjs +47 -0
- package/esm2020/common/src/events.class.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-input-selector.component.mjs +5 -4
- package/esm2020/data-pager/src/data-pager-next-buttons.components.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-numeric-selector.component.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-pagesize-dropdown.component.mjs +1 -1
- package/esm2020/data-pager/src/data-pager-prev-buttons.component.mjs +1 -1
- package/esm2020/date-picker/src/datepicker.component.mjs +10 -9
- package/esm2020/decorators/public-api.mjs +2 -1
- package/esm2020/decorators/src/decorators.module.mjs +8 -4
- package/esm2020/decorators/src/icon.component.mjs +3 -2
- package/esm2020/decorators/src/text.component.mjs +21 -0
- package/esm2020/dialog/src/dialog.class.mjs +1 -1
- package/esm2020/dialog/src/dialog.component.mjs +1 -1
- package/esm2020/dialog/src/dialog.service.mjs +11 -7
- package/esm2020/dropdown/src/dropdown-panel.component.mjs +14 -3
- package/esm2020/dropdown/src/dropdown.module.mjs +6 -4
- package/esm2020/form/src/form.component.mjs +10 -3
- package/esm2020/form/src/validation-summary.component.mjs +1 -1
- package/esm2020/image/src/image.component.mjs +36 -9
- package/esm2020/menu/src/menu.component.mjs +5 -3
- package/esm2020/mixin/src/textbox-mixin.class.mjs +52 -83
- package/esm2020/number-box/src/number-box.component.mjs +10 -5
- package/esm2020/password-box/src/password-box.component.mjs +12 -6
- package/esm2020/popover/src/popover.component.mjs +9 -18
- package/esm2020/popup/src/popup.component.mjs +14 -6
- package/esm2020/popup/src/popup.module.mjs +4 -3
- package/esm2020/popup/src/popup.service.mjs +8 -4
- package/esm2020/search-box/src/search-box.component.mjs +4 -3
- package/esm2020/select-box/src/selectbox.component.mjs +5 -5
- package/esm2020/textarea/src/textarea.component.mjs +11 -5
- package/esm2020/textbox/public-api.mjs +2 -1
- package/esm2020/textbox/src/mask-options.directive.mjs +22 -0
- package/esm2020/textbox/src/textbox.component.mjs +66 -9
- package/esm2020/textbox/src/textbox.module.mjs +12 -11
- package/esm2020/time-box/src/time-box.component.mjs +11 -5
- package/esm2020/toast/src/toast.component.mjs +1 -1
- package/esm2020/uploader/src/uploader.component.mjs +17 -4
- package/fesm2015/acorex-components-action-sheet.mjs +1 -1
- package/fesm2015/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2015/acorex-components-alert.mjs +3 -7
- package/fesm2015/acorex-components-alert.mjs.map +1 -1
- package/fesm2015/acorex-components-avatar.mjs +13 -20
- package/fesm2015/acorex-components-avatar.mjs.map +1 -1
- package/fesm2015/acorex-components-badge.mjs +2 -2
- package/fesm2015/acorex-components-badge.mjs.map +1 -1
- package/fesm2015/acorex-components-button.mjs +10 -7
- package/fesm2015/acorex-components-button.mjs.map +1 -1
- package/fesm2015/acorex-components-calendar.mjs +5 -3
- package/fesm2015/acorex-components-calendar.mjs.map +1 -1
- package/fesm2015/acorex-components-collapse.mjs +2 -2
- package/fesm2015/acorex-components-collapse.mjs.map +1 -1
- package/fesm2015/acorex-components-color-palette.mjs +1 -1
- package/fesm2015/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2015/acorex-components-color-picker.mjs +3 -3
- package/fesm2015/acorex-components-color-picker.mjs.map +1 -1
- package/fesm2015/acorex-components-common.mjs +67 -14
- package/fesm2015/acorex-components-common.mjs.map +1 -1
- package/fesm2015/acorex-components-data-pager.mjs +8 -7
- package/fesm2015/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2015/acorex-components-date-picker.mjs +11 -9
- package/fesm2015/acorex-components-date-picker.mjs.map +1 -1
- package/fesm2015/acorex-components-decorators.mjs +27 -5
- package/fesm2015/acorex-components-decorators.mjs.map +1 -1
- package/fesm2015/acorex-components-dialog.mjs +11 -7
- package/fesm2015/acorex-components-dialog.mjs.map +1 -1
- package/fesm2015/acorex-components-dropdown.mjs +18 -5
- package/fesm2015/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2015/acorex-components-form.mjs +10 -3
- package/fesm2015/acorex-components-form.mjs.map +1 -1
- package/fesm2015/acorex-components-image.mjs +35 -8
- package/fesm2015/acorex-components-image.mjs.map +1 -1
- package/fesm2015/acorex-components-menu.mjs +5 -3
- package/fesm2015/acorex-components-menu.mjs.map +1 -1
- package/fesm2015/acorex-components-mixin.mjs +3 -33
- package/fesm2015/acorex-components-mixin.mjs.map +1 -1
- package/fesm2015/acorex-components-number-box.mjs +10 -5
- package/fesm2015/acorex-components-number-box.mjs.map +1 -1
- package/fesm2015/acorex-components-password-box.mjs +11 -5
- package/fesm2015/acorex-components-password-box.mjs.map +1 -1
- package/fesm2015/acorex-components-popover.mjs +9 -18
- package/fesm2015/acorex-components-popover.mjs.map +1 -1
- package/fesm2015/acorex-components-popup.mjs +23 -11
- package/fesm2015/acorex-components-popup.mjs.map +1 -1
- package/fesm2015/acorex-components-search-box.mjs +3 -2
- package/fesm2015/acorex-components-search-box.mjs.map +1 -1
- package/fesm2015/acorex-components-select-box.mjs +4 -4
- package/fesm2015/acorex-components-select-box.mjs.map +1 -1
- package/fesm2015/acorex-components-textarea.mjs +10 -4
- package/fesm2015/acorex-components-textarea.mjs.map +1 -1
- package/fesm2015/acorex-components-textbox.mjs +96 -20
- package/fesm2015/acorex-components-textbox.mjs.map +1 -1
- package/fesm2015/acorex-components-time-box.mjs +11 -5
- package/fesm2015/acorex-components-time-box.mjs.map +1 -1
- package/fesm2015/acorex-components-toast.mjs +1 -1
- package/fesm2015/acorex-components-toast.mjs.map +1 -1
- package/fesm2015/acorex-components-uploader.mjs +16 -3
- package/fesm2015/acorex-components-uploader.mjs.map +1 -1
- package/fesm2020/acorex-components-action-sheet.mjs +1 -1
- package/fesm2020/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2020/acorex-components-alert.mjs +3 -7
- package/fesm2020/acorex-components-alert.mjs.map +1 -1
- package/fesm2020/acorex-components-avatar.mjs +13 -20
- package/fesm2020/acorex-components-avatar.mjs.map +1 -1
- package/fesm2020/acorex-components-badge.mjs +2 -2
- package/fesm2020/acorex-components-badge.mjs.map +1 -1
- package/fesm2020/acorex-components-button.mjs +10 -7
- package/fesm2020/acorex-components-button.mjs.map +1 -1
- package/fesm2020/acorex-components-calendar.mjs +5 -3
- package/fesm2020/acorex-components-calendar.mjs.map +1 -1
- package/fesm2020/acorex-components-collapse.mjs +2 -2
- package/fesm2020/acorex-components-collapse.mjs.map +1 -1
- package/fesm2020/acorex-components-color-palette.mjs +1 -1
- package/fesm2020/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2020/acorex-components-color-picker.mjs +3 -3
- package/fesm2020/acorex-components-color-picker.mjs.map +1 -1
- package/fesm2020/acorex-components-common.mjs +66 -14
- package/fesm2020/acorex-components-common.mjs.map +1 -1
- package/fesm2020/acorex-components-data-pager.mjs +8 -7
- package/fesm2020/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2020/acorex-components-date-picker.mjs +10 -9
- package/fesm2020/acorex-components-date-picker.mjs.map +1 -1
- package/fesm2020/acorex-components-decorators.mjs +27 -5
- package/fesm2020/acorex-components-decorators.mjs.map +1 -1
- package/fesm2020/acorex-components-dialog.mjs +11 -7
- package/fesm2020/acorex-components-dialog.mjs.map +1 -1
- package/fesm2020/acorex-components-dropdown.mjs +18 -5
- package/fesm2020/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2020/acorex-components-form.mjs +10 -3
- package/fesm2020/acorex-components-form.mjs.map +1 -1
- package/fesm2020/acorex-components-image.mjs +35 -8
- package/fesm2020/acorex-components-image.mjs.map +1 -1
- package/fesm2020/acorex-components-menu.mjs +5 -3
- package/fesm2020/acorex-components-menu.mjs.map +1 -1
- package/fesm2020/acorex-components-mixin.mjs +51 -81
- package/fesm2020/acorex-components-mixin.mjs.map +1 -1
- package/fesm2020/acorex-components-number-box.mjs +10 -5
- package/fesm2020/acorex-components-number-box.mjs.map +1 -1
- package/fesm2020/acorex-components-password-box.mjs +11 -5
- package/fesm2020/acorex-components-password-box.mjs.map +1 -1
- package/fesm2020/acorex-components-popover.mjs +8 -17
- package/fesm2020/acorex-components-popover.mjs.map +1 -1
- package/fesm2020/acorex-components-popup.mjs +23 -11
- package/fesm2020/acorex-components-popup.mjs.map +1 -1
- package/fesm2020/acorex-components-search-box.mjs +3 -2
- package/fesm2020/acorex-components-search-box.mjs.map +1 -1
- package/fesm2020/acorex-components-select-box.mjs +4 -4
- package/fesm2020/acorex-components-select-box.mjs.map +1 -1
- package/fesm2020/acorex-components-textarea.mjs +10 -4
- package/fesm2020/acorex-components-textarea.mjs.map +1 -1
- package/fesm2020/acorex-components-textbox.mjs +95 -20
- package/fesm2020/acorex-components-textbox.mjs.map +1 -1
- package/fesm2020/acorex-components-time-box.mjs +11 -5
- package/fesm2020/acorex-components-time-box.mjs.map +1 -1
- package/fesm2020/acorex-components-toast.mjs +1 -1
- package/fesm2020/acorex-components-toast.mjs.map +1 -1
- package/fesm2020/acorex-components-uploader.mjs +16 -3
- package/fesm2020/acorex-components-uploader.mjs.map +1 -1
- package/form/src/form.component.d.ts +2 -0
- package/image/src/image.component.d.ts +16 -7
- package/menu/src/menu.component.d.ts +1 -0
- package/mixin/src/base-components.class.d.ts +1 -1
- package/mixin/src/base-menu-mixin.class.d.ts +4 -4
- package/mixin/src/button-mixin.class.d.ts +1 -1
- package/mixin/src/clickable-mixin.class.d.ts +1 -1
- package/mixin/src/color-look-mixing.class.d.ts +1 -1
- package/mixin/src/datalist-component.class.d.ts +9 -9
- package/mixin/src/dropdown-mixin.class.d.ts +1 -1
- package/mixin/src/interactive-mixin.class.d.ts +3 -3
- package/mixin/src/loading-mixin.class.d.ts +1 -1
- package/mixin/src/mixin.class.d.ts +42 -47
- package/mixin/src/page-component.class.d.ts +1 -1
- package/mixin/src/selection-component.class.d.ts +1 -1
- package/mixin/src/sizable-mixin.class.d.ts +1 -1
- package/mixin/src/textbox-mixin.class.d.ts +4 -13
- package/mixin/src/value-mixin.class.d.ts +7 -7
- package/number-box/src/number-box.component.d.ts +3 -1
- package/package.json +1 -9
- package/password-box/src/password-box.component.d.ts +3 -1
- package/popover/src/popover.component.d.ts +2 -2
- package/popup/src/popup.module.d.ts +7 -6
- package/select-box/src/selectbox.component.d.ts +1 -1
- package/tabs/src/tab-item.component.d.ts +1 -1
- package/textarea/src/textarea.component.d.ts +3 -1
- package/textbox/public-api.d.ts +1 -0
- package/textbox/src/mask-options.directive.d.ts +13 -0
- package/textbox/src/textbox.component.d.ts +14 -3
- package/textbox/src/textbox.module.d.ts +7 -6
- package/time-box/src/time-box.component.d.ts +4 -2
- package/uploader/src/uploader.component.d.ts +4 -0
- package/esm2020/input-mask/acorex-components-input-mask.mjs +0 -5
- package/esm2020/input-mask/public-api.mjs +0 -3
- package/esm2020/input-mask/src/input-mask.component.mjs +0 -58
- package/esm2020/input-mask/src/input-mask.module.mjs +0 -24
- package/fesm2015/acorex-components-input-mask.mjs +0 -86
- package/fesm2015/acorex-components-input-mask.mjs.map +0 -1
- package/fesm2020/acorex-components-input-mask.mjs +0 -86
- package/fesm2020/acorex-components-input-mask.mjs.map +0 -1
- package/input-mask/index.d.ts +0 -5
- package/input-mask/public-api.d.ts +0 -2
- package/input-mask/src/input-mask.component.d.ts +0 -25
- package/input-mask/src/input-mask.module.d.ts +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AXBaseTextBoxMixin } from '@acorex/components/mixin';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
@@ -13,13 +13,19 @@ class AXTextareaComponent extends AXBaseTextBoxMixin {
|
|
|
13
13
|
super(elementRef, cdr);
|
|
14
14
|
this.rows = 0;
|
|
15
15
|
}
|
|
16
|
+
focus() {
|
|
17
|
+
this.input.nativeElement.focus();
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
AXTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTextareaComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
-
AXTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXTextareaComponent, selector: "ax-textarea", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", allowNull: "allowNull", value: "value", name: "name", checked: "checked", placeholder: "placeholder", maxLength: "maxLength",
|
|
21
|
+
AXTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXTextareaComponent, selector: "ax-textarea", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", allowNull: "allowNull", value: "value", name: "name", checked: "checked", placeholder: "placeholder", maxLength: "maxLength", rows: "rows" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", onValueChanged: "onValueChanged" }, host: { classAttribute: "ax-textarea-container ax-textarea" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
19
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTextareaComponent, decorators: [{
|
|
20
23
|
type: Component,
|
|
21
|
-
args: [{ selector: 'ax-textarea', inputs: ['disabled', 'tabIndex', 'readonly', 'allowNull', 'value', 'name', 'checked', 'placeholder', 'maxLength'
|
|
22
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: {
|
|
24
|
+
args: [{ selector: 'ax-textarea', inputs: ['disabled', 'tabIndex', 'readonly', 'allowNull', 'value', 'name', 'checked', 'placeholder', 'maxLength'], outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'ax-textarea-container ax-textarea' }, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>" }]
|
|
25
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
|
|
26
|
+
type: ViewChild,
|
|
27
|
+
args: ['input']
|
|
28
|
+
}], rows: [{
|
|
23
29
|
type: Input
|
|
24
30
|
}] } });
|
|
25
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-textarea.mjs","sources":["../../../../projects/acorex/components/textarea/src/textarea.component.ts","../../../../projects/acorex/components/textarea/src/textarea.component.html","../../../../projects/acorex/components/textarea/src/textarea.module.ts","../../../../projects/acorex/components/textarea/acorex-components-textarea.ts"],"sourcesContent":["\r\nimport { AXBaseTextBoxMixin } from '@acorex/components/mixin';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'ax-textarea',\r\n templateUrl: './textarea.component.html',\r\n inputs: ['disabled', 'tabIndex', 'readonly','allowNull','value','name', 'checked', 'placeholder', 'maxLength'
|
|
1
|
+
{"version":3,"file":"acorex-components-textarea.mjs","sources":["../../../../projects/acorex/components/textarea/src/textarea.component.ts","../../../../projects/acorex/components/textarea/src/textarea.component.html","../../../../projects/acorex/components/textarea/src/textarea.module.ts","../../../../projects/acorex/components/textarea/acorex-components-textarea.ts"],"sourcesContent":["\r\nimport { AXBaseTextBoxMixin } from '@acorex/components/mixin';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'ax-textarea',\r\n templateUrl: './textarea.component.html',\r\n inputs: ['disabled', 'tabIndex', 'readonly','allowNull','value','name', 'checked', 'placeholder', 'maxLength'],\r\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { class: 'ax-textarea-container ax-textarea' },\r\n})\r\nexport class AXTextareaComponent extends AXBaseTextBoxMixin {\r\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\r\n \r\n @Input()\r\n rows: number = 0;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n focus(): void {\r\n this.input.nativeElement.focus();\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<textarea #input [attr.name]=\"name\" type=\"text\" [rows]=\"rows\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\"></textarea>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXTextareaComponent } from './textarea.component';\r\n\r\n@NgModule({\r\n declarations: [AXTextareaComponent],\r\n imports: [CommonModule, FormsModule],\r\n exports: [AXTextareaComponent],\r\n})\r\nexport class AXTextareaModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAsBM,MAAO,mBAAoB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oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,mBAAmB,CAAC;iBAC/B,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
-
import { AXComponent, AXFocusableComponent } from '@acorex/components/common';
|
|
2
|
+
import { Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
3
|
+
import { AXComponent, AXFocusableComponent, AXCommonModule } from '@acorex/components/common';
|
|
4
4
|
import { AXBaseTextBoxMixin } from '@acorex/components/mixin';
|
|
5
|
+
import IMask from 'imask';
|
|
5
6
|
import * as i1 from '@angular/forms';
|
|
6
7
|
import { FormsModule } from '@angular/forms';
|
|
7
8
|
import { AXButtonModule } from '@acorex/components/button';
|
|
8
9
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
9
10
|
import { CommonModule } from '@angular/common';
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
class AXMaskOptionsDirective {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.unmask = false;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
AXMaskOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXMaskOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
+
AXMaskOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: AXMaskOptionsDirective, selector: "ax-mask-options", inputs: { mask: "mask", unmask: "unmask", updateValue: "updateValue" }, ngImport: i0 });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXMaskOptionsDirective, decorators: [{
|
|
20
|
+
type: Directive,
|
|
21
|
+
args: [{
|
|
22
|
+
selector: 'ax-mask-options',
|
|
23
|
+
}]
|
|
24
|
+
}], propDecorators: { mask: [{
|
|
25
|
+
type: Input
|
|
26
|
+
}], unmask: [{
|
|
27
|
+
type: Input
|
|
28
|
+
}], updateValue: [{
|
|
29
|
+
type: Input
|
|
30
|
+
}] } });
|
|
12
31
|
|
|
13
32
|
/**
|
|
14
33
|
* The Textbox is a component which detects user interaction and triggers a corresponding event
|
|
@@ -17,49 +36,106 @@ import { NgxMaskModule } from 'ngx-mask';
|
|
|
17
36
|
*/
|
|
18
37
|
class AXTextBoxComponent extends AXBaseTextBoxMixin {
|
|
19
38
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
39
|
+
* @ignore
|
|
40
|
+
*/
|
|
22
41
|
constructor(elementRef, cdr) {
|
|
23
42
|
super(elementRef, cdr);
|
|
43
|
+
this._updateOn = 'change';
|
|
44
|
+
this._maskOptions = { unmask: false };
|
|
45
|
+
}
|
|
46
|
+
get maskOptions() {
|
|
47
|
+
return this._maskOptions;
|
|
48
|
+
}
|
|
49
|
+
set maskOptions(v) {
|
|
50
|
+
this._maskOptions = v;
|
|
51
|
+
}
|
|
52
|
+
onInit() {
|
|
53
|
+
if (this._maskOptionsContent) {
|
|
54
|
+
Object.assign(this.maskOptions, this, this._maskOptionsContent);
|
|
55
|
+
}
|
|
56
|
+
//
|
|
57
|
+
if (this.maskOptions.mask) {
|
|
58
|
+
this._maskObj = IMask(this.input.nativeElement, {
|
|
59
|
+
mask: this.maskOptions.mask,
|
|
60
|
+
});
|
|
61
|
+
this._updateOn = 'submit';
|
|
62
|
+
this._maskObj.on("accept", this._onComplete.bind(this));
|
|
63
|
+
this._maskObj.on("complete", this._onComplete.bind(this));
|
|
64
|
+
if (this.value) {
|
|
65
|
+
this._maskObj.value = `${this.value}`;
|
|
66
|
+
this._maskObj.updateValue();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
focus() {
|
|
71
|
+
this.input.nativeElement.focus();
|
|
72
|
+
}
|
|
73
|
+
_onComplete(e) {
|
|
74
|
+
var _a;
|
|
75
|
+
this.value = this._maskObj.value;
|
|
76
|
+
if (typeof this.maskOptions.updateValue === 'function') {
|
|
77
|
+
(_a = this.maskOptions) === null || _a === void 0 ? void 0 : _a.updateValue(this._maskObj.value, this._maskObj.unmaskedValue);
|
|
78
|
+
}
|
|
24
79
|
}
|
|
25
80
|
}
|
|
26
81
|
AXTextBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTextBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
-
AXTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXTextBoxComponent, selector: "ax-text-box", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly",
|
|
82
|
+
AXTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXTextBoxComponent, selector: "ax-text-box", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", value: "value", name: "name", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", type: "type", autoComplete: "autoComplete", maskOptions: ["mask-options", "maskOptions"] }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", onValueChanged: "onValueChanged" }, host: { classAttribute: "ax-editor-container" }, providers: [
|
|
28
83
|
{ provide: AXComponent, useExisting: AXTextBoxComponent },
|
|
29
84
|
{ provide: AXFocusableComponent, useExisting: AXTextBoxComponent },
|
|
30
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" [attr.name]=\"name\" [attr.autocomplete]=\"autoComplete\"
|
|
85
|
+
], queries: [{ propertyName: "_maskOptionsContent", first: true, predicate: AXMaskOptionsDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" \r\n [attr.name]=\"name\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [attr.type]=\"type\"\r\n [attr.placeholder]=\"placeholder\" \r\n [attr.maxlength]=\"maxLength\" \r\n [class.ax-state-disabled]=\"disabled\"\r\n [class.ax-state-readonly]=\"readonly\" \r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\"\r\n [ngModel]=\"value\" \r\n (ngModelChange)=\"value = $event\"\r\n [ngModelOptions]=\"{ updateOn:_updateOn }\" \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)\">\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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
31
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTextBoxComponent, decorators: [{
|
|
32
87
|
type: Component,
|
|
33
|
-
args: [{ selector: 'ax-text-box', inputs: [
|
|
88
|
+
args: [{ selector: 'ax-text-box', inputs: [
|
|
89
|
+
'disabled',
|
|
90
|
+
'tabIndex',
|
|
91
|
+
'readonly',
|
|
92
|
+
'value',
|
|
93
|
+
'name',
|
|
94
|
+
'placeholder',
|
|
95
|
+
'maxLength',
|
|
96
|
+
'allowNull',
|
|
97
|
+
'type',
|
|
98
|
+
'autoComplete'
|
|
99
|
+
], outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'], host: { class: 'ax-editor-container' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
34
100
|
{ provide: AXComponent, useExisting: AXTextBoxComponent },
|
|
35
101
|
{ provide: AXFocusableComponent, useExisting: AXTextBoxComponent },
|
|
36
|
-
], template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" [attr.name]=\"name\" [attr.autocomplete]=\"autoComplete\"
|
|
37
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }
|
|
102
|
+
], template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" \r\n [attr.name]=\"name\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [attr.type]=\"type\"\r\n [attr.placeholder]=\"placeholder\" \r\n [attr.maxlength]=\"maxLength\" \r\n [class.ax-state-disabled]=\"disabled\"\r\n [class.ax-state-readonly]=\"readonly\" \r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\"\r\n [ngModel]=\"value\" \r\n (ngModelChange)=\"value = $event\"\r\n [ngModelOptions]=\"{ updateOn:_updateOn }\" \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)\">\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>" }]
|
|
103
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
|
|
104
|
+
type: ViewChild,
|
|
105
|
+
args: ['input', { static: true }]
|
|
106
|
+
}], maskOptions: [{
|
|
107
|
+
type: Input,
|
|
108
|
+
args: ["mask-options"]
|
|
109
|
+
}], _maskOptionsContent: [{
|
|
110
|
+
type: ContentChild,
|
|
111
|
+
args: [AXMaskOptionsDirective, { static: true }]
|
|
112
|
+
}] } });
|
|
38
113
|
|
|
39
114
|
class AXTextBoxModule {
|
|
40
115
|
}
|
|
41
116
|
AXTextBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTextBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
42
|
-
AXTextBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: AXTextBoxModule, declarations: [AXTextBoxComponent], imports: [CommonModule,
|
|
117
|
+
AXTextBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: AXTextBoxModule, declarations: [AXTextBoxComponent, AXMaskOptionsDirective], imports: [CommonModule,
|
|
118
|
+
AXCommonModule,
|
|
43
119
|
FormsModule,
|
|
44
120
|
AXButtonModule,
|
|
45
|
-
AXDecoratorModule
|
|
121
|
+
AXDecoratorModule], exports: [AXTextBoxComponent, AXMaskOptionsDirective] });
|
|
46
122
|
AXTextBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTextBoxModule, imports: [CommonModule,
|
|
123
|
+
AXCommonModule,
|
|
47
124
|
FormsModule,
|
|
48
125
|
AXButtonModule,
|
|
49
|
-
AXDecoratorModule
|
|
50
|
-
NgxMaskModule.forChild()] });
|
|
126
|
+
AXDecoratorModule] });
|
|
51
127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXTextBoxModule, decorators: [{
|
|
52
128
|
type: NgModule,
|
|
53
129
|
args: [{
|
|
54
130
|
imports: [
|
|
55
131
|
CommonModule,
|
|
132
|
+
AXCommonModule,
|
|
56
133
|
FormsModule,
|
|
57
134
|
AXButtonModule,
|
|
58
|
-
AXDecoratorModule
|
|
59
|
-
NgxMaskModule.forChild()
|
|
135
|
+
AXDecoratorModule
|
|
60
136
|
],
|
|
61
|
-
exports: [AXTextBoxComponent],
|
|
62
|
-
declarations: [AXTextBoxComponent],
|
|
137
|
+
exports: [AXTextBoxComponent, AXMaskOptionsDirective],
|
|
138
|
+
declarations: [AXTextBoxComponent, AXMaskOptionsDirective],
|
|
63
139
|
providers: [],
|
|
64
140
|
}]
|
|
65
141
|
}] });
|
|
@@ -68,5 +144,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
68
144
|
* Generated bundle index. Do not edit.
|
|
69
145
|
*/
|
|
70
146
|
|
|
71
|
-
export { AXTextBoxComponent, AXTextBoxModule };
|
|
147
|
+
export { AXMaskOptionsDirective, AXTextBoxComponent, AXTextBoxModule };
|
|
72
148
|
//# sourceMappingURL=acorex-components-textbox.mjs.map
|
|
@@ -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\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { AXComponent, AXFocusableComponent } from '@acorex/components/common';\r\nimport { AXBaseTextBoxMixin } from '@acorex/components/mixin';\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: ['disabled', 'tabIndex', 'readonly','allowNull','value','name', 'checked', 'placeholder', 'maxLength', 'allowNull', 'debounceTime', 'type', 'autoComplete', 'readonly','allowNull','value','name', 'checked'],\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 constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<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 (keydown)=\"_emitOnKeydownEvent($event)\" \r\n (keyup)=\"_emitOnKeyupEvent($event)\"\r\n (keypress)=\"_emitOnKeypressEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\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>","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 { NgxMaskModule } from 'ngx-mask';\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 NgxMaskModule.forChild()\r\n ],\r\n exports: [AXTextBoxComponent],\r\n declarations: [AXTextBoxComponent],\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":";;;;;;;;;;;;AAWA;;;;AAIG;AAcG,MAAO,kBAAmB,SAAQ,kBAAkB,CAAA;AACxD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;KACxB;;+GANU,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,EALlB,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,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AAA,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;AACjB,QAAA,aAAa,CAAC,QAAQ,EAAE,CAAA,EAAA,CAAA,CAAA;2FAMnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAZ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,cAAc;wBACd,iBAAiB;wBACjB,aAAa,CAAC,QAAQ,EAAE;AAC3B,qBAAA;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,YAAY,EAAE,CAAC,kBAAkB,CAAC;AAClC,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-textbox.mjs","sources":["../../../../projects/acorex/components/textbox/src/mask-options.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\r\nexport interface AXMaskOptions {\r\n mask?: string | RegExp;\r\n unmask?: boolean;\r\n updateValue?: (masked:string,unmasked:string) => void;\r\n}\r\n\r\n\r\n@Directive({\r\n selector: 'ax-mask-options',\r\n})\r\nexport class AXMaskOptionsDirective implements AXMaskOptions {\r\n\r\n @Input()\r\n mask: string | RegExp;\r\n\r\n @Input()\r\n unmask: boolean = false;\r\n\r\n @Input()\r\n updateValue?: (masked:string,unmasked:string) => void;\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 Input\r\n} from '@angular/core';\r\nimport { AXComponent, AXFocusableComponent } from '@acorex/components/common';\r\nimport { AXBaseTextBoxMixin } from '@acorex/components/mixin';\r\nimport { AXMaskOptions, AXMaskOptionsDirective } from './mask-options.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 'value',\r\n 'name',\r\n 'placeholder',\r\n 'maxLength',\r\n 'allowNull',\r\n 'type',\r\n 'autoComplete'\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 protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\r\n\r\n @ViewChild('input', { static: true })\r\n private input: ElementRef<HTMLInputElement>;\r\n\r\n\r\n private _maskObj: IMask.InputMask<AnyMaskedOptions>\r\n\r\n\r\n private _maskOptions: AXMaskOptions = { unmask: false };\r\n @Input(\"mask-options\")\r\n public get maskOptions(): AXMaskOptions {\r\n return this._maskOptions;\r\n }\r\n\r\n public set maskOptions(v: AXMaskOptions) {\r\n this._maskOptions = v;\r\n }\r\n\r\n @ContentChild(AXMaskOptionsDirective, { static: true })\r\n protected _maskOptionsContent: AXMaskOptionsDirective;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n if (this._maskOptionsContent) {\r\n Object.assign(this.maskOptions, this, this._maskOptionsContent);\r\n }\r\n //\r\n if (this.maskOptions.mask) {\r\n this._maskObj = IMask(this.input.nativeElement, {\r\n mask: this.maskOptions.mask as string,\r\n });\r\n this._updateOn = 'submit';\r\n this._maskObj.on(\"accept\", this._onComplete.bind(this));\r\n this._maskObj.on(\"complete\", this._onComplete.bind(this));\r\n if (this.value) {\r\n this._maskObj.value = `${this.value}`;\r\n this._maskObj.updateValue();\r\n }\r\n }\r\n }\r\n\r\n\r\n focus(): void {\r\n this.input.nativeElement.focus();\r\n }\r\n\r\n private _onComplete(e) {\r\n this.value = this._maskObj.value;\r\n if (typeof this.maskOptions.updateValue === 'function') {\r\n this.maskOptions?.updateValue(this._maskObj.value, this._maskObj.unmaskedValue);\r\n }\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" \r\n [attr.name]=\"name\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [attr.type]=\"type\"\r\n [attr.placeholder]=\"placeholder\" \r\n [attr.maxlength]=\"maxLength\" \r\n [class.ax-state-disabled]=\"disabled\"\r\n [class.ax-state-readonly]=\"readonly\" \r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\"\r\n [ngModel]=\"value\" \r\n (ngModelChange)=\"value = $event\"\r\n [ngModelOptions]=\"{ updateOn:_updateOn }\" \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)\">\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>","import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXCommonModule } from '@acorex/components/common';\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 { AXMaskOptionsDirective } from './mask-options.directive';\r\nimport { AXTextBoxComponent } from './textbox.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n AXCommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n AXDecoratorModule\r\n ],\r\n exports: [AXTextBoxComponent, AXMaskOptionsDirective],\r\n declarations: [AXTextBoxComponent, AXMaskOptionsDirective],\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":";;;;;;;;;;;MAaa,sBAAsB,CAAA;AAHnC,IAAA,WAAA,GAAA;AASI,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK,CAAC;KAI3B;;mHAVY,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;uGAAtB,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,iBAAiB;iBAC9B,CAAA;8BAIG,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,MAAM,EAAA,CAAA;sBADL,KAAK;gBAIN,WAAW,EAAA,CAAA;sBADV,KAAK;;;ACNV;;;;AAIG;AAyBG,MAAO,kBAAmB,SAAQ,kBAAkB,CAAA;AAwBxD;;AAEE;IACF,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QA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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,cAAc;QACd,WAAW;QACX,cAAc;QACd,iBAAiB,CAAA,EAAA,CAAA,CAAA;2FAMZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAZ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,cAAc;wBACd,WAAW;wBACX,cAAc;wBACd,iBAAiB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;AACrD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;AAC1D,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;ACrBD;;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",
|
|
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", 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\" \r\n [imask]=\"_maskObj\" \r\n [unmask]=\"false\" \r\n type=\"text\" \r\n [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\" \r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [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<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: [
|
|
@@ -268,15 +271,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
268
271
|
'tabIndex',
|
|
269
272
|
'size',
|
|
270
273
|
'value',
|
|
271
|
-
'placeholder', 'maxLength', 'allowNull', '
|
|
274
|
+
'placeholder', 'maxLength', 'allowNull', 'type', 'autoComplete', 'readonly', 'allowNull', 'value', 'name', 'checked',
|
|
272
275
|
], outputs: [
|
|
273
276
|
'valueChange',
|
|
274
277
|
'onValueChanged',
|
|
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
|
|
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\" \r\n [imask]=\"_maskObj\" \r\n [unmask]=\"false\" \r\n type=\"text\" \r\n [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\" \r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [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<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,OA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.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', '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\r\n @ViewChild('input') \r\n 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 protected _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\" \r\n [imask]=\"_maskObj\" \r\n [unmask]=\"false\" \r\n type=\"text\" \r\n [attr.placeholder]=\"placeholder\"\r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\" \r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [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<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;AA4DxD;;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,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,CAAC,CAAC;KACJ;AAMD,IAAA,IACW,WAAW,GAAA;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;KAC1B;IAED,IAAW,WAAW,CAAC,CAAS,EAAA;AAC9B,QAAA,IAAI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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>" }]
|