@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-components-input-cvc.js","sources":["ng://@taiga-ui/addon-commerce/components/input-cvc/input-cvc.component.ts","ng://@taiga-ui/addon-commerce/components/input-cvc/input-cvc.module.ts","ng://@taiga-ui/addon-commerce/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.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 {TuiCodeCVCLength} from '@taiga-ui/addon-commerce/types';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {\n TUI_DIGIT_REGEXP,\n TUI_TEXTFIELD_LABEL_OUTSIDE,\n TuiPrimitiveTextfieldComponent,\n TuiTextfieldLabelOutsideDirective,\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-cvc.js","sources":["ng://@taiga-ui/addon-commerce/components/input-cvc/input-cvc.component.ts","ng://@taiga-ui/addon-commerce/components/input-cvc/input-cvc.module.ts","ng://@taiga-ui/addon-commerce/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.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 {TuiCodeCVCLength} from '@taiga-ui/addon-commerce/types';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {\n TUI_DIGIT_REGEXP,\n TUI_TEXTFIELD_LABEL_OUTSIDE,\n TuiPrimitiveTextfieldComponent,\n TuiTextfieldLabelOutsideDirective,\n} from '@taiga-ui/core';\nimport {TextMaskConfig} from 'angular2-text-mask';\n\n@Component({\n selector: `tui-input-cvc`,\n templateUrl: `./input-cvc.template.html`,\n styleUrls: [`./input-cvc.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputCVCComponent),\n },\n ],\n})\nexport class TuiInputCVCComponent\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 @Input()\n @tuiRequiredSetter()\n set length(length: TuiCodeCVCLength) {\n this.exampleText = `0`.repeat(length);\n this.textMaskOptions = {\n mask: new Array(length).fill(TUI_DIGIT_REGEXP),\n guide: false,\n };\n }\n\n exampleText = `000`;\n\n textMaskOptions: TextMaskConfig = {\n mask: new Array(3).fill(TUI_DIGIT_REGEXP),\n guide: false,\n };\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_LABEL_OUTSIDE)\n private readonly textfieldLabelOutside: TuiTextfieldLabelOutsideDirective,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | 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.CcCsc\n : TuiCreditCardAutofillName.Off;\n }\n\n get computedExampleText(): string {\n return this.textfieldLabelOutside.labelOutside ? `` : this.exampleText;\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 onCopy(): void {}\n\n onValueChange(value: string): void {\n this.updateValue(value);\n }\n\n protected getFallbackValue(): string {\n return ``;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {\n TuiHintControllerModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputCVCComponent} from './input-cvc.component';\n\n@NgModule({\n imports: [\n TextMaskModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n TuiHintControllerModule,\n TuiValueAccessorModule,\n ],\n declarations: [TuiInputCVCComponent],\n exports: [TuiInputCVCComponent],\n})\nexport class TuiInputCVCModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IA2CY,wCAA0B;IA2BlC,8BAII,OAAyB,EACE,iBAAoC,EAE9C,qBAAwD;QAP7E,YASI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAHoB,2BAAqB,GAArB,qBAAqB,CAAmC;QA1B7E,yBAAmB,GAAG,KAAK,CAAC;QAY5B,iBAAW,GAAG,KAAK,CAAC;QAEpB,qBAAe,GAAmB;YAC9B,IAAI,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACzC,KAAK,EAAE,KAAK;SACf,CAAC;;KAYD;6BAtCQ,oBAAoB;IAa7B,sBAAI,wCAAM;aAAV,UAAW,MAAwB;YAC/B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACtC,IAAI,CAAC,eAAe,GAAG;gBACnB,IAAI,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;gBAC9C,KAAK,EAAE,KAAK;aACf,CAAC;SACL;;;OAAA;IAqBD,sBAAI,wDAAsB;aAA1B;YACI,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,GAAG,IAAI,CAAC;SAChE;;;OAAA;IAED,sBAAI,yCAAO;aAAX;YACI,OAAO,CA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,IAAI,EAAE,CAAA;QACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;OAlC/B,oBAAoB,CA2EhC;IAAD,2BAAC;CAAA,CA1EW,kBAAkB;;;ICrB9B;KAAiC;IAApB,iBAAiB;QAX7B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,cAAc;gBACd,2BAA2B;gBAC3B,4BAA4B;gBAC5B,uBAAuB;gBACvB,sBAAsB;aACzB;YACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;YACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;ACtBA;;;;;;"}
|
|
@@ -16,7 +16,7 @@ var TuiInputExpireComponent = /** @class */ (function (_super) {
|
|
|
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
|
],
|
|
@@ -58,7 +58,7 @@ var TuiInputExpireComponent = /** @class */ (function (_super) {
|
|
|
58
58
|
if (parseInt(value.slice(0, 2), 10) > 12) {
|
|
59
59
|
value = "12" + value.slice(2);
|
|
60
60
|
}
|
|
61
|
-
if (value.slice(0, 2) ===
|
|
61
|
+
if (value.slice(0, 2) === "00") {
|
|
62
62
|
value = "01" + value.slice(2);
|
|
63
63
|
}
|
|
64
64
|
this.input.nativeFocusableElement.value = value;
|
|
@@ -73,7 +73,7 @@ var TuiInputExpireComponent = /** @class */ (function (_super) {
|
|
|
73
73
|
this.updateHovered(hovered);
|
|
74
74
|
};
|
|
75
75
|
TuiInputExpireComponent.prototype.getFallbackValue = function () {
|
|
76
|
-
return
|
|
76
|
+
return "";
|
|
77
77
|
};
|
|
78
78
|
var TuiInputExpireComponent_1;
|
|
79
79
|
TuiInputExpireComponent.ctorParameters = function () { return [
|
|
@@ -89,7 +89,7 @@ var TuiInputExpireComponent = /** @class */ (function (_super) {
|
|
|
89
89
|
], TuiInputExpireComponent.prototype, "autocompleteEnabled", void 0);
|
|
90
90
|
TuiInputExpireComponent = TuiInputExpireComponent_1 = __decorate([
|
|
91
91
|
Component({
|
|
92
|
-
selector:
|
|
92
|
+
selector: "tui-input-expire",
|
|
93
93
|
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",
|
|
94
94
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
95
95
|
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":";;;;;;;;;;IAwCY,2CAA0B;IAsBlC,iCAII,OAAyB,EACE,iBAAoC;QALnE,YAOI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAtBD,yBAAmB,GAAG,KAAK,CAAC;QAEnB,qBAAe,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;gCA/BQ,uBAAuB;IAiChC,sBAAI,2DAAsB;aAA1B;YACI,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,GAAG,IAAI,CAAC;SAChE;;;OAAA;IAED,sBAAI,4CAAO;aAAX;YACI,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;SAC7C;;;OAAA;IAED,sBAAI,iDAAY;aAAhB;YACI,OAAO,IAAI,CAAC,mBAAmB;;kCAEK;SACvC;;;OAAA;IAED,+CAAa,GAAb,UAAc,KAAa;;;QAGvB,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE;YACnD,OAAO;SACV;QAED,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE;YACtC,KAAK,GAAG,OAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAG,CAAC;SACjC;QAED,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CA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,OAAO,EAAE;gBACL,cAAc;gBACd,2BAA2B;gBAC3B,4BAA4B;gBAC5B,sBAAsB;aACzB;YACD,YAAY,EAAE,CAAC,uBAAuB,CAAC;YACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;SACrC,CAAC;OACW,oBAAoB,CAAG;IAAD,2BAAC;CAApC;;ACjBA;;;;;;"}
|
|
@@ -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
|
var 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
|
-
var TUI_MONEY_OPTIONS = new InjectionToken(
|
|
16
|
+
var TUI_MONEY_OPTIONS = new InjectionToken("Default parameters for money component", {
|
|
17
17
|
factory: function () { return TUI_MONEY_DEFAULT_DEFAULT_OPTIONS; },
|
|
18
18
|
});
|
|
19
19
|
var tuiMoneyOptionsProvider = function (options) { return ({
|
|
@@ -22,10 +22,10 @@ var tuiMoneyOptionsProvider = function (options) { return ({
|
|
|
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;
|
|
@@ -53,7 +53,7 @@ var TuiMoneyComponent = /** @class */ (function () {
|
|
|
53
53
|
get: function () {
|
|
54
54
|
return (this.colored &&
|
|
55
55
|
(this.signSymbol === CHAR_MINUS ||
|
|
56
|
-
(this.value < 0 && this.sign !==
|
|
56
|
+
(this.value < 0 && this.sign !== "force-positive")));
|
|
57
57
|
},
|
|
58
58
|
enumerable: true,
|
|
59
59
|
configurable: true
|
|
@@ -62,7 +62,7 @@ var TuiMoneyComponent = /** @class */ (function () {
|
|
|
62
62
|
get: function () {
|
|
63
63
|
return (this.colored &&
|
|
64
64
|
(this.signSymbol === CHAR_PLUS ||
|
|
65
|
-
(this.value > 0 && this.sign !==
|
|
65
|
+
(this.value > 0 && this.sign !== "force-negative")));
|
|
66
66
|
},
|
|
67
67
|
enumerable: true,
|
|
68
68
|
configurable: true
|
|
@@ -106,17 +106,17 @@ var TuiMoneyComponent = /** @class */ (function () {
|
|
|
106
106
|
tuiDefaultProp()
|
|
107
107
|
], TuiMoneyComponent.prototype, "singleColor", void 0);
|
|
108
108
|
__decorate([
|
|
109
|
-
HostBinding(
|
|
109
|
+
HostBinding("class._red")
|
|
110
110
|
], TuiMoneyComponent.prototype, "red", null);
|
|
111
111
|
__decorate([
|
|
112
|
-
HostBinding(
|
|
112
|
+
HostBinding("class._green")
|
|
113
113
|
], TuiMoneyComponent.prototype, "green", null);
|
|
114
114
|
__decorate([
|
|
115
|
-
HostBinding(
|
|
115
|
+
HostBinding("class._inherit-color")
|
|
116
116
|
], TuiMoneyComponent.prototype, "inheritColor", null);
|
|
117
117
|
TuiMoneyComponent = __decorate([
|
|
118
118
|
Component({
|
|
119
|
-
selector:
|
|
119
|
+
selector: "tui-money",
|
|
120
120
|
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",
|
|
121
121
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
122
122
|
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}"]
|
|
@@ -128,9 +128,9 @@ var TuiMoneyComponent = /** @class */ (function () {
|
|
|
128
128
|
|
|
129
129
|
function tuiFormatFractionPart(options) {
|
|
130
130
|
var value = options.value, decimal = options.decimal, numberFormat = options.numberFormat, precision = options.precision;
|
|
131
|
-
var fraction = value.toFixed(precision).split(
|
|
132
|
-
var shouldShow = decimal !==
|
|
133
|
-
return shouldShow ? "" + numberFormat.decimalSeparator + fraction :
|
|
131
|
+
var fraction = value.toFixed(precision).split(".")[1];
|
|
132
|
+
var shouldShow = decimal !== "never" && (decimal === "always" || !!parseInt(fraction, 10));
|
|
133
|
+
return shouldShow ? "" + numberFormat.decimalSeparator + fraction : "";
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
var TuiFractionPartPipe = /** @class */ (function () {
|
|
@@ -149,7 +149,7 @@ var TuiFractionPartPipe = /** @class */ (function () {
|
|
|
149
149
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
150
150
|
]; };
|
|
151
151
|
TuiFractionPartPipe = __decorate([
|
|
152
|
-
Pipe({ name:
|
|
152
|
+
Pipe({ name: "tuiFractionPart" }),
|
|
153
153
|
__param(0, Inject(TUI_NUMBER_FORMAT))
|
|
154
154
|
], TuiFractionPartPipe);
|
|
155
155
|
return TuiFractionPartPipe;
|
|
@@ -166,7 +166,7 @@ var TuiIntegerPartPipe = /** @class */ (function () {
|
|
|
166
166
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
167
167
|
]; };
|
|
168
168
|
TuiIntegerPartPipe = __decorate([
|
|
169
|
-
Pipe({ name:
|
|
169
|
+
Pipe({ name: "tuiIntegerPart" }),
|
|
170
170
|
__param(0, Inject(TUI_NUMBER_FORMAT))
|
|
171
171
|
], TuiIntegerPartPipe);
|
|
172
172
|
return TuiIntegerPartPipe;
|
|
@@ -179,7 +179,7 @@ var TuiSignSymbolPipe = /** @class */ (function () {
|
|
|
179
179
|
return tuiFormatSignSymbol(value, sign);
|
|
180
180
|
};
|
|
181
181
|
TuiSignSymbolPipe = __decorate([
|
|
182
|
-
Pipe({ name:
|
|
182
|
+
Pipe({ name: "tuiSignSymbol" })
|
|
183
183
|
], TuiSignSymbolPipe);
|
|
184
184
|
return TuiSignSymbolPipe;
|
|
185
185
|
}());
|
|
@@ -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';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AC,CAAC,EACtD,IAAI,EACJ,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAClC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CACtC,CAAC;KACL;;gDAVI,MAAM,SAAC,iBAAiB;;IAFpB,kBAAkB;QAD9B,IAAI,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;QAGtB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;OAFrB,kBAAkB,CAa9B;IAAD,yBAAC;CAbD;;;ICEA;KAIC;IAHG,qCAAS,GAAT,UAAU,KAAa,EAAE,IAAmB;QACxC,OAAO,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;KAC3C;IAHQ,iBAAiB;QAD7B,IAAI,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;OACjB,iBAAiB,CAI7B;IAAD,wBAAC;CAJD;;;ICaA;KAA8B;IAAjB,cAAc;QAV1B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,CAAC;YAC9C,YAAY,EAAE;gBACV,iBAAiB;gBACjB,mBAAmB;gBACnB,kBAAkB;gBAClB,iBAAiB;aACpB;YACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;SAC/B,CAAC;OACW,cAAc,CAAG;IAAD,qBAAC;CAA9B;;ACnBA;;;;;;"}
|
|
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":";;;;;;;IAca,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;IAEW,iBAAiB,GAAG,IAAI,cAAc,CAC/C,wCAAwC,EACxC;IACI,OAAO,EAAE,cAAM,OAAA,iCAAiC,GAAA;CACnD,EACH;IAEW,uBAAuB,GAEf,UAAC,OAAiC,IAAK,QAAC;IACzD,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,wBAAM,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;;;ICgEI,2BAAwD,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;QArDhF,UAAK,GAAG,GAAG,CAAC;QAIZ,YAAO,GAAgB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;QAI5C,aAAQ,GAAwB,IA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
4
4
|
var ALLOWED_REGEXP = /[A-Z]| /;
|
|
5
5
|
var 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
|
var uppercase = char.toUpperCase();
|
|
@@ -45,22 +45,22 @@ var 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,IAAM,cAAc,GAAG,SAAS,CAAC;AACjC,IAAM,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,IAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACrC,IAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;IAE3E,OAAO,MAAM,IAAI,IAAI,CAAC;AAC1B,CAAC;IAEY,cAAc,GAA2B,uBAAuB,CACzE,cAAc,EACd,kBAAkB;;ACvCtB;;;IAGa,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;;;ICzBP,uBAAuB,GAA8B,UAAA,IAAI;IAClE,OAAA,IAAI,CAAC,MAAM,GAAG,EAAE,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC;AAAtE;;ACJJ;;;;;;"}
|
|
@@ -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;;;;;;"}
|
|
@@ -10,7 +10,7 @@ var TuiCurrencyPipe = /** @class */ (function () {
|
|
|
10
10
|
};
|
|
11
11
|
TuiCurrencyPipe = __decorate([
|
|
12
12
|
Pipe({
|
|
13
|
-
name:
|
|
13
|
+
name: "tuiCurrency",
|
|
14
14
|
})
|
|
15
15
|
], TuiCurrencyPipe);
|
|
16
16
|
return TuiCurrencyPipe;
|
|
@@ -32,17 +32,17 @@ var TuiFormatCardPipe = /** @class */ (function () {
|
|
|
32
32
|
function TuiFormatCardPipe() {
|
|
33
33
|
}
|
|
34
34
|
TuiFormatCardPipe.prototype.transform = function (value, cardPrefilled) {
|
|
35
|
-
if (value === void 0) { value =
|
|
35
|
+
if (value === void 0) { value = ""; }
|
|
36
36
|
if (cardPrefilled === void 0) { cardPrefilled = false; }
|
|
37
37
|
return value && !cardPrefilled
|
|
38
38
|
? value
|
|
39
|
-
.split(
|
|
39
|
+
.split("")
|
|
40
40
|
.map(function (char, index) { return (index && index % 4 === 0 ? " " + char : char); })
|
|
41
|
-
.join(
|
|
42
|
-
:
|
|
41
|
+
.join("")
|
|
42
|
+
: "";
|
|
43
43
|
};
|
|
44
44
|
TuiFormatCardPipe = __decorate([
|
|
45
|
-
Pipe({ name:
|
|
45
|
+
Pipe({ name: "tuiFormatCard" })
|
|
46
46
|
], TuiFormatCardPipe);
|
|
47
47
|
return TuiFormatCardPipe;
|
|
48
48
|
}());
|
|
@@ -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;KAIC;IAHG,mCAAS,GAAT,UAAU,QAA6B;QACnC,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC;KACnC;IAHQ,eAAe;QAH3B,IAAI,CAAC;YACF,IAAI,EAAE,aAAa;SACtB,CAAC;OACW,eAAe,CAI3B;IAAD,sBAAC;CAJD;;;ICCA;KAAqC;IAAxB,qBAAqB;QAJjC,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,eAAe,CAAC;YAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;SAC7B,CAAC;OACW,qBAAqB,CAAG;IAAD,4BAAC;CAArC;;;ICLA;KASC;IARG,qCAAS,GAAT,UAAU,KAAyB,EAAE,aAA8B;QAAzD,sBAAA,EAAA,UAAyB;QAAE,8BAAA,EAAA,qBAA8B;QAC/D,OAAO,KAAK,IAAI,CAAC,aAAa;cACxB,KAAK;iBACA,KAAK,CAAC,EAAE,CAAC;iBACT,GAAG,CAAC,UAAC,IAAI,EAAE,KAAK,IAAK,QAAC,KAAK,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,MAAI,IAAM,GAAG,IAAI,IAAC,CAAC;iBACpE,IAAI,CAAC,EAAE,CAAC;cACb,EAAE,CAAC;KACZ;IARQ,iBAAiB;QAD7B,IAAI,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;OACjB,iBAAiB,CAS7B;IAAD,wBAAC;CATD;;;ICKA;KAAmC;IAAtB,mBAAmB;QAJ/B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,iBAAiB,CAAC;YACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;SAC/B,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;ACRA;;;;;;"}
|
|
@@ -3,13 +3,13 @@ import { extractI18n } from '@taiga-ui/i18n';
|
|
|
3
3
|
import { of } from 'rxjs';
|
|
4
4
|
|
|
5
5
|
var TUI_CARD_NUMBER_TEXTS = new InjectionToken("Number and card number i18n", {
|
|
6
|
-
factory: extractI18n(
|
|
6
|
+
factory: extractI18n("cardNumber"),
|
|
7
7
|
});
|
|
8
8
|
var TUI_CARD_EXPIRY_TEXTS = new InjectionToken("Expiry and card expiry i18n", {
|
|
9
|
-
factory: extractI18n(
|
|
9
|
+
factory: extractI18n("cardExpiry"),
|
|
10
10
|
});
|
|
11
|
-
var TUI_CARD_CVC_TEXTS = new InjectionToken(
|
|
12
|
-
factory: function () { return of([
|
|
11
|
+
var TUI_CARD_CVC_TEXTS = new InjectionToken("Card CVC number text", {
|
|
12
|
+
factory: function () { return 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":";;;;IAIa,qBAAqB,GAAG,IAAI,cAAc,CAAC,6BAA6B,EAAE;IACnF,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC;CACrC,EAAE;IAEU,qBAAqB,GAAG,IAAI,cAAc,CAAC,6BAA6B,EAAE;IACnF,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC;CACrC,EAAE;IAEU,kBAAkB,GAAG,IAAI,cAAc,CAChD,sBAAsB,EACtB;IACI,OAAO,EAAE,cAAM,OAAA,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,GAAA;CACxC;;AChBL;;;;;;"}
|