@taiga-ui/addon-commerce 2.55.0 → 2.58.0
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/bundles/taiga-ui-addon-commerce-components-card.umd.js +14 -14
- package/bundles/taiga-ui-addon-commerce-components-card.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-card.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card-grouped.umd.js +37 -37
- package/bundles/taiga-ui-addon-commerce-components-input-card-grouped.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card-grouped.umd.min.js +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card-grouped.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card.umd.js +11 -11
- package/bundles/taiga-ui-addon-commerce-components-input-card.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-cvc.umd.js +5 -5
- package/bundles/taiga-ui-addon-commerce-components-input-cvc.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-cvc.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-expire.umd.js +4 -4
- package/bundles/taiga-ui-addon-commerce-components-input-expire.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-expire.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-money.umd.js +18 -18
- package/bundles/taiga-ui-addon-commerce-components-money.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-money.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-constants.umd.js +30 -30
- package/bundles/taiga-ui-addon-commerce-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-enums.umd.js +14 -0
- package/bundles/taiga-ui-addon-commerce-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-pipes.umd.js +6 -6
- package/bundles/taiga-ui-addon-commerce-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-pipes.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-tokens.umd.js +4 -4
- package/bundles/taiga-ui-addon-commerce-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-utils.umd.js +30 -30
- package/bundles/taiga-ui-addon-commerce-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-utils.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-validators.umd.js +2 -2
- package/bundles/taiga-ui-addon-commerce-validators.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-validators.umd.min.js.map +1 -1
- package/components/input-card-grouped/taiga-ui-addon-commerce-components-input-card-grouped.metadata.json +1 -1
- package/enums/currency-code.d.ts +7 -0
- package/enums/currency.d.ts +7 -0
- package/esm2015/components/card/card.component.js +15 -15
- package/esm2015/components/input-card/input-card.component.js +12 -12
- package/esm2015/components/input-card-grouped/input-card-grouped.component.js +36 -36
- package/esm2015/components/input-card-grouped/input-card-grouped.providers.js +3 -3
- package/esm2015/components/input-cvc/input-cvc.component.js +6 -6
- package/esm2015/components/input-expire/input-expire.component.js +5 -5
- package/esm2015/components/money/money-options.js +4 -4
- package/esm2015/components/money/money.component.js +7 -7
- package/esm2015/components/money/pipes/fraction-part.pipe.js +2 -2
- package/esm2015/components/money/pipes/integer-part.pipe.js +2 -2
- package/esm2015/components/money/pipes/sign-symbol.pipe.js +2 -2
- package/esm2015/components/money/utils/format-fraction-part.js +4 -4
- package/esm2015/components/money/utils/format-sign-symbol.js +4 -4
- package/esm2015/constants/card-holder-mask.js +27 -27
- package/esm2015/constants/card-mask.js +5 -5
- package/esm2015/enums/currency-code.js +8 -1
- package/esm2015/enums/currency.js +8 -1
- package/esm2015/enums/money-sign.js +1 -1
- package/esm2015/enums/payment-system.js +1 -1
- package/esm2015/pipes/currency/currency.pipe.js +2 -2
- package/esm2015/pipes/format-card/format-card.pipe.js +6 -6
- package/esm2015/tokens/i18n.js +5 -5
- package/esm2015/utils/create-auto-corrected-expire-pipe.js +6 -6
- package/esm2015/utils/format-currency.js +4 -4
- package/esm2015/utils/get-currency-symbol.js +20 -20
- package/esm2015/utils/get-payment-system.js +2 -2
- package/esm2015/utils/is-card-number-valid.js +3 -3
- package/esm2015/validators/card-expire.validator.js +2 -2
- package/esm2015/validators/card-number.validator.js +2 -2
- package/esm5/components/card/card.component.js +15 -15
- package/esm5/components/input-card/input-card.component.js +12 -12
- package/esm5/components/input-card-grouped/input-card-grouped.component.js +36 -36
- package/esm5/components/input-card-grouped/input-card-grouped.providers.js +3 -3
- package/esm5/components/input-cvc/input-cvc.component.js +6 -6
- package/esm5/components/input-expire/input-expire.component.js +5 -5
- package/esm5/components/money/money-options.js +4 -4
- package/esm5/components/money/money.component.js +7 -7
- package/esm5/components/money/pipes/fraction-part.pipe.js +2 -2
- package/esm5/components/money/pipes/integer-part.pipe.js +2 -2
- package/esm5/components/money/pipes/sign-symbol.pipe.js +2 -2
- package/esm5/components/money/utils/format-fraction-part.js +4 -4
- package/esm5/components/money/utils/format-sign-symbol.js +4 -4
- package/esm5/constants/card-holder-mask.js +27 -27
- package/esm5/constants/card-mask.js +5 -5
- package/esm5/enums/currency-code.js +8 -1
- package/esm5/enums/currency.js +8 -1
- package/esm5/enums/money-sign.js +1 -1
- package/esm5/enums/payment-system.js +1 -1
- package/esm5/pipes/currency/currency.pipe.js +2 -2
- package/esm5/pipes/format-card/format-card.pipe.js +6 -6
- package/esm5/tokens/i18n.js +5 -5
- package/esm5/utils/create-auto-corrected-expire-pipe.js +6 -6
- package/esm5/utils/format-currency.js +4 -4
- package/esm5/utils/get-currency-symbol.js +20 -20
- package/esm5/utils/get-payment-system.js +2 -2
- package/esm5/utils/is-card-number-valid.js +3 -3
- package/esm5/validators/card-expire.validator.js +2 -2
- package/esm5/validators/card-number.validator.js +2 -2
- package/fesm2015/taiga-ui-addon-commerce-components-card.js +14 -14
- package/fesm2015/taiga-ui-addon-commerce-components-card.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-card-grouped.js +37 -37
- package/fesm2015/taiga-ui-addon-commerce-components-input-card-grouped.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-card.js +11 -11
- package/fesm2015/taiga-ui-addon-commerce-components-input-card.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-cvc.js +5 -5
- package/fesm2015/taiga-ui-addon-commerce-components-input-cvc.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-expire.js +4 -4
- package/fesm2015/taiga-ui-addon-commerce-components-input-expire.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-money.js +18 -18
- package/fesm2015/taiga-ui-addon-commerce-components-money.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-constants.js +30 -30
- package/fesm2015/taiga-ui-addon-commerce-constants.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-enums.js +14 -0
- package/fesm2015/taiga-ui-addon-commerce-enums.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-pipes.js +6 -6
- package/fesm2015/taiga-ui-addon-commerce-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-tokens.js +4 -4
- package/fesm2015/taiga-ui-addon-commerce-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-utils.js +30 -30
- package/fesm2015/taiga-ui-addon-commerce-utils.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-validators.js +2 -2
- package/fesm2015/taiga-ui-addon-commerce-validators.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-components-card.js +14 -14
- package/fesm5/taiga-ui-addon-commerce-components-card.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-components-input-card-grouped.js +37 -37
- package/fesm5/taiga-ui-addon-commerce-components-input-card-grouped.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-components-input-card.js +11 -11
- package/fesm5/taiga-ui-addon-commerce-components-input-card.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-components-input-cvc.js +5 -5
- package/fesm5/taiga-ui-addon-commerce-components-input-cvc.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-components-input-expire.js +4 -4
- package/fesm5/taiga-ui-addon-commerce-components-input-expire.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-components-money.js +18 -18
- package/fesm5/taiga-ui-addon-commerce-components-money.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-constants.js +30 -30
- package/fesm5/taiga-ui-addon-commerce-constants.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-enums.js +14 -0
- package/fesm5/taiga-ui-addon-commerce-enums.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-pipes.js +6 -6
- package/fesm5/taiga-ui-addon-commerce-pipes.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-tokens.js +4 -4
- package/fesm5/taiga-ui-addon-commerce-tokens.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-utils.js +30 -30
- package/fesm5/taiga-ui-addon-commerce-utils.js.map +1 -1
- package/fesm5/taiga-ui-addon-commerce-validators.js +2 -2
- package/fesm5/taiga-ui-addon-commerce-validators.js.map +1 -1
- package/package.json +4 -4
|
@@ -16,7 +16,7 @@ let TuiInputExpireComponent = TuiInputExpireComponent_1 = class TuiInputExpireCo
|
|
|
16
16
|
mask: [
|
|
17
17
|
TUI_DIGIT_REGEXP,
|
|
18
18
|
TUI_DIGIT_REGEXP,
|
|
19
|
-
|
|
19
|
+
`/`,
|
|
20
20
|
TUI_DIGIT_REGEXP,
|
|
21
21
|
TUI_DIGIT_REGEXP,
|
|
22
22
|
],
|
|
@@ -44,7 +44,7 @@ let TuiInputExpireComponent = TuiInputExpireComponent_1 = class TuiInputExpireCo
|
|
|
44
44
|
if (parseInt(value.slice(0, 2), 10) > 12) {
|
|
45
45
|
value = `12${value.slice(2)}`;
|
|
46
46
|
}
|
|
47
|
-
if (value.slice(0, 2) ===
|
|
47
|
+
if (value.slice(0, 2) === `00`) {
|
|
48
48
|
value = `01${value.slice(2)}`;
|
|
49
49
|
}
|
|
50
50
|
this.input.nativeFocusableElement.value = value;
|
|
@@ -59,7 +59,7 @@ let TuiInputExpireComponent = TuiInputExpireComponent_1 = class TuiInputExpireCo
|
|
|
59
59
|
this.updateHovered(hovered);
|
|
60
60
|
}
|
|
61
61
|
getFallbackValue() {
|
|
62
|
-
return
|
|
62
|
+
return ``;
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
TuiInputExpireComponent.ctorParameters = () => [
|
|
@@ -75,7 +75,7 @@ __decorate([
|
|
|
75
75
|
], TuiInputExpireComponent.prototype, "autocompleteEnabled", void 0);
|
|
76
76
|
TuiInputExpireComponent = TuiInputExpireComponent_1 = __decorate([
|
|
77
77
|
Component({
|
|
78
|
-
selector:
|
|
78
|
+
selector: `tui-input-expire`,
|
|
79
79
|
template: "<tui-primitive-textfield\n tuiValueAccessor\n tuiTextfieldInputMode=\"numeric\"\n tuiTextfieldExampleText=\"00/00\"\n class=\"t-input\"\n [tuiTextfieldAutocomplete]=\"autocomplete\"\n [nativeId]=\"nativeId\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [invalid]=\"computedInvalid\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [pseudoFocused]=\"pseudoFocused\"\n [textMask]=\"textMaskOptions\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n>\n <ng-content></ng-content>\n</tui-primitive-textfield>\n",
|
|
80
80
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
81
81
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-components-input-expire.js","sources":["ng://@taiga-ui/addon-commerce/components/input-expire/input-expire.component.ts","ng://@taiga-ui/addon-commerce/components/input-expire/input-expire.module.ts","ng://@taiga-ui/addon-commerce/components/input-expire/taiga-ui-addon-commerce-components-input-expire.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {tuiCreateAutoCorrectedExpirePipe} from '@taiga-ui/addon-commerce/utils';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n} from '@taiga-ui/cdk';\nimport {\n TUI_DIGIT_REGEXP,\n TuiPrimitiveTextfieldComponent,\n TuiTextMaskOptions,\n} from '@taiga-ui/core';\nimport {TextMaskConfig} from 'angular2-text-mask';\n\n@Component({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-components-input-expire.js","sources":["ng://@taiga-ui/addon-commerce/components/input-expire/input-expire.component.ts","ng://@taiga-ui/addon-commerce/components/input-expire/input-expire.module.ts","ng://@taiga-ui/addon-commerce/components/input-expire/taiga-ui-addon-commerce-components-input-expire.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {tuiCreateAutoCorrectedExpirePipe} from '@taiga-ui/addon-commerce/utils';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n} from '@taiga-ui/cdk';\nimport {\n TUI_DIGIT_REGEXP,\n TuiPrimitiveTextfieldComponent,\n TuiTextMaskOptions,\n} from '@taiga-ui/core';\nimport {TextMaskConfig} from 'angular2-text-mask';\n\n@Component({\n selector: `tui-input-expire`,\n templateUrl: `./input-expire.template.html`,\n styleUrls: [`./input-expire.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputExpireComponent),\n },\n ],\n})\nexport class TuiInputExpireComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly input?: TuiPrimitiveTextfieldComponent;\n\n @Input()\n @tuiDefaultProp()\n autocompleteEnabled = false;\n\n readonly textMaskOptions: TextMaskConfig = {\n mask: [\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n `/`,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n ],\n pipe: tuiCreateAutoCorrectedExpirePipe(),\n guide: false,\n } as TuiTextMaskOptions as unknown as TextMaskConfig;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.input ? this.input.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return !!this.input && this.input.focused;\n }\n\n get autocomplete(): TuiCreditCardAutofillName {\n return this.autocompleteEnabled\n ? TuiCreditCardAutofillName.CcExp\n : TuiCreditCardAutofillName.Off;\n }\n\n onValueChange(value: string): void {\n // @bad TODO: Workaround until mask pipe can replace chars and keep caret position\n // @bad TODO: Think about a solution without mask at all\n if (!this.input || !this.input.nativeFocusableElement) {\n return;\n }\n\n if (parseInt(value.slice(0, 2), 10) > 12) {\n value = `12${value.slice(2)}`;\n }\n\n if (value.slice(0, 2) === `00`) {\n value = `01${value.slice(2)}`;\n }\n\n this.input.nativeFocusableElement.value = value;\n\n if (this.value !== value) {\n this.updateValue(value);\n }\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean): void {\n this.updateHovered(hovered);\n }\n\n protected getFallbackValue(): string {\n return ``;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputExpireComponent} from './input-expire.component';\n\n@NgModule({\n imports: [\n TextMaskModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n TuiValueAccessorModule,\n ],\n declarations: [TuiInputExpireComponent],\n exports: [TuiInputExpireComponent],\n})\nexport class TuiInputExpireModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IAuCa,uBAAuB,+BAApC,MAAa,uBACT,SAAQ,kBAA0B;IAsBlC,YAII,OAAyB,EACE,iBAAoC;QAE/D,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QArBtC,wBAAmB,GAAG,KAAK,CAAC;QAEnB,oBAAe,GAAmB;YACvC,IAAI,EAAE;gBACF,gBAAgB;gBAChB,gBAAgB;gBAChB,GAAG;gBACH,gBAAgB;gBAChB,gBAAgB;aACnB;YACD,IAAI,EAAE,gCAAgC,EAAE;YACxC,KAAK,EAAE,KAAK;SACoC,CAAC;KAUpD;IAED,IAAI,sBAAsB;QACtB,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,GAAG,IAAI,CAAC;KAChE;IAED,IAAI,OAAO;QACP,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;KAC7C;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,mBAAmB;;8BAEK;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2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,yBAAuB,CAAC;aACzD;SACJ;;KACJ,CAAC;IAyBO,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GA5BrB,uBAAuB,CAgFnC;;ICtGY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IAVhC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,cAAc;YACd,2BAA2B;YAC3B,4BAA4B;YAC5B,sBAAsB;SACzB;QACD,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACjBpC;;;;;;"}
|
|
@@ -6,14 +6,14 @@ import { TuiCurrencyPipeModule } from '@taiga-ui/addon-commerce/pipes';
|
|
|
6
6
|
import { TUI_NUMBER_FORMAT, formatNumber } from '@taiga-ui/core';
|
|
7
7
|
|
|
8
8
|
const TUI_MONEY_DEFAULT_DEFAULT_OPTIONS = {
|
|
9
|
-
decimal:
|
|
9
|
+
decimal: `not-zero`,
|
|
10
10
|
currency: "RUB" /* Ruble */,
|
|
11
|
-
sign:
|
|
11
|
+
sign: `negative-only`,
|
|
12
12
|
colored: false,
|
|
13
13
|
precision: 2,
|
|
14
14
|
singleColor: false,
|
|
15
15
|
};
|
|
16
|
-
const TUI_MONEY_OPTIONS = new InjectionToken(
|
|
16
|
+
const TUI_MONEY_OPTIONS = new InjectionToken(`Default parameters for money component`, {
|
|
17
17
|
factory: () => TUI_MONEY_DEFAULT_DEFAULT_OPTIONS,
|
|
18
18
|
});
|
|
19
19
|
const tuiMoneyOptionsProvider = (options) => ({
|
|
@@ -22,10 +22,10 @@ const tuiMoneyOptionsProvider = (options) => ({
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
function tuiFormatSignSymbol(value, sign) {
|
|
25
|
-
if (sign ===
|
|
26
|
-
return
|
|
25
|
+
if (sign === `never` || !value || (sign === `negative-only` && value > 0)) {
|
|
26
|
+
return ``;
|
|
27
27
|
}
|
|
28
|
-
if (sign ===
|
|
28
|
+
if (sign === `force-negative` || (value < 0 && sign !== `force-positive`)) {
|
|
29
29
|
return CHAR_MINUS;
|
|
30
30
|
}
|
|
31
31
|
return CHAR_PLUS;
|
|
@@ -48,12 +48,12 @@ let TuiMoneyComponent = class TuiMoneyComponent {
|
|
|
48
48
|
get red() {
|
|
49
49
|
return (this.colored &&
|
|
50
50
|
(this.signSymbol === CHAR_MINUS ||
|
|
51
|
-
(this.value < 0 && this.sign !==
|
|
51
|
+
(this.value < 0 && this.sign !== `force-positive`)));
|
|
52
52
|
}
|
|
53
53
|
get green() {
|
|
54
54
|
return (this.colored &&
|
|
55
55
|
(this.signSymbol === CHAR_PLUS ||
|
|
56
|
-
(this.value > 0 && this.sign !==
|
|
56
|
+
(this.value > 0 && this.sign !== `force-negative`)));
|
|
57
57
|
}
|
|
58
58
|
get inheritColor() {
|
|
59
59
|
return this.singleColor || (this.value === 0 && this.colored);
|
|
@@ -91,17 +91,17 @@ __decorate([
|
|
|
91
91
|
tuiDefaultProp()
|
|
92
92
|
], TuiMoneyComponent.prototype, "singleColor", void 0);
|
|
93
93
|
__decorate([
|
|
94
|
-
HostBinding(
|
|
94
|
+
HostBinding(`class._red`)
|
|
95
95
|
], TuiMoneyComponent.prototype, "red", null);
|
|
96
96
|
__decorate([
|
|
97
|
-
HostBinding(
|
|
97
|
+
HostBinding(`class._green`)
|
|
98
98
|
], TuiMoneyComponent.prototype, "green", null);
|
|
99
99
|
__decorate([
|
|
100
|
-
HostBinding(
|
|
100
|
+
HostBinding(`class._inherit-color`)
|
|
101
101
|
], TuiMoneyComponent.prototype, "inheritColor", null);
|
|
102
102
|
TuiMoneyComponent = __decorate([
|
|
103
103
|
Component({
|
|
104
|
-
selector:
|
|
104
|
+
selector: `tui-money`,
|
|
105
105
|
template: "<span\n automation-id=\"tui-money__sign\"\n [textContent]=\"value | tuiSignSymbol: sign\"\n></span>\n<span\n automation-id=\"tui-money__integer-part\"\n [textContent]=\"value | tuiIntegerPart: precision\"\n></span>\n<span class=\"t-lighter\">\n <span\n automation-id=\"tui-money__fraction-part\"\n [textContent]=\"value | tuiFractionPart: decimal:precision\"\n ></span>\n <span\n automation-id=\"tui-money__currency\"\n class=\"t-currency\"\n [textContent]=\"currency | tuiCurrency\"\n ></span>\n</span>\n",
|
|
106
106
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
107
107
|
styles: [":host{white-space:nowrap}:host._red{color:var(--tui-negative)}:host._green{color:var(--tui-positive)}:host:not(._inherit-color) .t-lighter{opacity:var(--tui-disabled-opacity)}.t-currency:not(:empty){padding-left:.2rem}"]
|
|
@@ -111,9 +111,9 @@ TuiMoneyComponent = __decorate([
|
|
|
111
111
|
|
|
112
112
|
function tuiFormatFractionPart(options) {
|
|
113
113
|
const { value, decimal, numberFormat, precision } = options;
|
|
114
|
-
const fraction = value.toFixed(precision).split(
|
|
115
|
-
const shouldShow = decimal !==
|
|
116
|
-
return shouldShow ? `${numberFormat.decimalSeparator}${fraction}` :
|
|
114
|
+
const fraction = value.toFixed(precision).split(`.`)[1];
|
|
115
|
+
const shouldShow = decimal !== `never` && (decimal === `always` || !!parseInt(fraction, 10));
|
|
116
|
+
return shouldShow ? `${numberFormat.decimalSeparator}${fraction}` : ``;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
let TuiFractionPartPipe = class TuiFractionPartPipe {
|
|
@@ -133,7 +133,7 @@ TuiFractionPartPipe.ctorParameters = () => [
|
|
|
133
133
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
134
134
|
];
|
|
135
135
|
TuiFractionPartPipe = __decorate([
|
|
136
|
-
Pipe({ name:
|
|
136
|
+
Pipe({ name: `tuiFractionPart` }),
|
|
137
137
|
__param(0, Inject(TUI_NUMBER_FORMAT))
|
|
138
138
|
], TuiFractionPartPipe);
|
|
139
139
|
|
|
@@ -149,7 +149,7 @@ TuiIntegerPartPipe.ctorParameters = () => [
|
|
|
149
149
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
150
150
|
];
|
|
151
151
|
TuiIntegerPartPipe = __decorate([
|
|
152
|
-
Pipe({ name:
|
|
152
|
+
Pipe({ name: `tuiIntegerPart` }),
|
|
153
153
|
__param(0, Inject(TUI_NUMBER_FORMAT))
|
|
154
154
|
], TuiIntegerPartPipe);
|
|
155
155
|
|
|
@@ -159,7 +159,7 @@ let TuiSignSymbolPipe = class TuiSignSymbolPipe {
|
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
TuiSignSymbolPipe = __decorate([
|
|
162
|
-
Pipe({ name:
|
|
162
|
+
Pipe({ name: `tuiSignSymbol` })
|
|
163
163
|
], TuiSignSymbolPipe);
|
|
164
164
|
|
|
165
165
|
let TuiMoneyModule = class TuiMoneyModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-components-money.js","sources":["ng://@taiga-ui/addon-commerce/components/money/money-options.ts","ng://@taiga-ui/addon-commerce/components/money/utils/format-sign-symbol.ts","ng://@taiga-ui/addon-commerce/components/money/money.component.ts","ng://@taiga-ui/addon-commerce/components/money/utils/format-fraction-part.ts","ng://@taiga-ui/addon-commerce/components/money/pipes/fraction-part.pipe.ts","ng://@taiga-ui/addon-commerce/components/money/pipes/integer-part.pipe.ts","ng://@taiga-ui/addon-commerce/components/money/pipes/sign-symbol.pipe.ts","ng://@taiga-ui/addon-commerce/components/money/money.module.ts","ng://@taiga-ui/addon-commerce/components/money/taiga-ui-addon-commerce-components-money.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiCurrency} from '@taiga-ui/addon-commerce/enums';\nimport {TuiCurrencyVariants, TuiMoneySignT} from '@taiga-ui/addon-commerce/types';\nimport {TuiDecimalT} from '@taiga-ui/core';\n\nexport interface TuiMoneyOptions {\n readonly decimal: TuiDecimalT;\n readonly currency: TuiCurrencyVariants;\n readonly sign: TuiMoneySignT;\n readonly colored: boolean;\n readonly precision: number;\n readonly singleColor: boolean;\n}\n\nexport const TUI_MONEY_DEFAULT_DEFAULT_OPTIONS: TuiMoneyOptions = {\n decimal: 'not-zero',\n currency: TuiCurrency.Ruble,\n sign: 'negative-only',\n colored: false,\n precision: 2,\n singleColor: false,\n};\n\nexport const TUI_MONEY_OPTIONS = new InjectionToken<TuiMoneyOptions>(\n 'Default parameters for money component',\n {\n factory: () => TUI_MONEY_DEFAULT_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiMoneyOptionsProvider: (\n options: Partial<TuiMoneyOptions>,\n) => ValueProvider = (options: Partial<TuiMoneyOptions>) => ({\n provide: TUI_MONEY_OPTIONS,\n useValue: {...TUI_MONEY_DEFAULT_DEFAULT_OPTIONS, ...options},\n});\n","import {TuiMoneySignSymbol, TuiMoneySignT} from '@taiga-ui/addon-commerce/types';\nimport {CHAR_MINUS, CHAR_PLUS} from '@taiga-ui/cdk';\n\nexport function tuiFormatSignSymbol(\n value: number,\n sign: TuiMoneySignT,\n): TuiMoneySignSymbol {\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 ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n TuiCurrencyVariants,\n TuiMoneySignSymbol,\n TuiMoneySignT,\n} from '@taiga-ui/addon-commerce/types';\nimport {CHAR_MINUS, CHAR_PLUS, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiDecimalT} from '@taiga-ui/core';\n\nimport {TUI_MONEY_OPTIONS, TuiMoneyOptions} from './money-options';\nimport {tuiFormatSignSymbol} from './utils/format-sign-symbol';\n\n@Component({\n selector: 'tui-money',\n templateUrl: './money.template.html',\n styleUrls: ['./money.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMoneyComponent {\n @Input()\n @tuiDefaultProp()\n value = NaN;\n\n @Input()\n @tuiDefaultProp()\n decimal: TuiDecimalT = this.options.decimal;\n\n @Input()\n @tuiDefaultProp()\n currency: TuiCurrencyVariants = this.options.currency;\n\n @Input()\n @tuiDefaultProp()\n sign: TuiMoneySignT = this.options.sign;\n\n @Input()\n @tuiDefaultProp()\n colored = this.options.colored;\n\n @Input()\n @tuiDefaultProp()\n precision = this.options.precision;\n\n @Input()\n @tuiDefaultProp()\n singleColor = this.options.singleColor;\n\n get signSymbol(): TuiMoneySignSymbol {\n return tuiFormatSignSymbol(this.value, this.sign);\n }\n\n @HostBinding('class._red')\n get red(): boolean {\n return (\n this.colored &&\n (this.signSymbol === CHAR_MINUS ||\n (this.value < 0 && this.sign !== 'force-positive'))\n );\n }\n\n @HostBinding('class._green')\n get green(): boolean {\n return (\n this.colored &&\n (this.signSymbol === CHAR_PLUS ||\n (this.value > 0 && this.sign !== 'force-negative'))\n );\n }\n\n @HostBinding('class._inherit-color')\n get inheritColor(): boolean {\n return this.singleColor || (this.value === 0 && this.colored);\n }\n\n constructor(@Inject(TUI_MONEY_OPTIONS) private readonly options: TuiMoneyOptions) {}\n}\n","import {TuiDecimalT, TuiNumberFormatSettings} from '@taiga-ui/core';\n\nexport function tuiFormatFractionPart(options: {\n value: number;\n decimal: TuiDecimalT;\n precision: number;\n numberFormat: TuiNumberFormatSettings;\n}): string {\n const {value, decimal, numberFormat, precision} = options;\n const fraction = value.toFixed(precision).split('.')[1];\n const shouldShow =\n decimal !== 'never' && (decimal === 'always' || !!parseInt(fraction, 10));\n\n return shouldShow ? `${numberFormat.decimalSeparator}${fraction}` : '';\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TUI_NUMBER_FORMAT, TuiDecimalT, TuiNumberFormatSettings} from '@taiga-ui/core';\n\nimport {tuiFormatFractionPart} from '../utils/format-fraction-part';\n\n@Pipe({name: 'tuiFractionPart'})\nexport class TuiFractionPartPipe implements PipeTransform {\n constructor(\n @Inject(TUI_NUMBER_FORMAT) private readonly numberFormat: TuiNumberFormatSettings,\n ) {}\n\n transform(value: number, decimal: TuiDecimalT, precision: number): string {\n return tuiFormatFractionPart({\n value,\n decimal,\n precision,\n numberFormat: this.numberFormat,\n });\n }\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {formatNumber, TUI_NUMBER_FORMAT, TuiNumberFormatSettings} from '@taiga-ui/core';\n\n@Pipe({name: 'tuiIntegerPart'})\nexport class TuiIntegerPartPipe implements PipeTransform {\n constructor(\n @Inject(TUI_NUMBER_FORMAT) private readonly numberFormat: TuiNumberFormatSettings,\n ) {}\n\n transform(value: number, precision: number): string {\n return formatNumber(\n Math.floor(Math.abs(Number(value.toFixed(precision)))),\n null,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiMoneySignSymbol, TuiMoneySignT} from '@taiga-ui/addon-commerce/types';\n\nimport {tuiFormatSignSymbol} from '../utils/format-sign-symbol';\n\n@Pipe({name: 'tuiSignSymbol'})\nexport class TuiSignSymbolPipe implements PipeTransform {\n transform(value: number, sign: TuiMoneySignT): TuiMoneySignSymbol {\n return tuiFormatSignSymbol(value, sign);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiCurrencyPipeModule} from '@taiga-ui/addon-commerce/pipes';\n\nimport {TuiMoneyComponent} from './money.component';\nimport {TuiFractionPartPipe} from './pipes/fraction-part.pipe';\nimport {TuiIntegerPartPipe} from './pipes/integer-part.pipe';\nimport {TuiSignSymbolPipe} from './pipes/sign-symbol.pipe';\n\n@NgModule({\n imports: [CommonModule, TuiCurrencyPipeModule],\n declarations: [\n TuiMoneyComponent,\n TuiFractionPartPipe,\n TuiIntegerPartPipe,\n TuiSignSymbolPipe,\n ],\n exports: [TuiMoneyComponent],\n})\nexport class TuiMoneyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,iCAAiC,GAAoB;IAC9D,OAAO,EAAE,UAAU;IACnB,QAAQ;IACR,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,KAAK;EACpB;MAEW,iBAAiB,GAAG,IAAI,cAAc,CAC/C,wCAAwC,EACxC;IACI,OAAO,EAAE,MAAM,iCAAiC;CACnD,EACH;MAEW,uBAAuB,GAEf,CAAC,OAAiC,MAAM;IACzD,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,kCAAM,iCAAiC,GAAK,OAAO,CAAC;CAC/D;;SChCe,mBAAmB,CAC/B,KAAa,EACb,IAAmB;IAEnB,IAAI,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,KAAK,eAAe,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;QACvE,OAAO,EAAE,CAAC;KACb;IAED,IAAI,IAAI,KAAK,gBAAgB,KAAK,KAAK,GAAG,CAAC,IAAI,IAAI,KAAK,gBAAgB,CAAC,EAAE;QACvE,OAAO,UAAU,CAAC;KACrB;IAED,OAAO,SAAS,CAAC;AACrB;;ICQa,iBAAiB,GAA9B,MAAa,iBAAiB;IAwD1B,YAAwD,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;QArDhF,UAAK,GAAG,GAAG,CAAC;QAIZ,YAAO,GAAgB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;QAI5C,aAAQ,GAAwB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QAItD,SAAI,GAAkB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAIxC,YAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OA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a,EAAE,SAAiB;QACtC,OAAO,YAAY,CACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EACtD,IAAI,EACJ,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAClC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CACtC,CAAC;KACL;EACJ;;4CAXQ,MAAM,SAAC,iBAAiB;;AAFpB,kBAAkB;IAD9B,IAAI,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;IAGtB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GAFrB,kBAAkB,CAa9B;;ICXY,iBAAiB,GAA9B,MAAa,iBAAiB;IAC1B,SAAS,CAAC,KAAa,EAAE,IAAmB;QACxC,OAAO,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;KAC3C;EACJ;AAJY,iBAAiB;IAD7B,IAAI,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;GACjB,iBAAiB,CAI7B;;ICSY,cAAc,GAA3B,MAAa,cAAc;EAAG;AAAjB,cAAc;IAV1B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,CAAC;QAC9C,YAAY,EAAE;YACV,iBAAiB;YACjB,mBAAmB;YACnB,kBAAkB;YAClB,iBAAiB;SACpB;QACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;KAC/B,CAAC;GACW,cAAc,CAAG;;ACnB9B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-components-money.js","sources":["ng://@taiga-ui/addon-commerce/components/money/money-options.ts","ng://@taiga-ui/addon-commerce/components/money/utils/format-sign-symbol.ts","ng://@taiga-ui/addon-commerce/components/money/money.component.ts","ng://@taiga-ui/addon-commerce/components/money/utils/format-fraction-part.ts","ng://@taiga-ui/addon-commerce/components/money/pipes/fraction-part.pipe.ts","ng://@taiga-ui/addon-commerce/components/money/pipes/integer-part.pipe.ts","ng://@taiga-ui/addon-commerce/components/money/pipes/sign-symbol.pipe.ts","ng://@taiga-ui/addon-commerce/components/money/money.module.ts","ng://@taiga-ui/addon-commerce/components/money/taiga-ui-addon-commerce-components-money.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiCurrency} from '@taiga-ui/addon-commerce/enums';\nimport {TuiCurrencyVariants, TuiMoneySignT} from '@taiga-ui/addon-commerce/types';\nimport {TuiDecimalT} from '@taiga-ui/core';\n\nexport interface TuiMoneyOptions {\n readonly decimal: TuiDecimalT;\n readonly currency: TuiCurrencyVariants;\n readonly sign: TuiMoneySignT;\n readonly colored: boolean;\n readonly precision: number;\n readonly singleColor: boolean;\n}\n\nexport const TUI_MONEY_DEFAULT_DEFAULT_OPTIONS: TuiMoneyOptions = {\n decimal: `not-zero`,\n currency: TuiCurrency.Ruble,\n sign: `negative-only`,\n colored: false,\n precision: 2,\n singleColor: false,\n};\n\nexport const TUI_MONEY_OPTIONS = new InjectionToken<TuiMoneyOptions>(\n `Default parameters for money component`,\n {\n factory: () => TUI_MONEY_DEFAULT_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiMoneyOptionsProvider: (\n options: Partial<TuiMoneyOptions>,\n) => ValueProvider = (options: Partial<TuiMoneyOptions>) => ({\n provide: TUI_MONEY_OPTIONS,\n useValue: {...TUI_MONEY_DEFAULT_DEFAULT_OPTIONS, ...options},\n});\n","import {TuiMoneySignSymbol, TuiMoneySignT} from '@taiga-ui/addon-commerce/types';\nimport {CHAR_MINUS, CHAR_PLUS} from '@taiga-ui/cdk';\n\nexport function tuiFormatSignSymbol(\n value: number,\n sign: TuiMoneySignT,\n): TuiMoneySignSymbol {\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 ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n TuiCurrencyVariants,\n TuiMoneySignSymbol,\n TuiMoneySignT,\n} from '@taiga-ui/addon-commerce/types';\nimport {CHAR_MINUS, CHAR_PLUS, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiDecimalT} from '@taiga-ui/core';\n\nimport {TUI_MONEY_OPTIONS, TuiMoneyOptions} from './money-options';\nimport {tuiFormatSignSymbol} from './utils/format-sign-symbol';\n\n@Component({\n selector: `tui-money`,\n templateUrl: `./money.template.html`,\n styleUrls: [`./money.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMoneyComponent {\n @Input()\n @tuiDefaultProp()\n value = NaN;\n\n @Input()\n @tuiDefaultProp()\n decimal: TuiDecimalT = this.options.decimal;\n\n @Input()\n @tuiDefaultProp()\n currency: TuiCurrencyVariants = this.options.currency;\n\n @Input()\n @tuiDefaultProp()\n sign: TuiMoneySignT = this.options.sign;\n\n @Input()\n @tuiDefaultProp()\n colored = this.options.colored;\n\n @Input()\n @tuiDefaultProp()\n precision = this.options.precision;\n\n @Input()\n @tuiDefaultProp()\n singleColor = this.options.singleColor;\n\n get signSymbol(): TuiMoneySignSymbol {\n return tuiFormatSignSymbol(this.value, this.sign);\n }\n\n @HostBinding(`class._red`)\n get red(): boolean {\n return (\n this.colored &&\n (this.signSymbol === CHAR_MINUS ||\n (this.value < 0 && this.sign !== `force-positive`))\n );\n }\n\n @HostBinding(`class._green`)\n get green(): boolean {\n return (\n this.colored &&\n (this.signSymbol === CHAR_PLUS ||\n (this.value > 0 && this.sign !== `force-negative`))\n );\n }\n\n @HostBinding(`class._inherit-color`)\n get inheritColor(): boolean {\n return this.singleColor || (this.value === 0 && this.colored);\n }\n\n constructor(@Inject(TUI_MONEY_OPTIONS) private readonly options: TuiMoneyOptions) {}\n}\n","import {TuiDecimalT, TuiNumberFormatSettings} from '@taiga-ui/core';\n\nexport function tuiFormatFractionPart(options: {\n value: number;\n decimal: TuiDecimalT;\n precision: number;\n numberFormat: TuiNumberFormatSettings;\n}): string {\n const {value, decimal, numberFormat, precision} = options;\n const fraction = value.toFixed(precision).split(`.`)[1];\n const shouldShow =\n decimal !== `never` && (decimal === `always` || !!parseInt(fraction, 10));\n\n return shouldShow ? `${numberFormat.decimalSeparator}${fraction}` : ``;\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TUI_NUMBER_FORMAT, TuiDecimalT, TuiNumberFormatSettings} from '@taiga-ui/core';\n\nimport {tuiFormatFractionPart} from '../utils/format-fraction-part';\n\n@Pipe({name: `tuiFractionPart`})\nexport class TuiFractionPartPipe implements PipeTransform {\n constructor(\n @Inject(TUI_NUMBER_FORMAT) private readonly numberFormat: TuiNumberFormatSettings,\n ) {}\n\n transform(value: number, decimal: TuiDecimalT, precision: number): string {\n return tuiFormatFractionPart({\n value,\n decimal,\n precision,\n numberFormat: this.numberFormat,\n });\n }\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {formatNumber, TUI_NUMBER_FORMAT, TuiNumberFormatSettings} from '@taiga-ui/core';\n\n@Pipe({name: `tuiIntegerPart`})\nexport class TuiIntegerPartPipe implements PipeTransform {\n constructor(\n @Inject(TUI_NUMBER_FORMAT) private readonly numberFormat: TuiNumberFormatSettings,\n ) {}\n\n transform(value: number, precision: number): string {\n return formatNumber(\n Math.floor(Math.abs(Number(value.toFixed(precision)))),\n null,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiMoneySignSymbol, TuiMoneySignT} from '@taiga-ui/addon-commerce/types';\n\nimport {tuiFormatSignSymbol} from '../utils/format-sign-symbol';\n\n@Pipe({name: `tuiSignSymbol`})\nexport class TuiSignSymbolPipe implements PipeTransform {\n transform(value: number, sign: TuiMoneySignT): TuiMoneySignSymbol {\n return tuiFormatSignSymbol(value, sign);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiCurrencyPipeModule} from '@taiga-ui/addon-commerce/pipes';\n\nimport {TuiMoneyComponent} from './money.component';\nimport {TuiFractionPartPipe} from './pipes/fraction-part.pipe';\nimport {TuiIntegerPartPipe} from './pipes/integer-part.pipe';\nimport {TuiSignSymbolPipe} from './pipes/sign-symbol.pipe';\n\n@NgModule({\n imports: [CommonModule, TuiCurrencyPipeModule],\n declarations: [\n TuiMoneyComponent,\n TuiFractionPartPipe,\n TuiIntegerPartPipe,\n TuiSignSymbolPipe,\n ],\n exports: [TuiMoneyComponent],\n})\nexport class TuiMoneyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,iCAAiC,GAAoB;IAC9D,OAAO,EAAE,UAAU;IACnB,QAAQ;IACR,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,KAAK;EACpB;MAEW,iBAAiB,GAAG,IAAI,cAAc,CAC/C,wCAAwC,EACxC;IACI,OAAO,EAAE,MAAM,iCAAiC;CACnD,EACH;MAEW,uBAAuB,GAEf,CAAC,OAAiC,MAAM;IACzD,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,kCAAM,iCAAiC,GAAK,OAAO,CAAC;CAC/D;;SChCe,mBAAmB,CAC/B,KAAa,EACb,IAAmB;IAEnB,IAAI,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,KAAK,eAAe,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;QACvE,OAAO,EAAE,CAAC;KACb;IAED,IAAI,IAAI,KAAK,gBAAgB,KAAK,KAAK,GAAG,CAAC,IAAI,IAAI,KAAK,gBAAgB,CAAC,EAAE;QACvE,OAAO,UAAU,CAAC;KACrB;IAED,OAAO,SAAS,CAAC;AACrB;;ICQa,iBAAiB,GAA9B,MAAa,iBAAiB;IAwD1B,YAAwD,OA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ACnB9B;;;;;;"}
|
|
@@ -3,32 +3,32 @@ import { isCardLengthValid, isCardNumberValid } from '@taiga-ui/addon-commerce/u
|
|
|
3
3
|
|
|
4
4
|
const ALLOWED_REGEXP = /[A-Z]| /;
|
|
5
5
|
const MAP = {
|
|
6
|
-
А:
|
|
7
|
-
В:
|
|
8
|
-
Г:
|
|
9
|
-
Д:
|
|
10
|
-
Е:
|
|
11
|
-
З:
|
|
12
|
-
И:
|
|
13
|
-
Й:
|
|
14
|
-
К:
|
|
15
|
-
Л:
|
|
16
|
-
М:
|
|
17
|
-
Н:
|
|
18
|
-
О:
|
|
19
|
-
П:
|
|
20
|
-
Р:
|
|
21
|
-
С:
|
|
22
|
-
Т:
|
|
23
|
-
У:
|
|
24
|
-
Ф:
|
|
25
|
-
Ц:
|
|
26
|
-
Ч:
|
|
27
|
-
Ш:
|
|
28
|
-
Щ:
|
|
29
|
-
Ы:
|
|
30
|
-
Ь:
|
|
31
|
-
Я:
|
|
6
|
+
А: `F`,
|
|
7
|
+
В: `D`,
|
|
8
|
+
Г: `U`,
|
|
9
|
+
Д: `L`,
|
|
10
|
+
Е: `T`,
|
|
11
|
+
З: `P`,
|
|
12
|
+
И: `B`,
|
|
13
|
+
Й: `Q`,
|
|
14
|
+
К: `R`,
|
|
15
|
+
Л: `K`,
|
|
16
|
+
М: `V`,
|
|
17
|
+
Н: `Y`,
|
|
18
|
+
О: `J`,
|
|
19
|
+
П: `G`,
|
|
20
|
+
Р: `H`,
|
|
21
|
+
С: `C`,
|
|
22
|
+
Т: `N`,
|
|
23
|
+
У: `E`,
|
|
24
|
+
Ф: `A`,
|
|
25
|
+
Ц: `W`,
|
|
26
|
+
Ч: `X`,
|
|
27
|
+
Ш: `I`,
|
|
28
|
+
Щ: `O`,
|
|
29
|
+
Ы: `S`,
|
|
30
|
+
Ь: `M`,
|
|
31
|
+
Я: `Z`,
|
|
32
32
|
};
|
|
33
33
|
function toEnglishUppercase(char) {
|
|
34
34
|
const uppercase = char.toUpperCase();
|
|
@@ -45,22 +45,22 @@ const TUI_CARD_MASK = [
|
|
|
45
45
|
TUI_DIGIT_REGEXP,
|
|
46
46
|
TUI_DIGIT_REGEXP,
|
|
47
47
|
TUI_DIGIT_REGEXP,
|
|
48
|
-
|
|
48
|
+
` `,
|
|
49
49
|
TUI_DIGIT_REGEXP,
|
|
50
50
|
TUI_DIGIT_REGEXP,
|
|
51
51
|
TUI_DIGIT_REGEXP,
|
|
52
52
|
TUI_DIGIT_REGEXP,
|
|
53
|
-
|
|
53
|
+
` `,
|
|
54
54
|
TUI_DIGIT_REGEXP,
|
|
55
55
|
TUI_DIGIT_REGEXP,
|
|
56
56
|
TUI_DIGIT_REGEXP,
|
|
57
57
|
TUI_DIGIT_REGEXP,
|
|
58
|
-
|
|
58
|
+
` `,
|
|
59
59
|
TUI_DIGIT_REGEXP,
|
|
60
60
|
TUI_DIGIT_REGEXP,
|
|
61
61
|
TUI_DIGIT_REGEXP,
|
|
62
62
|
TUI_DIGIT_REGEXP,
|
|
63
|
-
|
|
63
|
+
` `,
|
|
64
64
|
TUI_DIGIT_REGEXP,
|
|
65
65
|
TUI_DIGIT_REGEXP,
|
|
66
66
|
TUI_DIGIT_REGEXP,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-constants.js","sources":["ng://@taiga-ui/addon-commerce/constants/card-holder-mask.ts","ng://@taiga-ui/addon-commerce/constants/card-mask.ts","ng://@taiga-ui/addon-commerce/constants/default-card-validator.ts","ng://@taiga-ui/addon-commerce/constants/taiga-ui-addon-commerce-constants.ts"],"sourcesContent":["import {tuiCreateCorrectionMask, TuiTextMaskListHandler} from '@taiga-ui/core';\n\nconst ALLOWED_REGEXP = /[A-Z]| /;\nconst MAP: Record<string, string> = {\n А:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-constants.js","sources":["ng://@taiga-ui/addon-commerce/constants/card-holder-mask.ts","ng://@taiga-ui/addon-commerce/constants/card-mask.ts","ng://@taiga-ui/addon-commerce/constants/default-card-validator.ts","ng://@taiga-ui/addon-commerce/constants/taiga-ui-addon-commerce-constants.ts"],"sourcesContent":["import {tuiCreateCorrectionMask, TuiTextMaskListHandler} from '@taiga-ui/core';\n\nconst ALLOWED_REGEXP = /[A-Z]| /;\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(char: string): string | null {\n const uppercase = char.toUpperCase();\n const result = ALLOWED_REGEXP.test(uppercase) ? uppercase : MAP[uppercase];\n\n return result || null;\n}\n\nexport const cardHolderMask: TuiTextMaskListHandler = tuiCreateCorrectionMask(\n ALLOWED_REGEXP,\n toEnglishUppercase,\n);\n","import {TUI_DIGIT_REGEXP} from '@taiga-ui/core';\n\n/**\n * @internal\n */\nexport const TUI_CARD_MASK = [\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n ` `,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n ` `,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n ` `,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n ` `,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n TUI_DIGIT_REGEXP,\n];\n","import {isCardLengthValid, isCardNumberValid} from '@taiga-ui/addon-commerce/utils';\nimport {TuiBooleanHandler} from '@taiga-ui/cdk';\n\nexport const tuiDefaultCardValidator: TuiBooleanHandler<string> = card =>\n card.length > 11 && isCardLengthValid(card) && isCardNumberValid(card);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG,SAAS,CAAC;AACjC,MAAM,GAAG,GAA2B;IAChC,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;CACT,CAAC;AAEF,SAAS,kBAAkB,CAAC,IAAY;IACpC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;IAE3E,OAAO,MAAM,IAAI,IAAI,CAAC;AAC1B,CAAC;MAEY,cAAc,GAA2B,uBAAuB,CACzE,cAAc,EACd,kBAAkB;;ACvCtB;;;MAGa,aAAa,GAAG;IACzB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,GAAG;IACH,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,GAAG;IACH,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,GAAG;IACH,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,GAAG;IACH,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;;;MCzBP,uBAAuB,GAA8B,IAAI,IAClE,IAAI,CAAC,MAAM,GAAG,EAAE,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI;;ACJzE;;;;;;"}
|
|
@@ -166,6 +166,13 @@ var TuiCurrency;
|
|
|
166
166
|
* @description Countries and territories: Ukraine
|
|
167
167
|
*/
|
|
168
168
|
TuiCurrency["Hryvnia"] = "UAH";
|
|
169
|
+
/**
|
|
170
|
+
* Mexican peso
|
|
171
|
+
*
|
|
172
|
+
* @description Numeric code: 484
|
|
173
|
+
* @description Alphabetic code: MXN
|
|
174
|
+
* @description Countries and territories: Mexico
|
|
175
|
+
*/
|
|
169
176
|
TuiCurrency["MexicanPeso"] = "MXN";
|
|
170
177
|
})(TuiCurrency || (TuiCurrency = {}));
|
|
171
178
|
|
|
@@ -337,6 +344,13 @@ var TuiCurrencyCode;
|
|
|
337
344
|
* @description Countries and territories: Ukraine
|
|
338
345
|
*/
|
|
339
346
|
TuiCurrencyCode["Hryvnia"] = "980";
|
|
347
|
+
/**
|
|
348
|
+
* Mexican peso
|
|
349
|
+
*
|
|
350
|
+
* @description Numeric code: 484
|
|
351
|
+
* @description Alphabetic code: MXN
|
|
352
|
+
* @description Countries and territories: Mexico
|
|
353
|
+
*/
|
|
340
354
|
TuiCurrencyCode["MexicanPeso"] = "484";
|
|
341
355
|
})(TuiCurrencyCode || (TuiCurrencyCode = {}));
|
|
342
356
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-enums.js","sources":["ng://@taiga-ui/addon-commerce/enums/currency.ts","ng://@taiga-ui/addon-commerce/enums/currency-code.ts","ng://@taiga-ui/addon-commerce/enums/money-sign.ts","ng://@taiga-ui/addon-commerce/enums/payment-system.ts","ng://@taiga-ui/addon-commerce/enums/taiga-ui-addon-commerce-enums.ts"],"sourcesContent":["/**\n * **Active ISO 4217 alphabetic currency codes**\n *\n * @description The ISO 4217 classification is used to describe alphabetic and numeric currency codes.\n * @description Alphabetic code is also called \"alfa-3\".\n *\n * @link https://en.wikipedia.org/wiki/ISO_4217\n */\nexport const enum TuiCurrency {\n /**\n * Russian ruble\n *\n * @description Numeric code: 643\n * @description Alphabetic code: RUB\n * @description Countries and territories: Russia\n */\n Ruble = 'RUB',\n\n /**\n * Euro\n *\n * @description Numeric code: 978\n * @description Alphabetic code: EUR\n * @description Countries and territories: Åland Islands (AX), European Union (EU), Andorra (AD), Austria (AT), Belgium (BE), Cyprus (CY), Estonia (EE), Finland (FI), France (FR), French Southern and Antarctic Lands (TF), Germany (DE), Greece (GR), Guadeloupe (GP), Ireland (IE), Italy (IT), Latvia (LV), Lithuania (LT), Luxembourg (LU), Malta (MT), French Guiana (GF), Martinique (MQ), Mayotte (YT), Monaco (MC), Montenegro (ME), Netherlands (NL), Portugal (PT), Réunion (RE), Saint Barthélemy (BL), Saint Martin (MF), Saint Pierre and Miquelon (PM), San Marino (SM), Slovakia (SK), Slovenia (SI), Spain (ES), Vatican City (VA)\n */\n Euro = 'EUR',\n\n /**\n * United States dollar\n *\n * @description Numeric code: 840\n * @description Alphabetic code: USD\n * @description Countries and territories: United States, American Samoa (AS), British Indian Ocean Territory (IO) (also uses GBP), British Virgin Islands (VG), Caribbean Netherlands (BQ – Bonaire, Sint Eustatius and Saba), Ecuador (EC), El Salvador (SV), Guam (GU), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Palau (PW), Panama (PA) (as well as Panamanian Balboa), Puerto Rico (PR), Timor-Leste (TL), Turks and Caicos Islands (TC), U.S. Virgin Islands (VI), United States Minor Outlying Islands (UM)\n */\n Dollar = 'USD',\n\n /**\n * Pound sterling\n *\n * @description Numeric code: 826\n * @description Alphabetic code: GBP\n * @description Countries and territories: United Kingdom, Isle of Man (IM, see Manx pound), Jersey (JE, see Jersey pound), Guernsey (GG, see Guernsey pound), Tristan da Cunha (SH-TA)\n */\n Pound = 'GBP',\n\n /**\n * Thai baht\n *\n * @description Numeric code: 764\n * @description Alphabetic code: THB\n * @description Countries and territories: Thailand\n */\n Baht = 'THB',\n\n /**\n * Turkish lira\n *\n * @description Numeric code: 949\n * @description Alphabetic code: TRY\n * @description Countries and territories: Turkey\n */\n TurkishLira = 'TRY',\n\n /**\n * Chinese yuan\n *\n * @description Numeric code: 156\n * @description Alphabetic code: CNY\n * @description Countries and territories: China\n */\n YuanRenminbi = 'CNY',\n\n /**\n * Kazakhstani tenge\n *\n * @description Numeric code: 398\n * @description Alphabetic code: KZT\n * @description Countries and territories: Kazakhstan\n */\n Tenge = 'KZT',\n\n /**\n * Israeli new shekel\n *\n * @description Numeric code: 376\n * @description Alphabetic code: ILS\n * @description Countries and territories: Israel\n */\n IsraeliShekel = 'ILS',\n\n /**\n * Indian rupee\n *\n * @description Numeric code: 356\n * @description Alphabetic code: INR\n * @description Countries and territories: India, Bhutan\n */\n IndianRupee = 'INR',\n\n /**\n * Japanese yen\n *\n * @description Numeric code: 392\n * @description Alphabetic code: JPY\n * @description Countries and territories: Japan\n */\n Yen = 'JPY',\n\n /**\n * South Korean won\n *\n * @description Numeric code: 410\n * @description Alphabetic code: KRW\n * @description Countries and territories: South Korea\n */\n Won = 'KRW',\n\n /**\n * Swiss franc\n *\n * @description Numeric code: 756\n * @description Alphabetic code: CHF\n * @description Countries and territories: Switzerland, Liechtenstein (LI)\n */\n SwissFranc = 'CHF',\n\n /**\n * Singapore dollar\n *\n * @description Numeric code: 702\n * @description Alphabetic code: SGD\n * @description Countries and territories: Singapore\n */\n SingaporeDollar = 'SGD',\n\n /**\n * Australian dollar\n *\n * @description Numeric code: 036\n * @description Alphabetic code: AUD\n * @description Countries and territories: Australia, Christmas Island (CX), Cocos (Keeling) Islands (CC), Heard Island and McDonald Islands (HM), Kiribati (KI), Nauru (NR), Norfolk Island (NF), Tuvalu (TV)\n */\n AustralianDollar = 'AUD',\n\n /**\n * Hong Kong dollar\n *\n * @description Numeric code: 344\n * @description Alphabetic code: HKD\n * @description Countries and territories: Hong Kong\n */\n HongKongDollar = 'HKD',\n\n /**\n * @deprecated:\n * TODO: 3.0 replace with {@link HongKongDollar}\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n HongKong_dollar = 'HKD',\n\n /**\n * Canadian dollar\n *\n * @description Numeric code: 124\n * @description Alphabetic code: CAD\n * @description Countries and territories: Canada\n */\n CanadianDollar = 'CAD',\n\n /**\n * Armenian dram\n *\n * @description Numeric code: 051\n * @description Alphabetic code: AMD\n * @description Countries and territories: Armenia\n */\n ArmenianDram = 'AMD',\n\n /**\n * Ukrainian hryvnia\n *\n * @description Numeric code: 980\n * @description Alphabetic code: UAH\n * @description Countries and territories: Ukraine\n */\n Hryvnia = 'UAH',\n MexicanPeso = 'MXN',\n}\n","/**\n * **Active ISO 4217 numeric currency codes**\n *\n * @description The ISO 4217 classification is used to describe alphabetic and numeric currency codes.\n * @description Numeric code is also called \"number-3\".\n *\n * @link https://en.wikipedia.org/wiki/ISO_4217\n */\nexport const enum TuiCurrencyCode {\n /**\n * Russian ruble\n *\n * @description Numeric code: 643\n * @description Alphabetic code: RUB\n * @description Countries and territories: Russia\n */\n Ruble = '643',\n\n /**\n * Euro\n *\n * @description Numeric code: 978\n * @description Alphabetic code: EUR\n * @description Countries and territories: Åland Islands (AX), European Union (EU), Andorra (AD), Austria (AT), Belgium (BE), Cyprus (CY), Estonia (EE), Finland (FI), France (FR), French Southern and Antarctic Lands (TF), Germany (DE), Greece (GR), Guadeloupe (GP), Ireland (IE), Italy (IT), Latvia (LV), Lithuania (LT), Luxembourg (LU), Malta (MT), French Guiana (GF), Martinique (MQ), Mayotte (YT), Monaco (MC), Montenegro (ME), Netherlands (NL), Portugal (PT), Réunion (RE), Saint Barthélemy (BL), Saint Martin (MF), Saint Pierre and Miquelon (PM), San Marino (SM), Slovakia (SK), Slovenia (SI), Spain (ES), Vatican City (VA)\n */\n Euro = '978',\n\n /**\n * United States dollar\n *\n * @description Numeric code: 840\n * @description Alphabetic code: USD\n * @description Countries and territories: United States, American Samoa (AS), British Indian Ocean Territory (IO) (also uses GBP), British Virgin Islands (VG), Caribbean Netherlands (BQ – Bonaire, Sint Eustatius and Saba), Ecuador (EC), El Salvador (SV), Guam (GU), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Palau (PW), Panama (PA) (as well as Panamanian Balboa), Puerto Rico (PR), Timor-Leste (TL), Turks and Caicos Islands (TC), U.S. Virgin Islands (VI), United States Minor Outlying Islands (UM)\n */\n Dollar = '840',\n\n /**\n * Pound sterling\n *\n * @description Numeric code: 826\n * @description Alphabetic code: GBP\n * @description Countries and territories: United Kingdom, Isle of Man (IM, see Manx pound), Jersey (JE, see Jersey pound), Guernsey (GG, see Guernsey pound), Tristan da Cunha (SH-TA)\n */\n Pound = '826',\n\n /**\n * Thai baht\n *\n * @description Numeric code: 764\n * @description Alphabetic code: THB\n * @description Countries and territories: Thailand\n */\n Baht = '764',\n\n /**\n * Turkish lira\n *\n * @description Numeric code: 949\n * @description Alphabetic code: TRY\n * @description Countries and territories: Turkey\n */\n TurkishLira = '949',\n\n /**\n * Chinese yuan\n *\n * @description Numeric code: 156\n * @description Alphabetic code: CNY\n * @description Countries and territories: China\n */\n YuanRenminbi = '156',\n\n /**\n * Kazakhstani tenge\n *\n * @description Numeric code: 398\n * @description Alphabetic code: KZT\n * @description Countries and territories: Kazakhstan\n */\n Tenge = '398',\n\n /**\n * Israeli new shekel\n *\n * @description Numeric code: 376\n * @description Alphabetic code: ILS\n * @description Countries and territories: Israel\n */\n IsraeliShekel = '376',\n\n /**\n * Indian rupee\n *\n * @description Numeric code: 356\n * @description Alphabetic code: INR\n * @description Countries and territories: India, Bhutan\n */\n IndianRupee = '356',\n\n /**\n * Japanese yen\n *\n * @description Numeric code: 392\n * @description Alphabetic code: JPY\n * @description Countries and territories: Japan\n */\n Yen = '392',\n\n /**\n * South Korean won\n *\n * @description Numeric code: 410\n * @description Alphabetic code: KRW\n * @description Countries and territories: South Korea\n */\n Won = '410',\n\n /**\n * Swiss franc\n *\n * @description Numeric code: 756\n * @description Alphabetic code: CHF\n * @description Countries and territories: Switzerland, Liechtenstein (LI)\n */\n SwissFranc = '756',\n\n /**\n * Singapore dollar\n *\n * @description Numeric code: 702\n * @description Alphabetic code: SGD\n * @description Countries and territories: Singapore\n */\n SingaporeDollar = '702',\n\n /**\n * Australian dollar\n *\n * @description Numeric code: 036\n * @description Alphabetic code: AUD\n * @description Countries and territories: Australia, Christmas Island (CX), Cocos (Keeling) Islands (CC), Heard Island and McDonald Islands (HM), Kiribati (KI), Nauru (NR), Norfolk Island (NF), Tuvalu (TV)\n */\n AustralianDollar = '036',\n\n /**\n * Hong Kong dollar\n *\n * @description Numeric code: 344\n * @description Alphabetic code: HKD\n * @description Countries and territories: Hong Kong\n */\n HongKongDollar = '344',\n\n /**\n * @deprecated\n * TODO: 3.0 replace with {@link HongKongDollar}\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n HongKong_dollar = '344',\n\n /**\n * Canadian dollar\n *\n * @description Numeric code: 124\n * @description Alphabetic code: CAD\n * @description Countries and territories: Canada\n */\n CanadianDollar = '124',\n\n /**\n * Armenian dram\n *\n * @description Numeric code: 051\n * @description Alphabetic code: AMD\n * @description Countries and territories: Armenia\n */\n ArmenianDram = '051',\n\n /**\n * Ukrainian hryvnia\n *\n * @description Numeric code: 980\n * @description Alphabetic code: UAH\n * @description Countries and territories: Ukraine\n */\n Hryvnia = '980',\n MexicanPeso = '484',\n}\n","/**\n * negative-only — show sign only for negative numbers\n * always — always show sign, except for zero\n * never — never show sign\n * force-negative — show minus no matter the number, except for zero\n * force-positive — show plus no matter the number, except for zero\n * @deprecated use join type {@link TuiMoneySignT}\n * TODO: delete in v3.0\n */\nexport const enum TuiMoneySign {\n NegativeOnly = 'negative-only',\n Always = 'always',\n Never = 'never',\n ForceNegative = 'force-negative',\n ForcePositive = 'force-positive',\n}\n","export const enum TuiPaymentSystem {\n Visa = 'visa',\n Electron = 'electron',\n Mastercard = 'mastercard',\n Maestro = 'maestro',\n Mir = 'mir',\n}\n\nexport type TuiPaymentSystemT = 'visa' | 'electron' | 'mastercard' | 'maestro' | 'mir';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;IAQkB;AAAlB,WAAkB,WAAW;;;;;;;;IAQzB,4BAAa,CAAA;;;;;;;;IASb,2BAAY,CAAA;;;;;;;;IASZ,6BAAc,CAAA;;;;;;;;IASd,4BAAa,CAAA;;;;;;;;IASb,2BAAY,CAAA;;;;;;;;IASZ,kCAAmB,CAAA;;;;;;;;IASnB,mCAAoB,CAAA;;;;;;;;IASpB,4BAAa,CAAA;;;;;;;;IASb,oCAAqB,CAAA;;;;;;;;IASrB,kCAAmB,CAAA;;;;;;;;IASnB,0BAAW,CAAA;;;;;;;;IASX,0BAAW,CAAA;;;;;;;;IASX,iCAAkB,CAAA;;;;;;;;IASlB,sCAAuB,CAAA;;;;;;;;IASvB,uCAAwB,CAAA;;;;;;;;IASxB,qCAAsB,CAAA;;;;;;IAOtB,sCAAuB,CAAA;;;;;;;;IASvB,qCAAsB,CAAA;;;;;;;;IAStB,mCAAoB,CAAA;;;;;;;;IASpB,8BAAe,CAAA;IACf,kCAAmB,CAAA;AACvB,CAAC,EAnLiB,WAAW,KAAX,WAAW;;ACR7B;;;;;;;;IAQkB;AAAlB,WAAkB,eAAe;;;;;;;;IAQ7B,gCAAa,CAAA;;;;;;;;IASb,+BAAY,CAAA;;;;;;;;IASZ,iCAAc,CAAA;;;;;;;;IASd,gCAAa,CAAA;;;;;;;;IASb,+BAAY,CAAA;;;;;;;;IASZ,sCAAmB,CAAA;;;;;;;;IASnB,uCAAoB,CAAA;;;;;;;;IASpB,gCAAa,CAAA;;;;;;;;IASb,wCAAqB,CAAA;;;;;;;;IASrB,sCAAmB,CAAA;;;;;;;;IASnB,8BAAW,CAAA;;;;;;;;IASX,8BAAW,CAAA;;;;;;;;IASX,qCAAkB,CAAA;;;;;;;;IASlB,0CAAuB,CAAA;;;;;;;;IASvB,2CAAwB,CAAA;;;;;;;;IASxB,yCAAsB,CAAA;;;;;;IAOtB,0CAAuB,CAAA;;;;;;;;IASvB,yCAAsB,CAAA;;;;;;;;IAStB,uCAAoB,CAAA;;;;;;;;IASpB,kCAAe,CAAA;IACf,sCAAmB,CAAA;AACvB,CAAC,EAnLiB,eAAe,KAAf,eAAe;;ACRjC;;;;;;;;;IASkB;AAAlB,WAAkB,YAAY;IAC1B,8CAA8B,CAAA;IAC9B,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,gDAAgC,CAAA;IAChC,gDAAgC,CAAA;AACpC,CAAC,EANiB,YAAY,KAAZ,YAAY;;ICTZ;AAAlB,WAAkB,gBAAgB;IAC9B,iCAAa,CAAA;IACb,yCAAqB,CAAA;IACrB,6CAAyB,CAAA;IACzB,uCAAmB,CAAA;IACnB,+BAAW,CAAA;AACf,CAAC,EANiB,gBAAgB,KAAhB,gBAAgB;;ACAlC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-enums.js","sources":["ng://@taiga-ui/addon-commerce/enums/currency.ts","ng://@taiga-ui/addon-commerce/enums/currency-code.ts","ng://@taiga-ui/addon-commerce/enums/money-sign.ts","ng://@taiga-ui/addon-commerce/enums/payment-system.ts","ng://@taiga-ui/addon-commerce/enums/taiga-ui-addon-commerce-enums.ts"],"sourcesContent":["/**\n * **Active ISO 4217 alphabetic currency codes**\n *\n * @description The ISO 4217 classification is used to describe alphabetic and numeric currency codes.\n * @description Alphabetic code is also called \"alfa-3\".\n *\n * @link https://en.wikipedia.org/wiki/ISO_4217\n */\nexport const enum TuiCurrency {\n /**\n * Russian ruble\n *\n * @description Numeric code: 643\n * @description Alphabetic code: RUB\n * @description Countries and territories: Russia\n */\n Ruble = `RUB`,\n\n /**\n * Euro\n *\n * @description Numeric code: 978\n * @description Alphabetic code: EUR\n * @description Countries and territories: Åland Islands (AX), European Union (EU), Andorra (AD), Austria (AT), Belgium (BE), Cyprus (CY), Estonia (EE), Finland (FI), France (FR), French Southern and Antarctic Lands (TF), Germany (DE), Greece (GR), Guadeloupe (GP), Ireland (IE), Italy (IT), Latvia (LV), Lithuania (LT), Luxembourg (LU), Malta (MT), French Guiana (GF), Martinique (MQ), Mayotte (YT), Monaco (MC), Montenegro (ME), Netherlands (NL), Portugal (PT), Réunion (RE), Saint Barthélemy (BL), Saint Martin (MF), Saint Pierre and Miquelon (PM), San Marino (SM), Slovakia (SK), Slovenia (SI), Spain (ES), Vatican City (VA)\n */\n Euro = `EUR`,\n\n /**\n * United States dollar\n *\n * @description Numeric code: 840\n * @description Alphabetic code: USD\n * @description Countries and territories: United States, American Samoa (AS), British Indian Ocean Territory (IO) (also uses GBP), British Virgin Islands (VG), Caribbean Netherlands (BQ – Bonaire, Sint Eustatius and Saba), Ecuador (EC), El Salvador (SV), Guam (GU), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Palau (PW), Panama (PA) (as well as Panamanian Balboa), Puerto Rico (PR), Timor-Leste (TL), Turks and Caicos Islands (TC), U.S. Virgin Islands (VI), United States Minor Outlying Islands (UM)\n */\n Dollar = `USD`,\n\n /**\n * Pound sterling\n *\n * @description Numeric code: 826\n * @description Alphabetic code: GBP\n * @description Countries and territories: United Kingdom, Isle of Man (IM, see Manx pound), Jersey (JE, see Jersey pound), Guernsey (GG, see Guernsey pound), Tristan da Cunha (SH-TA)\n */\n Pound = `GBP`,\n\n /**\n * Thai baht\n *\n * @description Numeric code: 764\n * @description Alphabetic code: THB\n * @description Countries and territories: Thailand\n */\n Baht = `THB`,\n\n /**\n * Turkish lira\n *\n * @description Numeric code: 949\n * @description Alphabetic code: TRY\n * @description Countries and territories: Turkey\n */\n TurkishLira = `TRY`,\n\n /**\n * Chinese yuan\n *\n * @description Numeric code: 156\n * @description Alphabetic code: CNY\n * @description Countries and territories: China\n */\n YuanRenminbi = `CNY`,\n\n /**\n * Kazakhstani tenge\n *\n * @description Numeric code: 398\n * @description Alphabetic code: KZT\n * @description Countries and territories: Kazakhstan\n */\n Tenge = `KZT`,\n\n /**\n * Israeli new shekel\n *\n * @description Numeric code: 376\n * @description Alphabetic code: ILS\n * @description Countries and territories: Israel\n */\n IsraeliShekel = `ILS`,\n\n /**\n * Indian rupee\n *\n * @description Numeric code: 356\n * @description Alphabetic code: INR\n * @description Countries and territories: India, Bhutan\n */\n IndianRupee = `INR`,\n\n /**\n * Japanese yen\n *\n * @description Numeric code: 392\n * @description Alphabetic code: JPY\n * @description Countries and territories: Japan\n */\n Yen = `JPY`,\n\n /**\n * South Korean won\n *\n * @description Numeric code: 410\n * @description Alphabetic code: KRW\n * @description Countries and territories: South Korea\n */\n Won = `KRW`,\n\n /**\n * Swiss franc\n *\n * @description Numeric code: 756\n * @description Alphabetic code: CHF\n * @description Countries and territories: Switzerland, Liechtenstein (LI)\n */\n SwissFranc = `CHF`,\n\n /**\n * Singapore dollar\n *\n * @description Numeric code: 702\n * @description Alphabetic code: SGD\n * @description Countries and territories: Singapore\n */\n SingaporeDollar = `SGD`,\n\n /**\n * Australian dollar\n *\n * @description Numeric code: 036\n * @description Alphabetic code: AUD\n * @description Countries and territories: Australia, Christmas Island (CX), Cocos (Keeling) Islands (CC), Heard Island and McDonald Islands (HM), Kiribati (KI), Nauru (NR), Norfolk Island (NF), Tuvalu (TV)\n */\n AustralianDollar = `AUD`,\n\n /**\n * Hong Kong dollar\n *\n * @description Numeric code: 344\n * @description Alphabetic code: HKD\n * @description Countries and territories: Hong Kong\n */\n HongKongDollar = `HKD`,\n\n /**\n * @deprecated:\n * TODO: 3.0 replace with {@link HongKongDollar}\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n HongKong_dollar = `HKD`,\n\n /**\n * Canadian dollar\n *\n * @description Numeric code: 124\n * @description Alphabetic code: CAD\n * @description Countries and territories: Canada\n */\n CanadianDollar = `CAD`,\n\n /**\n * Armenian dram\n *\n * @description Numeric code: 051\n * @description Alphabetic code: AMD\n * @description Countries and territories: Armenia\n */\n ArmenianDram = `AMD`,\n\n /**\n * Ukrainian hryvnia\n *\n * @description Numeric code: 980\n * @description Alphabetic code: UAH\n * @description Countries and territories: Ukraine\n */\n Hryvnia = `UAH`,\n\n /**\n * Mexican peso\n *\n * @description Numeric code: 484\n * @description Alphabetic code: MXN\n * @description Countries and territories: Mexico\n */\n MexicanPeso = `MXN`,\n}\n","/**\n * **Active ISO 4217 numeric currency codes**\n *\n * @description The ISO 4217 classification is used to describe alphabetic and numeric currency codes.\n * @description Numeric code is also called \"number-3\".\n *\n * @link https://en.wikipedia.org/wiki/ISO_4217\n */\nexport const enum TuiCurrencyCode {\n /**\n * Russian ruble\n *\n * @description Numeric code: 643\n * @description Alphabetic code: RUB\n * @description Countries and territories: Russia\n */\n Ruble = `643`,\n\n /**\n * Euro\n *\n * @description Numeric code: 978\n * @description Alphabetic code: EUR\n * @description Countries and territories: Åland Islands (AX), European Union (EU), Andorra (AD), Austria (AT), Belgium (BE), Cyprus (CY), Estonia (EE), Finland (FI), France (FR), French Southern and Antarctic Lands (TF), Germany (DE), Greece (GR), Guadeloupe (GP), Ireland (IE), Italy (IT), Latvia (LV), Lithuania (LT), Luxembourg (LU), Malta (MT), French Guiana (GF), Martinique (MQ), Mayotte (YT), Monaco (MC), Montenegro (ME), Netherlands (NL), Portugal (PT), Réunion (RE), Saint Barthélemy (BL), Saint Martin (MF), Saint Pierre and Miquelon (PM), San Marino (SM), Slovakia (SK), Slovenia (SI), Spain (ES), Vatican City (VA)\n */\n Euro = `978`,\n\n /**\n * United States dollar\n *\n * @description Numeric code: 840\n * @description Alphabetic code: USD\n * @description Countries and territories: United States, American Samoa (AS), British Indian Ocean Territory (IO) (also uses GBP), British Virgin Islands (VG), Caribbean Netherlands (BQ – Bonaire, Sint Eustatius and Saba), Ecuador (EC), El Salvador (SV), Guam (GU), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Palau (PW), Panama (PA) (as well as Panamanian Balboa), Puerto Rico (PR), Timor-Leste (TL), Turks and Caicos Islands (TC), U.S. Virgin Islands (VI), United States Minor Outlying Islands (UM)\n */\n Dollar = `840`,\n\n /**\n * Pound sterling\n *\n * @description Numeric code: 826\n * @description Alphabetic code: GBP\n * @description Countries and territories: United Kingdom, Isle of Man (IM, see Manx pound), Jersey (JE, see Jersey pound), Guernsey (GG, see Guernsey pound), Tristan da Cunha (SH-TA)\n */\n Pound = `826`,\n\n /**\n * Thai baht\n *\n * @description Numeric code: 764\n * @description Alphabetic code: THB\n * @description Countries and territories: Thailand\n */\n Baht = `764`,\n\n /**\n * Turkish lira\n *\n * @description Numeric code: 949\n * @description Alphabetic code: TRY\n * @description Countries and territories: Turkey\n */\n TurkishLira = `949`,\n\n /**\n * Chinese yuan\n *\n * @description Numeric code: 156\n * @description Alphabetic code: CNY\n * @description Countries and territories: China\n */\n YuanRenminbi = `156`,\n\n /**\n * Kazakhstani tenge\n *\n * @description Numeric code: 398\n * @description Alphabetic code: KZT\n * @description Countries and territories: Kazakhstan\n */\n Tenge = `398`,\n\n /**\n * Israeli new shekel\n *\n * @description Numeric code: 376\n * @description Alphabetic code: ILS\n * @description Countries and territories: Israel\n */\n IsraeliShekel = `376`,\n\n /**\n * Indian rupee\n *\n * @description Numeric code: 356\n * @description Alphabetic code: INR\n * @description Countries and territories: India, Bhutan\n */\n IndianRupee = `356`,\n\n /**\n * Japanese yen\n *\n * @description Numeric code: 392\n * @description Alphabetic code: JPY\n * @description Countries and territories: Japan\n */\n Yen = `392`,\n\n /**\n * South Korean won\n *\n * @description Numeric code: 410\n * @description Alphabetic code: KRW\n * @description Countries and territories: South Korea\n */\n Won = `410`,\n\n /**\n * Swiss franc\n *\n * @description Numeric code: 756\n * @description Alphabetic code: CHF\n * @description Countries and territories: Switzerland, Liechtenstein (LI)\n */\n SwissFranc = `756`,\n\n /**\n * Singapore dollar\n *\n * @description Numeric code: 702\n * @description Alphabetic code: SGD\n * @description Countries and territories: Singapore\n */\n SingaporeDollar = `702`,\n\n /**\n * Australian dollar\n *\n * @description Numeric code: 036\n * @description Alphabetic code: AUD\n * @description Countries and territories: Australia, Christmas Island (CX), Cocos (Keeling) Islands (CC), Heard Island and McDonald Islands (HM), Kiribati (KI), Nauru (NR), Norfolk Island (NF), Tuvalu (TV)\n */\n AustralianDollar = `036`,\n\n /**\n * Hong Kong dollar\n *\n * @description Numeric code: 344\n * @description Alphabetic code: HKD\n * @description Countries and territories: Hong Kong\n */\n HongKongDollar = `344`,\n\n /**\n * @deprecated\n * TODO: 3.0 replace with {@link HongKongDollar}\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n HongKong_dollar = `344`,\n\n /**\n * Canadian dollar\n *\n * @description Numeric code: 124\n * @description Alphabetic code: CAD\n * @description Countries and territories: Canada\n */\n CanadianDollar = `124`,\n\n /**\n * Armenian dram\n *\n * @description Numeric code: 051\n * @description Alphabetic code: AMD\n * @description Countries and territories: Armenia\n */\n ArmenianDram = `051`,\n\n /**\n * Ukrainian hryvnia\n *\n * @description Numeric code: 980\n * @description Alphabetic code: UAH\n * @description Countries and territories: Ukraine\n */\n Hryvnia = `980`,\n\n /**\n * Mexican peso\n *\n * @description Numeric code: 484\n * @description Alphabetic code: MXN\n * @description Countries and territories: Mexico\n */\n MexicanPeso = `484`,\n}\n","/**\n * negative-only — show sign only for negative numbers\n * always — always show sign, except for zero\n * never — never show sign\n * force-negative — show minus no matter the number, except for zero\n * force-positive — show plus no matter the number, except for zero\n * @deprecated use join type {@link TuiMoneySignT}\n * TODO: delete in v3.0\n */\nexport const enum TuiMoneySign {\n NegativeOnly = `negative-only`,\n Always = `always`,\n Never = `never`,\n ForceNegative = `force-negative`,\n ForcePositive = `force-positive`,\n}\n","export const enum TuiPaymentSystem {\n Visa = `visa`,\n Electron = `electron`,\n Mastercard = `mastercard`,\n Maestro = `maestro`,\n Mir = `mir`,\n}\n\nexport type TuiPaymentSystemT = 'visa' | 'electron' | 'mastercard' | 'maestro' | 'mir';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;IAQkB;AAAlB,WAAkB,WAAW;;;;;;;;IAQzB,4BAAa,CAAA;;;;;;;;IASb,2BAAY,CAAA;;;;;;;;IASZ,6BAAc,CAAA;;;;;;;;IASd,4BAAa,CAAA;;;;;;;;IASb,2BAAY,CAAA;;;;;;;;IASZ,kCAAmB,CAAA;;;;;;;;IASnB,mCAAoB,CAAA;;;;;;;;IASpB,4BAAa,CAAA;;;;;;;;IASb,oCAAqB,CAAA;;;;;;;;IASrB,kCAAmB,CAAA;;;;;;;;IASnB,0BAAW,CAAA;;;;;;;;IASX,0BAAW,CAAA;;;;;;;;IASX,iCAAkB,CAAA;;;;;;;;IASlB,sCAAuB,CAAA;;;;;;;;IASvB,uCAAwB,CAAA;;;;;;;;IASxB,qCAAsB,CAAA;;;;;;IAOtB,sCAAuB,CAAA;;;;;;;;IASvB,qCAAsB,CAAA;;;;;;;;IAStB,mCAAoB,CAAA;;;;;;;;IASpB,8BAAe,CAAA;;;;;;;;IASf,kCAAmB,CAAA;AACvB,CAAC,EA3LiB,WAAW,KAAX,WAAW;;ACR7B;;;;;;;;IAQkB;AAAlB,WAAkB,eAAe;;;;;;;;IAQ7B,gCAAa,CAAA;;;;;;;;IASb,+BAAY,CAAA;;;;;;;;IASZ,iCAAc,CAAA;;;;;;;;IASd,gCAAa,CAAA;;;;;;;;IASb,+BAAY,CAAA;;;;;;;;IASZ,sCAAmB,CAAA;;;;;;;;IASnB,uCAAoB,CAAA;;;;;;;;IASpB,gCAAa,CAAA;;;;;;;;IASb,wCAAqB,CAAA;;;;;;;;IASrB,sCAAmB,CAAA;;;;;;;;IASnB,8BAAW,CAAA;;;;;;;;IASX,8BAAW,CAAA;;;;;;;;IASX,qCAAkB,CAAA;;;;;;;;IASlB,0CAAuB,CAAA;;;;;;;;IASvB,2CAAwB,CAAA;;;;;;;;IASxB,yCAAsB,CAAA;;;;;;IAOtB,0CAAuB,CAAA;;;;;;;;IASvB,yCAAsB,CAAA;;;;;;;;IAStB,uCAAoB,CAAA;;;;;;;;IASpB,kCAAe,CAAA;;;;;;;;IASf,sCAAmB,CAAA;AACvB,CAAC,EA3LiB,eAAe,KAAf,eAAe;;ACRjC;;;;;;;;;IASkB;AAAlB,WAAkB,YAAY;IAC1B,8CAA8B,CAAA;IAC9B,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,gDAAgC,CAAA;IAChC,gDAAgC,CAAA;AACpC,CAAC,EANiB,YAAY,KAAZ,YAAY;;ICTZ;AAAlB,WAAkB,gBAAgB;IAC9B,iCAAa,CAAA;IACb,yCAAqB,CAAA;IACrB,6CAAyB,CAAA;IACzB,uCAAmB,CAAA;IACnB,+BAAW,CAAA;AACf,CAAC,EANiB,gBAAgB,KAAhB,gBAAgB;;ACAlC;;;;;;"}
|
|
@@ -9,7 +9,7 @@ let TuiCurrencyPipe = class TuiCurrencyPipe {
|
|
|
9
9
|
};
|
|
10
10
|
TuiCurrencyPipe = __decorate([
|
|
11
11
|
Pipe({
|
|
12
|
-
name:
|
|
12
|
+
name: `tuiCurrency`,
|
|
13
13
|
})
|
|
14
14
|
], TuiCurrencyPipe);
|
|
15
15
|
|
|
@@ -23,17 +23,17 @@ TuiCurrencyPipeModule = __decorate([
|
|
|
23
23
|
], TuiCurrencyPipeModule);
|
|
24
24
|
|
|
25
25
|
let TuiFormatCardPipe = class TuiFormatCardPipe {
|
|
26
|
-
transform(value =
|
|
26
|
+
transform(value = ``, cardPrefilled = false) {
|
|
27
27
|
return value && !cardPrefilled
|
|
28
28
|
? value
|
|
29
|
-
.split(
|
|
29
|
+
.split(``)
|
|
30
30
|
.map((char, index) => (index && index % 4 === 0 ? ` ${char}` : char))
|
|
31
|
-
.join(
|
|
32
|
-
:
|
|
31
|
+
.join(``)
|
|
32
|
+
: ``;
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
TuiFormatCardPipe = __decorate([
|
|
36
|
-
Pipe({ name:
|
|
36
|
+
Pipe({ name: `tuiFormatCard` })
|
|
37
37
|
], TuiFormatCardPipe);
|
|
38
38
|
|
|
39
39
|
let TuiFormatCardModule = class TuiFormatCardModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-pipes.js","sources":["ng://@taiga-ui/addon-commerce/pipes/currency/currency.pipe.ts","ng://@taiga-ui/addon-commerce/pipes/currency/currency.module.ts","ng://@taiga-ui/addon-commerce/pipes/format-card/format-card.pipe.ts","ng://@taiga-ui/addon-commerce/pipes/format-card/format-card.module.ts","ng://@taiga-ui/addon-commerce/pipes/taiga-ui-addon-commerce-pipes.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {formatCurrency} from '@taiga-ui/addon-commerce/utils';\n\n@Pipe({\n name:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-pipes.js","sources":["ng://@taiga-ui/addon-commerce/pipes/currency/currency.pipe.ts","ng://@taiga-ui/addon-commerce/pipes/currency/currency.module.ts","ng://@taiga-ui/addon-commerce/pipes/format-card/format-card.pipe.ts","ng://@taiga-ui/addon-commerce/pipes/format-card/format-card.module.ts","ng://@taiga-ui/addon-commerce/pipes/taiga-ui-addon-commerce-pipes.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';\nimport {formatCurrency} from '@taiga-ui/addon-commerce/utils';\n\n@Pipe({\n name: `tuiCurrency`,\n})\nexport class TuiCurrencyPipe implements PipeTransform {\n transform(currency: TuiCurrencyVariants): string {\n return formatCurrency(currency);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCurrencyPipe} from './currency.pipe';\n\n@NgModule({\n declarations: [TuiCurrencyPipe],\n exports: [TuiCurrencyPipe],\n})\nexport class TuiCurrencyPipeModule {}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: `tuiFormatCard`})\nexport class TuiFormatCardPipe implements PipeTransform {\n transform(value: string | null = ``, cardPrefilled: boolean = false): string {\n return value && !cardPrefilled\n ? value\n .split(``)\n .map((char, index) => (index && index % 4 === 0 ? ` ${char}` : char))\n .join(``)\n : ``;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFormatCardPipe} from './format-card.pipe';\n\n@NgModule({\n declarations: [TuiFormatCardPipe],\n exports: [TuiFormatCardPipe],\n})\nexport class TuiFormatCardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAOa,eAAe,GAA5B,MAAa,eAAe;IACxB,SAAS,CAAC,QAA6B;QACnC,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC;KACnC;EACJ;AAJY,eAAe;IAH3B,IAAI,CAAC;QACF,IAAI,EAAE,aAAa;KACtB,CAAC;GACW,eAAe,CAI3B;;ICHY,qBAAqB,GAAlC,MAAa,qBAAqB;EAAG;AAAxB,qBAAqB;IAJjC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,eAAe,CAAC;QAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;KAC7B,CAAC;GACW,qBAAqB,CAAG;;ICLxB,iBAAiB,GAA9B,MAAa,iBAAiB;IAC1B,SAAS,CAAC,QAAuB,EAAE,EAAE,gBAAyB,KAAK;QAC/D,OAAO,KAAK,IAAI,CAAC,aAAa;cACxB,KAAK;iBACA,KAAK,CAAC,EAAE,CAAC;iBACT,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,MAAM,KAAK,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;iBACpE,IAAI,CAAC,EAAE,CAAC;cACb,EAAE,CAAC;KACZ;EACJ;AATY,iBAAiB;IAD7B,IAAI,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;GACjB,iBAAiB,CAS7B;;ICJY,mBAAmB,GAAhC,MAAa,mBAAmB;EAAG;AAAtB,mBAAmB;IAJ/B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,iBAAiB,CAAC;QACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;KAC/B,CAAC;GACW,mBAAmB,CAAG;;ACRnC;;;;;;"}
|
|
@@ -3,13 +3,13 @@ import { extractI18n } from '@taiga-ui/i18n';
|
|
|
3
3
|
import { of } from 'rxjs';
|
|
4
4
|
|
|
5
5
|
const TUI_CARD_NUMBER_TEXTS = new InjectionToken(`Number and card number i18n`, {
|
|
6
|
-
factory: extractI18n(
|
|
6
|
+
factory: extractI18n(`cardNumber`),
|
|
7
7
|
});
|
|
8
8
|
const TUI_CARD_EXPIRY_TEXTS = new InjectionToken(`Expiry and card expiry i18n`, {
|
|
9
|
-
factory: extractI18n(
|
|
9
|
+
factory: extractI18n(`cardExpiry`),
|
|
10
10
|
});
|
|
11
|
-
const TUI_CARD_CVC_TEXTS = new InjectionToken(
|
|
12
|
-
factory: () => of([
|
|
11
|
+
const TUI_CARD_CVC_TEXTS = new InjectionToken(`Card CVC number text`, {
|
|
12
|
+
factory: () => of([`CVC`, `CVC/CVV`]),
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-tokens.js","sources":["ng://@taiga-ui/addon-commerce/tokens/i18n.ts","ng://@taiga-ui/addon-commerce/tokens/taiga-ui-addon-commerce-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {extractI18n} from '@taiga-ui/i18n';\nimport {Observable, of} from 'rxjs';\n\nexport const TUI_CARD_NUMBER_TEXTS = new InjectionToken(`Number and card number i18n`, {\n factory: extractI18n(
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-tokens.js","sources":["ng://@taiga-ui/addon-commerce/tokens/i18n.ts","ng://@taiga-ui/addon-commerce/tokens/taiga-ui-addon-commerce-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {extractI18n} from '@taiga-ui/i18n';\nimport {Observable, of} from 'rxjs';\n\nexport const TUI_CARD_NUMBER_TEXTS = new InjectionToken(`Number and card number i18n`, {\n factory: extractI18n(`cardNumber`),\n});\n\nexport const TUI_CARD_EXPIRY_TEXTS = new InjectionToken(`Expiry and card expiry i18n`, {\n factory: extractI18n(`cardExpiry`),\n});\n\nexport const TUI_CARD_CVC_TEXTS = new InjectionToken<Observable<[string, string]>>(\n `Card CVC number text`,\n {\n factory: () => of([`CVC`, `CVC/CVV`]),\n },\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAIa,qBAAqB,GAAG,IAAI,cAAc,CAAC,6BAA6B,EAAE;IACnF,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC;CACrC,EAAE;MAEU,qBAAqB,GAAG,IAAI,cAAc,CAAC,6BAA6B,EAAE;IACnF,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC;CACrC,EAAE;MAEU,kBAAkB,GAAG,IAAI,cAAc,CAChD,sBAAsB,EACtB;IACI,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CACxC;;AChBL;;;;;;"}
|