@odus/checkout 1.1.0 → 1.2.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/dist/checkout.es.js +10 -10
- package/dist/elements.es.js +10 -10
- package/dist/package.json +2 -5
- package/dist/phone.js +1 -1
- package/dist/shared.js +40 -40
- package/package.json +2 -5
package/dist/checkout.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { k as q, n as W, t as L, p as Y, e as P, I as K, l as N, w as G, S as x, x as T, H as J, i as R, f as A, a as Z, P as Q, E as X, G as ee, C as te, s as se, j as ie, z as ae, A as ne, m as re, F as oe, V as _, B as le, N as F, c as E, b as de, Q as U, d as H, v as he, M as ce } from "./shared.js";
|
|
2
|
+
import { o as Ie, q as Be, r as Te, u as Re, D as _e, K as Ue, L as He, O as Oe, R as ze } from "./shared.js";
|
|
3
3
|
function I(o) {
|
|
4
4
|
return {
|
|
5
5
|
name: "Custom Appearance",
|
|
@@ -945,9 +945,9 @@ class ge {
|
|
|
945
945
|
}
|
|
946
946
|
handleVgsStateChange(e, t) {
|
|
947
947
|
if (!this.isVgsMode || !this.vgsWrapper) return;
|
|
948
|
-
const s = e[
|
|
948
|
+
const s = e[R.CARDHOLDER]?.isFocused;
|
|
949
949
|
if (this._vgsFieldsReady && (this.vgsWrapper.style.boxShadow = s ? "0 0 0 1px rgba(50, 151, 211, 0.7), 0 1px 1px 0 rgba(0, 0, 0, 0.07), 0 0 0 4px rgba(50, 151, 211, 0.3)" : "0 0 0 1px #e0e0e0, 0 2px 4px 0 rgba(0,0,0,0.07), 0 1px 1.5px 0 rgba(0,0,0,0.05)"), !t || !this.vgsHelperText) return;
|
|
950
|
-
const a = t[
|
|
950
|
+
const a = t[R.CARDHOLDER];
|
|
951
951
|
a ? (this.vgsHelperText.setText(a), this.vgsHelperText.toggleVisibility(!0)) : this.vgsHelperText.toggleVisibility(!1);
|
|
952
952
|
}
|
|
953
953
|
hideFakePlaceholder() {
|
|
@@ -1058,7 +1058,7 @@ class ye extends P {
|
|
|
1058
1058
|
switch (y) {
|
|
1059
1059
|
case "paypal": {
|
|
1060
1060
|
if (a) {
|
|
1061
|
-
const u = new
|
|
1061
|
+
const u = new Q({
|
|
1062
1062
|
checkoutProfile: t,
|
|
1063
1063
|
formData: s,
|
|
1064
1064
|
onSubmit: a
|
|
@@ -1242,7 +1242,7 @@ class Ce {
|
|
|
1242
1242
|
) || e.layout.shippingFields && Object.values(e.layout.shippingFields).some(
|
|
1243
1243
|
(n) => n?.enabled
|
|
1244
1244
|
);
|
|
1245
|
-
this.emailField = new
|
|
1245
|
+
this.emailField = new X({
|
|
1246
1246
|
value: t.email,
|
|
1247
1247
|
onChange: this.onChange,
|
|
1248
1248
|
onBlur: this.onBlur,
|
|
@@ -1827,7 +1827,7 @@ class Pe extends P {
|
|
|
1827
1827
|
vgsJwt;
|
|
1828
1828
|
vgsCardResult;
|
|
1829
1829
|
constructor(e) {
|
|
1830
|
-
super("form", ["form-container"]), this.options = e, this.vgsJwt = e.vgsJwt, this.vgsJwt && (this.vgsService = new
|
|
1830
|
+
super("form", ["form-container"]), this.options = e, this.vgsJwt = e.vgsJwt, this.vgsJwt && (this.vgsService = new _()), this.checkoutProfile = ue({
|
|
1831
1831
|
appearance: e.appearance
|
|
1832
1832
|
}), e.locale && this.translation.setLocale(e.locale), this.componentManager = new Ce({
|
|
1833
1833
|
formElement: this.element,
|
|
@@ -2151,7 +2151,7 @@ class Pe extends P {
|
|
|
2151
2151
|
), this.componentManager.cleanup(), this.uiManager.cleanup(), this.getElement().remove();
|
|
2152
2152
|
}
|
|
2153
2153
|
associatePayment(e, t, s, a, i) {
|
|
2154
|
-
this.options.paymentId = e, this.options.checkoutKey = t, this.options.supportedPaymentMethods = s, this.options.checkoutDetails = a, this.componentManager.setCheckoutDetailsLoaded(!0), i && !this.vgsService && (this.vgsJwt = i, this.vgsService = new
|
|
2154
|
+
this.options.paymentId = e, this.options.checkoutKey = t, this.options.supportedPaymentMethods = s, this.options.checkoutDetails = a, this.componentManager.setCheckoutDetailsLoaded(!0), i && !this.vgsService && (this.vgsJwt = i, this.vgsService = new _(), this.componentManager.setVgsService(this.vgsService), this.stateCoordinator.setVgsMode(!0), this.vgsService.init(this.options.environment).then((r) => {
|
|
2155
2155
|
this.vgsService?.createForm(
|
|
2156
2156
|
r,
|
|
2157
2157
|
(d) => this.handleVgsStateChange(d)
|
|
@@ -2495,8 +2495,8 @@ export {
|
|
|
2495
2495
|
Ie as deLocale,
|
|
2496
2496
|
Be as enLocale,
|
|
2497
2497
|
Te as esLocale,
|
|
2498
|
-
|
|
2499
|
-
|
|
2498
|
+
Re as frLocale,
|
|
2499
|
+
_e as itLocale,
|
|
2500
2500
|
Ue as plLocale,
|
|
2501
2501
|
He as ptLocale,
|
|
2502
2502
|
ce as pushError,
|
package/dist/elements.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as a, I as g, S as E, w as z, x, a as N, F as V, C as k, n as _, t as P, J as F, V as y, z as w, s as A, E as R, A as C, P as M, G as T, T as I, b as B, v as L, j } from "./shared.js";
|
|
2
2
|
const p = ".form-helper-text{color:#dc2727;font-family:var(--odus-font-family, inherit);font-size:12px;font-weight:500;margin-top:4px;display:block;overflow:hidden;max-height:100px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out}.form-helper-text-hidden{max-height:0;opacity:0;margin-top:0;overflow:hidden}", f = ".input-wrapper{display:flex;flex-direction:column;width:100%;min-width:0;box-sizing:border-box;align-items:stretch}.input-wrapper *{box-sizing:border-box}.form-input{opacity:1;font-size:var(--odus-input-font-size, 16px);font-weight:var(--odus-input-font-weight, 400);letter-spacing:var(--odus-input-letter-spacing, .02em);transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px var(--odus-border-color, #e0e0e0),0 2px 4px #00000012,0 1px 1.5px #0000000d;background:var(--odus-color-background, #fff);padding:var(--odus-input-padding, 8px 12px);border:none;outline:none;line-height:var(--odus-input-line-height, 1.5);z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%}.form-input[name=cardNumber]{padding-right:100px}.form-input-error{color:#dc2727}.form-input::placeholder{color:var(--odus-input-placeholder-color, #717173);opacity:var(--odus-input-placeholder-opacity, .3)}.form-input:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;position:relative;z-index:2}", m = ".input-label{font-family:var(--odus-font-family, inherit);font-size:var(--odus-label-font-size, 14px);font-weight:var(--odus-label-font-weight, 400);color:var(--odus-label-color, var(--odus-color-text, #1a1a1a));letter-spacing:var(--odus-label-letter-spacing, normal);line-height:var(--odus-label-line-height, 1.4);margin-bottom:var(--odus-label-margin-bottom, 6px)}", O = ":host{--odus-font-family: system-ui, sans-serif;--odus-font-size: 16px;--odus-color-error: #dc2727;--odus-color-text: #1a1a1a;--odus-color-background: #ffffff;--odus-border-color: #e0e0e0;--odus-border-radius: 6px;--odus-spacing-sm: 8px;--odus-spacing-md: 16px;--odus-spacing-lg: 24px;--odus-input-height: 44px;--odus-input-padding: 8px 12px;--odus-input-font-size: var(--odus-font-size);--odus-input-font-weight: 400;--odus-input-letter-spacing: .02em;--odus-input-line-height: 1.5;--odus-input-placeholder-color: #717173;--odus-input-placeholder-opacity: .3;--odus-input-focus-shadow: 0 0 0 1px rgba(50, 151, 211, .7), 0 1px 1px 0 rgba(0, 0, 0, .07), 0 0 0 4px rgba(50, 151, 211, .3);--odus-label-font-size: 14px;--odus-label-font-weight: 400;--odus-label-color: var(--odus-color-text);--odus-label-letter-spacing: normal;--odus-label-line-height: 1.4;--odus-label-margin-bottom: 6px;--odus-card-gap: 12px;--odus-button-height: 48px;--odus-button-border-radius: var(--odus-border-radius)}.form-input{opacity:1;font-weight:var(--odus-input-font-weight, 400);letter-spacing:var(--odus-input-letter-spacing, .02em);transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px var(--odus-border-color, #e0e0e0),0 2px 4px #00000012,0 1px 1.5px #0000000d;background:var(--odus-color-background, #fff);padding:var(--odus-input-padding, 8px 12px);border:none;outline:none;line-height:var(--odus-input-line-height, 1.5);z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%}.form-input::placeholder{color:var(--odus-input-placeholder-color, #717173);opacity:var(--odus-input-placeholder-opacity, .3)}.form-input:focus{box-shadow:var( --odus-input-focus-shadow, 0 0 0 1px rgba(50, 151, 211, .7), 0 1px 1px 0 rgba(0, 0, 0, .07), 0 0 0 4px rgba(50, 151, 211, .3) );position:relative;z-index:2}.input-label{font-family:var(--odus-font-family, inherit)!important;font-size:var(--odus-label-font-size, 14px)!important;font-weight:var(--odus-label-font-weight, 400)!important;color:var(--odus-label-color, var(--odus-color-text, #1a1a1a))!important;letter-spacing:var(--odus-label-letter-spacing, normal)!important;line-height:var(--odus-label-line-height, 1.4)!important;margin-bottom:var(--odus-label-margin-bottom, 6px)!important}.form-helper-text{font-family:var(--odus-font-family, inherit)!important}";
|
|
3
3
|
class u {
|
|
4
4
|
shadowRoot = null;
|
|
@@ -200,7 +200,7 @@ class D extends u {
|
|
|
200
200
|
return this._error;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
class
|
|
203
|
+
class J extends u {
|
|
204
204
|
_value = "";
|
|
205
205
|
_error = null;
|
|
206
206
|
_input = null;
|
|
@@ -265,7 +265,7 @@ class K extends u {
|
|
|
265
265
|
return this._error;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
class
|
|
268
|
+
class K extends u {
|
|
269
269
|
_value = "";
|
|
270
270
|
_error = null;
|
|
271
271
|
_input = null;
|
|
@@ -331,7 +331,7 @@ class Z extends u {
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
const v = /* @__PURE__ */ new Set(["US", "CA"]);
|
|
334
|
-
class
|
|
334
|
+
class Z extends u {
|
|
335
335
|
_value = "";
|
|
336
336
|
_country = "";
|
|
337
337
|
_input = null;
|
|
@@ -1509,16 +1509,16 @@ class fe {
|
|
|
1509
1509
|
get: () => (this._addressStreet || (this._addressStreet = new G(), this._trackElement(this._addressStreet)), this._addressStreet),
|
|
1510
1510
|
enumerable: !0
|
|
1511
1511
|
}), Object.defineProperty(s, "firstName", {
|
|
1512
|
-
get: () => (this._addressFirstName || (this._addressFirstName = new
|
|
1512
|
+
get: () => (this._addressFirstName || (this._addressFirstName = new J(), this._trackElement(this._addressFirstName)), this._addressFirstName),
|
|
1513
1513
|
enumerable: !0
|
|
1514
1514
|
}), Object.defineProperty(s, "lastName", {
|
|
1515
|
-
get: () => (this._addressLastName || (this._addressLastName = new
|
|
1515
|
+
get: () => (this._addressLastName || (this._addressLastName = new K(), this._trackElement(this._addressLastName)), this._addressLastName),
|
|
1516
1516
|
enumerable: !0
|
|
1517
1517
|
}), Object.defineProperty(s, "city", {
|
|
1518
1518
|
get: () => (this._addressCity || (this._addressCity = new q(), this._trackElement(this._addressCity)), this._addressCity),
|
|
1519
1519
|
enumerable: !0
|
|
1520
1520
|
}), Object.defineProperty(s, "state", {
|
|
1521
|
-
get: () => (this._addressState || (this._addressState = new
|
|
1521
|
+
get: () => (this._addressState || (this._addressState = new Z(), this._trackElement(this._addressState)), this._addressState),
|
|
1522
1522
|
enumerable: !0
|
|
1523
1523
|
}), Object.defineProperty(s, "zipCode", {
|
|
1524
1524
|
get: () => (this._addressZipCode || (this._addressZipCode = new U(), this._trackElement(this._addressZipCode)), this._addressZipCode),
|
|
@@ -1734,9 +1734,9 @@ class fe {
|
|
|
1734
1734
|
export {
|
|
1735
1735
|
q as AddressCityElement,
|
|
1736
1736
|
D as AddressCountryElement,
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1737
|
+
J as AddressFirstNameElement,
|
|
1738
|
+
K as AddressLastNameElement,
|
|
1739
|
+
Z as AddressStateElement,
|
|
1740
1740
|
G as AddressStreetElement,
|
|
1741
1741
|
U as AddressZipCodeElement,
|
|
1742
1742
|
H as ApplePayElement,
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odus/checkout",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"displayName": "Odus Checkout SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"odus",
|
|
@@ -117,12 +117,9 @@
|
|
|
117
117
|
"^typecheck"
|
|
118
118
|
],
|
|
119
119
|
"options": {
|
|
120
|
-
"command": "tsc --build --emitDeclarationOnly",
|
|
120
|
+
"command": "tsc --build --emitDeclarationOnly --force",
|
|
121
121
|
"cwd": "libs/checkout"
|
|
122
122
|
}
|
|
123
|
-
},
|
|
124
|
-
"vite:typecheck": {
|
|
125
|
-
"executor": "nx:noop"
|
|
126
123
|
}
|
|
127
124
|
}
|
|
128
125
|
},
|
package/dist/phone.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as pe, y as Jt, e as P, f as pt, H as ve, h as be, l as Ce } from "./shared.js";
|
|
2
2
|
const Ne = (r, t, e) => {
|
|
3
3
|
let n = 0, d = e.length;
|
|
4
4
|
for (let i = 0; i < e.length; i++)
|
package/dist/shared.js
CHANGED
|
@@ -370,7 +370,7 @@ const ap = (r) => {
|
|
|
370
370
|
url: e,
|
|
371
371
|
app: {
|
|
372
372
|
name: "odus-checkout",
|
|
373
|
-
version: "1.
|
|
373
|
+
version: "1.2.0",
|
|
374
374
|
environment: r.environment === "test" ? "sandbox" : "production"
|
|
375
375
|
},
|
|
376
376
|
isolate: !0,
|
|
@@ -7352,51 +7352,51 @@ class Sp extends B {
|
|
|
7352
7352
|
}
|
|
7353
7353
|
}
|
|
7354
7354
|
export {
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7355
|
+
Sp as A,
|
|
7356
|
+
ap as B,
|
|
7357
|
+
gp as C,
|
|
7358
|
+
y0 as D,
|
|
7359
7359
|
yp as E,
|
|
7360
7360
|
fp as F,
|
|
7361
|
-
|
|
7361
|
+
lp as G,
|
|
7362
7362
|
ve as H,
|
|
7363
7363
|
Bt as I,
|
|
7364
|
-
|
|
7364
|
+
Wu as J,
|
|
7365
7365
|
H0 as K,
|
|
7366
7366
|
sv as L,
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7367
|
+
sp as M,
|
|
7368
|
+
de as N,
|
|
7369
|
+
op as O,
|
|
7370
7370
|
Ep as P,
|
|
7371
|
-
|
|
7372
|
-
|
|
7371
|
+
Ie as Q,
|
|
7372
|
+
_v as R,
|
|
7373
7373
|
Je as S,
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7374
|
+
Vv as T,
|
|
7375
|
+
Rt as V,
|
|
7376
|
+
bp as a,
|
|
7377
|
+
cp as b,
|
|
7378
|
+
ue as c,
|
|
7379
|
+
we as d,
|
|
7380
|
+
B as e,
|
|
7381
|
+
We as f,
|
|
7382
|
+
Qe as g,
|
|
7383
|
+
Oc as h,
|
|
7384
|
+
X as i,
|
|
7385
|
+
dp as j,
|
|
7386
|
+
Lh as k,
|
|
7387
|
+
He as l,
|
|
7388
|
+
Nc as m,
|
|
7389
|
+
up as n,
|
|
7390
|
+
mf as o,
|
|
7391
|
+
It as p,
|
|
7392
|
+
Of as q,
|
|
7393
|
+
Gf as r,
|
|
7394
|
+
hp as s,
|
|
7395
|
+
Cc as t,
|
|
7396
|
+
n0 as u,
|
|
7397
|
+
np as v,
|
|
7398
|
+
vp as w,
|
|
7399
|
+
pp as x,
|
|
7400
|
+
Zv as y,
|
|
7401
|
+
mp as z
|
|
7402
7402
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odus/checkout",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"displayName": "Odus Checkout SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"odus",
|
|
@@ -117,12 +117,9 @@
|
|
|
117
117
|
"^typecheck"
|
|
118
118
|
],
|
|
119
119
|
"options": {
|
|
120
|
-
"command": "tsc --build --emitDeclarationOnly",
|
|
120
|
+
"command": "tsc --build --emitDeclarationOnly --force",
|
|
121
121
|
"cwd": "libs/checkout"
|
|
122
122
|
}
|
|
123
|
-
},
|
|
124
|
-
"vite:typecheck": {
|
|
125
|
-
"executor": "nx:noop"
|
|
126
123
|
}
|
|
127
124
|
}
|
|
128
125
|
},
|