@taiga-ui/addon-commerce 5.10.0-canary.ae2d96d → 5.10.0-canary.b4fb16b
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.
|
@@ -30,7 +30,7 @@ class TuiInputCardContent {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.22", ngImport: i0, type: TuiInputCardContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.22", type: TuiInputCardContent, isStandalone: true, selector: "tui-input-card-content", host: { attributes: { "data-tui-version": "5.10.0-canary.
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.22", type: TuiInputCardContent, isStandalone: true, selector: "tui-input-card-content", host: { attributes: { "data-tui-version": "5.10.0-canary.b4fb16b" } }, ngImport: i0, template: `
|
|
34
34
|
@if (image()) {
|
|
35
35
|
<img
|
|
36
36
|
alt=""
|
|
@@ -38,7 +38,7 @@ class TuiInputCardContent {
|
|
|
38
38
|
[src]="image() | tuiIcon"
|
|
39
39
|
/>
|
|
40
40
|
}
|
|
41
|
-
`, isInline: true, styles: ["tui-input-card-content:where(*[data-tui-version=\"5.10.0-canary.
|
|
41
|
+
`, isInline: true, styles: ["tui-input-card-content:where(*[data-tui-version=\"5.10.0-canary.b4fb16b\"]){display:contents}tui-textfield:where(*[data-tui-version=\"5.10.0-canary.b4fb16b\"]) .t-payment-system:not(:first-child){display:none}tui-textfield:where(*[data-tui-version=\"5.10.0-canary.b4fb16b\"]) .t-payment-system{inline-size:1.5rem}tui-textfield[data-size=l]:where(*[data-tui-version=\"5.10.0-canary.b4fb16b\"]) .t-payment-system{inline-size:2rem}\n"], dependencies: [{ kind: "pipe", type: TuiIconPipe, name: "tuiIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
42
42
|
}
|
|
43
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.22", ngImport: i0, type: TuiInputCardContent, decorators: [{
|
|
44
44
|
type: Component,
|
|
@@ -50,7 +50,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.22", ngImpo
|
|
|
50
50
|
[src]="image() | tuiIcon"
|
|
51
51
|
/>
|
|
52
52
|
}
|
|
53
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { 'data-tui-version': TUI_VERSION }, styles: ["tui-input-card-content:where(*[data-tui-version=\"5.10.0-canary.
|
|
53
|
+
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { 'data-tui-version': TUI_VERSION }, styles: ["tui-input-card-content:where(*[data-tui-version=\"5.10.0-canary.b4fb16b\"]){display:contents}tui-textfield:where(*[data-tui-version=\"5.10.0-canary.b4fb16b\"]) .t-payment-system:not(:first-child){display:none}tui-textfield:where(*[data-tui-version=\"5.10.0-canary.b4fb16b\"]) .t-payment-system{inline-size:1.5rem}tui-textfield[data-size=l]:where(*[data-tui-version=\"5.10.0-canary.b4fb16b\"]) .t-payment-system{inline-size:2rem}\n"] }]
|
|
54
54
|
}] });
|
|
55
55
|
|
|
56
56
|
// TODO(v6): rename to TuiInputCardDirective
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tuiIsCardLengthValid, tuiIsCardNumberValid } from '@taiga-ui/addon-commerce/utils';
|
|
2
2
|
import { maskitoInitialCalibrationPlugin } from '@maskito/core';
|
|
3
3
|
import { TUI_DIGIT_REGEXP, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
4
|
-
import {
|
|
4
|
+
import { maskitoDate } from '@maskito/kit';
|
|
5
5
|
|
|
6
6
|
const tuiDefaultCardValidator = (card) => card.length > 11 && tuiIsCardLengthValid(card) && tuiIsCardNumberValid(card);
|
|
7
7
|
|
|
@@ -65,7 +65,7 @@ const TUI_MASK_CVC = (length) => ({
|
|
|
65
65
|
mask: Array.from({ length }, () => TUI_DIGIT_REGEXP),
|
|
66
66
|
});
|
|
67
67
|
|
|
68
|
-
const TUI_MASK_EXPIRE =
|
|
68
|
+
const TUI_MASK_EXPIRE = maskitoDate({
|
|
69
69
|
mode: 'mm/yy',
|
|
70
70
|
separator: '/',
|
|
71
71
|
});
|
|
@@ -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 {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: Array.from({length}, () => TUI_DIGIT_REGEXP),\n});\n","import {
|
|
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: Array.from({length}, () => TUI_DIGIT_REGEXP),\n});\n","import {maskitoDate} from '@maskito/kit';\n\nexport const TUI_MASK_EXPIRE = maskitoDate({\n mode: 'mm/yy',\n separator: '/',\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,uBAAuB,GAA8B,CAAC,IAAI,KACnE,IAAI,CAAC,MAAM,GAAG,EAAE,IAAI,oBAAoB,CAAC,IAAI,C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K,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI;SAC/B,IAAI,CAAC,EAAE,CAAC;AACjB;AAEO,MAAM,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;QACL,CAAC;AACJ,KAAA;;;MCjDQ,YAAY,GAAuC,CAAC,MAAM,MAAM;AACzE,IAAA,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAC,EAAE,MAAM,gBAAgB,CAAC;AACrD,CAAA;;ACJM,MAAM,eAAe,GAAG,WAAW,CAAC;AACvC,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,SAAS,EAAE,GAAG;AACjB,CAAA;;ACLD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-commerce",
|
|
3
|
-
"version": "5.10.0-canary.
|
|
3
|
+
"version": "5.10.0-canary.b4fb16b",
|
|
4
4
|
"description": "Extension package for Taiga UI related to commerce, payment systems, currencies etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"types": "./constants/index.d.ts",
|
|
64
64
|
"default": "./fesm2022/taiga-ui-addon-commerce-constants.mjs"
|
|
65
65
|
},
|
|
66
|
-
"./pipes": {
|
|
67
|
-
"types": "./pipes/index.d.ts",
|
|
68
|
-
"default": "./fesm2022/taiga-ui-addon-commerce-pipes.mjs"
|
|
69
|
-
},
|
|
70
66
|
"./tokens": {
|
|
71
67
|
"types": "./tokens/index.d.ts",
|
|
72
68
|
"default": "./fesm2022/taiga-ui-addon-commerce-tokens.mjs"
|
|
73
69
|
},
|
|
70
|
+
"./pipes": {
|
|
71
|
+
"types": "./pipes/index.d.ts",
|
|
72
|
+
"default": "./fesm2022/taiga-ui-addon-commerce-pipes.mjs"
|
|
73
|
+
},
|
|
74
74
|
"./types": {
|
|
75
75
|
"types": "./types/index.d.ts",
|
|
76
76
|
"default": "./fesm2022/taiga-ui-addon-commerce-types.mjs"
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
"types": "./validators/index.d.ts",
|
|
84
84
|
"default": "./fesm2022/taiga-ui-addon-commerce-validators.mjs"
|
|
85
85
|
},
|
|
86
|
-
"./components/input-card": {
|
|
87
|
-
"types": "./components/input-card/index.d.ts",
|
|
88
|
-
"default": "./fesm2022/taiga-ui-addon-commerce-components-input-card.mjs"
|
|
89
|
-
},
|
|
90
86
|
"./components/input-card-group": {
|
|
91
87
|
"types": "./components/input-card-group/index.d.ts",
|
|
92
88
|
"default": "./fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs"
|
|
93
89
|
},
|
|
90
|
+
"./components/input-card": {
|
|
91
|
+
"types": "./components/input-card/index.d.ts",
|
|
92
|
+
"default": "./fesm2022/taiga-ui-addon-commerce-components-input-card.mjs"
|
|
93
|
+
},
|
|
94
94
|
"./components/thumbnail-card": {
|
|
95
95
|
"types": "./components/thumbnail-card/index.d.ts",
|
|
96
96
|
"default": "./fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs"
|