@acorex/components 18.5.5 → 18.5.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,7 +72,7 @@ class AXDateTimeBoxComponent extends classes((MXInputBaseValueComponent), MXCale
72
72
  }
73
73
  }
74
74
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXDateTimeBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
75
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXDateTimeBoxComponent, selector: "ax-datetime-box", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: false, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, depth: { classPropertyName: "depth", publicName: "depth", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, allowTyping: { classPropertyName: "allowTyping", publicName: "allowTyping", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", onOpened: "onOpened", onClosed: "onClosed", readonlyChange: "readonlyChange", disabledChange: "disabledChange", formatChange: "formatChange" }, host: { attributes: { "ngSkipHydration": "true" } }, providers: [
75
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXDateTimeBoxComponent, selector: "ax-datetime-box", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: false, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, depth: { classPropertyName: "depth", publicName: "depth", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, holidayDates: { classPropertyName: "holidayDates", publicName: "holidayDates", isSignal: false, isRequired: false, transformFunction: null }, allowTyping: { classPropertyName: "allowTyping", publicName: "allowTyping", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", onOpened: "onOpened", onClosed: "onClosed", readonlyChange: "readonlyChange", disabledChange: "disabledChange", formatChange: "formatChange" }, host: { attributes: { "ngSkipHydration": "true" } }, providers: [
76
76
  { provide: AXComponent, useExisting: AXDateTimeBoxComponent },
77
77
  { provide: AXFocusableComponent, useExisting: AXDateTimeBoxComponent },
78
78
  { provide: AXValuableComponent, useExisting: AXDateTimeBoxComponent },
@@ -100,6 +100,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
100
100
  'id',
101
101
  'type',
102
102
  'look',
103
+ 'holidayDates',
103
104
  ], outputs: [
104
105
  'valueChange',
105
106
  'stateChange',
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-datetime-box.mjs","sources":["../../../../libs/components/datetime-box/src/lib/datetime-box.component.ts","../../../../libs/components/datetime-box/src/lib/datetime-box.component.html","../../../../libs/components/datetime-box/src/lib/datetime-box.module.ts","../../../../libs/components/datetime-box/src/acorex-components-datetime-box.ts"],"sourcesContent":["import { AXCalendarNavigateEvent, MXCalendarBaseComponent } from '@acorex/components/calendar';\nimport {\n AXClearableComponent,\n AXComponent,\n AXEvent,\n AXFocusEvent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport { AXDateTimeInputComponent } from '@acorex/components/datetime-input';\nimport { AXDateTimePickerComponent } from '@acorex/components/datetime-picker';\nimport { AXDropdownBoxComponent, MXDropdownBoxBaseComponent } from '@acorex/components/dropdown';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n input,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-datetime-box',\n templateUrl: './datetime-box.component.html',\n inputs: [\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'placeholder',\n 'minValue',\n 'maxValue',\n 'value',\n 'state',\n 'name',\n 'depth',\n 'id',\n 'type',\n 'look',\n ],\n outputs: [\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'onBlur',\n 'onFocus',\n 'onOpened',\n 'onClosed',\n 'readonlyChange',\n 'disabledChange',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDateTimeBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXDateTimeBoxComponent },\n { provide: AXValuableComponent, useExisting: AXDateTimeBoxComponent },\n { provide: AXClearableComponent, useExisting: AXDateTimeBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXDateTimeBoxComponent),\n multi: true,\n },\n ],\n host: { ngSkipHydration: 'true' },\n})\nexport class AXDateTimeBoxComponent extends classes(\n MXInputBaseValueComponent<Date>,\n MXCalendarBaseComponent,\n MXDropdownBoxBaseComponent,\n MXLookComponent,\n) {\n @ViewChild(AXDateTimeInputComponent)\n protected input: AXDateTimeInputComponent;\n\n @ViewChild(AXDateTimePickerComponent)\n protected picker: AXDateTimePickerComponent;\n\n @ViewChild(AXDropdownBoxComponent)\n protected dropdown: AXDropdownBoxComponent;\n\n @Output()\n formatChange = new EventEmitter<string>();\n\n allowTyping = input<boolean>(false);\n\n private _format = this.calendarService.calendar.formats.dateTimeInput;\n @Input()\n public get format(): string {\n return this._format;\n }\n public set format(v: string) {\n this.setOption({\n name: 'format',\n value: v,\n });\n }\n\n protected _handleInputModelChange(value: Date | null) {\n this.commitValue(value, true);\n }\n\n protected _handlePickerModelChange(value: Date | null) {\n if (this.isOpen) this.commitValue(value, true);\n }\n\n protected _handleOnOpenedEvent(e: AXEvent) {\n //this.emitOnFocusEvent(null);\n this.picker?.refresh();\n this.emitOnOpenedEvent();\n }\n\n protected _handleOnClosedEvent(e: AXEvent) {\n //this.emitOnBlurEvent(null);\n this.input.focus();\n this.emitOnClosedEvent();\n }\n\n protected _handleInputOnFocusEvent(e: AXFocusEvent) {\n this.emitOnFocusEvent(e.nativeEvent);\n }\n\n protected _handleInputOnBlurEvent(e: AXFocusEvent) {\n this.emitOnBlurEvent(e.nativeEvent);\n }\n\n protected _handleCalendarOnNavigate(e: AXCalendarNavigateEvent) {\n this.onNavigate.emit(e);\n }\n\n override internalValueChanged(): void {\n this.close();\n }\n\n protected _handleInputOnClick() {\n if (!this.allowTyping()) {\n this.open();\n } else {\n this.close();\n }\n }\n}\n","<ax-dropdown-box [disabled]=\"disabled\" (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\" [look]=\"look\">\n <ng-container input>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <ax-datetime-input id=\"{{ id }}-input\" [ngModel]=\"value\" [allowTyping]=\"allowTyping()\"\n (ngModelChange)=\"_handleInputModelChange($event)\" [placeholder]=\"placeholder\" [format]=\"format\"\n [disabled]=\"disabled\" [readonly]=\"readonly\" [type]=\"type\" (onFocus)=\"_handleInputOnFocusEvent($event)\"\n (onBlur)=\"_handleInputOnBlurEvent($event)\" (onClick)=\"_handleInputOnClick()\"></ax-datetime-input>\n @if(value && !disabled && !readonly){\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <button type=\"button\" class=\"ax-general-button ax-button-icon\" [tabIndex]=\"-1\" [disabled]=\"disabled\"\n (click)=\"toggle()\">\n <span class=\"ax-icon ax-icon-calendar\"></span>\n </button>\n <ng-content select=\"ax-suffix\"> </ng-content>\n </ng-container>\n <ng-container panel>\n <ax-datetime-picker [depth]=\"depth\" id=\"{{ id }}-picker\" #picker [ngModel]=\"value\"\n (ngModelChange)=\"_handlePickerModelChange($event)\" [disabled]=\"disabled\" [readonly]=\"readonly\"\n [minValue]=\"minValue\" [maxValue]=\"maxValue\" [format]=\"format\" [disabledDates]=\"disabledDates\"\n [holidayDates]=\"holidayDates\" [depth]=\"depth\" [type]=\"type\"\n (onNavigate)=\"_handleCalendarOnNavigate($event)\"></ax-datetime-picker>\n </ng-container>\n</ax-dropdown-box>\n<ng-content select=\"ax-validation-rule\"> </ng-content>","import { AXCalendarModule } from '@acorex/components/calendar';\nimport { AXDateTimeInputModule } from '@acorex/components/datetime-input';\nimport { AXDateTimePickerModule } from '@acorex/components/datetime-picker';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXDateTimeBoxComponent } from './datetime-box.component';\n\nconst COMPONENT = [AXDateTimeBoxComponent];\nconst MODULES = [CommonModule, FormsModule, AXDateTimeInputModule, AXDropdownModule, AXCalendarModule, AXDateTimePickerModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDateTimeBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA4BA;;;;AAIG;AA6CU,MAAA,sBAAuB,SAAQ,OAAO,EACjD,yBAA+B,GAC/B,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,CAChB,CAAA;AAjDD,IAAA,WAAA,GAAA;;AA4DE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;AAE1C,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;QAE5B,IAAO,CAAA,OAAA,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC;AAuDvE,KAAA;AAtDC,IAAA,IACW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IACD,IAAW,MAAM,CAAC,CAAS,EAAA;QACzB,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAA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AAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAJjB,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-datetime-box.mjs","sources":["../../../../libs/components/datetime-box/src/lib/datetime-box.component.ts","../../../../libs/components/datetime-box/src/lib/datetime-box.component.html","../../../../libs/components/datetime-box/src/lib/datetime-box.module.ts","../../../../libs/components/datetime-box/src/acorex-components-datetime-box.ts"],"sourcesContent":["import { AXCalendarNavigateEvent, MXCalendarBaseComponent } from '@acorex/components/calendar';\nimport {\n AXClearableComponent,\n AXComponent,\n AXEvent,\n AXFocusEvent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport { AXDateTimeInputComponent } from '@acorex/components/datetime-input';\nimport { AXDateTimePickerComponent } from '@acorex/components/datetime-picker';\nimport { AXDropdownBoxComponent, MXDropdownBoxBaseComponent } from '@acorex/components/dropdown';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n input,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-datetime-box',\n templateUrl: './datetime-box.component.html',\n inputs: [\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'placeholder',\n 'minValue',\n 'maxValue',\n 'value',\n 'state',\n 'name',\n 'depth',\n 'id',\n 'type',\n 'look',\n 'holidayDates',\n ],\n outputs: [\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'onBlur',\n 'onFocus',\n 'onOpened',\n 'onClosed',\n 'readonlyChange',\n 'disabledChange',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDateTimeBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXDateTimeBoxComponent },\n { provide: AXValuableComponent, useExisting: AXDateTimeBoxComponent },\n { provide: AXClearableComponent, useExisting: AXDateTimeBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXDateTimeBoxComponent),\n multi: true,\n },\n ],\n host: { ngSkipHydration: 'true' },\n})\nexport class AXDateTimeBoxComponent extends classes(\n MXInputBaseValueComponent<Date>,\n MXCalendarBaseComponent,\n MXDropdownBoxBaseComponent,\n MXLookComponent,\n) {\n @ViewChild(AXDateTimeInputComponent)\n protected input: AXDateTimeInputComponent;\n\n @ViewChild(AXDateTimePickerComponent)\n protected picker: AXDateTimePickerComponent;\n\n @ViewChild(AXDropdownBoxComponent)\n protected dropdown: AXDropdownBoxComponent;\n\n @Output()\n formatChange = new EventEmitter<string>();\n\n allowTyping = input<boolean>(false);\n\n private _format = this.calendarService.calendar.formats.dateTimeInput;\n @Input()\n public get format(): string {\n return this._format;\n }\n public set format(v: string) {\n this.setOption({\n name: 'format',\n value: v,\n });\n }\n\n protected _handleInputModelChange(value: Date | null) {\n this.commitValue(value, true);\n }\n\n protected _handlePickerModelChange(value: Date | null) {\n if (this.isOpen) this.commitValue(value, true);\n }\n\n protected _handleOnOpenedEvent(e: AXEvent) {\n //this.emitOnFocusEvent(null);\n this.picker?.refresh();\n this.emitOnOpenedEvent();\n }\n\n protected _handleOnClosedEvent(e: AXEvent) {\n //this.emitOnBlurEvent(null);\n this.input.focus();\n this.emitOnClosedEvent();\n }\n\n protected _handleInputOnFocusEvent(e: AXFocusEvent) {\n this.emitOnFocusEvent(e.nativeEvent);\n }\n\n protected _handleInputOnBlurEvent(e: AXFocusEvent) {\n this.emitOnBlurEvent(e.nativeEvent);\n }\n\n protected _handleCalendarOnNavigate(e: AXCalendarNavigateEvent) {\n this.onNavigate.emit(e);\n }\n\n override internalValueChanged(): void {\n this.close();\n }\n\n protected _handleInputOnClick() {\n if (!this.allowTyping()) {\n this.open();\n } else {\n this.close();\n }\n }\n}\n","<ax-dropdown-box [disabled]=\"disabled\" (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\" [look]=\"look\">\n <ng-container input>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <ax-datetime-input id=\"{{ id }}-input\" [ngModel]=\"value\" [allowTyping]=\"allowTyping()\"\n (ngModelChange)=\"_handleInputModelChange($event)\" [placeholder]=\"placeholder\" [format]=\"format\"\n [disabled]=\"disabled\" [readonly]=\"readonly\" [type]=\"type\" (onFocus)=\"_handleInputOnFocusEvent($event)\"\n (onBlur)=\"_handleInputOnBlurEvent($event)\" (onClick)=\"_handleInputOnClick()\"></ax-datetime-input>\n @if(value && !disabled && !readonly){\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <button type=\"button\" class=\"ax-general-button ax-button-icon\" [tabIndex]=\"-1\" [disabled]=\"disabled\"\n (click)=\"toggle()\">\n <span class=\"ax-icon ax-icon-calendar\"></span>\n </button>\n <ng-content select=\"ax-suffix\"> </ng-content>\n </ng-container>\n <ng-container panel>\n <ax-datetime-picker [depth]=\"depth\" id=\"{{ id }}-picker\" #picker [ngModel]=\"value\"\n (ngModelChange)=\"_handlePickerModelChange($event)\" [disabled]=\"disabled\" [readonly]=\"readonly\"\n [minValue]=\"minValue\" [maxValue]=\"maxValue\" [format]=\"format\" [disabledDates]=\"disabledDates\"\n [holidayDates]=\"holidayDates\" [depth]=\"depth\" [type]=\"type\"\n (onNavigate)=\"_handleCalendarOnNavigate($event)\"></ax-datetime-picker>\n </ng-container>\n</ax-dropdown-box>\n<ng-content select=\"ax-validation-rule\"> </ng-content>","import { AXCalendarModule } from '@acorex/components/calendar';\nimport { AXDateTimeInputModule } from '@acorex/components/datetime-input';\nimport { AXDateTimePickerModule } from '@acorex/components/datetime-picker';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXDateTimeBoxComponent } from './datetime-box.component';\n\nconst COMPONENT = [AXDateTimeBoxComponent];\nconst MODULES = [CommonModule, FormsModule, AXDateTimeInputModule, AXDropdownModule, AXCalendarModule, AXDateTimePickerModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDateTimeBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA4BA;;;;AAIG;AA8CU,MAAA,sBAAuB,SAAQ,OAAO,EACjD,yBAA+B,GAC/B,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,CAChB,CAAA;AAlDD,IAAA,WAAA,GAAA;;AA6DE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;AAE1C,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;QAE5B,IAAO,CAAA,OAAA,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC;AAuDvE,KAAA;AAtDC,IAAA,IACW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IACD,IAAW,MAAM,CAAC,CAAS,EAAA;QACzB,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,CAAC,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IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAJjB,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
@@ -129,6 +129,7 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
129
129
  _emitOnComplete() {
130
130
  // TODO: Check Value delay
131
131
  setTimeout(() => {
132
+ this.commitValue(this.inputValues.join(''), true);
132
133
  this.onCompleted.emit({
133
134
  component: AXOtpComponent,
134
135
  value: this.inputValues.join(''),
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../libs/components/otp/src/lib/otp.class.ts","../../../../libs/components/otp/src/lib/otp.component.ts","../../../../libs/components/otp/src/lib/otp.component.html","../../../../libs/components/otp/src/lib/otp.module.ts","../../../../libs/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/components/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n isCompleted: boolean;\n}\n","import { MXLookComponent, MXValueComponent } from '@acorex/components/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation, forwardRef, model, output } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.scss'],\n inputs: ['state', 'disabled', 'readonly', 'look'],\n outputs: ['stateChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXOtpComponent),\n multi: true,\n },\n ],\n})\nexport class AXOtpComponent extends classes(MXValueComponent<string>, MXLookComponent) implements OnInit, AfterViewInit {\n length = model<number>();\n onCompleted = output<AXOtpCompletedEvent>();\n\n inputValues: number[] = [];\n inputs: number[] = [];\n\n override ngOnInit(): void {\n super.ngOnInit();\n this._render();\n }\n\n ngAfterViewInit(): void {\n this.calcFontSize();\n this.mapValueToInputs();\n }\n\n mapValueToInputs() {\n this._emitOnComplete();\n if (!this.value) return;\n this.value.split('').map((v, i) => {\n this.inputValues[i] = +v;\n });\n }\n\n override reset() {\n this.inputValues = [];\n }\n\n private _render() {\n this.inputs = Array(this.length())\n .fill(1)\n .map((x, i) => i);\n }\n\n protected _handleOnInput(event: any, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n this.inputValues[i] = event.target.value;\n // if (this._numbers.filter((c) => c).length === this.length) {\n // this.setState('success');\n // } else {\n // this.setState('error');\n // }\n this._emitOnComplete();\n }\n\n override internalSetValue(value: any): string {\n if (value) {\n this.inputValues = value?.toString().split('') as any;\n }\n return value;\n }\n\n protected calcFontSize() {\n const size = this.getHostElement().querySelector<HTMLInputElement>('.ax-input')?.clientWidth;\n const fontSize = Math.min(size, size) * 0.5;\n this.getHostElement().style.setProperty('--font-size', fontSize + 'px');\n }\n\n protected _handleOnKeyDown(event: KeyboardEvent, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n switch (event.key) {\n case 'Backspace':\n inputs[i].value = '';\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n event.preventDefault();\n }\n this.inputValues[i] = null;\n break;\n case 'ArrowRight':\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n break;\n\n case 'ArrowLeft':\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n }\n break;\n case 'Home':\n inputs[0].focus();\n break;\n case 'End':\n inputs[this.length() - 1].select();\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n\n protected _handleOnPaste(event: ClipboardEvent) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const data = event.clipboardData.getData('text');\n const isNumber = /\\d+/;\n\n if (isNumber.test(data)) {\n inputs[inputs.length - 1].focus();\n this.inputValues = [];\n for (let i = 0; i < inputs.length; i++) {\n this.inputValues[i] = +data[i];\n }\n }\n\n event.preventDefault();\n }\n\n protected _handleOnClick(i) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[i].select();\n }\n\n protected _emitOnComplete() {\n // TODO: Check Value delay\n setTimeout(() => {\n this.onCompleted.emit({\n component: AXOtpComponent,\n value: this.inputValues.join(''),\n isCompleted: this.inputValues.filter((c) => c).length === this.length(),\n });\n });\n }\n}\n","<div\n dir=\"ltr\"\n class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\"\n>\n @for (input of inputs; let i = $index; track i) {\n <input\n class=\"ax-input\"\n type=\"number\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\"\n [class.ax-state-error]=\"state === 'error'\"\n maxlength=\"1\"\n [ngModel]=\"inputValues[i]\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (click)=\"_handleOnClick(i)\"\n (input)=\"_handleOnInput($event, i)\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n [attr.disabled]=\"disabled\"\n />\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXOtpComponent } from './otp.component';\n\nconst COMPONENT = [AXOtpComponent];\nconst MODULES = [CommonModule, FormsModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAG/C;;ACiBK,MAAO,cAAe,SAAQ,OAAO,EAAC,gBAAwB,GAAE,eAAe,CAAC,CAAA;AAhBtF,IAAA,WAAA,GAAA;;QAiBE,IAAM,CAAA,MAAA,GAAG,KAAK,EAAU,CAAC;QACzB,IAAW,CAAA,WAAA,GAAG,MAAM,EAAuB,CAAC;QAE5C,IAAW,CAAA,WAAA,GAAa,EAAE,CAAC;QAC3B,IAAM,CAAA,MAAA,GAAa,EAAE,CAAC;AAqIvB,KAAA;IAnIU,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,EAAE,CAAC;KAChB;IAED,eAAe,GAAA;QACb,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,gBAAgB,GAAA;QACd,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO;AACxB,QAAA,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;YAChC,IAAI,CAAC,WAAW,CAAC,CAAC,C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UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,iBATL,cAAc,CAAA,EAAA,OAAA,EAAA,CAChB,YAAY,EAAE,WAAW,aADvB,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;AASpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAJT,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../libs/components/otp/src/lib/otp.class.ts","../../../../libs/components/otp/src/lib/otp.component.ts","../../../../libs/components/otp/src/lib/otp.component.html","../../../../libs/components/otp/src/lib/otp.module.ts","../../../../libs/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/components/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n isCompleted: boolean;\n}\n","import { MXLookComponent, MXValueComponent } from '@acorex/components/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation, forwardRef, model, output } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.scss'],\n inputs: ['state', 'disabled', 'readonly', 'look'],\n outputs: ['stateChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXOtpComponent),\n multi: true,\n },\n ],\n})\nexport class AXOtpComponent extends classes(MXValueComponent<string>, MXLookComponent) implements OnInit, AfterViewInit {\n length = model<number>();\n onCompleted = output<AXOtpCompletedEvent>();\n\n inputValues: number[] = [];\n inputs: number[] = [];\n\n override ngOnInit(): void {\n super.ngOnInit();\n this._render();\n }\n\n ngAfterViewInit(): void {\n this.calcFontSize();\n this.mapValueToInputs();\n }\n\n mapValueToInputs() {\n this._emitOnComplete();\n if (!this.value) return;\n this.value.split('').map((v, i) => {\n this.inputValues[i] = +v;\n });\n }\n\n override reset() {\n this.inputValues = [];\n }\n\n private _render() {\n this.inputs = Array(this.length())\n .fill(1)\n .map((x, i) => i);\n }\n\n protected _handleOnInput(event: any, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n this.inputValues[i] = event.target.value;\n // if (this._numbers.filter((c) => c).length === this.length) {\n // this.setState('success');\n // } else {\n // this.setState('error');\n // }\n this._emitOnComplete();\n }\n\n override internalSetValue(value: any): string {\n if (value) {\n this.inputValues = value?.toString().split('') as any;\n }\n return value;\n }\n\n protected calcFontSize() {\n const size = this.getHostElement().querySelector<HTMLInputElement>('.ax-input')?.clientWidth;\n const fontSize = Math.min(size, size) * 0.5;\n this.getHostElement().style.setProperty('--font-size', fontSize + 'px');\n }\n\n protected _handleOnKeyDown(event: KeyboardEvent, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n switch (event.key) {\n case 'Backspace':\n inputs[i].value = '';\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n event.preventDefault();\n }\n this.inputValues[i] = null;\n break;\n case 'ArrowRight':\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n break;\n\n case 'ArrowLeft':\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n }\n break;\n case 'Home':\n inputs[0].focus();\n break;\n case 'End':\n inputs[this.length() - 1].select();\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n\n protected _handleOnPaste(event: ClipboardEvent) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const data = event.clipboardData.getData('text');\n const isNumber = /\\d+/;\n\n if (isNumber.test(data)) {\n inputs[inputs.length - 1].focus();\n this.inputValues = [];\n for (let i = 0; i < inputs.length; i++) {\n this.inputValues[i] = +data[i];\n }\n }\n\n event.preventDefault();\n }\n\n protected _handleOnClick(i) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[i].select();\n }\n\n protected _emitOnComplete() {\n // TODO: Check Value delay\n setTimeout(() => {\n this.commitValue(this.inputValues.join(''), true);\n this.onCompleted.emit({\n component: AXOtpComponent,\n value: this.inputValues.join(''),\n isCompleted: this.inputValues.filter((c) => c).length === this.length(),\n });\n });\n }\n}\n","<div\n dir=\"ltr\"\n class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\"\n>\n @for (input of inputs; let i = $index; track i) {\n <input\n class=\"ax-input\"\n type=\"number\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\"\n [class.ax-state-error]=\"state === 'error'\"\n maxlength=\"1\"\n [ngModel]=\"inputValues[i]\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (click)=\"_handleOnClick(i)\"\n (input)=\"_handleOnInput($event, i)\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n [attr.disabled]=\"disabled\"\n />\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXOtpComponent } from './otp.component';\n\nconst COMPONENT = [AXOtpComponent];\nconst MODULES = [CommonModule, FormsModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAG/C;;ACiBK,MAAO,cAAe,SAAQ,OAAO,EAAC,gBAAwB,GAAE,eAAe,CAAC,CAAA;AAhBtF,IAAA,WAAA,GAAA;;QAiBE,IAAM,CAAA,MAAA,GAAG,KAAK,EAAU,CAAC;QACzB,IAAW,CAAA,WAAA,GAAG,MAAM,EAAuB,CAAC;QAE5C,IAAW,CAAA,WAAA,GAAa,EAAE,CAAC;QAC3B,IAAM,CAAA,MAAA,GAAa,EAAE,CAAC;AAsIvB,KAAA;IApIU,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,EAAE,CAAC;KAChB;IAED,eAAe,GAAA;QACb,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,gBAAgB,GAAA;QACd,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO;AACxB,QAAA,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;YAChC,IAAI,CAAC,WAAW,CAAC,CA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