@taiga-ui/addon-commerce 4.52.0-canary.c107f6a → 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.
Files changed (35) hide show
  1. package/README.md +2 -2
  2. package/components/index.d.ts +0 -2
  3. package/components/input-card/index.d.ts +3 -0
  4. package/components/input-card/input-card.component.d.ts +4 -4
  5. package/components/input-card/input-card.d.ts +4 -0
  6. package/components/input-card/input-cvc.directive.d.ts +10 -0
  7. package/components/input-card/input-expire.directive.d.ts +8 -0
  8. package/components/input-card-group/input-card-group.component.d.ts +15 -15
  9. package/components/input-card-group/input-card-group.options.d.ts +1 -3
  10. package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs +27 -50
  11. package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs +65 -10
  13. package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs +2 -2
  15. package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-addon-commerce-components.mjs +0 -2
  17. package/fesm2022/taiga-ui-addon-commerce-components.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-addon-commerce-constants.mjs +1 -1
  19. package/fesm2022/taiga-ui-addon-commerce-constants.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs +25 -24
  21. package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs +17 -10
  23. package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs.map +1 -1
  24. package/package.json +4 -12
  25. package/pipes/amount/amount.options.d.ts +1 -3
  26. package/pipes/amount/amount.pipe.d.ts +5 -2
  27. package/pipes/decimal/decimal.pipe.d.ts +4 -2
  28. package/components/input-cvc/index.d.ts +0 -1
  29. package/components/input-cvc/input-cvc.directive.d.ts +0 -10
  30. package/components/input-expire/index.d.ts +0 -1
  31. package/components/input-expire/input-expire.directive.d.ts +0 -8
  32. package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs +0 -39
  33. package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs.map +0 -1
  34. package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs +0 -38
  35. package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-commerce-pipes-amount.mjs","sources":["../../../projects/addon-commerce/pipes/amount/amount.options.ts","../../../projects/addon-commerce/pipes/amount/amount.utils.ts","../../../projects/addon-commerce/pipes/amount/amount.pipe.ts","../../../projects/addon-commerce/pipes/amount/taiga-ui-addon-commerce-pipes-amount.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\n\nimport {type TuiAmountSign} from './amount.types';\n\nexport interface TuiAmountOptions {\n readonly currency: TuiCurrencyVariants;\n readonly currencyAlign: TuiHorizontalDirection;\n readonly sign: TuiAmountSign;\n}\n\nexport const TUI_AMOUNT_DEFAULT_OPTIONS: TuiAmountOptions = {\n currency: null,\n currencyAlign: 'left',\n sign: 'negative-only',\n};\n\nexport const TUI_AMOUNT_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_AMOUNT_OPTIONS' : '',\n {\n factory: () => TUI_AMOUNT_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiAmountOptionsProvider(options: Partial<TuiAmountOptions>): Provider {\n return tuiProvideOptions(TUI_AMOUNT_OPTIONS, options, TUI_AMOUNT_DEFAULT_OPTIONS);\n}\n","import {CHAR_MINUS, CHAR_PLUS} from '@taiga-ui/cdk/constants';\n\nimport {type TuiAmountSign, type TuiAmountSignSymbol} from './amount.types';\n\nexport function tuiFormatSignSymbol(\n value: number,\n sign: TuiAmountSign,\n): TuiAmountSignSymbol {\n if (sign === 'never' || !value || (sign === 'negative-only' && value > 0)) {\n return '';\n }\n\n if (sign === 'force-negative' || (value < 0 && sign !== 'force-positive')) {\n return CHAR_MINUS;\n }\n\n return CHAR_PLUS;\n}\n","import {inject, Pipe, type PipeTransform} from '@angular/core';\nimport {toObservable} from '@angular/core/rxjs-interop';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiFormatCurrency} from '@taiga-ui/addon-commerce/utils';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiFormatNumber} from '@taiga-ui/core/utils/format';\nimport {map, type Observable} from 'rxjs';\n\nimport {TUI_AMOUNT_OPTIONS} from './amount.options';\nimport {tuiFormatSignSymbol} from './amount.utils';\n\nconst DEFAULT_PRECISION = 2;\n\n@Pipe({name: 'tuiAmount'})\nexport class TuiAmountPipe implements PipeTransform {\n private readonly options = inject(TUI_AMOUNT_OPTIONS);\n private readonly format = toObservable(inject(TUI_NUMBER_FORMAT));\n\n public transform(\n value: number,\n currency: TuiCurrencyVariants = this.options.currency,\n currencyAlign: TuiHorizontalDirection = this.options.currencyAlign,\n ): Observable<string> {\n return this.format.pipe(\n map((format) => {\n const currencySymbol = tuiFormatCurrency(currency);\n const formatted = tuiFormatNumber(Math.abs(value), {\n ...format,\n precision: Number.isNaN(format.precision)\n ? DEFAULT_PRECISION\n : format.precision,\n });\n const sign =\n formatted === '0'\n ? ''\n : tuiFormatSignSymbol(value, this.options.sign);\n const space =\n currencySymbol &&\n (currencySymbol?.length > 1 || currencyAlign === 'right')\n ? CHAR_NO_BREAK_SPACE\n : '';\n\n return currencyAlign === 'right'\n ? `${sign}${formatted}${space}${currencySymbol}`\n : `${sign}${currencySymbol}${space}${formatted}`;\n }),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAaa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,aAAa,EAAE,MAAM;AACrB,IAAA,IAAI,EAAE,eAAe;;AAGZ,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC5C,CAAA;AAGC,SAAU,wBAAwB,CAAC,OAAkC,EAAA;IACvE,OAAO,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC;AACrF;;ACxBgB,SAAA,mBAAmB,CAC/B,KAAa,EACb,IAAmB,EAAA;AAEnB,IAAA,IAAI,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,KAAK,eAAe,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;AACvE,QAAA,OAAO,EAAE;;AAGb,IAAA,IAAI,IAAI,KAAK,gBAAgB,KAAK,KAAK,GAAG,CAAC,IAAI,IAAI,KAAK,gBAAgB,CAAC,EAAE;AACvE,QAAA,OAAO,UAAU;;AAGrB,IAAA,OAAO,SAAS;AACpB;;ACJA,MAAM,iBAAiB,GAAG,CAAC;MAGd,aAAa,CAAA;AAD1B,IAAA,WAAA,GAAA;AAEqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,kBAAkB,CAAC;QACpC,IAAM,CAAA,MAAA,GAAG,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAgCpE;AA9BU,IAAA,SAAS,CACZ,KAAa,EACb,QAAA,GAAgC,IAAI,CAAC,OAAO,CAAC,QAAQ,EACrD,aAAwC,GAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAA;QAElE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACnB,GAAG,CAAC,CAAC,MAAM,KAAI;AACX,YAAA,MAAM,cAAc,GAAG,iBAAiB,CAAC,QAAQ,CAAC;YAClD,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;AAC/C,gBAAA,GAAG,MAAM;gBACT,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS;AACpC,sBAAE;sBACA,MAAM,CAAC,SAAS;AACzB,aAAA,CAAC;AACF,YAAA,MAAM,IAAI,GACN,SAAS,KAAK;AACV,kBAAE;kBACA,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACvD,MAAM,KAAK,GACP,cAAc;iBACb,cAAc,EAAE,MAAM,GAAG,CAAC,IAAI,aAAa,KAAK,OAAO;AACpD,kBAAE;kBACA,EAAE;YAEZ,OAAO,aAAa,KAAK;kBACnB,GAAG,IAAI,CAAA,EAAG,SAAS,CAAG,EAAA,KAAK,CAAG,EAAA,cAAc,CAAE;kBAC9C,CAAG,EAAA,IAAI,CAAG,EAAA,cAAc,GAAG,KAAK,CAAA,EAAG,SAAS,CAAA,CAAE;SACvD,CAAC,CACL;;+GAhCI,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,IAAI;mBAAC,EAAC,IAAI,EAAE,WAAW,EAAC;;;ACfzB;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-commerce-pipes-amount.mjs","sources":["../../../projects/addon-commerce/pipes/amount/amount.options.ts","../../../projects/addon-commerce/pipes/amount/amount.utils.ts","../../../projects/addon-commerce/pipes/amount/amount.pipe.ts","../../../projects/addon-commerce/pipes/amount/taiga-ui-addon-commerce-pipes-amount.ts"],"sourcesContent":["import {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\n\nimport {type TuiAmountSign} from './amount.types';\n\nexport interface TuiAmountOptions {\n readonly currency: TuiCurrencyVariants;\n readonly currencyAlign: TuiHorizontalDirection;\n readonly sign: TuiAmountSign;\n}\n\nexport const TUI_AMOUNT_DEFAULT_OPTIONS: TuiAmountOptions = {\n currency: null,\n currencyAlign: 'left',\n sign: 'negative-only',\n};\n\nexport const [TUI_AMOUNT_OPTIONS, tuiAmountOptionsProvider] = tuiCreateOptions(\n TUI_AMOUNT_DEFAULT_OPTIONS,\n);\n","import {CHAR_MINUS, CHAR_PLUS} from '@taiga-ui/cdk/constants';\n\nimport {type TuiAmountSign, type TuiAmountSignSymbol} from './amount.types';\n\nexport function tuiFormatSignSymbol(\n value: number,\n sign: TuiAmountSign,\n): TuiAmountSignSymbol {\n if (sign === 'never' || !value || (sign === 'negative-only' && value > 0)) {\n return '';\n }\n\n if (sign === 'force-negative' || (value < 0 && sign !== 'force-positive')) {\n return CHAR_MINUS;\n }\n\n return CHAR_PLUS;\n}\n","import {\n computed,\n inject,\n Pipe,\n type PipeTransform,\n signal,\n untracked,\n} from '@angular/core';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiFormatCurrency} from '@taiga-ui/addon-commerce/utils';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiFormatNumber} from '@taiga-ui/core/utils/format';\n\nimport {TUI_AMOUNT_OPTIONS} from './amount.options';\nimport {tuiFormatSignSymbol} from './amount.utils';\n\nconst DEFAULT_PRECISION = 2;\n\n@Pipe({name: 'tuiAmount', pure: false})\nexport class TuiAmountPipe implements PipeTransform {\n private readonly options = inject(TUI_AMOUNT_OPTIONS);\n private readonly format = inject(TUI_NUMBER_FORMAT);\n\n private readonly value = signal(NaN);\n private readonly currency = signal(this.options.currency);\n private readonly currencyAlign = signal(this.options.currencyAlign);\n\n private readonly formatted = computed(() => {\n const format = this.format();\n const currencySymbol = tuiFormatCurrency(this.currency());\n const formatted = tuiFormatNumber(Math.abs(this.value()), {\n ...format,\n precision: Number.isNaN(format.precision)\n ? DEFAULT_PRECISION\n : format.precision,\n });\n const sign =\n formatted === '0' ? '' : tuiFormatSignSymbol(this.value(), this.options.sign);\n const space =\n currencySymbol &&\n (currencySymbol?.length > 1 || this.currencyAlign() === 'right')\n ? CHAR_NO_BREAK_SPACE\n : '';\n\n return this.currencyAlign() === 'right'\n ? `${sign}${formatted}${space}${currencySymbol}`\n : `${sign}${currencySymbol}${space}${formatted}`;\n });\n\n public transform(\n value: number,\n currency: TuiCurrencyVariants = this.options.currency,\n currencyAlign: TuiHorizontalDirection = this.options.currencyAlign,\n ): string {\n untracked(() => {\n this.value.set(value);\n this.currency.set(currency);\n this.currencyAlign.set(currencyAlign);\n });\n\n return this.formatted();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
@@ -1,30 +1,37 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Injector, INJECTOR, Pipe } from '@angular/core';
3
- import { toObservable } from '@angular/core/rxjs-interop';
2
+ import { inject, Injector, INJECTOR, signal, computed, untracked, Pipe } from '@angular/core';
4
3
  import { TuiAmountPipe } from '@taiga-ui/addon-commerce/pipes/amount';
5
4
  import { TUI_NUMBER_FORMAT } from '@taiga-ui/core/tokens';
6
- import { switchMap, map } from 'rxjs';
7
5
 
8
6
  class TuiDecimalPipe {
9
7
  constructor() {
10
- this.format = toObservable(inject(TUI_NUMBER_FORMAT));
8
+ this.format = inject(TUI_NUMBER_FORMAT);
11
9
  this.amountPipe = Injector.create({
12
10
  providers: [{ provide: TuiAmountPipe }],
13
11
  parent: inject(INJECTOR),
14
12
  }).get(TuiAmountPipe);
13
+ this.value = signal(NaN);
14
+ this.currency = signal('');
15
+ this.formatted = computed(() => {
16
+ const format = this.format();
17
+ const amount = this.amountPipe.transform(this.value(), this.currency());
18
+ const [, decimal] = amount.split(format.decimalSeparator);
19
+ return decimal ? `${format.decimalSeparator}${decimal}` : '';
20
+ });
15
21
  }
16
22
  transform(value, currency = '') {
17
- return this.format.pipe(switchMap((format) => this.amountPipe.transform(value, currency).pipe(map((value) => {
18
- const [, decimal] = value.split(format.decimalSeparator);
19
- return decimal ? `${format.decimalSeparator}${decimal}` : '';
20
- }))));
23
+ untracked(() => {
24
+ this.value.set(value);
25
+ this.currency.set(currency);
26
+ });
27
+ return this.formatted();
21
28
  }
22
29
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDecimalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
23
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiDecimalPipe, isStandalone: true, name: "tuiDecimal" }); }
30
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiDecimalPipe, isStandalone: true, name: "tuiDecimal", pure: false }); }
24
31
  }
25
32
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDecimalPipe, decorators: [{
26
33
  type: Pipe,
27
- args: [{ name: 'tuiDecimal' }]
34
+ args: [{ name: 'tuiDecimal', pure: false }]
28
35
  }] });
29
36
 
30
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-commerce-pipes-decimal.mjs","sources":["../../../projects/addon-commerce/pipes/decimal/decimal.pipe.ts","../../../projects/addon-commerce/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.ts"],"sourcesContent":["import {inject, INJECTOR, Injector, Pipe, type PipeTransform} from '@angular/core';\nimport {toObservable} from '@angular/core/rxjs-interop';\nimport {TuiAmountPipe} from '@taiga-ui/addon-commerce/pipes/amount';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\nimport {map, type Observable, switchMap} from 'rxjs';\n\n@Pipe({name: 'tuiDecimal'})\nexport class TuiDecimalPipe implements PipeTransform {\n private readonly format = toObservable(inject(TUI_NUMBER_FORMAT));\n private readonly amountPipe = Injector.create({\n providers: [{provide: TuiAmountPipe}],\n parent: inject(INJECTOR),\n }).get(TuiAmountPipe);\n\n public transform(\n value: number,\n currency: TuiCurrencyVariants = '',\n ): Observable<string> {\n return this.format.pipe(\n switchMap((format) =>\n this.amountPipe.transform(value, currency).pipe(\n map((value) => {\n const [, decimal] = value.split(format.decimalSeparator);\n\n return decimal ? `${format.decimalSeparator}${decimal}` : '';\n }),\n ),\n ),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAQa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;QAEqB,IAAM,CAAA,MAAA,GAAG,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC1C,YAAA,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,aAAa,EAAC,CAAC;AACrC,YAAA,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;AAC3B,SAAA,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;AAkBxB;AAhBU,IAAA,SAAS,CACZ,KAAa,EACb,QAAA,GAAgC,EAAE,EAAA;AAElC,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACnB,SAAS,CAAC,CAAC,MAAM,KACb,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,IAAI,CAC3C,GAAG,CAAC,CAAC,KAAK,KAAI;AACV,YAAA,MAAM,GAAG,OAAO,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;AAExD,YAAA,OAAO,OAAO,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAA,EAAG,OAAO,CAAE,CAAA,GAAG,EAAE;AAChE,SAAC,CAAC,CACL,CACJ,CACJ;;+GArBI,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC;;;ACP1B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-commerce-pipes-decimal.mjs","sources":["../../../projects/addon-commerce/pipes/decimal/decimal.pipe.ts","../../../projects/addon-commerce/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.ts"],"sourcesContent":["import {\n computed,\n inject,\n INJECTOR,\n Injector,\n Pipe,\n type PipeTransform,\n signal,\n untracked,\n} from '@angular/core';\nimport {TuiAmountPipe} from '@taiga-ui/addon-commerce/pipes/amount';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\n\n@Pipe({name: 'tuiDecimal', pure: false})\nexport class TuiDecimalPipe implements PipeTransform {\n private readonly format = inject(TUI_NUMBER_FORMAT);\n private readonly amountPipe = Injector.create({\n providers: [{provide: TuiAmountPipe}],\n parent: inject(INJECTOR),\n }).get(TuiAmountPipe);\n\n private readonly value = signal(NaN);\n private readonly currency = signal<TuiCurrencyVariants>('');\n\n private readonly formatted = computed(() => {\n const format = this.format();\n const amount = this.amountPipe.transform(this.value(), this.currency());\n\n const [, decimal] = amount.split(format.decimalSeparator);\n\n return decimal ? `${format.decimalSeparator}${decimal}` : '';\n });\n\n public transform(value: number, currency: TuiCurrencyVariants = ''): string {\n untracked(() => {\n this.value.set(value);\n this.currency.set(currency);\n });\n\n return this.formatted();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAea,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEqB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAClC,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC1C,YAAA,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,aAAa,EAAC,CAAC;AACrC,YAAA,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;AAC3B,SAAA,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;AAEJ,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC;AACnB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAsB,EAAE,CAAC;AAE1C,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAK;AACvC,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5B,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;AAEvE,YAAA,MAAM,GAAG,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;AAEzD,YAAA,OAAO,OAAO,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAA,EAAG,OAAO,CAAE,CAAA,GAAG,EAAE;AAChE,SAAC,CAAC;AAUL;AARU,IAAA,SAAS,CAAC,KAAa,EAAE,QAAA,GAAgC,EAAE,EAAA;QAC9D,SAAS,CAAC,MAAK;AACX,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;AACrB,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC/B,SAAC,CAAC;AAEF,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE;;+GAzBlB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAC;;;ACdvC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-commerce",
3
- "version": "4.52.0-canary.c107f6a",
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",
@@ -20,9 +20,9 @@
20
20
  "@angular/common": ">=19.0.0",
21
21
  "@angular/core": ">=19.0.0",
22
22
  "@angular/forms": ">=19.0.0",
23
- "@maskito/angular": "^4.0.0",
24
- "@maskito/core": "^4.0.0",
25
- "@maskito/kit": "^4.0.0",
23
+ "@maskito/angular": "^4.0.1",
24
+ "@maskito/core": "^4.0.1",
25
+ "@maskito/kit": "^4.0.1",
26
26
  "@ng-web-apis/common": "^4.12.2",
27
27
  "@taiga-ui/cdk": "^4.52.0",
28
28
  "@taiga-ui/core": "^4.52.0",
@@ -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,4 +1,3 @@
1
- import { InjectionToken, type Provider } from '@angular/core';
2
1
  import { type TuiCurrencyVariants } from '@taiga-ui/addon-commerce/types';
3
2
  import { type TuiHorizontalDirection } from '@taiga-ui/core/types';
4
3
  import { type TuiAmountSign } from './amount.types';
@@ -8,5 +7,4 @@ export interface TuiAmountOptions {
8
7
  readonly sign: TuiAmountSign;
9
8
  }
10
9
  export declare const TUI_AMOUNT_DEFAULT_OPTIONS: TuiAmountOptions;
11
- export declare const TUI_AMOUNT_OPTIONS: InjectionToken<TuiAmountOptions>;
12
- export declare function tuiAmountOptionsProvider(options: Partial<TuiAmountOptions>): Provider;
10
+ export declare const TUI_AMOUNT_OPTIONS: import("@angular/core").InjectionToken<TuiAmountOptions>, tuiAmountOptionsProvider: (item: Partial<TuiAmountOptions> | (() => Partial<TuiAmountOptions>)) => import("@angular/core").FactoryProvider;
@@ -1,12 +1,15 @@
1
1
  import { type PipeTransform } from '@angular/core';
2
2
  import { type TuiCurrencyVariants } from '@taiga-ui/addon-commerce/types';
3
3
  import { type TuiHorizontalDirection } from '@taiga-ui/core/types';
4
- import { type Observable } from 'rxjs';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class TuiAmountPipe implements PipeTransform {
7
6
  private readonly options;
8
7
  private readonly format;
9
- transform(value: number, currency?: TuiCurrencyVariants, currencyAlign?: TuiHorizontalDirection): Observable<string>;
8
+ private readonly value;
9
+ private readonly currency;
10
+ private readonly currencyAlign;
11
+ private readonly formatted;
12
+ transform(value: number, currency?: TuiCurrencyVariants, currencyAlign?: TuiHorizontalDirection): string;
10
13
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiAmountPipe, never>;
11
14
  static ɵpipe: i0.ɵɵPipeDeclaration<TuiAmountPipe, "tuiAmount", true>;
12
15
  }
@@ -1,11 +1,13 @@
1
1
  import { type PipeTransform } from '@angular/core';
2
2
  import { type TuiCurrencyVariants } from '@taiga-ui/addon-commerce/types';
3
- import { type Observable } from 'rxjs';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class TuiDecimalPipe implements PipeTransform {
6
5
  private readonly format;
7
6
  private readonly amountPipe;
8
- transform(value: number, currency?: TuiCurrencyVariants): Observable<string>;
7
+ private readonly value;
8
+ private readonly currency;
9
+ private readonly formatted;
10
+ transform(value: number, currency?: TuiCurrencyVariants): string;
9
11
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDecimalPipe, never>;
10
12
  static ɵpipe: i0.ɵɵPipeDeclaration<TuiDecimalPipe, "tuiDecimal", true>;
11
13
  }
@@ -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,CAAC;AAEpB,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAQ,CAAC,CAAC;AAC3C;+GANY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,SAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,SAAA,EAAA,EAAA,cAAA,EAAA,KAAA,EAAA,EAAA,UAAA,EAAA,EAAA,aAAA,EAAA,wBAAA,EAAA,6BAAA,EAAA,4BAAA,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;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAXvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;AACpD,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,YAAY,EAAE,QAAQ;AACtB,wBAAA,eAAe,EAAE,sBAAsB;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;;;;"}