@ikas/storefront 0.0.163-alpha.11 → 0.0.163-alpha.13
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/build/index.es.js +7 -23
- package/build/index.js +7 -23
- package/build/store/customer.d.ts +0 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -23270,7 +23270,6 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
23270
23270
|
!isLastCharNumber(value)) {
|
|
23271
23271
|
return;
|
|
23272
23272
|
}
|
|
23273
|
-
console.log("expiry", value);
|
|
23274
23273
|
// Check autocomplete
|
|
23275
23274
|
if (((_a = _this.cardData.expirationDate) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
23276
23275
|
var splitValues = value.split("/");
|
|
@@ -23313,7 +23312,6 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
23313
23312
|
_this.cardData.expirationDate = chunkString(originalValue, 2).join(" / ");
|
|
23314
23313
|
};
|
|
23315
23314
|
this.onCvcChange = function (value) {
|
|
23316
|
-
console.log("CVC", value);
|
|
23317
23315
|
if (!_this.cardData)
|
|
23318
23316
|
return;
|
|
23319
23317
|
if (value.length > _this.cardData.cvv.length && !isLastCharNumber(value))
|
|
@@ -24509,7 +24507,6 @@ var uniqBy_1 = uniqBy;
|
|
|
24509
24507
|
var isServer$3 = typeof localStorage === "undefined";
|
|
24510
24508
|
var LS_TOKEN_KEY = "customerToken";
|
|
24511
24509
|
var LS_TOKEN_EXPIRY = "customerTokenExpiry";
|
|
24512
|
-
var LS_CUSTOMER_KEY = "customer";
|
|
24513
24510
|
var LS_CUSTOMER_SUB_KEY = "customerEmailSubscription";
|
|
24514
24511
|
var LS_LAST_VIEWED_PRODUCTS_KEY = "lastViewedProducts";
|
|
24515
24512
|
var LS_CUSTOMER_CONSENT = "customerConsent";
|
|
@@ -24846,7 +24843,6 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
24846
24843
|
switch (_a.label) {
|
|
24847
24844
|
case 0:
|
|
24848
24845
|
this.loadToken();
|
|
24849
|
-
this.loadCustomer();
|
|
24850
24846
|
this.loadLastViewedProducts();
|
|
24851
24847
|
this.loadCustomerConsent();
|
|
24852
24848
|
return [4 /*yield*/, this.refreshToken()];
|
|
@@ -24906,22 +24902,8 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
24906
24902
|
});
|
|
24907
24903
|
};
|
|
24908
24904
|
IkasCustomerStore.prototype.setCustomer = function (customer) {
|
|
24909
|
-
if (!isServer$3) {
|
|
24910
|
-
localStorage.setItem(LS_CUSTOMER_KEY, JSON.stringify(customer));
|
|
24911
|
-
}
|
|
24912
24905
|
this.customer = new IkasCustomer(customer);
|
|
24913
24906
|
};
|
|
24914
|
-
IkasCustomerStore.prototype.loadCustomer = function () {
|
|
24915
|
-
if (isServer$3)
|
|
24916
|
-
return;
|
|
24917
|
-
try {
|
|
24918
|
-
var customerStr = localStorage.getItem(LS_CUSTOMER_KEY);
|
|
24919
|
-
if (customerStr) {
|
|
24920
|
-
this.customer = new IkasCustomer(JSON.parse(customerStr));
|
|
24921
|
-
}
|
|
24922
|
-
}
|
|
24923
|
-
catch (err) { }
|
|
24924
|
-
};
|
|
24925
24907
|
IkasCustomerStore.prototype.getLastViewedProducts = function () {
|
|
24926
24908
|
return __awaiter(this, void 0, void 0, function () {
|
|
24927
24909
|
var _a;
|
|
@@ -25071,7 +25053,6 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
25071
25053
|
};
|
|
25072
25054
|
IkasCustomerStore.prototype.clearLocalData = function () {
|
|
25073
25055
|
this.clearLocalTokenData();
|
|
25074
|
-
localStorage.removeItem(LS_CUSTOMER_KEY);
|
|
25075
25056
|
this.customer = undefined;
|
|
25076
25057
|
};
|
|
25077
25058
|
return IkasCustomerStore;
|
|
@@ -37004,7 +36985,7 @@ var IkasStorefront = /** @class */ (function () {
|
|
|
37004
36985
|
return IkasStorefront;
|
|
37005
36986
|
}());
|
|
37006
36987
|
|
|
37007
|
-
var PACKAGE_VERSION = "0.0.163-alpha.
|
|
36988
|
+
var PACKAGE_VERSION = "0.0.163-alpha.13";
|
|
37008
36989
|
// import { version as PACKAGE_VERSION } from "../../../package.json";
|
|
37009
36990
|
var PageViewModel = /** @class */ (function () {
|
|
37010
36991
|
function PageViewModel(router) {
|
|
@@ -61244,6 +61225,8 @@ var Note = observer(function (_a) {
|
|
|
61244
61225
|
if (!vm.checkoutSettings.showCheckoutNote)
|
|
61245
61226
|
return null;
|
|
61246
61227
|
var isSuccessStep = vm.step === CheckoutStep.SUCCESS;
|
|
61228
|
+
if (isSuccessStep && !vm.checkout.note)
|
|
61229
|
+
return null;
|
|
61247
61230
|
return (createElement("div", { className: styles$h.InfoRow },
|
|
61248
61231
|
!isAddingNote && !isSuccessStep && (createElement("div", { className: styles$h.ActionTextBtn, onClick: onEditClick }, ctaText)),
|
|
61249
61232
|
(isAddingNote || isSuccessStep) && (createElement("div", { className: [
|
|
@@ -61359,9 +61342,10 @@ var StepSuccess = observer(function (_a) {
|
|
|
61359
61342
|
createElement("div", { className: styles$i.InfoTitle }, t("checkout-page:paymentMethod")),
|
|
61360
61343
|
paymentGateway && (createElement(Fragment$1, null,
|
|
61361
61344
|
createElement("div", { className: styles$i.InfoText }, paymentGateway.name),
|
|
61362
|
-
!!paymentGateway.description && (createElement("div", { className: styles$i.InfoText,
|
|
61363
|
-
|
|
61364
|
-
|
|
61345
|
+
!!paymentGateway.description && (createElement("div", { className: styles$i.InfoText },
|
|
61346
|
+
createElement("div", { dangerouslySetInnerHTML: {
|
|
61347
|
+
__html: paymentGateway.description,
|
|
61348
|
+
} }))))),
|
|
61365
61349
|
((_a = vm.successTransaction) === null || _a === void 0 ? void 0 : _a.paymentMethod) === "CREDIT_CARD" && (createElement(Fragment$1, null,
|
|
61366
61350
|
createElement("div", { className: styles$i.InfoText },
|
|
61367
61351
|
createElement("div", { className: styles$i.CardLogoContainer }, getCardLogo()),
|
package/build/index.js
CHANGED
|
@@ -23278,7 +23278,6 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
23278
23278
|
!isLastCharNumber(value)) {
|
|
23279
23279
|
return;
|
|
23280
23280
|
}
|
|
23281
|
-
console.log("expiry", value);
|
|
23282
23281
|
// Check autocomplete
|
|
23283
23282
|
if (((_a = _this.cardData.expirationDate) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
23284
23283
|
var splitValues = value.split("/");
|
|
@@ -23321,7 +23320,6 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
23321
23320
|
_this.cardData.expirationDate = chunkString(originalValue, 2).join(" / ");
|
|
23322
23321
|
};
|
|
23323
23322
|
this.onCvcChange = function (value) {
|
|
23324
|
-
console.log("CVC", value);
|
|
23325
23323
|
if (!_this.cardData)
|
|
23326
23324
|
return;
|
|
23327
23325
|
if (value.length > _this.cardData.cvv.length && !isLastCharNumber(value))
|
|
@@ -24517,7 +24515,6 @@ var uniqBy_1 = uniqBy;
|
|
|
24517
24515
|
var isServer$3 = typeof localStorage === "undefined";
|
|
24518
24516
|
var LS_TOKEN_KEY = "customerToken";
|
|
24519
24517
|
var LS_TOKEN_EXPIRY = "customerTokenExpiry";
|
|
24520
|
-
var LS_CUSTOMER_KEY = "customer";
|
|
24521
24518
|
var LS_CUSTOMER_SUB_KEY = "customerEmailSubscription";
|
|
24522
24519
|
var LS_LAST_VIEWED_PRODUCTS_KEY = "lastViewedProducts";
|
|
24523
24520
|
var LS_CUSTOMER_CONSENT = "customerConsent";
|
|
@@ -24854,7 +24851,6 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
24854
24851
|
switch (_a.label) {
|
|
24855
24852
|
case 0:
|
|
24856
24853
|
this.loadToken();
|
|
24857
|
-
this.loadCustomer();
|
|
24858
24854
|
this.loadLastViewedProducts();
|
|
24859
24855
|
this.loadCustomerConsent();
|
|
24860
24856
|
return [4 /*yield*/, this.refreshToken()];
|
|
@@ -24914,22 +24910,8 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
24914
24910
|
});
|
|
24915
24911
|
};
|
|
24916
24912
|
IkasCustomerStore.prototype.setCustomer = function (customer) {
|
|
24917
|
-
if (!isServer$3) {
|
|
24918
|
-
localStorage.setItem(LS_CUSTOMER_KEY, JSON.stringify(customer));
|
|
24919
|
-
}
|
|
24920
24913
|
this.customer = new IkasCustomer(customer);
|
|
24921
24914
|
};
|
|
24922
|
-
IkasCustomerStore.prototype.loadCustomer = function () {
|
|
24923
|
-
if (isServer$3)
|
|
24924
|
-
return;
|
|
24925
|
-
try {
|
|
24926
|
-
var customerStr = localStorage.getItem(LS_CUSTOMER_KEY);
|
|
24927
|
-
if (customerStr) {
|
|
24928
|
-
this.customer = new IkasCustomer(JSON.parse(customerStr));
|
|
24929
|
-
}
|
|
24930
|
-
}
|
|
24931
|
-
catch (err) { }
|
|
24932
|
-
};
|
|
24933
24915
|
IkasCustomerStore.prototype.getLastViewedProducts = function () {
|
|
24934
24916
|
return __awaiter(this, void 0, void 0, function () {
|
|
24935
24917
|
var _a;
|
|
@@ -25079,7 +25061,6 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
25079
25061
|
};
|
|
25080
25062
|
IkasCustomerStore.prototype.clearLocalData = function () {
|
|
25081
25063
|
this.clearLocalTokenData();
|
|
25082
|
-
localStorage.removeItem(LS_CUSTOMER_KEY);
|
|
25083
25064
|
this.customer = undefined;
|
|
25084
25065
|
};
|
|
25085
25066
|
return IkasCustomerStore;
|
|
@@ -36983,7 +36964,7 @@ var IkasStorefront = /** @class */ (function () {
|
|
|
36983
36964
|
return IkasStorefront;
|
|
36984
36965
|
}());
|
|
36985
36966
|
|
|
36986
|
-
var PACKAGE_VERSION = "0.0.163-alpha.
|
|
36967
|
+
var PACKAGE_VERSION = "0.0.163-alpha.13";
|
|
36987
36968
|
// import { version as PACKAGE_VERSION } from "../../../package.json";
|
|
36988
36969
|
var PageViewModel = /** @class */ (function () {
|
|
36989
36970
|
function PageViewModel(router) {
|
|
@@ -61223,6 +61204,8 @@ var Note = mobxReactLite.observer(function (_a) {
|
|
|
61223
61204
|
if (!vm.checkoutSettings.showCheckoutNote)
|
|
61224
61205
|
return null;
|
|
61225
61206
|
var isSuccessStep = vm.step === CheckoutStep.SUCCESS;
|
|
61207
|
+
if (isSuccessStep && !vm.checkout.note)
|
|
61208
|
+
return null;
|
|
61226
61209
|
return (React.createElement("div", { className: styles$h.InfoRow },
|
|
61227
61210
|
!isAddingNote && !isSuccessStep && (React.createElement("div", { className: styles$h.ActionTextBtn, onClick: onEditClick }, ctaText)),
|
|
61228
61211
|
(isAddingNote || isSuccessStep) && (React.createElement("div", { className: [
|
|
@@ -61338,9 +61321,10 @@ var StepSuccess = mobxReactLite.observer(function (_a) {
|
|
|
61338
61321
|
React.createElement("div", { className: styles$i.InfoTitle }, t("checkout-page:paymentMethod")),
|
|
61339
61322
|
paymentGateway && (React.createElement(React.Fragment, null,
|
|
61340
61323
|
React.createElement("div", { className: styles$i.InfoText }, paymentGateway.name),
|
|
61341
|
-
!!paymentGateway.description && (React.createElement("div", { className: styles$i.InfoText,
|
|
61342
|
-
|
|
61343
|
-
|
|
61324
|
+
!!paymentGateway.description && (React.createElement("div", { className: styles$i.InfoText },
|
|
61325
|
+
React.createElement("div", { dangerouslySetInnerHTML: {
|
|
61326
|
+
__html: paymentGateway.description,
|
|
61327
|
+
} }))))),
|
|
61344
61328
|
((_a = vm.successTransaction) === null || _a === void 0 ? void 0 : _a.paymentMethod) === "CREDIT_CARD" && (React.createElement(React.Fragment, null,
|
|
61345
61329
|
React.createElement("div", { className: styles$i.InfoText },
|
|
61346
61330
|
React.createElement("div", { className: styles$i.CardLogoContainer }, getCardLogo()),
|