@taiga-ui/addon-commerce 4.7.0 → 4.8.1-canary.d818d28

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/package.json CHANGED
@@ -1,144 +1,144 @@
1
1
  {
2
- "name": "@taiga-ui/addon-commerce",
3
- "version": "4.7.0",
4
- "description": "Extension package for Taiga UI related to commerce, payment systems, currencies etc.",
5
- "keywords": [
6
- "angular",
7
- "component",
8
- "kit",
9
- "commerce",
10
- "card",
11
- "payment"
12
- ],
13
- "homepage": "https://github.com/taiga-family/taiga-ui",
14
- "repository": "https://github.com/taiga-family/taiga-ui",
15
- "license": "Apache-2.0",
16
- "peerDependencies": {
17
- "@angular/common": ">=16.0.0",
18
- "@angular/core": ">=16.0.0",
19
- "@angular/forms": ">=16.0.0",
20
- "@maskito/angular": "^3.0.1",
21
- "@maskito/core": "^3.0.1",
22
- "@maskito/kit": "^3.0.1",
23
- "@ng-web-apis/common": "^4.6.0",
24
- "@taiga-ui/cdk": "^4.7.0",
25
- "@taiga-ui/core": "^4.7.0",
26
- "@taiga-ui/i18n": "^4.7.0",
27
- "@taiga-ui/kit": "^4.7.0",
28
- "@taiga-ui/polymorpheus": "^4.7.1",
29
- "rxjs": ">=7.0.0"
30
- },
31
- "module": "fesm2022/taiga-ui-addon-commerce.mjs",
32
- "typings": "index.d.ts",
33
- "exports": {
34
- "./package.json": {
35
- "default": "./package.json"
36
- },
37
- ".": {
38
- "types": "./index.d.ts",
39
- "esm2022": "./esm2022/taiga-ui-addon-commerce.mjs",
40
- "esm": "./esm2022/taiga-ui-addon-commerce.mjs",
41
- "default": "./fesm2022/taiga-ui-addon-commerce.mjs"
42
- },
43
- "./components": {
44
- "types": "./components/index.d.ts",
45
- "esm2022": "./esm2022/components/taiga-ui-addon-commerce-components.mjs",
46
- "esm": "./esm2022/components/taiga-ui-addon-commerce-components.mjs",
47
- "default": "./fesm2022/taiga-ui-addon-commerce-components.mjs"
48
- },
49
- "./constants": {
50
- "types": "./constants/index.d.ts",
51
- "esm2022": "./esm2022/constants/taiga-ui-addon-commerce-constants.mjs",
52
- "esm": "./esm2022/constants/taiga-ui-addon-commerce-constants.mjs",
53
- "default": "./fesm2022/taiga-ui-addon-commerce-constants.mjs"
54
- },
55
- "./pipes": {
56
- "types": "./pipes/index.d.ts",
57
- "esm2022": "./esm2022/pipes/taiga-ui-addon-commerce-pipes.mjs",
58
- "esm": "./esm2022/pipes/taiga-ui-addon-commerce-pipes.mjs",
59
- "default": "./fesm2022/taiga-ui-addon-commerce-pipes.mjs"
60
- },
61
- "./tokens": {
62
- "types": "./tokens/index.d.ts",
63
- "esm2022": "./esm2022/tokens/taiga-ui-addon-commerce-tokens.mjs",
64
- "esm": "./esm2022/tokens/taiga-ui-addon-commerce-tokens.mjs",
65
- "default": "./fesm2022/taiga-ui-addon-commerce-tokens.mjs"
66
- },
67
- "./types": {
68
- "types": "./types/index.d.ts",
69
- "esm2022": "./esm2022/types/taiga-ui-addon-commerce-types.mjs",
70
- "esm": "./esm2022/types/taiga-ui-addon-commerce-types.mjs",
71
- "default": "./fesm2022/taiga-ui-addon-commerce-types.mjs"
72
- },
73
- "./utils": {
74
- "types": "./utils/index.d.ts",
75
- "esm2022": "./esm2022/utils/taiga-ui-addon-commerce-utils.mjs",
76
- "esm": "./esm2022/utils/taiga-ui-addon-commerce-utils.mjs",
77
- "default": "./fesm2022/taiga-ui-addon-commerce-utils.mjs"
78
- },
79
- "./validators": {
80
- "types": "./validators/index.d.ts",
81
- "esm2022": "./esm2022/validators/taiga-ui-addon-commerce-validators.mjs",
82
- "esm": "./esm2022/validators/taiga-ui-addon-commerce-validators.mjs",
83
- "default": "./fesm2022/taiga-ui-addon-commerce-validators.mjs"
84
- },
85
- "./components/input-card": {
86
- "types": "./components/input-card/index.d.ts",
87
- "esm2022": "./esm2022/components/input-card/taiga-ui-addon-commerce-components-input-card.mjs",
88
- "esm": "./esm2022/components/input-card/taiga-ui-addon-commerce-components-input-card.mjs",
89
- "default": "./fesm2022/taiga-ui-addon-commerce-components-input-card.mjs"
90
- },
91
- "./components/input-card-group": {
92
- "types": "./components/input-card-group/index.d.ts",
93
- "esm2022": "./esm2022/components/input-card-group/taiga-ui-addon-commerce-components-input-card-group.mjs",
94
- "esm": "./esm2022/components/input-card-group/taiga-ui-addon-commerce-components-input-card-group.mjs",
95
- "default": "./fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs"
96
- },
97
- "./components/input-cvc": {
98
- "types": "./components/input-cvc/index.d.ts",
99
- "esm2022": "./esm2022/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.mjs",
100
- "esm": "./esm2022/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.mjs",
101
- "default": "./fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs"
102
- },
103
- "./components/input-expire": {
104
- "types": "./components/input-expire/index.d.ts",
105
- "esm2022": "./esm2022/components/input-expire/taiga-ui-addon-commerce-components-input-expire.mjs",
106
- "esm": "./esm2022/components/input-expire/taiga-ui-addon-commerce-components-input-expire.mjs",
107
- "default": "./fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs"
108
- },
109
- "./components/thumbnail-card": {
110
- "types": "./components/thumbnail-card/index.d.ts",
111
- "esm2022": "./esm2022/components/thumbnail-card/taiga-ui-addon-commerce-components-thumbnail-card.mjs",
112
- "esm": "./esm2022/components/thumbnail-card/taiga-ui-addon-commerce-components-thumbnail-card.mjs",
113
- "default": "./fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs"
114
- },
115
- "./pipes/amount": {
116
- "types": "./pipes/amount/index.d.ts",
117
- "esm2022": "./esm2022/pipes/amount/taiga-ui-addon-commerce-pipes-amount.mjs",
118
- "esm": "./esm2022/pipes/amount/taiga-ui-addon-commerce-pipes-amount.mjs",
119
- "default": "./fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs"
120
- },
121
- "./pipes/currency": {
122
- "types": "./pipes/currency/index.d.ts",
123
- "esm2022": "./esm2022/pipes/currency/taiga-ui-addon-commerce-pipes-currency.mjs",
124
- "esm": "./esm2022/pipes/currency/taiga-ui-addon-commerce-pipes-currency.mjs",
125
- "default": "./fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs"
126
- },
127
- "./pipes/decimal": {
128
- "types": "./pipes/decimal/index.d.ts",
129
- "esm2022": "./esm2022/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.mjs",
130
- "esm": "./esm2022/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.mjs",
131
- "default": "./fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs"
132
- },
133
- "./pipes/format-card": {
134
- "types": "./pipes/format-card/index.d.ts",
135
- "esm2022": "./esm2022/pipes/format-card/taiga-ui-addon-commerce-pipes-format-card.mjs",
136
- "esm": "./esm2022/pipes/format-card/taiga-ui-addon-commerce-pipes-format-card.mjs",
137
- "default": "./fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs"
2
+ "name": "@taiga-ui/addon-commerce",
3
+ "version": "4.8.1-canary.d818d28",
4
+ "description": "Extension package for Taiga UI related to commerce, payment systems, currencies etc.",
5
+ "keywords": [
6
+ "angular",
7
+ "component",
8
+ "kit",
9
+ "commerce",
10
+ "card",
11
+ "payment"
12
+ ],
13
+ "homepage": "https://github.com/taiga-family/taiga-ui",
14
+ "repository": "https://github.com/taiga-family/taiga-ui",
15
+ "license": "Apache-2.0",
16
+ "peerDependencies": {
17
+ "@angular/common": ">=16.0.0",
18
+ "@angular/core": ">=16.0.0",
19
+ "@angular/forms": ">=16.0.0",
20
+ "@maskito/angular": "^3.0.2",
21
+ "@maskito/core": "^3.0.2",
22
+ "@maskito/kit": "^3.0.2",
23
+ "@ng-web-apis/common": "^4.6.3",
24
+ "@taiga-ui/cdk": "^4.8.1-canary.d818d28",
25
+ "@taiga-ui/core": "^4.8.1-canary.d818d28",
26
+ "@taiga-ui/i18n": "^4.8.1-canary.d818d28",
27
+ "@taiga-ui/kit": "^4.8.1-canary.d818d28",
28
+ "@taiga-ui/polymorpheus": "^4.7.3",
29
+ "rxjs": ">=7.0.0"
30
+ },
31
+ "module": "fesm2022/taiga-ui-addon-commerce.mjs",
32
+ "typings": "index.d.ts",
33
+ "exports": {
34
+ "./package.json": {
35
+ "default": "./package.json"
36
+ },
37
+ ".": {
38
+ "types": "./index.d.ts",
39
+ "esm2022": "./esm2022/taiga-ui-addon-commerce.mjs",
40
+ "esm": "./esm2022/taiga-ui-addon-commerce.mjs",
41
+ "default": "./fesm2022/taiga-ui-addon-commerce.mjs"
42
+ },
43
+ "./components": {
44
+ "types": "./components/index.d.ts",
45
+ "esm2022": "./esm2022/components/taiga-ui-addon-commerce-components.mjs",
46
+ "esm": "./esm2022/components/taiga-ui-addon-commerce-components.mjs",
47
+ "default": "./fesm2022/taiga-ui-addon-commerce-components.mjs"
48
+ },
49
+ "./constants": {
50
+ "types": "./constants/index.d.ts",
51
+ "esm2022": "./esm2022/constants/taiga-ui-addon-commerce-constants.mjs",
52
+ "esm": "./esm2022/constants/taiga-ui-addon-commerce-constants.mjs",
53
+ "default": "./fesm2022/taiga-ui-addon-commerce-constants.mjs"
54
+ },
55
+ "./pipes": {
56
+ "types": "./pipes/index.d.ts",
57
+ "esm2022": "./esm2022/pipes/taiga-ui-addon-commerce-pipes.mjs",
58
+ "esm": "./esm2022/pipes/taiga-ui-addon-commerce-pipes.mjs",
59
+ "default": "./fesm2022/taiga-ui-addon-commerce-pipes.mjs"
60
+ },
61
+ "./tokens": {
62
+ "types": "./tokens/index.d.ts",
63
+ "esm2022": "./esm2022/tokens/taiga-ui-addon-commerce-tokens.mjs",
64
+ "esm": "./esm2022/tokens/taiga-ui-addon-commerce-tokens.mjs",
65
+ "default": "./fesm2022/taiga-ui-addon-commerce-tokens.mjs"
66
+ },
67
+ "./types": {
68
+ "types": "./types/index.d.ts",
69
+ "esm2022": "./esm2022/types/taiga-ui-addon-commerce-types.mjs",
70
+ "esm": "./esm2022/types/taiga-ui-addon-commerce-types.mjs",
71
+ "default": "./fesm2022/taiga-ui-addon-commerce-types.mjs"
72
+ },
73
+ "./utils": {
74
+ "types": "./utils/index.d.ts",
75
+ "esm2022": "./esm2022/utils/taiga-ui-addon-commerce-utils.mjs",
76
+ "esm": "./esm2022/utils/taiga-ui-addon-commerce-utils.mjs",
77
+ "default": "./fesm2022/taiga-ui-addon-commerce-utils.mjs"
78
+ },
79
+ "./validators": {
80
+ "types": "./validators/index.d.ts",
81
+ "esm2022": "./esm2022/validators/taiga-ui-addon-commerce-validators.mjs",
82
+ "esm": "./esm2022/validators/taiga-ui-addon-commerce-validators.mjs",
83
+ "default": "./fesm2022/taiga-ui-addon-commerce-validators.mjs"
84
+ },
85
+ "./components/input-card": {
86
+ "types": "./components/input-card/index.d.ts",
87
+ "esm2022": "./esm2022/components/input-card/taiga-ui-addon-commerce-components-input-card.mjs",
88
+ "esm": "./esm2022/components/input-card/taiga-ui-addon-commerce-components-input-card.mjs",
89
+ "default": "./fesm2022/taiga-ui-addon-commerce-components-input-card.mjs"
90
+ },
91
+ "./components/input-card-group": {
92
+ "types": "./components/input-card-group/index.d.ts",
93
+ "esm2022": "./esm2022/components/input-card-group/taiga-ui-addon-commerce-components-input-card-group.mjs",
94
+ "esm": "./esm2022/components/input-card-group/taiga-ui-addon-commerce-components-input-card-group.mjs",
95
+ "default": "./fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs"
96
+ },
97
+ "./components/input-cvc": {
98
+ "types": "./components/input-cvc/index.d.ts",
99
+ "esm2022": "./esm2022/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.mjs",
100
+ "esm": "./esm2022/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.mjs",
101
+ "default": "./fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs"
102
+ },
103
+ "./components/input-expire": {
104
+ "types": "./components/input-expire/index.d.ts",
105
+ "esm2022": "./esm2022/components/input-expire/taiga-ui-addon-commerce-components-input-expire.mjs",
106
+ "esm": "./esm2022/components/input-expire/taiga-ui-addon-commerce-components-input-expire.mjs",
107
+ "default": "./fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs"
108
+ },
109
+ "./components/thumbnail-card": {
110
+ "types": "./components/thumbnail-card/index.d.ts",
111
+ "esm2022": "./esm2022/components/thumbnail-card/taiga-ui-addon-commerce-components-thumbnail-card.mjs",
112
+ "esm": "./esm2022/components/thumbnail-card/taiga-ui-addon-commerce-components-thumbnail-card.mjs",
113
+ "default": "./fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs"
114
+ },
115
+ "./pipes/amount": {
116
+ "types": "./pipes/amount/index.d.ts",
117
+ "esm2022": "./esm2022/pipes/amount/taiga-ui-addon-commerce-pipes-amount.mjs",
118
+ "esm": "./esm2022/pipes/amount/taiga-ui-addon-commerce-pipes-amount.mjs",
119
+ "default": "./fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs"
120
+ },
121
+ "./pipes/currency": {
122
+ "types": "./pipes/currency/index.d.ts",
123
+ "esm2022": "./esm2022/pipes/currency/taiga-ui-addon-commerce-pipes-currency.mjs",
124
+ "esm": "./esm2022/pipes/currency/taiga-ui-addon-commerce-pipes-currency.mjs",
125
+ "default": "./fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs"
126
+ },
127
+ "./pipes/decimal": {
128
+ "types": "./pipes/decimal/index.d.ts",
129
+ "esm2022": "./esm2022/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.mjs",
130
+ "esm": "./esm2022/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.mjs",
131
+ "default": "./fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs"
132
+ },
133
+ "./pipes/format-card": {
134
+ "types": "./pipes/format-card/index.d.ts",
135
+ "esm2022": "./esm2022/pipes/format-card/taiga-ui-addon-commerce-pipes-format-card.mjs",
136
+ "esm": "./esm2022/pipes/format-card/taiga-ui-addon-commerce-pipes-format-card.mjs",
137
+ "default": "./fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs"
138
+ }
139
+ },
140
+ "sideEffects": false,
141
+ "dependencies": {
142
+ "tslib": "^2.7.0"
138
143
  }
139
- },
140
- "sideEffects": false,
141
- "dependencies": {
142
- "tslib": "^2.7.0"
143
- }
144
144
  }
@@ -1,73 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Directive, inject, Input, Output } from '@angular/core';
3
- import { DefaultValueAccessor, NgControl } from '@angular/forms';
4
- import { MaskitoDirective } from '@maskito/angular';
5
- import { TUI_MASK_CARD } from '@taiga-ui/addon-commerce/constants';
6
- import { TUI_PAYMENT_SYSTEM_ICONS } from '@taiga-ui/addon-commerce/tokens';
7
- import { tuiControlValue } from '@taiga-ui/cdk/observables';
8
- import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
9
- import { tuiInjectIconResolver } from '@taiga-ui/core/tokens';
10
- import { tuiMaskito } from '@taiga-ui/kit/utils';
11
- import { distinctUntilChanged, map, skip, startWith, switchMap, timer } from 'rxjs';
12
- import { TUI_INPUT_CARD_OPTIONS } from './input-card.options';
13
- import * as i0 from "@angular/core";
14
- import * as i1 from "@maskito/angular";
15
- class TuiInputCard {
16
- constructor() {
17
- this.icons = inject(TUI_PAYMENT_SYSTEM_ICONS);
18
- this.options = inject(TUI_INPUT_CARD_OPTIONS);
19
- this.resolver = tuiInjectIconResolver();
20
- this.control = inject(NgControl);
21
- this.accessor = inject(DefaultValueAccessor, {
22
- self: true,
23
- optional: true,
24
- });
25
- this.mask = tuiMaskito(TUI_MASK_CARD);
26
- this.autocomplete = this.options.autocomplete;
27
- this.icon = this.options.icon;
28
- this.binChange = timer(0).pipe(switchMap(() => tuiControlValue(this.control)), map((value) => (value.length < 6 ? null : value.replace(' ', '').slice(0, 6))), startWith(null), distinctUntilChanged(), skip(1));
29
- }
30
- ngOnInit() {
31
- if (!this.accessor) {
32
- return;
33
- }
34
- const onChanges = this.accessor.onChange.bind(this.accessor);
35
- this.accessor.onChange = (value) => onChanges(value.replaceAll(' ', ''));
36
- }
37
- get backgroundImage() {
38
- const system = this.getPaymentSystem(this.control.value);
39
- const icon = system && this.icons[system] && this.resolver(this.icons[system]);
40
- const url = this.icon || icon;
41
- return url && this.icon !== '' ? `url(${url})` : null;
42
- }
43
- getPaymentSystem(value) {
44
- return this.options.paymentSystemHandler(value);
45
- }
46
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputCard, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
47
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiInputCard, isStandalone: true, selector: "input[tuiInputCard]", inputs: { autocomplete: "autocomplete", icon: "icon" }, outputs: { binChange: "binChange" }, host: { attributes: { "inputmode": "numeric", "placeholder": "0000 0000 0000 0000" }, properties: { "autocomplete": "autocomplete ? \"cc-number\" : \"off\"", "style.background-image": "backgroundImage" } }, hostDirectives: [{ directive: i1.MaskitoDirective }], ngImport: i0 }); }
48
- }
49
- __decorate([
50
- tuiPure
51
- ], TuiInputCard.prototype, "getPaymentSystem", null);
52
- export { TuiInputCard };
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputCard, decorators: [{
54
- type: Directive,
55
- args: [{
56
- standalone: true,
57
- selector: 'input[tuiInputCard]',
58
- hostDirectives: [MaskitoDirective],
59
- host: {
60
- inputmode: 'numeric',
61
- placeholder: '0000 0000 0000 0000',
62
- '[autocomplete]': 'autocomplete ? "cc-number" : "off"',
63
- '[style.background-image]': 'backgroundImage',
64
- },
65
- }]
66
- }], propDecorators: { autocomplete: [{
67
- type: Input
68
- }], icon: [{
69
- type: Input
70
- }], binChange: [{
71
- type: Output
72
- }], getPaymentSystem: [] } });
73
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtY2FyZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6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