@acorex/components 18.4.0 → 18.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-datetime-input.mjs","sources":["../../../../libs/components/datetime-input/src/lib/datetime-input.component.ts","../../../../libs/components/datetime-input/src/lib/datetime-input.component.html","../../../../libs/components/datetime-input/src/lib/datetime-input.module.ts","../../../../libs/components/datetime-input/src/acorex-components-datetime-input.ts"],"sourcesContent":["import {\n AXClearableComponent,\n AXClickEvent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n} from '@acorex/components/common';\nimport { AXCalendarService, AXDateTime, AXDateTimePart, AXDateTimeParts, TimeUnit } from '@acorex/core/date-time';\nimport { AXStringUtil } from '@acorex/core/utils';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n inject,\n input,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'ax-datetime-input',\n templateUrl: './datetime-input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id'],\n host: { class: 'ax-editor-input' },\n outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus', 'onClick', 'readonlyChange', 'disabledChange'],\n providers: [\n { provide: AXComponent, useExisting: AXDateTimeInputComponent },\n { provide: AXFocusableComponent, useExisting: AXDateTimeInputComponent },\n { provide: AXValuableComponent, useExisting: AXDateTimeInputComponent },\n { provide: AXClearableComponent, useExisting: AXDateTimeInputComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXDateTimeInputComponent),\n multi: true,\n },\n ],\n})\nexport class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {\n private calendarService: AXCalendarService = inject(AXCalendarService);\n\n private _editingParts: AXDateTimeParts = {\n year: {\n key: 'year',\n placeholder: 'yyyy',\n placeholders: ['YY', 'yy', 'YYYY', 'yyyy'],\n enabled: false,\n default: 2023,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.year.placeholder),\n },\n month: {\n key: 'month',\n placeholder: 'MM',\n placeholders: ['MMM', 'MMMM', 'MM', 'M'],\n enabled: false,\n default: 1,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.month.placeholder),\n },\n day: {\n key: 'day',\n placeholder: 'dd',\n placeholders: ['dd', 'd', 'DDDD', 'DDD'],\n enabled: false,\n default: 1,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.day.placeholder),\n },\n hour: {\n key: 'hour',\n placeholder: 'HH',\n placeholders: ['HH', 'H', 'hh', 'h'],\n enabled: false,\n default: 0,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.hour.placeholder),\n },\n minute: {\n key: 'minute',\n placeholder: 'mm',\n placeholders: ['mm', 'm'],\n enabled: false,\n default: 0,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.minute.placeholder),\n },\n second: {\n key: 'second',\n placeholder: 'ss',\n placeholders: ['ss', 's'],\n enabled: false,\n default: 0,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.second.placeholder),\n },\n };\n\n protected _editingText: string;\n protected _inputChars: string[] = [];\n\n private _type: string = this.calendarService.calendar.name();\n\n allowTyping = input<boolean>(false);\n\n @Input()\n public get type(): string {\n return this._type || this.calendarService.calendar.name();\n }\n public set type(v: string) {\n this.setOption({\n name: 'type',\n value: v,\n afterCallback: () => {\n this.cdr.markForCheck();\n },\n });\n }\n\n private _activePart = 'hour';\n public get activePart(): string {\n return this._activePart;\n }\n public set activePart(v: string) {\n this._activePart = v;\n this._clearInputBuffer();\n }\n\n private _editingDateObj: AXDateTime = this.calendarService.now(this.type);\n private get editingDateObj(): AXDateTime {\n return this._editingDateObj;\n }\n\n @ViewChild('input')\n input: ElementRef<HTMLInputElement>;\n\n private _minValue: Date;\n @Input()\n public get minValue(): Date {\n return this._minValue;\n }\n public set minValue(v: Date) {\n this._minValue = v;\n }\n\n private _maxValue: Date;\n @Input()\n public get maxValue(): Date {\n return this._maxValue;\n }\n public set maxValue(v: Date) {\n this._maxValue = v;\n }\n\n @Output()\n formatChange = new EventEmitter<string>();\n\n @Output()\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\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 afterCallback: (o, n) => {\n Object.values(this._editingParts).forEach((e) => {\n e.enabled = false;\n });\n const formatParts = n.split(/[^a-zA-Z]+/);\n formatParts.forEach((f) => {\n const found = Object.values(this._editingParts).find((c) => c.placeholders.some((d) => d == f));\n if (found) {\n found.enabled = true;\n found.placeholder = f;\n }\n });\n },\n });\n }\n\n private _getOrderedParts(): AXDateTimePart[] {\n // TODO: better spliter format\n const formatParts = this.format.split(/[^a-zA-Z]+/);\n const result: AXDateTimePart[] = [];\n formatParts.forEach((f) => {\n const found = Object.values(this._editingParts).find((c) => c.placeholders.some((d) => d == f));\n if (found && found.enabled) result.push(found);\n });\n return result;\n }\n\n private _clearInputBuffer() {\n this._inputChars = [];\n }\n\n private _updateText() {\n let text = this.format;\n //\n Object.values(this._editingParts).forEach((part) => {\n if (this.activePart == part.key) {\n if (part.typedValue) text = text.replace(part.placeholder, part.typedValue);\n } else {\n if (part.typedValue != part.placeholder && part.typedValue != null) {\n text = text.replace(part.placeholder, part.realValue());\n }\n }\n });\n this._editingText = text == this.format ? '' : text;\n if (this.activePart) {\n this._highlightActivePart();\n }\n }\n\n override internalSetValue(value?: Date) {\n if (value) {\n let editingDate = this.calendarService.create(value, this.type);\n let applyChanges = false;\n Object.values(this._editingParts).forEach((part) => {\n if (!part.enabled) {\n editingDate = editingDate.set(part.key as TimeUnit, part.default);\n applyChanges = true;\n }\n });\n if (applyChanges) {\n return editingDate.date;\n }\n }\n return value;\n }\n\n override internalValueChanged(value?: Date): void {\n if (value) {\n this._editingDateObj = this.calendarService.create(value, this.type);\n }\n Object.values(this._editingParts).forEach((part) => {\n if (value) {\n if (part.typedValue != part.placeholder) part.typedValue = part.realValue();\n } else part.typedValue = null;\n });\n this._updateText();\n }\n\n @HostListener('keydown', ['$event'])\n _handleOnKeydownEvent(e: KeyboardEvent) {\n const ignore = () => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n if (!this.allowTyping()) {\n ignore();\n return;\n }\n\n const input = e.target as HTMLInputElement;\n //\n const orderedParts = this._getOrderedParts();\n const part = this.activePart ? this._editingParts[this.activePart] : orderedParts[0];\n const nextPart = part ? orderedParts[orderedParts.indexOf(part) + 1] : null;\n const prevPart = part ? orderedParts[orderedParts.indexOf(part) - 1] : null;\n //\n const goNext = () => {\n this._clearInputBuffer();\n if (nextPart) {\n this.activePart = nextPart.key;\n this._highlightActivePart();\n }\n };\n const goPrev = () => {\n this._clearInputBuffer();\n if (prevPart) {\n this.activePart = prevPart.key;\n this._highlightActivePart();\n }\n };\n /*************** Handle Left and Right **************/\n if (e.code === 'ArrowRight' || e.code === 'ArrowLeft') {\n ignore();\n e.code === 'ArrowRight' ? goNext() : goPrev();\n } else if ((e.code === 'ArrowUp' || e.code === 'ArrowDown') && !e.ctrlKey) {\n /*************** Handle Up and Down **************/\n if (this.disabled || this.readonly) {\n ignore();\n return;\n } else {\n ignore();\n const sign = e.code === 'ArrowUp' ? +1 : -1;\n this.activePart = part.key;\n let newVal: AXDateTime = this.editingDateObj.add(part.key, sign);\n this._editingParts[part.key].typedValue = newVal.format(this._editingParts[part.key].placeholder);\n this._editingDateObj = newVal;\n this._detectValueChanges();\n }\n } else if (e.code == 'Backspace' || e.code == 'Delete') {\n /*************** Handle Backspace **************/\n if (this.disabled || this.readonly) {\n return;\n }\n if (input.value) {\n ignore();\n this._editingParts[part.key].typedValue = this._editingParts[part.key].placeholder;\n this._detectValueChanges();\n goPrev();\n }\n } else if (e.code == 'Tab' || e.code == 'Space') {\n /*************** Handle Backspace **************/\n if (input.value) {\n if (!e.shiftKey && nextPart) {\n ignore();\n goNext();\n } else if (e.shiftKey && prevPart) {\n ignore();\n goPrev();\n }\n }\n // TODO: FiX type in input\n } else if (e.key?.trim() && !isNaN(Number(e.key))) {\n ignore();\n return;\n if (this.disabled || this.readonly) {\n return;\n }\n let next = false;\n const editing = this._editingParts[part.key];\n //\n switch (part.key) {\n case 'year': {\n if (editing.placeholder.length == 2 && this._inputChars.length == 0) {\n this._inputChars.push(...this.calendarService.now(this.type).format('yyyy').substring(0, 2).split(''));\n }\n if (this._inputChars.length < 4) {\n editing.typedValue = `${this._inputChars.join('')}${e.key}`;\n this._inputChars.push(e.key);\n if (this._inputChars.length > 3) {\n next = true;\n }\n } else {\n next = true;\n }\n editing.typedValue = ('0000' + editing.typedValue).slice(-4);\n const nv = parseInt(editing.typedValue);\n //if (nv > 0) {\n const newVal = this.editingDateObj.set('year', nv);\n this._editingDateObj = newVal;\n this._detectValueChanges();\n //}\n break;\n }\n case 'month': {\n if (this._inputChars.length == 0) {\n this._inputChars.push(e.key);\n editing.typedValue = `0${e.key}`;\n if (parseInt(e.key) > 1) {\n this._clearInputBuffer();\n next = true;\n }\n } else if (this._inputChars.length == 1) {\n const newStr = parseInt(`${this._inputChars[0]}${e.key}`);\n if (newStr > 12) {\n editing.typedValue = `0${e.key}`;\n } else {\n editing.typedValue = newStr.toString();\n }\n this._clearInputBuffer();\n next = true;\n }\n editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;\n const nv = parseInt(editing.typedValue);\n if (nv > 0) {\n const newVal = this.editingDateObj.set(part.key, nv);\n this._editingDateObj = newVal;\n this._detectValueChanges();\n }\n break;\n }\n case 'day': {\n if (this._inputChars.length == 0) {\n this._inputChars.push(e.key);\n editing.typedValue = `0${e.key}`;\n if (parseInt(e.key) > 3) {\n this._clearInputBuffer();\n next = true;\n }\n } else if (this._inputChars.length == 1) {\n const newStr = parseInt(`${this._inputChars[0]}${e.key}`);\n if (newStr > this._editingDateObj.month.totalDays) {\n editing.typedValue = `0${e.key}`;\n } else {\n editing.typedValue = newStr.toString();\n }\n this._clearInputBuffer();\n next = true;\n }\n editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;\n const nv = parseInt(editing.typedValue);\n if (nv > 0) {\n const newVal = this.editingDateObj.set(part.key, nv);\n this._editingDateObj = newVal;\n this._detectValueChanges();\n }\n break;\n }\n case 'hour': {\n if (this._inputChars.length == 0) {\n this._inputChars.push(e.key);\n editing.typedValue = `0${e.key}`;\n if (parseInt(e.key) > 2) {\n next = true;\n }\n } else if (this._inputChars.length == 1) {\n const newStr = parseInt(`${this._inputChars[0]}${e.key}`);\n if (newStr > 23) {\n editing.typedValue = `0${e.key}`;\n } else {\n editing.typedValue = newStr.toString();\n }\n next = true;\n }\n editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;\n const newVal = this.editingDateObj.set('hour', parseInt(editing.typedValue));\n this._editingDateObj = newVal;\n this._detectValueChanges();\n break;\n }\n case 'minute':\n case 'second':\n if (this._inputChars.length == 0) {\n this._inputChars.push(e.key);\n editing.typedValue = `0${e.key}`;\n if (parseInt(e.key) > 5) {\n this._clearInputBuffer();\n next = true;\n }\n } else if (this._inputChars.length == 1) {\n const newStr = parseInt(`${this._inputChars[0]}${e.key}`);\n if (newStr > 59) {\n editing.typedValue = `0${e.key}`;\n } else {\n editing.typedValue = newStr.toString();\n }\n this._clearInputBuffer();\n next = true;\n }\n editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;\n const newVal = this.editingDateObj.set(part.key, parseInt(editing.typedValue));\n this._editingDateObj = newVal;\n this._detectValueChanges();\n break;\n default:\n }\n if (next) {\n goNext();\n return;\n }\n }\n /*************** Emit Event **************/\n super.emitOnKeydownEvent(e);\n }\n\n @HostListener('keyup', ['$event'])\n _handleKeyUpEvent(e: KeyboardEvent) {\n if (this.activePart) {\n this._highlightActivePart();\n }\n }\n\n protected _handleFocusEvent(e: FocusEvent) {\n //this._highlightActivePart();\n super.emitOnFocusEvent(e);\n }\n\n protected _handleBlurEvent(e: FocusEvent) {\n super.emitOnBlurEvent(e);\n }\n\n protected _handleOnInputClickEvent(e: MouseEvent): void {\n if (this.allowTyping()) {\n setTimeout(() => {\n this._detectPartAtPosition();\n }, 0);\n }\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n\n private _detectPartAtPosition(): void {\n const input = this.input.nativeElement;\n if (!input.value) return;\n const sStart = input.selectionEnd || 0;\n const re = /[a-zA-Z0-9]+/gi;\n const valueParts = Array.from(input.value.matchAll(re));\n const orderedParts = this._getOrderedParts();\n const index = valueParts.findIndex((c: any) => c.index <= sStart && c.index + c[0].length >= sStart);\n this.activePart = orderedParts[index].key;\n this._highlightActivePart();\n }\n\n private _highlightActivePart(): void {\n const input = this.input?.nativeElement;\n if (!input || !input.value || !this.activePart) return;\n const orderedParts = this._getOrderedParts();\n const index = orderedParts.findIndex((c) => c.key == this.activePart);\n const re = /[a-zA-Z0-9]+/gi;\n const valueParts = Array.from(input.value.matchAll(re));\n const { start, end } = AXStringUtil.getWordBoundsAtPosition(input.value, valueParts[index]?.index);\n input.setSelectionRange(start, end);\n }\n\n private _detectValueChanges() {\n this.commitValue(this._editingDateObj.date, true);\n }\n}\n","<input #input id=\"input\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ax-input\"\n type=\"text\" [attr.placeholder]=\"placeholder\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-select-none]=\"!allowTyping()\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"true\"\n [ngModel]=\"_editingText\" (mouseup)=\"_handleOnInputClickEvent($event)\" (blur)=\"_handleBlurEvent($event)\"\n (focus)=\"_handleFocusEvent($event)\">\n<ng-content select=\"ax-validation-rule\">\n</ng-content>","import { AXDateTimeModule } from '@acorex/core/date-time';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXDateTimeInputComponent } from './datetime-input.component';\n\nconst COMPONENT = [AXDateTimeInputComponent];\nconst MODULES = [CommonModule, FormsModule, AXDateTimeModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDateTimeInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA8CM,MAAO,wBAAyB,SAAQ,yBAA+B,CAAA;AApB7E,IAAA,WAAA,GAAA;;AAqBU,QAAA,IAAA,CAAA,eAAe,GAAsB,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAE/D,QAAA,IAAA,CAAA,aAAa,GAAoB;AACvC,YAAA,IAAI,EAAE;AACJ,gBAAA,GAAG,EAAE,MAAM;AACX,gBAAA,WAAW,EAAE,MAAM;gBACnB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;AAC1C,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,SAAS,EAAE,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;AACjF,aAAA;AACD,YAAA,KAAK,EAAE;AACL,gBAAA,GAAG,EAAE,OAAO;AACZ,gBAAA,WAAW,EAAE,IAAI;gBACjB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC;AACxC,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,CAAC;AACV,gBAAA,UAAU,EAAE,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wB,CAC1B,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,gBAAgB,CAAA,EAAA,OAAA,EAAA,CADzC,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;AAS9B,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,qBAAqB,YAJnB,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,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;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-datetime-input.mjs","sources":["../../../../libs/components/datetime-input/src/lib/datetime-input.component.ts","../../../../libs/components/datetime-input/src/lib/datetime-input.component.html","../../../../libs/components/datetime-input/src/lib/datetime-input.module.ts","../../../../libs/components/datetime-input/src/acorex-components-datetime-input.ts"],"sourcesContent":["import {\n AXClearableComponent,\n AXClickEvent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n} from '@acorex/components/common';\nimport { AXCalendarService, AXDateTime, AXDateTimePart, AXDateTimeParts, TimeUnit } from '@acorex/core/date-time';\nimport { AXStringUtil } from '@acorex/core/utils';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n inject,\n input,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'ax-datetime-input',\n templateUrl: './datetime-input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id'],\n host: { class: 'ax-editor-input' },\n outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus', 'onClick', 'readonlyChange', 'disabledChange'],\n providers: [\n { provide: AXComponent, useExisting: AXDateTimeInputComponent },\n { provide: AXFocusableComponent, useExisting: AXDateTimeInputComponent },\n { provide: AXValuableComponent, useExisting: AXDateTimeInputComponent },\n { provide: AXClearableComponent, useExisting: AXDateTimeInputComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXDateTimeInputComponent),\n multi: true,\n },\n ],\n})\nexport class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {\n private calendarService: AXCalendarService = inject(AXCalendarService);\n\n private _editingParts: AXDateTimeParts = {\n year: {\n key: 'year',\n placeholder: 'yyyy',\n placeholders: ['YY', 'yy', 'YYYY', 'yyyy'],\n enabled: false,\n default: 2023,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.year.placeholder),\n },\n month: {\n key: 'month',\n placeholder: 'MM',\n placeholders: ['MMM', 'MMMM', 'MM', 'M'],\n enabled: false,\n default: 1,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.month.placeholder),\n },\n day: {\n key: 'day',\n placeholder: 'dd',\n placeholders: ['dd', 'd', 'DDDD', 'DDD'],\n enabled: false,\n default: 1,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.day.placeholder),\n },\n hour: {\n key: 'hour',\n placeholder: 'HH',\n placeholders: ['HH', 'H', 'hh', 'h'],\n enabled: false,\n default: 0,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.hour.placeholder),\n },\n minute: {\n key: 'minute',\n placeholder: 'mm',\n placeholders: ['mm', 'm'],\n enabled: false,\n default: 0,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.minute.placeholder),\n },\n second: {\n key: 'second',\n placeholder: 'ss',\n placeholders: ['ss', 's'],\n enabled: false,\n default: 0,\n typedValue: null,\n realValue: () => this.editingDateObj.format(this._editingParts.second.placeholder),\n },\n };\n\n protected _editingText: string;\n protected _inputChars: string[] = [];\n\n private _type: string = this.calendarService.calendar.name();\n\n allowTyping = input<boolean>(false);\n\n @Input()\n public get type(): string {\n return this._type || this.calendarService.calendar.name();\n }\n public set type(v: string) {\n this.setOption({\n name: 'type',\n value: v,\n afterCallback: () => {\n this.cdr.markForCheck();\n },\n });\n }\n\n private _activePart = 'hour';\n public get activePart(): string {\n return this._activePart;\n }\n public set activePart(v: string) {\n this._activePart = v;\n this._clearInputBuffer();\n }\n\n private _editingDateObj: AXDateTime = this.calendarService.now(this.type);\n private get editingDateObj(): AXDateTime {\n return this._editingDateObj;\n }\n\n @ViewChild('input')\n input: ElementRef<HTMLInputElement>;\n\n private _minValue: Date;\n @Input()\n public get minValue(): Date {\n return this._minValue;\n }\n public set minValue(v: Date) {\n this._minValue = v;\n }\n\n private _maxValue: Date;\n @Input()\n public get maxValue(): Date {\n return this._maxValue;\n }\n public set maxValue(v: Date) {\n this._maxValue = v;\n }\n\n @Output()\n formatChange = new EventEmitter<string>();\n\n @Output()\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\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 afterCallback: (o, n) => {\n Object.values(this._editingParts).forEach((e) => {\n e.enabled = false;\n });\n const formatParts = n.split(/[^a-zA-Z]+/);\n formatParts.forEach((f) => {\n const found = Object.values(this._editingParts).find((c) => c.placeholders.some((d) => d == f));\n if (found) {\n found.enabled = true;\n found.placeholder = f;\n }\n });\n },\n });\n }\n\n private _getOrderedParts(): AXDateTimePart[] {\n // TODO: better spliter format\n const formatParts = this.format.split(/[^a-zA-Z]+/);\n const result: AXDateTimePart[] = [];\n formatParts.forEach((f) => {\n const found = Object.values(this._editingParts).find((c) => c.placeholders.some((d) => d == f));\n if (found && found.enabled) result.push(found);\n });\n return result;\n }\n\n private _clearInputBuffer() {\n this._inputChars = [];\n }\n\n private _updateText() {\n let text = this.format;\n //\n Object.values(this._editingParts).forEach((part) => {\n if (this.activePart == part.key) {\n if (part.typedValue) text = text.replace(part.placeholder, part.typedValue);\n } else {\n if (part.typedValue != part.placeholder && part.typedValue != null) {\n text = text.replace(part.placeholder, part.realValue());\n }\n }\n });\n this._editingText = text == this.format ? '' : text;\n if (this.activePart) {\n this._highlightActivePart();\n }\n }\n\n override internalSetValue(value?: Date) {\n if (value) {\n let editingDate = this.calendarService.create(value, this.type);\n let applyChanges = false;\n Object.values(this._editingParts).forEach((part) => {\n if (!part.enabled) {\n editingDate = editingDate.set(part.key as TimeUnit, part.default);\n applyChanges = true;\n }\n });\n if (applyChanges) {\n return editingDate.date;\n }\n }\n return value;\n }\n\n override internalValueChanged(value?: Date): void {\n if (value) {\n this._editingDateObj = this.calendarService.create(value, this.type);\n }\n Object.values(this._editingParts).forEach((part) => {\n if (value) {\n if (part.typedValue != part.placeholder) part.typedValue = part.realValue();\n } else part.typedValue = null;\n });\n this._updateText();\n }\n\n @HostListener('keydown', ['$event'])\n _handleOnKeydownEvent(e: KeyboardEvent) {\n const ignore = () => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n if (!this.allowTyping()) {\n ignore();\n return;\n }\n\n const input = e.target as HTMLInputElement;\n //\n const orderedParts = this._getOrderedParts();\n const part = this.activePart ? this._editingParts[this.activePart] : orderedParts[0];\n const nextPart = part ? orderedParts[orderedParts.indexOf(part) + 1] : null;\n const prevPart = part ? orderedParts[orderedParts.indexOf(part) - 1] : null;\n //\n const goNext = () => {\n this._clearInputBuffer();\n if (nextPart) {\n this.activePart = nextPart.key;\n this._highlightActivePart();\n }\n };\n const goPrev = () => {\n this._clearInputBuffer();\n if (prevPart) {\n this.activePart = prevPart.key;\n this._highlightActivePart();\n }\n };\n /*************** Handle Left and Right **************/\n if (e.code === 'ArrowRight' || e.code === 'ArrowLeft') {\n ignore();\n e.code === 'ArrowRight' ? goNext() : goPrev();\n } else if ((e.code === 'ArrowUp' || e.code === 'ArrowDown') && !e.ctrlKey) {\n /*************** Handle Up and Down **************/\n if (this.disabled || this.readonly) {\n ignore();\n return;\n } else {\n ignore();\n const sign = e.code === 'ArrowUp' ? +1 : -1;\n this.activePart = part.key;\n let newVal: AXDateTime = this.editingDateObj.add(part.key, sign);\n this._editingParts[part.key].typedValue = newVal.format(this._editingParts[part.key].placeholder);\n this._editingDateObj = newVal;\n this._detectValueChanges();\n }\n } else if (e.code == 'Backspace' || e.code == 'Delete') {\n /*************** Handle Backspace **************/\n if (this.disabled || this.readonly) {\n return;\n }\n if (input.value) {\n ignore();\n this._editingParts[part.key].typedValue = this._editingParts[part.key].placeholder;\n this._detectValueChanges();\n goPrev();\n }\n } else if (e.code == 'Tab' || e.code == 'Space') {\n /*************** Handle Backspace **************/\n if (input.value) {\n if (!e.shiftKey && nextPart) {\n ignore();\n goNext();\n } else if (e.shiftKey && prevPart) {\n ignore();\n goPrev();\n }\n }\n // TODO: FiX type in input\n } else if (e.key?.trim() && !isNaN(Number(e.key))) {\n ignore();\n return;\n if (this.disabled || this.readonly) {\n return;\n }\n let next = false;\n const editing = this._editingParts[part.key];\n //\n switch (part.key) {\n case 'year': {\n if (editing.placeholder.length == 2 && this._inputChars.length == 0) {\n this._inputChars.push(...this.calendarService.now(this.type).format('yyyy').substring(0, 2).split(''));\n }\n if (this._inputChars.length < 4) {\n editing.typedValue = `${this._inputChars.join('')}${e.key}`;\n this._inputChars.push(e.key);\n if (this._inputChars.length > 3) {\n next = true;\n }\n } else {\n next = true;\n }\n editing.typedValue = ('0000' + editing.typedValue).slice(-4);\n const nv = parseInt(editing.typedValue);\n //if (nv > 0) {\n const newVal = this.editingDateObj.set('year', nv);\n this._editingDateObj = newVal;\n this._detectValueChanges();\n //}\n break;\n }\n case 'month': {\n if (this._inputChars.length == 0) {\n this._inputChars.push(e.key);\n editing.typedValue = `0${e.key}`;\n if (parseInt(e.key) > 1) {\n this._clearInputBuffer();\n next = true;\n }\n } else if (this._inputChars.length == 1) {\n const newStr = parseInt(`${this._inputChars[0]}${e.key}`);\n if (newStr > 12) {\n editing.typedValue = `0${e.key}`;\n } else {\n editing.typedValue = newStr.toString();\n }\n this._clearInputBuffer();\n next = true;\n }\n editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;\n const nv = parseInt(editing.typedValue);\n if (nv > 0) {\n const newVal = this.editingDateObj.set(part.key, nv);\n this._editingDateObj = newVal;\n this._detectValueChanges();\n }\n break;\n }\n case 'day': {\n if (this._inputChars.length == 0) {\n this._inputChars.push(e.key);\n editing.typedValue = `0${e.key}`;\n if (parseInt(e.key) > 3) {\n this._clearInputBuffer();\n next = true;\n }\n } else if (this._inputChars.length == 1) {\n const newStr = parseInt(`${this._inputChars[0]}${e.key}`);\n if (newStr > this._editingDateObj.month.totalDays) {\n editing.typedValue = `0${e.key}`;\n } else {\n editing.typedValue = newStr.toString();\n }\n this._clearInputBuffer();\n next = true;\n }\n editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;\n const nv = parseInt(editing.typedValue);\n if (nv > 0) {\n const newVal = this.editingDateObj.set(part.key, nv);\n this._editingDateObj = newVal;\n this._detectValueChanges();\n }\n break;\n }\n case 'hour': {\n if (this._inputChars.length == 0) {\n this._inputChars.push(e.key);\n editing.typedValue = `0${e.key}`;\n if (parseInt(e.key) > 2) {\n next = true;\n }\n } else if (this._inputChars.length == 1) {\n const newStr = parseInt(`${this._inputChars[0]}${e.key}`);\n if (newStr > 23) {\n editing.typedValue = `0${e.key}`;\n } else {\n editing.typedValue = newStr.toString();\n }\n next = true;\n }\n editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;\n const newVal = this.editingDateObj.set('hour', parseInt(editing.typedValue));\n this._editingDateObj = newVal;\n this._detectValueChanges();\n break;\n }\n case 'minute':\n case 'second':\n if (this._inputChars.length == 0) {\n this._inputChars.push(e.key);\n editing.typedValue = `0${e.key}`;\n if (parseInt(e.key) > 5) {\n this._clearInputBuffer();\n next = true;\n }\n } else if (this._inputChars.length == 1) {\n const newStr = parseInt(`${this._inputChars[0]}${e.key}`);\n if (newStr > 59) {\n editing.typedValue = `0${e.key}`;\n } else {\n editing.typedValue = newStr.toString();\n }\n this._clearInputBuffer();\n next = true;\n }\n editing.typedValue = editing.typedValue?.length === 1 ? '0' + editing.typedValue : editing.typedValue;\n const newVal = this.editingDateObj.set(part.key, parseInt(editing.typedValue));\n this._editingDateObj = newVal;\n this._detectValueChanges();\n break;\n default:\n }\n if (next) {\n goNext();\n return;\n }\n }\n /*************** Emit Event **************/\n super.emitOnKeydownEvent(e);\n }\n\n @HostListener('keyup', ['$event'])\n _handleKeyUpEvent(e: KeyboardEvent) {\n if (this.activePart) {\n this._highlightActivePart();\n }\n }\n\n protected _handleFocusEvent(e: FocusEvent) {\n //this._highlightActivePart();\n super.emitOnFocusEvent(e);\n }\n\n protected _handleBlurEvent(e: FocusEvent) {\n super.emitOnBlurEvent(e);\n }\n\n protected _handleOnInputClickEvent(e: MouseEvent): void {\n if (this.allowTyping()) {\n setTimeout(() => {\n this._detectPartAtPosition();\n }, 0);\n }\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n\n private _detectPartAtPosition(): void {\n const input = this.input.nativeElement;\n if (!input.value) return;\n const sStart = input.selectionEnd || 0;\n const re = /[a-zA-Z0-9]+/gi;\n const valueParts = Array.from(input.value.matchAll(re));\n const orderedParts = this._getOrderedParts();\n const index = valueParts.findIndex((c: any) => c.index <= sStart && c.index + c[0].length >= sStart);\n this.activePart = orderedParts[index].key;\n this._highlightActivePart();\n }\n\n private _highlightActivePart(): void {\n const input = this.input?.nativeElement;\n if (!input || !input.value || !this.activePart) return;\n const orderedParts = this._getOrderedParts();\n const index = orderedParts.findIndex((c) => c.key == this.activePart);\n const re = /[a-zA-Z0-9]+/gi;\n const valueParts = Array.from(input.value.matchAll(re));\n const { start, end } = AXStringUtil.getWordBoundsAtPosition(input.value, valueParts[index]?.index);\n if (input && typeof input.setSelectionRange === 'function') {\n input.setSelectionRange(start, end);\n }\n }\n\n private _detectValueChanges() {\n this.commitValue(this._editingDateObj.date, true);\n }\n}\n","<input #input id=\"input\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ax-input\"\n type=\"text\" [attr.placeholder]=\"placeholder\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-select-none]=\"!allowTyping()\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"true\"\n [ngModel]=\"_editingText\" (mouseup)=\"_handleOnInputClickEvent($event)\" (blur)=\"_handleBlurEvent($event)\"\n (focus)=\"_handleFocusEvent($event)\">\n<ng-content select=\"ax-validation-rule\">\n</ng-content>","import { AXDateTimeModule } from '@acorex/core/date-time';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXDateTimeInputComponent } from './datetime-input.component';\n\nconst COMPONENT = [AXDateTimeInputComponent];\nconst MODULES = [CommonModule, FormsModule, AXDateTimeModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDateTimeInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA8CM,MAAO,wBAAyB,SAAQ,yBAA+B,CAAA;AApB7E,IAAA,WAAA,GAAA;;AAqBU,QAAA,IAAA,CAAA,eAAe,GAAsB,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAE/D,QAAA,IAAA,CAAA,aAAa,GAAoB;AACv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AA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { AXEvent, MXValueComponent, MXLookComponent } from '@acorex/components/common';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, viewChild, afterNextRender, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, Input, NgModule } from '@angular/core';
3
+ import { model, output, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
4
4
  import * as i2 from '@angular/forms';
5
5
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
6
6
  import { classes } from 'polytype';
@@ -12,52 +12,36 @@ class AXOtpCompletedEvent extends AXEvent {
12
12
 
13
13
  class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
14
14
  constructor() {
15
- super();
15
+ super(...arguments);
16
+ this.length = model();
17
+ this.onCompleted = output();
18
+ this.inputValues = [];
16
19
  this.inputs = [];
17
- this.lengthChange = new EventEmitter();
18
- this.tempInput = viewChild('a');
19
- this.onCompleted = new EventEmitter();
20
- this._numbers = [];
21
- afterNextRender(() => {
22
- this.mapValueToInputs();
23
- });
24
20
  }
25
- get length() {
26
- return this._length;
21
+ ngOnInit() {
22
+ super.ngOnInit();
23
+ this._render();
27
24
  }
28
- set length(v) {
29
- this.setOption({
30
- name: 'length',
31
- afterCallback: () => {
32
- this._render();
33
- this.calcFontSize();
34
- },
35
- value: v,
36
- });
25
+ ngAfterViewInit() {
26
+ this.calcFontSize();
27
+ this.mapValueToInputs();
37
28
  }
38
29
  mapValueToInputs() {
30
+ this._emitOnComplete();
39
31
  if (!this.value)
40
32
  return;
41
33
  this.value.split('').map((v, i) => {
42
- this._numbers[i] = +v;
34
+ this.inputValues[i] = +v;
43
35
  });
44
36
  }
45
37
  reset() {
46
- this._numbers = [];
47
- this.reset();
48
- }
49
- ngOnInit() {
50
- super.ngOnInit();
51
- this._render();
38
+ this.inputValues = [];
52
39
  }
53
40
  _render() {
54
- this.inputs = Array(this.length)
41
+ this.inputs = Array(this.length())
55
42
  .fill(1)
56
43
  .map((x, i) => i);
57
44
  }
58
- ngAfterViewInit() {
59
- this.calcFontSize();
60
- }
61
45
  _handleOnInput(event, i) {
62
46
  const inputs = this.getHostElement().querySelectorAll('.ax-input');
63
47
  const numberRegex = /^\d+$/;
@@ -73,21 +57,17 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
73
57
  if (inputs[i + 1]) {
74
58
  inputs[i + 1].select();
75
59
  }
76
- this._numbers[i] = event.target.value;
60
+ this.inputValues[i] = event.target.value;
77
61
  // if (this._numbers.filter((c) => c).length === this.length) {
78
62
  // this.setState('success');
79
63
  // } else {
80
64
  // this.setState('error');
81
65
  // }
82
- this.onCompleted.emit({
83
- component: AXOtpComponent,
84
- value: this._numbers.join(''),
85
- isCompleted: this._numbers.filter((c) => c).length === this.length,
86
- });
66
+ this._emitOnComplete();
87
67
  }
88
68
  internalSetValue(value) {
89
69
  if (value) {
90
- this._numbers = value?.toString().split('');
70
+ this.inputValues = value?.toString().split('');
91
71
  }
92
72
  return value;
93
73
  }
@@ -105,7 +85,7 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
105
85
  inputs[i - 1].select();
106
86
  event.preventDefault();
107
87
  }
108
- this._numbers[i] = null;
88
+ this.inputValues[i] = null;
109
89
  break;
110
90
  case 'ArrowRight':
111
91
  if (inputs[i + 1]) {
@@ -121,7 +101,7 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
121
101
  inputs[0].focus();
122
102
  break;
123
103
  case 'End':
124
- inputs[this.length - 1].select();
104
+ inputs[this.length() - 1].select();
125
105
  break;
126
106
  case 'ArrowUp':
127
107
  case 'ArrowDown':
@@ -135,9 +115,9 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
135
115
  const isNumber = /\d+/;
136
116
  if (isNumber.test(data)) {
137
117
  inputs[inputs.length - 1].focus();
138
- this._numbers = [];
118
+ this.inputValues = [];
139
119
  for (let i = 0; i < inputs.length; i++) {
140
- this._numbers[i] = +data[i];
120
+ this.inputValues[i] = +data[i];
141
121
  }
142
122
  }
143
123
  event.preventDefault();
@@ -146,14 +126,24 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
146
126
  const inputs = this.getHostElement().querySelectorAll('.ax-input');
147
127
  inputs[i].select();
148
128
  }
149
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXOtpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
150
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXOtpComponent, selector: "ax-otp", inputs: { state: "state", disabled: "disabled", readonly: "readonly", look: "look", length: "length" }, outputs: { stateChange: "stateChange", disabledChange: "disabledChange", lengthChange: "lengthChange", onCompleted: "onCompleted" }, providers: [
129
+ _emitOnComplete() {
130
+ // TODO: Check Value delay
131
+ setTimeout(() => {
132
+ this.onCompleted.emit({
133
+ component: AXOtpComponent,
134
+ value: this.inputValues.join(''),
135
+ isCompleted: this.inputValues.filter((c) => c).length === this.length(),
136
+ });
137
+ });
138
+ }
139
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXOtpComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
140
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXOtpComponent, selector: "ax-otp", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stateChange: "stateChange", disabledChange: "disabledChange", length: "lengthChange", onCompleted: "onCompleted" }, providers: [
151
141
  {
152
142
  provide: NG_VALUE_ACCESSOR,
153
143
  useExisting: forwardRef(() => AXOtpComponent),
154
144
  multi: true,
155
145
  },
156
- ], viewQueries: [{ propertyName: "tempInput", first: true, predicate: ["a"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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]=\"_numbers[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\n <input #a type=\"text\" class=\"ax-temp-input\" />\n</div>\n<ng-template #name></ng-template>\n", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem;position:relative}ax-otp .ax-otp-input-container.ax-editor-container{height:auto;border-style:none;outline-color:transparent;overflow:initial;background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-input-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500));border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500));border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-radius:0;border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{border-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50));color:rgba(var(--ax-color-danger-fore-tint))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{aspect-ratio:1/1;overflow:hidden;text-align:center;font-size:var(--font-size, 2rem)}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{cursor:text;opacity:.75}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{cursor:not-allowed;opacity:.5}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}ax-otp .ax-otp-input-container .ax-temp-input{opacity:0;visibility:hidden;position:absolute;top:0;left:0}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
146
+ ], usesInheritance: true, ngImport: i0, template: "<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", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem;position:relative}ax-otp .ax-otp-input-container.ax-editor-container{height:auto;border-style:none;outline-color:transparent;overflow:initial;background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-input-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500));border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500));border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-radius:0;border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{border-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50));color:rgba(var(--ax-color-danger-fore-tint))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{aspect-ratio:1/1;overflow:hidden;text-align:center;font-size:var(--font-size, 2rem)}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{cursor:text;opacity:.75}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{cursor:not-allowed;opacity:.5}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
157
147
  }
158
148
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXOtpComponent, decorators: [{
159
149
  type: Component,
@@ -163,14 +153,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
163
153
  useExisting: forwardRef(() => AXOtpComponent),
164
154
  multi: true,
165
155
  },
166
- ], template: "<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]=\"_numbers[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\n <input #a type=\"text\" class=\"ax-temp-input\" />\n</div>\n<ng-template #name></ng-template>\n", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem;position:relative}ax-otp .ax-otp-input-container.ax-editor-container{height:auto;border-style:none;outline-color:transparent;overflow:initial;background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-input-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500));border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500));border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-radius:0;border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{border-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50));color:rgba(var(--ax-color-danger-fore-tint))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{aspect-ratio:1/1;overflow:hidden;text-align:center;font-size:var(--font-size, 2rem)}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{cursor:text;opacity:.75}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{cursor:not-allowed;opacity:.5}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}ax-otp .ax-otp-input-container .ax-temp-input{opacity:0;visibility:hidden;position:absolute;top:0;left:0}\n"] }]
167
- }], ctorParameters: () => [], propDecorators: { lengthChange: [{
168
- type: Output
169
- }], length: [{
170
- type: Input
171
- }], onCompleted: [{
172
- type: Output
173
- }] } });
156
+ ], template: "<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", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem;position:relative}ax-otp .ax-otp-input-container.ax-editor-container{height:auto;border-style:none;outline-color:transparent;overflow:initial;background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-input-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500));border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500));border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-radius:0;border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{border-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50));color:rgba(var(--ax-color-danger-fore-tint))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{aspect-ratio:1/1;overflow:hidden;text-align:center;font-size:var(--font-size, 2rem)}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{cursor:text;opacity:.75}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{cursor:not-allowed;opacity:.5}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"] }]
157
+ }] });
174
158
 
175
159
  const COMPONENT = [AXOtpComponent];
176
160
  const MODULES = [CommonModule, FormsModule];
@@ -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 {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n afterNextRender,\n forwardRef,\n viewChild,\n} 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 inputs: number[] = [];\n\n @Output()\n lengthChange: EventEmitter<number> = new EventEmitter();\n\n tempInput = viewChild<ElementRef<HTMLInputElement>>('a');\n\n constructor() {\n super();\n afterNextRender(() => {\n this.mapValueToInputs();\n });\n }\n\n private _length: number;\n\n @Input()\n public get length(): number {\n return this._length;\n }\n public set length(v: number) {\n this.setOption({\n name: 'length',\n afterCallback: () => {\n this._render();\n this.calcFontSize();\n },\n value: v,\n });\n }\n\n mapValueToInputs() {\n if (!this.value) return;\n this.value.split('').map((v, i) => {\n this._numbers[i] = +v;\n });\n }\n\n override reset() {\n this._numbers = [];\n this.reset();\n }\n\n @Output() onCompleted: EventEmitter<AXOtpCompletedEvent> = new EventEmitter<AXOtpCompletedEvent>();\n\n protected _numbers: number[] = [];\n\n override ngOnInit(): void {\n super.ngOnInit();\n this._render();\n }\n\n private _render() {\n this.inputs = Array(this.length)\n .fill(1)\n .map((x, i) => i);\n }\n\n ngAfterViewInit(): void {\n this.calcFontSize();\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._numbers[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.onCompleted.emit({\n component: AXOtpComponent,\n value: this._numbers.join(''),\n isCompleted: this._numbers.filter((c) => c).length === this.length,\n });\n }\n\n override internalSetValue(value: any): string {\n if (value) {\n this._numbers = 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._numbers[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._numbers = [];\n for (let i = 0; i < inputs.length; i++) {\n this._numbers[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","<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]=\"_numbers[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\n <input #a type=\"text\" class=\"ax-temp-input\" />\n</div>\n<ng-template #name></ng-template>\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;;AC8BK,MAAO,cAAe,SAAQ,OAAO,EAAC,gBAAwB,GAAE,eAAe,CAAC,CAAA;AAQpF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CA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AO,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.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;;Q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