Skip to content

Commit

Permalink
Merge branch 'main' into directive-binding
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea authored Jun 4, 2024
2 parents 8f55a4b + ed55717 commit 602f78f
Show file tree
Hide file tree
Showing 76 changed files with 1,848 additions and 1,390 deletions.
87 changes: 47 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@
"@nx/jest": "18.3.4",
"@nx/workspace": "18.3.4",
"@schematics/angular": "16.2.12",
"@taiga-ui/browserslist-config": "0.6.0",
"@taiga-ui/commitlint-config": "0.7.5",
"@taiga-ui/cspell-config": "0.40.0",
"@taiga-ui/eslint-plugin-experience": "0.75.3",
"@taiga-ui/prettier-config": "0.11.9",
"@taiga-ui/stylelint-config": "0.22.3",
"@taiga-ui/tsconfig": "0.17.0",
"@taiga-ui/browserslist-config": "0.94.0",
"@taiga-ui/commitlint-config": "0.94.0",
"@taiga-ui/cspell-config": "0.94.0",
"@taiga-ui/eslint-plugin-experience": "0.94.0",
"@taiga-ui/prettier-config": "0.94.0",
"@taiga-ui/stylelint-config": "0.94.0",
"@taiga-ui/tsconfig": "0.94.0",
"@tinkoff/ng-event-plugins": "3.2.0",
"@types/glob": "8.1.0",
"@types/loader-utils": "2.0.6",
"@types/node": "20.14.0",
"@types/node": "20.14.1",
"@types/webpack-env": "1.18.5",
"cpy-cli": "5.0.0",
"glob": "10.4.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import {Directive, EventEmitter, inject, Input, Output} from '@angular/core';
import type {TuiInputCardOptions} from '@taiga-ui/addon-commerce/components/input-card';
import type {TuiPaymentSystem} from '@taiga-ui/addon-commerce/types';
import {TUI_PAYMENT_SYSTEM_ICONS} from '@taiga-ui/addon-commerce/utils';
import type {TuiFocusableElementAccessor, TuiNativeFocusableElement} from '@taiga-ui/cdk';
import {AbstractTuiNullableControl, tuiPure} from '@taiga-ui/cdk';
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';

import type {TuiInputCardOptions} from './input-card.options';

@Directive()
export abstract class AbstractTuiInputCard<
T,
Expand All @@ -23,7 +22,7 @@ export abstract class AbstractTuiInputCard<
public cardSrc: PolymorpheusContent;

@Input()
public autocompleteEnabled = this.options.autocompleteEnabled;
public autocompleteEnabled = this.options.autocomplete;

@Output()
public readonly binChange = new EventEmitter<string | null>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './abstract-input-card';
export * from './input-card-grouped.component';
export * from './input-card-grouped.options';
export * from './input-card-grouped.providers';
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {MaskitoDirective} from '@maskito/angular';
import type {MaskitoOptions} from '@maskito/core';
import {maskitoDateOptionsGenerator} from '@maskito/kit';
import {ResizeObserverModule} from '@ng-web-apis/resize-observer';
import {AbstractTuiInputCard} from '@taiga-ui/addon-commerce/components/input-card';
import {TUI_CARD_MASK} from '@taiga-ui/addon-commerce/constants';
import {TuiFormatCardPipe} from '@taiga-ui/addon-commerce/pipes';
import type {TuiCard, TuiCodeCVCLength} from '@taiga-ui/addon-commerce/types';
Expand Down Expand Up @@ -56,6 +55,7 @@ import {TuiChevronDirective} from '@taiga-ui/kit';
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';

import {AbstractTuiInputCard} from './abstract-input-card';
import type {TuiInputCardGroupedOptions} from './input-card-grouped.options';
import {TUI_INPUT_CARD_GROUPED_OPTIONS} from './input-card-grouped.options';
import {TUI_INPUT_CARD_GROUPED_TEXTS} from './input-card-grouped.providers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ describe('InputCardGrouped', () => {

it('input-card-grouped have a default icon', () => {
expect(testComponent.control.valid).toBe(true);
expect(testComponent.component.defaultIcon).toBe('tuiIconVisaMono');
expect(testComponent.component.icon).toBe('tuiIconVisaMono');
expect(testComponent.component.defaultIcon).toBe('tuiIconVisa');
expect(testComponent.component.icon).toBe('tuiIconVisa');
expect(testComponent.control.value).toEqual({card: '4111 1111 1111 1111'});

expect(expectCardOutlet()).toBeFalsy();
Expand All @@ -219,7 +219,7 @@ describe('InputCardGrouped', () => {
testComponent.component.cardSrc = 'tuiIconMastercard';

expect(testComponent.control.valid).toBe(true);
expect(testComponent.component.defaultIcon).toBe('tuiIconVisaMono');
expect(testComponent.component.defaultIcon).toBe('tuiIconVisa');
expect(testComponent.component.icon).toBe('tuiIconMastercard');
expect(testComponent.control.value).toEqual({card: '4111 1111 1111 1111'});

Expand All @@ -233,7 +233,7 @@ describe('InputCardGrouped', () => {
fixture.componentInstance.customIconTemplate;

expect(testComponent.control.valid).toBe(true);
expect(testComponent.component.defaultIcon).toBe('tuiIconVisaMono');
expect(testComponent.component.defaultIcon).toBe('tuiIconVisa');
expect(testComponent.component.icon).toBeInstanceOf(TemplateRef);
expect(testComponent.control.value).toEqual({card: '4111 1111 1111 1111'});

Expand Down
3 changes: 1 addition & 2 deletions projects/addon-commerce/components/input-card/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './abstract-input-card';
export * from './input-card.component';
export * from './input-card.directive';
export * from './input-card.options';
Loading

0 comments on commit 602f78f

Please sign in to comment.