@taiga-ui/addon-commerce 4.52.0-canary.216e347 → 4.52.0-canary.2c75afa
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/index.d.ts +1 -0
- package/components/input-card-group/input-card-group.component.d.ts +19 -21
- package/components/input-card-group/input-card-group.directive.d.ts +10 -0
- package/components/input-card-group/input-card-group.options.d.ts +1 -2
- package/components/input-card-group/input-card-group.providers.d.ts +4 -3
- package/components/input-cvc/input-cvc.directive.d.ts +5 -9
- package/components/input-expire/input-expire.directive.d.ts +1 -3
- package/components/thumbnail-card/thumbnail-card.component.d.ts +5 -8
- package/components/thumbnail-card/thumbnail-card.options.d.ts +0 -2
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs +99 -121
- 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 +10 -24
- package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs +5 -11
- package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs +13 -26
- 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 +6 -5
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs +3 -4
- package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs +6 -5
- package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs +3 -4
- 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 +16 -47
- package/tokens/i18n.d.ts +2 -2
- 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,45 +1,32 @@
|
|
|
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
|
|
|
15
13
|
class TuiThumbnailCard {
|
|
16
14
|
constructor() {
|
|
17
15
|
this.options = inject(TUI_THUMBNAIL_CARD_OPTIONS);
|
|
18
|
-
this.size = this.options.size;
|
|
19
|
-
this.paymentSystem = null;
|
|
20
|
-
this.iconStart = '';
|
|
21
|
-
this.iconEnd = '';
|
|
22
|
-
this.monoHandler = this.options.monoHandler;
|
|
16
|
+
this.size = input(this.options.size);
|
|
17
|
+
this.paymentSystem = input(null);
|
|
18
|
+
this.iconStart = input('');
|
|
19
|
+
this.iconEnd = input('');
|
|
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: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, paymentSystem: { classPropertyName: "paymentSystem", publicName: "paymentSystem", isSignal: true, isRequired: false, transformFunction: null }, iconStart: { classPropertyName: "iconStart", publicName: "iconStart", isSignal: true, isRequired: false, transformFunction: null }, iconEnd: { classPropertyName: "iconEnd", publicName: "iconEnd", isSignal: true, isRequired: false, transformFunction: null } }, 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@let system = paymentSystem();\n\n@if (system) {\n <tui-icon\n class=\"t-logo\"\n [icon]=\"options.icons[system]\"\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;background-size:contain;-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: [{
|
|
30
|
-
'[attr.data-size]': 'size',
|
|
31
|
-
}, template: "
|
|
32
|
-
}]
|
|
33
|
-
type: Input
|
|
34
|
-
}], paymentSystem: [{
|
|
35
|
-
type: Input
|
|
36
|
-
}], iconStart: [{
|
|
37
|
-
type: Input
|
|
38
|
-
}], iconEnd: [{
|
|
39
|
-
type: Input
|
|
40
|
-
}], monoHandler: [{
|
|
41
|
-
type: Input
|
|
42
|
-
}] } });
|
|
26
|
+
args: [{ selector: 'tui-thumbnail-card', imports: [TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
27
|
+
'[attr.data-size]': 'size()',
|
|
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@let system = paymentSystem();\n\n@if (system) {\n <tui-icon\n class=\"t-logo\"\n [icon]=\"options.icons[system]\"\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;background-size:contain;-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"] }]
|
|
29
|
+
}] });
|
|
43
30
|
|
|
44
31
|
/**
|
|
45
32
|
* Generated bundle index. Do not edit.
|
|
@@ -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 styleUrl: './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 public readonly size = input<TuiSizeL | TuiSizeXS>(this.options.size);\n\n public readonly paymentSystem = input<TuiPaymentSystem | null>(null);\n\n public readonly iconStart = input<string>('');\n\n public readonly iconEnd = input<string>('');\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@let system = paymentSystem();\n\n@if (system) {\n <tui-icon\n class=\"t-logo\"\n [icon]=\"options.icons[system]\"\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;QAE/C,IAAI,CAAA,IAAA,GAAG,KAAK,CAAuB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AAErD,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAA0B,IAAI,CAAC;AAEpD,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,EAAE,CAAC;AAE7B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,EAAE,CAAC;AAC9C;+GAVY,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,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECjB7B,gjBA8BA,EAAA,MAAA,EAAA,CAAA,y8EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDrBc,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,QAAQ;AAC/B,qBAAA,EAAA,QAAA,EAAA,gjBAAA,EAAA,MAAA,EAAA,CAAA,y8EAAA,CAAA,EAAA;;;AEfL;;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,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,CAAC,EAAE,GAAG;CACT;AAED,SAAS,kBAAkB,CAAC,KAAa,EAAA;AACrC,IAAA,OAAO;AACF,SAAA,WAAW;SACX,KAAK,CAAC,EAAE;AACR,SAAA,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI;SAC/B,IAAI,CAAC,EAAE,CAAC;AACjB;AAEa,MAAA,oBAAoB,GAAmB;AAChD,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,aAAa,EAAE;AACX,QAAA,CAAC,EAAC,YAAY,EAAE,IAAI,EAAC,KAAI;AACrB,YAAA,MAAM,EAAC,KAAK,EAAE,SAAS,EAAC,GAAG,YAAY;YAEvC,OAAO;AACH,gBAAA,YAAY,EAAE;oBACV,SAAS;AACT,oBAAA,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC;AACnC,iBAAA;AACD,gBAAA,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;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Pipe } from '@angular/core';
|
|
3
3
|
import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
|
+
import { toObservable } from '@angular/core/rxjs-interop';
|
|
4
5
|
import { tuiFormatCurrency } from '@taiga-ui/addon-commerce/utils';
|
|
5
6
|
import { CHAR_MINUS, CHAR_PLUS, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
6
7
|
import { TUI_NUMBER_FORMAT } from '@taiga-ui/core/tokens';
|
|
@@ -33,7 +34,7 @@ const DEFAULT_PRECISION = 2;
|
|
|
33
34
|
class TuiAmountPipe {
|
|
34
35
|
constructor() {
|
|
35
36
|
this.options = inject(TUI_AMOUNT_OPTIONS);
|
|
36
|
-
this.format = inject(TUI_NUMBER_FORMAT);
|
|
37
|
+
this.format = toObservable(inject(TUI_NUMBER_FORMAT));
|
|
37
38
|
}
|
|
38
39
|
transform(value, currency = this.options.currency, currencyAlign = this.options.currencyAlign) {
|
|
39
40
|
return this.format.pipe(map((format) => {
|
|
@@ -56,12 +57,12 @@ class TuiAmountPipe {
|
|
|
56
57
|
: `${sign}${currencySymbol}${space}${formatted}`;
|
|
57
58
|
}));
|
|
58
59
|
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
60
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAmountPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
61
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiAmountPipe, isStandalone: true, name: "tuiAmount" }); }
|
|
61
62
|
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAmountPipe, decorators: [{
|
|
63
64
|
type: Pipe,
|
|
64
|
-
args: [{
|
|
65
|
+
args: [{ name: 'tuiAmount' }]
|
|
65
66
|
}] });
|
|
66
67
|
|
|
67
68
|
/**
|
|
@@ -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({
|
|
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;;;;"}
|
|
@@ -6,13 +6,12 @@ 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
|
-
standalone: true,
|
|
16
15
|
name: 'tuiCurrency',
|
|
17
16
|
}]
|
|
18
17
|
}] });
|
|
@@ -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
|
|
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 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":";;;;MAOa,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;kBAH3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,aAAa;AACtB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injector, INJECTOR, Pipe } from '@angular/core';
|
|
3
|
+
import { toObservable } from '@angular/core/rxjs-interop';
|
|
3
4
|
import { TuiAmountPipe } from '@taiga-ui/addon-commerce/pipes/amount';
|
|
4
5
|
import { TUI_NUMBER_FORMAT } from '@taiga-ui/core/tokens';
|
|
5
6
|
import { switchMap, map } from 'rxjs';
|
|
6
7
|
|
|
7
8
|
class TuiDecimalPipe {
|
|
8
9
|
constructor() {
|
|
9
|
-
this.format = inject(TUI_NUMBER_FORMAT);
|
|
10
|
+
this.format = toObservable(inject(TUI_NUMBER_FORMAT));
|
|
10
11
|
this.amountPipe = Injector.create({
|
|
11
12
|
providers: [{ provide: TuiAmountPipe }],
|
|
12
13
|
parent: inject(INJECTOR),
|
|
@@ -18,12 +19,12 @@ class TuiDecimalPipe {
|
|
|
18
19
|
return decimal ? `${format.decimalSeparator}${decimal}` : '';
|
|
19
20
|
}))));
|
|
20
21
|
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
22
|
+
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" }); }
|
|
23
24
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDecimalPipe, decorators: [{
|
|
25
26
|
type: Pipe,
|
|
26
|
-
args: [{
|
|
27
|
+
args: [{ name: 'tuiDecimal' }]
|
|
27
28
|
}] });
|
|
28
29
|
|
|
29
30
|
/**
|
|
@@ -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 {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({
|
|
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;;;;"}
|
|
@@ -11,13 +11,12 @@ class TuiFormatCardPipe {
|
|
|
11
11
|
.join('')
|
|
12
12
|
: '';
|
|
13
13
|
}
|
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
15
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatCardPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
15
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatCardPipe, isStandalone: true, name: "tuiFormatCard" }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatCardPipe, decorators: [{
|
|
18
18
|
type: Pipe,
|
|
19
19
|
args: [{
|
|
20
|
-
standalone: true,
|
|
21
20
|
name: 'tuiFormatCard',
|
|
22
21
|
}]
|
|
23
22
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-pipes-format-card.mjs","sources":["../../../projects/addon-commerce/pipes/format-card/format-card.pipe.ts","../../../projects/addon-commerce/pipes/format-card/taiga-ui-addon-commerce-pipes-format-card.ts"],"sourcesContent":["import {Pipe, type PipeTransform} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\n\n@Pipe({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-pipes-format-card.mjs","sources":["../../../projects/addon-commerce/pipes/format-card/format-card.pipe.ts","../../../projects/addon-commerce/pipes/format-card/taiga-ui-addon-commerce-pipes-format-card.ts"],"sourcesContent":["import {Pipe, type PipeTransform} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\n\n@Pipe({\n name: 'tuiFormatCard',\n})\nexport class TuiFormatCardPipe implements PipeTransform {\n public transform(value: string | null = '', cardPrefilled = false): string {\n return value && !cardPrefilled\n ? value\n .split('')\n .map((char, index) =>\n index && index % 4 === 0 ? `${CHAR_NO_BREAK_SPACE}${char}` : char,\n )\n .join('')\n : '';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,iBAAiB,CAAA;AACnB,IAAA,SAAS,CAAC,KAAuB,GAAA,EAAE,EAAE,aAAa,GAAG,KAAK,EAAA;QAC7D,OAAO,KAAK,IAAI,CAAC;AACb,cAAE;iBACK,KAAK,CAAC,EAAE;iBACR,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KACb,KAAK,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,CAAA,EAAG,mBAAmB,CAAA,EAAG,IAAI,CAAA,CAAE,GAAG,IAAI;iBAEpE,IAAI,CAAC,EAAE;cACZ,EAAE;;+GATH,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -26,17 +26,17 @@ const TUI_PAYMENT_SYSTEM_ICONS = new InjectionToken(ngDevMode ? 'TUI_PAYMENT_SYS
|
|
|
26
26
|
mir: '@tui.mir',
|
|
27
27
|
visa: '@tui.visa',
|
|
28
28
|
electron: '@tui.electron',
|
|
29
|
-
mastercard: '@
|
|
30
|
-
maestro: '@
|
|
31
|
-
amex: '@
|
|
32
|
-
dinersclub: '@
|
|
33
|
-
discover: '@
|
|
34
|
-
humo: '@
|
|
35
|
-
jcb: '@
|
|
36
|
-
rupay: '@
|
|
37
|
-
unionpay: '@
|
|
38
|
-
uzcard: '@
|
|
39
|
-
verve: '@
|
|
29
|
+
mastercard: '@img.mastercard',
|
|
30
|
+
maestro: '@img.maestro',
|
|
31
|
+
amex: '@img.amex',
|
|
32
|
+
dinersclub: '@img.diners-club',
|
|
33
|
+
discover: '@img.discover',
|
|
34
|
+
humo: '@img.humo',
|
|
35
|
+
jcb: '@img.jcb',
|
|
36
|
+
rupay: '@img.ru-pay',
|
|
37
|
+
unionpay: '@img.union-pay',
|
|
38
|
+
uzcard: '@img.uzcard',
|
|
39
|
+
verve: '@img.verve',
|
|
40
40
|
}),
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-tokens.mjs","sources":["../../../projects/addon-commerce/tokens/i18n.ts","../../../projects/addon-commerce/tokens/payment-system-icons.ts","../../../projects/addon-commerce/tokens/taiga-ui-addon-commerce-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\nimport {type Observable, of} from 'rxjs';\n\n/**\n * Number and card number i18n\n */\nexport const TUI_CARD_NUMBER_TEXTS = new InjectionToken(\n ngDevMode ? 'TUI_CARD_NUMBER_TEXTS' : '',\n {\n factory: tuiExtractI18n('cardNumber'),\n },\n);\n\n/**\n * Expiry and card expiry i18n\n */\nexport const TUI_CARD_EXPIRY_TEXTS = new InjectionToken(\n ngDevMode ? 'TUI_CARD_EXPIRY_TEXTS' : '',\n {\n factory: tuiExtractI18n('cardExpiry'),\n },\n);\n\n/**\n * Card CVC number text [mobile, desktop]\n */\nexport const TUI_CARD_CVC_TEXTS = new InjectionToken<Observable<[string, string]>>(\n ngDevMode ? 'TUI_CARD_CVC_TEXTS' : '',\n {\n factory: () => of(['CVC', 'CVC/CVV']),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {type TuiPaymentSystem} from '@taiga-ui/addon-commerce/types';\n\nexport const TUI_PAYMENT_SYSTEM_ICONS = new InjectionToken<\n Record<TuiPaymentSystem, string>\n>(ngDevMode ? 'TUI_PAYMENT_SYSTEM_ICONS' : '', {\n factory: () => ({\n mir: '@tui.mir',\n visa: '@tui.visa',\n electron: '@tui.electron',\n mastercard: '@
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-tokens.mjs","sources":["../../../projects/addon-commerce/tokens/i18n.ts","../../../projects/addon-commerce/tokens/payment-system-icons.ts","../../../projects/addon-commerce/tokens/taiga-ui-addon-commerce-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\nimport {type Observable, of} from 'rxjs';\n\n/**\n * Number and card number i18n\n */\nexport const TUI_CARD_NUMBER_TEXTS = new InjectionToken(\n ngDevMode ? 'TUI_CARD_NUMBER_TEXTS' : '',\n {\n factory: tuiExtractI18n('cardNumber'),\n },\n);\n\n/**\n * Expiry and card expiry i18n\n */\nexport const TUI_CARD_EXPIRY_TEXTS = new InjectionToken(\n ngDevMode ? 'TUI_CARD_EXPIRY_TEXTS' : '',\n {\n factory: tuiExtractI18n('cardExpiry'),\n },\n);\n\n/**\n * Card CVC number text [mobile, desktop]\n */\nexport const TUI_CARD_CVC_TEXTS = new InjectionToken<Observable<[string, string]>>(\n ngDevMode ? 'TUI_CARD_CVC_TEXTS' : '',\n {\n factory: () => of(['CVC', 'CVC/CVV']),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {type TuiPaymentSystem} from '@taiga-ui/addon-commerce/types';\n\nexport const TUI_PAYMENT_SYSTEM_ICONS = new InjectionToken<\n Record<TuiPaymentSystem, string>\n>(ngDevMode ? 'TUI_PAYMENT_SYSTEM_ICONS' : '', {\n factory: () => ({\n mir: '@tui.mir',\n visa: '@tui.visa',\n electron: '@tui.electron',\n mastercard: '@img.mastercard',\n maestro: '@img.maestro',\n amex: '@img.amex',\n dinersclub: '@img.diners-club',\n discover: '@img.discover',\n humo: '@img.humo',\n jcb: '@img.jcb',\n rupay: '@img.ru-pay',\n unionpay: '@img.union-pay',\n uzcard: '@img.uzcard',\n verve: '@img.verve',\n }),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA;;AAEG;AACU,MAAA,qBAAqB,GAAG,IAAI,cAAc,CACnD,SAAS,GAAG,uBAAuB,GAAG,EAAE,EACxC;AACI,IAAA,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC;AACxC,CAAA;AAGL;;AAEG;AACU,MAAA,qBAAqB,GAAG,IAAI,cAAc,CACnD,SAAS,GAAG,uBAAuB,GAAG,EAAE,EACxC;AACI,IAAA,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC;AACxC,CAAA;AAGL;;AAEG;AACU,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;IACI,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AACxC,CAAA;;AC5BQ,MAAA,wBAAwB,GAAG,IAAI,cAAc,CAExD,SAAS,GAAG,0BAA0B,GAAG,EAAE,EAAE;AAC3C,IAAA,OAAO,EAAE,OAAO;AACZ,QAAA,GAAG,EAAE,UAAU;AACf,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,QAAQ,EAAE,eAAe;AACzB,QAAA,UAAU,EAAE,iBAAiB;AAC7B,QAAA,OAAO,EAAE,cAAc;AACvB,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,UAAU,EAAE,kBAAkB;AAC9B,QAAA,QAAQ,EAAE,eAAe;AACzB,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,GAAG,EAAE,UAAU;AACf,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,QAAQ,EAAE,gBAAgB;AAC1B,QAAA,MAAM,EAAE,aAAa;AACrB,QAAA,KAAK,EAAE,YAAY;KACtB,CAAC;AACL,CAAA;;ACtBD;;AAEG;;;;"}
|