@zonos/elements 1.3.7 → 1.3.8-alpha.1
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/dist/cjs/{cart-eee85bda.js → cart-c22d66c8.js} +98 -21
- package/dist/cjs/{getBorderRadius-d8f18958.js → getBorderRadius-d9a954a3.js} +1 -1
- package/dist/cjs/{isDarkColor-57860b44.js → isDarkColor-c01f24df.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-a2e1f652.js → submitGtag-9c0a8038.js} +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +60 -7
- package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_9.cjs.entry.js +32 -17
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-138c5555.js → zonosStore-2a8612a4.js} +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +27 -10
- package/dist/collection/components/store/checkout/stripe.js +3 -3
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +3 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +63 -4
- package/dist/collection/components/utils/containsNonLatinChars.js +13 -0
- package/dist/collection/styles/stripe/addressRuleStyle.js +32 -15
- package/dist/collection/types/generated/graphql.customer.types.js +37 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +19 -0
- package/dist/components/stripe.js +95 -18
- package/dist/components/zonos-address2.js +67 -6
- package/dist/components/zonos-checkout-finish2.js +3 -3
- package/dist/components/zonos-customer-info2.js +35 -12
- package/dist/components/zonosStore.js +1 -0
- package/dist/esm/{cart-e261efc1.js → cart-f70b9be6.js} +98 -21
- package/dist/esm/{getBorderRadius-19787feb.js → getBorderRadius-0d133844.js} +1 -1
- package/dist/esm/{isDarkColor-2344e7a5.js → isDarkColor-8eeda28e.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-dfc6f1dc.js → submitGtag-1d7ee6b8.js} +2 -2
- package/dist/esm/zonos-address_4.entry.js +61 -8
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_9.entry.js +32 -17
- package/dist/esm/zonos-checkout.entry.js +5 -5
- package/dist/esm/zonos-controller.entry.js +4 -4
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +4 -4
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +4 -4
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-00bce01b.js → zonosStore-807f931f.js} +1 -0
- package/dist/esm-es5/cart-f70b9be6.js +1 -0
- package/dist/esm-es5/{getBorderRadius-19787feb.js → getBorderRadius-0d133844.js} +1 -1
- package/dist/esm-es5/{isDarkColor-2344e7a5.js → isDarkColor-8eeda28e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-dfc6f1dc.js → submitGtag-1d7ee6b8.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-00bce01b.js → zonosStore-807f931f.js} +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +7 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/containsNonLatinChars.d.ts +16 -0
- package/dist/types/components.d.ts +19 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +53 -0
- package/dist/types/types/generated/graphql.customer.types.ts +71 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +20 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +23 -1
- package/dist/zonos-elements/p-039803aa.system.js +1 -0
- package/dist/zonos-elements/{p-0c91720b.entry.js → p-04acf5ef.entry.js} +1 -1
- package/dist/zonos-elements/p-066c5893.system.js +1 -1
- package/dist/zonos-elements/{p-14c3ef38.entry.js → p-0ed00121.entry.js} +1 -1
- package/dist/zonos-elements/{p-143dc0d9.system.entry.js → p-121c551d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6eaef7b.system.entry.js → p-166ec0c2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1e0dd491.entry.js → p-1691b167.entry.js} +1 -1
- package/dist/zonos-elements/{p-07966463.entry.js → p-25de098d.entry.js} +1 -1
- package/dist/zonos-elements/{p-c2e58ee1.system.entry.js → p-2eb62b45.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a1e685f.entry.js → p-32f43296.entry.js} +1 -1
- package/dist/zonos-elements/{p-14d27ce1.system.entry.js → p-35e878eb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-373e579c.entry.js +1 -0
- package/dist/zonos-elements/{p-354603b3.system.entry.js → p-3a406969.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3d4fc5aa.js +1 -0
- package/dist/zonos-elements/{p-c060d475.js → p-4679840f.js} +1 -1
- package/dist/zonos-elements/{p-78ba2928.system.js → p-4c4ccf82.system.js} +1 -1
- package/dist/zonos-elements/{p-4fb77a38.system.entry.js → p-4da6d5bb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-328b7f6f.system.entry.js → p-50460bf4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3cc0f84.entry.js → p-55cbb4cd.entry.js} +1 -1
- package/dist/zonos-elements/{p-745cd869.system.entry.js → p-56318a1f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f7c36fcc.entry.js → p-58a25a6a.entry.js} +1 -1
- package/dist/zonos-elements/{p-389599d3.system.entry.js → p-5d73cde0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-857cfe35.entry.js → p-6d2ba24a.entry.js} +1 -1
- package/dist/zonos-elements/p-6dc7222d.js +1 -0
- package/dist/zonos-elements/{p-ac0a7b8f.entry.js → p-701d0fef.entry.js} +1 -1
- package/dist/zonos-elements/{p-49f6a985.system.js → p-75490d7c.system.js} +1 -1
- package/dist/zonos-elements/{p-165d469e.system.entry.js → p-7736198d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-69e2c59e.entry.js → p-780ab968.entry.js} +1 -1
- package/dist/zonos-elements/{p-7f4f45b3.entry.js → p-7da1d7da.entry.js} +1 -1
- package/dist/zonos-elements/{p-1119dddf.system.entry.js → p-824882ce.system.entry.js} +1 -1
- package/dist/zonos-elements/p-86fe18ea.system.entry.js +1 -0
- package/dist/zonos-elements/{p-91797d4e.system.js → p-95dee6f4.system.js} +1 -1
- package/dist/zonos-elements/{p-279d1c5f.entry.js → p-96e2cde7.entry.js} +1 -1
- package/dist/zonos-elements/p-9a9902ca.entry.js +1 -0
- package/dist/zonos-elements/p-9cdc6b5f.js +1 -0
- package/dist/zonos-elements/{p-61e5cf29.system.entry.js → p-af946fb3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b4725505.system.js → p-c476a347.system.js} +1 -1
- package/dist/zonos-elements/p-c97cb066.system.entry.js +1 -0
- package/dist/zonos-elements/p-cbc7edb4.entry.js +1 -0
- package/dist/zonos-elements/{p-17e87be1.entry.js → p-d427adf2.entry.js} +1 -1
- package/dist/zonos-elements/{p-5c176b23.system.entry.js → p-d93d74c1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e6b489d.system.entry.js → p-d9ba11cf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd9e8589.entry.js → p-e043e830.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c45ce37.system.entry.js → p-e28d648c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-95e0fc06.js → p-e71fbec9.js} +1 -1
- package/dist/zonos-elements/{p-799d8a17.system.entry.js → p-e76069cc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5f4ba44c.entry.js → p-fc0a051b.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-e261efc1.js +0 -1
- package/dist/zonos-elements/p-0c0aa552.js +0 -1
- package/dist/zonos-elements/p-3b23e462.entry.js +0 -1
- package/dist/zonos-elements/p-5496951a.system.js +0 -1
- package/dist/zonos-elements/p-5d9a000a.system.entry.js +0 -1
- package/dist/zonos-elements/p-79b24786.system.entry.js +0 -1
- package/dist/zonos-elements/p-7b87b82f.js +0 -1
- package/dist/zonos-elements/p-9f4e02a1.entry.js +0 -1
- package/dist/zonos-elements/p-da767f8b.js +0 -1
- package/dist/zonos-elements/p-f11a3d9e.entry.js +0 -1
|
@@ -83,6 +83,9 @@ export const stringsKorean = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: '결제 처리 중. 결제가 접수되면 알려드리겠습니다.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: '텍스트가 라틴 알파벳만 사용하는지 확인해 주세요 (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: '제공됨',
|
|
88
91
|
},
|
|
@@ -83,6 +83,9 @@ export const stringsNorwegian = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: 'Bearbeider betalingen. Vi gir deg beskjed når betalingen er mottatt.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: 'Vennligst sørg for at teksten din kun bruker det latinske alfabetet (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: 'Drevet av',
|
|
88
91
|
},
|
|
@@ -83,6 +83,9 @@ export const stringsPolish = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: 'Trwa przetwarzanie płatności. Poinformujemy gdy płatność zostanie otrzymana.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: 'Proszę upewnić się, że tekst używa tylko alfabetu łacińskiego (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: 'Dostarczone przez',
|
|
88
91
|
},
|
|
@@ -83,6 +83,9 @@ export const stringsPortuguese = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: 'Processando pagamento. Informaremos quando o pagamento for recebido.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: 'Por favor, certifique-se de que seu texto utilize apenas o alfabeto latino (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: 'Desenvolvido por',
|
|
88
91
|
},
|
|
@@ -83,6 +83,9 @@ export const stringsRussian = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: 'Обрабатываем платеж. Сообщим вам, когда платеж будет получен.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: 'Пожалуйста, убедитесь, что ваш текст использует только латинский алфавит (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: 'Работает на',
|
|
88
91
|
},
|
|
@@ -83,6 +83,9 @@ export const stringsSpanish = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: 'Procesando pago. Le informaremos cuando se reciba el pago.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: 'Por favor, asegúrese de que su texto use solo el alfabeto latino (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: 'Desarrollado por',
|
|
88
91
|
},
|
|
@@ -83,6 +83,9 @@ export const stringsSwedish = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: 'Betalningsbehandling. Vi kommer att uppdatera dig när betalningen har mottagits.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: 'Vänligen se till att din text endast använder det latinska alfabetet (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: 'Drivs av',
|
|
88
91
|
},
|
|
@@ -83,6 +83,9 @@ export const stringsTurkish = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: 'Ödeme işleniyor. Ödeme alındığında sizi bilgilendireceğiz.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: 'Lütfen metninizin sadece Latin alfabesini kullandığından emin olun (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: 'Tarafından desteklenmektedir',
|
|
88
91
|
},
|
|
@@ -83,6 +83,9 @@ export const stringsVietnamese = {
|
|
|
83
83
|
"Payment processing. We'll update you when payment is received.": {
|
|
84
84
|
value: 'Đang xử lý thanh toán. Chúng tôi sẽ thông báo khi nhận được thanh toán.',
|
|
85
85
|
},
|
|
86
|
+
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
87
|
+
value: 'Vui lòng đảm bảo rằng văn bản của bạn chỉ sử dụng bảng chữ cái Latinh (A-Z, a-z).',
|
|
88
|
+
},
|
|
86
89
|
'Powered by': {
|
|
87
90
|
value: 'Nền tảng cung cấp bởi',
|
|
88
91
|
},
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
3
2
|
import { stripeStore, stripeStorePrefetchLandedCost, } from "../../store/checkout/stripe";
|
|
4
3
|
import { localizationStore } from "../../store/hello/localization";
|
|
4
|
+
import { translate } from "../../store/translationStore";
|
|
5
|
+
import { zonosStore } from "../../store/zonosStore";
|
|
5
6
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
7
|
+
import { containsNonLatinChars } from "../../utils/containsNonLatinChars";
|
|
6
8
|
import { logError } from "../../utils/logging/logError";
|
|
7
9
|
/**
|
|
8
10
|
* This component is a wrapper for the stripe address element that would render default style object
|
|
@@ -13,6 +15,7 @@ export class ZonosAddress {
|
|
|
13
15
|
this.titleText = undefined;
|
|
14
16
|
this.defaultAddress = null;
|
|
15
17
|
this.stripe = window.Zonos.stripe;
|
|
18
|
+
this.hasInvalidCharacters = false;
|
|
16
19
|
this.isDirtyAddress = false;
|
|
17
20
|
}
|
|
18
21
|
getStripeAddressInstance() {
|
|
@@ -38,6 +41,13 @@ export class ZonosAddress {
|
|
|
38
41
|
stripeStore.stripeAddressEventData = event;
|
|
39
42
|
break;
|
|
40
43
|
}
|
|
44
|
+
const hasInvalidCharacters = this.checkInvalidCharacters(event);
|
|
45
|
+
this.invalidCharacters.emit(hasInvalidCharacters);
|
|
46
|
+
this.hasInvalidCharacters = hasInvalidCharacters;
|
|
47
|
+
if (hasInvalidCharacters) {
|
|
48
|
+
// no need to prefetch landed cost if the address contains invalid characters
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
41
51
|
// only prefetch if the address type is shipping
|
|
42
52
|
void stripeStorePrefetchLandedCost();
|
|
43
53
|
}
|
|
@@ -48,6 +58,29 @@ export class ZonosAddress {
|
|
|
48
58
|
}
|
|
49
59
|
stripeStore.stripeBillingAddressElement = stripeAddressElement;
|
|
50
60
|
}
|
|
61
|
+
checkInvalidCharacters(address) {
|
|
62
|
+
// Do nothing if the allowed character sets is ALL or the address is incomplete
|
|
63
|
+
if (!address.complete ||
|
|
64
|
+
zonosStore.checkoutSettings.allowedCharacterSets === 'ALL') {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
const { address: addressValue, firstName, lastName, name } = address.value;
|
|
68
|
+
const { city, country, line1, line2, postal_code, state } = addressValue;
|
|
69
|
+
const invalidList = containsNonLatinChars({
|
|
70
|
+
city,
|
|
71
|
+
country,
|
|
72
|
+
line1,
|
|
73
|
+
line2: line2 || '',
|
|
74
|
+
name: name || `${firstName} ${lastName}`,
|
|
75
|
+
postal_code,
|
|
76
|
+
state,
|
|
77
|
+
});
|
|
78
|
+
// emit event if the address contains invalid characters
|
|
79
|
+
if (Object.keys(invalidList).length) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
51
84
|
async watchInitStripe() {
|
|
52
85
|
var _a, _b;
|
|
53
86
|
this.stripe = window.Zonos.stripe;
|
|
@@ -111,7 +144,7 @@ export class ZonosAddress {
|
|
|
111
144
|
}, 600);
|
|
112
145
|
}
|
|
113
146
|
this.updateAddressEventData({
|
|
114
|
-
event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address',
|
|
147
|
+
event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', value: Object.assign(Object.assign({}, eventValue), { firstName: eventValue.firstName || eventValue.name.split(' ')[0], lastName: eventValue.lastName || eventValue.name.split(' ')[1] }) }),
|
|
115
148
|
type: this.type,
|
|
116
149
|
});
|
|
117
150
|
});
|
|
@@ -132,10 +165,17 @@ export class ZonosAddress {
|
|
|
132
165
|
stripeAddressEventData.value.address.line1.length > 0;
|
|
133
166
|
// @Watch doesn't get trigger on initial load
|
|
134
167
|
void this.watchInitStripe();
|
|
168
|
+
setTimeout(() => {
|
|
169
|
+
// check if the address contains invalid characters after address is loaded
|
|
170
|
+
const newStripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
|
|
171
|
+
if (newStripeAddressEventData) {
|
|
172
|
+
this.checkInvalidCharacters(newStripeAddressEventData);
|
|
173
|
+
}
|
|
174
|
+
}, 500);
|
|
135
175
|
}
|
|
136
176
|
render() {
|
|
137
177
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
138
|
-
return (h(Host, { key: '
|
|
178
|
+
return (h(Host, { key: '2656f94224ff0385b4ae2594284257add19f82c3', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '48b5ac45621d6d0f79f62227c71d70bb284c60da', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '2f11c7983fd310afa01fa5100ce25ce49cfcc3da', class: "zonos--address-component" }), this.hasInvalidCharacters && (h("zonos-banner", { bannerTitle: translate('Please ensure your text uses the Latin alphabet only (A-Z, a-z).'), intent: "error" }))));
|
|
139
179
|
}
|
|
140
180
|
static get is() { return "zonos-address"; }
|
|
141
181
|
static get encapsulation() { return "scoped"; }
|
|
@@ -212,9 +252,28 @@ export class ZonosAddress {
|
|
|
212
252
|
static get states() {
|
|
213
253
|
return {
|
|
214
254
|
"stripe": {},
|
|
255
|
+
"hasInvalidCharacters": {},
|
|
215
256
|
"isDirtyAddress": {}
|
|
216
257
|
};
|
|
217
258
|
}
|
|
259
|
+
static get events() {
|
|
260
|
+
return [{
|
|
261
|
+
"method": "invalidCharacters",
|
|
262
|
+
"name": "invalidCharacters",
|
|
263
|
+
"bubbles": true,
|
|
264
|
+
"cancelable": true,
|
|
265
|
+
"composed": true,
|
|
266
|
+
"docs": {
|
|
267
|
+
"tags": [],
|
|
268
|
+
"text": "Event to emit when address is not containing allowed character sets"
|
|
269
|
+
},
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "boolean",
|
|
272
|
+
"resolved": "boolean",
|
|
273
|
+
"references": {}
|
|
274
|
+
}
|
|
275
|
+
}];
|
|
276
|
+
}
|
|
218
277
|
static get elementRef() { return "el"; }
|
|
219
278
|
static get watchers() {
|
|
220
279
|
return [{
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if the given address object contains non-latin characters
|
|
3
|
+
* @returns an object with the same keys as the input object, and a boolean value indicating if the value contains non-latin characters
|
|
4
|
+
*/
|
|
5
|
+
export const containsNonLatinChars = (params) => {
|
|
6
|
+
/**
|
|
7
|
+
* This regex matches any character that is not a latin character, punctuation, symbol, number, separator, control, or mark
|
|
8
|
+
* I limited the character found to 1 in the regex, so that we can return early if we find any non-latin character
|
|
9
|
+
**/
|
|
10
|
+
const nonLatinRegex = /[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;
|
|
11
|
+
const nonLatinValueList = Object.entries(params).reduce((prev, [key, value]) => nonLatinRegex.test(value) ? Object.assign(Object.assign({}, prev), { [key]: true }) : prev, {});
|
|
12
|
+
return nonLatinValueList;
|
|
13
|
+
};
|
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
export const addressRuleStyle = ({ theme, }) => {
|
|
2
|
+
const defaultStyle = {
|
|
3
|
+
'.Action': {
|
|
4
|
+
color: 'var(--colorText)',
|
|
5
|
+
},
|
|
6
|
+
'.Input': {
|
|
7
|
+
boxShadow: 'none',
|
|
8
|
+
// need to reset everything and the paddingTop to default, otherwise the paddingTop will not be updated.
|
|
9
|
+
padding: '0',
|
|
10
|
+
paddingBottom: '8px',
|
|
11
|
+
paddingLeft: '16px',
|
|
12
|
+
paddingRight: '8px',
|
|
13
|
+
// any value here will be add up to the default paddingTop (20px).
|
|
14
|
+
paddingTop: '6px',
|
|
15
|
+
},
|
|
16
|
+
'.Input:focus': {
|
|
17
|
+
boxShadow: 'none',
|
|
18
|
+
},
|
|
19
|
+
'.PickerItem--highlight': {
|
|
20
|
+
boxShadow: '0 0 0 2px var(--colorBackground)',
|
|
21
|
+
},
|
|
22
|
+
'.PickerItem--highlight:hover': {
|
|
23
|
+
backgroundColor: 'var(--colorBackground)',
|
|
24
|
+
boxShadow: 'none',
|
|
25
|
+
},
|
|
26
|
+
'.PickerItem--new': {
|
|
27
|
+
color: 'var(--colorText)',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
2
30
|
switch (theme) {
|
|
31
|
+
case 'DARK': {
|
|
32
|
+
return Object.assign(Object.assign({}, defaultStyle), { '.Action': Object.assign(Object.assign({}, defaultStyle['.Action']), { color: 'white' }), '.PickerItem--new': Object.assign(Object.assign({}, defaultStyle['.PickerItem--new']), { color: 'white' }) });
|
|
33
|
+
}
|
|
3
34
|
default:
|
|
4
|
-
return
|
|
5
|
-
'.Input': {
|
|
6
|
-
boxShadow: 'none',
|
|
7
|
-
// need to reset everything and the paddingTop to default, otherwise the paddingTop will not be updated.
|
|
8
|
-
padding: '0',
|
|
9
|
-
paddingBottom: '8px',
|
|
10
|
-
paddingLeft: '16px',
|
|
11
|
-
paddingRight: '8px',
|
|
12
|
-
// any value here will be add up to the default paddingTop (20px).
|
|
13
|
-
paddingTop: '6px',
|
|
14
|
-
},
|
|
15
|
-
'.Input:focus': {
|
|
16
|
-
boxShadow: 'none',
|
|
17
|
-
},
|
|
18
|
-
};
|
|
35
|
+
return defaultStyle;
|
|
19
36
|
}
|
|
20
37
|
};
|
|
@@ -79,6 +79,10 @@ export const carrierAccountRegistrationType = {
|
|
|
79
79
|
export const carrierAccountUsageCategoryCode = {
|
|
80
80
|
Shipping: 'SHIPPING',
|
|
81
81
|
};
|
|
82
|
+
export const carrierApiAccountIntegrationType = {
|
|
83
|
+
Rest: 'REST',
|
|
84
|
+
Soap: 'SOAP',
|
|
85
|
+
};
|
|
82
86
|
export const carrierApiAccountProvider = {
|
|
83
87
|
General: 'GENERAL',
|
|
84
88
|
Organization: 'ORGANIZATION',
|
|
@@ -87,6 +91,31 @@ export const carrierApiRateTypeCode = {
|
|
|
87
91
|
Negotiated: 'NEGOTIATED',
|
|
88
92
|
Retail: 'RETAIL',
|
|
89
93
|
};
|
|
94
|
+
export const carrierApiRatingBatteryMaterialType = {
|
|
95
|
+
LithiumIon: 'LITHIUM_ION',
|
|
96
|
+
LithiumMetal: 'LITHIUM_METAL',
|
|
97
|
+
};
|
|
98
|
+
export const carrierApiRatingBatteryPackingType = {
|
|
99
|
+
BatteryInsideEquipment: 'BATTERY_INSIDE_EQUIPMENT',
|
|
100
|
+
BatteryOnly: 'BATTERY_ONLY',
|
|
101
|
+
BatteryPackagedWithEquipment: 'BATTERY_PACKAGED_WITH_EQUIPMENT',
|
|
102
|
+
};
|
|
103
|
+
export const carrierApiRatingSignatureOptionType = {
|
|
104
|
+
Adult: 'ADULT',
|
|
105
|
+
Default: 'DEFAULT',
|
|
106
|
+
Direct: 'DIRECT',
|
|
107
|
+
Indirect: 'INDIRECT',
|
|
108
|
+
};
|
|
109
|
+
export const carrierApiRatingSpecialServiceType = {
|
|
110
|
+
Alcohol: 'ALCOHOL',
|
|
111
|
+
Battery: 'BATTERY',
|
|
112
|
+
CutFlowers: 'CUT_FLOWERS',
|
|
113
|
+
DangerousGoods: 'DANGEROUS_GOODS',
|
|
114
|
+
DryIce: 'DRY_ICE',
|
|
115
|
+
SaturdayDelivery: 'SATURDAY_DELIVERY',
|
|
116
|
+
SignatureOption: 'SIGNATURE_OPTION',
|
|
117
|
+
SundayDelivery: 'SUNDAY_DELIVERY',
|
|
118
|
+
};
|
|
90
119
|
export const carrierCode = {
|
|
91
120
|
Apc: 'APC',
|
|
92
121
|
Dhl: 'DHL',
|
|
@@ -131,6 +160,10 @@ export const carrierRateType = {
|
|
|
131
160
|
Negotiated: 'NEGOTIATED',
|
|
132
161
|
Retail: 'RETAIL',
|
|
133
162
|
};
|
|
163
|
+
export const catalogItemExportJobAction = {
|
|
164
|
+
Email: 'EMAIL',
|
|
165
|
+
None: 'NONE',
|
|
166
|
+
};
|
|
134
167
|
export const catalogItemSource = {
|
|
135
168
|
Classification: 'CLASSIFICATION',
|
|
136
169
|
LegacyMigration: 'LEGACY_MIGRATION',
|
|
@@ -208,6 +241,10 @@ export const collectUploadStatus = {
|
|
|
208
241
|
Succeeded: 'SUCCEEDED',
|
|
209
242
|
SucceededWithErrors: 'SUCCEEDED_WITH_ERRORS',
|
|
210
243
|
};
|
|
244
|
+
export const connectTransferOriginType = {
|
|
245
|
+
Connect: 'CONNECT',
|
|
246
|
+
Platform: 'PLATFORM',
|
|
247
|
+
};
|
|
211
248
|
export const constraintType = {
|
|
212
249
|
Girth: 'GIRTH',
|
|
213
250
|
GirthAndLength: 'GIRTH_AND_LENGTH',
|
|
@@ -2,6 +2,11 @@ export const cursorOrdering = {
|
|
|
2
2
|
Asc: 'ASC',
|
|
3
3
|
Desc: 'DESC',
|
|
4
4
|
};
|
|
5
|
+
export const errorProjectNameEnum = {
|
|
6
|
+
Dashboard: 'dashboard',
|
|
7
|
+
Elements: 'elements',
|
|
8
|
+
ZonosCom: 'zonos_com',
|
|
9
|
+
};
|
|
5
10
|
export const featureAspectKeyEnum = {
|
|
6
11
|
Checkout_2_0: 'checkout_2_0',
|
|
7
12
|
ClassifySingleRequest: 'classify_single_request',
|
|
@@ -40,6 +45,20 @@ export const featureAudienceNameEnum = {
|
|
|
40
45
|
ProductManager: 'product_manager',
|
|
41
46
|
TechLead: 'tech_lead',
|
|
42
47
|
};
|
|
48
|
+
export const graphHubCategoryLabelEnum = {
|
|
49
|
+
Carrier: 'carrier',
|
|
50
|
+
Catalog: 'catalog',
|
|
51
|
+
Classify: 'classify',
|
|
52
|
+
Label: 'label',
|
|
53
|
+
LandedCost: 'landed_cost',
|
|
54
|
+
};
|
|
55
|
+
export const graphHubDeployedSchemaLabelEnum = {
|
|
56
|
+
Auth: 'auth',
|
|
57
|
+
Customer: 'customer',
|
|
58
|
+
Frontend: 'frontend',
|
|
59
|
+
Internal: 'internal',
|
|
60
|
+
Viewport: 'viewport',
|
|
61
|
+
};
|
|
43
62
|
export const localeElementsSupportedLocationCodeEnum = {
|
|
44
63
|
Ar: 'ar',
|
|
45
64
|
Da: 'da',
|