@taiga-ui/addon-commerce 2.61.0 → 3.0.0-rc.2
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 +420 -306
- package/bundles/taiga-ui-addon-commerce-components-card.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card-grouped.umd.js +610 -463
- package/bundles/taiga-ui-addon-commerce-components-input-card-grouped.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card.umd.js +458 -332
- package/bundles/taiga-ui-addon-commerce-components-input-card.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-cvc.umd.js +436 -310
- package/bundles/taiga-ui-addon-commerce-components-input-cvc.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-input-expire.umd.js +427 -304
- package/bundles/taiga-ui-addon-commerce-components-input-expire.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-money.umd.js +509 -377
- package/bundles/taiga-ui-addon-commerce-components-money.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components.umd.js +15 -27
- package/bundles/taiga-ui-addon-commerce-components.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-constants.umd.js +8 -6
- package/bundles/taiga-ui-addon-commerce-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-enums.umd.js +6 -41
- package/bundles/taiga-ui-addon-commerce-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-interfaces.umd.js +2 -2
- package/bundles/taiga-ui-addon-commerce-interfaces.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-pipes.umd.js +60 -271
- package/bundles/taiga-ui-addon-commerce-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-tokens.umd.js +9 -5
- package/bundles/taiga-ui-addon-commerce-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-types.umd.js +2 -2
- package/bundles/taiga-ui-addon-commerce-types.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-utils.umd.js +37 -95
- package/bundles/taiga-ui-addon-commerce-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-validators.umd.js +15 -9
- package/bundles/taiga-ui-addon-commerce-validators.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce.umd.js +31 -33
- package/bundles/taiga-ui-addon-commerce.umd.js.map +1 -1
- package/components/card/card.component.d.ts +5 -4
- package/components/card/card.module.d.ts +7 -0
- package/components/card/package.json +2 -5
- package/components/card/taiga-ui-addon-commerce-components-card.d.ts +1 -0
- package/components/input-card/input-card.component.d.ts +4 -4
- package/components/input-card/input-card.module.d.ts +8 -0
- package/components/input-card/package.json +2 -5
- package/components/input-card/taiga-ui-addon-commerce-components-input-card.d.ts +1 -0
- package/components/input-card-grouped/input-card-grouped.component.d.ts +5 -3
- package/components/input-card-grouped/input-card-grouped.module.d.ts +12 -0
- package/components/input-card-grouped/input-card-grouped.providers.d.ts +0 -2
- package/components/input-card-grouped/package.json +2 -5
- package/components/input-card-grouped/taiga-ui-addon-commerce-components-input-card-grouped.d.ts +1 -0
- package/components/input-cvc/input-cvc.component.d.ts +3 -1
- package/components/input-cvc/input-cvc.module.d.ts +8 -0
- package/components/input-cvc/package.json +2 -5
- package/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.d.ts +1 -0
- package/components/input-expire/input-expire.component.d.ts +3 -1
- package/components/input-expire/input-expire.module.d.ts +8 -0
- package/components/input-expire/package.json +2 -5
- package/components/input-expire/taiga-ui-addon-commerce-components-input-expire.d.ts +1 -0
- package/components/money/money-options.d.ts +4 -4
- package/components/money/money.component.d.ts +7 -4
- package/components/money/money.module.d.ts +10 -0
- package/components/money/package.json +2 -5
- package/components/money/pipes/fraction-part.pipe.d.ts +5 -2
- package/components/money/pipes/integer-part.pipe.d.ts +3 -0
- package/components/money/pipes/sign-symbol.pipe.d.ts +5 -2
- package/components/money/taiga-ui-addon-commerce-components-money.d.ts +1 -0
- package/components/money/utils/format-fraction-part.d.ts +2 -2
- package/components/money/utils/format-sign-symbol.d.ts +2 -2
- package/components/package.json +2 -5
- package/components/taiga-ui-addon-commerce-components.d.ts +1 -0
- package/constants/package.json +2 -5
- package/constants/taiga-ui-addon-commerce-constants.d.ts +1 -0
- package/enums/currency-code.d.ts +0 -5
- package/enums/currency.d.ts +0 -5
- package/enums/index.d.ts +0 -2
- package/enums/package.json +2 -5
- package/enums/taiga-ui-addon-commerce-enums.d.ts +1 -0
- package/esm2015/components/card/card.component.js +39 -30
- package/esm2015/components/card/card.module.js +15 -12
- package/esm2015/components/card/index.js +1 -1
- package/esm2015/components/card/taiga-ui-addon-commerce-components-card.js +1 -1
- package/esm2015/components/index.js +1 -1
- package/esm2015/components/input-card/index.js +1 -1
- package/esm2015/components/input-card/input-card.component.js +73 -60
- package/esm2015/components/input-card/input-card.module.js +24 -13
- package/esm2015/components/input-card/taiga-ui-addon-commerce-components-input-card.js +1 -1
- package/esm2015/components/input-card-grouped/index.js +1 -1
- package/esm2015/components/input-card-grouped/input-card-grouped.component.js +125 -109
- package/esm2015/components/input-card-grouped/input-card-grouped.module.js +45 -15
- package/esm2015/components/input-card-grouped/input-card-grouped.providers.js +20 -17
- package/esm2015/components/input-card-grouped/taiga-ui-addon-commerce-components-input-card-grouped.js +1 -1
- package/esm2015/components/input-cvc/index.js +1 -1
- package/esm2015/components/input-cvc/input-cvc.component.js +50 -41
- package/esm2015/components/input-cvc/input-cvc.module.js +26 -13
- package/esm2015/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.js +1 -1
- package/esm2015/components/input-expire/index.js +1 -1
- package/esm2015/components/input-expire/input-expire.component.js +46 -38
- package/esm2015/components/input-expire/input-expire.module.js +24 -13
- package/esm2015/components/input-expire/taiga-ui-addon-commerce-components-input-expire.js +1 -1
- package/esm2015/components/money/index.js +1 -1
- package/esm2015/components/money/money-options.js +1 -1
- package/esm2015/components/money/money.component.js +46 -33
- package/esm2015/components/money/money.module.js +23 -17
- package/esm2015/components/money/pipes/fraction-part.pipe.js +13 -12
- package/esm2015/components/money/pipes/integer-part.pipe.js +15 -14
- package/esm2015/components/money/pipes/sign-symbol.pipe.js +10 -8
- package/esm2015/components/money/taiga-ui-addon-commerce-components-money.js +1 -1
- package/esm2015/components/money/utils/format-fraction-part.js +1 -1
- package/esm2015/components/money/utils/format-sign-symbol.js +1 -1
- package/esm2015/components/taiga-ui-addon-commerce-components.js +1 -1
- package/esm2015/constants/card-holder-mask.js +1 -1
- package/esm2015/constants/card-mask.js +1 -1
- package/esm2015/constants/default-card-validator.js +3 -3
- package/esm2015/constants/index.js +1 -1
- package/esm2015/constants/taiga-ui-addon-commerce-constants.js +1 -1
- package/esm2015/enums/currency-code.js +1 -7
- package/esm2015/enums/currency.js +1 -7
- package/esm2015/enums/index.js +1 -3
- package/esm2015/enums/taiga-ui-addon-commerce-enums.js +1 -1
- package/esm2015/index.js +3 -1
- package/esm2015/interfaces/card.js +2 -1
- package/esm2015/interfaces/index.js +2 -1
- package/esm2015/interfaces/taiga-ui-addon-commerce-interfaces.js +2 -1
- package/esm2015/pipes/currency/currency.module.js +14 -11
- package/esm2015/pipes/currency/currency.pipe.js +14 -12
- package/esm2015/pipes/format-card/format-card.module.js +14 -11
- package/esm2015/pipes/format-card/format-card.pipe.js +10 -8
- package/esm2015/pipes/index.js +1 -1
- package/esm2015/pipes/taiga-ui-addon-commerce-pipes.js +1 -1
- package/esm2015/taiga-ui-addon-commerce.js +1 -1
- package/esm2015/tokens/i18n.js +4 -4
- package/esm2015/tokens/index.js +1 -1
- package/esm2015/tokens/taiga-ui-addon-commerce-tokens.js +1 -1
- package/esm2015/types/code-length.js +2 -1
- package/esm2015/types/currency-variants.js +2 -1
- package/esm2015/types/index.js +5 -1
- package/esm2015/types/money-sign.js +2 -1
- package/esm2015/types/payment-system.js +2 -0
- package/esm2015/types/taiga-ui-addon-commerce-types.js +2 -1
- package/esm2015/utils/create-auto-corrected-expire-pipe.js +1 -1
- package/esm2015/utils/format-currency.js +7 -12
- package/esm2015/utils/get-currency-symbol.js +2 -7
- package/esm2015/utils/get-payment-system.js +17 -47
- package/esm2015/utils/index.js +1 -1
- package/esm2015/utils/is-card-length-valid.js +9 -12
- package/esm2015/utils/is-card-number-valid.js +2 -5
- package/esm2015/utils/is-expire-valid.js +2 -7
- package/esm2015/utils/taiga-ui-addon-commerce-utils.js +1 -1
- package/esm2015/validators/card-expire.validator.js +3 -3
- package/esm2015/validators/card-number.validator.js +3 -3
- package/esm2015/validators/index.js +1 -1
- package/esm2015/validators/luhn.validator.js +5 -3
- package/esm2015/validators/taiga-ui-addon-commerce-validators.js +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-card.js +54 -40
- package/fesm2015/taiga-ui-addon-commerce-components-card.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-card-grouped.js +188 -136
- package/fesm2015/taiga-ui-addon-commerce-components-input-card-grouped.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-card.js +96 -70
- package/fesm2015/taiga-ui-addon-commerce-components-input-card.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-cvc.js +73 -49
- package/fesm2015/taiga-ui-addon-commerce-components-input-cvc.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-expire.js +67 -46
- package/fesm2015/taiga-ui-addon-commerce-components-input-expire.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-money.js +125 -100
- package/fesm2015/taiga-ui-addon-commerce-components-money.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-constants.js +2 -2
- package/fesm2015/taiga-ui-addon-commerce-constants.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-enums.js +1 -40
- package/fesm2015/taiga-ui-addon-commerce-enums.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-interfaces.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-pipes.js +45 -31
- package/fesm2015/taiga-ui-addon-commerce-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-tokens.js +3 -3
- package/fesm2015/taiga-ui-addon-commerce-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-types.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-utils.js +32 -83
- package/fesm2015/taiga-ui-addon-commerce-utils.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-validators.js +6 -4
- package/fesm2015/taiga-ui-addon-commerce-validators.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce.js +2 -0
- package/fesm2015/taiga-ui-addon-commerce.js.map +1 -1
- package/interfaces/package.json +2 -5
- package/interfaces/taiga-ui-addon-commerce-interfaces.d.ts +1 -0
- package/package.json +12 -15
- package/pipes/currency/currency.module.d.ts +5 -0
- package/pipes/currency/currency.pipe.d.ts +3 -0
- package/pipes/format-card/format-card.module.d.ts +5 -0
- package/pipes/format-card/format-card.pipe.d.ts +3 -0
- package/pipes/package.json +2 -5
- package/pipes/taiga-ui-addon-commerce-pipes.d.ts +1 -0
- package/taiga-ui-addon-commerce.d.ts +1 -0
- package/tokens/package.json +2 -5
- package/tokens/taiga-ui-addon-commerce-tokens.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/money-sign.d.ts +1 -1
- package/types/package.json +2 -5
- package/types/payment-system.d.ts +1 -0
- package/types/taiga-ui-addon-commerce-types.d.ts +1 -0
- package/utils/format-currency.d.ts +1 -5
- package/utils/get-currency-symbol.d.ts +1 -5
- package/utils/get-payment-system.d.ts +7 -31
- package/utils/is-card-length-valid.d.ts +1 -3
- package/utils/is-card-number-valid.d.ts +1 -3
- package/utils/is-expire-valid.d.ts +1 -5
- package/utils/package.json +2 -5
- package/utils/taiga-ui-addon-commerce-utils.d.ts +1 -0
- package/validators/package.json +2 -5
- package/validators/taiga-ui-addon-commerce-validators.d.ts +1 -0
- package/bundles/taiga-ui-addon-commerce-components-card.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-components-card.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card-grouped.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-components-input-card-grouped.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-components-input-card.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-components-input-card.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-components-input-cvc.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-components-input-cvc.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-components-input-expire.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-components-input-expire.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-components-money.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-components-money.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-components.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-components.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-constants.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-constants.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-enums.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-enums.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-interfaces.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-interfaces.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-pipes.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-pipes.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-tokens.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-tokens.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-types.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-types.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-utils.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-utils.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce-validators.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce-validators.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-commerce.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-commerce.umd.min.js.map +0 -1
- package/components/card/taiga-ui-addon-commerce-components-card.metadata.json +0 -1
- package/components/input-card/taiga-ui-addon-commerce-components-input-card.metadata.json +0 -1
- package/components/input-card-grouped/taiga-ui-addon-commerce-components-input-card-grouped.metadata.json +0 -1
- package/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.metadata.json +0 -1
- package/components/input-expire/taiga-ui-addon-commerce-components-input-expire.metadata.json +0 -1
- package/components/money/taiga-ui-addon-commerce-components-money.metadata.json +0 -1
- package/components/taiga-ui-addon-commerce-components.metadata.json +0 -1
- package/constants/taiga-ui-addon-commerce-constants.metadata.json +0 -1
- package/enums/money-sign.d.ts +0 -16
- package/enums/payment-system.d.ts +0 -8
- package/enums/taiga-ui-addon-commerce-enums.metadata.json +0 -1
- package/esm2015/enums/money-sign.js +0 -18
- package/esm2015/enums/payment-system.js +0 -9
- package/esm5/components/card/card.component.js +0 -73
- package/esm5/components/card/card.module.js +0 -19
- package/esm5/components/card/index.js +0 -3
- package/esm5/components/card/taiga-ui-addon-commerce-components-card.js +0 -5
- package/esm5/components/index.js +0 -7
- package/esm5/components/input-card/index.js +0 -3
- package/esm5/components/input-card/input-card.component.js +0 -167
- package/esm5/components/input-card/input-card.module.js +0 -25
- package/esm5/components/input-card/taiga-ui-addon-commerce-components-input-card.js +0 -5
- package/esm5/components/input-card-grouped/index.js +0 -4
- package/esm5/components/input-card-grouped/input-card-grouped.component.js +0 -511
- package/esm5/components/input-card-grouped/input-card-grouped.module.js +0 -40
- package/esm5/components/input-card-grouped/input-card-grouped.providers.js +0 -34
- package/esm5/components/input-card-grouped/taiga-ui-addon-commerce-components-input-card-grouped.js +0 -5
- package/esm5/components/input-cvc/index.js +0 -3
- package/esm5/components/input-cvc/input-cvc.component.js +0 -113
- package/esm5/components/input-cvc/input-cvc.module.js +0 -26
- package/esm5/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.js +0 -5
- package/esm5/components/input-expire/index.js +0 -3
- package/esm5/components/input-expire/input-expire.component.js +0 -108
- package/esm5/components/input-expire/input-expire.module.js +0 -25
- package/esm5/components/input-expire/taiga-ui-addon-commerce-components-input-expire.js +0 -5
- package/esm5/components/money/index.js +0 -9
- package/esm5/components/money/money-options.js +0 -18
- package/esm5/components/money/money.component.js +0 -101
- package/esm5/components/money/money.module.js +0 -27
- package/esm5/components/money/pipes/fraction-part.pipe.js +0 -27
- package/esm5/components/money/pipes/integer-part.pipe.js +0 -21
- package/esm5/components/money/pipes/sign-symbol.pipe.js +0 -16
- package/esm5/components/money/taiga-ui-addon-commerce-components-money.js +0 -5
- package/esm5/components/money/utils/format-fraction-part.js +0 -7
- package/esm5/components/money/utils/format-sign-symbol.js +0 -11
- package/esm5/components/taiga-ui-addon-commerce-components.js +0 -5
- package/esm5/constants/card-holder-mask.js +0 -37
- package/esm5/constants/card-mask.js +0 -30
- package/esm5/constants/default-card-validator.js +0 -5
- package/esm5/constants/index.js +0 -4
- package/esm5/constants/taiga-ui-addon-commerce-constants.js +0 -5
- package/esm5/enums/currency-code.js +0 -225
- package/esm5/enums/currency.js +0 -225
- package/esm5/enums/index.js +0 -5
- package/esm5/enums/money-sign.js +0 -18
- package/esm5/enums/payment-system.js +0 -9
- package/esm5/enums/taiga-ui-addon-commerce-enums.js +0 -5
- package/esm5/index.js +0 -8
- package/esm5/interfaces/card.js +0 -1
- package/esm5/interfaces/index.js +0 -1
- package/esm5/interfaces/taiga-ui-addon-commerce-interfaces.js +0 -4
- package/esm5/pipes/currency/currency.module.js +0 -16
- package/esm5/pipes/currency/currency.pipe.js +0 -18
- package/esm5/pipes/format-card/format-card.module.js +0 -16
- package/esm5/pipes/format-card/format-card.pipe.js +0 -22
- package/esm5/pipes/index.js +0 -5
- package/esm5/pipes/taiga-ui-addon-commerce-pipes.js +0 -5
- package/esm5/taiga-ui-addon-commerce.js +0 -5
- package/esm5/tokens/i18n.js +0 -13
- package/esm5/tokens/index.js +0 -2
- package/esm5/tokens/taiga-ui-addon-commerce-tokens.js +0 -5
- package/esm5/types/code-length.js +0 -1
- package/esm5/types/currency-variants.js +0 -1
- package/esm5/types/index.js +0 -1
- package/esm5/types/money-sign.js +0 -1
- package/esm5/types/taiga-ui-addon-commerce-types.js +0 -4
- package/esm5/utils/create-auto-corrected-expire-pipe.js +0 -43
- package/esm5/utils/format-currency.js +0 -17
- package/esm5/utils/get-currency-symbol.js +0 -80
- package/esm5/utils/get-payment-system.js +0 -103
- package/esm5/utils/index.js +0 -8
- package/esm5/utils/is-card-length-valid.js +0 -25
- package/esm5/utils/is-card-number-valid.js +0 -21
- package/esm5/utils/is-expire-valid.js +0 -14
- package/esm5/utils/taiga-ui-addon-commerce-utils.js +0 -5
- package/esm5/validators/card-expire.validator.js +0 -10
- package/esm5/validators/card-number.validator.js +0 -9
- package/esm5/validators/index.js +0 -4
- package/esm5/validators/luhn.validator.js +0 -9
- package/esm5/validators/taiga-ui-addon-commerce-validators.js +0 -5
- package/fesm5/taiga-ui-addon-commerce-components-card.js +0 -94
- package/fesm5/taiga-ui-addon-commerce-components-card.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-components-input-card-grouped.js +0 -579
- package/fesm5/taiga-ui-addon-commerce-components-input-card-grouped.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-components-input-card.js +0 -193
- package/fesm5/taiga-ui-addon-commerce-components-input-card.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-components-input-cvc.js +0 -140
- package/fesm5/taiga-ui-addon-commerce-components-input-cvc.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-components-input-expire.js +0 -134
- package/fesm5/taiga-ui-addon-commerce-components-input-expire.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-components-money.js +0 -210
- package/fesm5/taiga-ui-addon-commerce-components-money.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-components.js +0 -11
- package/fesm5/taiga-ui-addon-commerce-components.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-constants.js +0 -78
- package/fesm5/taiga-ui-addon-commerce-constants.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-enums.js +0 -483
- package/fesm5/taiga-ui-addon-commerce-enums.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-interfaces.js +0 -4
- package/fesm5/taiga-ui-addon-commerce-interfaces.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-pipes.js +0 -67
- package/fesm5/taiga-ui-addon-commerce-pipes.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-tokens.js +0 -20
- package/fesm5/taiga-ui-addon-commerce-tokens.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-types.js +0 -4
- package/fesm5/taiga-ui-addon-commerce-types.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-utils.js +0 -307
- package/fesm5/taiga-ui-addon-commerce-utils.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce-validators.js +0 -31
- package/fesm5/taiga-ui-addon-commerce-validators.js.map +0 -1
- package/fesm5/taiga-ui-addon-commerce.js +0 -12
- package/fesm5/taiga-ui-addon-commerce.js.map +0 -1
- package/interfaces/taiga-ui-addon-commerce-interfaces.metadata.json +0 -1
- package/pipes/taiga-ui-addon-commerce-pipes.metadata.json +0 -1
- package/taiga-ui-addon-commerce.metadata.json +0 -1
- package/tokens/taiga-ui-addon-commerce-tokens.metadata.json +0 -1
- package/types/taiga-ui-addon-commerce-types.metadata.json +0 -1
- package/utils/taiga-ui-addon-commerce-utils.metadata.json +0 -1
- package/validators/taiga-ui-addon-commerce-validators.metadata.json +0 -1
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { __assign, __decorate, __param } from 'tslib';
|
|
2
|
-
import { InjectionToken, Inject, Input, HostBinding, Component, ChangeDetectionStrategy, Pipe, NgModule } from '@angular/core';
|
|
3
|
-
import { CHAR_MINUS, CHAR_PLUS, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { TuiCurrencyPipeModule } from '@taiga-ui/addon-commerce/pipes';
|
|
6
|
-
import { TUI_NUMBER_FORMAT, formatNumber } from '@taiga-ui/core';
|
|
7
|
-
|
|
8
|
-
var TUI_MONEY_DEFAULT_DEFAULT_OPTIONS = {
|
|
9
|
-
decimal: "not-zero",
|
|
10
|
-
currency: "RUB" /* Ruble */,
|
|
11
|
-
sign: "negative-only",
|
|
12
|
-
colored: false,
|
|
13
|
-
precision: 2,
|
|
14
|
-
singleColor: false,
|
|
15
|
-
};
|
|
16
|
-
var TUI_MONEY_OPTIONS = new InjectionToken("Default parameters for money component", {
|
|
17
|
-
factory: function () { return TUI_MONEY_DEFAULT_DEFAULT_OPTIONS; },
|
|
18
|
-
});
|
|
19
|
-
var tuiMoneyOptionsProvider = function (options) { return ({
|
|
20
|
-
provide: TUI_MONEY_OPTIONS,
|
|
21
|
-
useValue: __assign(__assign({}, TUI_MONEY_DEFAULT_DEFAULT_OPTIONS), options),
|
|
22
|
-
}); };
|
|
23
|
-
|
|
24
|
-
function tuiFormatSignSymbol(value, sign) {
|
|
25
|
-
if (sign === "never" || !value || (sign === "negative-only" && value > 0)) {
|
|
26
|
-
return "";
|
|
27
|
-
}
|
|
28
|
-
if (sign === "force-negative" || (value < 0 && sign !== "force-positive")) {
|
|
29
|
-
return CHAR_MINUS;
|
|
30
|
-
}
|
|
31
|
-
return CHAR_PLUS;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var TuiMoneyComponent = /** @class */ (function () {
|
|
35
|
-
function TuiMoneyComponent(options) {
|
|
36
|
-
this.options = options;
|
|
37
|
-
this.value = NaN;
|
|
38
|
-
this.decimal = this.options.decimal;
|
|
39
|
-
this.currency = this.options.currency;
|
|
40
|
-
this.sign = this.options.sign;
|
|
41
|
-
this.colored = this.options.colored;
|
|
42
|
-
this.precision = this.options.precision;
|
|
43
|
-
this.singleColor = this.options.singleColor;
|
|
44
|
-
}
|
|
45
|
-
Object.defineProperty(TuiMoneyComponent.prototype, "signSymbol", {
|
|
46
|
-
get: function () {
|
|
47
|
-
return tuiFormatSignSymbol(this.value, this.sign);
|
|
48
|
-
},
|
|
49
|
-
enumerable: true,
|
|
50
|
-
configurable: true
|
|
51
|
-
});
|
|
52
|
-
Object.defineProperty(TuiMoneyComponent.prototype, "red", {
|
|
53
|
-
get: function () {
|
|
54
|
-
return (this.colored &&
|
|
55
|
-
(this.signSymbol === CHAR_MINUS ||
|
|
56
|
-
(this.value < 0 && this.sign !== "force-positive")));
|
|
57
|
-
},
|
|
58
|
-
enumerable: true,
|
|
59
|
-
configurable: true
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(TuiMoneyComponent.prototype, "green", {
|
|
62
|
-
get: function () {
|
|
63
|
-
return (this.colored &&
|
|
64
|
-
(this.signSymbol === CHAR_PLUS ||
|
|
65
|
-
(this.value > 0 && this.sign !== "force-negative")));
|
|
66
|
-
},
|
|
67
|
-
enumerable: true,
|
|
68
|
-
configurable: true
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(TuiMoneyComponent.prototype, "inheritColor", {
|
|
71
|
-
get: function () {
|
|
72
|
-
return this.singleColor || (this.value === 0 && this.colored);
|
|
73
|
-
},
|
|
74
|
-
enumerable: true,
|
|
75
|
-
configurable: true
|
|
76
|
-
});
|
|
77
|
-
TuiMoneyComponent.ctorParameters = function () { return [
|
|
78
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_MONEY_OPTIONS,] }] }
|
|
79
|
-
]; };
|
|
80
|
-
__decorate([
|
|
81
|
-
Input(),
|
|
82
|
-
tuiDefaultProp()
|
|
83
|
-
], TuiMoneyComponent.prototype, "value", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
Input(),
|
|
86
|
-
tuiDefaultProp()
|
|
87
|
-
], TuiMoneyComponent.prototype, "decimal", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
Input(),
|
|
90
|
-
tuiDefaultProp()
|
|
91
|
-
], TuiMoneyComponent.prototype, "currency", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
Input(),
|
|
94
|
-
tuiDefaultProp()
|
|
95
|
-
], TuiMoneyComponent.prototype, "sign", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
Input(),
|
|
98
|
-
tuiDefaultProp()
|
|
99
|
-
], TuiMoneyComponent.prototype, "colored", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
Input(),
|
|
102
|
-
tuiDefaultProp()
|
|
103
|
-
], TuiMoneyComponent.prototype, "precision", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
Input(),
|
|
106
|
-
tuiDefaultProp()
|
|
107
|
-
], TuiMoneyComponent.prototype, "singleColor", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
HostBinding("class._red")
|
|
110
|
-
], TuiMoneyComponent.prototype, "red", null);
|
|
111
|
-
__decorate([
|
|
112
|
-
HostBinding("class._green")
|
|
113
|
-
], TuiMoneyComponent.prototype, "green", null);
|
|
114
|
-
__decorate([
|
|
115
|
-
HostBinding("class._inherit-color")
|
|
116
|
-
], TuiMoneyComponent.prototype, "inheritColor", null);
|
|
117
|
-
TuiMoneyComponent = __decorate([
|
|
118
|
-
Component({
|
|
119
|
-
selector: "tui-money",
|
|
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
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
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}"]
|
|
123
|
-
}),
|
|
124
|
-
__param(0, Inject(TUI_MONEY_OPTIONS))
|
|
125
|
-
], TuiMoneyComponent);
|
|
126
|
-
return TuiMoneyComponent;
|
|
127
|
-
}());
|
|
128
|
-
|
|
129
|
-
function tuiFormatFractionPart(options) {
|
|
130
|
-
var value = options.value, decimal = options.decimal, numberFormat = options.numberFormat, precision = options.precision;
|
|
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
|
-
}
|
|
135
|
-
|
|
136
|
-
var TuiFractionPartPipe = /** @class */ (function () {
|
|
137
|
-
function TuiFractionPartPipe(numberFormat) {
|
|
138
|
-
this.numberFormat = numberFormat;
|
|
139
|
-
}
|
|
140
|
-
TuiFractionPartPipe.prototype.transform = function (value, decimal, precision) {
|
|
141
|
-
return tuiFormatFractionPart({
|
|
142
|
-
value: value,
|
|
143
|
-
decimal: decimal,
|
|
144
|
-
precision: precision,
|
|
145
|
-
numberFormat: this.numberFormat,
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
|
-
TuiFractionPartPipe.ctorParameters = function () { return [
|
|
149
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
150
|
-
]; };
|
|
151
|
-
TuiFractionPartPipe = __decorate([
|
|
152
|
-
Pipe({ name: "tuiFractionPart" }),
|
|
153
|
-
__param(0, Inject(TUI_NUMBER_FORMAT))
|
|
154
|
-
], TuiFractionPartPipe);
|
|
155
|
-
return TuiFractionPartPipe;
|
|
156
|
-
}());
|
|
157
|
-
|
|
158
|
-
var TuiIntegerPartPipe = /** @class */ (function () {
|
|
159
|
-
function TuiIntegerPartPipe(numberFormat) {
|
|
160
|
-
this.numberFormat = numberFormat;
|
|
161
|
-
}
|
|
162
|
-
TuiIntegerPartPipe.prototype.transform = function (value, precision) {
|
|
163
|
-
return formatNumber(Math.floor(Math.abs(Number(value.toFixed(precision)))), null, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
164
|
-
};
|
|
165
|
-
TuiIntegerPartPipe.ctorParameters = function () { return [
|
|
166
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
167
|
-
]; };
|
|
168
|
-
TuiIntegerPartPipe = __decorate([
|
|
169
|
-
Pipe({ name: "tuiIntegerPart" }),
|
|
170
|
-
__param(0, Inject(TUI_NUMBER_FORMAT))
|
|
171
|
-
], TuiIntegerPartPipe);
|
|
172
|
-
return TuiIntegerPartPipe;
|
|
173
|
-
}());
|
|
174
|
-
|
|
175
|
-
var TuiSignSymbolPipe = /** @class */ (function () {
|
|
176
|
-
function TuiSignSymbolPipe() {
|
|
177
|
-
}
|
|
178
|
-
TuiSignSymbolPipe.prototype.transform = function (value, sign) {
|
|
179
|
-
return tuiFormatSignSymbol(value, sign);
|
|
180
|
-
};
|
|
181
|
-
TuiSignSymbolPipe = __decorate([
|
|
182
|
-
Pipe({ name: "tuiSignSymbol" })
|
|
183
|
-
], TuiSignSymbolPipe);
|
|
184
|
-
return TuiSignSymbolPipe;
|
|
185
|
-
}());
|
|
186
|
-
|
|
187
|
-
var TuiMoneyModule = /** @class */ (function () {
|
|
188
|
-
function TuiMoneyModule() {
|
|
189
|
-
}
|
|
190
|
-
TuiMoneyModule = __decorate([
|
|
191
|
-
NgModule({
|
|
192
|
-
imports: [CommonModule, TuiCurrencyPipeModule],
|
|
193
|
-
declarations: [
|
|
194
|
-
TuiMoneyComponent,
|
|
195
|
-
TuiFractionPartPipe,
|
|
196
|
-
TuiIntegerPartPipe,
|
|
197
|
-
TuiSignSymbolPipe,
|
|
198
|
-
],
|
|
199
|
-
exports: [TuiMoneyComponent],
|
|
200
|
-
})
|
|
201
|
-
], TuiMoneyModule);
|
|
202
|
-
return TuiMoneyModule;
|
|
203
|
-
}());
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Generated bundle index. Do not edit.
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
|
-
export { TUI_MONEY_DEFAULT_DEFAULT_OPTIONS, TUI_MONEY_OPTIONS, TuiFractionPartPipe, TuiIntegerPartPipe, TuiMoneyComponent, TuiMoneyModule, TuiSignSymbolPipe, tuiFormatFractionPart, tuiFormatSignSymbol, tuiMoneyOptionsProvider };
|
|
210
|
-
//# sourceMappingURL=taiga-ui-addon-commerce-components-money.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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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SAAS,CAAC,CAAC,CAAC,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,11 +0,0 @@
|
|
|
1
|
-
export * from '@taiga-ui/addon-commerce/components/card';
|
|
2
|
-
export * from '@taiga-ui/addon-commerce/components/input-card';
|
|
3
|
-
export * from '@taiga-ui/addon-commerce/components/input-card-grouped';
|
|
4
|
-
export * from '@taiga-ui/addon-commerce/components/input-cvc';
|
|
5
|
-
export * from '@taiga-ui/addon-commerce/components/input-expire';
|
|
6
|
-
export * from '@taiga-ui/addon-commerce/components/money';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Generated bundle index. Do not edit.
|
|
10
|
-
*/
|
|
11
|
-
//# sourceMappingURL=taiga-ui-addon-commerce-components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-components.js","sources":["ng://@taiga-ui/addon-commerce/components/taiga-ui-addon-commerce-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { tuiCreateCorrectionMask, TUI_DIGIT_REGEXP } from '@taiga-ui/core';
|
|
2
|
-
import { isCardLengthValid, isCardNumberValid } from '@taiga-ui/addon-commerce/utils';
|
|
3
|
-
|
|
4
|
-
var ALLOWED_REGEXP = /[A-Z]| /;
|
|
5
|
-
var MAP = {
|
|
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
|
-
};
|
|
33
|
-
function toEnglishUppercase(char) {
|
|
34
|
-
var uppercase = char.toUpperCase();
|
|
35
|
-
var result = ALLOWED_REGEXP.test(uppercase) ? uppercase : MAP[uppercase];
|
|
36
|
-
return result || null;
|
|
37
|
-
}
|
|
38
|
-
var cardHolderMask = tuiCreateCorrectionMask(ALLOWED_REGEXP, toEnglishUppercase);
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @internal
|
|
42
|
-
*/
|
|
43
|
-
var TUI_CARD_MASK = [
|
|
44
|
-
TUI_DIGIT_REGEXP,
|
|
45
|
-
TUI_DIGIT_REGEXP,
|
|
46
|
-
TUI_DIGIT_REGEXP,
|
|
47
|
-
TUI_DIGIT_REGEXP,
|
|
48
|
-
" ",
|
|
49
|
-
TUI_DIGIT_REGEXP,
|
|
50
|
-
TUI_DIGIT_REGEXP,
|
|
51
|
-
TUI_DIGIT_REGEXP,
|
|
52
|
-
TUI_DIGIT_REGEXP,
|
|
53
|
-
" ",
|
|
54
|
-
TUI_DIGIT_REGEXP,
|
|
55
|
-
TUI_DIGIT_REGEXP,
|
|
56
|
-
TUI_DIGIT_REGEXP,
|
|
57
|
-
TUI_DIGIT_REGEXP,
|
|
58
|
-
" ",
|
|
59
|
-
TUI_DIGIT_REGEXP,
|
|
60
|
-
TUI_DIGIT_REGEXP,
|
|
61
|
-
TUI_DIGIT_REGEXP,
|
|
62
|
-
TUI_DIGIT_REGEXP,
|
|
63
|
-
" ",
|
|
64
|
-
TUI_DIGIT_REGEXP,
|
|
65
|
-
TUI_DIGIT_REGEXP,
|
|
66
|
-
TUI_DIGIT_REGEXP,
|
|
67
|
-
];
|
|
68
|
-
|
|
69
|
-
var tuiDefaultCardValidator = function (card) {
|
|
70
|
-
return card.length > 11 && isCardLengthValid(card) && isCardNumberValid(card);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Generated bundle index. Do not edit.
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
export { TUI_CARD_MASK, cardHolderMask, tuiDefaultCardValidator };
|
|
78
|
-
//# sourceMappingURL=taiga-ui-addon-commerce-constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,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