@taiga-ui/addon-commerce 2.54.0 → 3.0.0-rc.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 +424 -305
- 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 +623 -466
- 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 +461 -331
- 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 +444 -314
- 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 +432 -306
- package/bundles/taiga-ui-addon-commerce-components-input-expire.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-components-money.umd.js +518 -387
- 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 +38 -36
- package/bundles/taiga-ui-addon-commerce-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-enums.umd.js +6 -35
- 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 +63 -274
- package/bundles/taiga-ui-addon-commerce-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-tokens.umd.js +11 -7
- 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 +63 -107
- package/bundles/taiga-ui-addon-commerce-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-commerce-validators.umd.js +17 -11
- 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 -2
- 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 -2
- 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/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/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 +44 -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 +72 -56
- 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 +148 -121
- package/esm2015/components/input-card-grouped/input-card-grouped.module.js +45 -15
- package/esm2015/components/input-card-grouped/input-card-grouped.providers.js +3 -3
- 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 +56 -43
- 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 +49 -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 +4 -4
- package/esm2015/components/money/money.component.js +50 -37
- 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 +13 -12
- 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 +4 -4
- package/esm2015/components/money/utils/format-sign-symbol.js +6 -7
- package/esm2015/components/taiga-ui-addon-commerce-components.js +1 -1
- package/esm2015/constants/card-holder-mask.js +27 -27
- package/esm2015/constants/card-mask.js +5 -5
- 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 -1
- 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 +12 -10
- package/esm2015/pipes/format-card/format-card.module.js +14 -11
- package/esm2015/pipes/format-card/format-card.pipe.js +14 -12
- 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 +6 -6
- 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 +6 -6
- package/esm2015/utils/format-currency.js +7 -7
- package/esm2015/utils/get-currency-symbol.js +21 -26
- package/esm2015/utils/get-payment-system.js +18 -48
- package/esm2015/utils/index.js +1 -1
- package/esm2015/utils/is-card-length-valid.js +9 -11
- package/esm2015/utils/is-card-number-valid.js +4 -6
- package/esm2015/utils/is-expire-valid.js +1 -1
- package/esm2015/utils/taiga-ui-addon-commerce-utils.js +1 -1
- package/esm2015/validators/card-expire.validator.js +2 -2
- package/esm2015/validators/card-number.validator.js +4 -4
- 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 +58 -39
- package/fesm2015/taiga-ui-addon-commerce-components-card.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-card-grouped.js +196 -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 -67
- package/fesm2015/taiga-ui-addon-commerce-components-input-card.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-cvc.js +81 -53
- package/fesm2015/taiga-ui-addon-commerce-components-input-cvc.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-input-expire.js +72 -48
- package/fesm2015/taiga-ui-addon-commerce-components-input-expire.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-components-money.js +136 -112
- 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 +32 -32
- package/fesm2015/taiga-ui-addon-commerce-constants.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-enums.js +1 -34
- 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 +47 -33
- package/fesm2015/taiga-ui-addon-commerce-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-tokens.js +5 -5
- 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 +58 -97
- package/fesm2015/taiga-ui-addon-commerce-utils.js.map +1 -1
- package/fesm2015/taiga-ui-addon-commerce-validators.js +7 -5
- 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 +3 -3
- 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/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/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 -12
- 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 -171
- package/esm5/enums/currency.js +0 -171
- 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 -71
- 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 -211
- 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 -375
- 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 -298
- 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,22 +1,24 @@
|
|
|
1
|
-
import { isExpireValid,
|
|
1
|
+
import { isExpireValid, tuiIsCardNumberValid } from '@taiga-ui/addon-commerce/utils';
|
|
2
2
|
import { TuiValidationError } from '@taiga-ui/cdk';
|
|
3
3
|
|
|
4
4
|
function tuiCardExpireValidator({ value, }) {
|
|
5
5
|
var _a;
|
|
6
6
|
return ((_a = value === null || value === void 0 ? void 0 : value.expire) === null || _a === void 0 ? void 0 : _a.length) === 5 && !isExpireValid(value === null || value === void 0 ? void 0 : value.expire)
|
|
7
|
-
? { expire: new TuiValidationError(
|
|
7
|
+
? { expire: new TuiValidationError(`Expire date`) }
|
|
8
8
|
: null;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
function tuiCardNumberValidator({ value, }) {
|
|
12
|
-
return (value === null || value === void 0 ? void 0 : value.card) && !
|
|
13
|
-
? { card: new TuiValidationError(
|
|
12
|
+
return (value === null || value === void 0 ? void 0 : value.card) && !tuiIsCardNumberValid(value.card)
|
|
13
|
+
? { card: new TuiValidationError(`Invalid card number`) }
|
|
14
14
|
: null;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function tuiCreateLuhnValidator(message) {
|
|
18
18
|
return ({ value }) => {
|
|
19
|
-
return
|
|
19
|
+
return tuiIsCardNumberValid(value)
|
|
20
|
+
? null
|
|
21
|
+
: { luhn: new TuiValidationError(message) };
|
|
20
22
|
};
|
|
21
23
|
}
|
|
22
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce-validators.js","sources":["
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce-validators.js","sources":["../../../projects/addon-commerce/validators/card-expire.validator.ts","../../../projects/addon-commerce/validators/card-number.validator.ts","../../../projects/addon-commerce/validators/luhn.validator.ts","../../../projects/addon-commerce/validators/taiga-ui-addon-commerce-validators.ts"],"sourcesContent":["import {AbstractControl, ValidationErrors} from '@angular/forms';\nimport {isExpireValid} from '@taiga-ui/addon-commerce/utils';\nimport {TuiValidationError} from '@taiga-ui/cdk';\n\nexport function tuiCardExpireValidator({\n value,\n}: AbstractControl): ValidationErrors | null {\n return value?.expire?.length === 5 && !isExpireValid(value?.expire)\n ? {expire: new TuiValidationError(`Expire date`)}\n : null;\n}\n","import {AbstractControl, ValidationErrors} from '@angular/forms';\nimport {tuiIsCardNumberValid} from '@taiga-ui/addon-commerce/utils';\nimport {TuiValidationError} from '@taiga-ui/cdk';\n\nexport function tuiCardNumberValidator({\n value,\n}: AbstractControl): ValidationErrors | null {\n return value?.card && !tuiIsCardNumberValid(value.card)\n ? {card: new TuiValidationError(`Invalid card number`)}\n : null;\n}\n","import {AbstractControl, ValidatorFn} from '@angular/forms';\nimport {tuiIsCardNumberValid} from '@taiga-ui/addon-commerce/utils';\nimport {TuiValidationError} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport function tuiCreateLuhnValidator(message: PolymorpheusContent): ValidatorFn {\n return ({value}: AbstractControl) => {\n return tuiIsCardNumberValid(value)\n ? null\n : {luhn: new TuiValidationError(message)};\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAIgB,SAAA,sBAAsB,CAAC,EACnC,KAAK,GACS,EAAA;;IACd,OAAO,CAAA,CAAA,EAAA,GAAA,KAAK,KAAL,IAAA,IAAA,KAAK,uBAAL,KAAK,CAAE,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,MAAM,MAAK,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,KAAA,IAAA,IAAL,KAAK,KAAL,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,KAAK,CAAE,MAAM,CAAC;UAC7D,EAAC,MAAM,EAAE,IAAI,kBAAkB,CAAC,CAAa,WAAA,CAAA,CAAC,EAAC;UAC/C,IAAI,CAAC;AACf;;ACNgB,SAAA,sBAAsB,CAAC,EACnC,KAAK,GACS,EAAA;AACd,IAAA,OAAO,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,uBAAL,KAAK,CAAE,IAAI,KAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC;UACjD,EAAC,IAAI,EAAE,IAAI,kBAAkB,CAAC,CAAqB,mBAAA,CAAA,CAAC,EAAC;UACrD,IAAI,CAAC;AACf;;ACLM,SAAU,sBAAsB,CAAC,OAA4B,EAAA;AAC/D,IAAA,OAAO,CAAC,EAAC,KAAK,EAAkB,KAAI;QAChC,OAAO,oBAAoB,CAAC,KAAK,CAAC;AAC9B,cAAE,IAAI;cACJ,EAAC,IAAI,EAAE,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAC,CAAC;AAClD,KAAC,CAAC;AACN;;ACXA;;AAEG;;;;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from '@taiga-ui/addon-commerce/components';
|
|
2
2
|
export * from '@taiga-ui/addon-commerce/constants';
|
|
3
3
|
export * from '@taiga-ui/addon-commerce/enums';
|
|
4
|
+
export * from '@taiga-ui/addon-commerce/interfaces';
|
|
4
5
|
export * from '@taiga-ui/addon-commerce/pipes';
|
|
5
6
|
export * from '@taiga-ui/addon-commerce/tokens';
|
|
7
|
+
export * from '@taiga-ui/addon-commerce/types';
|
|
6
8
|
export * from '@taiga-ui/addon-commerce/utils';
|
|
7
9
|
export * from '@taiga-ui/addon-commerce/validators';
|
|
8
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-commerce.js","sources":["
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-commerce.js","sources":["../../../projects/addon-commerce/taiga-ui-addon-commerce.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;AAEG"}
|
package/interfaces/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/taiga-ui-addon-commerce-interfaces.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/taiga-ui-addon-commerce-interfaces.js",
|
|
4
4
|
"es2015": "../fesm2015/taiga-ui-addon-commerce-interfaces.js",
|
|
5
|
-
"esm5": "../esm5/interfaces/taiga-ui-addon-commerce-interfaces.js",
|
|
6
5
|
"esm2015": "../esm2015/interfaces/taiga-ui-addon-commerce-interfaces.js",
|
|
7
|
-
"fesm5": "../fesm5/taiga-ui-addon-commerce-interfaces.js",
|
|
8
6
|
"fesm2015": "../fesm2015/taiga-ui-addon-commerce-interfaces.js",
|
|
9
7
|
"typings": "taiga-ui-addon-commerce-interfaces.d.ts",
|
|
10
|
-
"metadata": "taiga-ui-addon-commerce-interfaces.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@taiga-ui/addon-commerce/interfaces"
|
|
13
|
-
}
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-commerce",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-rc.0",
|
|
4
4
|
"description": "Extension package for Taiga UI related to commerce, payment systems, currencies etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -13,29 +13,26 @@
|
|
|
13
13
|
"homepage": "https://github.com/tinkoff/taiga-ui",
|
|
14
14
|
"repository": "https://github.com/tinkoff/taiga-ui",
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"tslib": "^2.0.0"
|
|
18
|
+
},
|
|
16
19
|
"peerDependencies": {
|
|
17
20
|
"@angular/common": ">=9.0.0",
|
|
18
21
|
"@angular/core": ">=9.0.0",
|
|
19
22
|
"@angular/forms": ">=9.0.0",
|
|
20
|
-
"@ng-web-apis/common": ">=
|
|
21
|
-
"@taiga-ui/cdk": ">=
|
|
22
|
-
"@taiga-ui/core": ">=
|
|
23
|
-
"@taiga-ui/i18n": ">=
|
|
24
|
-
"@tinkoff/ng-polymorpheus": ">=
|
|
23
|
+
"@ng-web-apis/common": ">=2.0.0",
|
|
24
|
+
"@taiga-ui/cdk": ">=3.0.0-rc.0",
|
|
25
|
+
"@taiga-ui/core": ">=3.0.0-rc.0",
|
|
26
|
+
"@taiga-ui/i18n": ">=3.0.0-rc.0",
|
|
27
|
+
"@tinkoff/ng-polymorpheus": ">=4.0.0",
|
|
25
28
|
"angular2-text-mask": ">=9.0.0",
|
|
26
29
|
"rxjs": ">=6.0.0"
|
|
27
30
|
},
|
|
28
31
|
"main": "bundles/taiga-ui-addon-commerce.umd.js",
|
|
29
|
-
"module": "
|
|
32
|
+
"module": "fesm2015/taiga-ui-addon-commerce.js",
|
|
30
33
|
"es2015": "fesm2015/taiga-ui-addon-commerce.js",
|
|
31
|
-
"esm5": "esm5/taiga-ui-addon-commerce.js",
|
|
32
34
|
"esm2015": "esm2015/taiga-ui-addon-commerce.js",
|
|
33
|
-
"fesm5": "fesm5/taiga-ui-addon-commerce.js",
|
|
34
35
|
"fesm2015": "fesm2015/taiga-ui-addon-commerce.js",
|
|
35
36
|
"typings": "taiga-ui-addon-commerce.d.ts",
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"tslib": "^1.10.0"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
37
|
+
"sideEffects": false
|
|
38
|
+
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./currency.pipe";
|
|
1
3
|
export declare class TuiCurrencyPipeModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiCurrencyPipeModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiCurrencyPipeModule, [typeof i1.TuiCurrencyPipe], never, [typeof i1.TuiCurrencyPipe]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TuiCurrencyPipeModule>;
|
|
2
7
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { TuiCurrencyVariants } from '@taiga-ui/addon-commerce/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class TuiCurrencyPipe implements PipeTransform {
|
|
4
5
|
transform(currency: TuiCurrencyVariants): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiCurrencyPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TuiCurrencyPipe, "tuiCurrency">;
|
|
5
8
|
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./format-card.pipe";
|
|
1
3
|
export declare class TuiFormatCardModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiFormatCardModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiFormatCardModule, [typeof i1.TuiFormatCardPipe], never, [typeof i1.TuiFormatCardPipe]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TuiFormatCardModule>;
|
|
2
7
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class TuiFormatCardPipe implements PipeTransform {
|
|
3
4
|
transform(value?: string | null, cardPrefilled?: boolean): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiFormatCardPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TuiFormatCardPipe, "tuiFormatCard">;
|
|
4
7
|
}
|
package/pipes/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/taiga-ui-addon-commerce-pipes.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/taiga-ui-addon-commerce-pipes.js",
|
|
4
4
|
"es2015": "../fesm2015/taiga-ui-addon-commerce-pipes.js",
|
|
5
|
-
"esm5": "../esm5/pipes/taiga-ui-addon-commerce-pipes.js",
|
|
6
5
|
"esm2015": "../esm2015/pipes/taiga-ui-addon-commerce-pipes.js",
|
|
7
|
-
"fesm5": "../fesm5/taiga-ui-addon-commerce-pipes.js",
|
|
8
6
|
"fesm2015": "../fesm2015/taiga-ui-addon-commerce-pipes.js",
|
|
9
7
|
"typings": "taiga-ui-addon-commerce-pipes.d.ts",
|
|
10
|
-
"metadata": "taiga-ui-addon-commerce-pipes.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@taiga-ui/addon-commerce/pipes"
|
|
13
|
-
}
|
|
10
|
+
}
|
package/tokens/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/taiga-ui-addon-commerce-tokens.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/taiga-ui-addon-commerce-tokens.js",
|
|
4
4
|
"es2015": "../fesm2015/taiga-ui-addon-commerce-tokens.js",
|
|
5
|
-
"esm5": "../esm5/tokens/taiga-ui-addon-commerce-tokens.js",
|
|
6
5
|
"esm2015": "../esm2015/tokens/taiga-ui-addon-commerce-tokens.js",
|
|
7
|
-
"fesm5": "../fesm5/taiga-ui-addon-commerce-tokens.js",
|
|
8
6
|
"fesm2015": "../fesm2015/taiga-ui-addon-commerce-tokens.js",
|
|
9
7
|
"typings": "taiga-ui-addon-commerce-tokens.d.ts",
|
|
10
|
-
"metadata": "taiga-ui-addon-commerce-tokens.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@taiga-ui/addon-commerce/tokens"
|
|
13
|
-
}
|
|
10
|
+
}
|
package/types/index.d.ts
CHANGED
package/types/money-sign.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type
|
|
3
|
-
export declare type TuiMoneySignSymbol = '' | typeof
|
|
1
|
+
import { CHAR_MINUS, CHAR_PLUS } from '@taiga-ui/cdk';
|
|
2
|
+
export declare type TuiMoneySign = 'negative-only' | 'always' | 'never' | 'force-negative' | 'force-positive';
|
|
3
|
+
export declare type TuiMoneySignSymbol = '' | typeof CHAR_MINUS | typeof CHAR_PLUS;
|
package/types/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/taiga-ui-addon-commerce-types.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/taiga-ui-addon-commerce-types.js",
|
|
4
4
|
"es2015": "../fesm2015/taiga-ui-addon-commerce-types.js",
|
|
5
|
-
"esm5": "../esm5/types/taiga-ui-addon-commerce-types.js",
|
|
6
5
|
"esm2015": "../esm2015/types/taiga-ui-addon-commerce-types.js",
|
|
7
|
-
"fesm5": "../fesm5/taiga-ui-addon-commerce-types.js",
|
|
8
6
|
"fesm2015": "../fesm2015/taiga-ui-addon-commerce-types.js",
|
|
9
7
|
"typings": "taiga-ui-addon-commerce-types.d.ts",
|
|
10
|
-
"metadata": "taiga-ui-addon-commerce-types.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@taiga-ui/addon-commerce/types"
|
|
13
|
-
}
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type TuiPaymentSystem = 'visa' | 'electron' | 'mastercard' | 'maestro' | 'mir';
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import { TuiCurrencyVariants } from '@taiga-ui/addon-commerce/types';
|
|
2
|
-
|
|
3
|
-
* @deprecated: use {@link tuiGetCurrencySymbol} instead
|
|
4
|
-
*/
|
|
5
|
-
export declare function getCurrencySymbol(currency: TuiCurrencyVariants): string | null;
|
|
6
|
-
export declare const tuiGetCurrencySymbol: typeof getCurrencySymbol;
|
|
2
|
+
export declare function tuiGetCurrencySymbol(currency: TuiCurrencyVariants): string | null;
|
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
import { TuiPaymentSystem } from '@taiga-ui/addon-commerce/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
* @deprecated: use {@link tuiIsMaestro} instead
|
|
9
|
-
*/
|
|
10
|
-
export declare function isMaestro(three: number, two: number, one: number): boolean;
|
|
11
|
-
export declare const tuiIsMaestro: typeof isMaestro;
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated: use {@link tuiIsMastercard} instead
|
|
14
|
-
*/
|
|
15
|
-
export declare function isMastercard(four: number, two: number, one: number): boolean;
|
|
16
|
-
export declare const tuiIsMastercard: typeof isMastercard;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated: use {@link tuiIsMir} instead
|
|
19
|
-
*/
|
|
20
|
-
export declare function isMir(four: number): boolean;
|
|
21
|
-
export declare const tuiIsMir: typeof isMir;
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated: use {@link tuiIsElectron} instead
|
|
24
|
-
*/
|
|
25
|
-
export declare function isElectron(four: number): boolean;
|
|
26
|
-
export declare const tuiIsElectron: typeof isElectron;
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated: use {@link tuiIsVisa} instead
|
|
29
|
-
*/
|
|
30
|
-
export declare function isVisa(one: number): boolean;
|
|
31
|
-
export declare const tuiIsVisa: typeof isVisa;
|
|
1
|
+
import { TuiPaymentSystem } from '@taiga-ui/addon-commerce/types';
|
|
2
|
+
export declare function tuiGetPaymentSystem(cardNumber: string): TuiPaymentSystem | null;
|
|
3
|
+
export declare function tuiIsMaestro(three: number, two: number, one: number): boolean;
|
|
4
|
+
export declare function tuiIsMastercard(four: number, two: number, one: number): boolean;
|
|
5
|
+
export declare function tuiIsMir(four: number): boolean;
|
|
6
|
+
export declare function tuiIsElectron(four: number): boolean;
|
|
7
|
+
export declare function tuiIsVisa(one: number): boolean;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @deprecated: use {@link tuiIsCardLengthValid} instead
|
|
3
2
|
* Validates card number length using payment system dictionary
|
|
4
3
|
*/
|
|
5
|
-
export declare function
|
|
6
|
-
export declare const tuiIsCardLengthValid: typeof isCardLengthValid;
|
|
4
|
+
export declare function tuiIsCardLengthValid(cardNumber: string): boolean;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @deprecated: use {@link tuiIsCardNumberValid} instead
|
|
3
2
|
* Validates card number using Luhn algorithm
|
|
4
3
|
*/
|
|
5
|
-
export declare function
|
|
6
|
-
export declare const tuiIsCardNumberValid: typeof isCardNumberValid;
|
|
4
|
+
export declare function tuiIsCardNumberValid(value: string | number): boolean;
|
package/utils/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/taiga-ui-addon-commerce-utils.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/taiga-ui-addon-commerce-utils.js",
|
|
4
4
|
"es2015": "../fesm2015/taiga-ui-addon-commerce-utils.js",
|
|
5
|
-
"esm5": "../esm5/utils/taiga-ui-addon-commerce-utils.js",
|
|
6
5
|
"esm2015": "../esm2015/utils/taiga-ui-addon-commerce-utils.js",
|
|
7
|
-
"fesm5": "../fesm5/taiga-ui-addon-commerce-utils.js",
|
|
8
6
|
"fesm2015": "../fesm2015/taiga-ui-addon-commerce-utils.js",
|
|
9
7
|
"typings": "taiga-ui-addon-commerce-utils.d.ts",
|
|
10
|
-
"metadata": "taiga-ui-addon-commerce-utils.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@taiga-ui/addon-commerce/utils"
|
|
13
|
-
}
|
|
10
|
+
}
|
package/validators/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/taiga-ui-addon-commerce-validators.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/taiga-ui-addon-commerce-validators.js",
|
|
4
4
|
"es2015": "../fesm2015/taiga-ui-addon-commerce-validators.js",
|
|
5
|
-
"esm5": "../esm5/validators/taiga-ui-addon-commerce-validators.js",
|
|
6
5
|
"esm2015": "../esm2015/validators/taiga-ui-addon-commerce-validators.js",
|
|
7
|
-
"fesm5": "../fesm5/taiga-ui-addon-commerce-validators.js",
|
|
8
6
|
"fesm2015": "../fesm2015/taiga-ui-addon-commerce-validators.js",
|
|
9
7
|
"typings": "taiga-ui-addon-commerce-validators.d.ts",
|
|
10
|
-
"metadata": "taiga-ui-addon-commerce-validators.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@taiga-ui/addon-commerce/validators"
|
|
13
|
-
}
|
|
10
|
+
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@taiga-ui/cdk"),require("@angular/common"),require("@taiga-ui/core")):"function"==typeof define&&define.amd?define("@taiga-ui/addon-commerce/components/card",["exports","@angular/core","@taiga-ui/cdk","@angular/common","@taiga-ui/core"],e):e(((t=t||self)["taiga-ui"]=t["taiga-ui"]||{},t["taiga-ui"]["addon-commerce"]=t["taiga-ui"]["addon-commerce"]||{},t["taiga-ui"]["addon-commerce"].components=t["taiga-ui"]["addon-commerce"].components||{},t["taiga-ui"]["addon-commerce"].components.card={}),t.ng.core,t.cdk,t.ng.common,t.core$1)}(this,(function(t,e,o,i,r){"use strict";function a(t,e,o,i){var r,a=arguments.length,n=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(n=(a<3?r(n):a>3?r(e,o,n):r(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n}Object.create;var n;Object.create;function s(t){var e=t.length;return!e||4===e}var c=((n={}).mir="tuiIconMirMono",n.visa="tuiIconVisaMono",n.electron="tuiIconElectronMono",n.mastercard="tuiIconMastercard",n.maestro="tuiIconMaestro",n),u=function(){function t(){this.active=!1,this.brandLogo="",this.cardNumber="",this.paymentSystem=null,this.size="m"}return Object.defineProperty(t.prototype,"hasBrandLogo",{get:function(){return!!this.brandLogo&&"m"===this.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paymentSystemLogo",{get:function(){return this.paymentSystem?c[this.paymentSystem]:""},enumerable:!0,configurable:!0}),a([e.Input(),e.HostBinding("class._active"),o.tuiDefaultProp()],t.prototype,"active",void 0),a([e.Input(),o.tuiDefaultProp()],t.prototype,"brandLogo",void 0),a([e.Input(),o.tuiDefaultProp(s,"cardNumber should contain 4 symbols")],t.prototype,"cardNumber",void 0),a([e.Input(),o.tuiDefaultProp()],t.prototype,"paymentSystem",void 0),a([e.Input(),e.HostBinding("attr.data-size"),o.tuiDefaultProp()],t.prototype,"size",void 0),t=a([e.Component({selector:"tui-card",template:'<div class="t-front">\n <tui-svg\n *ngIf="hasBrandLogo"\n class="t-brand-logo"\n [src]="brandLogo"\n ></tui-svg>\n <span class="t-number">{{ cardNumber }}</span>\n <tui-svg\n *ngIf="!!paymentSystem"\n class="t-payment-system-logo"\n [src]="paymentSystemLogo"\n ></tui-svg>\n</div>\n<div class="t-back"></div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{position:relative;display:block;color:var(--tui-base-01);transform-style:preserve-3d;cursor:default;border-radius:var(--tui-radius-xs);background-size:100%}:host[data-size='s']{width:2rem;height:1.5rem}:host[data-size='m']{width:3rem;height:2rem}:host._active{box-shadow:0 0 0 1px var(--tui-base-01)}.t-front{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}.t-brand-logo{position:absolute;top:.1875rem;left:.125rem;height:.875rem;width:.875rem}.t-number{position:absolute;right:.25rem;display:flex;justify-content:center;align-items:center}:host[data-size='s'] .t-number{top:.125rem;height:.625rem;width:1.1875rem;font-size:.5rem}:host[data-size='m'] .t-number{top:.1875rem;height:.875rem;width:1.5rem;font-size:.625rem}.t-payment-system-logo{position:absolute;right:.25rem;bottom:-.5rem;width:2rem;height:2rem;transform:scale(.5);transform-origin:right}.t-back{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:rotateY(180deg) translate3d(0,0,1px);background-color:var(--tui-base-05);border-radius:var(--tui-radius-xs)}.t-back:after{content:'';position:absolute;top:20%;left:0;right:0;height:20%;background-color:var(--tui-base-06)}"]})],t)}(),d=function(){function t(){}return t=a([e.NgModule({imports:[i.CommonModule,r.TuiSvgModule],declarations:[u],exports:[u]})],t)}();t.TuiCardComponent=u,t.TuiCardModule=d,t.cardNumberAssertion=s,t.cardNumberAssertionMessage="cardNumber should contain 4 symbols",Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
|
-
//# sourceMappingURL=taiga-ui-addon-commerce-components-card.umd.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/addon-commerce/components/card/card.component.ts","ng://@taiga-ui/addon-commerce/components/card/card.module.ts"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","create","cardNumberAssertion","_a","icons","TuiCardComponent","this","active","brandLogo","cardNumber","paymentSystem","size","prototype","Input","HostBinding","tuiDefaultProp","Component","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","TuiCardModule","NgModule","imports","CommonModule","TuiSvgModule","declarations","exports"],"mappings":"6qBAsDO,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ,EAAWa,MAAIL,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,EAAQC,KAASM,GAChJ,OAAOH,EAAI,GAAKG,GAAKC,OAAOK,eAAeb,EAAQC,EAAKM,GAAIA,EAiDnCC,OAAOM,OA0GpC,MAAyBN,OAAOM,gBC/MhBC,EAAoBC,OAACV,EAAAU,EAAAV,OACjC,OAAQA,GAAqB,IAAXA,MAKhBW,IAAKD,EAAA,IACP,IAAwB,iBACxBA,EAAA,KAAyB,kBACzBA,EAAA,SAA6B,sBAC7BA,EAAA,WAA+B,oBAC/BA,EAAA,QAA4B,iCAShC,SAAAE,IAIIC,KAAAC,QAAS,EAITD,KAAAE,UAAY,GAIZF,KAAAG,WAAa,GAIbH,KAAAI,cAA6D,KAK7DJ,KAAAK,KAAiB,IASrB,OAPIhB,OAAAK,eAAIK,EAAAO,UAAA,eAAY,KAAhB,WACI,QAASN,KAAKE,WAA2B,MAAdF,KAAKK,sCAGpChB,OAAAK,eAAIK,EAAAO,UAAA,oBAAiB,KAArB,WACI,OAAON,KAAKI,cAAgBN,EAAME,KAAKI,eAAiB,oCAxB5DzB,EAAA,CAHC4B,EAAAA,QACAC,EAAAA,YAAY,iBACZC,EAAAA,+CAKD9B,EAAA,CAFC4B,EAAAA,QACAE,EAAAA,kDAKD9B,EAAA,CAFC4B,EAAAA,QACAE,EAAAA,eAAeb,EA3BsB,yEAgCtCjB,EAAA,CAFC4B,EAAAA,QACAE,EAAAA,sDAMD9B,EAAA,CAHC4B,EAAAA,QACAC,EAAAA,YAAY,kBACZC,EAAAA,6CApBQV,EAAgBpB,EAAA,CAN5B+B,EAAAA,UAAU,CACPC,SAAU,WACVC,SAAA,kXAEAC,gBAAiBC,EAAAA,wBAAwBC,yxCAEhChB,mBCfb,SAAAiB,KAA4B,OAAfA,EAAarC,EAAA,CALzBsC,EAAAA,SAAS,CACNC,QAAS,CAACC,EAAAA,aAAcC,EAAAA,cACxBC,aAAc,CAACtB,GACfuB,QAAS,CAACvB,MAEDiB,kGDD6B","sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {TuiPaymentSystem, TuiPaymentSystemT} from '@taiga-ui/addon-commerce/enums';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function cardNumberAssertion({length}: string): boolean {\n return !length || length === 4;\n}\n\nexport const cardNumberAssertionMessage = 'cardNumber should contain 4 symbols';\n\nconst icons = {\n [TuiPaymentSystem.Mir]: 'tuiIconMirMono',\n [TuiPaymentSystem.Visa]: 'tuiIconVisaMono',\n [TuiPaymentSystem.Electron]: 'tuiIconElectronMono',\n [TuiPaymentSystem.Mastercard]: 'tuiIconMastercard',\n [TuiPaymentSystem.Maestro]: 'tuiIconMaestro',\n};\n\n@Component({\n selector: 'tui-card',\n templateUrl: 'card.template.html',\n styleUrls: ['./card.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiCardComponent {\n @Input()\n @HostBinding('class._active')\n @tuiDefaultProp()\n active = false;\n\n @Input()\n @tuiDefaultProp()\n brandLogo = '';\n\n @Input()\n @tuiDefaultProp(cardNumberAssertion, cardNumberAssertionMessage)\n cardNumber = '';\n\n @Input()\n @tuiDefaultProp()\n paymentSystem: TuiPaymentSystemT | TuiPaymentSystem | null = null;\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS = 'm';\n\n get hasBrandLogo(): boolean {\n return !!this.brandLogo && this.size === 'm';\n }\n\n get paymentSystemLogo(): string {\n return this.paymentSystem ? icons[this.paymentSystem] : '';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiCardComponent} from './card.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiCardComponent],\n exports: [TuiCardComponent],\n})\nexport class TuiCardModule {}\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@taiga-ui/addon-commerce/constants"),require("@taiga-ui/addon-commerce/utils"),require("@taiga-ui/cdk"),require("@taiga-ui/core"),require("rxjs"),require("@ng-web-apis/common"),require("@taiga-ui/addon-commerce/tokens"),require("@taiga-ui/core/tokens"),require("rxjs/operators"),require("@angular/common"),require("@taiga-ui/addon-commerce/pipes"),require("@tinkoff/ng-polymorpheus"),require("angular2-text-mask")):"function"==typeof define&&define.amd?define("@taiga-ui/addon-commerce/components/input-card-grouped",["exports","@angular/core","@angular/forms","@taiga-ui/addon-commerce/constants","@taiga-ui/addon-commerce/utils","@taiga-ui/cdk","@taiga-ui/core","rxjs","@ng-web-apis/common","@taiga-ui/addon-commerce/tokens","@taiga-ui/core/tokens","rxjs/operators","@angular/common","@taiga-ui/addon-commerce/pipes","@tinkoff/ng-polymorpheus","angular2-text-mask"],e):e(((t=t||self)["taiga-ui"]=t["taiga-ui"]||{},t["taiga-ui"]["addon-commerce"]=t["taiga-ui"]["addon-commerce"]||{},t["taiga-ui"]["addon-commerce"].components=t["taiga-ui"]["addon-commerce"].components||{},t["taiga-ui"]["addon-commerce"].components["input-card-grouped"]={}),t.ng.core,t.ng.forms,t["taiga-ui"]["addon-commerce"].constants,t["taiga-ui"]["addon-commerce"].utils,t.cdk,t.core$1,t.rxjs,t.common,t["taiga-ui"]["addon-commerce"].tokens,t.tokens$1,t.rxjs.operators,t.ng.common,t["taiga-ui"]["addon-commerce"].pipes,t.ngPolymorpheus,t.angular2TextMask)}(this,(function(t,e,o,i,n,r,a,l,d,u,s,c,p,h,f,m){"use strict";var v=function(t,e){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)};function b(t,e,o,i){var n,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(a=(r<3?n(a):r>3?n(e,o,a):n(e,o))||a);return r>3&&a&&Object.defineProperty(e,o,a),a}function g(t,e){return function(o,i){e(o,i,t)}}Object.create;function x(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var i,n,r=o.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return a}Object.create;var y,_=new e.InjectionToken("InputCardGrouped texts",{factory:function(){return w(e.inject(d.WINDOW),e.inject(u.TUI_CARD_NUMBER_TEXTS),e.inject(u.TUI_CARD_EXPIRY_TEXTS),e.inject(u.TUI_CARD_CVC_TEXTS),e.inject(s.TUI_MEDIA))}});function w(t,e,o,i,n){var a=n.desktopSmall,d=t.matchMedia("screen and (min-width: "+(a-1)/16+"em)");return r.typedFromEvent(d,"change").pipe(c.startWith(null),c.switchMap((function(){return l.combineLatest([l.of(Number(d.matches)),e,o,i])})),c.map((function(t){var e=x(t,4),o=e[0],i=e[1],n=e[2],r=e[3];return{cardNumberText:i[o],expiryText:n[o],cvcText:r[o]}})))}var k={card:"",expire:"",cvc:""},C=((y={}).mir="tuiIconMir",y.visa="tuiIconVisa",y.electron="tuiIconElectron",y.mastercard="tuiIconMastercard",y.maestro="tuiIconMaestro",y),E=function(t){function d(o,r,l,d,u,s){var c=t.call(this,o,r)||this;return c.elementRef=l,c.mode$=d,c.cardGroupedTexts$=u,c.appearance=s,c.expireInert=!1,c.autocompleteEnabled=!1,c.cardSrc=null,c.exampleText="0000 0000 0000 0000",c.cardValidator=i.tuiDefaultCardValidator,c.autofilledChange=new e.EventEmitter,c.binChange=new e.EventEmitter,c.dropdown="",c.exampleTextCVC="000",c.maskCVC={mask:new Array(3).fill(a.TUI_DIGIT_REGEXP),guide:!1},c.maskCard={mask:i.TUI_CARD_MASK,guide:!1,pipe:function(t){return t.trim()}},c.maskExpire={mask:[a.TUI_DIGIT_REGEXP,a.TUI_DIGIT_REGEXP,"/",a.TUI_DIGIT_REGEXP,a.TUI_DIGIT_REGEXP],pipe:n.tuiCreateAutoCorrectedExpirePipe(),guide:!1},c.open=!1,c}var u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}(d,t),u=d,Object.defineProperty(d.prototype,"codeLength",{set:function(t){this.exampleTextCVC="0".repeat(t),this.maskCVC={mask:new Array(t).fill(a.TUI_DIGIT_REGEXP),guide:!1}},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"nativeFocusableElement",{get:function(){return this.inputCard?this.inputCard.nativeElement:null},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"focused",{get:function(){return this.open||r.isNativeFocusedIn(this.elementRef.nativeElement)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"card",{get:function(){var t,e;return null!==(e=null===(t=this.value)||void 0===t?void 0:t.card)&&void 0!==e?e:""},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"expire",{get:function(){var t,e;return null!==(e=null===(t=this.value)||void 0===t?void 0:t.expire)&&void 0!==e?e:""},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"cvc",{get:function(){var t,e;return null!==(e=null===(t=this.value)||void 0===t?void 0:t.cvc)&&void 0!==e?e:""},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasCleaner",{get:function(){var t,e;return!!(null===(e=null===(t=this.value)||void 0===t?void 0:t.card)||void 0===e?void 0:e.trim())&&!this.readOnly&&!this.computedDisabled},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasDropdown",{get:function(){return!!this.dropdown},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"defaultIcon",{get:function(){var t=this.paymentSystem;return t&&C[t]},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"icon",{get:function(){var t;return null!==(t=this.cardSrc)&&void 0!==t?t:this.defaultIcon},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"bin",{get:function(){return!this.value||this.value.card.length<6?null:this.value.card.slice(0,6)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"placeholderRaised",{get:function(){return this.computedFocused&&!this.readOnly||this.hasCardNumber},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasCardNumber",{get:function(){var t,e;return!!(null===(e=null===(t=this.value)||void 0===t?void 0:t.card)||void 0===e?void 0:e.trim())},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"idCard",{get:function(){return this.id+"_card"},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"idExpire",{get:function(){return this.id+"_expire"},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"idCVC",{get:function(){return this.id+"_cvc"},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isCardCollapsed",{get:function(){return this.isFocusable(this.card)&&!this.cardFocused},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"autocompleteCard",{get:function(){return this.autocompleteEnabled?"cc-number":"off"},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"autocompleteExpire",{get:function(){return this.autocompleteEnabled?"cc-exp":"off"},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"autocompleteCVC",{get:function(){return this.autocompleteEnabled?"cc-csc":"off"},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"name",{get:function(){return this.autocompleteEnabled?"ccexpiryyear":null},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"cardPrefilled",{get:function(){return!!this.card.match(a.TUI_NON_DIGIT_REGEXP)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"cvcPrefilled",{get:function(){return!!this.cvc.match(a.TUI_NON_DIGIT_REGEXP)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"cardFocusable",{get:function(){return this.focusable&&!this.cardPrefilled},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"expireFocusable",{get:function(){return this.isFocusable(this.card)&&!this.expireInert},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"cvcFocusable",{get:function(){return this.isFocusable(this.card)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"masked",{get:function(){return this.cardPrefilled?"*"+this.card.slice(-4):"*"},enumerable:!0,configurable:!0}),d.prototype.onEsc=function(){this.open=!1},d.prototype.onArrow=function(t,e){var o;this.open=this.hasDropdown,this.changeDetectorRef.detectChanges(),null===(o=this.datalist)||void 0===o||o.onKeyDownArrow(t,e)},d.prototype.handleOption=function(t){var e,o,i=t.card,n=void 0===i?"":i,r=t.expire,a=void 0===r?"":r,l=t.cvc,d=void 0===l?"":l,u=this.bin,s=!a&&(null===(e=this.inputExpire)||void 0===e?void 0:e.nativeElement)||(null===(o=this.inputCVC)||void 0===o?void 0:o.nativeElement);this.updateValue({card:n,expire:a,cvc:d}),this.updateBin(u),this.open=!1,this.expireInert=!!a,null==s||s.focus()},d.prototype.onCardChange=function(t){var e=this.value,o=this.bin,i=t.split(" ").join("");e&&e.card===i||(this.updateProperty(i,"card"),this.updateBin(o),this.cardValidator(this.card)&&!this.expire&&this.inputExpire&&this.focusExpire())},d.prototype.onExpireChange=function(t){this.inputExpire&&(parseInt(t.slice(0,2),10)>12&&(t="12"+t.slice(2)),"00"===t.slice(0,2)&&(t="01"+t.slice(2)),this.inputExpire.nativeElement.value=t,this.updateProperty(t,"expire"),5===t.length&&this.focusCVC())},d.prototype.onCVCChange=function(t){this.updateProperty(t,"cvc")},d.prototype.onActiveZoneChange=function(t){this.updateFocused(t),this.open=t&&this.open},d.prototype.onHovered=function(t){this.updateHovered(t)},d.prototype.onMouseDown=function(t){r.tuiAssertIsHTMLElement(t.target),t.target.matches("input")||(t.preventDefault(),this.focusInput())},d.prototype.onScroll=function(t){var e=t.currentTarget;r.tuiAssertIsHTMLElement(e),e.scrollLeft=0},d.prototype.clear=function(){this.updateValue(null),this.focusCard()},d.prototype.toggle=function(){this.open=!this.open},d.prototype.writeValue=function(e){var o=this.bin;t.prototype.writeValue.call(this,e),this.updateBin(o),this.expireInert=!!this.expire&&this.cardPrefilled},d.prototype.focusCard=function(){var t;null===(t=this.inputCard)||void 0===t||t.nativeElement.focus()},d.prototype.focusExpire=function(){var t;null===(t=this.inputExpire)||void 0===t||t.nativeElement.focus({preventScroll:!0})},d.prototype.focusCVC=function(){var t;null===(t=this.inputCVC)||void 0===t||t.nativeElement.focus()},Object.defineProperty(d.prototype,"cardFocused",{get:function(){return!!this.inputCard&&r.isNativeFocused(this.inputCard.nativeElement)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"paymentSystem",{get:function(){return this.value&&n.getPaymentSystem(this.value.card)},enumerable:!0,configurable:!0}),d.prototype.isFocusable=function(t){return this.focusable&&(this.cardValidator(t)||this.cardPrefilled)},d.prototype.updateBin=function(t){var e=this.bin;e===t||this.cardPrefilled||this.binChange.emit(e)},d.prototype.updateProperty=function(t,e){var o=this.value||k,i={card:o.card,expire:o.expire,cvc:o.cvc};i[e]=t,i.expire||i.cvc||i.card?this.updateValue(i):this.updateValue(null)},d.prototype.focusInput=function(){var t,e,o,i=this.cardFocusable&&(null===(t=this.inputCard)||void 0===t?void 0:t.nativeElement)||this.expireFocusable&&(null===(e=this.inputExpire)||void 0===e?void 0:e.nativeElement)||(null===(o=this.inputCVC)||void 0===o?void 0:o.nativeElement);null==i||i.focus()},d.ctorParameters=function(){return[{type:o.NgControl,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[o.NgControl]}]},{type:e.ChangeDetectorRef,decorators:[{type:e.Inject,args:[e.ChangeDetectorRef]}]},{type:e.ElementRef,decorators:[{type:e.Inject,args:[e.ElementRef]}]},{type:l.Observable,decorators:[{type:e.Inject,args:[a.TUI_MODE]}]},{type:l.Observable,decorators:[{type:e.Inject,args:[_]}]},{type:String,decorators:[{type:e.Inject,args:[a.TUI_TEXTFIELD_APPEARANCE]}]}]},b([e.ViewChild("inputCard")],d.prototype,"inputCard",void 0),b([e.ViewChild("inputExpire")],d.prototype,"inputExpire",void 0),b([e.ViewChild("inputCVC")],d.prototype,"inputCVC",void 0),b([e.Input(),r.tuiDefaultProp()],d.prototype,"autocompleteEnabled",void 0),b([e.Input(),r.tuiDefaultProp()],d.prototype,"cardSrc",void 0),b([e.Input(),r.tuiDefaultProp()],d.prototype,"exampleText",void 0),b([e.Input(),r.tuiDefaultProp()],d.prototype,"cardValidator",void 0),b([e.Input(),r.tuiRequiredSetter()],d.prototype,"codeLength",null),b([e.Output()],d.prototype,"autofilledChange",void 0),b([e.Output()],d.prototype,"binChange",void 0),b([e.ContentChild(a.TuiDataListDirective,{read:e.TemplateRef})],d.prototype,"dropdown",void 0),b([e.ContentChild(a.TuiDataListComponent)],d.prototype,"datalist",void 0),b([e.HostListener("keydown.esc")],d.prototype,"onEsc",null),b([e.HostListener("keydown.arrowDown.prevent",["$event.target","1"]),e.HostListener("keydown.arrowUp.prevent",["$event.target","-1"])],d.prototype,"onArrow",null),b([r.tuiPure],d.prototype,"isFocusable",null),d=u=b([e.Component({selector:"tui-input-card-grouped",template:'<tui-wrapper\n *ngIf="cardGroupedTexts$ | async as texts"\n class="t-common-wrapper"\n [appearance]="appearance"\n [readOnly]="readOnly"\n [disabled]="computedDisabled"\n [focused]="computedFocused"\n [hovered]="computedHovered"\n [invalid]="computedInvalid"\n [tuiDropdown]="open"\n [tuiDropdownContent]="dropdown || \'\'"\n (tuiHoveredChange)="onHovered($event)"\n (tuiActiveZoneChange)="onActiveZoneChange($event)"\n (scroll)="onScroll($event)"\n (mousedown)="onMouseDown($event)"\n>\n <div class="t-wrapper">\n <label\n *tuiLet="value?.card | tuiFormatCard: cardPrefilled as formattedCard"\n tuiPreventDefault="click"\n >\n <input\n #inputCard\n type="text"\n automation-id="tui-input-card-grouped__card"\n tuiInputMode="numeric"\n class="t-input t-input_card"\n [class.t-input_inert]="cardPrefilled"\n [class.t-input_hidden]="!card.length && focused"\n [attr.id]="idCard"\n [attr.aria-invalid]="!cardPrefilled && !(this.card | tuiMapper: cardValidator)"\n [placeholder]="cardPrefilled ? \'\' : exampleText"\n [autocomplete]="autocompleteCard"\n [disabled]="computedDisabled"\n [readOnly]="readOnly"\n [textMask]="maskCard"\n [tuiFocusable]="cardFocusable"\n [ngModel]="formattedCard"\n (ngModelChange)="onCardChange($event)"\n (focus)="(0)"\n />\n <span\n aria-hidden="true"\n class="t-collapsed"\n [attr.data-before]="masked"\n [class.t-collapsed_enable-mask]="isCardCollapsed"\n >\n <span class="t-collapsed-wrapper">\n <span\n class="t-value"\n [class.t-value_collapsed]="isCardCollapsed"\n >\n {{ formattedCard }}\n </span>\n </span>\n </span>\n <span\n class="t-placeholder"\n [class.t-placeholder_raised]="placeholderRaised"\n >\n {{ texts.cardNumberText }}\n </span>\n </label>\n </div>\n <div\n class="t-wrapper t-wrapper_expire"\n [class.t-wrapper_active]="isCardCollapsed"\n >\n <label tuiPreventDefault="click">\n <input\n #inputExpire\n type="text"\n placeholder="00/00"\n automation-id="tui-input-card-grouped__expire"\n tuiInputMode="numeric"\n class="t-input"\n [class.t-input_inert]="!expireFocusable"\n [attr.id]="idExpire"\n [attr.name]="name"\n [autocomplete]="autocompleteExpire"\n [disabled]="computedDisabled"\n [readOnly]="readOnly"\n [tuiFocusable]="expireFocusable"\n [textMask]="maskExpire"\n [ngModel]="expire"\n (ngModelChange)="onExpireChange($event)"\n (focus)="(0)"\n />\n <span\n class="t-placeholder"\n [class.t-placeholder_raised]="placeholderRaised"\n >\n {{ texts.expiryText }}\n </span>\n </label>\n </div>\n <div\n class="t-wrapper t-wrapper_cvc"\n [class.t-wrapper_active]="isCardCollapsed"\n >\n <label tuiPreventDefault="click">\n <input\n #inputCVC\n type="text"\n automation-id="tui-input-card-grouped__cvc"\n tuiInputMode="numeric"\n class="t-input"\n [class.t-input_prefilled]="cvcPrefilled"\n [placeholder]="cvcPrefilled ? \'•••\' : exampleTextCVC"\n [attr.id]="idCVC"\n [disabled]="computedDisabled"\n [readOnly]="readOnly || cvcPrefilled"\n [autocomplete]="autocompleteCVC"\n [textMask]="maskCVC"\n [tuiFocusable]="cvcFocusable"\n [ngModel]="cvc"\n (ngModelChange)="onCVCChange($event)"\n (focus)="(0)"\n />\n <span\n class="t-placeholder"\n [class.t-placeholder_raised]="placeholderRaised"\n >\n {{ texts.cvcText }}\n </span>\n </label>\n </div>\n <div class="t-icons">\n <div\n *ngIf="icon"\n polymorpheus-outlet\n class="t-icon-outlet"\n [content]="icon"\n >\n <ng-template let-icon>\n <tui-svg\n automation-id="tui-input-card-grouped__icon"\n class="t-card"\n [src]="icon"\n ></tui-svg>\n </ng-template>\n </div>\n <tui-svg\n *ngIf="hasCleaner"\n src="tuiIconCloseLarge"\n class="t-icon"\n (click)="clear()"\n ></tui-svg>\n <tui-svg\n *ngIf="hasDropdown"\n src="tuiIconChevronDownLarge"\n class="t-icon"\n [class.t-icon_rotated]="open"\n (click)="toggle()"\n ></tui-svg>\n </div>\n</tui-wrapper>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[a.MODE_PROVIDER,{provide:r.TUI_FOCUSABLE_ITEM_ACCESSOR,useExisting:e.forwardRef((function(){return u}))},{provide:a.TUI_DATA_LIST_HOST,useExisting:e.forwardRef((function(){return u}))}],host:{"($.data-mode.attr)":"mode$","data-size":"l"},styles:[":host{display:block;height:var(--tui-height-l);width:29.5rem;border-radius:var(--tui-radius-m)}:host[data-mode=onDark]{--tui-autofill:var(--tui-autofill-night)}:host :host-context(tui-root._mobile){width:18rem}.t-outline{height:100%;width:100%}.t-common-wrapper{position:relative;height:100%;width:100%;overflow:hidden}.t-wrapper{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;width:100%;height:100%}.t-wrapper_cvc{margin-left:7.1875rem;transform:translate3d(100%,0,0)}:host-context(tui-root._mobile) .t-wrapper_cvc{margin-left:4.0625rem}.t-wrapper_expire{transform:translate3d(100%,0,0)}.t-wrapper_active{transform:translate3d(6.5625rem,0,0)}:host-context(tui-root._mobile) .t-wrapper_active{transform:translate3d(4.125rem,0,0)}.t-card{width:2rem;height:2rem;margin-right:.625rem}.t-collapsed{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0 0 0 1rem;margin:0;border-radius:inherit;background:0 0;font-size:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:0;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none;line-height:2.25rem;pointer-events:none}.t-collapsed:-webkit-autofill,.t-collapsed:-webkit-autofill:focus,.t-collapsed:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-collapsed :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,.t-collapsed :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,.t-collapsed :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,.t-collapsed :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill,.t-collapsed :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:focus,.t-collapsed :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] .t-collapsed:-webkit-autofill,:host[data-mode=onDark] .t-collapsed:-webkit-autofill:focus,:host[data-mode=onDark] .t-collapsed:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}.t-collapsed :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),.t-collapsed :host-context(tui-text-area[data-size='s']):not(tui-text-area),:host[data-size='s'] .t-collapsed{padding:0 var(--tui-padding-s)}.t-collapsed :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),.t-collapsed :host-context(tui-text-area[data-size='l']):not(tui-text-area),:host[data-size='l'] .t-collapsed{padding:0 var(--tui-padding-l)}.t-collapsed :host-context(tui-primitive-textfield._disabled),.t-collapsed :host-context(tui-text-area._disabled),:host._disabled .t-collapsed{pointer-events:none}.t-collapsed :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) .t-collapsed{padding-top:1.25rem}.t-collapsed :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) .t-collapsed:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}.t-collapsed :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) .t-collapsed{padding-top:1.125rem}.t-collapsed :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) .t-collapsed:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}.t-collapsed :host-context(tui-primitive-textfield._hidden),:host._hidden input.t-collapsed{opacity:0;text-indent:-10em;-webkit-user-select:none}.t-collapsed_enable-mask:before{content:attr(data-before)}.t-collapsed_enable-mask .t-collapsed-wrapper{left:1.375rem}.t-collapsed-wrapper{position:absolute;top:0;display:block;width:100%;height:100%;overflow:hidden}.t-value{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;bottom:0;right:100%;display:block;transform:translate3d(100%,0,0)}.t-value_collapsed{transform:translate3d(4ch,0,0)}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0 1rem;margin:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:0;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none;transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out}.t-input:-webkit-autofill,.t-input:-webkit-autofill:focus,.t-input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:focus,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] .t-input:-webkit-autofill,:host[data-mode=onDark] .t-input:-webkit-autofill:focus,:host[data-mode=onDark] .t-input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}.t-input :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size='s']):not(tui-text-area),:host[data-size='s'] .t-input{padding:0 var(--tui-padding-s)}.t-input :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size='l']):not(tui-text-area),:host[data-size='l'] .t-input{padding:0 var(--tui-padding-l)}.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled),:host._disabled .t-input{pointer-events:none}.t-input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) .t-input{padding-top:1.25rem}.t-input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) .t-input:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}.t-input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) .t-input{padding-top:1.125rem}.t-input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) .t-input:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}.t-input :host-context(tui-primitive-textfield._hidden),:host._hidden input.t-input{opacity:0;text-indent:-10em;-webkit-user-select:none}.t-input::-ms-input-placeholder{color:var(--tui-text-03)}.t-input::placeholder{color:var(--tui-text-03)}:host[data-mode=onDark] .t-input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}.t-input_card:not(.t-input_hidden),.t-input_card:not(.t-input_hidden):-webkit-autofill,.t-input_card:not(.t-input_hidden)::placeholder{caret-color:var(--tui-base-09);color:transparent!important;-webkit-text-fill-color:transparent!important}.t-input_card::-webkit-credit-card-auto-fill-button{pointer-events:none;background-color:transparent!important;-webkit-mask-image:none!important}.t-input_inert{pointer-events:none}.t-icons{position:absolute;right:.75rem;display:flex;align-items:center;height:100%}.t-icon-outlet{display:inherit}.t-icon{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.t-icon:hover{color:var(--tui-text-02)}:host._disabled .t-icon,:host._readonly .t-icon{pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-icon:hover{color:var(--tui-text-01-night)}.t-icon_rotated{transform:rotate(180deg)}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);margin:1.125rem 1rem;line-height:1.25rem}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size='l']._focused._label-outside .t-placeholder,:host[data-size='m']._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size='l'] .t-placeholder{font-size:.9375rem}:host[data-size='l'] .t-placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .t-placeholder,:host[data-size='m']._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}"]}),g(0,e.Optional()),g(0,e.Self()),g(0,e.Inject(o.NgControl)),g(1,e.Inject(e.ChangeDetectorRef)),g(2,e.Inject(e.ElementRef)),g(3,e.Inject(a.TUI_MODE)),g(4,e.Inject(_)),g(5,e.Inject(a.TUI_TEXTFIELD_APPEARANCE))],d)}(r.AbstractTuiNullableControl),I=function(){function t(){}return t=b([e.NgModule({imports:[p.CommonModule,o.FormsModule,m.TextMaskModule,r.TuiFocusableModule,a.TuiSvgModule,a.TuiWrapperModule,r.TuiHoveredModule,r.TuiActiveZoneModule,r.TuiInputModeModule,r.TuiMapperPipeModule,a.TuiDropdownModule,r.TuiPreventDefaultModule,f.PolymorpheusModule,r.TuiLetModule,h.TuiFormatCardModule],declarations:[E],exports:[E]})],t)}();t.TUI_INPUT_CARD_GROUPED_TEXTS=_,t.TuiInputCardGroupedComponent=E,t.TuiInputCardGroupedModule=I,t.inputGroupedTextsFactory=w,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
|
-
//# sourceMappingURL=taiga-ui-addon-commerce-components-input-card-grouped.umd.min.js.map
|