@ikas/storefront 0.0.163-alpha.6 → 0.0.163-alpha.7
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 +23 -5
- package/build/index.js +23 -5
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -23258,12 +23258,30 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
23258
23258
|
}
|
|
23259
23259
|
// Check autocomplete
|
|
23260
23260
|
if (((_a = _this.cardData.expirationDate) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
23261
|
-
var
|
|
23262
|
-
if (
|
|
23263
|
-
|
|
23264
|
-
|
|
23265
|
-
|
|
23261
|
+
var splitValues = value.split("/");
|
|
23262
|
+
if (splitValues.length === 2) {
|
|
23263
|
+
var yearPart = splitValues[0].trim();
|
|
23264
|
+
var monthPart = splitValues[1].trim();
|
|
23265
|
+
// YYYY-MM format
|
|
23266
|
+
if (yearPart.length === 4 && monthPart.length === 2) {
|
|
23267
|
+
var year = parseInt(yearPart.slice(2));
|
|
23268
|
+
var month = parseInt(monthPart);
|
|
23269
|
+
if (!isNaN(year) && !isNaN(month)) {
|
|
23270
|
+
_this.cardData.expirationDate = month + " / " + year;
|
|
23271
|
+
return;
|
|
23272
|
+
}
|
|
23273
|
+
}
|
|
23266
23274
|
}
|
|
23275
|
+
// const autoCompleteValue = value.split("/").join("");
|
|
23276
|
+
// if (
|
|
23277
|
+
// autoCompleteValue.length === 4 &&
|
|
23278
|
+
// !isNaN(parseInt(autoCompleteValue))
|
|
23279
|
+
// ) {
|
|
23280
|
+
// this.cardData.expirationDate = chunkString(autoCompleteValue, 2).join(
|
|
23281
|
+
// " / "
|
|
23282
|
+
// );
|
|
23283
|
+
// return;
|
|
23284
|
+
// }
|
|
23267
23285
|
}
|
|
23268
23286
|
var originalValue = value.split(" / ").join("");
|
|
23269
23287
|
if (originalValue.length > 4)
|
package/build/index.js
CHANGED
|
@@ -23266,12 +23266,30 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
23266
23266
|
}
|
|
23267
23267
|
// Check autocomplete
|
|
23268
23268
|
if (((_a = _this.cardData.expirationDate) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
23269
|
-
var
|
|
23270
|
-
if (
|
|
23271
|
-
|
|
23272
|
-
|
|
23273
|
-
|
|
23269
|
+
var splitValues = value.split("/");
|
|
23270
|
+
if (splitValues.length === 2) {
|
|
23271
|
+
var yearPart = splitValues[0].trim();
|
|
23272
|
+
var monthPart = splitValues[1].trim();
|
|
23273
|
+
// YYYY-MM format
|
|
23274
|
+
if (yearPart.length === 4 && monthPart.length === 2) {
|
|
23275
|
+
var year = parseInt(yearPart.slice(2));
|
|
23276
|
+
var month = parseInt(monthPart);
|
|
23277
|
+
if (!isNaN(year) && !isNaN(month)) {
|
|
23278
|
+
_this.cardData.expirationDate = month + " / " + year;
|
|
23279
|
+
return;
|
|
23280
|
+
}
|
|
23281
|
+
}
|
|
23274
23282
|
}
|
|
23283
|
+
// const autoCompleteValue = value.split("/").join("");
|
|
23284
|
+
// if (
|
|
23285
|
+
// autoCompleteValue.length === 4 &&
|
|
23286
|
+
// !isNaN(parseInt(autoCompleteValue))
|
|
23287
|
+
// ) {
|
|
23288
|
+
// this.cardData.expirationDate = chunkString(autoCompleteValue, 2).join(
|
|
23289
|
+
// " / "
|
|
23290
|
+
// );
|
|
23291
|
+
// return;
|
|
23292
|
+
// }
|
|
23275
23293
|
}
|
|
23276
23294
|
var originalValue = value.split(" / ").join("");
|
|
23277
23295
|
if (originalValue.length > 4)
|