@zonos/elements 1.3.49 → 1.3.50
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-8fac8840.js → cart-688d674d.js} +36 -4
- package/dist/cjs/{createCustomEvent-21addb75.js → createCustomEvent-01bacaea.js} +2 -2
- package/dist/cjs/{getBorderRadius-4413e191.js → getBorderRadius-a6a3b35e.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{isDarkColor-4eb96a1e.js → isDarkColor-7a056d05.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-8d507ea7.js → paypal-ce1516ba.js} +3 -3
- package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
- 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.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +28 -15
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_4.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 +58 -15
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +5 -5
- 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/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-56401fdb.js → zonosStore-67139f0e.js} +5 -0
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +53 -103
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +55 -11
- package/dist/collection/components/main/zonos-controller.js +12 -4
- package/dist/collection/components/store/zonosStore.js +5 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +7 -1
- package/dist/collection/components/utils/hello/currencyConversion/numberFormat.js +27 -0
- package/dist/collection/components/utils/hello/initHello.js +14 -9
- package/dist/collection/types/generated/graphql.customer.types.js +20 -0
- package/dist/esm/{cart-e14f2366.js → cart-4f300fcb.js} +36 -4
- package/dist/esm/{createCustomEvent-444ddf02.js → createCustomEvent-c5ed9070.js} +2 -2
- package/dist/esm/{getBorderRadius-3ba98361.js → getBorderRadius-23398fc6.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{isDarkColor-3119e351.js → isDarkColor-c927f77d.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-eef2a2a3.js → paypal-70caf283.js} +3 -3
- package/dist/esm/zonos-address_8.entry.js +4 -4
- 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.entry.js +2 -2
- package/dist/esm/zonos-cart-items_12.entry.js +6 -6
- package/dist/esm/zonos-checkout.entry.js +6 -6
- package/dist/esm/zonos-controller.entry.js +28 -15
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_4.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 +58 -15
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-8fc9ceb2.js → zonosStore-473f4654.js} +5 -0
- package/dist/esm-es5/{cart-e14f2366.js → cart-4f300fcb.js} +1 -1
- package/dist/esm-es5/{createCustomEvent-444ddf02.js → createCustomEvent-c5ed9070.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-3ba98361.js → getBorderRadius-23398fc6.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-3119e351.js → isDarkColor-c927f77d.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-eef2a2a3.js → paypal-70caf283.js} +1 -1
- package/dist/esm-es5/zonos-address_8.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.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.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_4.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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.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/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-8fc9ceb2.js → zonosStore-473f4654.js} +1 -1
- package/dist/scripts/index.d.ts +82 -6
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +9 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/hello/currencyConversion/numberFormat.d.ts +13 -0
- package/dist/types/components/utils/hello/initHello.d.ts +6 -2
- package/dist/types/components/utils/logging/sendErrorLog.d.ts +1 -1
- package/dist/types/scripts/_zonosBase.d.ts +77 -3
- package/dist/types/types/generated/graphql.customer.types.d.ts +27 -3
- package/dist/types/types/generated/graphql.customer.types.ts +38 -3
- package/dist/types/types/generated/graphql.frontend.types.d.ts +14 -14
- package/dist/types/types/generated/graphql.frontend.types.ts +12 -12
- package/dist/types/types/hello/HelloConfig.d.ts +3 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-62db3f69.entry.js → p-00f219bd.entry.js} +1 -1
- package/dist/zonos-elements/{p-da3edde8.js → p-05dff37f.js} +1 -1
- package/dist/zonos-elements/{p-b0d100bc.js → p-124e3426.js} +1 -1
- package/dist/zonos-elements/p-1719bedd.entry.js +1 -0
- package/dist/zonos-elements/{p-e8f7fb29.system.entry.js → p-1c72e53f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1f2db2ff.entry.js +1 -0
- package/dist/zonos-elements/{p-7da895a1.js → p-2018969a.js} +1 -1
- package/dist/zonos-elements/{p-a171d025.system.entry.js → p-22e8d4ad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6ac72711.js → p-23a84835.js} +1 -1
- package/dist/zonos-elements/p-27f2e8af.system.entry.js +1 -0
- package/dist/zonos-elements/{p-40c21634.system.js → p-29814fd7.system.js} +1 -1
- package/dist/zonos-elements/{p-7ec264d3.system.js → p-31905b60.system.js} +1 -1
- package/dist/zonos-elements/{p-5a2d27cd.system.entry.js → p-322600aa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-40d52dd6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-ec21c7f0.entry.js → p-4452dddc.entry.js} +1 -1
- package/dist/zonos-elements/{p-6bb0b7d2.system.entry.js → p-47c72c50.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8393dae.entry.js → p-480a6094.entry.js} +1 -1
- package/dist/zonos-elements/{p-b5ef10aa.entry.js → p-4849604d.entry.js} +1 -1
- package/dist/zonos-elements/{p-717028a2.system.entry.js → p-4b59ada6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e07bf9ea.entry.js → p-54f66cd1.entry.js} +1 -1
- package/dist/zonos-elements/{p-46bb8fd1.entry.js → p-595d406e.entry.js} +1 -1
- package/dist/zonos-elements/{p-52947dab.system.entry.js → p-5a59ed7f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d5268ba8.system.entry.js → p-5beccdce.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9220f63d.entry.js → p-5f7f51bd.entry.js} +1 -1
- package/dist/zonos-elements/{p-9a319774.entry.js → p-6013e370.entry.js} +1 -1
- package/dist/zonos-elements/{p-baa03426.system.js → p-6ab615e6.system.js} +1 -1
- package/dist/zonos-elements/{p-9420f9db.entry.js → p-6dcef5ce.entry.js} +1 -1
- package/dist/zonos-elements/{p-c7301a88.entry.js → p-70bb4a25.entry.js} +1 -1
- package/dist/zonos-elements/{p-14067782.system.entry.js → p-7ef2737b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b5c47b6d.system.js → p-81540fd6.system.js} +1 -1
- package/dist/zonos-elements/{p-a6f1a790.entry.js → p-89b1f4a5.entry.js} +1 -1
- package/dist/zonos-elements/{p-9eadd9a7.system.entry.js → p-89d8c1ad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e6d9006.system.entry.js → p-8af4a9e7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8e8defdc.system.js +1 -0
- package/dist/zonos-elements/{p-dc368ad5.entry.js → p-8e9dcaa3.entry.js} +1 -1
- package/dist/zonos-elements/{p-04054425.js → p-9dd6b00d.js} +1 -1
- package/dist/zonos-elements/{p-4f454a91.system.entry.js → p-a3547b34.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9d1f13c2.entry.js → p-a4309beb.entry.js} +1 -1
- package/dist/zonos-elements/{p-412e5260.entry.js → p-a67578ae.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-1bc23926.system.js → p-ceb8b836.system.js} +2 -2
- package/dist/zonos-elements/{p-8b01aafb.entry.js → p-cf9a46e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-a4a2ccb6.system.entry.js → p-d1cd0a5f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b4963e20.system.entry.js → p-d709ad28.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ee05c6c1.system.entry.js → p-e7e73693.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e97793ce.system.js +1 -0
- package/dist/zonos-elements/{p-706d2bad.entry.js → p-eb3520e7.entry.js} +1 -1
- package/dist/zonos-elements/{p-4d0c5518.system.entry.js → p-ec31cd17.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0229282c.system.entry.js → p-ecd6a58a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f05f3e27.js +1 -0
- package/dist/zonos-elements/{p-c4bb2949.system.entry.js → p-f3811c4c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0f59fba9.entry.js → p-fe198a6c.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-52fb6876.js +0 -1
- package/dist/zonos-elements/p-539974db.system.js +0 -1
- package/dist/zonos-elements/p-6058a37a.entry.js +0 -1
- package/dist/zonos-elements/p-8809964a.system.js +0 -1
- package/dist/zonos-elements/p-c024a9b3.entry.js +0 -1
- package/dist/zonos-elements/p-ca508c67.system.entry.js +0 -1
- package/dist/zonos-elements/p-ef664d5a.system.entry.js +0 -1
|
@@ -53,6 +53,12 @@ export type CurrencyConverter = (props: {
|
|
|
53
53
|
*/
|
|
54
54
|
format: (amount: number) => string;
|
|
55
55
|
}) => string;
|
|
56
|
+
/**
|
|
57
|
+
* This function will use the `Intl.NumberFormat` API to format the number with native decimal and thousand separators
|
|
58
|
+
*/
|
|
59
|
+
export type NumberFormat = (props: {
|
|
60
|
+
amount: number;
|
|
61
|
+
}) => string;
|
|
56
62
|
export type LoadZonosParamsConfig = {
|
|
57
63
|
appearance?: Partial<AppearanceConfig>;
|
|
58
64
|
checkoutSettings?: Partial<CheckoutConfig>;
|
|
@@ -63,7 +69,63 @@ export type LoadZonosParamsConfig = {
|
|
|
63
69
|
currencyConverter?: CurrencyConverter;
|
|
64
70
|
helloSettings?: Partial<HelloConfig>;
|
|
65
71
|
/**
|
|
66
|
-
* Hello and Checkout are using
|
|
72
|
+
* Hello and Checkout are using the Intl.NumberFormat API to format the currency. You can either use the default currency display or customize it.
|
|
73
|
+
*
|
|
74
|
+
* ### There are 3 options to customize the currency format:
|
|
75
|
+
* @option1 Simple currency display change
|
|
76
|
+
* @example
|
|
77
|
+
* Price: "1200.99"
|
|
78
|
+
* End result: "$1,200.99"
|
|
79
|
+
*
|
|
80
|
+
* Zonos.init({
|
|
81
|
+
* overrideCurrencyFormat: {
|
|
82
|
+
* currencyDisplay: 'symbol'
|
|
83
|
+
* }
|
|
84
|
+
* });
|
|
85
|
+
* ------
|
|
86
|
+
* @option2 Customize currency format (use `convert` and `format` in `currencyConverter`)
|
|
87
|
+
* @note This function would override the default behavior of `format`, and `convertAndFormat` function inside of `CurrencyConverter`
|
|
88
|
+
* @note You can combine this function with `currencyConverter` to customize the currency format
|
|
89
|
+
* @example
|
|
90
|
+
* Price: "1200.99"
|
|
91
|
+
* End result: "USD - 1,200.99"
|
|
92
|
+
*
|
|
93
|
+
* Zonos.init({
|
|
94
|
+
* // `format` function in `currencyConverter` will trigger this function instead.
|
|
95
|
+
* overrideCurrencyFormat: ({ amount, currencyCode, numberFormat }) => {
|
|
96
|
+
* return `- ${numberFormat({ amount })}`;
|
|
97
|
+
* }
|
|
98
|
+
* currencyConverter: ({ convert, currencyCode, originalAmount, selector }) => {
|
|
99
|
+
* const convertedAmount = convert(originalAmount);
|
|
100
|
+
* // `format` function will call `overrideCurrencyFormat` function instead and it will just format the converted amount
|
|
101
|
+
* const formattedAmount = `${currencyCode} ${format(convertedAmount)}`;
|
|
102
|
+
* selector.innerText = formattedAmount;
|
|
103
|
+
*
|
|
104
|
+
* revealPrice();
|
|
105
|
+
* return formattedAmount;
|
|
106
|
+
* },
|
|
107
|
+
* });
|
|
108
|
+
*
|
|
109
|
+
* ------
|
|
110
|
+
* @option3 Customize currency format (use `convertAndFormat`)
|
|
111
|
+
* @example
|
|
112
|
+
* Price: "1200.99"
|
|
113
|
+
* End result: "USD - 1,200.99"
|
|
114
|
+
*
|
|
115
|
+
* Zonos.init({
|
|
116
|
+
* // `format` function in `currencyConverter` will trigger this function instead.
|
|
117
|
+
* overrideCurrencyFormat: ({ amount, currencyCode, numberFormat }) => {
|
|
118
|
+
* return `${currencyCode} - ${numberFormat({ amount })}`;
|
|
119
|
+
* }
|
|
120
|
+
* currencyConverter: ({ convertAndFormat, originalAmount, selector }) => {
|
|
121
|
+
* // `convertAndFormat` function calls `format` under the hood, so it will also call `overrideCurrencyFormat` function
|
|
122
|
+
* const convertedAndFormatedAmount = convertAndFormat(originalAmount);
|
|
123
|
+
* selector.innerText = convertedAndFormatedAmount;
|
|
124
|
+
*
|
|
125
|
+
* revealPrice();
|
|
126
|
+
* return formattedAmount;
|
|
127
|
+
* },
|
|
128
|
+
* });
|
|
67
129
|
*/
|
|
68
130
|
overrideCurrencyFormat?: {
|
|
69
131
|
/**
|
|
@@ -76,11 +138,23 @@ export type LoadZonosParamsConfig = {
|
|
|
76
138
|
currencyDisplay?: 'symbol' | 'code' | 'name' | 'narrowSymbol';
|
|
77
139
|
}
|
|
78
140
|
/**
|
|
79
|
-
* Custom currency format function to be used in Hello and Checkout
|
|
141
|
+
* Custom currency format function to be used in Hello and Checkout.
|
|
142
|
+
* @note This function would override the default behavior of `format` function inside of `CurrencyConverter`
|
|
143
|
+
* @note You can combine this function with `currencyConverter` to customize the currency format
|
|
80
144
|
*/
|
|
81
145
|
| ((params: {
|
|
146
|
+
/**
|
|
147
|
+
* Amount to be formatted
|
|
148
|
+
*/
|
|
82
149
|
amount: number;
|
|
83
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Current selected currency code
|
|
152
|
+
*/
|
|
153
|
+
currencyCode: CurrencyCode;
|
|
154
|
+
/**
|
|
155
|
+
* This function will use the `Intl.NumberFormat` API to format the number with native decimal and thousand separators
|
|
156
|
+
*/
|
|
157
|
+
numberFormat: NumberFormat;
|
|
84
158
|
}) => string);
|
|
85
159
|
/**
|
|
86
160
|
* Callback to be called when the country is changed
|
|
@@ -147,6 +147,12 @@ export declare const batteryPackingType: {
|
|
|
147
147
|
readonly BatteryPackagedWithEquipment: "BATTERY_PACKAGED_WITH_EQUIPMENT";
|
|
148
148
|
};
|
|
149
149
|
export type BatteryPackingType = (typeof batteryPackingType)[keyof typeof batteryPackingType];
|
|
150
|
+
export declare const billingCompanyAccountType: {
|
|
151
|
+
readonly StripeBillingCustomer: "STRIPE_BILLING_CUSTOMER";
|
|
152
|
+
readonly StripePaymentsConnectAccount: "STRIPE_PAYMENTS_CONNECT_ACCOUNT";
|
|
153
|
+
readonly StripeThirdPartyBillingCustomer: "STRIPE_THIRD_PARTY_BILLING_CUSTOMER";
|
|
154
|
+
};
|
|
155
|
+
export type BillingCompanyAccountType = (typeof billingCompanyAccountType)[keyof typeof billingCompanyAccountType];
|
|
150
156
|
export declare const billingOptionCode: {
|
|
151
157
|
readonly DdpAndDdu: "DDP_AND_DDU";
|
|
152
158
|
readonly ShipperOnly: "SHIPPER_ONLY";
|
|
@@ -320,6 +326,12 @@ export declare const carrierRateType: {
|
|
|
320
326
|
readonly Retail: "RETAIL";
|
|
321
327
|
};
|
|
322
328
|
export type CarrierRateType = (typeof carrierRateType)[keyof typeof carrierRateType];
|
|
329
|
+
export declare const cartAdjustmentType: {
|
|
330
|
+
readonly CartTotal: "CART_TOTAL";
|
|
331
|
+
readonly Item: "ITEM";
|
|
332
|
+
readonly Shipping: "SHIPPING";
|
|
333
|
+
};
|
|
334
|
+
export type CartAdjustmentType = (typeof cartAdjustmentType)[keyof typeof cartAdjustmentType];
|
|
323
335
|
export declare const catalogItemExportJobAction: {
|
|
324
336
|
readonly Email: "EMAIL";
|
|
325
337
|
readonly None: "NONE";
|
|
@@ -455,6 +467,12 @@ export declare const collectUploadStatus: {
|
|
|
455
467
|
readonly SucceededWithErrors: "SUCCEEDED_WITH_ERRORS";
|
|
456
468
|
};
|
|
457
469
|
export type CollectUploadStatus = (typeof collectUploadStatus)[keyof typeof collectUploadStatus];
|
|
470
|
+
export declare const commercialInvoiceImageCarrier: {
|
|
471
|
+
readonly Dhl: "DHL";
|
|
472
|
+
readonly Fedex: "FEDEX";
|
|
473
|
+
readonly Ups: "UPS";
|
|
474
|
+
};
|
|
475
|
+
export type CommercialInvoiceImageCarrier = (typeof commercialInvoiceImageCarrier)[keyof typeof commercialInvoiceImageCarrier];
|
|
458
476
|
export declare const confidenceScoreDisplayStatus: {
|
|
459
477
|
readonly Disabled: "DISABLED";
|
|
460
478
|
readonly Enabled: "ENABLED";
|
|
@@ -1293,6 +1311,12 @@ export declare const elementsUiTheme: {
|
|
|
1293
1311
|
readonly System: "SYSTEM";
|
|
1294
1312
|
};
|
|
1295
1313
|
export type ElementsUiTheme = (typeof elementsUiTheme)[keyof typeof elementsUiTheme];
|
|
1314
|
+
export declare const emailSenderStatus: {
|
|
1315
|
+
readonly NotVerified: "NOT_VERIFIED";
|
|
1316
|
+
readonly Pending: "PENDING";
|
|
1317
|
+
readonly Verified: "VERIFIED";
|
|
1318
|
+
};
|
|
1319
|
+
export type EmailSenderStatus = (typeof emailSenderStatus)[keyof typeof emailSenderStatus];
|
|
1296
1320
|
export declare const emailTemplateProviderType: {
|
|
1297
1321
|
readonly Sendgrid: "SENDGRID";
|
|
1298
1322
|
};
|
|
@@ -2625,7 +2649,7 @@ export type CalculateLandedCostMutation = {
|
|
|
2625
2649
|
amount: number;
|
|
2626
2650
|
} | null;
|
|
2627
2651
|
type: LandedCostAdjustmentType | null;
|
|
2628
|
-
}
|
|
2652
|
+
}> | null;
|
|
2629
2653
|
deMinimis: Array<{
|
|
2630
2654
|
formula: string;
|
|
2631
2655
|
method: IncotermCode;
|
|
@@ -2700,7 +2724,7 @@ export type LandedCostFragment = {
|
|
|
2700
2724
|
amount: number;
|
|
2701
2725
|
} | null;
|
|
2702
2726
|
type: LandedCostAdjustmentType | null;
|
|
2703
|
-
}
|
|
2727
|
+
}> | null;
|
|
2704
2728
|
deMinimis: Array<{
|
|
2705
2729
|
formula: string;
|
|
2706
2730
|
method: IncotermCode;
|
|
@@ -3310,7 +3334,7 @@ export type GetOrderQuery = {
|
|
|
3310
3334
|
amount: number;
|
|
3311
3335
|
name: string | null;
|
|
3312
3336
|
} | null;
|
|
3313
|
-
}
|
|
3337
|
+
}> | null;
|
|
3314
3338
|
duties: Array<{
|
|
3315
3339
|
exchangeRate: {
|
|
3316
3340
|
rate: number;
|
|
@@ -151,6 +151,15 @@ export const batteryPackingType = {
|
|
|
151
151
|
export type BatteryPackingType =
|
|
152
152
|
(typeof batteryPackingType)[keyof typeof batteryPackingType];
|
|
153
153
|
|
|
154
|
+
export const billingCompanyAccountType = {
|
|
155
|
+
StripeBillingCustomer: 'STRIPE_BILLING_CUSTOMER',
|
|
156
|
+
StripePaymentsConnectAccount: 'STRIPE_PAYMENTS_CONNECT_ACCOUNT',
|
|
157
|
+
StripeThirdPartyBillingCustomer: 'STRIPE_THIRD_PARTY_BILLING_CUSTOMER',
|
|
158
|
+
} as const;
|
|
159
|
+
|
|
160
|
+
export type BillingCompanyAccountType =
|
|
161
|
+
(typeof billingCompanyAccountType)[keyof typeof billingCompanyAccountType];
|
|
162
|
+
|
|
154
163
|
export const billingOptionCode = {
|
|
155
164
|
DdpAndDdu: 'DDP_AND_DDU',
|
|
156
165
|
ShipperOnly: 'SHIPPER_ONLY',
|
|
@@ -387,6 +396,15 @@ export const carrierRateType = {
|
|
|
387
396
|
export type CarrierRateType =
|
|
388
397
|
(typeof carrierRateType)[keyof typeof carrierRateType];
|
|
389
398
|
|
|
399
|
+
export const cartAdjustmentType = {
|
|
400
|
+
CartTotal: 'CART_TOTAL',
|
|
401
|
+
Item: 'ITEM',
|
|
402
|
+
Shipping: 'SHIPPING',
|
|
403
|
+
} as const;
|
|
404
|
+
|
|
405
|
+
export type CartAdjustmentType =
|
|
406
|
+
(typeof cartAdjustmentType)[keyof typeof cartAdjustmentType];
|
|
407
|
+
|
|
390
408
|
export const catalogItemExportJobAction = {
|
|
391
409
|
Email: 'EMAIL',
|
|
392
410
|
None: 'NONE',
|
|
@@ -576,6 +594,14 @@ export const collectUploadStatus = {
|
|
|
576
594
|
|
|
577
595
|
export type CollectUploadStatus =
|
|
578
596
|
(typeof collectUploadStatus)[keyof typeof collectUploadStatus];
|
|
597
|
+
export const commercialInvoiceImageCarrier = {
|
|
598
|
+
Dhl: 'DHL',
|
|
599
|
+
Fedex: 'FEDEX',
|
|
600
|
+
Ups: 'UPS',
|
|
601
|
+
} as const;
|
|
602
|
+
|
|
603
|
+
export type CommercialInvoiceImageCarrier =
|
|
604
|
+
(typeof commercialInvoiceImageCarrier)[keyof typeof commercialInvoiceImageCarrier];
|
|
579
605
|
|
|
580
606
|
export const confidenceScoreDisplayStatus = {
|
|
581
607
|
Disabled: 'DISABLED',
|
|
@@ -1488,6 +1514,15 @@ export const elementsUiTheme = {
|
|
|
1488
1514
|
export type ElementsUiTheme =
|
|
1489
1515
|
(typeof elementsUiTheme)[keyof typeof elementsUiTheme];
|
|
1490
1516
|
|
|
1517
|
+
export const emailSenderStatus = {
|
|
1518
|
+
NotVerified: 'NOT_VERIFIED',
|
|
1519
|
+
Pending: 'PENDING',
|
|
1520
|
+
Verified: 'VERIFIED',
|
|
1521
|
+
} as const;
|
|
1522
|
+
|
|
1523
|
+
export type EmailSenderStatus =
|
|
1524
|
+
(typeof emailSenderStatus)[keyof typeof emailSenderStatus];
|
|
1525
|
+
|
|
1491
1526
|
export const emailTemplateProviderType = {
|
|
1492
1527
|
Sendgrid: 'SENDGRID',
|
|
1493
1528
|
} as const;
|
|
@@ -3174,7 +3209,7 @@ export type CalculateLandedCostMutation = {
|
|
|
3174
3209
|
amount: number;
|
|
3175
3210
|
item: { amount: number } | null;
|
|
3176
3211
|
type: LandedCostAdjustmentType | null;
|
|
3177
|
-
}
|
|
3212
|
+
}> | null;
|
|
3178
3213
|
deMinimis: Array<{
|
|
3179
3214
|
formula: string;
|
|
3180
3215
|
method: IncotermCode;
|
|
@@ -3238,7 +3273,7 @@ export type LandedCostFragment = {
|
|
|
3238
3273
|
amount: number;
|
|
3239
3274
|
item: { amount: number } | null;
|
|
3240
3275
|
type: LandedCostAdjustmentType | null;
|
|
3241
|
-
}
|
|
3276
|
+
}> | null;
|
|
3242
3277
|
deMinimis: Array<{
|
|
3243
3278
|
formula: string;
|
|
3244
3279
|
method: IncotermCode;
|
|
@@ -3800,7 +3835,7 @@ export type GetOrderQuery = {
|
|
|
3800
3835
|
Adjustment: { amount: number } | null;
|
|
3801
3836
|
amount: number;
|
|
3802
3837
|
item: { amount: number; name: string | null } | null;
|
|
3803
|
-
}
|
|
3838
|
+
}> | null;
|
|
3804
3839
|
duties: Array<{
|
|
3805
3840
|
exchangeRate: {
|
|
3806
3841
|
rate: number;
|
|
@@ -551,22 +551,9 @@ export type UpdateCacheStoreVersionMutation = {
|
|
|
551
551
|
}>;
|
|
552
552
|
} | null;
|
|
553
553
|
};
|
|
554
|
-
export type GetAudienceByAspectKeyQuery = {
|
|
555
|
-
feature_audienceAspectLink: Array<{
|
|
556
|
-
audience: {
|
|
557
|
-
entityLinks: Array<{
|
|
558
|
-
entity: {
|
|
559
|
-
email: string | null;
|
|
560
|
-
storeId: number | null;
|
|
561
|
-
};
|
|
562
|
-
}>;
|
|
563
|
-
name: Feature_AudienceName_Enum;
|
|
564
|
-
};
|
|
565
|
-
}>;
|
|
566
|
-
};
|
|
567
554
|
export type LocaleCountryMessagesQuery = {
|
|
568
555
|
locale_countryCodesPage: Array<{
|
|
569
|
-
countryCodes: Array<string
|
|
556
|
+
countryCodes: Array<string>;
|
|
570
557
|
countryCodesPageMessageLinks: Array<{
|
|
571
558
|
id: number;
|
|
572
559
|
message: {
|
|
@@ -615,6 +602,19 @@ export type CreateScriptLoadEventMutation = {
|
|
|
615
602
|
}>;
|
|
616
603
|
} | null;
|
|
617
604
|
};
|
|
605
|
+
export type GetAudienceByAspectKeyQuery = {
|
|
606
|
+
feature_audienceAspectLink: Array<{
|
|
607
|
+
audience: {
|
|
608
|
+
entityLinks: Array<{
|
|
609
|
+
entity: {
|
|
610
|
+
email: string | null;
|
|
611
|
+
storeId: number | null;
|
|
612
|
+
};
|
|
613
|
+
}>;
|
|
614
|
+
name: Feature_AudienceName_Enum;
|
|
615
|
+
};
|
|
616
|
+
}>;
|
|
617
|
+
};
|
|
618
618
|
export type AllSettingsQuery = {
|
|
619
619
|
bigcommerce_settings: Array<{
|
|
620
620
|
authToken: string;
|
|
@@ -558,20 +558,9 @@ export type UpdateCacheStoreVersionMutation = {
|
|
|
558
558
|
} | null;
|
|
559
559
|
};
|
|
560
560
|
|
|
561
|
-
export type GetAudienceByAspectKeyQuery = {
|
|
562
|
-
feature_audienceAspectLink: Array<{
|
|
563
|
-
audience: {
|
|
564
|
-
entityLinks: Array<{
|
|
565
|
-
entity: { email: string | null; storeId: number | null };
|
|
566
|
-
}>;
|
|
567
|
-
name: Feature_AudienceName_Enum;
|
|
568
|
-
};
|
|
569
|
-
}>;
|
|
570
|
-
};
|
|
571
|
-
|
|
572
561
|
export type LocaleCountryMessagesQuery = {
|
|
573
562
|
locale_countryCodesPage: Array<{
|
|
574
|
-
countryCodes: Array<string
|
|
563
|
+
countryCodes: Array<string>;
|
|
575
564
|
countryCodesPageMessageLinks: Array<{
|
|
576
565
|
id: number;
|
|
577
566
|
message: {
|
|
@@ -621,6 +610,17 @@ export type CreateScriptLoadEventMutation = {
|
|
|
621
610
|
} | null;
|
|
622
611
|
};
|
|
623
612
|
|
|
613
|
+
export type GetAudienceByAspectKeyQuery = {
|
|
614
|
+
feature_audienceAspectLink: Array<{
|
|
615
|
+
audience: {
|
|
616
|
+
entityLinks: Array<{
|
|
617
|
+
entity: { email: string | null; storeId: number | null };
|
|
618
|
+
}>;
|
|
619
|
+
name: Feature_AudienceName_Enum;
|
|
620
|
+
};
|
|
621
|
+
}>;
|
|
622
|
+
};
|
|
623
|
+
|
|
624
624
|
export type AllSettingsQuery = {
|
|
625
625
|
bigcommerce_settings: Array<{
|
|
626
626
|
authToken: string;
|
|
@@ -12,9 +12,10 @@ export type HelloConfig = {
|
|
|
12
12
|
countryOverrideBehavior?: CountryOverrideBehavior;
|
|
13
13
|
currencyBehavior: HelloCurrencyBehavior;
|
|
14
14
|
currencyElementSelector: string;
|
|
15
|
+
desktopLocation?: HelloMobileLocation | null;
|
|
15
16
|
excludedUrlPatterns: Array<string>;
|
|
16
17
|
homepageUrlPattern: string | null;
|
|
17
|
-
mobileLocation: HelloMobileLocation;
|
|
18
|
+
mobileLocation: HelloMobileLocation | null;
|
|
18
19
|
mode: Mode;
|
|
19
20
|
organization: string;
|
|
20
21
|
peekMessageBehavior: HelloPeekMessageBehavior;
|
|
@@ -35,6 +36,7 @@ export type HelloConfig = {
|
|
|
35
36
|
* @default ONLY_SHIPPABLE
|
|
36
37
|
*/
|
|
37
38
|
showForCountries?: ShowForCountries;
|
|
39
|
+
visibilityStatus?: 'ENABLED' | 'DISABLED';
|
|
38
40
|
/**
|
|
39
41
|
* Callback function to run after the Hello widget has been initialized. This should be triggered only once when hello is attached to the DOM.
|
|
40
42
|
* **Note**: If hello is detached from the DOM and reattached, this callback will be called again.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e,a as n}from"./p-eaa335e1.js";const t=["jsdelivr","cdnjs","unpkg","vercel"],o=e=>{const n=t.indexOf(e);return t[n+1]||null},s="https://js.stripe.com/v3",r=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let l=null;const c=Promise.resolve().then((()=>{return e=null,null!==l||(l=new Promise(((t,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(i),window.Stripe)t(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${s}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&r.test(t.src))return t}return null})();l&&e?console.warn(i):l||(l=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${s}${t}`;const r=document.head||document.body;return r?(r.appendChild(o),o):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),l;var e}));let d=!1;var u;c.catch((e=>{d||console.warn(e)}));const a=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),m="https://v1.3.
|
|
1
|
+
import{l as e,a as n}from"./p-eaa335e1.js";const t=["jsdelivr","cdnjs","unpkg","vercel"],o=e=>{const n=t.indexOf(e);return t[n+1]||null},s="https://js.stripe.com/v3",r=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let l=null;const c=Promise.resolve().then((()=>{return e=null,null!==l||(l=new Promise(((t,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(i),window.Stripe)t(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${s}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&r.test(t.src))return t}return null})();l&&e?console.warn(i):l||(l=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${s}${t}`;const r=document.head||document.body;return r?(r.appendChild(o),o):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),l;var e}));let d=!1;var u;c.catch((e=>{d||console.warn(e)}));const a=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),m="https://v1.3.50.js.zonos.com",p=a||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.50",w="jsdelivr",f="https://rsms.me",h="https://fonts.googleapis.com",v=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class y{}u=y,y.doneInit=!1,y.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),y.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),y._paypalMockResponse=null,y.isBigCommerce=!1,y.releaseDate="1726504733366",y.isNpm=!0,y.zonosQaUrl=null,y.version="v1.3.50",y.modeAlerted=!1,y.tempCartData=null,y.paypal=null,y.getCurrentTimestamp=()=>(new Date).getTime(),y.zonosController=null,y.init=async({appearance:t,checkoutSettings:o,currencyConverter:s,helloSettings:r,onCountryChange:i,overrideCurrencyFormat:l,storeId:c,zonosApiKey:d})=>{u.doneInit||(e(`====== ZONOS DEBUG MODE: on (${u.version}) ======`),d?(u.zonosApiKey=d,u.storeId=c,e("init zonos"),u.injectZonosCdn(),u.injectZonosCss(),u.injectFonts(),u.injectController({config:{appearance:t,checkoutSettings:o,currencyConverter:s,helloSettings:r,onCountryChange:i,overrideCurrencyFormat:l},zonosApiKey:d}),u.doneInit=!0):n("Missing Zonos API key"))},y.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},y.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},y.showNotification=e=>{var n;null===(n=u.zonosController)||void 0===n||n.showNotification(e)},y.updateOrganizationName=e=>{var n;null===(n=u.zonosController)||void 0===n||n.updateOrganizationName(e)},y.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},y.injectController=({config:t,zonosApiKey:o})=>{var s;if(document.querySelector("zonos-controller"))return;if(null===(s=t.checkoutSettings)||void 0===s?void 0:s.placeOrderButtonSelector){const e=t.checkoutSettings.placeOrderButtonSelector;u.disablePlaceOrderButtons({config:t,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{u.disablePlaceOrderButtons({config:t,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const r=document.createElement("zonos-controller");r.config=t,r.zonosApiKey=o,r.addEventListener("stripeInitEvent",(async t=>{const{detail:o}=t;e("loading Stripe");const s=await(async(...e)=>{d=!0;const n=Date.now();return c.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(o.publishableKey);s?(window.Zonos.stripe=s,r.initCheckoutElement(s)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(r),u.zonosController=r,e("Zonos controller injected!")},y.injectScript=({cdnType:t,isModule:s,theRestUrl:r})=>{const i=`${u.getZonosUrl(t)}/${r}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");s?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{n(`Failed to load ${c.src}`);const e=o(t);e&&u.injectScript({cdnType:e,isModule:s,theRestUrl:r})},l.appendChild(c)},y.getZonosUrl=n=>{const t=()=>{switch(n){case"jsdelivr":return p;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.50";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.50";case"vercel":return m}};return u.isNpm&&(()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const t=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.50.js.zonos.com";if(!t&&(o.includes("test.")||o.includes("test-")))return o;if(!t&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!t)return null;if("dev-elements"===t)return"https://dev.elements.zonos.com";const s=`https://${t}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s})()||t()},y.injectZonosCdn=()=>{u.injectScript({cdnType:w,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),u.injectScript({cdnType:w,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},y.injectStylesheet=({cdnType:e,theRestUrl:t})=>{const s=u.getZonosUrl(e),r=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${m}/`,r.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${s}/${t}`,l.onerror=()=>{n(`Failed to load ${l.href}`);const s=o(e);s&&u.injectStylesheet({cdnType:s,theRestUrl:t})},r.appendChild(l)},y.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(u.injectStylesheet({cdnType:w,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},y.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${f}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!v.test(t.href))return t}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,t=document.createElement("link");t.rel="preconnect",t.href=f,n.appendChild(t);const o=document.createElement("link");o.rel="stylesheet",o.href=`${f}/inter/inter.css`,n.appendChild(o),e("Zonos font injected!")},y.setupGoogleFont=e=>{var n;null===(n=u.zonosController)||void 0===n||n.setupGoogleFont(e)},y.injectSupportGoogleFont=n=>{var t;e(`[FONT] injecting ${n}`);const o=null===(t=n.match(/family=(.*?):/))||void 0===t?void 0:t[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${h}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=h,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=n,s.appendChild(r),e(`[FONT] ${o} font injected!`)};export{y as Zonos}
|