@taiga-ui/addon-commerce 4.52.0-canary.6af05be → 4.52.0-canary.6c67ccf
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.
- package/components/input-card/index.d.ts +0 -1
- package/components/input-card/input-card.component.d.ts +3 -9
- package/components/input-card-group/input-card-group.component.d.ts +1 -3
- package/components/input-card-group/input-card-group.options.d.ts +1 -2
- package/components/input-cvc/input-cvc.directive.d.ts +1 -3
- package/components/input-expire/input-expire.directive.d.ts +1 -3
- package/components/thumbnail-card/thumbnail-card.component.d.ts +1 -3
- package/components/thumbnail-card/thumbnail-card.options.d.ts +0 -2
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs +15 -21
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs +30 -61
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs +5 -10
- package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs +5 -10
- package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs +7 -12
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-constants.mjs +3 -25
- package/fesm2022/taiga-ui-addon-commerce-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs +3 -3
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs +3 -3
- package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs +3 -3
- package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs +3 -3
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs +11 -11
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-types.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-utils.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-validators.mjs.map +1 -1
- package/package.json +12 -46
- package/components/input-card/input-card.options.d.ts +0 -12
- package/esm2022/components/index.mjs +0 -6
- package/esm2022/components/input-card/index.mjs +0 -3
- package/esm2022/components/input-card/input-card.component.mjs +0 -86
- package/esm2022/components/input-card/input-card.options.mjs +0 -15
- package/esm2022/components/input-card/taiga-ui-addon-commerce-components-input-card.mjs +0 -5
- package/esm2022/components/input-card-group/index.mjs +0 -4
- package/esm2022/components/input-card-group/input-card-group.component.mjs +0 -332
- package/esm2022/components/input-card-group/input-card-group.options.mjs +0 -19
- package/esm2022/components/input-card-group/input-card-group.providers.mjs +0 -30
- package/esm2022/components/input-card-group/taiga-ui-addon-commerce-components-input-card-group.mjs +0 -5
- package/esm2022/components/input-cvc/index.mjs +0 -2
- package/esm2022/components/input-cvc/input-cvc.directive.mjs +0 -47
- package/esm2022/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.mjs +0 -5
- package/esm2022/components/input-expire/index.mjs +0 -2
- package/esm2022/components/input-expire/input-expire.directive.mjs +0 -38
- package/esm2022/components/input-expire/taiga-ui-addon-commerce-components-input-expire.mjs +0 -5
- package/esm2022/components/taiga-ui-addon-commerce-components.mjs +0 -5
- package/esm2022/components/thumbnail-card/index.mjs +0 -3
- package/esm2022/components/thumbnail-card/taiga-ui-addon-commerce-components-thumbnail-card.mjs +0 -5
- package/esm2022/components/thumbnail-card/thumbnail-card.component.mjs +0 -35
- package/esm2022/components/thumbnail-card/thumbnail-card.options.mjs +0 -10
- package/esm2022/constants/default-card-validator.mjs +0 -3
- package/esm2022/constants/index.mjs +0 -6
- package/esm2022/constants/mask-card-holder.mjs +0 -51
- package/esm2022/constants/mask-card.mjs +0 -29
- package/esm2022/constants/mask-cvc.mjs +0 -5
- package/esm2022/constants/mask-expire.mjs +0 -6
- package/esm2022/constants/taiga-ui-addon-commerce-constants.mjs +0 -5
- package/esm2022/index.mjs +0 -8
- package/esm2022/pipes/amount/amount.options.mjs +0 -14
- package/esm2022/pipes/amount/amount.pipe.mjs +0 -45
- package/esm2022/pipes/amount/amount.types.mjs +0 -2
- package/esm2022/pipes/amount/amount.utils.mjs +0 -11
- package/esm2022/pipes/amount/index.mjs +0 -4
- package/esm2022/pipes/amount/taiga-ui-addon-commerce-pipes-amount.mjs +0 -5
- package/esm2022/pipes/currency/currency.pipe.mjs +0 -19
- package/esm2022/pipes/currency/index.mjs +0 -2
- package/esm2022/pipes/currency/taiga-ui-addon-commerce-pipes-currency.mjs +0 -5
- package/esm2022/pipes/decimal/decimal.pipe.mjs +0 -28
- package/esm2022/pipes/decimal/index.mjs +0 -2
- package/esm2022/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.mjs +0 -5
- package/esm2022/pipes/format-card/format-card.pipe.mjs +0 -24
- package/esm2022/pipes/format-card/index.mjs +0 -2
- package/esm2022/pipes/format-card/taiga-ui-addon-commerce-pipes-format-card.mjs +0 -5
- package/esm2022/pipes/index.mjs +0 -5
- package/esm2022/pipes/taiga-ui-addon-commerce-pipes.mjs +0 -5
- package/esm2022/taiga-ui-addon-commerce.mjs +0 -5
- package/esm2022/tokens/i18n.mjs +0 -22
- package/esm2022/tokens/index.mjs +0 -3
- package/esm2022/tokens/payment-system-icons.mjs +0 -20
- package/esm2022/tokens/taiga-ui-addon-commerce-tokens.mjs +0 -5
- package/esm2022/types/currency-code.mjs +0 -410
- package/esm2022/types/currency-variants.mjs +0 -2
- package/esm2022/types/currency.mjs +0 -419
- package/esm2022/types/index.mjs +0 -3
- package/esm2022/types/payment-system.mjs +0 -2
- package/esm2022/types/taiga-ui-addon-commerce-types.mjs +0 -5
- package/esm2022/utils/format-currency.mjs +0 -12
- package/esm2022/utils/get-code-by-currency.mjs +0 -52
- package/esm2022/utils/get-currency-by-code.mjs +0 -52
- package/esm2022/utils/get-currency-symbol.mjs +0 -139
- package/esm2022/utils/get-payment-system.mjs +0 -105
- package/esm2022/utils/index.mjs +0 -9
- package/esm2022/utils/is-card-length-valid.mjs +0 -22
- package/esm2022/utils/is-card-number-valid.mjs +0 -18
- package/esm2022/utils/is-expire-valid.mjs +0 -10
- package/esm2022/utils/taiga-ui-addon-commerce-utils.mjs +0 -5
- package/esm2022/validators/card-expire.validator.mjs +0 -8
- package/esm2022/validators/card-number.validator.mjs +0 -8
- package/esm2022/validators/index.mjs +0 -4
- package/esm2022/validators/luhn.validator.mjs +0 -6
- package/esm2022/validators/taiga-ui-addon-commerce-validators.mjs +0 -5
|
@@ -1,58 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
2
|
+
import { inject, computed, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { toSignal, outputFromObservable, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { NgControl, DefaultValueAccessor } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@maskito/angular';
|
|
6
6
|
import { MaskitoDirective } from '@maskito/angular';
|
|
7
7
|
import { TUI_MASK_CARD } from '@taiga-ui/addon-commerce/constants';
|
|
8
8
|
import { TUI_PAYMENT_SYSTEM_ICONS } from '@taiga-ui/addon-commerce/tokens';
|
|
9
|
+
import { tuiGetPaymentSystem } from '@taiga-ui/addon-commerce/utils';
|
|
9
10
|
import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
10
11
|
import { tuiControlValue } from '@taiga-ui/cdk/observables';
|
|
12
|
+
import { TuiIconPipe } from '@taiga-ui/core/components/icon';
|
|
11
13
|
import * as i2 from '@taiga-ui/core/components/textfield';
|
|
12
14
|
import { TuiTextfieldContent, TuiWithTextfield } from '@taiga-ui/core/components/textfield';
|
|
13
|
-
import { tuiInjectIconResolver } from '@taiga-ui/core/tokens';
|
|
14
15
|
import { tuiMaskito } from '@taiga-ui/kit/utils';
|
|
15
16
|
import { timer, switchMap, map, startWith, distinctUntilChanged, skip } from 'rxjs';
|
|
16
|
-
import { tuiGetPaymentSystem } from '@taiga-ui/addon-commerce/utils';
|
|
17
|
-
import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
18
|
-
|
|
19
|
-
const TUI_INPUT_CARD_DEFAULT_OPTIONS = {
|
|
20
|
-
icon: null,
|
|
21
|
-
paymentSystemHandler: tuiGetPaymentSystem,
|
|
22
|
-
autocomplete: false,
|
|
23
|
-
};
|
|
24
|
-
const TUI_INPUT_CARD_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_CARD_OPTIONS' : '', {
|
|
25
|
-
factory: () => TUI_INPUT_CARD_DEFAULT_OPTIONS,
|
|
26
|
-
});
|
|
27
|
-
function tuiInputCardOptionsProvider(options) {
|
|
28
|
-
return tuiProvideOptions(TUI_INPUT_CARD_OPTIONS, options, TUI_INPUT_CARD_DEFAULT_OPTIONS);
|
|
29
|
-
}
|
|
30
17
|
|
|
31
18
|
class TuiInputCard {
|
|
32
19
|
constructor() {
|
|
33
20
|
this.icons = inject(TUI_PAYMENT_SYSTEM_ICONS);
|
|
34
|
-
this.options = inject(TUI_INPUT_CARD_OPTIONS);
|
|
35
|
-
this.resolver = tuiInjectIconResolver();
|
|
36
21
|
this.control = inject(NgControl);
|
|
37
22
|
this.value = toSignal(timer(0).pipe(switchMap(() => tuiControlValue(this.control))), { initialValue: '' });
|
|
38
|
-
this.icon = signal(this.options.icon);
|
|
39
23
|
this.accessor = inject(DefaultValueAccessor, {
|
|
40
24
|
self: true,
|
|
41
25
|
optional: true,
|
|
42
26
|
});
|
|
43
27
|
this.mask = tuiMaskito(TUI_MASK_CARD);
|
|
44
|
-
this.image = computed(() =>
|
|
45
|
-
|
|
46
|
-
const icon = system && this.icons[system] && this.resolver(this.icons[system]);
|
|
47
|
-
const url = this.icon() || icon;
|
|
48
|
-
return url && this.icon() !== '' ? url : null;
|
|
49
|
-
});
|
|
50
|
-
/** @deprecated apparently "off" doesn't disable autocomplete */
|
|
51
|
-
this.autocomplete = this.options.autocomplete;
|
|
52
|
-
this.binChange = toObservable(this.value).pipe(map((value) => (value.length < 6 ? null : value.replace(' ', '').slice(0, 6))), startWith(null), distinctUntilChanged(), skip(1));
|
|
53
|
-
}
|
|
54
|
-
set iconValue(icon) {
|
|
55
|
-
this.icon.set(icon);
|
|
28
|
+
this.image = computed((s = tuiGetPaymentSystem(this.value())) => (s && this.icons[s]) || '');
|
|
29
|
+
this.binChange = outputFromObservable(toObservable(this.value).pipe(map((v) => (v.length < 6 ? null : v.replace(' ', '').slice(0, 6))), startWith(null), distinctUntilChanged(), skip(1)));
|
|
56
30
|
}
|
|
57
31
|
ngOnInit() {
|
|
58
32
|
if (!this.accessor) {
|
|
@@ -61,45 +35,40 @@ class TuiInputCard {
|
|
|
61
35
|
const onChanges = this.accessor.onChange.bind(this.accessor);
|
|
62
36
|
this.accessor.onChange = (value) => onChanges(value.replaceAll(CHAR_NO_BREAK_SPACE, ''));
|
|
63
37
|
}
|
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
65
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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: `
|
|
40
|
+
@if (image()) {
|
|
41
|
+
<img
|
|
42
|
+
*tuiTextfieldContent
|
|
43
|
+
alt=""
|
|
44
|
+
class="t-payment-system"
|
|
45
|
+
[src]="image() | tuiIcon"
|
|
46
|
+
/>
|
|
47
|
+
}
|
|
48
|
+
`, 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: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }, { kind: "pipe", type: TuiIconPipe, name: "tuiIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
74
49
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCard, decorators: [{
|
|
76
51
|
type: Component,
|
|
77
|
-
args: [{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
52
|
+
args: [{ selector: 'input[tuiInputCard]', imports: [TuiTextfieldContent, TuiIconPipe], template: `
|
|
53
|
+
@if (image()) {
|
|
54
|
+
<img
|
|
55
|
+
*tuiTextfieldContent
|
|
56
|
+
alt=""
|
|
57
|
+
class="t-payment-system"
|
|
58
|
+
[src]="image() | tuiIcon"
|
|
59
|
+
/>
|
|
60
|
+
}
|
|
85
61
|
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [MaskitoDirective, TuiWithTextfield], host: {
|
|
86
62
|
inputmode: 'numeric',
|
|
87
63
|
placeholder: '0000 0000 0000 0000',
|
|
88
64
|
ngSkipHydration: 'true',
|
|
89
65
|
autocomplete: 'cc-number',
|
|
90
|
-
}, styles: ["tui-textfield .t-payment-system{
|
|
91
|
-
}]
|
|
92
|
-
type: Input
|
|
93
|
-
}], binChange: [{
|
|
94
|
-
type: Output
|
|
95
|
-
}], iconValue: [{
|
|
96
|
-
type: Input,
|
|
97
|
-
args: ['icon']
|
|
98
|
-
}] } });
|
|
66
|
+
}, 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
|
+
}] });
|
|
99
68
|
|
|
100
69
|
/**
|
|
101
70
|
* Generated bundle index. Do not edit.
|
|
102
71
|
*/
|
|
103
72
|
|
|
104
|
-
export {
|
|
73
|
+
export { TuiInputCard };
|
|
105
74
|
//# 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.
|
|
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: [TuiTextfieldContent, TuiIconPipe],\n template: `\n @if (image()) {\n <img\n *tuiTextfieldContent\n alt=\"\"\n class=\"t-payment-system\"\n [src]=\"image() | tuiIcon\"\n />\n }\n `,\n styleUrls: ['./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,CAAC,KAAK,EAAE,CACxE;AAEe,QAAA,IAAA,CAAA,SAAS,GAAG,oBAAoB,CAC5C,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CACzB,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,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A,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,mBAAmB,wEAAE,WAAW,EAAA,IAAA,EAAA,SAAA,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,mBAAmB,EAAE,WAAW,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,8 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Input, Directive } from '@angular/core';
|
|
3
3
|
import * as i1 from '@maskito/angular';
|
|
4
4
|
import { MaskitoDirective } from '@maskito/angular';
|
|
5
|
-
import { TUI_INPUT_CARD_OPTIONS } from '@taiga-ui/addon-commerce/components/input-card';
|
|
6
5
|
import { TUI_MASK_CVC } from '@taiga-ui/addon-commerce/constants';
|
|
7
6
|
import * as i2 from '@taiga-ui/core/components/textfield';
|
|
8
7
|
import { TuiWithTextfield } from '@taiga-ui/core/components/textfield';
|
|
@@ -11,8 +10,6 @@ import { tuiMaskito } from '@taiga-ui/kit/utils';
|
|
|
11
10
|
class TuiInputCVC {
|
|
12
11
|
constructor() {
|
|
13
12
|
this.mask = tuiMaskito(TUI_MASK_CVC(3));
|
|
14
|
-
/** @deprecated apparently "off" doesn't disable autocomplete */
|
|
15
|
-
this.autocomplete = inject(TUI_INPUT_CARD_OPTIONS).autocomplete;
|
|
16
13
|
this.hidden = true;
|
|
17
14
|
this.length = 3;
|
|
18
15
|
}
|
|
@@ -20,10 +17,10 @@ class TuiInputCVC {
|
|
|
20
17
|
ngOnChanges() {
|
|
21
18
|
this.mask.set(TUI_MASK_CVC(this.length));
|
|
22
19
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCVC, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
21
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputCVC, isStandalone: true, selector: "input[tuiInputCVC]", inputs: { hidden: "hidden", length: "length" }, host: { attributes: { "inputmode": "numeric", "autocomplete": "cc-csc" }, listeners: { "copy.prevent": "(0)" }, properties: { "placeholder": "\"0\".repeat(length)", "style.-webkit-text-security": "hidden ? \"disc\" : null" } }, usesOnChanges: true, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithTextfield }], ngImport: i0 }); }
|
|
25
22
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCVC, decorators: [{
|
|
27
24
|
type: Directive,
|
|
28
25
|
args: [{
|
|
29
26
|
standalone: true,
|
|
@@ -37,9 +34,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
37
34
|
'(copy.prevent)': '(0)',
|
|
38
35
|
},
|
|
39
36
|
}]
|
|
40
|
-
}], propDecorators: {
|
|
41
|
-
type: Input
|
|
42
|
-
}], hidden: [{
|
|
37
|
+
}], propDecorators: { hidden: [{
|
|
43
38
|
type: Input
|
|
44
39
|
}], length: [{
|
|
45
40
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
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 {Directive,
|
|
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 {Directive, Input, type OnChanges} 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 standalone: true,\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 implements OnChanges {\n private readonly mask = tuiMaskito(TUI_MASK_CVC(3));\n\n @Input()\n public hidden = true;\n\n @Input()\n public length: 3 | 4 = 3;\n\n // TODO: refactor to signal inputs after Angular update\n public ngOnChanges(): void {\n this.mask.set(TUI_MASK_CVC(this.length));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\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E;AACF,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,YAAY,EAAE,QAAQ;AACtB,wBAAA,eAAe,EAAE,oBAAoB;AACrC,wBAAA,+BAA+B,EAAE,wBAAwB;AACzD,wBAAA,gBAAgB,EAAE,KAAK;AAC1B,qBAAA;AACJ,iBAAA;8BAKU,MAAM,EAAA,CAAA;sBADZ;gBAIM,MAAM,EAAA,CAAA;sBADZ;;;ACxBL;;AAEG;;;;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Directive } from '@angular/core';
|
|
3
3
|
import * as i1 from '@maskito/angular';
|
|
4
4
|
import { MaskitoDirective } from '@maskito/angular';
|
|
5
|
-
import { TUI_INPUT_CARD_OPTIONS } from '@taiga-ui/addon-commerce/components/input-card';
|
|
6
5
|
import { TUI_MASK_EXPIRE } from '@taiga-ui/addon-commerce/constants';
|
|
7
6
|
import * as i2 from '@taiga-ui/core/components/textfield';
|
|
8
7
|
import { TuiWithTextfield } from '@taiga-ui/core/components/textfield';
|
|
@@ -11,13 +10,11 @@ import { tuiMaskito } from '@taiga-ui/kit/utils';
|
|
|
11
10
|
class TuiInputExpire {
|
|
12
11
|
constructor() {
|
|
13
12
|
this.mask = tuiMaskito(TUI_MASK_EXPIRE);
|
|
14
|
-
/** @deprecated apparently "off" doesn't disable autocomplete */
|
|
15
|
-
this.autocomplete = inject(TUI_INPUT_CARD_OPTIONS).autocomplete;
|
|
16
13
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
18
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
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 }); }
|
|
19
16
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputExpire, decorators: [{
|
|
21
18
|
type: Directive,
|
|
22
19
|
args: [{
|
|
23
20
|
standalone: true,
|
|
@@ -32,9 +29,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
32
29
|
autocomplete: 'cc-exp',
|
|
33
30
|
},
|
|
34
31
|
}]
|
|
35
|
-
}]
|
|
36
|
-
type: Input
|
|
37
|
-
}] } });
|
|
32
|
+
}] });
|
|
38
33
|
|
|
39
34
|
/**
|
|
40
35
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 standalone: true,\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":";;;;;;;;;MAmBa,cAAc,CAAA;AAb3B,IAAA,WAAA,GAAA;AAcuB,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;kBAb1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,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;;;AClBD;;AAEG;;;;"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { NgIf } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject,
|
|
4
|
-
import { TuiIcon
|
|
2
|
+
import { InjectionToken, inject, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
5
4
|
import { TUI_PAYMENT_SYSTEM_ICONS } from '@taiga-ui/addon-commerce/tokens';
|
|
6
5
|
|
|
7
6
|
const TUI_THUMBNAIL_CARD_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_THUMBNAIL_CARD_OPTIONS' : '', {
|
|
8
7
|
factory: () => ({
|
|
9
8
|
icons: inject(TUI_PAYMENT_SYSTEM_ICONS),
|
|
10
9
|
size: 'm',
|
|
11
|
-
monoHandler: (ps) => ps === 'mir' || ps === 'visa' || ps === 'electron',
|
|
12
10
|
}),
|
|
13
11
|
});
|
|
14
12
|
|
|
@@ -19,16 +17,15 @@ class TuiThumbnailCard {
|
|
|
19
17
|
this.paymentSystem = null;
|
|
20
18
|
this.iconStart = '';
|
|
21
19
|
this.iconEnd = '';
|
|
22
|
-
this.monoHandler = this.options.monoHandler;
|
|
23
20
|
}
|
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiThumbnailCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiThumbnailCard, isStandalone: true, selector: "tui-thumbnail-card", inputs: { size: "size", paymentSystem: "paymentSystem", iconStart: "iconStart", iconEnd: "iconEnd" }, host: { properties: { "attr.data-size": "size" } }, ngImport: i0, template: "<div class=\"t-left t-icon\">\n <ng-content select=\"img\">\n @if (iconStart) {\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconStart\"\n />\n }\n </ng-content>\n</div>\n\n@if (iconEnd) {\n <tui-icon\n class=\"t-right t-icon\"\n [icon]=\"iconEnd\"\n />\n}\n\n<div class=\"t-content\">\n <ng-content />\n</div>\n\n@if (paymentSystem) {\n <tui-icon\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n />\n}\n", styles: [":host{position:relative;display:inline-block;flex-shrink:0;background:#000;color:#fff;transform-style:preserve-3d;overflow:hidden;box-shadow:inset 0 0 0 1px var(--tui-background-neutral-1);--t-logo-height: .8125rem}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";border-radius:inherit}:host:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";backface-visibility:hidden;transform:rotateY(180deg) translateZ(1px);color:#b0b0b0;border-radius:inherit;background:linear-gradient(to bottom,currentColor 0 20%,#959595 20% 40%,currentColor 40%)}:host[data-size=xs],:host[data-size=s]{font-size:0;border-radius:.25rem}:host[data-size=xs]{inline-size:2rem;block-size:1.375rem}:host[data-size=s]{inline-size:2.5rem;block-size:1.625rem}:host[data-size=m]{inline-size:3rem;block-size:2rem;border-radius:.3125rem;font:normal .5625rem / var(--t-logo-height) var(--tui-font-text)}:host[data-size=l]{inline-size:3.375rem;block-size:2.25rem;border-radius:.375rem;font:normal .6875rem / var(--t-logo-height) var(--tui-font-text)}.t-left{position:absolute;top:0;left:0;display:flex;transform-origin:top left}:host[data-size=xs] .t-left,:host[data-size=s] .t-left{transform:translate(.125rem,.125rem) scale(.625)}:host[data-size=m] .t-left{transform:translate(.1875rem,.1875rem) scale(.75)}:host[data-size=l] .t-left{transform:translate(.1875rem,.1875rem)}.t-right{position:absolute;top:.1875rem;right:.1875rem}:host[data-size=xs] .t-right,:host[data-size=s] .t-right{display:none}:host[data-size=m] .t-right{font-size:.875rem}:host[data-size=m] .t-right:before{transform:scale(.5)}:host[data-size=l] .t-right:before{transform:scale(.625)}.t-right:after{--tui-icon-size: 100%;position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";z-index:-1;display:block;transform:none;border-radius:100%;background:currentColor;opacity:.35}.t-right:before{color:#fff}.t-logo{position:absolute;right:.25rem;bottom:0;block-size:var(--t-logo-height);transform-origin:right}:host[data-size=xs] .t-logo{right:.125rem}:host[data-size=m] .t-logo,:host[data-size=l] .t-logo{bottom:.0625rem}.t-logo:before{block-size:100%;background-position:right;-webkit-mask-position:right;mask-position:right;-webkit-mask-size:contain;mask-size:contain}.t-content{position:absolute}:host[data-size=m] .t-content{left:.1875rem;bottom:.0625rem}:host[data-size=l] .t-content{left:.25rem;bottom:.0625rem}.t-icon{inline-size:1em;block-size:1em;font-size:1rem}\n"], dependencies: [{ kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
26
23
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiThumbnailCard, decorators: [{
|
|
28
25
|
type: Component,
|
|
29
|
-
args: [{
|
|
26
|
+
args: [{ selector: 'tui-thumbnail-card', imports: [TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
30
27
|
'[attr.data-size]': 'size',
|
|
31
|
-
}, template: "
|
|
28
|
+
}, template: "<div class=\"t-left t-icon\">\n <ng-content select=\"img\">\n @if (iconStart) {\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconStart\"\n />\n }\n </ng-content>\n</div>\n\n@if (iconEnd) {\n <tui-icon\n class=\"t-right t-icon\"\n [icon]=\"iconEnd\"\n />\n}\n\n<div class=\"t-content\">\n <ng-content />\n</div>\n\n@if (paymentSystem) {\n <tui-icon\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n />\n}\n", styles: [":host{position:relative;display:inline-block;flex-shrink:0;background:#000;color:#fff;transform-style:preserve-3d;overflow:hidden;box-shadow:inset 0 0 0 1px var(--tui-background-neutral-1);--t-logo-height: .8125rem}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";border-radius:inherit}:host:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";backface-visibility:hidden;transform:rotateY(180deg) translateZ(1px);color:#b0b0b0;border-radius:inherit;background:linear-gradient(to bottom,currentColor 0 20%,#959595 20% 40%,currentColor 40%)}:host[data-size=xs],:host[data-size=s]{font-size:0;border-radius:.25rem}:host[data-size=xs]{inline-size:2rem;block-size:1.375rem}:host[data-size=s]{inline-size:2.5rem;block-size:1.625rem}:host[data-size=m]{inline-size:3rem;block-size:2rem;border-radius:.3125rem;font:normal .5625rem / var(--t-logo-height) var(--tui-font-text)}:host[data-size=l]{inline-size:3.375rem;block-size:2.25rem;border-radius:.375rem;font:normal .6875rem / var(--t-logo-height) var(--tui-font-text)}.t-left{position:absolute;top:0;left:0;display:flex;transform-origin:top left}:host[data-size=xs] .t-left,:host[data-size=s] .t-left{transform:translate(.125rem,.125rem) scale(.625)}:host[data-size=m] .t-left{transform:translate(.1875rem,.1875rem) scale(.75)}:host[data-size=l] .t-left{transform:translate(.1875rem,.1875rem)}.t-right{position:absolute;top:.1875rem;right:.1875rem}:host[data-size=xs] .t-right,:host[data-size=s] .t-right{display:none}:host[data-size=m] .t-right{font-size:.875rem}:host[data-size=m] .t-right:before{transform:scale(.5)}:host[data-size=l] .t-right:before{transform:scale(.625)}.t-right:after{--tui-icon-size: 100%;position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";z-index:-1;display:block;transform:none;border-radius:100%;background:currentColor;opacity:.35}.t-right:before{color:#fff}.t-logo{position:absolute;right:.25rem;bottom:0;block-size:var(--t-logo-height);transform-origin:right}:host[data-size=xs] .t-logo{right:.125rem}:host[data-size=m] .t-logo,:host[data-size=l] .t-logo{bottom:.0625rem}.t-logo:before{block-size:100%;background-position:right;-webkit-mask-position:right;mask-position:right;-webkit-mask-size:contain;mask-size:contain}.t-content{position:absolute}:host[data-size=m] .t-content{left:.1875rem;bottom:.0625rem}:host[data-size=l] .t-content{left:.25rem;bottom:.0625rem}.t-icon{inline-size:1em;block-size:1em;font-size:1rem}\n"] }]
|
|
32
29
|
}], propDecorators: { size: [{
|
|
33
30
|
type: Input
|
|
34
31
|
}], paymentSystem: [{
|
|
@@ -37,8 +34,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
37
34
|
type: Input
|
|
38
35
|
}], iconEnd: [{
|
|
39
36
|
type: Input
|
|
40
|
-
}], monoHandler: [{
|
|
41
|
-
type: Input
|
|
42
37
|
}] } });
|
|
43
38
|
|
|
44
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-components-thumbnail-card.mjs","sources":["../../../projects/addon-commerce/components/thumbnail-card/thumbnail-card.options.ts","../../../projects/addon-commerce/components/thumbnail-card/thumbnail-card.component.ts","../../../projects/addon-commerce/components/thumbnail-card/thumbnail-card.template.html","../../../projects/addon-commerce/components/thumbnail-card/taiga-ui-addon-commerce-components-thumbnail-card.ts"],"sourcesContent":["import {inject, InjectionToken} from '@angular/core';\nimport {TUI_PAYMENT_SYSTEM_ICONS} from '@taiga-ui/addon-commerce/tokens';\nimport {type TuiPaymentSystem} from '@taiga-ui/addon-commerce/types';\nimport {type
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-components-thumbnail-card.mjs","sources":["../../../projects/addon-commerce/components/thumbnail-card/thumbnail-card.options.ts","../../../projects/addon-commerce/components/thumbnail-card/thumbnail-card.component.ts","../../../projects/addon-commerce/components/thumbnail-card/thumbnail-card.template.html","../../../projects/addon-commerce/components/thumbnail-card/taiga-ui-addon-commerce-components-thumbnail-card.ts"],"sourcesContent":["import {inject, InjectionToken} from '@angular/core';\nimport {TUI_PAYMENT_SYSTEM_ICONS} from '@taiga-ui/addon-commerce/tokens';\nimport {type TuiPaymentSystem} from '@taiga-ui/addon-commerce/types';\nimport {type TuiSizeL, type TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiThumbnailCardOptions {\n readonly size: TuiSizeL | TuiSizeXS;\n readonly icons: Record<TuiPaymentSystem, string>;\n}\n\nexport const TUI_THUMBNAIL_CARD_OPTIONS = new InjectionToken<TuiThumbnailCardOptions>(\n ngDevMode ? 'TUI_THUMBNAIL_CARD_OPTIONS' : '',\n {\n factory: () => ({\n icons: inject(TUI_PAYMENT_SYSTEM_ICONS),\n size: 'm',\n }),\n },\n);\n","import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {type TuiPaymentSystem} from '@taiga-ui/addon-commerce/types';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {type TuiSizeL, type TuiSizeXS} from '@taiga-ui/core/types';\n\nimport {TUI_THUMBNAIL_CARD_OPTIONS} from './thumbnail-card.options';\n\n@Component({\n selector: 'tui-thumbnail-card',\n imports: [TuiIcon],\n templateUrl: './thumbnail-card.template.html',\n styleUrls: ['./thumbnail-card.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiThumbnailCard {\n protected readonly options = inject(TUI_THUMBNAIL_CARD_OPTIONS);\n\n @Input()\n public size: TuiSizeL | TuiSizeXS = this.options.size;\n\n @Input()\n public paymentSystem: TuiPaymentSystem | null = null;\n\n @Input()\n public iconStart = '';\n\n @Input()\n public iconEnd = '';\n}\n","<div class=\"t-left t-icon\">\n <ng-content select=\"img\">\n @if (iconStart) {\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconStart\"\n />\n }\n </ng-content>\n</div>\n\n@if (iconEnd) {\n <tui-icon\n class=\"t-right t-icon\"\n [icon]=\"iconEnd\"\n />\n}\n\n<div class=\"t-content\">\n <ng-content />\n</div>\n\n@if (paymentSystem) {\n <tui-icon\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n />\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAUa,MAAA,0BAA0B,GAAG,IAAI,cAAc,CACxD,SAAS,GAAG,4BAA4B,GAAG,EAAE,EAC7C;AACI,IAAA,OAAO,EAAE,OAAO;AACZ,QAAA,KAAK,EAAE,MAAM,CAAC,wBAAwB,CAAC;AACvC,QAAA,IAAI,EAAE,GAAG;KACZ,CAAC;AACL,CAAA;;MCAQ,gBAAgB,CAAA;AAV7B,IAAA,WAAA,GAAA;AAWuB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,0BAA0B,CAAC;AAGxD,QAAA,IAAA,CAAA,IAAI,GAAyB,IAAI,CAAC,OAAO,CAAC,IAAI;QAG9C,IAAa,CAAA,aAAA,GAA4B,IAAI;QAG7C,IAAS,CAAA,SAAA,GAAG,EAAE;QAGd,IAAO,CAAA,OAAA,GAAG,EAAE;AACtB;+GAdY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,aAAA,EAAA,eAAA,EAAA,SAAA,EAAA,WAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECjB7B,ohBA4BA,EAAA,MAAA,EAAA,CAAA,i7EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDnBc,OAAO,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAQR,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAV5B,SAAS;+BACI,oBAAoB,EAAA,OAAA,EACrB,CAAC,OAAO,CAAC,mBAGD,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,MAAM;AAC7B,qBAAA,EAAA,QAAA,EAAA,ohBAAA,EAAA,MAAA,EAAA,CAAA,i7EAAA,CAAA,EAAA;8BAMM,IAAI,EAAA,CAAA;sBADV;gBAIM,aAAa,EAAA,CAAA;sBADnB;gBAIM,SAAS,EAAA,CAAA;sBADf;gBAIM,OAAO,EAAA,CAAA;sBADb;;;AE7BL;;AAEG;;;;"}
|
|
@@ -1,35 +1,13 @@
|
|
|
1
1
|
import { tuiIsCardLengthValid, tuiIsCardNumberValid } from '@taiga-ui/addon-commerce/utils';
|
|
2
|
+
import { maskitoInitialCalibrationPlugin } from '@maskito/core';
|
|
2
3
|
import { TUI_DIGIT_REGEXP, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
3
4
|
import { maskitoDateOptionsGenerator } from '@maskito/kit';
|
|
4
5
|
|
|
5
6
|
const tuiDefaultCardValidator = (card) => card.length > 11 && tuiIsCardLengthValid(card) && tuiIsCardNumberValid(card);
|
|
6
7
|
|
|
7
8
|
const TUI_MASK_CARD = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
TUI_DIGIT_REGEXP,
|
|
11
|
-
TUI_DIGIT_REGEXP,
|
|
12
|
-
TUI_DIGIT_REGEXP,
|
|
13
|
-
CHAR_NO_BREAK_SPACE,
|
|
14
|
-
TUI_DIGIT_REGEXP,
|
|
15
|
-
TUI_DIGIT_REGEXP,
|
|
16
|
-
TUI_DIGIT_REGEXP,
|
|
17
|
-
TUI_DIGIT_REGEXP,
|
|
18
|
-
CHAR_NO_BREAK_SPACE,
|
|
19
|
-
TUI_DIGIT_REGEXP,
|
|
20
|
-
TUI_DIGIT_REGEXP,
|
|
21
|
-
TUI_DIGIT_REGEXP,
|
|
22
|
-
TUI_DIGIT_REGEXP,
|
|
23
|
-
CHAR_NO_BREAK_SPACE,
|
|
24
|
-
TUI_DIGIT_REGEXP,
|
|
25
|
-
TUI_DIGIT_REGEXP,
|
|
26
|
-
TUI_DIGIT_REGEXP,
|
|
27
|
-
TUI_DIGIT_REGEXP,
|
|
28
|
-
CHAR_NO_BREAK_SPACE,
|
|
29
|
-
TUI_DIGIT_REGEXP,
|
|
30
|
-
TUI_DIGIT_REGEXP,
|
|
31
|
-
TUI_DIGIT_REGEXP,
|
|
32
|
-
],
|
|
9
|
+
plugins: [maskitoInitialCalibrationPlugin()],
|
|
10
|
+
mask: Array.from({ length: 23 }).map((_, i) => (i + 1) % 5 ? TUI_DIGIT_REGEXP : CHAR_NO_BREAK_SPACE),
|
|
33
11
|
};
|
|
34
12
|
|
|
35
13
|
const MAP = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-constants.mjs","sources":["../../../projects/addon-commerce/constants/default-card-validator.ts","../../../projects/addon-commerce/constants/mask-card.ts","../../../projects/addon-commerce/constants/mask-card-holder.ts","../../../projects/addon-commerce/constants/mask-cvc.ts","../../../projects/addon-commerce/constants/mask-expire.ts","../../../projects/addon-commerce/constants/taiga-ui-addon-commerce-constants.ts"],"sourcesContent":["import {tuiIsCardLengthValid, tuiIsCardNumberValid} from '@taiga-ui/addon-commerce/utils';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\n\nexport const tuiDefaultCardValidator: TuiBooleanHandler<string> = (card) =>\n card.length > 11 && tuiIsCardLengthValid(card) && tuiIsCardNumberValid(card);\n","import {type MaskitoOptions} from '@maskito/core';\nimport {CHAR_NO_BREAK_SPACE, TUI_DIGIT_REGEXP} from '@taiga-ui/cdk/constants';\n\nexport const TUI_MASK_CARD: MaskitoOptions = {\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-constants.mjs","sources":["../../../projects/addon-commerce/constants/default-card-validator.ts","../../../projects/addon-commerce/constants/mask-card.ts","../../../projects/addon-commerce/constants/mask-card-holder.ts","../../../projects/addon-commerce/constants/mask-cvc.ts","../../../projects/addon-commerce/constants/mask-expire.ts","../../../projects/addon-commerce/constants/taiga-ui-addon-commerce-constants.ts"],"sourcesContent":["import {tuiIsCardLengthValid, tuiIsCardNumberValid} from '@taiga-ui/addon-commerce/utils';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\n\nexport const tuiDefaultCardValidator: TuiBooleanHandler<string> = (card) =>\n card.length > 11 && tuiIsCardLengthValid(card) && tuiIsCardNumberValid(card);\n","import {maskitoInitialCalibrationPlugin, type MaskitoOptions} from '@maskito/core';\nimport {CHAR_NO_BREAK_SPACE, TUI_DIGIT_REGEXP} from '@taiga-ui/cdk/constants';\n\nexport const TUI_MASK_CARD: MaskitoOptions = {\n plugins: [maskitoInitialCalibrationPlugin()],\n mask: Array.from({length: 23}).map((_, i) =>\n (i + 1) % 5 ? TUI_DIGIT_REGEXP : CHAR_NO_BREAK_SPACE,\n ),\n};\n","import {type MaskitoOptions} from '@maskito/core';\n\nconst MAP: Record<string, string> = {\n А: 'F',\n В: 'D',\n Г: 'U',\n Д: 'L',\n Е: 'T',\n З: 'P',\n И: 'B',\n Й: 'Q',\n К: 'R',\n Л: 'K',\n М: 'V',\n Н: 'Y',\n О: 'J',\n П: 'G',\n Р: 'H',\n С: 'C',\n Т: 'N',\n У: 'E',\n Ф: 'A',\n Ц: 'W',\n Ч: 'X',\n Ш: 'I',\n Щ: 'O',\n Ы: 'S',\n Ь: 'M',\n Я: 'Z',\n};\n\nfunction toEnglishUppercase(value: string): string {\n return value\n .toUpperCase()\n .split('')\n .map((char) => MAP[char] || char)\n .join('');\n}\n\nexport const TUI_MASK_CARD_HOLDER: MaskitoOptions = {\n mask: /^[a-z\\s]+$/i,\n preprocessors: [\n ({elementState, data}) => {\n const {value, selection} = elementState;\n\n return {\n elementState: {\n selection,\n value: toEnglishUppercase(value),\n },\n data: toEnglishUppercase(data),\n };\n },\n ],\n};\n","import {type MaskitoOptions} from '@maskito/core';\nimport {TUI_DIGIT_REGEXP} from '@taiga-ui/cdk/constants';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\n\nexport const TUI_MASK_CVC: TuiHandler<number, MaskitoOptions> = (length) => ({\n mask: new Array(length).fill(TUI_DIGIT_REGEXP),\n});\n","import {maskitoDateOptionsGenerator} from '@maskito/kit';\n\nexport const TUI_MASK_EXPIRE = maskitoDateOptionsGenerator({\n mode: 'mm/yy',\n separator: '/',\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGa,MAAA,uBAAuB,GAA8B,CAAC,IAAI,KACnE,IAAI,CAAC,MAAM,GAAG,EAAE,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAC,IAAI;;ACDlE,MAAA,aAAa,GAAmB;AACzC,IAAA,OAAO,EAAE,CAAC,+BAA+B,EAAE,CAAC;AAC5C,IAAA,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KACpC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,gBAAgB,GAAG,mBAAmB,CACvD;;;ACLL,MAAM,GAAG,GAA2B;AAChC,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EA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AAA,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;aACjC;SACJ;AACJ,KAAA;;;MCjDQ,YAAY,GAAuC,CAAC,MAAM,MAAM;IACzE,IAAI,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;AACjD,CAAA;;ACJM,MAAM,eAAe,GAAG,2BAA2B,CAAC;AACvD,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,SAAS,EAAE,GAAG;AACjB,CAAA;;ACLD;;AAEG;;;;"}
|
|
@@ -56,10 +56,10 @@ class TuiAmountPipe {
|
|
|
56
56
|
: `${sign}${currencySymbol}${space}${formatted}`;
|
|
57
57
|
}));
|
|
58
58
|
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
60
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAmountPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
60
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiAmountPipe, isStandalone: true, name: "tuiAmount" }); }
|
|
61
61
|
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAmountPipe, decorators: [{
|
|
63
63
|
type: Pipe,
|
|
64
64
|
args: [{ standalone: true, name: 'tuiAmount' }]
|
|
65
65
|
}] });
|
|
@@ -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 {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({standalone: true, name: 'tuiAmount'})\nexport class TuiAmountPipe implements PipeTransform {\n private readonly options = inject(TUI_AMOUNT_OPTIONS);\n private readonly format = 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
|
|
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 {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({standalone: true, name: 'tuiAmount'})\nexport class TuiAmountPipe implements PipeTransform {\n private readonly options = inject(TUI_AMOUNT_OPTIONS);\n private readonly format = 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,I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a,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;AAAC,YAAA,IAAA,EAAA,CAAA,EAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAC;;;ACd3C;;AAEG;;;;"}
|
|
@@ -6,10 +6,10 @@ class TuiCurrencyPipe {
|
|
|
6
6
|
transform(currency) {
|
|
7
7
|
return tuiFormatCurrency(currency);
|
|
8
8
|
}
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCurrencyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
10
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiCurrencyPipe, isStandalone: true, name: "tuiCurrency" }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCurrencyPipe, decorators: [{
|
|
13
13
|
type: Pipe,
|
|
14
14
|
args: [{
|
|
15
15
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-pipes-currency.mjs","sources":["../../../projects/addon-commerce/pipes/currency/currency.pipe.ts","../../../projects/addon-commerce/pipes/currency/taiga-ui-addon-commerce-pipes-currency.ts"],"sourcesContent":["import {Pipe, type PipeTransform} from '@angular/core';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiFormatCurrency} from '@taiga-ui/addon-commerce/utils';\n\n@Pipe({\n standalone: true,\n name: 'tuiCurrency',\n})\nexport class TuiCurrencyPipe implements PipeTransform {\n public transform(currency: TuiCurrencyVariants): string {\n return tuiFormatCurrency(currency);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-pipes-currency.mjs","sources":["../../../projects/addon-commerce/pipes/currency/currency.pipe.ts","../../../projects/addon-commerce/pipes/currency/taiga-ui-addon-commerce-pipes-currency.ts"],"sourcesContent":["import {Pipe, type PipeTransform} from '@angular/core';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiFormatCurrency} from '@taiga-ui/addon-commerce/utils';\n\n@Pipe({\n standalone: true,\n name: 'tuiCurrency',\n})\nexport class TuiCurrencyPipe implements PipeTransform {\n public transform(currency: TuiCurrencyVariants): string {\n return tuiFormatCurrency(currency);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAQa,eAAe,CAAA;AACjB,IAAA,SAAS,CAAC,QAA6B,EAAA;AAC1C,QAAA,OAAO,iBAAiB,CAAC,QAAQ,CAAC;;+GAF7B,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,aAAa;AACtB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -18,10 +18,10 @@ class TuiDecimalPipe {
|
|
|
18
18
|
return decimal ? `${format.decimalSeparator}${decimal}` : '';
|
|
19
19
|
}))));
|
|
20
20
|
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDecimalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
22
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiDecimalPipe, isStandalone: true, name: "tuiDecimal" }); }
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDecimalPipe, decorators: [{
|
|
25
25
|
type: Pipe,
|
|
26
26
|
args: [{ standalone: true, name: 'tuiDecimal' }]
|
|
27
27
|
}] });
|