@ikas/storefront 0.0.130 → 0.0.131
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 +83 -83
- package/build/index.js +83 -83
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -10966,84 +10966,10 @@ var Apollo = /** @class */ (function () {
|
|
|
10966
10966
|
}());
|
|
10967
10967
|
var apollo = new Apollo();
|
|
10968
10968
|
|
|
10969
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
10970
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
10971
|
-
// generators (like Math.random()).
|
|
10972
|
-
var getRandomValues;
|
|
10973
|
-
var rnds8 = new Uint8Array(16);
|
|
10974
|
-
function rng() {
|
|
10975
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
10976
|
-
if (!getRandomValues) {
|
|
10977
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
10978
|
-
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
10979
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
10980
|
-
|
|
10981
|
-
if (!getRandomValues) {
|
|
10982
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
10983
|
-
}
|
|
10984
|
-
}
|
|
10985
|
-
|
|
10986
|
-
return getRandomValues(rnds8);
|
|
10987
|
-
}
|
|
10988
|
-
|
|
10989
|
-
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
10990
|
-
|
|
10991
|
-
function validate(uuid) {
|
|
10992
|
-
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
10993
|
-
}
|
|
10994
|
-
|
|
10995
|
-
/**
|
|
10996
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
10997
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
10998
|
-
*/
|
|
10999
|
-
|
|
11000
|
-
var byteToHex = [];
|
|
11001
|
-
|
|
11002
|
-
for (var i = 0; i < 256; ++i) {
|
|
11003
|
-
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
11004
|
-
}
|
|
11005
|
-
|
|
11006
|
-
function stringify(arr) {
|
|
11007
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
11008
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
11009
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
11010
|
-
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
11011
|
-
// of the following:
|
|
11012
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
11013
|
-
// "undefined" in the uuid)
|
|
11014
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
11015
|
-
|
|
11016
|
-
if (!validate(uuid)) {
|
|
11017
|
-
throw TypeError('Stringified UUID is invalid');
|
|
11018
|
-
}
|
|
11019
|
-
|
|
11020
|
-
return uuid;
|
|
11021
|
-
}
|
|
11022
|
-
|
|
11023
|
-
function v4(options, buf, offset) {
|
|
11024
|
-
options = options || {};
|
|
11025
|
-
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
11026
|
-
|
|
11027
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
11028
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
11029
|
-
|
|
11030
|
-
if (buf) {
|
|
11031
|
-
offset = offset || 0;
|
|
11032
|
-
|
|
11033
|
-
for (var i = 0; i < 16; ++i) {
|
|
11034
|
-
buf[offset + i] = rnds[i];
|
|
11035
|
-
}
|
|
11036
|
-
|
|
11037
|
-
return buf;
|
|
11038
|
-
}
|
|
11039
|
-
|
|
11040
|
-
return stringify(rnds);
|
|
11041
|
-
}
|
|
11042
|
-
|
|
11043
10969
|
var IkasBlog = /** @class */ (function () {
|
|
11044
10970
|
function IkasBlog(data) {
|
|
11045
10971
|
if (data === void 0) { data = {}; }
|
|
11046
|
-
this.id = data.id ||
|
|
10972
|
+
this.id = data.id || Date.now() + "";
|
|
11047
10973
|
this.createdAt = data.createdAt || Date.now() + "";
|
|
11048
10974
|
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11049
10975
|
this.categoryId = data.categoryId || null;
|
|
@@ -11068,7 +10994,7 @@ var IkasBlog = /** @class */ (function () {
|
|
|
11068
10994
|
var IkasBlogContent = /** @class */ (function () {
|
|
11069
10995
|
function IkasBlogContent(data) {
|
|
11070
10996
|
if (data === void 0) { data = {}; }
|
|
11071
|
-
this.id = data.id ||
|
|
10997
|
+
this.id = data.id || Date.now() + "";
|
|
11072
10998
|
this.createdAt = data.createdAt || Date.now() + "";
|
|
11073
10999
|
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11074
11000
|
this.content = data.content || "";
|
|
@@ -11095,7 +11021,7 @@ var IkasBlogMetaData = /** @class */ (function () {
|
|
|
11095
11021
|
if (data === void 0) { data = {}; }
|
|
11096
11022
|
this.pageTitle = null;
|
|
11097
11023
|
this.description = null;
|
|
11098
|
-
this.id = data.id ||
|
|
11024
|
+
this.id = data.id || Date.now() + "";
|
|
11099
11025
|
this.createdAt = data.createdAt || Date.now() + "";
|
|
11100
11026
|
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11101
11027
|
this.description = data.description || "";
|
|
@@ -13456,7 +13382,7 @@ var IkasBrand = /** @class */ (function () {
|
|
|
13456
13382
|
if (data === void 0) { data = {}; }
|
|
13457
13383
|
this.metaData = null;
|
|
13458
13384
|
this.image = null;
|
|
13459
|
-
this.id = data.id ||
|
|
13385
|
+
this.id = data.id || Date.now() + "";
|
|
13460
13386
|
this.name = data.name || "";
|
|
13461
13387
|
this.metaData = data.metaData
|
|
13462
13388
|
? new IkasHTMLMetaData(data.metaData)
|
|
@@ -13482,7 +13408,7 @@ var IkasCategory = /** @class */ (function () {
|
|
|
13482
13408
|
if (data === void 0) { data = {}; }
|
|
13483
13409
|
this.metaData = null;
|
|
13484
13410
|
this.image = null;
|
|
13485
|
-
this.id = data.id ||
|
|
13411
|
+
this.id = data.id || Date.now() + "";
|
|
13486
13412
|
this.name = data.name || "";
|
|
13487
13413
|
this.parentId = data.parentId || null;
|
|
13488
13414
|
this.metaData = data.metaData
|
|
@@ -20474,7 +20400,7 @@ var IkasProductAttributeValue = /** @class */ (function () {
|
|
|
20474
20400
|
var IkasProductVariant = /** @class */ (function () {
|
|
20475
20401
|
function IkasProductVariant(data) {
|
|
20476
20402
|
if (data === void 0) { data = {}; }
|
|
20477
|
-
this.id = data.id ||
|
|
20403
|
+
this.id = data.id || Date.now() + "";
|
|
20478
20404
|
this.sku = data.sku || null;
|
|
20479
20405
|
this.barcodeList = data.barcodeList || [];
|
|
20480
20406
|
this.variantValues = data.variantValues
|
|
@@ -20565,7 +20491,7 @@ var IkasProductTag = /** @class */ (function () {
|
|
|
20565
20491
|
var IkasProduct = /** @class */ (function () {
|
|
20566
20492
|
function IkasProduct(data) {
|
|
20567
20493
|
if (data === void 0) { data = {}; }
|
|
20568
|
-
this.id = data.id ||
|
|
20494
|
+
this.id = data.id || Date.now() + "";
|
|
20569
20495
|
this.name = data.name || "";
|
|
20570
20496
|
this.type = data.type || IkasProductType.PHYSICAL;
|
|
20571
20497
|
this.description = data.description || "";
|
|
@@ -21043,7 +20969,7 @@ var IkasTransactionTypeEnum;
|
|
|
21043
20969
|
|
|
21044
20970
|
var IkasThemeComponentProp = /** @class */ (function () {
|
|
21045
20971
|
function IkasThemeComponentProp(data) {
|
|
21046
|
-
this.id = data.id ||
|
|
20972
|
+
this.id = data.id || Date.now() + "";
|
|
21047
20973
|
this.name = data.name || "";
|
|
21048
20974
|
this.displayName = data.displayName || "";
|
|
21049
20975
|
this.type = data.type || IkasThemeComponentPropType.TEXT;
|
|
@@ -21157,7 +21083,7 @@ var IkasThemePageComponent = /** @class */ (function () {
|
|
|
21157
21083
|
|
|
21158
21084
|
var IkasThemePage = /** @class */ (function () {
|
|
21159
21085
|
function IkasThemePage(data) {
|
|
21160
|
-
this.id = data.id ||
|
|
21086
|
+
this.id = data.id || Date.now() + "";
|
|
21161
21087
|
this.name = data.name || null;
|
|
21162
21088
|
this.type = data.type || IkasThemePageType.INDEX;
|
|
21163
21089
|
this.slug = data.slug || null;
|
|
@@ -21207,6 +21133,80 @@ var IkasThemePageType;
|
|
|
21207
21133
|
IkasThemePageType["BLOG_CATEGORY"] = "BLOG_CATEGORY";
|
|
21208
21134
|
})(IkasThemePageType || (IkasThemePageType = {}));
|
|
21209
21135
|
|
|
21136
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
21137
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
21138
|
+
// generators (like Math.random()).
|
|
21139
|
+
var getRandomValues;
|
|
21140
|
+
var rnds8 = new Uint8Array(16);
|
|
21141
|
+
function rng() {
|
|
21142
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
21143
|
+
if (!getRandomValues) {
|
|
21144
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
21145
|
+
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
21146
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
21147
|
+
|
|
21148
|
+
if (!getRandomValues) {
|
|
21149
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
21150
|
+
}
|
|
21151
|
+
}
|
|
21152
|
+
|
|
21153
|
+
return getRandomValues(rnds8);
|
|
21154
|
+
}
|
|
21155
|
+
|
|
21156
|
+
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
21157
|
+
|
|
21158
|
+
function validate(uuid) {
|
|
21159
|
+
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
21160
|
+
}
|
|
21161
|
+
|
|
21162
|
+
/**
|
|
21163
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
21164
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
21165
|
+
*/
|
|
21166
|
+
|
|
21167
|
+
var byteToHex = [];
|
|
21168
|
+
|
|
21169
|
+
for (var i = 0; i < 256; ++i) {
|
|
21170
|
+
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
21171
|
+
}
|
|
21172
|
+
|
|
21173
|
+
function stringify(arr) {
|
|
21174
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
21175
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
21176
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
21177
|
+
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
21178
|
+
// of the following:
|
|
21179
|
+
// - One or more input array values don't map to a hex octet (leading to
|
|
21180
|
+
// "undefined" in the uuid)
|
|
21181
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
|
21182
|
+
|
|
21183
|
+
if (!validate(uuid)) {
|
|
21184
|
+
throw TypeError('Stringified UUID is invalid');
|
|
21185
|
+
}
|
|
21186
|
+
|
|
21187
|
+
return uuid;
|
|
21188
|
+
}
|
|
21189
|
+
|
|
21190
|
+
function v4(options, buf, offset) {
|
|
21191
|
+
options = options || {};
|
|
21192
|
+
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
21193
|
+
|
|
21194
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
21195
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
21196
|
+
|
|
21197
|
+
if (buf) {
|
|
21198
|
+
offset = offset || 0;
|
|
21199
|
+
|
|
21200
|
+
for (var i = 0; i < 16; ++i) {
|
|
21201
|
+
buf[offset + i] = rnds[i];
|
|
21202
|
+
}
|
|
21203
|
+
|
|
21204
|
+
return buf;
|
|
21205
|
+
}
|
|
21206
|
+
|
|
21207
|
+
return stringify(rnds);
|
|
21208
|
+
}
|
|
21209
|
+
|
|
21210
21210
|
var IkasThemeColor = /** @class */ (function () {
|
|
21211
21211
|
function IkasThemeColor(data) {
|
|
21212
21212
|
this.id = data.id || v4();
|
package/build/index.js
CHANGED
|
@@ -10981,84 +10981,10 @@ var Apollo = /** @class */ (function () {
|
|
|
10981
10981
|
}());
|
|
10982
10982
|
var apollo = new Apollo();
|
|
10983
10983
|
|
|
10984
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
10985
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
10986
|
-
// generators (like Math.random()).
|
|
10987
|
-
var getRandomValues;
|
|
10988
|
-
var rnds8 = new Uint8Array(16);
|
|
10989
|
-
function rng() {
|
|
10990
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
10991
|
-
if (!getRandomValues) {
|
|
10992
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
10993
|
-
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
10994
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
10995
|
-
|
|
10996
|
-
if (!getRandomValues) {
|
|
10997
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
10998
|
-
}
|
|
10999
|
-
}
|
|
11000
|
-
|
|
11001
|
-
return getRandomValues(rnds8);
|
|
11002
|
-
}
|
|
11003
|
-
|
|
11004
|
-
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
11005
|
-
|
|
11006
|
-
function validate(uuid) {
|
|
11007
|
-
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
11008
|
-
}
|
|
11009
|
-
|
|
11010
|
-
/**
|
|
11011
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
11012
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
11013
|
-
*/
|
|
11014
|
-
|
|
11015
|
-
var byteToHex = [];
|
|
11016
|
-
|
|
11017
|
-
for (var i = 0; i < 256; ++i) {
|
|
11018
|
-
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
11019
|
-
}
|
|
11020
|
-
|
|
11021
|
-
function stringify(arr) {
|
|
11022
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
11023
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
11024
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
11025
|
-
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
11026
|
-
// of the following:
|
|
11027
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
11028
|
-
// "undefined" in the uuid)
|
|
11029
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
11030
|
-
|
|
11031
|
-
if (!validate(uuid)) {
|
|
11032
|
-
throw TypeError('Stringified UUID is invalid');
|
|
11033
|
-
}
|
|
11034
|
-
|
|
11035
|
-
return uuid;
|
|
11036
|
-
}
|
|
11037
|
-
|
|
11038
|
-
function v4(options, buf, offset) {
|
|
11039
|
-
options = options || {};
|
|
11040
|
-
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
11041
|
-
|
|
11042
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
11043
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
11044
|
-
|
|
11045
|
-
if (buf) {
|
|
11046
|
-
offset = offset || 0;
|
|
11047
|
-
|
|
11048
|
-
for (var i = 0; i < 16; ++i) {
|
|
11049
|
-
buf[offset + i] = rnds[i];
|
|
11050
|
-
}
|
|
11051
|
-
|
|
11052
|
-
return buf;
|
|
11053
|
-
}
|
|
11054
|
-
|
|
11055
|
-
return stringify(rnds);
|
|
11056
|
-
}
|
|
11057
|
-
|
|
11058
10984
|
var IkasBlog = /** @class */ (function () {
|
|
11059
10985
|
function IkasBlog(data) {
|
|
11060
10986
|
if (data === void 0) { data = {}; }
|
|
11061
|
-
this.id = data.id ||
|
|
10987
|
+
this.id = data.id || Date.now() + "";
|
|
11062
10988
|
this.createdAt = data.createdAt || Date.now() + "";
|
|
11063
10989
|
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11064
10990
|
this.categoryId = data.categoryId || null;
|
|
@@ -11083,7 +11009,7 @@ var IkasBlog = /** @class */ (function () {
|
|
|
11083
11009
|
var IkasBlogContent = /** @class */ (function () {
|
|
11084
11010
|
function IkasBlogContent(data) {
|
|
11085
11011
|
if (data === void 0) { data = {}; }
|
|
11086
|
-
this.id = data.id ||
|
|
11012
|
+
this.id = data.id || Date.now() + "";
|
|
11087
11013
|
this.createdAt = data.createdAt || Date.now() + "";
|
|
11088
11014
|
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11089
11015
|
this.content = data.content || "";
|
|
@@ -11109,7 +11035,7 @@ var IkasBlogMetaData = /** @class */ (function () {
|
|
|
11109
11035
|
if (data === void 0) { data = {}; }
|
|
11110
11036
|
this.pageTitle = null;
|
|
11111
11037
|
this.description = null;
|
|
11112
|
-
this.id = data.id ||
|
|
11038
|
+
this.id = data.id || Date.now() + "";
|
|
11113
11039
|
this.createdAt = data.createdAt || Date.now() + "";
|
|
11114
11040
|
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11115
11041
|
this.description = data.description || "";
|
|
@@ -13469,7 +13395,7 @@ var IkasBrand = /** @class */ (function () {
|
|
|
13469
13395
|
if (data === void 0) { data = {}; }
|
|
13470
13396
|
this.metaData = null;
|
|
13471
13397
|
this.image = null;
|
|
13472
|
-
this.id = data.id ||
|
|
13398
|
+
this.id = data.id || Date.now() + "";
|
|
13473
13399
|
this.name = data.name || "";
|
|
13474
13400
|
this.metaData = data.metaData
|
|
13475
13401
|
? new IkasHTMLMetaData(data.metaData)
|
|
@@ -13495,7 +13421,7 @@ var IkasCategory = /** @class */ (function () {
|
|
|
13495
13421
|
if (data === void 0) { data = {}; }
|
|
13496
13422
|
this.metaData = null;
|
|
13497
13423
|
this.image = null;
|
|
13498
|
-
this.id = data.id ||
|
|
13424
|
+
this.id = data.id || Date.now() + "";
|
|
13499
13425
|
this.name = data.name || "";
|
|
13500
13426
|
this.parentId = data.parentId || null;
|
|
13501
13427
|
this.metaData = data.metaData
|
|
@@ -20471,7 +20397,7 @@ var IkasProductAttributeValue = /** @class */ (function () {
|
|
|
20471
20397
|
var IkasProductVariant = /** @class */ (function () {
|
|
20472
20398
|
function IkasProductVariant(data) {
|
|
20473
20399
|
if (data === void 0) { data = {}; }
|
|
20474
|
-
this.id = data.id ||
|
|
20400
|
+
this.id = data.id || Date.now() + "";
|
|
20475
20401
|
this.sku = data.sku || null;
|
|
20476
20402
|
this.barcodeList = data.barcodeList || [];
|
|
20477
20403
|
this.variantValues = data.variantValues
|
|
@@ -20561,7 +20487,7 @@ var IkasProductTag = /** @class */ (function () {
|
|
|
20561
20487
|
var IkasProduct = /** @class */ (function () {
|
|
20562
20488
|
function IkasProduct(data) {
|
|
20563
20489
|
if (data === void 0) { data = {}; }
|
|
20564
|
-
this.id = data.id ||
|
|
20490
|
+
this.id = data.id || Date.now() + "";
|
|
20565
20491
|
this.name = data.name || "";
|
|
20566
20492
|
this.type = data.type || exports.IkasProductType.PHYSICAL;
|
|
20567
20493
|
this.description = data.description || "";
|
|
@@ -21033,7 +20959,7 @@ var IkasTransactionCardTypeEnum;
|
|
|
21033
20959
|
|
|
21034
20960
|
var IkasThemeComponentProp = /** @class */ (function () {
|
|
21035
20961
|
function IkasThemeComponentProp(data) {
|
|
21036
|
-
this.id = data.id ||
|
|
20962
|
+
this.id = data.id || Date.now() + "";
|
|
21037
20963
|
this.name = data.name || "";
|
|
21038
20964
|
this.displayName = data.displayName || "";
|
|
21039
20965
|
this.type = data.type || exports.IkasThemeComponentPropType.TEXT;
|
|
@@ -21145,7 +21071,7 @@ var IkasThemePageComponent = /** @class */ (function () {
|
|
|
21145
21071
|
|
|
21146
21072
|
var IkasThemePage = /** @class */ (function () {
|
|
21147
21073
|
function IkasThemePage(data) {
|
|
21148
|
-
this.id = data.id ||
|
|
21074
|
+
this.id = data.id || Date.now() + "";
|
|
21149
21075
|
this.name = data.name || null;
|
|
21150
21076
|
this.type = data.type || exports.IkasThemePageType.INDEX;
|
|
21151
21077
|
this.slug = data.slug || null;
|
|
@@ -21194,6 +21120,80 @@ var IkasThemePageSpecification = /** @class */ (function () {
|
|
|
21194
21120
|
IkasThemePageType["BLOG_CATEGORY"] = "BLOG_CATEGORY";
|
|
21195
21121
|
})(exports.IkasThemePageType || (exports.IkasThemePageType = {}));
|
|
21196
21122
|
|
|
21123
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
21124
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
21125
|
+
// generators (like Math.random()).
|
|
21126
|
+
var getRandomValues;
|
|
21127
|
+
var rnds8 = new Uint8Array(16);
|
|
21128
|
+
function rng() {
|
|
21129
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
21130
|
+
if (!getRandomValues) {
|
|
21131
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
21132
|
+
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
21133
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
21134
|
+
|
|
21135
|
+
if (!getRandomValues) {
|
|
21136
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
21137
|
+
}
|
|
21138
|
+
}
|
|
21139
|
+
|
|
21140
|
+
return getRandomValues(rnds8);
|
|
21141
|
+
}
|
|
21142
|
+
|
|
21143
|
+
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
21144
|
+
|
|
21145
|
+
function validate(uuid) {
|
|
21146
|
+
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
21147
|
+
}
|
|
21148
|
+
|
|
21149
|
+
/**
|
|
21150
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
21151
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
21152
|
+
*/
|
|
21153
|
+
|
|
21154
|
+
var byteToHex = [];
|
|
21155
|
+
|
|
21156
|
+
for (var i = 0; i < 256; ++i) {
|
|
21157
|
+
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
21158
|
+
}
|
|
21159
|
+
|
|
21160
|
+
function stringify(arr) {
|
|
21161
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
21162
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
21163
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
21164
|
+
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
21165
|
+
// of the following:
|
|
21166
|
+
// - One or more input array values don't map to a hex octet (leading to
|
|
21167
|
+
// "undefined" in the uuid)
|
|
21168
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
|
21169
|
+
|
|
21170
|
+
if (!validate(uuid)) {
|
|
21171
|
+
throw TypeError('Stringified UUID is invalid');
|
|
21172
|
+
}
|
|
21173
|
+
|
|
21174
|
+
return uuid;
|
|
21175
|
+
}
|
|
21176
|
+
|
|
21177
|
+
function v4(options, buf, offset) {
|
|
21178
|
+
options = options || {};
|
|
21179
|
+
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
21180
|
+
|
|
21181
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
21182
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
21183
|
+
|
|
21184
|
+
if (buf) {
|
|
21185
|
+
offset = offset || 0;
|
|
21186
|
+
|
|
21187
|
+
for (var i = 0; i < 16; ++i) {
|
|
21188
|
+
buf[offset + i] = rnds[i];
|
|
21189
|
+
}
|
|
21190
|
+
|
|
21191
|
+
return buf;
|
|
21192
|
+
}
|
|
21193
|
+
|
|
21194
|
+
return stringify(rnds);
|
|
21195
|
+
}
|
|
21196
|
+
|
|
21197
21197
|
var IkasThemeColor = /** @class */ (function () {
|
|
21198
21198
|
function IkasThemeColor(data) {
|
|
21199
21199
|
this.id = data.id || v4();
|