@taiga-ui/addon-commerce 4.52.0-canary.ec0802b → 4.52.0-canary.efbd0d4
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/index.d.ts +0 -2
- package/components/input-card/index.d.ts +3 -0
- package/components/input-card/input-card.component.d.ts +4 -4
- package/components/input-card/input-card.d.ts +7 -0
- package/components/input-card/input-cvc.directive.d.ts +10 -0
- package/components/input-card/input-expire.directive.d.ts +8 -0
- package/components/input-card-group/input-card-group.component.d.ts +5 -5
- package/components/input-card-group/input-card-group.directive.d.ts +4 -6
- package/components/input-card-group/input-card-group.providers.d.ts +4 -5
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs +40 -42
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs +70 -10
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs +4 -4
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components.mjs +0 -2
- package/fesm2022/taiga-ui-addon-commerce-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-constants.mjs +1 -1
- package/fesm2022/taiga-ui-addon-commerce-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs +25 -19
- 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-decimal.mjs +19 -12
- 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-tokens.mjs +2 -3
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs.map +1 -1
- package/package.json +4 -12
- package/pipes/amount/amount.pipe.d.ts +5 -2
- package/pipes/decimal/decimal.pipe.d.ts +4 -2
- package/tokens/i18n.d.ts +4 -5
- package/components/input-cvc/index.d.ts +0 -1
- package/components/input-cvc/input-cvc.directive.d.ts +0 -10
- package/components/input-expire/index.d.ts +0 -1
- package/components/input-expire/input-expire.directive.d.ts +0 -8
- package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs +0 -39
- package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs.map +0 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs +0 -38
- package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-pipes-amount.mjs","sources":["../../../projects/addon-commerce/pipes/amount/amount.options.ts","../../../projects/addon-commerce/pipes/amount/amount.utils.ts","../../../projects/addon-commerce/pipes/amount/amount.pipe.ts","../../../projects/addon-commerce/pipes/amount/taiga-ui-addon-commerce-pipes-amount.ts"],"sourcesContent":["import {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\n\nimport {type TuiAmountSign} from './amount.types';\n\nexport interface TuiAmountOptions {\n readonly currency: TuiCurrencyVariants;\n readonly currencyAlign: TuiHorizontalDirection;\n readonly sign: TuiAmountSign;\n}\n\nexport const TUI_AMOUNT_DEFAULT_OPTIONS: TuiAmountOptions = {\n currency: null,\n currencyAlign: 'left',\n sign: 'negative-only',\n};\n\nexport const [TUI_AMOUNT_OPTIONS, tuiAmountOptionsProvider] = tuiCreateOptions(\n TUI_AMOUNT_DEFAULT_OPTIONS,\n);\n","import {CHAR_MINUS, CHAR_PLUS} from '@taiga-ui/cdk/constants';\n\nimport {type TuiAmountSign, type TuiAmountSignSymbol} from './amount.types';\n\nexport function tuiFormatSignSymbol(\n value: number,\n sign: TuiAmountSign,\n): TuiAmountSignSymbol {\n if (sign === 'never' || !value || (sign === 'negative-only' && value > 0)) {\n return '';\n }\n\n if (sign === 'force-negative' || (value < 0 && sign !== 'force-positive')) {\n return CHAR_MINUS;\n }\n\n return CHAR_PLUS;\n}\n","import {inject
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-pipes-amount.mjs","sources":["../../../projects/addon-commerce/pipes/amount/amount.options.ts","../../../projects/addon-commerce/pipes/amount/amount.utils.ts","../../../projects/addon-commerce/pipes/amount/amount.pipe.ts","../../../projects/addon-commerce/pipes/amount/taiga-ui-addon-commerce-pipes-amount.ts"],"sourcesContent":["import {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\n\nimport {type TuiAmountSign} from './amount.types';\n\nexport interface TuiAmountOptions {\n readonly currency: TuiCurrencyVariants;\n readonly currencyAlign: TuiHorizontalDirection;\n readonly sign: TuiAmountSign;\n}\n\nexport const TUI_AMOUNT_DEFAULT_OPTIONS: TuiAmountOptions = {\n currency: null,\n currencyAlign: 'left',\n sign: 'negative-only',\n};\n\nexport const [TUI_AMOUNT_OPTIONS, tuiAmountOptionsProvider] = tuiCreateOptions(\n TUI_AMOUNT_DEFAULT_OPTIONS,\n);\n","import {CHAR_MINUS, CHAR_PLUS} from '@taiga-ui/cdk/constants';\n\nimport {type TuiAmountSign, type TuiAmountSignSymbol} from './amount.types';\n\nexport function tuiFormatSignSymbol(\n value: number,\n sign: TuiAmountSign,\n): TuiAmountSignSymbol {\n if (sign === 'never' || !value || (sign === 'negative-only' && value > 0)) {\n return '';\n }\n\n if (sign === 'force-negative' || (value < 0 && sign !== 'force-positive')) {\n return CHAR_MINUS;\n }\n\n return CHAR_PLUS;\n}\n","import {\n computed,\n inject,\n Pipe,\n type PipeTransform,\n signal,\n untracked,\n} from '@angular/core';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {tuiFormatCurrency} from '@taiga-ui/addon-commerce/utils';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiFormatNumber} from '@taiga-ui/core/utils/format';\n\nimport {TUI_AMOUNT_OPTIONS} from './amount.options';\nimport {tuiFormatSignSymbol} from './amount.utils';\n\nconst DEFAULT_PRECISION = 2;\n\n@Pipe({name: 'tuiAmount', pure: false})\nexport class TuiAmountPipe implements PipeTransform {\n private readonly options = inject(TUI_AMOUNT_OPTIONS);\n private readonly format = inject(TUI_NUMBER_FORMAT);\n\n private readonly value = signal(NaN);\n private readonly currency = signal(this.options.currency);\n private readonly currencyAlign = signal(this.options.currencyAlign);\n\n private readonly formatted = computed(() => {\n const format = this.format();\n const currencySymbol = tuiFormatCurrency(this.currency());\n const formatted = tuiFormatNumber(Math.abs(this.value()), {\n ...format,\n precision: Number.isNaN(format.precision)\n ? DEFAULT_PRECISION\n : format.precision,\n });\n const sign =\n formatted === '0' ? '' : tuiFormatSignSymbol(this.value(), this.options.sign);\n const space =\n currencySymbol &&\n (currencySymbol?.length > 1 || this.currencyAlign() === 'right')\n ? CHAR_NO_BREAK_SPACE\n : '';\n\n return this.currencyAlign() === 'right'\n ? `${sign}${formatted}${space}${currencySymbol}`\n : `${sign}${currencySymbol}${space}${formatted}`;\n });\n\n public transform(\n value: number,\n currency: TuiCurrencyVariants = this.options.currency,\n currencyAlign: TuiHorizontalDirection = this.options.currencyAlign,\n ): string {\n untracked(() => {\n this.value.set(value);\n this.currency.set(currency);\n this.currencyAlign.set(currencyAlign);\n });\n\n return this.formatted();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAYa,MAAA,0BAA0B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AAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAC;;;ACpBtC;;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: "19.2.
|
|
10
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCurrencyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
10
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiCurrencyPipe, isStandalone: true, name: "tuiCurrency" }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCurrencyPipe, decorators: [{
|
|
13
13
|
type: Pipe,
|
|
14
14
|
args: [{
|
|
15
15
|
name: 'tuiCurrency',
|
|
@@ -1,30 +1,37 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injector, INJECTOR, Pipe } from '@angular/core';
|
|
3
|
-
import { toObservable } from '@angular/core/rxjs-interop';
|
|
2
|
+
import { inject, Injector, INJECTOR, signal, computed, untracked, Pipe } from '@angular/core';
|
|
4
3
|
import { TuiAmountPipe } from '@taiga-ui/addon-commerce/pipes/amount';
|
|
5
4
|
import { TUI_NUMBER_FORMAT } from '@taiga-ui/core/tokens';
|
|
6
|
-
import { switchMap, map } from 'rxjs';
|
|
7
5
|
|
|
8
6
|
class TuiDecimalPipe {
|
|
9
7
|
constructor() {
|
|
10
|
-
this.format =
|
|
8
|
+
this.format = inject(TUI_NUMBER_FORMAT);
|
|
11
9
|
this.amountPipe = Injector.create({
|
|
12
10
|
providers: [{ provide: TuiAmountPipe }],
|
|
13
11
|
parent: inject(INJECTOR),
|
|
14
12
|
}).get(TuiAmountPipe);
|
|
13
|
+
this.value = signal(NaN);
|
|
14
|
+
this.currency = signal('');
|
|
15
|
+
this.formatted = computed(() => {
|
|
16
|
+
const format = this.format();
|
|
17
|
+
const amount = this.amountPipe.transform(this.value(), this.currency());
|
|
18
|
+
const [, decimal] = amount.split(format.decimalSeparator);
|
|
19
|
+
return decimal ? `${format.decimalSeparator}${decimal}` : '';
|
|
20
|
+
});
|
|
15
21
|
}
|
|
16
22
|
transform(value, currency = '') {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
23
|
+
untracked(() => {
|
|
24
|
+
this.value.set(value);
|
|
25
|
+
this.currency.set(currency);
|
|
26
|
+
});
|
|
27
|
+
return this.formatted();
|
|
21
28
|
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
23
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDecimalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
30
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiDecimalPipe, isStandalone: true, name: "tuiDecimal", pure: false }); }
|
|
24
31
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDecimalPipe, decorators: [{
|
|
26
33
|
type: Pipe,
|
|
27
|
-
args: [{ name: 'tuiDecimal' }]
|
|
34
|
+
args: [{ name: 'tuiDecimal', pure: false }]
|
|
28
35
|
}] });
|
|
29
36
|
|
|
30
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-pipes-decimal.mjs","sources":["../../../projects/addon-commerce/pipes/decimal/decimal.pipe.ts","../../../projects/addon-commerce/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.ts"],"sourcesContent":["import {inject
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-pipes-decimal.mjs","sources":["../../../projects/addon-commerce/pipes/decimal/decimal.pipe.ts","../../../projects/addon-commerce/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.ts"],"sourcesContent":["import {\n computed,\n inject,\n INJECTOR,\n Injector,\n Pipe,\n type PipeTransform,\n signal,\n untracked,\n} from '@angular/core';\nimport {TuiAmountPipe} from '@taiga-ui/addon-commerce/pipes/amount';\nimport {type TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\n\n@Pipe({name: 'tuiDecimal', pure: false})\nexport class TuiDecimalPipe implements PipeTransform {\n private readonly format = inject(TUI_NUMBER_FORMAT);\n private readonly amountPipe = Injector.create({\n providers: [{provide: TuiAmountPipe}],\n parent: inject(INJECTOR),\n }).get(TuiAmountPipe);\n\n private readonly value = signal(NaN);\n private readonly currency = signal<TuiCurrencyVariants>('');\n\n private readonly formatted = computed(() => {\n const format = this.format();\n const amount = this.amountPipe.transform(this.value(), this.currency());\n\n const [, decimal] = amount.split(format.decimalSeparator);\n\n return decimal ? `${format.decimalSeparator}${decimal}` : '';\n });\n\n public transform(value: number, currency: TuiCurrencyVariants = ''): string {\n untracked(() => {\n this.value.set(value);\n this.currency.set(currency);\n });\n\n return this.formatted();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAea,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEqB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAClC,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC1C,YAAA,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,aAAa,EAAC,CAAC;AACrC,YAAA,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;AAC3B,SAAA,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;AAEJ,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC;AACnB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAsB,EAAE,CAAC;AAE1C,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAK;AACvC,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5B,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;AAEvE,YAAA,MAAM,GAAG,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;AAEzD,YAAA,OAAO,OAAO,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAA,EAAG,OAAO,CAAE,CAAA,GAAG,EAAE;AAChE,SAAC,CAAC;AAUL;AARU,IAAA,SAAS,CAAC,KAAa,EAAE,QAAA,GAAgC,EAAE,EAAA;QAC9D,SAAS,CAAC,MAAK;AACX,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;AACrB,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC/B,SAAC,CAAC;AAEF,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE;;+GAzBlB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAC;;;ACdvC;;AAEG;;;;"}
|
|
@@ -11,10 +11,10 @@ class TuiFormatCardPipe {
|
|
|
11
11
|
.join('')
|
|
12
12
|
: '';
|
|
13
13
|
}
|
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
15
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFormatCardPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
15
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiFormatCardPipe, isStandalone: true, name: "tuiFormatCard" }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFormatCardPipe, decorators: [{
|
|
18
18
|
type: Pipe,
|
|
19
19
|
args: [{
|
|
20
20
|
name: 'tuiFormatCard',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
1
|
+
import { InjectionToken, signal } from '@angular/core';
|
|
2
2
|
import { tuiExtractI18n } from '@taiga-ui/i18n/utils';
|
|
3
|
-
import { of } from 'rxjs';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Number and card number i18n
|
|
@@ -18,7 +17,7 @@ const TUI_CARD_EXPIRY_TEXTS = new InjectionToken(ngDevMode ? 'TUI_CARD_EXPIRY_TE
|
|
|
18
17
|
* Card CVC number text [mobile, desktop]
|
|
19
18
|
*/
|
|
20
19
|
const TUI_CARD_CVC_TEXTS = new InjectionToken(ngDevMode ? 'TUI_CARD_CVC_TEXTS' : '', {
|
|
21
|
-
factory: () =>
|
|
20
|
+
factory: () => signal(['CVC', 'CVC/CVV']),
|
|
22
21
|
});
|
|
23
22
|
|
|
24
23
|
const TUI_PAYMENT_SYSTEM_ICONS = new InjectionToken(ngDevMode ? 'TUI_PAYMENT_SYSTEM_ICONS' : '', {
|
|
@@ -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';\
|
|
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, type Signal, signal} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\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<Signal<[string, string]>>(\n ngDevMode ? 'TUI_CARD_CVC_TEXTS' : '',\n {\n factory: () => signal(['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":";;;AAGA;;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,MAAM,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAA;;AC3BQ,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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-commerce",
|
|
3
|
-
"version": "4.52.0-canary.
|
|
3
|
+
"version": "4.52.0-canary.efbd0d4",
|
|
4
4
|
"description": "Extension package for Taiga UI related to commerce, payment systems, currencies etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"@angular/common": ">=19.0.0",
|
|
21
21
|
"@angular/core": ">=19.0.0",
|
|
22
22
|
"@angular/forms": ">=19.0.0",
|
|
23
|
-
"@maskito/angular": "^
|
|
24
|
-
"@maskito/core": "^
|
|
25
|
-
"@maskito/kit": "^
|
|
23
|
+
"@maskito/angular": "^5.0.0",
|
|
24
|
+
"@maskito/core": "^5.0.0",
|
|
25
|
+
"@maskito/kit": "^5.0.0",
|
|
26
26
|
"@ng-web-apis/common": "^4.12.2",
|
|
27
27
|
"@taiga-ui/cdk": "^4.52.0",
|
|
28
28
|
"@taiga-ui/core": "^4.52.0",
|
|
@@ -77,14 +77,6 @@
|
|
|
77
77
|
"types": "./components/input-card-group/index.d.ts",
|
|
78
78
|
"default": "./fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs"
|
|
79
79
|
},
|
|
80
|
-
"./components/input-cvc": {
|
|
81
|
-
"types": "./components/input-cvc/index.d.ts",
|
|
82
|
-
"default": "./fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs"
|
|
83
|
-
},
|
|
84
|
-
"./components/input-expire": {
|
|
85
|
-
"types": "./components/input-expire/index.d.ts",
|
|
86
|
-
"default": "./fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs"
|
|
87
|
-
},
|
|
88
80
|
"./components/thumbnail-card": {
|
|
89
81
|
"types": "./components/thumbnail-card/index.d.ts",
|
|
90
82
|
"default": "./fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs"
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { type PipeTransform } from '@angular/core';
|
|
2
2
|
import { type TuiCurrencyVariants } from '@taiga-ui/addon-commerce/types';
|
|
3
3
|
import { type TuiHorizontalDirection } from '@taiga-ui/core/types';
|
|
4
|
-
import { type Observable } from 'rxjs';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class TuiAmountPipe implements PipeTransform {
|
|
7
6
|
private readonly options;
|
|
8
7
|
private readonly format;
|
|
9
|
-
|
|
8
|
+
private readonly value;
|
|
9
|
+
private readonly currency;
|
|
10
|
+
private readonly currencyAlign;
|
|
11
|
+
private readonly formatted;
|
|
12
|
+
transform(value: number, currency?: TuiCurrencyVariants, currencyAlign?: TuiHorizontalDirection): string;
|
|
10
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiAmountPipe, never>;
|
|
11
14
|
static ɵpipe: i0.ɵɵPipeDeclaration<TuiAmountPipe, "tuiAmount", true>;
|
|
12
15
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type PipeTransform } from '@angular/core';
|
|
2
2
|
import { type TuiCurrencyVariants } from '@taiga-ui/addon-commerce/types';
|
|
3
|
-
import { type Observable } from 'rxjs';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class TuiDecimalPipe implements PipeTransform {
|
|
6
5
|
private readonly format;
|
|
7
6
|
private readonly amountPipe;
|
|
8
|
-
|
|
7
|
+
private readonly value;
|
|
8
|
+
private readonly currency;
|
|
9
|
+
private readonly formatted;
|
|
10
|
+
transform(value: number, currency?: TuiCurrencyVariants): string;
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDecimalPipe, never>;
|
|
10
12
|
static ɵpipe: i0.ɵɵPipeDeclaration<TuiDecimalPipe, "tuiDecimal", true>;
|
|
11
13
|
}
|
package/tokens/i18n.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { type Observable } from 'rxjs';
|
|
1
|
+
import { InjectionToken, type Signal } from '@angular/core';
|
|
3
2
|
/**
|
|
4
3
|
* Number and card number i18n
|
|
5
4
|
*/
|
|
6
|
-
export declare const TUI_CARD_NUMBER_TEXTS: InjectionToken<
|
|
5
|
+
export declare const TUI_CARD_NUMBER_TEXTS: InjectionToken<Signal<readonly [number: string, card_number: string]>>;
|
|
7
6
|
/**
|
|
8
7
|
* Expiry and card expiry i18n
|
|
9
8
|
*/
|
|
10
|
-
export declare const TUI_CARD_EXPIRY_TEXTS: InjectionToken<
|
|
9
|
+
export declare const TUI_CARD_EXPIRY_TEXTS: InjectionToken<Signal<readonly [expiry: string, expiry_date: string]>>;
|
|
11
10
|
/**
|
|
12
11
|
* Card CVC number text [mobile, desktop]
|
|
13
12
|
*/
|
|
14
|
-
export declare const TUI_CARD_CVC_TEXTS: InjectionToken<
|
|
13
|
+
export declare const TUI_CARD_CVC_TEXTS: InjectionToken<Signal<[string, string]>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './input-cvc.directive';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@maskito/angular";
|
|
3
|
-
import * as i2 from "@taiga-ui/core/components/textfield";
|
|
4
|
-
export declare class TuiInputCVC {
|
|
5
|
-
protected readonly mask: import("@angular/core").Signal<import("@maskito/core").MaskitoOptions | null>;
|
|
6
|
-
readonly hidden: import("@angular/core").InputSignal<boolean>;
|
|
7
|
-
readonly length: import("@angular/core").InputSignal<3 | 4>;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputCVC, never>;
|
|
9
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiInputCVC, "input[tuiInputCVC]", never, { "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "length": { "alias": "length"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithTextfield; inputs: {}; outputs: {}; }]>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './input-expire.directive';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@maskito/angular";
|
|
3
|
-
import * as i2 from "@taiga-ui/core/components/textfield";
|
|
4
|
-
export declare class TuiInputExpire {
|
|
5
|
-
protected readonly mask: import("@angular/core").WritableSignal<import("@maskito/core").MaskitoOptions | null>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputExpire, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiInputExpire, "input[tuiInputExpire]", never, {}, {}, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithTextfield; inputs: {}; outputs: {}; }]>;
|
|
8
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { computed, input, Directive } from '@angular/core';
|
|
3
|
-
import * as i1 from '@maskito/angular';
|
|
4
|
-
import { MaskitoDirective } from '@maskito/angular';
|
|
5
|
-
import { TUI_MASK_CVC } from '@taiga-ui/addon-commerce/constants';
|
|
6
|
-
import * as i2 from '@taiga-ui/core/components/textfield';
|
|
7
|
-
import { TuiWithTextfield } from '@taiga-ui/core/components/textfield';
|
|
8
|
-
import { tuiMaskito } from '@taiga-ui/kit/utils';
|
|
9
|
-
|
|
10
|
-
class TuiInputCVC {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.mask = tuiMaskito(computed(() => TUI_MASK_CVC(this.length())));
|
|
13
|
-
this.hidden = input(true);
|
|
14
|
-
this.length = input(3);
|
|
15
|
-
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCVC, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiInputCVC, isStandalone: true, selector: "input[tuiInputCVC]", inputs: { hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "inputmode": "numeric", "autocomplete": "cc-csc" }, listeners: { "copy.prevent": "(0)" }, properties: { "placeholder": "\"0\".repeat(length())", "style.-webkit-text-security": "hidden() ? \"disc\" : null" } }, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithTextfield }], ngImport: i0 }); }
|
|
18
|
-
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCVC, decorators: [{
|
|
20
|
-
type: Directive,
|
|
21
|
-
args: [{
|
|
22
|
-
selector: 'input[tuiInputCVC]',
|
|
23
|
-
hostDirectives: [MaskitoDirective, TuiWithTextfield],
|
|
24
|
-
host: {
|
|
25
|
-
inputmode: 'numeric',
|
|
26
|
-
autocomplete: 'cc-csc',
|
|
27
|
-
'[placeholder]': '"0".repeat(length())',
|
|
28
|
-
'[style.-webkit-text-security]': 'hidden() ? "disc" : null',
|
|
29
|
-
'(copy.prevent)': '(0)',
|
|
30
|
-
},
|
|
31
|
-
}]
|
|
32
|
-
}] });
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Generated bundle index. Do not edit.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
export { TuiInputCVC };
|
|
39
|
-
//# sourceMappingURL=taiga-ui-addon-commerce-components-input-cvc.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-components-input-cvc.mjs","sources":["../../../projects/addon-commerce/components/input-cvc/input-cvc.directive.ts","../../../projects/addon-commerce/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.ts"],"sourcesContent":["import {computed, Directive, input} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {TUI_MASK_CVC} from '@taiga-ui/addon-commerce/constants';\nimport {TuiWithTextfield} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\n@Directive({\n selector: 'input[tuiInputCVC]',\n hostDirectives: [MaskitoDirective, TuiWithTextfield],\n host: {\n inputmode: 'numeric',\n autocomplete: 'cc-csc',\n '[placeholder]': '\"0\".repeat(length())',\n '[style.-webkit-text-security]': 'hidden() ? \"disc\" : null',\n '(copy.prevent)': '(0)',\n },\n})\nexport class TuiInputCVC {\n protected readonly mask = tuiMaskito(computed(() => TUI_MASK_CVC(this.length())));\n\n public readonly hidden = input(true);\n\n public readonly length = input<3 | 4>(3);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\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EAAA,CAAA;kBAXvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;AACpD,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,YAAY,EAAE,QAAQ;AACtB,wBAAA,eAAe,EAAE,sBAAsB;AACvC,wBAAA,+BAA+B,EAAE,0BAA0B;AAC3D,wBAAA,gBAAgB,EAAE,KAAK;AAC1B,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive } from '@angular/core';
|
|
3
|
-
import * as i1 from '@maskito/angular';
|
|
4
|
-
import { MaskitoDirective } from '@maskito/angular';
|
|
5
|
-
import { TUI_MASK_EXPIRE } from '@taiga-ui/addon-commerce/constants';
|
|
6
|
-
import * as i2 from '@taiga-ui/core/components/textfield';
|
|
7
|
-
import { TuiWithTextfield } from '@taiga-ui/core/components/textfield';
|
|
8
|
-
import { tuiMaskito } from '@taiga-ui/kit/utils';
|
|
9
|
-
|
|
10
|
-
class TuiInputExpire {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.mask = tuiMaskito(TUI_MASK_EXPIRE);
|
|
13
|
-
}
|
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputExpire, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
15
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputExpire, isStandalone: true, selector: "input[tuiInputExpire]", host: { attributes: { "inputmode": "numeric", "placeholder": "00/00", "translate": "no", "maxlength": "5", "name": "ccexpiryyear", "autocomplete": "cc-exp" } }, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithTextfield }], ngImport: i0 }); }
|
|
16
|
-
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputExpire, decorators: [{
|
|
18
|
-
type: Directive,
|
|
19
|
-
args: [{
|
|
20
|
-
selector: 'input[tuiInputExpire]',
|
|
21
|
-
hostDirectives: [MaskitoDirective, TuiWithTextfield],
|
|
22
|
-
host: {
|
|
23
|
-
inputmode: 'numeric',
|
|
24
|
-
placeholder: '00/00',
|
|
25
|
-
translate: 'no',
|
|
26
|
-
maxlength: '5',
|
|
27
|
-
name: 'ccexpiryyear',
|
|
28
|
-
autocomplete: 'cc-exp',
|
|
29
|
-
},
|
|
30
|
-
}]
|
|
31
|
-
}] });
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Generated bundle index. Do not edit.
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
export { TuiInputExpire };
|
|
38
|
-
//# sourceMappingURL=taiga-ui-addon-commerce-components-input-expire.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-components-input-expire.mjs","sources":["../../../projects/addon-commerce/components/input-expire/input-expire.directive.ts","../../../projects/addon-commerce/components/input-expire/taiga-ui-addon-commerce-components-input-expire.ts"],"sourcesContent":["import {Directive} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {TUI_MASK_EXPIRE} from '@taiga-ui/addon-commerce/constants';\nimport {TuiWithTextfield} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\n@Directive({\n selector: 'input[tuiInputExpire]',\n hostDirectives: [MaskitoDirective, TuiWithTextfield],\n host: {\n inputmode: 'numeric',\n placeholder: '00/00',\n translate: 'no',\n maxlength: '5',\n name: 'ccexpiryyear',\n autocomplete: 'cc-exp',\n },\n})\nexport class TuiInputExpire {\n protected readonly mask = tuiMaskito(TUI_MASK_EXPIRE);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,cAAc,CAAA;AAZ3B,IAAA,WAAA,GAAA;AAauB,QAAA,IAAA,CAAA,IAAI,GAAG,UAAU,CAAC,eAAe,CAAC;AACxD;+GAFY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,WAAA,EAAA,IAAA,EAAA,WAAA,EAAA,GAAA,EAAA,MAAA,EAAA,cAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;AACpD,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,WAAW,EAAE,OAAO;AACpB,wBAAA,SAAS,EAAE,IAAI;AACf,wBAAA,SAAS,EAAE,GAAG;AACd,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,YAAY,EAAE,QAAQ;AACzB,qBAAA;AACJ,iBAAA;;;ACjBD;;AAEG;;;;"}
|