@taiga-ui/addon-commerce 4.52.0-canary.c91900a → 4.52.0-canary.ca43bcb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,3 @@
1
1
  export * from '@taiga-ui/addon-commerce/components/input-card';
2
2
  export * from '@taiga-ui/addon-commerce/components/input-card-group';
3
- export * from '@taiga-ui/addon-commerce/components/input-cvc';
4
- export * from '@taiga-ui/addon-commerce/components/input-expire';
5
3
  export * from '@taiga-ui/addon-commerce/components/thumbnail-card';
@@ -1 +1,4 @@
1
+ export * from './input-card';
1
2
  export * from './input-card.component';
3
+ export * from './input-cvc.directive';
4
+ export * from './input-expire.directive';
@@ -1,8 +1,8 @@
1
1
  import { type OnInit } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  import * as i1 from "@maskito/angular";
4
- import * as i2 from "@taiga-ui/core/components/textfield";
5
- export declare class TuiInputCard implements OnInit {
4
+ import * as i2 from "@taiga-ui/core/components/input";
5
+ export declare class TuiInputCardComponent implements OnInit {
6
6
  private readonly icons;
7
7
  private readonly control;
8
8
  private readonly value;
@@ -11,6 +11,6 @@ export declare class TuiInputCard implements OnInit {
11
11
  protected readonly image: import("@angular/core").Signal<string>;
12
12
  readonly binChange: import("@angular/core").OutputRef<string | null>;
13
13
  ngOnInit(): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputCard, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputCard, "input[tuiInputCard]", never, {}, { "binChange": "binChange"; }, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithTextfield; inputs: {}; outputs: {}; }]>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputCardComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputCardComponent, "input[tuiInputCard]", never, {}, { "binChange": "binChange"; }, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithInput; inputs: {}; outputs: {}; }]>;
16
16
  }
@@ -0,0 +1,4 @@
1
+ import { TuiInputCardComponent } from './input-card.component';
2
+ import { TuiInputCVCDirective } from './input-cvc.directive';
3
+ import { TuiInputExpireDirective } from './input-expire.directive';
4
+ export declare const TuiInputCard: readonly [typeof TuiInputCardComponent, typeof TuiInputCVCDirective, typeof TuiInputExpireDirective, readonly [typeof import("@taiga-ui/cdk/directives/item").TuiItem, typeof import("@taiga-ui/core/components/label").TuiLabel, typeof import("@taiga-ui/core/components/textfield").TuiTextfieldComponent, typeof import("@taiga-ui/core/components/textfield").TuiTextfieldOptionsDirective, typeof import("@taiga-ui/core/components/textfield").TuiTextfieldMultiComponent, typeof import("@taiga-ui/core/portals/dropdown").TuiDropdownContent]];
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@maskito/angular";
3
+ import * as i2 from "@taiga-ui/core/components/input";
4
+ export declare class TuiInputCVCDirective {
5
+ protected readonly mask: import("@angular/core").Signal<import("@maskito/core").MaskitoOptions | null>;
6
+ readonly hidden: import("@angular/core").InputSignal<boolean>;
7
+ readonly length: import("@angular/core").InputSignal<3 | 4>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputCVCDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TuiInputCVCDirective, "input[tuiInputCVC]", never, { "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "length": { "alias": "length"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithInput; inputs: {}; outputs: {}; }]>;
10
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@maskito/angular";
3
+ import * as i2 from "@taiga-ui/core/components/input";
4
+ export declare class TuiInputExpireDirective {
5
+ protected readonly mask: import("@angular/core").WritableSignal<import("@maskito/core").MaskitoOptions | null>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputExpireDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TuiInputExpireDirective, "input[tuiInputExpire]", never, {}, {}, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithInput; inputs: {}; outputs: {}; }]>;
8
+ }
@@ -2,11 +2,11 @@ import { type Signal } from '@angular/core';
2
2
  import { TuiControl } from '@taiga-ui/cdk/classes';
3
3
  import { type TuiBooleanHandler } from '@taiga-ui/cdk/types';
4
4
  import { type TuiDataListHost } from '@taiga-ui/core/components/data-list';
5
- import { TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
5
+ import { TuiDropdownDirective } from '@taiga-ui/core/portals/dropdown';
6
6
  import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
7
7
  import * as i0 from "@angular/core";
8
8
  import * as i1 from "@taiga-ui/core/directives/appearance";
9
- import * as i2 from "@taiga-ui/core/directives/dropdown";
9
+ import * as i2 from "@taiga-ui/core/portals/dropdown";
10
10
  import * as i3 from "./input-card-group.directive";
11
11
  export interface TuiCard {
12
12
  card: string;
@@ -25,8 +25,8 @@ import { TuiIcon, TuiIconPipe } from '@taiga-ui/core/components/icon';
25
25
  import { TUI_TEXTFIELD_OPTIONS } from '@taiga-ui/core/components/textfield';
26
26
  import * as i1 from '@taiga-ui/core/directives/appearance';
27
27
  import { tuiAppearanceMode, tuiAppearance, tuiAppearanceState, tuiAppearanceFocus, TuiAppearance } from '@taiga-ui/core/directives/appearance';
28
- import * as i2 from '@taiga-ui/core/directives/dropdown';
29
- import { TuiDropdownDirective, TuiDropdownOpen, tuiDropdownOptionsProvider, TuiWithDropdownOpen } from '@taiga-ui/core/directives/dropdown';
28
+ import * as i2 from '@taiga-ui/core/portals/dropdown';
29
+ import { TuiDropdownDirective, TuiDropdownOpen, tuiDropdownOptionsProvider, TuiWithDropdownOpen } from '@taiga-ui/core/portals/dropdown';
30
30
  import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
31
31
  import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
32
32
  import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-commerce-components-input-card-group.mjs","sources":["../../../projects/addon-commerce/components/input-card-group/input-card-group.directive.ts","../../../projects/addon-commerce/components/input-card-group/input-card-group.options.ts","../../../projects/addon-commerce/components/input-card-group/input-card-group.providers.ts","../../../projects/addon-commerce/components/input-card-group/input-card-group.component.ts","../../../projects/addon-commerce/components/input-card-group/input-card-group.template.html","../../../projects/addon-commerce/components/input-card-group/taiga-ui-addon-commerce-components-input-card-group.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {BehaviorSubject, combineLatest, map} from 'rxjs';\n\n@Directive({\n inputs: ['compactSetter: compact'],\n host: {'[class._compact]': 'compact()'},\n})\nexport class TuiInputCardGroupDirective {\n private readonly c$ = new BehaviorSubject(false);\n private readonly m$ = inject(TuiBreakpointService).pipe(map((b) => b === 'mobile'));\n\n public readonly compact$ = combineLatest([this.c$, this.m$]).pipe(\n map((c) => c.some(Boolean)),\n );\n\n public readonly compact = toSignal(this.compact$, {initialValue: false});\n\n public set compactSetter(compact: boolean) {\n this.c$.next(compact);\n }\n}\n","import {tuiDefaultCardValidator} from '@taiga-ui/addon-commerce/constants';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiCardInputs {\n cvc: boolean;\n expire: boolean;\n}\n\nexport interface TuiInputCardGroupOptions {\n readonly cardValidator: TuiBooleanHandler<string>;\n readonly exampleText: string;\n readonly exampleTextCVC: string;\n readonly cvcHidden: boolean;\n readonly inputs: TuiCardInputs;\n}\n\nexport const TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS: TuiInputCardGroupOptions = {\n cardValidator: tuiDefaultCardValidator,\n exampleText: '0000 0000 0000 0000',\n exampleTextCVC: '000',\n cvcHidden: true,\n inputs: {cvc: true, expire: true},\n};\n\nexport const [TUI_INPUT_CARD_GROUP_OPTIONS, tuiInputCardGroupOptionsProvider] =\n tuiCreateOptions(TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS);\n","import {inject, InjectionToken} from '@angular/core';\nimport {toObservable} from '@angular/core/rxjs-interop';\nimport {\n TUI_CARD_CVC_TEXTS,\n TUI_CARD_EXPIRY_TEXTS,\n TUI_CARD_NUMBER_TEXTS,\n} from '@taiga-ui/addon-commerce/tokens';\nimport {combineLatest, map, type Observable} from 'rxjs';\n\nimport {TuiInputCardGroupDirective} from './input-card-group.directive';\n\nexport interface TuiCardGroupedTexts {\n readonly cardNumberText: string;\n readonly cvcText: string;\n readonly expiryText: string;\n}\n\nexport const TUI_INPUT_CARD_GROUP_TEXTS = new InjectionToken<\n Observable<TuiCardGroupedTexts>\n>(ngDevMode ? 'TUI_INPUT_CARD_GROUP_TEXTS' : '');\n\nexport const TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER = {\n provide: TUI_INPUT_CARD_GROUP_TEXTS,\n useFactory: () =>\n inject(TUI_INPUT_CARD_GROUP_TEXTS, {skipSelf: true, optional: true}) ??\n combineLatest([\n inject(TuiInputCardGroupDirective).compact$,\n toObservable(inject(TUI_CARD_NUMBER_TEXTS)),\n toObservable(inject(TUI_CARD_EXPIRY_TEXTS)),\n inject(TUI_CARD_CVC_TEXTS),\n ]).pipe(\n map(([compact, cardNumber, expiry, cvcTexts]) => ({\n cardNumberText: cardNumber[Number(!compact)] ?? '',\n expiryText: expiry[Number(!compact)] ?? '',\n cvcText: cvcTexts[Number(!compact)] ?? '',\n })),\n ),\n};\n","import {DOCUMENT, isPlatformServer} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n type ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n type Signal,\n viewChild,\n} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {FormsModule} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\nimport {\n TUI_MASK_CARD,\n TUI_MASK_CVC,\n TUI_MASK_EXPIRE,\n} from '@taiga-ui/addon-commerce/constants';\nimport {TuiFormatCardPipe} from '@taiga-ui/addon-commerce/pipes';\nimport {TUI_PAYMENT_SYSTEM_ICONS} from '@taiga-ui/addon-commerce/tokens';\nimport {type TuiPaymentSystem} from '@taiga-ui/addon-commerce/types';\nimport {tuiGetPaymentSystem} from '@taiga-ui/addon-commerce/utils';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {CHAR_NO_BREAK_SPACE, TUI_NON_DIGIT_REGEXP} from '@taiga-ui/cdk/constants';\nimport {tuiHovered, TuiHoveredService} from '@taiga-ui/cdk/directives/hovered';\nimport {TuiTransitioned} from '@taiga-ui/cdk/directives/transitioned';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {TUI_IS_MOBILE, TUI_IS_WEBKIT} from '@taiga-ui/cdk/tokens';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement, tuiIsElement, tuiIsInput} from '@taiga-ui/cdk/utils/dom';\nimport {tuiFocusedIn, tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiGenerateId, tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAsDataListHost,\n type TuiDataListHost,\n} from '@taiga-ui/core/components/data-list';\nimport {TuiIcon, TuiIconPipe} from '@taiga-ui/core/components/icon';\nimport {TUI_TEXTFIELD_OPTIONS} from '@taiga-ui/core/components/textfield';\nimport {\n TuiAppearance,\n tuiAppearance,\n tuiAppearanceFocus,\n tuiAppearanceMode,\n tuiAppearanceState,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TuiDropdownDirective,\n TuiDropdownOpen,\n tuiDropdownOptionsProvider,\n TuiWithDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {TuiChevron} from '@taiga-ui/kit/directives/chevron';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, Subject, switchMap, timer} from 'rxjs';\n\nimport {TuiInputCardGroupDirective} from './input-card-group.directive';\nimport {TUI_INPUT_CARD_GROUP_OPTIONS} from './input-card-group.options';\nimport {\n TUI_INPUT_CARD_GROUP_TEXTS,\n TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER,\n} from './input-card-group.providers';\n\nexport interface TuiCard {\n card: string;\n cvc: string;\n expire: string;\n}\n\n@Component({\n selector: 'tui-input-card-group',\n imports: [\n FormsModule,\n MaskitoDirective,\n PolymorpheusOutlet,\n TuiAppearance,\n TuiChevron,\n TuiFormatCardPipe,\n TuiIcon,\n TuiIconPipe,\n TuiMapperPipe,\n TuiTransitioned,\n WaResizeObserver,\n ],\n templateUrl: './input-card-group.template.html',\n styleUrl: './input-card-group.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsDataListHost(TuiInputCardGroup),\n tuiAsControl(TuiInputCardGroup),\n tuiDropdownOptionsProvider({limitWidth: 'fixed'}),\n TuiHoveredService,\n TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER,\n ],\n hostDirectives: [\n TuiAppearance,\n TuiDropdownDirective,\n TuiWithDropdownOpen,\n {directive: TuiInputCardGroupDirective, inputs: ['compact']},\n ],\n host: {\n '[attr.data-size]': 'textfield.size()',\n '(pointerdown)': 'onPointerDown($event)',\n '(scroll.zoneless)': '$event.target.scrollLeft = 0',\n '(tuiActiveZoneChange)': 'onTouched()',\n },\n})\nexport class TuiInputCardGroup\n extends TuiControl<TuiCard | null>\n implements TuiDataListHost<Partial<TuiCard>>\n{\n private readonly inputCard = viewChild<ElementRef<HTMLInputElement>>('inputCard');\n\n private readonly inputExpire = viewChild<ElementRef<HTMLInputElement>>('inputExpire');\n\n private readonly inputCVC = viewChild<ElementRef<HTMLInputElement>>('inputCVC');\n\n private readonly doc = inject(DOCUMENT);\n private readonly isServer = isPlatformServer(inject(PLATFORM_ID));\n private readonly focus$ = new Subject<void>();\n private expirePrefilled = false;\n private readonly paymentSystems = inject(TUI_PAYMENT_SYSTEM_ICONS);\n private readonly options = inject(TUI_INPUT_CARD_GROUP_OPTIONS);\n private readonly el = tuiInjectElement();\n private readonly hover = tuiHovered();\n private readonly focusedIn = tuiFocusedIn(this.el);\n\n protected readonly exampleTextCVC = computed((length = this.codeLength()) =>\n length ? '0'.repeat(length) : this.options.exampleTextCVC,\n );\n\n protected readonly maskCVC = computed((length = this.codeLength()) =>\n TUI_MASK_CVC(length ?? 3),\n );\n\n protected cvcHidden = this.options.cvcHidden;\n protected readonly isMobile = inject(TUI_IS_MOBILE);\n protected readonly isWebkit = inject(TUI_IS_WEBKIT);\n protected readonly dropdown = inject(TuiDropdownDirective);\n protected readonly maskCard = TUI_MASK_CARD;\n protected readonly maskExpire = TUI_MASK_EXPIRE;\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly textfield = inject(TUI_TEXTFIELD_OPTIONS);\n protected readonly texts = toSignal(inject(TUI_INPUT_CARD_GROUP_TEXTS));\n protected readonly open = inject(TuiDropdownOpen).open;\n protected readonly $ = this.isWebkit\n ? this.focus$\n .pipe(\n switchMap(() => timer(100)),\n takeUntilDestroyed(),\n )\n .subscribe(() => (this.expire ? this.focusCVC() : this.focusExpire()))\n : EMPTY;\n\n protected readonly m = tuiAppearanceMode(this.mode);\n protected readonly appearance = tuiAppearance(\n inject(TUI_TEXTFIELD_OPTIONS).appearance,\n );\n\n protected readonly state: Signal<unknown> = tuiAppearanceState(\n // eslint-disable-next-line no-nested-ternary\n computed(() => (this.disabled() ? 'disabled' : this.hover() ? 'hover' : null)),\n );\n\n protected readonly focus = tuiAppearanceFocus(\n computed(() => this.open() || this.focusedIn()),\n );\n\n protected readonly labelRaised = computed(\n () => (this.focus() && !this.readOnly()) || !!this.value()?.card,\n );\n\n protected readonly hasCleaner = computed(\n () => !!this.value()?.card && this.interactive(),\n );\n\n /**\n * @deprecated use 'placeholder' instead\n */\n public readonly exampleText = input(this.options.exampleText);\n\n public readonly placeholder = input(this.options.exampleText);\n\n public readonly inputs = input(this.options.inputs);\n\n public readonly cardValidator = input<TuiBooleanHandler<string>>(\n this.options.cardValidator,\n );\n\n public readonly icon = input<PolymorpheusContent>('');\n\n public readonly id = input(tuiGenerateId());\n\n public readonly codeLength = input<3 | 4>();\n\n public readonly binChange = output<string | null>();\n\n public get bin(): string | null {\n return this.card.length < 6 ? null : this.card.slice(0, 6);\n }\n\n public override writeValue(value: TuiCard | null): void {\n const {bin} = this;\n const {activeElement} = this.doc;\n\n super.writeValue(value);\n this.updateBin(bin);\n this.expirePrefilled = !!this.expire && this.cardPrefilled;\n\n // Programmatic setting of expire input value breaks autofill in Chrome\n const inputExpire = this.inputExpire();\n\n if (\n !inputExpire ||\n this.isMobile ||\n this.isWebkit ||\n this.isServer ||\n inputExpire.nativeElement.value === this.expire\n ) {\n return;\n }\n\n inputExpire.nativeElement.focus({preventScroll: true});\n inputExpire.nativeElement.select();\n this.doc.execCommand('insertText', false, this.expire);\n inputExpire.nativeElement.blur();\n (activeElement as HTMLElement | null)?.focus({preventScroll: true});\n }\n\n /** Public API for manual focus management */\n public focusCard(): void {\n this.inputCard()?.nativeElement.focus({preventScroll: true});\n }\n\n public focusExpire(): void {\n if (this.inputs().expire) {\n this.inputExpire()?.nativeElement.focus({preventScroll: true});\n } else {\n this.inputCVC()?.nativeElement.focus({preventScroll: true});\n }\n }\n\n public focusCVC(): void {\n this.inputCVC()?.nativeElement.focus({preventScroll: true});\n }\n\n public handleOption(option: Partial<TuiCard> | null): void {\n const {card = '', expire = '', cvc = ''} = option || {};\n const {bin} = this;\n const element =\n (!card && this.inputCard()?.nativeElement) ||\n (!expire && this.inputExpire()?.nativeElement) ||\n this.inputCVC()?.nativeElement;\n\n this.onChange({card, expire, cvc});\n this.updateBin(bin);\n this.open.set(false);\n this.expirePrefilled = !!expire;\n\n element?.focus();\n }\n\n public clear(): void {\n this.expirePrefilled = false;\n\n [this.inputCVC(), this.inputExpire(), this.inputCard()].forEach((e) => {\n e?.nativeElement.focus();\n e?.nativeElement.select();\n e?.nativeElement.ownerDocument.execCommand('delete');\n });\n\n this.onChange(null);\n }\n\n public onResize(): void {\n this.cdr.detectChanges();\n }\n\n protected get content(): PolymorpheusContent {\n const system = this.getPaymentSystem(this.card);\n\n return this.icon() || (system && this.paymentSystems[system]);\n }\n\n protected get card(): string {\n return this.value()?.card || '';\n }\n\n protected get expire(): string {\n return this.value()?.expire || '';\n }\n\n protected get cvc(): string {\n return this.value()?.cvc || '';\n }\n\n protected get cardCollapsed(): boolean {\n return (\n this.isFocusable(this.card) && !tuiIsFocused(this.inputCard()?.nativeElement)\n );\n }\n\n protected get tailLength(): number {\n return this.card.length % 4 > 0 ? 5 : 4;\n }\n\n protected get cardPrefilled(): boolean {\n return !!this.card.match(TUI_NON_DIGIT_REGEXP);\n }\n\n protected get cvcPrefilled(): boolean {\n return !this.inputs().cvc || !!this.cvc.match(TUI_NON_DIGIT_REGEXP);\n }\n\n protected get cardFocusable(): boolean {\n return !this.cardPrefilled;\n }\n\n protected get expireFocusable(): boolean {\n return this.isFocusable(this.card) && !this.expirePrefilled;\n }\n\n protected get cvcFocusable(): boolean {\n return this.isFocusable(this.card);\n }\n\n protected get masked(): string {\n return this.cardPrefilled ? `${this.card.slice(-4)}` : '';\n }\n\n protected onCardChange(card: string): void {\n const {value, bin} = this;\n const parsed = card.split(CHAR_NO_BREAK_SPACE).join('');\n\n if (value()?.card === parsed) {\n return;\n }\n\n this.updateProperty(parsed, 'card');\n this.updateBin(bin);\n\n if (this.cardValidator()(this.card) && !value()?.expire && this.inputExpire()) {\n this.focusExpire();\n // Safari autofill focus jerk workaround\n this.focus$.next();\n }\n }\n\n protected onExpireChange(expire: string): void {\n this.updateProperty(expire, 'expire');\n\n // MM/YY\n if (Number(this.inputExpire()?.nativeElement.selectionStart) === 5) {\n this.focusCVC();\n }\n }\n\n protected onCVCChange(cvc: string): void {\n this.updateProperty(cvc, 'cvc');\n }\n\n protected getStyle({offsetWidth}: HTMLSpanElement): string {\n return this.cardCollapsed\n ? `transform: translate3d(calc(${offsetWidth}px * var(--tui-inline)), 0, 0); clip-path: inset(0 0 0 calc(100% - ${offsetWidth}px));`\n : '';\n }\n\n protected onPointerDown(event: MouseEvent): void {\n if (tuiIsElement(event.target) && tuiIsInput(event.target)) {\n return;\n }\n\n event.preventDefault();\n this.focusInput();\n }\n\n protected toggle(): void {\n this.open.update((open) => !open);\n }\n\n @tuiPure\n private isFocusable(card: string): boolean {\n return this.cardValidator()(card) || this.cardPrefilled;\n }\n\n @tuiPure\n private getPaymentSystem(value: string): TuiPaymentSystem | null {\n return tuiGetPaymentSystem(value);\n }\n\n private updateBin(oldBin: string | null): void {\n const {bin} = this;\n\n if (bin !== oldBin && !this.cardPrefilled) {\n this.binChange.emit(bin);\n }\n }\n\n private updateProperty(value: string, propName: 'card' | 'cvc' | 'expire'): void {\n const {card = '', expire = '', cvc = ''} = this.value() || {};\n const newValue: TuiCard = {card, expire, cvc};\n\n newValue[propName] = value;\n\n this.onChange(newValue.expire || newValue.cvc || newValue.card ? newValue : null);\n }\n\n private focusInput(): void {\n const element =\n (this.cardFocusable && this.inputCard()?.nativeElement) ||\n (this.expireFocusable && this.inputExpire()?.nativeElement) ||\n this.inputCVC()?.nativeElement;\n\n element?.focus();\n }\n}\n","@let formattedCard = value()?.card | tuiFormatCard: cardPrefilled;\n\n<div class=\"t-wrapper\">\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCard\n autocomplete=\"cc-number\"\n automation-id=\"tui-input-card-group__card\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input t-input_card\"\n [attr.aria-invalid]=\"!cardPrefilled && !(this.card | tuiMapper: cardValidator())\"\n [attr.id]=\"`${id()}_card`\"\n [class.t-input_filled]=\"card.length\"\n [class.t-input_inert]=\"cardPrefilled\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCard\"\n [ngModel]=\"formattedCard\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cardPrefilled ? '' : placeholder() || exampleText()\"\n [readOnly]=\"readOnly()\"\n [tabIndex]=\"cardFocusable ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCardChange($event)\"\n />\n <span\n aria-hidden=\"true\"\n translate=\"no\"\n class=\"t-collapsed\"\n [attr.data-before]=\"masked\"\n [class.t-collapsed_enable-mask]=\"cardCollapsed\"\n (waResizeObserver)=\"onResize()\"\n >\n <span\n #ghost\n class=\"t-ghost\"\n [textContent]=\"formattedCard.slice(-tailLength)\"\n ></span>\n\n <span class=\"t-collapsed-wrapper\">\n <span\n class=\"t-value\"\n [style]=\"getStyle(ghost)\"\n [textContent]=\"formattedCard\"\n ></span>\n </span>\n </span>\n <div\n tuiTransitioned\n class=\"t-label\"\n [attr.data-label]=\"texts()?.cardNumberText\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n <ng-content />\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_expire\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputExpire\n autocomplete=\"cc-exp\"\n automation-id=\"tui-input-card-group__expire\"\n inputmode=\"numeric\"\n maxlength=\"5\"\n name=\"ccexpiryyear\"\n translate=\"no\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_expire`\"\n [class.t-input_inert]=\"!expireFocusable\"\n [class.t-input_prefilled]=\"!inputs().expire\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskExpire\"\n [ngModel]=\"expire\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"inputs().expire ? '00/00' : '••/••'\"\n [readOnly]=\"readOnly() || !inputs().expire\"\n [tabIndex]=\"expireFocusable || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onExpireChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.expiryText }}\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_cvc\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCVC\n autocomplete=\"cc-csc\"\n automation-id=\"tui-input-card-group__cvc\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_cvc`\"\n [class.t-input_cvc_hidden]=\"cvcHidden\"\n [class.t-input_prefilled]=\"cvcPrefilled\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCVC()\"\n [ngModel]=\"cvc\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cvcPrefilled ? '•••' : exampleTextCVC()\"\n [readOnly]=\"readOnly() || cvcPrefilled\"\n [tabIndex]=\"cvcFocusable || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCVCChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.cvcText }}\n </div>\n </label>\n</div>\n<div class=\"t-icons\">\n @if (content) {\n <div class=\"t-icon-outlet\">\n <img\n *polymorpheusOutlet=\"content as src\"\n alt=\"\"\n automation-id=\"tui-input-card-group__icon\"\n class=\"t-card\"\n [src]=\"src | tuiIcon\"\n />\n </div>\n }\n @if (hasCleaner()) {\n <tui-icon\n automation-id=\"tui-input-card-group__cleaner\"\n tuiAppearance=\"icon\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"clear()\"\n />\n }\n @if (dropdown.content()) {\n <tui-icon\n automation-id=\"tui-input-card-group__dropdown\"\n tuiAppearance=\"icon\"\n tuiChevron\n class=\"t-icon\"\n (click)=\"toggle()\"\n />\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.TuiInputCardGroupDirective"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASa,0BAA0B,CAAA;AAJvC,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,EAAE,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC;QAC/B,IAAE,CAAA,EAAA,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC;AAEnE,QAAA,IAAA,CAAA,QAAQ,GAAG,aAAa,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAC7D,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAC9B;AAEe,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAC,YAAY,EAAE,KAAK,EAAC,CAAC;AAK3E;IAHG,IAAW,aAAa,CAAC,OAAgB,EAAA;AACrC,QAAA,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;+GAXhB,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,aAAA,EAAA,CAAA,SAAA,EAAA,eAAA,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,WAAA,EAAA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A,EAAA,IAAA,CAAA;4FAzRQ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAtC7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EACvB,OAAA,EAAA;wBACL,WAAW;wBACX,gBAAgB;wBAChB,kBAAkB;wBAClB,aAAa;wBACb,UAAU;wBACV,iBAAiB;wBACjB,OAAO;wBACP,WAAW;wBACX,aAAa;wBACb,eAAe;wBACf,gBAAgB;qBACnB,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACP,wBAAA,iBAAiB,CAAmB,iBAAA,CAAA;AACpC,wBAAA,YAAY,CAAmB,iBAAA,CAAA;AAC/B,wBAAA,0BAA0B,CAAC,EAAC,UAAU,EAAE,OAAO,EAAC,CAAC;wBACjD,iBAAiB;wBACjB,mCAAmC;qBACtC,EACe,cAAA,EAAA;wBACZ,aAAa;wBACb,oBAAoB;wBACpB,mBAAmB;wBACnB,EAAC,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAC;qBAC/D,EACK,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,kBAAkB;AACtC,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,mBAAmB,EAAE,8BAA8B;AACnD,wBAAA,uBAAuB,EAAE,aAAa;AACzC,qBAAA,EAAA,QAAA,EAAA,04KAAA,EAAA,MAAA,EAAA,CAAA,0qKAAA,CAAA,EAAA;AAoRO,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,WAAW,MAKX,gBAAgB,EAAA,EAAA,EAAA,EAAA,CAAA;;AEtY5B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-commerce-components-input-card-group.mjs","sources":["../../../projects/addon-commerce/components/input-card-group/input-card-group.directive.ts","../../../projects/addon-commerce/components/input-card-group/input-card-group.options.ts","../../../projects/addon-commerce/components/input-card-group/input-card-group.providers.ts","../../../projects/addon-commerce/components/input-card-group/input-card-group.component.ts","../../../projects/addon-commerce/components/input-card-group/input-card-group.template.html","../../../projects/addon-commerce/components/input-card-group/taiga-ui-addon-commerce-components-input-card-group.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {BehaviorSubject, combineLatest, map} from 'rxjs';\n\n@Directive({\n inputs: ['compactSetter: compact'],\n host: {'[class._compact]': 'compact()'},\n})\nexport class TuiInputCardGroupDirective {\n private readonly c$ = new BehaviorSubject(false);\n private readonly m$ = inject(TuiBreakpointService).pipe(map((b) => b === 'mobile'));\n\n public readonly compact$ = combineLatest([this.c$, this.m$]).pipe(\n map((c) => c.some(Boolean)),\n );\n\n public readonly compact = toSignal(this.compact$, {initialValue: false});\n\n public set compactSetter(compact: boolean) {\n this.c$.next(compact);\n }\n}\n","import {tuiDefaultCardValidator} from '@taiga-ui/addon-commerce/constants';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiCardInputs {\n cvc: boolean;\n expire: boolean;\n}\n\nexport interface TuiInputCardGroupOptions {\n readonly cardValidator: TuiBooleanHandler<string>;\n readonly exampleText: string;\n readonly exampleTextCVC: string;\n readonly cvcHidden: boolean;\n readonly inputs: TuiCardInputs;\n}\n\nexport const TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS: TuiInputCardGroupOptions = {\n cardValidator: tuiDefaultCardValidator,\n exampleText: '0000 0000 0000 0000',\n exampleTextCVC: '000',\n cvcHidden: true,\n inputs: {cvc: true, expire: true},\n};\n\nexport const [TUI_INPUT_CARD_GROUP_OPTIONS, tuiInputCardGroupOptionsProvider] =\n tuiCreateOptions(TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS);\n","import {inject, InjectionToken} from '@angular/core';\nimport {toObservable} from '@angular/core/rxjs-interop';\nimport {\n TUI_CARD_CVC_TEXTS,\n TUI_CARD_EXPIRY_TEXTS,\n TUI_CARD_NUMBER_TEXTS,\n} from '@taiga-ui/addon-commerce/tokens';\nimport {combineLatest, map, type Observable} from 'rxjs';\n\nimport {TuiInputCardGroupDirective} from './input-card-group.directive';\n\nexport interface TuiCardGroupedTexts {\n readonly cardNumberText: string;\n readonly cvcText: string;\n readonly expiryText: string;\n}\n\nexport const TUI_INPUT_CARD_GROUP_TEXTS = new InjectionToken<\n Observable<TuiCardGroupedTexts>\n>(ngDevMode ? 'TUI_INPUT_CARD_GROUP_TEXTS' : '');\n\nexport const TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER = {\n provide: TUI_INPUT_CARD_GROUP_TEXTS,\n useFactory: () =>\n inject(TUI_INPUT_CARD_GROUP_TEXTS, {skipSelf: true, optional: true}) ??\n combineLatest([\n inject(TuiInputCardGroupDirective).compact$,\n toObservable(inject(TUI_CARD_NUMBER_TEXTS)),\n toObservable(inject(TUI_CARD_EXPIRY_TEXTS)),\n inject(TUI_CARD_CVC_TEXTS),\n ]).pipe(\n map(([compact, cardNumber, expiry, cvcTexts]) => ({\n cardNumberText: cardNumber[Number(!compact)] ?? '',\n expiryText: expiry[Number(!compact)] ?? '',\n cvcText: cvcTexts[Number(!compact)] ?? '',\n })),\n ),\n};\n","import {DOCUMENT, isPlatformServer} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n type ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n type Signal,\n viewChild,\n} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {FormsModule} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\nimport {\n TUI_MASK_CARD,\n TUI_MASK_CVC,\n TUI_MASK_EXPIRE,\n} from '@taiga-ui/addon-commerce/constants';\nimport {TuiFormatCardPipe} from '@taiga-ui/addon-commerce/pipes';\nimport {TUI_PAYMENT_SYSTEM_ICONS} from '@taiga-ui/addon-commerce/tokens';\nimport {type TuiPaymentSystem} from '@taiga-ui/addon-commerce/types';\nimport {tuiGetPaymentSystem} from '@taiga-ui/addon-commerce/utils';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {CHAR_NO_BREAK_SPACE, TUI_NON_DIGIT_REGEXP} from '@taiga-ui/cdk/constants';\nimport {tuiHovered, TuiHoveredService} from '@taiga-ui/cdk/directives/hovered';\nimport {TuiTransitioned} from '@taiga-ui/cdk/directives/transitioned';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {TUI_IS_MOBILE, TUI_IS_WEBKIT} from '@taiga-ui/cdk/tokens';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement, tuiIsElement, tuiIsInput} from '@taiga-ui/cdk/utils/dom';\nimport {tuiFocusedIn, tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiGenerateId, tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAsDataListHost,\n type TuiDataListHost,\n} from '@taiga-ui/core/components/data-list';\nimport {TuiIcon, TuiIconPipe} from '@taiga-ui/core/components/icon';\nimport {TUI_TEXTFIELD_OPTIONS} from '@taiga-ui/core/components/textfield';\nimport {\n TuiAppearance,\n tuiAppearance,\n tuiAppearanceFocus,\n tuiAppearanceMode,\n tuiAppearanceState,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TuiDropdownDirective,\n TuiDropdownOpen,\n tuiDropdownOptionsProvider,\n TuiWithDropdownOpen,\n} from '@taiga-ui/core/portals/dropdown';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {TuiChevron} from '@taiga-ui/kit/directives/chevron';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, Subject, switchMap, timer} from 'rxjs';\n\nimport {TuiInputCardGroupDirective} from './input-card-group.directive';\nimport {TUI_INPUT_CARD_GROUP_OPTIONS} from './input-card-group.options';\nimport {\n TUI_INPUT_CARD_GROUP_TEXTS,\n TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER,\n} from './input-card-group.providers';\n\nexport interface TuiCard {\n card: string;\n cvc: string;\n expire: string;\n}\n\n@Component({\n selector: 'tui-input-card-group',\n imports: [\n FormsModule,\n MaskitoDirective,\n PolymorpheusOutlet,\n TuiAppearance,\n TuiChevron,\n TuiFormatCardPipe,\n TuiIcon,\n TuiIconPipe,\n TuiMapperPipe,\n TuiTransitioned,\n WaResizeObserver,\n ],\n templateUrl: './input-card-group.template.html',\n styleUrl: './input-card-group.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsDataListHost(TuiInputCardGroup),\n tuiAsControl(TuiInputCardGroup),\n tuiDropdownOptionsProvider({limitWidth: 'fixed'}),\n TuiHoveredService,\n TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER,\n ],\n hostDirectives: [\n TuiAppearance,\n TuiDropdownDirective,\n TuiWithDropdownOpen,\n {directive: TuiInputCardGroupDirective, inputs: ['compact']},\n ],\n host: {\n '[attr.data-size]': 'textfield.size()',\n '(pointerdown)': 'onPointerDown($event)',\n '(scroll.zoneless)': '$event.target.scrollLeft = 0',\n '(tuiActiveZoneChange)': 'onTouched()',\n },\n})\nexport class TuiInputCardGroup\n extends TuiControl<TuiCard | null>\n implements TuiDataListHost<Partial<TuiCard>>\n{\n private readonly inputCard = viewChild<ElementRef<HTMLInputElement>>('inputCard');\n\n private readonly inputExpire = viewChild<ElementRef<HTMLInputElement>>('inputExpire');\n\n private readonly inputCVC = viewChild<ElementRef<HTMLInputElement>>('inputCVC');\n\n private readonly doc = inject(DOCUMENT);\n private readonly isServer = isPlatformServer(inject(PLATFORM_ID));\n private readonly focus$ = new Subject<void>();\n private expirePrefilled = false;\n private readonly paymentSystems = inject(TUI_PAYMENT_SYSTEM_ICONS);\n private readonly options = inject(TUI_INPUT_CARD_GROUP_OPTIONS);\n private readonly el = tuiInjectElement();\n private readonly hover = tuiHovered();\n private readonly focusedIn = tuiFocusedIn(this.el);\n\n protected readonly exampleTextCVC = computed((length = this.codeLength()) =>\n length ? '0'.repeat(length) : this.options.exampleTextCVC,\n );\n\n protected readonly maskCVC = computed((length = this.codeLength()) =>\n TUI_MASK_CVC(length ?? 3),\n );\n\n protected cvcHidden = this.options.cvcHidden;\n protected readonly isMobile = inject(TUI_IS_MOBILE);\n protected readonly isWebkit = inject(TUI_IS_WEBKIT);\n protected readonly dropdown = inject(TuiDropdownDirective);\n protected readonly maskCard = TUI_MASK_CARD;\n protected readonly maskExpire = TUI_MASK_EXPIRE;\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly textfield = inject(TUI_TEXTFIELD_OPTIONS);\n protected readonly texts = toSignal(inject(TUI_INPUT_CARD_GROUP_TEXTS));\n protected readonly open = inject(TuiDropdownOpen).open;\n protected readonly $ = this.isWebkit\n ? this.focus$\n .pipe(\n switchMap(() => timer(100)),\n takeUntilDestroyed(),\n )\n .subscribe(() => (this.expire ? this.focusCVC() : this.focusExpire()))\n : EMPTY;\n\n protected readonly m = tuiAppearanceMode(this.mode);\n protected readonly appearance = tuiAppearance(\n inject(TUI_TEXTFIELD_OPTIONS).appearance,\n );\n\n protected readonly state: Signal<unknown> = tuiAppearanceState(\n // eslint-disable-next-line no-nested-ternary\n computed(() => (this.disabled() ? 'disabled' : this.hover() ? 'hover' : null)),\n );\n\n protected readonly focus = tuiAppearanceFocus(\n computed(() => this.open() || this.focusedIn()),\n );\n\n protected readonly labelRaised = computed(\n () => (this.focus() && !this.readOnly()) || !!this.value()?.card,\n );\n\n protected readonly hasCleaner = computed(\n () => !!this.value()?.card && this.interactive(),\n );\n\n /**\n * @deprecated use 'placeholder' instead\n */\n public readonly exampleText = input(this.options.exampleText);\n\n public readonly placeholder = input(this.options.exampleText);\n\n public readonly inputs = input(this.options.inputs);\n\n public readonly cardValidator = input<TuiBooleanHandler<string>>(\n this.options.cardValidator,\n );\n\n public readonly icon = input<PolymorpheusContent>('');\n\n public readonly id = input(tuiGenerateId());\n\n public readonly codeLength = input<3 | 4>();\n\n public readonly binChange = output<string | null>();\n\n public get bin(): string | null {\n return this.card.length < 6 ? null : this.card.slice(0, 6);\n }\n\n public override writeValue(value: TuiCard | null): void {\n const {bin} = this;\n const {activeElement} = this.doc;\n\n super.writeValue(value);\n this.updateBin(bin);\n this.expirePrefilled = !!this.expire && this.cardPrefilled;\n\n // Programmatic setting of expire input value breaks autofill in Chrome\n const inputExpire = this.inputExpire();\n\n if (\n !inputExpire ||\n this.isMobile ||\n this.isWebkit ||\n this.isServer ||\n inputExpire.nativeElement.value === this.expire\n ) {\n return;\n }\n\n inputExpire.nativeElement.focus({preventScroll: true});\n inputExpire.nativeElement.select();\n this.doc.execCommand('insertText', false, this.expire);\n inputExpire.nativeElement.blur();\n (activeElement as HTMLElement | null)?.focus({preventScroll: true});\n }\n\n /** Public API for manual focus management */\n public focusCard(): void {\n this.inputCard()?.nativeElement.focus({preventScroll: true});\n }\n\n public focusExpire(): void {\n if (this.inputs().expire) {\n this.inputExpire()?.nativeElement.focus({preventScroll: true});\n } else {\n this.inputCVC()?.nativeElement.focus({preventScroll: true});\n }\n }\n\n public focusCVC(): void {\n this.inputCVC()?.nativeElement.focus({preventScroll: true});\n }\n\n public handleOption(option: Partial<TuiCard> | null): void {\n const {card = '', expire = '', cvc = ''} = option || {};\n const {bin} = this;\n const element =\n (!card && this.inputCard()?.nativeElement) ||\n (!expire && this.inputExpire()?.nativeElement) ||\n this.inputCVC()?.nativeElement;\n\n this.onChange({card, expire, cvc});\n this.updateBin(bin);\n this.open.set(false);\n this.expirePrefilled = !!expire;\n\n element?.focus();\n }\n\n public clear(): void {\n this.expirePrefilled = false;\n\n [this.inputCVC(), this.inputExpire(), this.inputCard()].forEach((e) => {\n e?.nativeElement.focus();\n e?.nativeElement.select();\n e?.nativeElement.ownerDocument.execCommand('delete');\n });\n\n this.onChange(null);\n }\n\n public onResize(): void {\n this.cdr.detectChanges();\n }\n\n protected get content(): PolymorpheusContent {\n const system = this.getPaymentSystem(this.card);\n\n return this.icon() || (system && this.paymentSystems[system]);\n }\n\n protected get card(): string {\n return this.value()?.card || '';\n }\n\n protected get expire(): string {\n return this.value()?.expire || '';\n }\n\n protected get cvc(): string {\n return this.value()?.cvc || '';\n }\n\n protected get cardCollapsed(): boolean {\n return (\n this.isFocusable(this.card) && !tuiIsFocused(this.inputCard()?.nativeElement)\n );\n }\n\n protected get tailLength(): number {\n return this.card.length % 4 > 0 ? 5 : 4;\n }\n\n protected get cardPrefilled(): boolean {\n return !!this.card.match(TUI_NON_DIGIT_REGEXP);\n }\n\n protected get cvcPrefilled(): boolean {\n return !this.inputs().cvc || !!this.cvc.match(TUI_NON_DIGIT_REGEXP);\n }\n\n protected get cardFocusable(): boolean {\n return !this.cardPrefilled;\n }\n\n protected get expireFocusable(): boolean {\n return this.isFocusable(this.card) && !this.expirePrefilled;\n }\n\n protected get cvcFocusable(): boolean {\n return this.isFocusable(this.card);\n }\n\n protected get masked(): string {\n return this.cardPrefilled ? `${this.card.slice(-4)}` : '';\n }\n\n protected onCardChange(card: string): void {\n const {value, bin} = this;\n const parsed = card.split(CHAR_NO_BREAK_SPACE).join('');\n\n if (value()?.card === parsed) {\n return;\n }\n\n this.updateProperty(parsed, 'card');\n this.updateBin(bin);\n\n if (this.cardValidator()(this.card) && !value()?.expire && this.inputExpire()) {\n this.focusExpire();\n // Safari autofill focus jerk workaround\n this.focus$.next();\n }\n }\n\n protected onExpireChange(expire: string): void {\n this.updateProperty(expire, 'expire');\n\n // MM/YY\n if (Number(this.inputExpire()?.nativeElement.selectionStart) === 5) {\n this.focusCVC();\n }\n }\n\n protected onCVCChange(cvc: string): void {\n this.updateProperty(cvc, 'cvc');\n }\n\n protected getStyle({offsetWidth}: HTMLSpanElement): string {\n return this.cardCollapsed\n ? `transform: translate3d(calc(${offsetWidth}px * var(--tui-inline)), 0, 0); clip-path: inset(0 0 0 calc(100% - ${offsetWidth}px));`\n : '';\n }\n\n protected onPointerDown(event: MouseEvent): void {\n if (tuiIsElement(event.target) && tuiIsInput(event.target)) {\n return;\n }\n\n event.preventDefault();\n this.focusInput();\n }\n\n protected toggle(): void {\n this.open.update((open) => !open);\n }\n\n @tuiPure\n private isFocusable(card: string): boolean {\n return this.cardValidator()(card) || this.cardPrefilled;\n }\n\n @tuiPure\n private getPaymentSystem(value: string): TuiPaymentSystem | null {\n return tuiGetPaymentSystem(value);\n }\n\n private updateBin(oldBin: string | null): void {\n const {bin} = this;\n\n if (bin !== oldBin && !this.cardPrefilled) {\n this.binChange.emit(bin);\n }\n }\n\n private updateProperty(value: string, propName: 'card' | 'cvc' | 'expire'): void {\n const {card = '', expire = '', cvc = ''} = this.value() || {};\n const newValue: TuiCard = {card, expire, cvc};\n\n newValue[propName] = value;\n\n this.onChange(newValue.expire || newValue.cvc || newValue.card ? newValue : null);\n }\n\n private focusInput(): void {\n const element =\n (this.cardFocusable && this.inputCard()?.nativeElement) ||\n (this.expireFocusable && this.inputExpire()?.nativeElement) ||\n this.inputCVC()?.nativeElement;\n\n element?.focus();\n }\n}\n","@let formattedCard = value()?.card | tuiFormatCard: cardPrefilled;\n\n<div class=\"t-wrapper\">\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCard\n autocomplete=\"cc-number\"\n automation-id=\"tui-input-card-group__card\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input t-input_card\"\n [attr.aria-invalid]=\"!cardPrefilled && !(this.card | tuiMapper: cardValidator())\"\n [attr.id]=\"`${id()}_card`\"\n [class.t-input_filled]=\"card.length\"\n [class.t-input_inert]=\"cardPrefilled\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCard\"\n [ngModel]=\"formattedCard\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cardPrefilled ? '' : placeholder() || exampleText()\"\n [readOnly]=\"readOnly()\"\n [tabIndex]=\"cardFocusable ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCardChange($event)\"\n />\n <span\n aria-hidden=\"true\"\n translate=\"no\"\n class=\"t-collapsed\"\n [attr.data-before]=\"masked\"\n [class.t-collapsed_enable-mask]=\"cardCollapsed\"\n (waResizeObserver)=\"onResize()\"\n >\n <span\n #ghost\n class=\"t-ghost\"\n [textContent]=\"formattedCard.slice(-tailLength)\"\n ></span>\n\n <span class=\"t-collapsed-wrapper\">\n <span\n class=\"t-value\"\n [style]=\"getStyle(ghost)\"\n [textContent]=\"formattedCard\"\n ></span>\n </span>\n </span>\n <div\n tuiTransitioned\n class=\"t-label\"\n [attr.data-label]=\"texts()?.cardNumberText\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n <ng-content />\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_expire\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputExpire\n autocomplete=\"cc-exp\"\n automation-id=\"tui-input-card-group__expire\"\n inputmode=\"numeric\"\n maxlength=\"5\"\n name=\"ccexpiryyear\"\n translate=\"no\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_expire`\"\n [class.t-input_inert]=\"!expireFocusable\"\n [class.t-input_prefilled]=\"!inputs().expire\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskExpire\"\n [ngModel]=\"expire\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"inputs().expire ? '00/00' : '••/••'\"\n [readOnly]=\"readOnly() || !inputs().expire\"\n [tabIndex]=\"expireFocusable || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onExpireChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.expiryText }}\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_cvc\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCVC\n autocomplete=\"cc-csc\"\n automation-id=\"tui-input-card-group__cvc\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_cvc`\"\n [class.t-input_cvc_hidden]=\"cvcHidden\"\n [class.t-input_prefilled]=\"cvcPrefilled\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCVC()\"\n [ngModel]=\"cvc\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cvcPrefilled ? '•••' : exampleTextCVC()\"\n [readOnly]=\"readOnly() || cvcPrefilled\"\n [tabIndex]=\"cvcFocusable || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCVCChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.cvcText }}\n </div>\n </label>\n</div>\n<div class=\"t-icons\">\n @if (content) {\n <div class=\"t-icon-outlet\">\n <img\n *polymorpheusOutlet=\"content as src\"\n alt=\"\"\n automation-id=\"tui-input-card-group__icon\"\n class=\"t-card\"\n [src]=\"src | tuiIcon\"\n />\n </div>\n }\n @if (hasCleaner()) {\n <tui-icon\n automation-id=\"tui-input-card-group__cleaner\"\n tuiAppearance=\"icon\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"clear()\"\n />\n }\n @if (dropdown.content()) {\n <tui-icon\n automation-id=\"tui-input-card-group__dropdown\"\n tuiAppearance=\"icon\"\n tuiChevron\n class=\"t-icon\"\n (click)=\"toggle()\"\n />\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.TuiInputCardGroupDirective"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASa,0BAA0B,CAAA;AAJvC,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,EAAE,GAAG,IA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,EAAA;AACP,wBAAA,iBAAiB,CAAmB,iBAAA,CAAA;AACpC,wBAAA,YAAY,CAAmB,iBAAA,CAAA;AAC/B,wBAAA,0BAA0B,CAAC,EAAC,UAAU,EAAE,OAAO,EAAC,CAAC;wBACjD,iBAAiB;wBACjB,mCAAmC;qBACtC,EACe,cAAA,EAAA;wBACZ,aAAa;wBACb,oBAAoB;wBACpB,mBAAmB;wBACnB,EAAC,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAC;qBAC/D,EACK,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,kBAAkB;AACtC,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,mBAAmB,EAAE,8BAA8B;AACnD,wBAAA,uBAAuB,EAAE,aAAa;AACzC,qBAAA,EAAA,QAAA,EAAA,04KAAA,EAAA,MAAA,EAAA,CAAA,0qKAAA,CAAA,EAAA;AAoRO,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,WAAW,MAKX,gBAAgB,EAAA,EAAA,EAAA,EAAA,CAAA;;AEtY5B;;AAEG;;;;"}
@@ -1,21 +1,22 @@
1
+ import { TuiTextfieldContent, TuiTextfield } from '@taiga-ui/core/components/textfield';
1
2
  import * as i0 from '@angular/core';
2
- import { inject, computed, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { inject, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, input, Directive } from '@angular/core';
3
4
  import { toSignal, outputFromObservable, toObservable } from '@angular/core/rxjs-interop';
4
5
  import { NgControl, DefaultValueAccessor } from '@angular/forms';
5
6
  import * as i1 from '@maskito/angular';
6
7
  import { MaskitoDirective } from '@maskito/angular';
7
- import { TUI_MASK_CARD } from '@taiga-ui/addon-commerce/constants';
8
+ import { TUI_MASK_CARD, TUI_MASK_CVC, TUI_MASK_EXPIRE } from '@taiga-ui/addon-commerce/constants';
8
9
  import { TUI_PAYMENT_SYSTEM_ICONS } from '@taiga-ui/addon-commerce/tokens';
9
10
  import { tuiGetPaymentSystem } from '@taiga-ui/addon-commerce/utils';
10
11
  import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
11
12
  import { tuiControlValue } from '@taiga-ui/cdk/observables';
12
13
  import { TuiIconPipe } from '@taiga-ui/core/components/icon';
13
- import * as i2 from '@taiga-ui/core/components/textfield';
14
- import { TuiTextfieldContent, TuiWithTextfield } from '@taiga-ui/core/components/textfield';
14
+ import * as i2 from '@taiga-ui/core/components/input';
15
+ import { TuiWithInput } from '@taiga-ui/core/components/input';
15
16
  import { tuiMaskito } from '@taiga-ui/kit/utils';
16
17
  import { timer, switchMap, map, startWith, distinctUntilChanged, skip } from 'rxjs';
17
18
 
18
- class TuiInputCard {
19
+ class TuiInputCardComponent {
19
20
  constructor() {
20
21
  this.icons = inject(TUI_PAYMENT_SYSTEM_ICONS);
21
22
  this.control = inject(NgControl);
@@ -35,8 +36,8 @@ class TuiInputCard {
35
36
  const onChanges = this.accessor.onChange.bind(this.accessor);
36
37
  this.accessor.onChange = (value) => onChanges(value.replaceAll(CHAR_NO_BREAK_SPACE, ''));
37
38
  }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputCard, isStandalone: true, selector: "input[tuiInputCard]", outputs: { binChange: "binChange" }, host: { attributes: { "inputmode": "numeric", "placeholder": "0000 0000 0000 0000", "ngSkipHydration": "true", "autocomplete": "cc-number" } }, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithTextfield }], ngImport: i0, template: `
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
40
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputCardComponent, isStandalone: true, selector: "input[tuiInputCard]", outputs: { binChange: "binChange" }, host: { attributes: { "inputmode": "numeric", "placeholder": "0000 0000 0000 0000", "ngSkipHydration": "true", "autocomplete": "cc-number" } }, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithInput }], ngImport: i0, template: `
40
41
  @if (image()) {
41
42
  <img
42
43
  *tuiTextfieldContent
@@ -47,7 +48,7 @@ class TuiInputCard {
47
48
  }
48
49
  `, isInline: true, styles: ["tui-textfield .t-payment-system:not(:first-child){display:none}tui-textfield .t-payment-system{inline-size:1.5rem}tui-textfield[data-size=l] .t-payment-system{inline-size:2rem}\n"], dependencies: [{ kind: "pipe", type: TuiIconPipe, name: "tuiIcon" }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
49
50
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCard, decorators: [{
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCardComponent, decorators: [{
51
52
  type: Component,
52
53
  args: [{ selector: 'input[tuiInputCard]', imports: [TuiIconPipe, TuiTextfieldContent], template: `
53
54
  @if (image()) {
@@ -58,7 +59,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
58
59
  [src]="image() | tuiIcon"
59
60
  />
60
61
  }
61
- `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [MaskitoDirective, TuiWithTextfield], host: {
62
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [MaskitoDirective, TuiWithInput], host: {
62
63
  inputmode: 'numeric',
63
64
  placeholder: '0000 0000 0000 0000',
64
65
  ngSkipHydration: 'true',
@@ -66,9 +67,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
66
67
  }, styles: ["tui-textfield .t-payment-system:not(:first-child){display:none}tui-textfield .t-payment-system{inline-size:1.5rem}tui-textfield[data-size=l] .t-payment-system{inline-size:2rem}\n"] }]
67
68
  }] });
68
69
 
70
+ class TuiInputCVCDirective {
71
+ constructor() {
72
+ this.mask = tuiMaskito(computed(() => TUI_MASK_CVC(this.length())));
73
+ this.hidden = input(true);
74
+ this.length = input(3);
75
+ }
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCVCDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
77
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiInputCVCDirective, isStandalone: true, selector: "input[tuiInputCVC]", inputs: { hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "inputmode": "numeric", "autocomplete": "cc-csc" }, listeners: { "copy.prevent": "(0)" }, properties: { "placeholder": "\"0\".repeat(length())", "style.-webkit-text-security": "hidden() ? \"disc\" : null" } }, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithInput }], ngImport: i0 }); }
78
+ }
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCVCDirective, decorators: [{
80
+ type: Directive,
81
+ args: [{
82
+ selector: 'input[tuiInputCVC]',
83
+ hostDirectives: [MaskitoDirective, TuiWithInput],
84
+ host: {
85
+ inputmode: 'numeric',
86
+ autocomplete: 'cc-csc',
87
+ '[placeholder]': '"0".repeat(length())',
88
+ '[style.-webkit-text-security]': 'hidden() ? "disc" : null',
89
+ '(copy.prevent)': '(0)',
90
+ },
91
+ }]
92
+ }] });
93
+
94
+ class TuiInputExpireDirective {
95
+ constructor() {
96
+ this.mask = tuiMaskito(TUI_MASK_EXPIRE);
97
+ }
98
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputExpireDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
99
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputExpireDirective, isStandalone: true, selector: "input[tuiInputExpire]", host: { attributes: { "inputmode": "numeric", "placeholder": "00/00", "translate": "no", "maxlength": "5", "name": "ccexpiryyear", "autocomplete": "cc-exp" } }, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithInput }], ngImport: i0 }); }
100
+ }
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputExpireDirective, decorators: [{
102
+ type: Directive,
103
+ args: [{
104
+ selector: 'input[tuiInputExpire]',
105
+ hostDirectives: [MaskitoDirective, TuiWithInput],
106
+ host: {
107
+ inputmode: 'numeric',
108
+ placeholder: '00/00',
109
+ translate: 'no',
110
+ maxlength: '5',
111
+ name: 'ccexpiryyear',
112
+ autocomplete: 'cc-exp',
113
+ },
114
+ }]
115
+ }] });
116
+
117
+ const TuiInputCard = [
118
+ TuiInputCardComponent,
119
+ TuiInputCVCDirective,
120
+ TuiInputExpireDirective,
121
+ TuiTextfield,
122
+ ];
123
+
69
124
  /**
70
125
  * Generated bundle index. Do not edit.
71
126
  */
72
127
 
73
- export { TuiInputCard };
128
+ export { TuiInputCVCDirective, TuiInputCard, TuiInputCardComponent, TuiInputExpireDirective };
74
129
  //# sourceMappingURL=taiga-ui-addon-commerce-components-input-card.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-commerce-components-input-card.mjs","sources":["../../../projects/addon-commerce/components/input-card/input-card.component.ts","../../../projects/addon-commerce/components/input-card/taiga-ui-addon-commerce-components-input-card.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n type OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {outputFromObservable, toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {DefaultValueAccessor, NgControl} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {TUI_MASK_CARD} from '@taiga-ui/addon-commerce/constants';\nimport {TUI_PAYMENT_SYSTEM_ICONS} from '@taiga-ui/addon-commerce/tokens';\nimport {tuiGetPaymentSystem} from '@taiga-ui/addon-commerce/utils';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {TuiIconPipe} from '@taiga-ui/core/components/icon';\nimport {TuiTextfieldContent, TuiWithTextfield} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\nimport {distinctUntilChanged, map, skip, startWith, switchMap, timer} from 'rxjs';\n\n@Component({\n selector: 'input[tuiInputCard]',\n imports: [TuiIconPipe, TuiTextfieldContent],\n template: `\n @if (image()) {\n <img\n *tuiTextfieldContent\n alt=\"\"\n class=\"t-payment-system\"\n [src]=\"image() | tuiIcon\"\n />\n }\n `,\n styleUrl: './input-card.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [MaskitoDirective, TuiWithTextfield],\n host: {\n inputmode: 'numeric',\n placeholder: '0000 0000 0000 0000',\n ngSkipHydration: 'true',\n autocomplete: 'cc-number',\n },\n})\nexport class TuiInputCard implements OnInit {\n private readonly icons = inject(TUI_PAYMENT_SYSTEM_ICONS);\n private readonly control = inject(NgControl);\n private readonly value = toSignal(\n timer(0).pipe(switchMap(() => tuiControlValue<string>(this.control))),\n {initialValue: ''},\n );\n\n private readonly accessor = inject(DefaultValueAccessor, {\n self: true,\n optional: true,\n });\n\n protected readonly mask = tuiMaskito(TUI_MASK_CARD);\n protected readonly image = computed(\n (s = tuiGetPaymentSystem(this.value())) => (s && this.icons[s]) || '',\n );\n\n public readonly binChange = outputFromObservable(\n toObservable(this.value).pipe(\n map((v) => (v.length < 6 ? null : v.replace(' ', '').slice(0, 6))),\n startWith(null),\n distinctUntilChanged(),\n skip(1),\n ),\n );\n\n public ngOnInit(): void {\n if (!this.accessor) {\n return;\n }\n\n const onChanges = this.accessor.onChange.bind(this.accessor);\n\n this.accessor.onChange = (value: string) =>\n onChanges(value.replaceAll(CHAR_NO_BREAK_SPACE, ''));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MA6Ca,YAAY,CAAA;AAxBzB,IAAA,WAAA,GAAA;AAyBqB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACxC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;AAC3B,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAC7B,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,eAAe,CAAS,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EACrE,EAAC,YAAY,EAAE,EAAE,EAAC,CACrB;AAEgB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,EAAE;AACrD,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,QAAQ,EAAE,IAAI;AACjB,SAAA,CAAC;AAEiB,QAAA,IAAA,CAAA,IAAI,GAAG,UAAU,CAAC,aAAa,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAC/B,CAAC,CAAC,GAAG,mBAAmB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,C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AAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;;;KAST,EAVS,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,oLAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,WAAW,gDAAE,mBAAmB,EAAA,QAAA,EAAA,kCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAsBjC,YAAY,EAAA,UAAA,EAAA,CAAA;kBAxBxB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,WACtB,CAAC,WAAW,EAAE,mBAAmB,CAAC,EACjC,QAAA,EAAA;;;;;;;;;AAST,IAAA,CAAA,EAAA,aAAA,EAEc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAC9C,IAAA,EAAA;AACF,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,WAAW,EAAE,qBAAqB;AAClC,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,YAAY,EAAE,WAAW;AAC5B,qBAAA,EAAA,MAAA,EAAA,CAAA,oLAAA,CAAA,EAAA;;;AC3CL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-commerce-components-input-card.mjs","sources":["../../../projects/addon-commerce/components/input-card/input-card.component.ts","../../../projects/addon-commerce/components/input-card/input-cvc.directive.ts","../../../projects/addon-commerce/components/input-card/input-expire.directive.ts","../../../projects/addon-commerce/components/input-card/input-card.ts","../../../projects/addon-commerce/components/input-card/taiga-ui-addon-commerce-components-input-card.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n type OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {outputFromObservable, toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {DefaultValueAccessor, NgControl} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {TUI_MASK_CARD} from '@taiga-ui/addon-commerce/constants';\nimport {TUI_PAYMENT_SYSTEM_ICONS} from '@taiga-ui/addon-commerce/tokens';\nimport {tuiGetPaymentSystem} from '@taiga-ui/addon-commerce/utils';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {TuiIconPipe} from '@taiga-ui/core/components/icon';\nimport {TuiWithInput} from '@taiga-ui/core/components/input';\nimport {TuiTextfieldContent} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\nimport {distinctUntilChanged, map, skip, startWith, switchMap, timer} from 'rxjs';\n\n@Component({\n selector: 'input[tuiInputCard]',\n imports: [TuiIconPipe, TuiTextfieldContent],\n template: `\n @if (image()) {\n <img\n *tuiTextfieldContent\n alt=\"\"\n class=\"t-payment-system\"\n [src]=\"image() | tuiIcon\"\n />\n }\n `,\n styleUrl: './input-card.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [MaskitoDirective, TuiWithInput],\n host: {\n inputmode: 'numeric',\n placeholder: '0000 0000 0000 0000',\n ngSkipHydration: 'true',\n autocomplete: 'cc-number',\n },\n})\nexport class TuiInputCardComponent implements OnInit {\n private readonly icons = inject(TUI_PAYMENT_SYSTEM_ICONS);\n private readonly control = inject(NgControl);\n private readonly value = toSignal(\n timer(0).pipe(switchMap(() => tuiControlValue<string>(this.control))),\n {initialValue: ''},\n );\n\n private readonly accessor = inject(DefaultValueAccessor, {\n self: true,\n optional: true,\n });\n\n protected readonly mask = tuiMaskito(TUI_MASK_CARD);\n protected readonly image = computed(\n (s = tuiGetPaymentSystem(this.value())) => (s && this.icons[s]) || '',\n );\n\n public readonly binChange = outputFromObservable(\n toObservable(this.value).pipe(\n map((v) => (v.length < 6 ? null : v.replace(' ', '').slice(0, 6))),\n startWith(null),\n distinctUntilChanged(),\n skip(1),\n ),\n );\n\n public ngOnInit(): void {\n if (!this.accessor) {\n return;\n }\n\n const onChanges = this.accessor.onChange.bind(this.accessor);\n\n this.accessor.onChange = (value: string) =>\n onChanges(value.replaceAll(CHAR_NO_BREAK_SPACE, ''));\n }\n}\n","import {computed, Directive, input} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {TUI_MASK_CVC} from '@taiga-ui/addon-commerce/constants';\nimport {TuiWithInput} from '@taiga-ui/core/components/input';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\n@Directive({\n selector: 'input[tuiInputCVC]',\n hostDirectives: [MaskitoDirective, TuiWithInput],\n host: {\n inputmode: 'numeric',\n autocomplete: 'cc-csc',\n '[placeholder]': '\"0\".repeat(length())',\n '[style.-webkit-text-security]': 'hidden() ? \"disc\" : null',\n '(copy.prevent)': '(0)',\n },\n})\nexport class TuiInputCVCDirective {\n protected readonly mask = tuiMaskito(computed(() => TUI_MASK_CVC(this.length())));\n\n public readonly hidden = input(true);\n\n public readonly length = input<3 | 4>(3);\n}\n","import {Directive} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {TUI_MASK_EXPIRE} from '@taiga-ui/addon-commerce/constants';\nimport {TuiWithInput} from '@taiga-ui/core/components/input';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\n@Directive({\n selector: 'input[tuiInputExpire]',\n hostDirectives: [MaskitoDirective, TuiWithInput],\n host: {\n inputmode: 'numeric',\n placeholder: '00/00',\n translate: 'no',\n maxlength: '5',\n name: 'ccexpiryyear',\n autocomplete: 'cc-exp',\n },\n})\nexport class TuiInputExpireDirective {\n protected readonly mask = tuiMaskito(TUI_MASK_EXPIRE);\n}\n","import {TuiTextfield} from '@taiga-ui/core/components/textfield';\n\nimport {TuiInputCardComponent} from './input-card.component';\nimport {TuiInputCVCDirective} from './input-cvc.directive';\nimport {TuiInputExpireDirective} from './input-expire.directive';\n\nexport const TuiInputCard = [\n TuiInputCardComponent,\n TuiInputCVCDirective,\n TuiInputExpireDirective,\n TuiTextfield,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MA8Ca,qBAAqB,CAAA;AAxBlC,IAAA,WAAA,GAAA;AAyBqB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACxC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;AAC3B,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAC7B,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,eAAe,CAAS,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EACrE,EAAC,YAAY,EAAE,EAAE,EAAC,CACrB;AAEgB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,EAAE;AACrD,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,QAAQ,EAAE,IAAI;AACjB,SAAA,CAAC;AAEiB,QAAA,IAAA,CAAA,IAAI,GAAG,UAAU,CAAC,aAAa,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAC/B,CAAC,CAAC,GAAG,mBAAmB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CACxE;AAEe,QAAA,IAAA,CAAA,SAAS,GAAG,oBAAoB,CAC5C,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CACzB,GAAG,CAAC,CA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AAA,GAAA;AAauB,QAAA,IAAA,CAAA,IAAI,GAAG,UAAU,CAAC,eAAe,CAAC;AACxD;+GAFY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,WAAA,EAAA,IAAA,EAAA,WAAA,EAAA,GAAA,EAAA,MAAA,EAAA,cAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAZnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,YAAY,CAAC;AAChD,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,WAAW,EAAE,OAAO;AACpB,wBAAA,SAAS,EAAE,IAAI;AACf,wBAAA,SAAS,EAAE,GAAG;AACd,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,YAAY,EAAE,QAAQ;AACzB,qBAAA;AACJ,iBAAA;;;ACXY,MAAA,YAAY,GAAG;IACxB,qBAAqB;IACrB,oBAAoB;IACpB,uBAAuB;IACvB,YAAY;;;ACVhB;;AAEG;;;;"}
@@ -1,7 +1,5 @@
1
1
  export * from '@taiga-ui/addon-commerce/components/input-card';
2
2
  export * from '@taiga-ui/addon-commerce/components/input-card-group';
3
- export * from '@taiga-ui/addon-commerce/components/input-cvc';
4
- export * from '@taiga-ui/addon-commerce/components/input-expire';
5
3
  export * from '@taiga-ui/addon-commerce/components/thumbnail-card';
6
4
 
7
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-commerce-components.mjs","sources":["../../../projects/addon-commerce/components/taiga-ui-addon-commerce-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"taiga-ui-addon-commerce-components.mjs","sources":["../../../projects/addon-commerce/components/taiga-ui-addon-commerce-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;AAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-commerce",
3
- "version": "4.52.0-canary.c91900a",
3
+ "version": "4.52.0-canary.ca43bcb",
4
4
  "description": "Extension package for Taiga UI related to commerce, payment systems, currencies etc.",
5
5
  "keywords": [
6
6
  "angular",
@@ -53,14 +53,14 @@
53
53
  "types": "./pipes/index.d.ts",
54
54
  "default": "./fesm2022/taiga-ui-addon-commerce-pipes.mjs"
55
55
  },
56
- "./types": {
57
- "types": "./types/index.d.ts",
58
- "default": "./fesm2022/taiga-ui-addon-commerce-types.mjs"
59
- },
60
56
  "./tokens": {
61
57
  "types": "./tokens/index.d.ts",
62
58
  "default": "./fesm2022/taiga-ui-addon-commerce-tokens.mjs"
63
59
  },
60
+ "./types": {
61
+ "types": "./types/index.d.ts",
62
+ "default": "./fesm2022/taiga-ui-addon-commerce-types.mjs"
63
+ },
64
64
  "./utils": {
65
65
  "types": "./utils/index.d.ts",
66
66
  "default": "./fesm2022/taiga-ui-addon-commerce-utils.mjs"
@@ -77,14 +77,6 @@
77
77
  "types": "./components/input-card-group/index.d.ts",
78
78
  "default": "./fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs"
79
79
  },
80
- "./components/input-cvc": {
81
- "types": "./components/input-cvc/index.d.ts",
82
- "default": "./fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs"
83
- },
84
- "./components/input-expire": {
85
- "types": "./components/input-expire/index.d.ts",
86
- "default": "./fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs"
87
- },
88
80
  "./components/thumbnail-card": {
89
81
  "types": "./components/thumbnail-card/index.d.ts",
90
82
  "default": "./fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs"
@@ -1 +0,0 @@
1
- export * from './input-cvc.directive';
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@maskito/angular";
3
- import * as i2 from "@taiga-ui/core/components/textfield";
4
- export declare class TuiInputCVC {
5
- protected readonly mask: import("@angular/core").Signal<import("@maskito/core").MaskitoOptions | null>;
6
- readonly hidden: import("@angular/core").InputSignal<boolean>;
7
- readonly length: import("@angular/core").InputSignal<3 | 4>;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputCVC, never>;
9
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiInputCVC, "input[tuiInputCVC]", never, { "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "length": { "alias": "length"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithTextfield; inputs: {}; outputs: {}; }]>;
10
- }
@@ -1 +0,0 @@
1
- export * from './input-expire.directive';
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@maskito/angular";
3
- import * as i2 from "@taiga-ui/core/components/textfield";
4
- export declare class TuiInputExpire {
5
- protected readonly mask: import("@angular/core").WritableSignal<import("@maskito/core").MaskitoOptions | null>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputExpire, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiInputExpire, "input[tuiInputExpire]", never, {}, {}, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithTextfield; inputs: {}; outputs: {}; }]>;
8
- }
@@ -1,39 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { computed, input, Directive } from '@angular/core';
3
- import * as i1 from '@maskito/angular';
4
- import { MaskitoDirective } from '@maskito/angular';
5
- import { TUI_MASK_CVC } from '@taiga-ui/addon-commerce/constants';
6
- import * as i2 from '@taiga-ui/core/components/textfield';
7
- import { TuiWithTextfield } from '@taiga-ui/core/components/textfield';
8
- import { tuiMaskito } from '@taiga-ui/kit/utils';
9
-
10
- class TuiInputCVC {
11
- constructor() {
12
- this.mask = tuiMaskito(computed(() => TUI_MASK_CVC(this.length())));
13
- this.hidden = input(true);
14
- this.length = input(3);
15
- }
16
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCVC, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
17
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiInputCVC, isStandalone: true, selector: "input[tuiInputCVC]", inputs: { hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "inputmode": "numeric", "autocomplete": "cc-csc" }, listeners: { "copy.prevent": "(0)" }, properties: { "placeholder": "\"0\".repeat(length())", "style.-webkit-text-security": "hidden() ? \"disc\" : null" } }, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithTextfield }], ngImport: i0 }); }
18
- }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCVC, decorators: [{
20
- type: Directive,
21
- args: [{
22
- selector: 'input[tuiInputCVC]',
23
- hostDirectives: [MaskitoDirective, TuiWithTextfield],
24
- host: {
25
- inputmode: 'numeric',
26
- autocomplete: 'cc-csc',
27
- '[placeholder]': '"0".repeat(length())',
28
- '[style.-webkit-text-security]': 'hidden() ? "disc" : null',
29
- '(copy.prevent)': '(0)',
30
- },
31
- }]
32
- }] });
33
-
34
- /**
35
- * Generated bundle index. Do not edit.
36
- */
37
-
38
- export { TuiInputCVC };
39
- //# sourceMappingURL=taiga-ui-addon-commerce-components-input-cvc.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-addon-commerce-components-input-cvc.mjs","sources":["../../../projects/addon-commerce/components/input-cvc/input-cvc.directive.ts","../../../projects/addon-commerce/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.ts"],"sourcesContent":["import {computed, Directive, input} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {TUI_MASK_CVC} from '@taiga-ui/addon-commerce/constants';\nimport {TuiWithTextfield} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\n@Directive({\n selector: 'input[tuiInputCVC]',\n hostDirectives: [MaskitoDirective, TuiWithTextfield],\n host: {\n inputmode: 'numeric',\n autocomplete: 'cc-csc',\n '[placeholder]': '\"0\".repeat(length())',\n '[style.-webkit-text-security]': 'hidden() ? \"disc\" : null',\n '(copy.prevent)': '(0)',\n },\n})\nexport class TuiInputCVC {\n protected readonly mask = tuiMaskito(computed(() => TUI_MASK_CVC(this.length())));\n\n public readonly hidden = input(true);\n\n public readonly length = input<3 | 4>(3);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAiBa,WAAW,CAAA;AAXxB,IAAA,WAAA,GAAA;AAYuB,QAAA,IAAA,CAAA,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEjE,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,IAAI,CAA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BAAsB;AACvC,wBAAA,+BAA+B,EAAE,0BAA0B;AAC3D,wBAAA,gBAAgB,EAAE,KAAK;AAC1B,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
@@ -1,38 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Directive } from '@angular/core';
3
- import * as i1 from '@maskito/angular';
4
- import { MaskitoDirective } from '@maskito/angular';
5
- import { TUI_MASK_EXPIRE } from '@taiga-ui/addon-commerce/constants';
6
- import * as i2 from '@taiga-ui/core/components/textfield';
7
- import { TuiWithTextfield } from '@taiga-ui/core/components/textfield';
8
- import { tuiMaskito } from '@taiga-ui/kit/utils';
9
-
10
- class TuiInputExpire {
11
- constructor() {
12
- this.mask = tuiMaskito(TUI_MASK_EXPIRE);
13
- }
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputExpire, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
15
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputExpire, isStandalone: true, selector: "input[tuiInputExpire]", host: { attributes: { "inputmode": "numeric", "placeholder": "00/00", "translate": "no", "maxlength": "5", "name": "ccexpiryyear", "autocomplete": "cc-exp" } }, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithTextfield }], ngImport: i0 }); }
16
- }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputExpire, decorators: [{
18
- type: Directive,
19
- args: [{
20
- selector: 'input[tuiInputExpire]',
21
- hostDirectives: [MaskitoDirective, TuiWithTextfield],
22
- host: {
23
- inputmode: 'numeric',
24
- placeholder: '00/00',
25
- translate: 'no',
26
- maxlength: '5',
27
- name: 'ccexpiryyear',
28
- autocomplete: 'cc-exp',
29
- },
30
- }]
31
- }] });
32
-
33
- /**
34
- * Generated bundle index. Do not edit.
35
- */
36
-
37
- export { TuiInputExpire };
38
- //# sourceMappingURL=taiga-ui-addon-commerce-components-input-expire.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-addon-commerce-components-input-expire.mjs","sources":["../../../projects/addon-commerce/components/input-expire/input-expire.directive.ts","../../../projects/addon-commerce/components/input-expire/taiga-ui-addon-commerce-components-input-expire.ts"],"sourcesContent":["import {Directive} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {TUI_MASK_EXPIRE} from '@taiga-ui/addon-commerce/constants';\nimport {TuiWithTextfield} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\n@Directive({\n selector: 'input[tuiInputExpire]',\n hostDirectives: [MaskitoDirective, TuiWithTextfield],\n host: {\n inputmode: 'numeric',\n placeholder: '00/00',\n translate: 'no',\n maxlength: '5',\n name: 'ccexpiryyear',\n autocomplete: 'cc-exp',\n },\n})\nexport class TuiInputExpire {\n protected readonly mask = tuiMaskito(TUI_MASK_EXPIRE);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,cAAc,CAAA;AAZ3B,IAAA,WAAA,GAAA;AAauB,QAAA,IAAA,CAAA,IAAI,GAAG,UAAU,CAAC,eAAe,CAAC;AACxD;+GAFY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,WAAA,EAAA,IAAA,EAAA,WAAA,EAAA,GAAA,EAAA,MAAA,EAAA,cAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;AACpD,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,WAAW,EAAE,OAAO;AACpB,wBAAA,SAAS,EAAE,IAAI;AACf,wBAAA,SAAS,EAAE,GAAG;AACd,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,YAAY,EAAE,QAAQ;AACzB,qBAAA;AACJ,iBAAA;;;ACjBD;;AAEG;;;;"}