@ikas/storefront 0.0.126 → 0.0.128
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/__generated__/global-types.d.ts +13 -0
- package/build/api/blog/__generated__/getBlog.d.ts +81 -0
- package/build/api/blog/__generated__/listBlog.d.ts +75 -0
- package/build/api/blog/__generated__/listBlogCategory.d.ts +38 -0
- package/build/api/blog/__generated__/listBlogMetaData.d.ts +29 -0
- package/build/api/blog/index.d.ts +32 -0
- package/build/api/brand/__generated__/listProductBrand.d.ts +1 -0
- package/build/api/brand/index.d.ts +1 -0
- package/build/api/category/__generated__/listCategory.d.ts +1 -0
- package/build/api/category/index.d.ts +1 -0
- package/build/api/index.d.ts +1 -0
- package/build/components/checkout/components/checkbox/index.d.ts +1 -0
- package/build/index.es.js +1585 -334
- package/build/index.js +1595 -333
- package/build/models/data/blog/index.d.ts +54 -0
- package/build/models/data/brand/index.d.ts +1 -1
- package/build/models/data/category/index.d.ts +1 -1
- package/build/models/data/index.d.ts +1 -0
- package/build/models/theme/component/prop/index.d.ts +3 -1
- package/build/models/theme/custom-data/index.d.ts +2 -0
- package/build/models/theme/index.d.ts +2 -0
- package/build/models/theme/page/component/prop-value/blog-list.d.ts +9 -0
- package/build/models/theme/page/component/prop-value/blog.d.ts +5 -0
- package/build/models/theme/page/index.d.ts +4 -1
- package/build/models/ui/blog-list/index.d.ts +55 -0
- package/build/models/ui/brand-list/index.d.ts +2 -0
- package/build/models/ui/category-list/index.d.ts +2 -0
- package/build/models/ui/index.d.ts +1 -0
- package/build/models/ui/product-detail/index.d.ts +1 -2
- package/build/models/ui/product-list/index.d.ts +5 -5
- package/build/pages/blog/[slug].d.ts +18 -0
- package/build/pages/blog/index.d.ts +13 -0
- package/build/store/customer.d.ts +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/providers/page-data.d.ts +7 -1
- package/build/utils/providers/placeholders.d.ts +5 -0
- package/build/utils/providers/prop-value/blog-list.d.ts +9 -0
- package/build/utils/providers/prop-value/blog.d.ts +8 -0
- package/build/utils/providers/prop-value/custom.d.ts +2 -0
- package/build/utils/providers/prop-value/product-list.d.ts +1 -3
- package/build/utils/settings.d.ts +2 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -7,8 +7,8 @@ var React = require('react');
|
|
|
7
7
|
var mobxReactLite = require('mobx-react-lite');
|
|
8
8
|
var Head = require('next/head');
|
|
9
9
|
var router = require('next/router');
|
|
10
|
-
var Image$1 = require('next/image');
|
|
11
10
|
var Link = require('next/link');
|
|
11
|
+
var NextImage = require('next/image');
|
|
12
12
|
var fs = require('fs');
|
|
13
13
|
var getConfig = require('next/config');
|
|
14
14
|
var dynamic = require('next/dynamic');
|
|
@@ -18,8 +18,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
18
18
|
|
|
19
19
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
20
|
var Head__default = /*#__PURE__*/_interopDefaultLegacy(Head);
|
|
21
|
-
var Image__default = /*#__PURE__*/_interopDefaultLegacy(Image$1);
|
|
22
21
|
var Link__default = /*#__PURE__*/_interopDefaultLegacy(Link);
|
|
22
|
+
var NextImage__default = /*#__PURE__*/_interopDefaultLegacy(NextImage);
|
|
23
23
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
24
24
|
var getConfig__default = /*#__PURE__*/_interopDefaultLegacy(getConfig);
|
|
25
25
|
var dynamic__default = /*#__PURE__*/_interopDefaultLegacy(dynamic);
|
|
@@ -10980,13 +10980,361 @@ var Apollo = /** @class */ (function () {
|
|
|
10980
10980
|
}());
|
|
10981
10981
|
var apollo = new Apollo();
|
|
10982
10982
|
|
|
10983
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
10984
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
10985
|
+
// generators (like Math.random()).
|
|
10986
|
+
var getRandomValues;
|
|
10987
|
+
var rnds8 = new Uint8Array(16);
|
|
10988
|
+
function rng() {
|
|
10989
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
10990
|
+
if (!getRandomValues) {
|
|
10991
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
10992
|
+
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
10993
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
10994
|
+
|
|
10995
|
+
if (!getRandomValues) {
|
|
10996
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
10997
|
+
}
|
|
10998
|
+
}
|
|
10999
|
+
|
|
11000
|
+
return getRandomValues(rnds8);
|
|
11001
|
+
}
|
|
11002
|
+
|
|
11003
|
+
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;
|
|
11004
|
+
|
|
11005
|
+
function validate(uuid) {
|
|
11006
|
+
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
11007
|
+
}
|
|
11008
|
+
|
|
11009
|
+
/**
|
|
11010
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
11011
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
11012
|
+
*/
|
|
11013
|
+
|
|
11014
|
+
var byteToHex = [];
|
|
11015
|
+
|
|
11016
|
+
for (var i = 0; i < 256; ++i) {
|
|
11017
|
+
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
11018
|
+
}
|
|
11019
|
+
|
|
11020
|
+
function stringify(arr) {
|
|
11021
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
11022
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
11023
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
11024
|
+
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
|
|
11025
|
+
// of the following:
|
|
11026
|
+
// - One or more input array values don't map to a hex octet (leading to
|
|
11027
|
+
// "undefined" in the uuid)
|
|
11028
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
|
11029
|
+
|
|
11030
|
+
if (!validate(uuid)) {
|
|
11031
|
+
throw TypeError('Stringified UUID is invalid');
|
|
11032
|
+
}
|
|
11033
|
+
|
|
11034
|
+
return uuid;
|
|
11035
|
+
}
|
|
11036
|
+
|
|
11037
|
+
function v4(options, buf, offset) {
|
|
11038
|
+
options = options || {};
|
|
11039
|
+
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
11040
|
+
|
|
11041
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
11042
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
11043
|
+
|
|
11044
|
+
if (buf) {
|
|
11045
|
+
offset = offset || 0;
|
|
11046
|
+
|
|
11047
|
+
for (var i = 0; i < 16; ++i) {
|
|
11048
|
+
buf[offset + i] = rnds[i];
|
|
11049
|
+
}
|
|
11050
|
+
|
|
11051
|
+
return buf;
|
|
11052
|
+
}
|
|
11053
|
+
|
|
11054
|
+
return stringify(rnds);
|
|
11055
|
+
}
|
|
11056
|
+
|
|
11057
|
+
var IkasBlog = /** @class */ (function () {
|
|
11058
|
+
function IkasBlog(data) {
|
|
11059
|
+
if (data === void 0) { data = {}; }
|
|
11060
|
+
this.id = data.id || v4();
|
|
11061
|
+
this.createdAt = data.createdAt || Date.now() + "";
|
|
11062
|
+
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11063
|
+
this.categoryId = data.categoryId || null;
|
|
11064
|
+
this.category = data.category ? new IkasBlogCategory(data.category) : null;
|
|
11065
|
+
this.imageId = data.imageId || null;
|
|
11066
|
+
this.title = data.title || null;
|
|
11067
|
+
this.shortDescription = data.shortDescription || null;
|
|
11068
|
+
this.isPublished = data.isPublished || false;
|
|
11069
|
+
this.storefrontId = data.storefrontId || "";
|
|
11070
|
+
this.tagIds = data.tagIds || [];
|
|
11071
|
+
this.writer = data.writer
|
|
11072
|
+
? new IkasBlogWriter(data.writer)
|
|
11073
|
+
: new IkasBlogWriter();
|
|
11074
|
+
this.blogContent = data.blogContent
|
|
11075
|
+
? new IkasBlogContent(data.blogContent)
|
|
11076
|
+
: new IkasBlogContent();
|
|
11077
|
+
this.metadata = data.metadata ? new IkasBlogMetaData(data.metadata) : null;
|
|
11078
|
+
mobx.makeAutoObservable(this);
|
|
11079
|
+
}
|
|
11080
|
+
return IkasBlog;
|
|
11081
|
+
}());
|
|
11082
|
+
var IkasBlogContent = /** @class */ (function () {
|
|
11083
|
+
function IkasBlogContent(data) {
|
|
11084
|
+
if (data === void 0) { data = {}; }
|
|
11085
|
+
this.id = data.id || v4();
|
|
11086
|
+
this.createdAt = data.createdAt || Date.now() + "";
|
|
11087
|
+
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11088
|
+
this.content = data.content || "";
|
|
11089
|
+
mobx.makeAutoObservable(this);
|
|
11090
|
+
}
|
|
11091
|
+
return IkasBlogContent;
|
|
11092
|
+
}());
|
|
11093
|
+
var IkasBlogWriter = /** @class */ (function () {
|
|
11094
|
+
function IkasBlogWriter(data) {
|
|
11095
|
+
if (data === void 0) { data = {}; }
|
|
11096
|
+
this.firstName = data.firstName || "";
|
|
11097
|
+
this.lastName = data.lastName || "";
|
|
11098
|
+
mobx.makeAutoObservable(this);
|
|
11099
|
+
}
|
|
11100
|
+
return IkasBlogWriter;
|
|
11101
|
+
}());
|
|
11102
|
+
(function (IkasBlogMetadataTargetType) {
|
|
11103
|
+
IkasBlogMetadataTargetType["BLOG"] = "BLOG";
|
|
11104
|
+
IkasBlogMetadataTargetType["BLOG_CATEGORY"] = "BLOG_CATEGORY";
|
|
11105
|
+
})(exports.IkasBlogMetadataTargetType || (exports.IkasBlogMetadataTargetType = {}));
|
|
11106
|
+
var IkasBlogMetaData = /** @class */ (function () {
|
|
11107
|
+
function IkasBlogMetaData(data) {
|
|
11108
|
+
if (data === void 0) { data = {}; }
|
|
11109
|
+
this.pageTitle = null;
|
|
11110
|
+
this.description = null;
|
|
11111
|
+
this.id = data.id || v4();
|
|
11112
|
+
this.createdAt = data.createdAt || Date.now() + "";
|
|
11113
|
+
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11114
|
+
this.description = data.description || "";
|
|
11115
|
+
this.pageTitle = data.pageTitle || "";
|
|
11116
|
+
this.slug = data.slug || "";
|
|
11117
|
+
this.targetId = data.targetId || "";
|
|
11118
|
+
this.targetType = data.targetType || exports.IkasBlogMetadataTargetType.BLOG;
|
|
11119
|
+
mobx.makeAutoObservable(this);
|
|
11120
|
+
}
|
|
11121
|
+
return IkasBlogMetaData;
|
|
11122
|
+
}());
|
|
11123
|
+
var IkasBlogCategory = /** @class */ (function () {
|
|
11124
|
+
function IkasBlogCategory(data) {
|
|
11125
|
+
if (data === void 0) { data = {}; }
|
|
11126
|
+
this.id = data.id || "";
|
|
11127
|
+
this.createdAt = data.createdAt || Date.now() + "";
|
|
11128
|
+
this.updatedAt = data.updatedAt || Date.now() + "";
|
|
11129
|
+
this.deleted = data.deleted || false;
|
|
11130
|
+
this.name = data.name || "";
|
|
11131
|
+
this.imageId = data.imageId || "";
|
|
11132
|
+
this.metadata = data.metadata ? new IkasBlogMetaData(data.metadata) : null;
|
|
11133
|
+
mobx.makeAutoObservable(this);
|
|
11134
|
+
}
|
|
11135
|
+
return IkasBlogCategory;
|
|
11136
|
+
}());
|
|
11137
|
+
|
|
11138
|
+
var IkasBlogAPI = /** @class */ (function () {
|
|
11139
|
+
function IkasBlogAPI() {
|
|
11140
|
+
}
|
|
11141
|
+
IkasBlogAPI.listBlog = function (params) {
|
|
11142
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11143
|
+
var QUERY, _a, data, errors, err_1;
|
|
11144
|
+
return __generator(this, function (_b) {
|
|
11145
|
+
switch (_b.label) {
|
|
11146
|
+
case 0:
|
|
11147
|
+
QUERY = src(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $title: StringFilterInput\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n title: $title\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $title: StringFilterInput\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n title: $title\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
11148
|
+
_b.label = 1;
|
|
11149
|
+
case 1:
|
|
11150
|
+
_b.trys.push([1, 3, , 4]);
|
|
11151
|
+
return [4 /*yield*/, apollo
|
|
11152
|
+
.getClient()
|
|
11153
|
+
.query({
|
|
11154
|
+
query: QUERY,
|
|
11155
|
+
variables: {
|
|
11156
|
+
id: params.idList ? { in: params.idList } : undefined,
|
|
11157
|
+
categoryId: params.categoryId
|
|
11158
|
+
? { eq: params.categoryId }
|
|
11159
|
+
: undefined,
|
|
11160
|
+
pagination: {
|
|
11161
|
+
page: params.page,
|
|
11162
|
+
limit: params.limit,
|
|
11163
|
+
},
|
|
11164
|
+
tagId: params.tagId ? { eq: params.tagId } : undefined,
|
|
11165
|
+
title: params.title ? { like: params.title } : undefined,
|
|
11166
|
+
storefrontId: { eq: IkasStorefrontConfig.storefrontId },
|
|
11167
|
+
},
|
|
11168
|
+
})];
|
|
11169
|
+
case 2:
|
|
11170
|
+
_a = _b.sent(), data = _a.data, errors = _a.errors;
|
|
11171
|
+
if (errors && errors.length) {
|
|
11172
|
+
return [2 /*return*/, {
|
|
11173
|
+
blogs: [],
|
|
11174
|
+
count: 0,
|
|
11175
|
+
}];
|
|
11176
|
+
}
|
|
11177
|
+
return [2 /*return*/, {
|
|
11178
|
+
blogs: data.listBlog.data.map(function (b) { return new IkasBlog(b); }),
|
|
11179
|
+
count: data.listBlog.count,
|
|
11180
|
+
}];
|
|
11181
|
+
case 3:
|
|
11182
|
+
err_1 = _b.sent();
|
|
11183
|
+
console.log(err_1);
|
|
11184
|
+
return [2 /*return*/, {
|
|
11185
|
+
blogs: [],
|
|
11186
|
+
count: 0,
|
|
11187
|
+
}];
|
|
11188
|
+
case 4: return [2 /*return*/];
|
|
11189
|
+
}
|
|
11190
|
+
});
|
|
11191
|
+
});
|
|
11192
|
+
};
|
|
11193
|
+
IkasBlogAPI.getBlog = function (params) {
|
|
11194
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11195
|
+
var QUERY, _a, data, errors, blogs, err_2;
|
|
11196
|
+
return __generator(this, function (_b) {
|
|
11197
|
+
switch (_b.label) {
|
|
11198
|
+
case 0:
|
|
11199
|
+
QUERY = src(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
11200
|
+
_b.label = 1;
|
|
11201
|
+
case 1:
|
|
11202
|
+
_b.trys.push([1, 3, , 4]);
|
|
11203
|
+
return [4 /*yield*/, apollo
|
|
11204
|
+
.getClient()
|
|
11205
|
+
.query({
|
|
11206
|
+
query: QUERY,
|
|
11207
|
+
variables: {
|
|
11208
|
+
id: params.id ? { eq: params.id } : undefined,
|
|
11209
|
+
pagination: {
|
|
11210
|
+
page: 1,
|
|
11211
|
+
limit: 1,
|
|
11212
|
+
},
|
|
11213
|
+
storefrontId: { eq: IkasStorefrontConfig.storefrontId },
|
|
11214
|
+
},
|
|
11215
|
+
})];
|
|
11216
|
+
case 2:
|
|
11217
|
+
_a = _b.sent(), data = _a.data, errors = _a.errors;
|
|
11218
|
+
if (errors && errors.length) {
|
|
11219
|
+
return [2 /*return*/];
|
|
11220
|
+
}
|
|
11221
|
+
blogs = data.listBlog.data.map(function (b) { return new IkasBlog(b); });
|
|
11222
|
+
if (blogs.length)
|
|
11223
|
+
return [2 /*return*/, blogs[0]];
|
|
11224
|
+
return [3 /*break*/, 4];
|
|
11225
|
+
case 3:
|
|
11226
|
+
err_2 = _b.sent();
|
|
11227
|
+
console.log(err_2);
|
|
11228
|
+
return [3 /*break*/, 4];
|
|
11229
|
+
case 4: return [2 /*return*/];
|
|
11230
|
+
}
|
|
11231
|
+
});
|
|
11232
|
+
});
|
|
11233
|
+
};
|
|
11234
|
+
IkasBlogAPI.listBlogMetaData = function (slug, targetId, targetType) {
|
|
11235
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11236
|
+
var LIST_QUERY, _a, data, errors, err_3;
|
|
11237
|
+
return __generator(this, function (_b) {
|
|
11238
|
+
switch (_b.label) {
|
|
11239
|
+
case 0:
|
|
11240
|
+
LIST_QUERY = src(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
11241
|
+
_b.label = 1;
|
|
11242
|
+
case 1:
|
|
11243
|
+
_b.trys.push([1, 3, , 4]);
|
|
11244
|
+
return [4 /*yield*/, apollo
|
|
11245
|
+
.getClient()
|
|
11246
|
+
.query({
|
|
11247
|
+
query: LIST_QUERY,
|
|
11248
|
+
variables: {
|
|
11249
|
+
slug: slug
|
|
11250
|
+
? {
|
|
11251
|
+
eq: slug,
|
|
11252
|
+
}
|
|
11253
|
+
: undefined,
|
|
11254
|
+
targetId: targetId
|
|
11255
|
+
? {
|
|
11256
|
+
eq: targetId,
|
|
11257
|
+
}
|
|
11258
|
+
: undefined,
|
|
11259
|
+
targetType: targetType
|
|
11260
|
+
? {
|
|
11261
|
+
in: targetType,
|
|
11262
|
+
}
|
|
11263
|
+
: undefined,
|
|
11264
|
+
},
|
|
11265
|
+
})];
|
|
11266
|
+
case 2:
|
|
11267
|
+
_a = _b.sent(), data = _a.data, errors = _a.errors;
|
|
11268
|
+
if (errors && errors.length) {
|
|
11269
|
+
return [2 /*return*/, []];
|
|
11270
|
+
}
|
|
11271
|
+
return [2 /*return*/, data.listBlogMetadata.data.map(function (d) { return new IkasBlogMetaData(d); })];
|
|
11272
|
+
case 3:
|
|
11273
|
+
err_3 = _b.sent();
|
|
11274
|
+
console.log(err_3);
|
|
11275
|
+
return [2 /*return*/, []];
|
|
11276
|
+
case 4: return [2 /*return*/];
|
|
11277
|
+
}
|
|
11278
|
+
});
|
|
11279
|
+
});
|
|
11280
|
+
};
|
|
11281
|
+
IkasBlogAPI.listBlogCategory = function (params) {
|
|
11282
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11283
|
+
var QUERY, _a, data, errors;
|
|
11284
|
+
return __generator(this, function (_b) {
|
|
11285
|
+
switch (_b.label) {
|
|
11286
|
+
case 0:
|
|
11287
|
+
QUERY = src(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n query listBlogCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n ) {\n listBlogCategory(id: $id, pagination: $pagination) {\n count\n data {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query listBlogCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n ) {\n listBlogCategory(id: $id, pagination: $pagination) {\n count\n data {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
11288
|
+
_b.label = 1;
|
|
11289
|
+
case 1:
|
|
11290
|
+
_b.trys.push([1, 3, , 4]);
|
|
11291
|
+
return [4 /*yield*/, apollo
|
|
11292
|
+
.getClient()
|
|
11293
|
+
.query({
|
|
11294
|
+
query: QUERY,
|
|
11295
|
+
variables: {
|
|
11296
|
+
id: params.idList ? { in: params.idList } : undefined,
|
|
11297
|
+
pagination: {
|
|
11298
|
+
page: params.page,
|
|
11299
|
+
limit: params.limit,
|
|
11300
|
+
},
|
|
11301
|
+
},
|
|
11302
|
+
})];
|
|
11303
|
+
case 2:
|
|
11304
|
+
_a = _b.sent(), data = _a.data, errors = _a.errors;
|
|
11305
|
+
if (errors && errors.length) {
|
|
11306
|
+
return [2 /*return*/, {
|
|
11307
|
+
blogCategories: [],
|
|
11308
|
+
count: 0,
|
|
11309
|
+
hasNext: false,
|
|
11310
|
+
}];
|
|
11311
|
+
}
|
|
11312
|
+
return [2 /*return*/, {
|
|
11313
|
+
blogCategories: data.listBlogCategory.data.map(function (b) { return new IkasBlogCategory(b); }),
|
|
11314
|
+
count: data.listBlogCategory.count,
|
|
11315
|
+
hasNext: data.listBlogCategory.hasNext,
|
|
11316
|
+
}];
|
|
11317
|
+
case 3:
|
|
11318
|
+
_b.sent();
|
|
11319
|
+
return [2 /*return*/, {
|
|
11320
|
+
blogCategories: [],
|
|
11321
|
+
count: 0,
|
|
11322
|
+
hasNext: false,
|
|
11323
|
+
}];
|
|
11324
|
+
case 4: return [2 /*return*/];
|
|
11325
|
+
}
|
|
11326
|
+
});
|
|
11327
|
+
});
|
|
11328
|
+
};
|
|
11329
|
+
return IkasBlogAPI;
|
|
11330
|
+
}());
|
|
11331
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
11332
|
+
|
|
10983
11333
|
var IkasProductListPropValueProvider = /** @class */ (function () {
|
|
10984
|
-
function IkasProductListPropValueProvider(pageType, productListPropValue,
|
|
11334
|
+
function IkasProductListPropValueProvider(pageType, productListPropValue, pageSpecificData) {
|
|
10985
11335
|
this.pageType = pageType;
|
|
10986
11336
|
this.productListPropValue = productListPropValue;
|
|
10987
|
-
this.pageParams = pageParams;
|
|
10988
11337
|
this.pageSpecificData = pageSpecificData;
|
|
10989
|
-
this.skipInitialFetch = skipInitialFetch;
|
|
10990
11338
|
}
|
|
10991
11339
|
IkasProductListPropValueProvider.prototype.getValue = function () {
|
|
10992
11340
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -10995,7 +11343,6 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
|
|
|
10995
11343
|
switch (_a.label) {
|
|
10996
11344
|
case 0:
|
|
10997
11345
|
if (this.productListPropValue.productListType === exports.IkasProductListType.ALL) {
|
|
10998
|
-
// TODO use pageParams to insert filters
|
|
10999
11346
|
if (this.productListPropValue.usePageFilter) {
|
|
11000
11347
|
if (this.pageType === exports.IkasThemePageType.CATEGORY) {
|
|
11001
11348
|
category = this.pageSpecificData;
|
|
@@ -11018,12 +11365,12 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
|
|
|
11018
11365
|
filterCategoryId: filterCategoryId,
|
|
11019
11366
|
pageType: this.pageType,
|
|
11020
11367
|
});
|
|
11021
|
-
|
|
11368
|
+
//@ts-ignore
|
|
11022
11369
|
return [4 /*yield*/, productList.getInitial()];
|
|
11023
11370
|
case 1:
|
|
11371
|
+
//@ts-ignore
|
|
11024
11372
|
_a.sent();
|
|
11025
|
-
|
|
11026
|
-
case 2: return [2 /*return*/, productList];
|
|
11373
|
+
return [2 /*return*/, productList];
|
|
11027
11374
|
}
|
|
11028
11375
|
});
|
|
11029
11376
|
});
|
|
@@ -11031,6 +11378,21 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
|
|
|
11031
11378
|
return IkasProductListPropValueProvider;
|
|
11032
11379
|
}());
|
|
11033
11380
|
|
|
11381
|
+
function getPlaceholderProduct() {
|
|
11382
|
+
return new IkasProductDetail(new IkasProduct({
|
|
11383
|
+
variants: [new IkasProductVariant()],
|
|
11384
|
+
}), []);
|
|
11385
|
+
}
|
|
11386
|
+
function getPlaceholderCategory() {
|
|
11387
|
+
return new IkasCategory();
|
|
11388
|
+
}
|
|
11389
|
+
function getPlaceholderBrand() {
|
|
11390
|
+
return new IkasBrand();
|
|
11391
|
+
}
|
|
11392
|
+
function getPlaceholderBlog() {
|
|
11393
|
+
return new IkasBlog();
|
|
11394
|
+
}
|
|
11395
|
+
|
|
11034
11396
|
var IkasProductDetailPropValueProvider = /** @class */ (function () {
|
|
11035
11397
|
function IkasProductDetailPropValueProvider(prop, pageSpecificData) {
|
|
11036
11398
|
this.productDetailPropValue = prop;
|
|
@@ -11045,7 +11407,7 @@ var IkasProductDetailPropValueProvider = /** @class */ (function () {
|
|
|
11045
11407
|
switch (_b.label) {
|
|
11046
11408
|
case 0:
|
|
11047
11409
|
if ((_a = this.productDetailPropValue) === null || _a === void 0 ? void 0 : _a.usePageData) {
|
|
11048
|
-
return [2 /*return*/, this.pageSpecificData];
|
|
11410
|
+
return [2 /*return*/, this.pageSpecificData || getPlaceholderProduct()];
|
|
11049
11411
|
}
|
|
11050
11412
|
if (!this.productDetailPropValue.productId)
|
|
11051
11413
|
return [2 /*return*/, null];
|
|
@@ -11071,6 +11433,9 @@ var IkasProductDetailPropValueProvider = /** @class */ (function () {
|
|
|
11071
11433
|
return [2 /*return*/, new IkasProductDetail(product, product.variants[0].variantValues)];
|
|
11072
11434
|
}
|
|
11073
11435
|
}
|
|
11436
|
+
else {
|
|
11437
|
+
return [2 /*return*/, getPlaceholderProduct()];
|
|
11438
|
+
}
|
|
11074
11439
|
}
|
|
11075
11440
|
return [2 /*return*/, null];
|
|
11076
11441
|
}
|
|
@@ -11111,7 +11476,7 @@ var IkasBrandPropValueProvider = /** @class */ (function () {
|
|
|
11111
11476
|
}
|
|
11112
11477
|
IkasBrandPropValueProvider.prototype.getValue = function () {
|
|
11113
11478
|
return __awaiter(this, void 0, void 0, function () {
|
|
11114
|
-
var response,
|
|
11479
|
+
var response, err_1;
|
|
11115
11480
|
return __generator(this, function (_a) {
|
|
11116
11481
|
switch (_a.label) {
|
|
11117
11482
|
case 0:
|
|
@@ -11128,8 +11493,10 @@ var IkasBrandPropValueProvider = /** @class */ (function () {
|
|
|
11128
11493
|
})];
|
|
11129
11494
|
case 2:
|
|
11130
11495
|
response = _a.sent();
|
|
11131
|
-
|
|
11132
|
-
|
|
11496
|
+
if (response.brands.length)
|
|
11497
|
+
return [2 /*return*/, response.brands[0]];
|
|
11498
|
+
else
|
|
11499
|
+
return [2 /*return*/, getPlaceholderBrand()];
|
|
11133
11500
|
case 3:
|
|
11134
11501
|
err_1 = _a.sent();
|
|
11135
11502
|
console.log(err_1);
|
|
@@ -11415,6 +11782,80 @@ var IkasRichTextPropValueProvider = /** @class */ (function () {
|
|
|
11415
11782
|
return IkasRichTextPropValueProvider;
|
|
11416
11783
|
}());
|
|
11417
11784
|
|
|
11785
|
+
var IkasBlogPropValueProvider = /** @class */ (function () {
|
|
11786
|
+
function IkasBlogPropValueProvider(propValue, pageSpecificData) {
|
|
11787
|
+
this.blogPropValue = propValue;
|
|
11788
|
+
this.pageSpecificData = pageSpecificData;
|
|
11789
|
+
}
|
|
11790
|
+
IkasBlogPropValueProvider.prototype.getValue = function () {
|
|
11791
|
+
var _a;
|
|
11792
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11793
|
+
var blog;
|
|
11794
|
+
return __generator(this, function (_b) {
|
|
11795
|
+
switch (_b.label) {
|
|
11796
|
+
case 0:
|
|
11797
|
+
if ((_a = this.blogPropValue) === null || _a === void 0 ? void 0 : _a.usePageData) {
|
|
11798
|
+
return [2 /*return*/, this.pageSpecificData || getPlaceholderBlog()];
|
|
11799
|
+
}
|
|
11800
|
+
if (!this.blogPropValue.blogId)
|
|
11801
|
+
return [2 /*return*/, null];
|
|
11802
|
+
return [4 /*yield*/, IkasBlogAPI.getBlog({
|
|
11803
|
+
id: this.blogPropValue.blogId,
|
|
11804
|
+
})];
|
|
11805
|
+
case 1:
|
|
11806
|
+
blog = _b.sent();
|
|
11807
|
+
if (blog)
|
|
11808
|
+
return [2 /*return*/, blog];
|
|
11809
|
+
else
|
|
11810
|
+
return [2 /*return*/, getPlaceholderBlog()];
|
|
11811
|
+
}
|
|
11812
|
+
});
|
|
11813
|
+
});
|
|
11814
|
+
};
|
|
11815
|
+
return IkasBlogPropValueProvider;
|
|
11816
|
+
}());
|
|
11817
|
+
|
|
11818
|
+
var IkasBlogListPropValueProvider = /** @class */ (function () {
|
|
11819
|
+
function IkasBlogListPropValueProvider(pageType, brandListPropValue, pageSpecificData) {
|
|
11820
|
+
this.pageType = pageType;
|
|
11821
|
+
this.blogListPropValue = brandListPropValue;
|
|
11822
|
+
this.pageSpecificData = pageSpecificData;
|
|
11823
|
+
}
|
|
11824
|
+
IkasBlogListPropValueProvider.prototype.getValue = function () {
|
|
11825
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11826
|
+
var filterCategoryId, blogCategory, blogList;
|
|
11827
|
+
return __generator(this, function (_a) {
|
|
11828
|
+
switch (_a.label) {
|
|
11829
|
+
case 0:
|
|
11830
|
+
filterCategoryId = null;
|
|
11831
|
+
if (this.blogListPropValue.blogListType === exports.IkasBlogListType.ALL &&
|
|
11832
|
+
this.blogListPropValue.usePageFilter &&
|
|
11833
|
+
this.pageType === exports.IkasThemePageType.BLOG_CATEGORY &&
|
|
11834
|
+
this.pageSpecificData) {
|
|
11835
|
+
blogCategory = this.pageSpecificData;
|
|
11836
|
+
filterCategoryId = blogCategory.id;
|
|
11837
|
+
}
|
|
11838
|
+
if (this.blogListPropValue.blogListType === exports.IkasBlogListType.CATEGORY &&
|
|
11839
|
+
this.blogListPropValue.categoryId) {
|
|
11840
|
+
filterCategoryId = this.blogListPropValue.categoryId;
|
|
11841
|
+
}
|
|
11842
|
+
blogList = new IkasBlogList({
|
|
11843
|
+
blogListPropValue: this.blogListPropValue,
|
|
11844
|
+
filterCategoryId: filterCategoryId,
|
|
11845
|
+
});
|
|
11846
|
+
//@ts-ignore
|
|
11847
|
+
return [4 /*yield*/, blogList.getInitial()];
|
|
11848
|
+
case 1:
|
|
11849
|
+
//@ts-ignore
|
|
11850
|
+
_a.sent();
|
|
11851
|
+
return [2 /*return*/, blogList];
|
|
11852
|
+
}
|
|
11853
|
+
});
|
|
11854
|
+
});
|
|
11855
|
+
};
|
|
11856
|
+
return IkasBlogListPropValueProvider;
|
|
11857
|
+
}());
|
|
11858
|
+
|
|
11418
11859
|
var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
11419
11860
|
function IkasCustomPropValueProvider(value, customData, theme, pageType, pageDataProvider, pageSpecificData, pageParams) {
|
|
11420
11861
|
this.value = value;
|
|
@@ -11435,7 +11876,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11435
11876
|
return [2 /*return*/];
|
|
11436
11877
|
_b.label = 1;
|
|
11437
11878
|
case 1:
|
|
11438
|
-
_b.trys.push([1,
|
|
11879
|
+
_b.trys.push([1, 40, , 41]);
|
|
11439
11880
|
_a = this.customData.type;
|
|
11440
11881
|
switch (_a) {
|
|
11441
11882
|
case exports.IkasThemeCustomDataType.TEXT: return [3 /*break*/, 2];
|
|
@@ -11457,78 +11898,88 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11457
11898
|
case exports.IkasThemeCustomDataType.STATIC_LIST: return [3 /*break*/, 30];
|
|
11458
11899
|
case exports.IkasThemeCustomDataType.COMPONENT: return [3 /*break*/, 32];
|
|
11459
11900
|
case exports.IkasThemeCustomDataType.COMPONENT_LIST: return [3 /*break*/, 32];
|
|
11901
|
+
case exports.IkasThemeCustomDataType.BLOG: return [3 /*break*/, 34];
|
|
11902
|
+
case exports.IkasThemeCustomDataType.BLOG_LIST: return [3 /*break*/, 36];
|
|
11460
11903
|
}
|
|
11461
|
-
return [3 /*break*/,
|
|
11904
|
+
return [3 /*break*/, 38];
|
|
11462
11905
|
case 2: return [4 /*yield*/, this.getTextValue()];
|
|
11463
11906
|
case 3:
|
|
11464
11907
|
customDataValue = _b.sent();
|
|
11465
|
-
return [3 /*break*/,
|
|
11908
|
+
return [3 /*break*/, 39];
|
|
11466
11909
|
case 4: return [4 /*yield*/, this.getRichTextPropValue()];
|
|
11467
11910
|
case 5:
|
|
11468
11911
|
customDataValue = _b.sent();
|
|
11469
|
-
return [3 /*break*/,
|
|
11912
|
+
return [3 /*break*/, 39];
|
|
11470
11913
|
case 6: return [4 /*yield*/, this.getBooleanValue()];
|
|
11471
11914
|
case 7:
|
|
11472
11915
|
customDataValue = _b.sent();
|
|
11473
|
-
return [3 /*break*/,
|
|
11916
|
+
return [3 /*break*/, 39];
|
|
11474
11917
|
case 8: return [4 /*yield*/, this.getBrandListPropValue()];
|
|
11475
11918
|
case 9:
|
|
11476
11919
|
customDataValue = _b.sent();
|
|
11477
|
-
return [3 /*break*/,
|
|
11920
|
+
return [3 /*break*/, 39];
|
|
11478
11921
|
case 10: return [4 /*yield*/, this.getBrandPropValue()];
|
|
11479
11922
|
case 11:
|
|
11480
11923
|
customDataValue = _b.sent();
|
|
11481
|
-
return [3 /*break*/,
|
|
11924
|
+
return [3 /*break*/, 39];
|
|
11482
11925
|
case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
|
|
11483
11926
|
case 13:
|
|
11484
11927
|
customDataValue = _b.sent();
|
|
11485
|
-
return [3 /*break*/,
|
|
11928
|
+
return [3 /*break*/, 39];
|
|
11486
11929
|
case 14: return [4 /*yield*/, this.getCategoryPropValue()];
|
|
11487
11930
|
case 15:
|
|
11488
11931
|
customDataValue = _b.sent();
|
|
11489
|
-
return [3 /*break*/,
|
|
11932
|
+
return [3 /*break*/, 39];
|
|
11490
11933
|
case 16: return [4 /*yield*/, this.getColorPropValue()];
|
|
11491
11934
|
case 17:
|
|
11492
11935
|
customDataValue = _b.sent();
|
|
11493
|
-
return [3 /*break*/,
|
|
11936
|
+
return [3 /*break*/, 39];
|
|
11494
11937
|
case 18: return [4 /*yield*/, this.getImageListPropValue()];
|
|
11495
11938
|
case 19:
|
|
11496
11939
|
customDataValue = _b.sent();
|
|
11497
|
-
return [3 /*break*/,
|
|
11940
|
+
return [3 /*break*/, 39];
|
|
11498
11941
|
case 20: return [4 /*yield*/, this.getImagePropValue()];
|
|
11499
11942
|
case 21:
|
|
11500
11943
|
customDataValue = _b.sent();
|
|
11501
|
-
return [3 /*break*/,
|
|
11944
|
+
return [3 /*break*/, 39];
|
|
11502
11945
|
case 22: return [4 /*yield*/, this.getLinkPropValue()];
|
|
11503
11946
|
case 23:
|
|
11504
11947
|
customDataValue = _b.sent();
|
|
11505
|
-
return [3 /*break*/,
|
|
11948
|
+
return [3 /*break*/, 39];
|
|
11506
11949
|
case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
|
|
11507
11950
|
case 25:
|
|
11508
11951
|
customDataValue = _b.sent();
|
|
11509
|
-
return [3 /*break*/,
|
|
11952
|
+
return [3 /*break*/, 39];
|
|
11510
11953
|
case 26: return [4 /*yield*/, this.getProductListPropValue()];
|
|
11511
11954
|
case 27:
|
|
11512
11955
|
customDataValue = _b.sent();
|
|
11513
|
-
return [3 /*break*/,
|
|
11956
|
+
return [3 /*break*/, 39];
|
|
11514
11957
|
case 28: return [4 /*yield*/, this.getObjectValue()];
|
|
11515
11958
|
case 29:
|
|
11516
11959
|
customDataValue = _b.sent();
|
|
11517
|
-
return [3 /*break*/,
|
|
11960
|
+
return [3 /*break*/, 39];
|
|
11518
11961
|
case 30: return [4 /*yield*/, this.getArrayValue()];
|
|
11519
11962
|
case 31:
|
|
11520
11963
|
customDataValue = _b.sent();
|
|
11521
|
-
return [3 /*break*/,
|
|
11964
|
+
return [3 /*break*/, 39];
|
|
11522
11965
|
case 32: return [4 /*yield*/, this.getComponentListValue()];
|
|
11523
11966
|
case 33:
|
|
11524
11967
|
customDataValue = _b.sent();
|
|
11525
|
-
return [3 /*break*/,
|
|
11526
|
-
case 34: return [
|
|
11527
|
-
case 35:
|
|
11528
|
-
|
|
11968
|
+
return [3 /*break*/, 39];
|
|
11969
|
+
case 34: return [4 /*yield*/, this.getBlogValue()];
|
|
11970
|
+
case 35:
|
|
11971
|
+
customDataValue = _b.sent();
|
|
11972
|
+
return [3 /*break*/, 39];
|
|
11973
|
+
case 36: return [4 /*yield*/, this.getBlogListValue()];
|
|
11974
|
+
case 37:
|
|
11975
|
+
customDataValue = _b.sent();
|
|
11976
|
+
return [3 /*break*/, 39];
|
|
11977
|
+
case 38: return [3 /*break*/, 39];
|
|
11978
|
+
case 39: return [3 /*break*/, 41];
|
|
11979
|
+
case 40:
|
|
11529
11980
|
_b.sent();
|
|
11530
11981
|
return [2 /*return*/];
|
|
11531
|
-
case
|
|
11982
|
+
case 41: return [2 /*return*/, JSON.parse(JSON.stringify(customDataValue))];
|
|
11532
11983
|
}
|
|
11533
11984
|
});
|
|
11534
11985
|
});
|
|
@@ -11737,7 +12188,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11737
12188
|
return __generator(this, function (_a) {
|
|
11738
12189
|
switch (_a.label) {
|
|
11739
12190
|
case 0:
|
|
11740
|
-
provider = new IkasProductListPropValueProvider(this.pageType, this.value, this.
|
|
12191
|
+
provider = new IkasProductListPropValueProvider(this.pageType, this.value, this.pageSpecificData);
|
|
11741
12192
|
return [4 /*yield*/, provider.getValue()];
|
|
11742
12193
|
case 1:
|
|
11743
12194
|
value = _a.sent();
|
|
@@ -11867,6 +12318,42 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11867
12318
|
});
|
|
11868
12319
|
});
|
|
11869
12320
|
};
|
|
12321
|
+
IkasCustomPropValueProvider.prototype.getBlogValue = function () {
|
|
12322
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12323
|
+
var provider, value;
|
|
12324
|
+
return __generator(this, function (_a) {
|
|
12325
|
+
switch (_a.label) {
|
|
12326
|
+
case 0:
|
|
12327
|
+
provider = new IkasBlogPropValueProvider(this.value, this.pageSpecificData);
|
|
12328
|
+
return [4 /*yield*/, provider.getValue()];
|
|
12329
|
+
case 1:
|
|
12330
|
+
value = _a.sent();
|
|
12331
|
+
return [2 /*return*/, {
|
|
12332
|
+
value: value,
|
|
12333
|
+
customData: this.customData,
|
|
12334
|
+
}];
|
|
12335
|
+
}
|
|
12336
|
+
});
|
|
12337
|
+
});
|
|
12338
|
+
};
|
|
12339
|
+
IkasCustomPropValueProvider.prototype.getBlogListValue = function () {
|
|
12340
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12341
|
+
var provider, value;
|
|
12342
|
+
return __generator(this, function (_a) {
|
|
12343
|
+
switch (_a.label) {
|
|
12344
|
+
case 0:
|
|
12345
|
+
provider = new IkasBlogListPropValueProvider(this.pageType, this.value, this.pageSpecificData);
|
|
12346
|
+
return [4 /*yield*/, provider.getValue()];
|
|
12347
|
+
case 1:
|
|
12348
|
+
value = _a.sent();
|
|
12349
|
+
return [2 /*return*/, {
|
|
12350
|
+
value: value,
|
|
12351
|
+
customData: this.customData,
|
|
12352
|
+
}];
|
|
12353
|
+
}
|
|
12354
|
+
});
|
|
12355
|
+
});
|
|
12356
|
+
};
|
|
11870
12357
|
return IkasCustomPropValueProvider;
|
|
11871
12358
|
}());
|
|
11872
12359
|
|
|
@@ -12175,6 +12662,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12175
12662
|
this.pageComponentPropValues = [];
|
|
12176
12663
|
this.pageSpecificData = null;
|
|
12177
12664
|
this.merchantSettings = null;
|
|
12665
|
+
this.possiblePageTypes = []; // Used for distinguishing blog slug page from main slug page
|
|
12178
12666
|
this.theme = new IkasTheme(theme);
|
|
12179
12667
|
this.pageParams = pageParams || {};
|
|
12180
12668
|
this.pageType = pageType;
|
|
@@ -12301,29 +12789,40 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12301
12789
|
});
|
|
12302
12790
|
};
|
|
12303
12791
|
IkasPageDataProvider.prototype.getPageSpecificData = function () {
|
|
12792
|
+
var _a, _b;
|
|
12304
12793
|
return __awaiter(this, void 0, void 0, function () {
|
|
12305
|
-
var slug, metaDataList, metaData, handleBrandPage, handleCategoryPage,
|
|
12794
|
+
var slug, metaDataList, metaData, handleBrandPage, handleCategoryPage, handleBlogPage, handleBlogCategoryPage, _c;
|
|
12306
12795
|
var _this = this;
|
|
12307
|
-
return __generator(this, function (
|
|
12308
|
-
switch (
|
|
12796
|
+
return __generator(this, function (_d) {
|
|
12797
|
+
switch (_d.label) {
|
|
12309
12798
|
case 0:
|
|
12310
12799
|
if (this.pageType &&
|
|
12311
12800
|
![
|
|
12312
12801
|
exports.IkasThemePageType.BRAND,
|
|
12313
12802
|
exports.IkasThemePageType.PRODUCT,
|
|
12314
12803
|
exports.IkasThemePageType.CATEGORY,
|
|
12804
|
+
exports.IkasThemePageType.BLOG,
|
|
12805
|
+
exports.IkasThemePageType.BLOG_CATEGORY,
|
|
12315
12806
|
].includes(this.pageType))
|
|
12316
12807
|
return [2 /*return*/];
|
|
12317
12808
|
slug = this.pageParams.slug;
|
|
12318
12809
|
if (!slug) {
|
|
12319
12810
|
return [2 /*return*/];
|
|
12320
12811
|
}
|
|
12321
|
-
|
|
12812
|
+
metaDataList = [];
|
|
12813
|
+
if (!(((_a = this.possiblePageTypes) === null || _a === void 0 ? void 0 : _a.includes(exports.IkasThemePageType.BLOG)) || ((_b = this.possiblePageTypes) === null || _b === void 0 ? void 0 : _b.includes(exports.IkasThemePageType.BLOG_CATEGORY)))) return [3 /*break*/, 2];
|
|
12814
|
+
return [4 /*yield*/, IkasBlogAPI.listBlogMetaData(slug)];
|
|
12322
12815
|
case 1:
|
|
12323
|
-
metaDataList =
|
|
12816
|
+
metaDataList = _d.sent();
|
|
12817
|
+
return [3 /*break*/, 4];
|
|
12818
|
+
case 2: return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(slug)];
|
|
12819
|
+
case 3:
|
|
12820
|
+
metaDataList = _d.sent();
|
|
12324
12821
|
if (!metaDataList || !metaDataList.length) {
|
|
12325
12822
|
return [2 /*return*/, this.getPageSpecificProduct()];
|
|
12326
12823
|
}
|
|
12824
|
+
_d.label = 4;
|
|
12825
|
+
case 4:
|
|
12327
12826
|
metaData = metaDataList[0];
|
|
12328
12827
|
handleBrandPage = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
12329
12828
|
var brandsResponse, brand;
|
|
@@ -12363,21 +12862,67 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12363
12862
|
}
|
|
12364
12863
|
});
|
|
12365
12864
|
}); };
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12865
|
+
handleBlogPage = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
12866
|
+
var blog;
|
|
12867
|
+
return __generator(this, function (_a) {
|
|
12868
|
+
switch (_a.label) {
|
|
12869
|
+
case 0: return [4 /*yield*/, IkasBlogAPI.getBlog({
|
|
12870
|
+
id: metaData.targetId,
|
|
12871
|
+
})];
|
|
12872
|
+
case 1:
|
|
12873
|
+
blog = _a.sent();
|
|
12874
|
+
if (!blog)
|
|
12875
|
+
return [2 /*return*/];
|
|
12876
|
+
this.pageSpecificData = blog;
|
|
12877
|
+
this.pageType = exports.IkasThemePageType.BLOG;
|
|
12878
|
+
this.setPageMetaData(metaData);
|
|
12879
|
+
return [2 /*return*/];
|
|
12880
|
+
}
|
|
12881
|
+
});
|
|
12882
|
+
}); };
|
|
12883
|
+
handleBlogCategoryPage = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
12884
|
+
var blogCategoriesResponse, blogCategory;
|
|
12885
|
+
return __generator(this, function (_a) {
|
|
12886
|
+
switch (_a.label) {
|
|
12887
|
+
case 0: return [4 /*yield*/, IkasBlogAPI.listBlogCategory({
|
|
12888
|
+
idList: [metaData.targetId],
|
|
12889
|
+
page: 1,
|
|
12890
|
+
limit: 1,
|
|
12891
|
+
})];
|
|
12892
|
+
case 1:
|
|
12893
|
+
blogCategoriesResponse = _a.sent();
|
|
12894
|
+
if (!blogCategoriesResponse ||
|
|
12895
|
+
!blogCategoriesResponse.blogCategories.length)
|
|
12896
|
+
return [2 /*return*/];
|
|
12897
|
+
blogCategory = blogCategoriesResponse.blogCategories[0];
|
|
12898
|
+
this.pageSpecificData = blogCategory;
|
|
12899
|
+
this.pageType = exports.IkasThemePageType.BLOG_CATEGORY;
|
|
12900
|
+
this.setPageMetaData(metaData);
|
|
12901
|
+
return [2 /*return*/];
|
|
12902
|
+
}
|
|
12903
|
+
});
|
|
12904
|
+
}); };
|
|
12905
|
+
_c = metaData.targetType;
|
|
12906
|
+
switch (_c) {
|
|
12907
|
+
case exports.IkasHTMLMetaDataTargetType.BRAND: return [3 /*break*/, 5];
|
|
12908
|
+
case exports.IkasHTMLMetaDataTargetType.CATEGORY: return [3 /*break*/, 7];
|
|
12909
|
+
case exports.IkasHTMLMetaDataTargetType.PRODUCT: return [3 /*break*/, 9];
|
|
12910
|
+
case exports.IkasBlogMetadataTargetType.BLOG: return [3 /*break*/, 11];
|
|
12911
|
+
case exports.IkasBlogMetadataTargetType.BLOG_CATEGORY: return [3 /*break*/, 13];
|
|
12371
12912
|
}
|
|
12372
|
-
return [3 /*break*/,
|
|
12373
|
-
case
|
|
12374
|
-
case
|
|
12375
|
-
case
|
|
12376
|
-
case
|
|
12377
|
-
case
|
|
12378
|
-
case
|
|
12379
|
-
case
|
|
12380
|
-
case
|
|
12913
|
+
return [3 /*break*/, 15];
|
|
12914
|
+
case 5: return [4 /*yield*/, handleBrandPage()];
|
|
12915
|
+
case 6: return [2 /*return*/, _d.sent()];
|
|
12916
|
+
case 7: return [4 /*yield*/, handleCategoryPage()];
|
|
12917
|
+
case 8: return [2 /*return*/, _d.sent()];
|
|
12918
|
+
case 9: return [4 /*yield*/, this.getPageSpecificProduct()];
|
|
12919
|
+
case 10: return [2 /*return*/, _d.sent()];
|
|
12920
|
+
case 11: return [4 /*yield*/, handleBlogPage()];
|
|
12921
|
+
case 12: return [2 /*return*/, _d.sent()];
|
|
12922
|
+
case 13: return [4 /*yield*/, handleBlogCategoryPage()];
|
|
12923
|
+
case 14: return [2 /*return*/, _d.sent()];
|
|
12924
|
+
case 15: return [3 /*break*/, 16];
|
|
12925
|
+
case 16: return [2 /*return*/];
|
|
12381
12926
|
}
|
|
12382
12927
|
});
|
|
12383
12928
|
});
|
|
@@ -12446,7 +12991,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12446
12991
|
}
|
|
12447
12992
|
this.pageSpecificData = new IkasProductDetail(product, selectedVariantValues.length
|
|
12448
12993
|
? selectedVariantValues
|
|
12449
|
-
: product.variants[0].variantValues
|
|
12994
|
+
: product.variants[0].variantValues);
|
|
12450
12995
|
this.pageType = exports.IkasThemePageType.PRODUCT;
|
|
12451
12996
|
this.setPageMetaData(metaDataResponse.metaData);
|
|
12452
12997
|
return [2 /*return*/];
|
|
@@ -12518,60 +13063,68 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12518
13063
|
case exports.IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 14];
|
|
12519
13064
|
case exports.IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 15];
|
|
12520
13065
|
case exports.IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 15];
|
|
13066
|
+
case exports.IkasThemeComponentPropType.BLOG: return [3 /*break*/, 17];
|
|
13067
|
+
case exports.IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 18];
|
|
12521
13068
|
}
|
|
12522
|
-
return [3 /*break*/,
|
|
13069
|
+
return [3 /*break*/, 19];
|
|
12523
13070
|
case 1:
|
|
12524
13071
|
propValueProvider = new IkasTextPropValueProvider(propValue);
|
|
12525
|
-
return [3 /*break*/,
|
|
13072
|
+
return [3 /*break*/, 20];
|
|
12526
13073
|
case 2:
|
|
12527
13074
|
propValueProvider = new IkasRichTextPropValueProvider(propValue);
|
|
12528
|
-
return [3 /*break*/,
|
|
13075
|
+
return [3 /*break*/, 20];
|
|
12529
13076
|
case 3:
|
|
12530
13077
|
propValueProvider = new IkasBooleanPropValueProvider(propValue);
|
|
12531
|
-
return [3 /*break*/,
|
|
13078
|
+
return [3 /*break*/, 20];
|
|
12532
13079
|
case 4:
|
|
12533
13080
|
propValueProvider = new IkasImagePropValueProvider(propValue);
|
|
12534
|
-
return [3 /*break*/,
|
|
13081
|
+
return [3 /*break*/, 20];
|
|
12535
13082
|
case 5:
|
|
12536
13083
|
propValueProvider = new IkasImageListPropValueProvider(propValue);
|
|
12537
|
-
return [3 /*break*/,
|
|
13084
|
+
return [3 /*break*/, 20];
|
|
12538
13085
|
case 6:
|
|
12539
13086
|
propValueProvider = new IkasBrandPropValueProvider(propValue, this.pageSpecificData);
|
|
12540
|
-
return [3 /*break*/,
|
|
13087
|
+
return [3 /*break*/, 20];
|
|
12541
13088
|
case 7:
|
|
12542
13089
|
propValueProvider = new IkasBrandListPropValueProvider(propValue);
|
|
12543
|
-
return [3 /*break*/,
|
|
13090
|
+
return [3 /*break*/, 20];
|
|
12544
13091
|
case 8:
|
|
12545
|
-
propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.
|
|
12546
|
-
return [3 /*break*/,
|
|
13092
|
+
propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
|
|
13093
|
+
return [3 /*break*/, 20];
|
|
12547
13094
|
case 9:
|
|
12548
13095
|
propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
|
|
12549
|
-
return [3 /*break*/,
|
|
13096
|
+
return [3 /*break*/, 20];
|
|
12550
13097
|
case 10:
|
|
12551
13098
|
propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
|
|
12552
|
-
return [3 /*break*/,
|
|
13099
|
+
return [3 /*break*/, 20];
|
|
12553
13100
|
case 11:
|
|
12554
13101
|
propValueProvider = new IkasCategoryListPropValueProvider(propValue);
|
|
12555
|
-
return [3 /*break*/,
|
|
13102
|
+
return [3 /*break*/, 20];
|
|
12556
13103
|
case 12:
|
|
12557
13104
|
propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
|
|
12558
|
-
return [3 /*break*/,
|
|
13105
|
+
return [3 /*break*/, 20];
|
|
12559
13106
|
case 13:
|
|
12560
13107
|
propValueProvider = new IkasColorPropValueProvider(propValue);
|
|
12561
|
-
return [3 /*break*/,
|
|
13108
|
+
return [3 /*break*/, 20];
|
|
12562
13109
|
case 14:
|
|
12563
13110
|
customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
|
|
12564
13111
|
if (!customData)
|
|
12565
13112
|
return [2 /*return*/];
|
|
12566
13113
|
propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this, this.pageSpecificData, this.pageParams);
|
|
12567
|
-
return [3 /*break*/,
|
|
13114
|
+
return [3 /*break*/, 20];
|
|
12568
13115
|
case 15:
|
|
12569
13116
|
pageComponents = propValue;
|
|
12570
13117
|
return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) { return _this.getPageComponentPropValues(tp); }))];
|
|
12571
13118
|
case 16: return [2 /*return*/, _b.sent()];
|
|
12572
|
-
case 17:
|
|
12573
|
-
|
|
12574
|
-
|
|
13119
|
+
case 17:
|
|
13120
|
+
propValueProvider = new IkasBlogPropValueProvider(propValue, this.pageSpecificData);
|
|
13121
|
+
return [3 /*break*/, 20];
|
|
13122
|
+
case 18:
|
|
13123
|
+
propValueProvider = new IkasBlogListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
|
|
13124
|
+
return [3 /*break*/, 20];
|
|
13125
|
+
case 19: return [3 /*break*/, 20];
|
|
13126
|
+
case 20: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
|
|
13127
|
+
case 21: return [2 /*return*/, _b.sent()];
|
|
12575
13128
|
}
|
|
12576
13129
|
});
|
|
12577
13130
|
});
|
|
@@ -12636,6 +13189,12 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12636
13189
|
case exports.IkasThemeComponentPropType.CUSTOM:
|
|
12637
13190
|
IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValue, router, settings, isBrowser);
|
|
12638
13191
|
break;
|
|
13192
|
+
case exports.IkasThemeComponentPropType.BLOG:
|
|
13193
|
+
IkasPageDataProvider.initBlogPropValue(prop, propValue, pageComponentPropValue);
|
|
13194
|
+
break;
|
|
13195
|
+
case exports.IkasThemeComponentPropType.BLOG_LIST:
|
|
13196
|
+
IkasPageDataProvider.initBlogListPropValue(prop, propValue, pageComponentPropValue);
|
|
13197
|
+
break;
|
|
12639
13198
|
}
|
|
12640
13199
|
});
|
|
12641
13200
|
});
|
|
@@ -12676,7 +13235,6 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12676
13235
|
pageComponentPropValue.propValues[prop.name] = this._initProductDetailPropValue(propValue, router, isBrowser);
|
|
12677
13236
|
};
|
|
12678
13237
|
IkasPageDataProvider._initProductDetailPropValue = function (propValue, router, isBrowser) {
|
|
12679
|
-
var usePageData = propValue.usePageData;
|
|
12680
13238
|
var _propValue = propValue;
|
|
12681
13239
|
var productDetail = new IkasProductDetail(_propValue.product, _propValue.selectedVariantValues);
|
|
12682
13240
|
if (isBrowser) {
|
|
@@ -12689,7 +13247,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12689
13247
|
}
|
|
12690
13248
|
}
|
|
12691
13249
|
}
|
|
12692
|
-
return new IkasProductDetail(productDetail.product, productDetail.selectedVariantValues,
|
|
13250
|
+
return new IkasProductDetail(productDetail.product, productDetail.selectedVariantValues, router);
|
|
12693
13251
|
};
|
|
12694
13252
|
IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
|
|
12695
13253
|
pageComponentPropValue.propValues[prop.name] = this._initLinkPropValue(propValue);
|
|
@@ -12810,6 +13368,18 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12810
13368
|
});
|
|
12811
13369
|
return [];
|
|
12812
13370
|
};
|
|
13371
|
+
IkasPageDataProvider.initBlogPropValue = function (prop, propValue, pageComponentPropValue) {
|
|
13372
|
+
pageComponentPropValue.propValues[prop.name] = IkasPageDataProvider._initBlogPropValue(propValue);
|
|
13373
|
+
};
|
|
13374
|
+
IkasPageDataProvider._initBlogPropValue = function (propValue) {
|
|
13375
|
+
return new IkasBlog(propValue);
|
|
13376
|
+
};
|
|
13377
|
+
IkasPageDataProvider.initBlogListPropValue = function (prop, propValue, pageComponentPropValue) {
|
|
13378
|
+
pageComponentPropValue.propValues[prop.name] = this._initBlogListPropValue(propValue);
|
|
13379
|
+
};
|
|
13380
|
+
IkasPageDataProvider._initBlogListPropValue = function (propValue) {
|
|
13381
|
+
return new IkasBlogList(propValue);
|
|
13382
|
+
};
|
|
12813
13383
|
return IkasPageDataProvider;
|
|
12814
13384
|
}());
|
|
12815
13385
|
var IkasPageComponentPropValue = /** @class */ (function () {
|
|
@@ -12895,9 +13465,10 @@ var IkasHTMLMetaData = /** @class */ (function () {
|
|
|
12895
13465
|
|
|
12896
13466
|
var IkasBrand = /** @class */ (function () {
|
|
12897
13467
|
function IkasBrand(data) {
|
|
13468
|
+
if (data === void 0) { data = {}; }
|
|
12898
13469
|
this.metaData = null;
|
|
12899
13470
|
this.image = null;
|
|
12900
|
-
this.id = data.id ||
|
|
13471
|
+
this.id = data.id || v4();
|
|
12901
13472
|
this.name = data.name || "";
|
|
12902
13473
|
this.metaData = data.metaData
|
|
12903
13474
|
? new IkasHTMLMetaData(data.metaData)
|
|
@@ -12920,9 +13491,10 @@ var IkasBrand = /** @class */ (function () {
|
|
|
12920
13491
|
|
|
12921
13492
|
var IkasCategory = /** @class */ (function () {
|
|
12922
13493
|
function IkasCategory(data) {
|
|
13494
|
+
if (data === void 0) { data = {}; }
|
|
12923
13495
|
this.metaData = null;
|
|
12924
13496
|
this.image = null;
|
|
12925
|
-
this.id = data.id ||
|
|
13497
|
+
this.id = data.id || v4();
|
|
12926
13498
|
this.name = data.name || "";
|
|
12927
13499
|
this.parentId = data.parentId || null;
|
|
12928
13500
|
this.metaData = data.metaData
|
|
@@ -19343,12 +19915,7 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
19343
19915
|
}); };
|
|
19344
19916
|
this.logout = function () {
|
|
19345
19917
|
var _a;
|
|
19346
|
-
|
|
19347
|
-
localStorage.removeItem(LS_TOKEN_EXPIRY);
|
|
19348
|
-
localStorage.removeItem(LS_CUSTOMER_KEY);
|
|
19349
|
-
_this.customer = undefined;
|
|
19350
|
-
_this.token = undefined;
|
|
19351
|
-
_this.tokenExpiry = undefined;
|
|
19918
|
+
_this.clearLocalData();
|
|
19352
19919
|
(_a = _this.baseStore) === null || _a === void 0 ? void 0 : _a.cartStore.removeCart();
|
|
19353
19920
|
};
|
|
19354
19921
|
this.saveCustomer = function (customer) { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -19563,6 +20130,9 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
19563
20130
|
response = _a.sent();
|
|
19564
20131
|
if ((response === null || response === void 0 ? void 0 : response.token) || (response === null || response === void 0 ? void 0 : response.tokenExpiry))
|
|
19565
20132
|
this.setToken(response.token, response.tokenExpiry);
|
|
20133
|
+
else {
|
|
20134
|
+
this.clearLocalData();
|
|
20135
|
+
}
|
|
19566
20136
|
return [2 /*return*/];
|
|
19567
20137
|
}
|
|
19568
20138
|
});
|
|
@@ -19603,6 +20173,14 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
19603
20173
|
this.setToken(token, parseInt(tokenExpiry));
|
|
19604
20174
|
}
|
|
19605
20175
|
};
|
|
20176
|
+
IkasCustomerStore.prototype.clearLocalData = function () {
|
|
20177
|
+
localStorage.removeItem(LS_TOKEN_KEY);
|
|
20178
|
+
localStorage.removeItem(LS_TOKEN_EXPIRY);
|
|
20179
|
+
localStorage.removeItem(LS_CUSTOMER_KEY);
|
|
20180
|
+
this.customer = undefined;
|
|
20181
|
+
this.token = undefined;
|
|
20182
|
+
this.tokenExpiry = undefined;
|
|
20183
|
+
};
|
|
19606
20184
|
return IkasCustomerStore;
|
|
19607
20185
|
}());
|
|
19608
20186
|
|
|
@@ -19892,7 +20470,7 @@ var IkasProductAttributeValue = /** @class */ (function () {
|
|
|
19892
20470
|
var IkasProductVariant = /** @class */ (function () {
|
|
19893
20471
|
function IkasProductVariant(data) {
|
|
19894
20472
|
if (data === void 0) { data = {}; }
|
|
19895
|
-
this.id = data.id ||
|
|
20473
|
+
this.id = data.id || v4();
|
|
19896
20474
|
this.sku = data.sku || null;
|
|
19897
20475
|
this.barcodeList = data.barcodeList || [];
|
|
19898
20476
|
this.variantValues = data.variantValues
|
|
@@ -19982,7 +20560,7 @@ var IkasProductTag = /** @class */ (function () {
|
|
|
19982
20560
|
var IkasProduct = /** @class */ (function () {
|
|
19983
20561
|
function IkasProduct(data) {
|
|
19984
20562
|
if (data === void 0) { data = {}; }
|
|
19985
|
-
this.id = data.id ||
|
|
20563
|
+
this.id = data.id || v4();
|
|
19986
20564
|
this.name = data.name || "";
|
|
19987
20565
|
this.type = data.type || exports.IkasProductType.PHYSICAL;
|
|
19988
20566
|
this.description = data.description || "";
|
|
@@ -20452,80 +21030,6 @@ var IkasTransactionCardTypeEnum;
|
|
|
20452
21030
|
IkasTransactionTypeEnum["VOID"] = "VOID";
|
|
20453
21031
|
})(exports.IkasTransactionTypeEnum || (exports.IkasTransactionTypeEnum = {}));
|
|
20454
21032
|
|
|
20455
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
20456
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
20457
|
-
// generators (like Math.random()).
|
|
20458
|
-
var getRandomValues;
|
|
20459
|
-
var rnds8 = new Uint8Array(16);
|
|
20460
|
-
function rng() {
|
|
20461
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
20462
|
-
if (!getRandomValues) {
|
|
20463
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
20464
|
-
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
20465
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
20466
|
-
|
|
20467
|
-
if (!getRandomValues) {
|
|
20468
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
20469
|
-
}
|
|
20470
|
-
}
|
|
20471
|
-
|
|
20472
|
-
return getRandomValues(rnds8);
|
|
20473
|
-
}
|
|
20474
|
-
|
|
20475
|
-
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;
|
|
20476
|
-
|
|
20477
|
-
function validate(uuid) {
|
|
20478
|
-
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
20479
|
-
}
|
|
20480
|
-
|
|
20481
|
-
/**
|
|
20482
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
20483
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
20484
|
-
*/
|
|
20485
|
-
|
|
20486
|
-
var byteToHex = [];
|
|
20487
|
-
|
|
20488
|
-
for (var i = 0; i < 256; ++i) {
|
|
20489
|
-
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
20490
|
-
}
|
|
20491
|
-
|
|
20492
|
-
function stringify(arr) {
|
|
20493
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
20494
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
20495
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
20496
|
-
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
|
|
20497
|
-
// of the following:
|
|
20498
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
20499
|
-
// "undefined" in the uuid)
|
|
20500
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
20501
|
-
|
|
20502
|
-
if (!validate(uuid)) {
|
|
20503
|
-
throw TypeError('Stringified UUID is invalid');
|
|
20504
|
-
}
|
|
20505
|
-
|
|
20506
|
-
return uuid;
|
|
20507
|
-
}
|
|
20508
|
-
|
|
20509
|
-
function v4(options, buf, offset) {
|
|
20510
|
-
options = options || {};
|
|
20511
|
-
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
20512
|
-
|
|
20513
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
20514
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
20515
|
-
|
|
20516
|
-
if (buf) {
|
|
20517
|
-
offset = offset || 0;
|
|
20518
|
-
|
|
20519
|
-
for (var i = 0; i < 16; ++i) {
|
|
20520
|
-
buf[offset + i] = rnds[i];
|
|
20521
|
-
}
|
|
20522
|
-
|
|
20523
|
-
return buf;
|
|
20524
|
-
}
|
|
20525
|
-
|
|
20526
|
-
return stringify(rnds);
|
|
20527
|
-
}
|
|
20528
|
-
|
|
20529
21033
|
var IkasThemeComponentProp = /** @class */ (function () {
|
|
20530
21034
|
function IkasThemeComponentProp(data) {
|
|
20531
21035
|
this.id = data.id || v4();
|
|
@@ -20556,6 +21060,8 @@ var IkasThemeComponentProp = /** @class */ (function () {
|
|
|
20556
21060
|
IkasThemeComponentPropType["CUSTOM"] = "CUSTOM";
|
|
20557
21061
|
IkasThemeComponentPropType["COMPONENT"] = "COMPONENT";
|
|
20558
21062
|
IkasThemeComponentPropType["COMPONENT_LIST"] = "COMPONENT_LIST";
|
|
21063
|
+
IkasThemeComponentPropType["BLOG"] = "BLOG";
|
|
21064
|
+
IkasThemeComponentPropType["BLOG_LIST"] = "BLOG_LIST";
|
|
20559
21065
|
})(exports.IkasThemeComponentPropType || (exports.IkasThemeComponentPropType = {}));
|
|
20560
21066
|
|
|
20561
21067
|
var IkasThemeComponent = /** @class */ (function () {
|
|
@@ -20619,6 +21125,8 @@ var IkasThemeCustomData = /** @class */ (function () {
|
|
|
20619
21125
|
IkasThemeCustomDataType["COLOR"] = "COLOR";
|
|
20620
21126
|
IkasThemeCustomDataType["COMPONENT"] = "COMPONENT";
|
|
20621
21127
|
IkasThemeCustomDataType["COMPONENT_LIST"] = "COMPONENT_LIST";
|
|
21128
|
+
IkasThemeCustomDataType["BLOG"] = "BLOG";
|
|
21129
|
+
IkasThemeCustomDataType["BLOG_LIST"] = "BLOG_LIST";
|
|
20622
21130
|
IkasThemeCustomDataType["OBJECT"] = "OBJECT";
|
|
20623
21131
|
IkasThemeCustomDataType["STATIC_LIST"] = "STATIC_LIST";
|
|
20624
21132
|
IkasThemeCustomDataType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
|
|
@@ -20680,6 +21188,9 @@ var IkasThemePageSpecification = /** @class */ (function () {
|
|
|
20680
21188
|
IkasThemePageType["FAVORITE_PRODUCTS"] = "FAVORITE_PRODUCTS";
|
|
20681
21189
|
IkasThemePageType["SEARCH"] = "SEARCH";
|
|
20682
21190
|
IkasThemePageType["NOT_FOUND"] = "NOT_FOUND";
|
|
21191
|
+
IkasThemePageType["BLOG"] = "BLOG";
|
|
21192
|
+
IkasThemePageType["BLOG_INDEX"] = "BLOG_INDEX";
|
|
21193
|
+
IkasThemePageType["BLOG_CATEGORY"] = "BLOG_CATEGORY";
|
|
20683
21194
|
})(exports.IkasThemePageType || (exports.IkasThemePageType = {}));
|
|
20684
21195
|
|
|
20685
21196
|
var IkasThemeColor = /** @class */ (function () {
|
|
@@ -20790,31 +21301,32 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
20790
21301
|
this._isLoading = false;
|
|
20791
21302
|
this.getInitial = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
20792
21303
|
var response_1, err_1;
|
|
20793
|
-
var _this = this;
|
|
20794
|
-
|
|
20795
|
-
|
|
21304
|
+
var _this = this;
|
|
21305
|
+
var _a;
|
|
21306
|
+
return __generator(this, function (_b) {
|
|
21307
|
+
switch (_b.label) {
|
|
20796
21308
|
case 0:
|
|
20797
21309
|
if (this._isLoading)
|
|
20798
21310
|
return [2 /*return*/];
|
|
20799
21311
|
this._isLoading = true;
|
|
20800
|
-
|
|
21312
|
+
_b.label = 1;
|
|
20801
21313
|
case 1:
|
|
20802
|
-
|
|
21314
|
+
_b.trys.push([1, 3, 4, 5]);
|
|
20803
21315
|
return [4 /*yield*/, IkasBrandAPI.listBrands({
|
|
20804
21316
|
idList: this.isStatic
|
|
20805
21317
|
? this._brandListPropValue.brandIds || undefined
|
|
20806
21318
|
: undefined,
|
|
20807
21319
|
page: this.isStatic ? undefined : this.page,
|
|
20808
21320
|
limit: this.isStatic ? undefined : this.limit,
|
|
21321
|
+
sort: this.getSortParams(),
|
|
20809
21322
|
})];
|
|
20810
21323
|
case 2:
|
|
20811
|
-
response_1 =
|
|
21324
|
+
response_1 = _b.sent();
|
|
20812
21325
|
if (this.isStatic) {
|
|
20813
|
-
this.data =
|
|
20814
|
-
.brandIds.map(function (bID) {
|
|
20815
|
-
|
|
20816
|
-
|
|
20817
|
-
.filter(function (b) { return !!b; });
|
|
21326
|
+
this.data =
|
|
21327
|
+
((_a = this._brandListPropValue.brandIds) === null || _a === void 0 ? void 0 : _a.map(function (bID) {
|
|
21328
|
+
return response_1.brands.find(function (b) { return b.id === bID; });
|
|
21329
|
+
}).filter(function (b) { return !!b; })) || [];
|
|
20818
21330
|
}
|
|
20819
21331
|
else {
|
|
20820
21332
|
this.data = response_1.brands;
|
|
@@ -20824,7 +21336,7 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
20824
21336
|
this._minPage = this.page;
|
|
20825
21337
|
return [3 /*break*/, 5];
|
|
20826
21338
|
case 3:
|
|
20827
|
-
err_1 =
|
|
21339
|
+
err_1 = _b.sent();
|
|
20828
21340
|
console.log(err_1);
|
|
20829
21341
|
return [3 /*break*/, 5];
|
|
20830
21342
|
case 4:
|
|
@@ -20852,6 +21364,7 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
20852
21364
|
return [4 /*yield*/, IkasBrandAPI.listBrands({
|
|
20853
21365
|
page: minPage_1,
|
|
20854
21366
|
limit: this.limit,
|
|
21367
|
+
sort: this.getSortParams(),
|
|
20855
21368
|
})];
|
|
20856
21369
|
case 2:
|
|
20857
21370
|
response_2 = _a.sent();
|
|
@@ -20889,6 +21402,7 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
20889
21402
|
return [4 /*yield*/, IkasBrandAPI.listBrands({
|
|
20890
21403
|
page: this.page + 1,
|
|
20891
21404
|
limit: this.limit,
|
|
21405
|
+
sort: this.getSortParams(),
|
|
20892
21406
|
})];
|
|
20893
21407
|
case 2:
|
|
20894
21408
|
response_3 = _a.sent();
|
|
@@ -20926,6 +21440,7 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
20926
21440
|
return [4 /*yield*/, IkasBrandAPI.listBrands({
|
|
20927
21441
|
page: page,
|
|
20928
21442
|
limit: this.limit,
|
|
21443
|
+
sort: this.getSortParams(),
|
|
20929
21444
|
})];
|
|
20930
21445
|
case 2:
|
|
20931
21446
|
response_4 = _a.sent();
|
|
@@ -20941,74 +21456,345 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
20941
21456
|
console.log(err_4);
|
|
20942
21457
|
return [3 /*break*/, 5];
|
|
20943
21458
|
case 4:
|
|
20944
|
-
mobx.runInAction(function () {
|
|
20945
|
-
_this._isLoading = false;
|
|
20946
|
-
});
|
|
21459
|
+
mobx.runInAction(function () {
|
|
21460
|
+
_this._isLoading = false;
|
|
21461
|
+
});
|
|
21462
|
+
return [7 /*endfinally*/];
|
|
21463
|
+
case 5: return [2 /*return*/];
|
|
21464
|
+
}
|
|
21465
|
+
});
|
|
21466
|
+
}); };
|
|
21467
|
+
this.data = data.data ? data.data.map(function (b) { return new IkasBrand(b); }) : [];
|
|
21468
|
+
this._type =
|
|
21469
|
+
data.type ||
|
|
21470
|
+
data.brandListPropValue.brandListType ||
|
|
21471
|
+
exports.IkasBrandListType.ALL;
|
|
21472
|
+
this._sort =
|
|
21473
|
+
data.sort ||
|
|
21474
|
+
data.brandListPropValue.initialSort ||
|
|
21475
|
+
exports.IkasBrandListSortType.A_Z;
|
|
21476
|
+
this._limit = data.limit || data.brandListPropValue.initialLimit || 20;
|
|
21477
|
+
this._page = data.page || 1;
|
|
21478
|
+
this._count = data.count || 0;
|
|
21479
|
+
this._initialized = data.initialized || false;
|
|
21480
|
+
this._minPage = data.minPage;
|
|
21481
|
+
this._brandListPropValue = data.brandListPropValue;
|
|
21482
|
+
mobx.makeAutoObservable(this);
|
|
21483
|
+
}
|
|
21484
|
+
Object.defineProperty(IkasBrandList.prototype, "sort", {
|
|
21485
|
+
get: function () {
|
|
21486
|
+
return this._sort;
|
|
21487
|
+
},
|
|
21488
|
+
enumerable: false,
|
|
21489
|
+
configurable: true
|
|
21490
|
+
});
|
|
21491
|
+
Object.defineProperty(IkasBrandList.prototype, "limit", {
|
|
21492
|
+
get: function () {
|
|
21493
|
+
return this._limit;
|
|
21494
|
+
},
|
|
21495
|
+
enumerable: false,
|
|
21496
|
+
configurable: true
|
|
21497
|
+
});
|
|
21498
|
+
Object.defineProperty(IkasBrandList.prototype, "page", {
|
|
21499
|
+
get: function () {
|
|
21500
|
+
return this._page;
|
|
21501
|
+
},
|
|
21502
|
+
enumerable: false,
|
|
21503
|
+
configurable: true
|
|
21504
|
+
});
|
|
21505
|
+
Object.defineProperty(IkasBrandList.prototype, "count", {
|
|
21506
|
+
get: function () {
|
|
21507
|
+
return this._count;
|
|
21508
|
+
},
|
|
21509
|
+
enumerable: false,
|
|
21510
|
+
configurable: true
|
|
21511
|
+
});
|
|
21512
|
+
Object.defineProperty(IkasBrandList.prototype, "isInitialized", {
|
|
21513
|
+
get: function () {
|
|
21514
|
+
return this._initialized;
|
|
21515
|
+
},
|
|
21516
|
+
enumerable: false,
|
|
21517
|
+
configurable: true
|
|
21518
|
+
});
|
|
21519
|
+
Object.defineProperty(IkasBrandList.prototype, "isStatic", {
|
|
21520
|
+
get: function () {
|
|
21521
|
+
return this._type === exports.IkasBrandListType.STATIC;
|
|
21522
|
+
},
|
|
21523
|
+
enumerable: false,
|
|
21524
|
+
configurable: true
|
|
21525
|
+
});
|
|
21526
|
+
Object.defineProperty(IkasBrandList.prototype, "hasPrev", {
|
|
21527
|
+
get: function () {
|
|
21528
|
+
if (this.isStatic || !this._minPage)
|
|
21529
|
+
return false;
|
|
21530
|
+
return this._minPage > 1;
|
|
21531
|
+
},
|
|
21532
|
+
enumerable: false,
|
|
21533
|
+
configurable: true
|
|
21534
|
+
});
|
|
21535
|
+
Object.defineProperty(IkasBrandList.prototype, "hasNext", {
|
|
21536
|
+
get: function () {
|
|
21537
|
+
if (this.isStatic)
|
|
21538
|
+
return false;
|
|
21539
|
+
return this.page * this.limit < this.count;
|
|
21540
|
+
},
|
|
21541
|
+
enumerable: false,
|
|
21542
|
+
configurable: true
|
|
21543
|
+
});
|
|
21544
|
+
Object.defineProperty(IkasBrandList.prototype, "isLoading", {
|
|
21545
|
+
get: function () {
|
|
21546
|
+
return this._isLoading;
|
|
21547
|
+
},
|
|
21548
|
+
enumerable: false,
|
|
21549
|
+
configurable: true
|
|
21550
|
+
});
|
|
21551
|
+
IkasBrandList.prototype.getSortParams = function () {
|
|
21552
|
+
if (this._sort === exports.IkasBrandListSortType.A_Z)
|
|
21553
|
+
return "name";
|
|
21554
|
+
else
|
|
21555
|
+
return "-name";
|
|
21556
|
+
};
|
|
21557
|
+
IkasBrandList.prototype.setSortType = function (sortType) {
|
|
21558
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
21559
|
+
return __generator(this, function (_a) {
|
|
21560
|
+
switch (_a.label) {
|
|
21561
|
+
case 0:
|
|
21562
|
+
this._sort = sortType;
|
|
21563
|
+
return [4 /*yield*/, this.getInitial()];
|
|
21564
|
+
case 1:
|
|
21565
|
+
_a.sent();
|
|
21566
|
+
return [2 /*return*/];
|
|
21567
|
+
}
|
|
21568
|
+
});
|
|
21569
|
+
});
|
|
21570
|
+
};
|
|
21571
|
+
IkasBrandList.prototype.toJSON = function () {
|
|
21572
|
+
return {
|
|
21573
|
+
data: this.data,
|
|
21574
|
+
type: this._type,
|
|
21575
|
+
sort: this._sort,
|
|
21576
|
+
limit: this._limit,
|
|
21577
|
+
page: this._page,
|
|
21578
|
+
count: this._count,
|
|
21579
|
+
initialized: this._initialized,
|
|
21580
|
+
minPage: this._minPage,
|
|
21581
|
+
brandListPropValue: this._brandListPropValue,
|
|
21582
|
+
};
|
|
21583
|
+
};
|
|
21584
|
+
return IkasBrandList;
|
|
21585
|
+
}());
|
|
21586
|
+
(function (IkasBrandListType) {
|
|
21587
|
+
IkasBrandListType["ALL"] = "ALL";
|
|
21588
|
+
IkasBrandListType["STATIC"] = "STATIC";
|
|
21589
|
+
})(exports.IkasBrandListType || (exports.IkasBrandListType = {}));
|
|
21590
|
+
(function (IkasBrandListSortType) {
|
|
21591
|
+
IkasBrandListSortType["A_Z"] = "A_Z";
|
|
21592
|
+
IkasBrandListSortType["Z_A"] = "Z_A";
|
|
21593
|
+
})(exports.IkasBrandListSortType || (exports.IkasBrandListSortType = {}));
|
|
21594
|
+
|
|
21595
|
+
var IkasBrandListPropValue = /** @class */ (function () {
|
|
21596
|
+
function IkasBrandListPropValue(data) {
|
|
21597
|
+
this.initialSort = null;
|
|
21598
|
+
this.initialLimit = null;
|
|
21599
|
+
// Only for static lists
|
|
21600
|
+
this.brandCount = null;
|
|
21601
|
+
this.brandIds = null;
|
|
21602
|
+
this.brandListType = data.brandListType || exports.IkasBrandListType.ALL;
|
|
21603
|
+
this.initialSort = data.initialSort || exports.IkasBrandListSortType.A_Z;
|
|
21604
|
+
this.initialLimit = data.initialLimit || 20;
|
|
21605
|
+
this.brandCount = data.brandCount;
|
|
21606
|
+
this.brandIds = data.brandIds;
|
|
21607
|
+
mobx.makeAutoObservable(this);
|
|
21608
|
+
}
|
|
21609
|
+
return IkasBrandListPropValue;
|
|
21610
|
+
}());
|
|
21611
|
+
|
|
21612
|
+
var IkasBlogList = /** @class */ (function () {
|
|
21613
|
+
function IkasBlogList(data) {
|
|
21614
|
+
var _this = this;
|
|
21615
|
+
this._initialized = false;
|
|
21616
|
+
this._minPage = null;
|
|
21617
|
+
this._filterCategoryId = null;
|
|
21618
|
+
this._isLoading = false;
|
|
21619
|
+
// Used by the provider
|
|
21620
|
+
this.getInitial = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
21621
|
+
var response_1, err_1;
|
|
21622
|
+
var _a, _b;
|
|
21623
|
+
return __generator(this, function (_c) {
|
|
21624
|
+
switch (_c.label) {
|
|
21625
|
+
case 0:
|
|
21626
|
+
if (this._isLoading)
|
|
21627
|
+
return [2 /*return*/];
|
|
21628
|
+
this._isLoading = true;
|
|
21629
|
+
_c.label = 1;
|
|
21630
|
+
case 1:
|
|
21631
|
+
_c.trys.push([1, 3, 4, 5]);
|
|
21632
|
+
return [4 /*yield*/, this.listBlogs(this.isStatic ? 1 : this.page, this.isStatic
|
|
21633
|
+
? ((_a = this._blogListPropValue.blogIds) === null || _a === void 0 ? void 0 : _a.length) || 10
|
|
21634
|
+
: this.limit)];
|
|
21635
|
+
case 2:
|
|
21636
|
+
response_1 = _c.sent();
|
|
21637
|
+
if (this.isStatic) {
|
|
21638
|
+
this.data =
|
|
21639
|
+
((_b = this._blogListPropValue.blogIds) === null || _b === void 0 ? void 0 : _b.map(function (bID) {
|
|
21640
|
+
return response_1.blogs.find(function (b) { return b.id === bID; });
|
|
21641
|
+
}).filter(function (b) { return !!b; })) || [];
|
|
21642
|
+
}
|
|
21643
|
+
else {
|
|
21644
|
+
this.data = response_1.blogs;
|
|
21645
|
+
}
|
|
21646
|
+
this._count = response_1.count;
|
|
21647
|
+
this._initialized = true;
|
|
21648
|
+
this._minPage = this.page;
|
|
21649
|
+
return [3 /*break*/, 5];
|
|
21650
|
+
case 3:
|
|
21651
|
+
err_1 = _c.sent();
|
|
21652
|
+
console.log(err_1);
|
|
21653
|
+
return [3 /*break*/, 5];
|
|
21654
|
+
case 4:
|
|
21655
|
+
this._isLoading = false;
|
|
21656
|
+
return [7 /*endfinally*/];
|
|
21657
|
+
case 5: return [2 /*return*/];
|
|
21658
|
+
}
|
|
21659
|
+
});
|
|
21660
|
+
}); };
|
|
21661
|
+
this.getPrev = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
21662
|
+
var minPage, response, err_2;
|
|
21663
|
+
return __generator(this, function (_a) {
|
|
21664
|
+
switch (_a.label) {
|
|
21665
|
+
case 0:
|
|
21666
|
+
if (this.isStatic || this._isLoading || !this.hasPrev)
|
|
21667
|
+
return [2 /*return*/];
|
|
21668
|
+
this._isLoading = true;
|
|
21669
|
+
_a.label = 1;
|
|
21670
|
+
case 1:
|
|
21671
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
21672
|
+
minPage = this._minPage - 1;
|
|
21673
|
+
return [4 /*yield*/, this.listBlogs(minPage, this.limit)];
|
|
21674
|
+
case 2:
|
|
21675
|
+
response = _a.sent();
|
|
21676
|
+
this.data = response.blogs.concat(this.data);
|
|
21677
|
+
this._count = response.count;
|
|
21678
|
+
this._minPage = minPage;
|
|
21679
|
+
return [3 /*break*/, 5];
|
|
21680
|
+
case 3:
|
|
21681
|
+
err_2 = _a.sent();
|
|
21682
|
+
console.log(err_2);
|
|
21683
|
+
return [3 /*break*/, 5];
|
|
21684
|
+
case 4:
|
|
21685
|
+
this._isLoading = false;
|
|
21686
|
+
return [7 /*endfinally*/];
|
|
21687
|
+
case 5: return [2 /*return*/];
|
|
21688
|
+
}
|
|
21689
|
+
});
|
|
21690
|
+
}); };
|
|
21691
|
+
this.getNext = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
21692
|
+
var response, err_3;
|
|
21693
|
+
return __generator(this, function (_a) {
|
|
21694
|
+
switch (_a.label) {
|
|
21695
|
+
case 0:
|
|
21696
|
+
if (this.isStatic || this._isLoading || !this.hasNext)
|
|
21697
|
+
return [2 /*return*/];
|
|
21698
|
+
this._isLoading = true;
|
|
21699
|
+
_a.label = 1;
|
|
21700
|
+
case 1:
|
|
21701
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
21702
|
+
return [4 /*yield*/, this.listBlogs(this.page + 1, this.limit)];
|
|
21703
|
+
case 2:
|
|
21704
|
+
response = _a.sent();
|
|
21705
|
+
this.data = this.data.concat(response.blogs);
|
|
21706
|
+
this._count = response.count;
|
|
21707
|
+
this._page = this.page + 1;
|
|
21708
|
+
return [3 /*break*/, 5];
|
|
21709
|
+
case 3:
|
|
21710
|
+
err_3 = _a.sent();
|
|
21711
|
+
console.log(err_3);
|
|
21712
|
+
return [3 /*break*/, 5];
|
|
21713
|
+
case 4:
|
|
21714
|
+
this._isLoading = false;
|
|
21715
|
+
return [7 /*endfinally*/];
|
|
21716
|
+
case 5: return [2 /*return*/];
|
|
21717
|
+
}
|
|
21718
|
+
});
|
|
21719
|
+
}); };
|
|
21720
|
+
this.getPage = function (page) { return __awaiter(_this, void 0, void 0, function () {
|
|
21721
|
+
var response, err_4;
|
|
21722
|
+
return __generator(this, function (_a) {
|
|
21723
|
+
switch (_a.label) {
|
|
21724
|
+
case 0:
|
|
21725
|
+
if (this._isLoading || this.isStatic)
|
|
21726
|
+
return [2 /*return*/];
|
|
21727
|
+
this._isLoading = true;
|
|
21728
|
+
_a.label = 1;
|
|
21729
|
+
case 1:
|
|
21730
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
21731
|
+
return [4 /*yield*/, this.listBlogs(page, this.limit)];
|
|
21732
|
+
case 2:
|
|
21733
|
+
response = _a.sent();
|
|
21734
|
+
this.data = response.blogs;
|
|
21735
|
+
this._count = response.count;
|
|
21736
|
+
this._page = page;
|
|
21737
|
+
this._minPage = page;
|
|
21738
|
+
return [3 /*break*/, 5];
|
|
21739
|
+
case 3:
|
|
21740
|
+
err_4 = _a.sent();
|
|
21741
|
+
console.log(err_4);
|
|
21742
|
+
return [3 /*break*/, 5];
|
|
21743
|
+
case 4:
|
|
21744
|
+
this._isLoading = false;
|
|
20947
21745
|
return [7 /*endfinally*/];
|
|
20948
21746
|
case 5: return [2 /*return*/];
|
|
20949
21747
|
}
|
|
20950
21748
|
});
|
|
20951
21749
|
}); };
|
|
20952
|
-
this.data = data.data ? data.data.map(function (b) { return new
|
|
21750
|
+
this.data = data.data ? data.data.map(function (b) { return new IkasBlog(b); }) : [];
|
|
20953
21751
|
this._type =
|
|
20954
|
-
data.type ||
|
|
20955
|
-
|
|
20956
|
-
exports.IkasBrandListType.ALL;
|
|
20957
|
-
this._sort =
|
|
20958
|
-
data.sort ||
|
|
20959
|
-
data.brandListPropValue.initialSort ||
|
|
20960
|
-
exports.IkasBrandListSortType.A_Z;
|
|
20961
|
-
this._limit = data.limit || data.brandListPropValue.initialLimit || 20;
|
|
21752
|
+
data.type || data.blogListPropValue.blogListType || exports.IkasBlogListType.ALL;
|
|
21753
|
+
this._limit = data.limit || data.blogListPropValue.initialLimit || 20;
|
|
20962
21754
|
this._page = data.page || 1;
|
|
20963
21755
|
this._count = data.count || 0;
|
|
20964
21756
|
this._initialized = data.initialized || false;
|
|
20965
21757
|
this._minPage = data.minPage;
|
|
20966
|
-
this.
|
|
21758
|
+
this._blogListPropValue = data.blogListPropValue;
|
|
21759
|
+
this._filterCategoryId = data.filterCategoryId || null;
|
|
20967
21760
|
mobx.makeAutoObservable(this);
|
|
20968
21761
|
}
|
|
20969
|
-
Object.defineProperty(
|
|
20970
|
-
get: function () {
|
|
20971
|
-
return this._sort;
|
|
20972
|
-
},
|
|
20973
|
-
enumerable: false,
|
|
20974
|
-
configurable: true
|
|
20975
|
-
});
|
|
20976
|
-
Object.defineProperty(IkasBrandList.prototype, "limit", {
|
|
21762
|
+
Object.defineProperty(IkasBlogList.prototype, "limit", {
|
|
20977
21763
|
get: function () {
|
|
20978
21764
|
return this._limit;
|
|
20979
21765
|
},
|
|
20980
21766
|
enumerable: false,
|
|
20981
21767
|
configurable: true
|
|
20982
21768
|
});
|
|
20983
|
-
Object.defineProperty(
|
|
21769
|
+
Object.defineProperty(IkasBlogList.prototype, "page", {
|
|
20984
21770
|
get: function () {
|
|
20985
21771
|
return this._page;
|
|
20986
21772
|
},
|
|
20987
21773
|
enumerable: false,
|
|
20988
21774
|
configurable: true
|
|
20989
21775
|
});
|
|
20990
|
-
Object.defineProperty(
|
|
21776
|
+
Object.defineProperty(IkasBlogList.prototype, "count", {
|
|
20991
21777
|
get: function () {
|
|
20992
21778
|
return this._count;
|
|
20993
21779
|
},
|
|
20994
21780
|
enumerable: false,
|
|
20995
21781
|
configurable: true
|
|
20996
21782
|
});
|
|
20997
|
-
Object.defineProperty(
|
|
21783
|
+
Object.defineProperty(IkasBlogList.prototype, "isInitialized", {
|
|
20998
21784
|
get: function () {
|
|
20999
21785
|
return this._initialized;
|
|
21000
21786
|
},
|
|
21001
21787
|
enumerable: false,
|
|
21002
21788
|
configurable: true
|
|
21003
21789
|
});
|
|
21004
|
-
Object.defineProperty(
|
|
21790
|
+
Object.defineProperty(IkasBlogList.prototype, "isStatic", {
|
|
21005
21791
|
get: function () {
|
|
21006
|
-
return this._type === exports.
|
|
21792
|
+
return this._type === exports.IkasBlogListType.STATIC;
|
|
21007
21793
|
},
|
|
21008
21794
|
enumerable: false,
|
|
21009
21795
|
configurable: true
|
|
21010
21796
|
});
|
|
21011
|
-
Object.defineProperty(
|
|
21797
|
+
Object.defineProperty(IkasBlogList.prototype, "hasPrev", {
|
|
21012
21798
|
get: function () {
|
|
21013
21799
|
if (this.isStatic || !this._minPage)
|
|
21014
21800
|
return false;
|
|
@@ -21017,7 +21803,7 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
21017
21803
|
enumerable: false,
|
|
21018
21804
|
configurable: true
|
|
21019
21805
|
});
|
|
21020
|
-
Object.defineProperty(
|
|
21806
|
+
Object.defineProperty(IkasBlogList.prototype, "hasNext", {
|
|
21021
21807
|
get: function () {
|
|
21022
21808
|
if (this.isStatic)
|
|
21023
21809
|
return false;
|
|
@@ -21026,53 +21812,50 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
21026
21812
|
enumerable: false,
|
|
21027
21813
|
configurable: true
|
|
21028
21814
|
});
|
|
21029
|
-
Object.defineProperty(
|
|
21815
|
+
Object.defineProperty(IkasBlogList.prototype, "isLoading", {
|
|
21030
21816
|
get: function () {
|
|
21031
21817
|
return this._isLoading;
|
|
21032
21818
|
},
|
|
21033
21819
|
enumerable: false,
|
|
21034
21820
|
configurable: true
|
|
21035
21821
|
});
|
|
21036
|
-
|
|
21822
|
+
IkasBlogList.prototype.listBlogs = function (page, limit) {
|
|
21823
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
21824
|
+
return __generator(this, function (_a) {
|
|
21825
|
+
switch (_a.label) {
|
|
21826
|
+
case 0: return [4 /*yield*/, IkasBlogAPI.listBlog({
|
|
21827
|
+
idList: this.isStatic
|
|
21828
|
+
? this._blogListPropValue.blogIds || undefined
|
|
21829
|
+
: undefined,
|
|
21830
|
+
page: page,
|
|
21831
|
+
limit: limit,
|
|
21832
|
+
categoryId: this._filterCategoryId || undefined,
|
|
21833
|
+
})];
|
|
21834
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
21835
|
+
}
|
|
21836
|
+
});
|
|
21837
|
+
});
|
|
21838
|
+
};
|
|
21839
|
+
IkasBlogList.prototype.toJSON = function () {
|
|
21037
21840
|
return {
|
|
21038
21841
|
data: this.data,
|
|
21039
21842
|
type: this._type,
|
|
21040
|
-
sort: this._sort,
|
|
21041
21843
|
limit: this._limit,
|
|
21042
21844
|
page: this._page,
|
|
21043
21845
|
count: this._count,
|
|
21044
21846
|
initialized: this._initialized,
|
|
21045
21847
|
minPage: this._minPage,
|
|
21046
|
-
|
|
21848
|
+
blogListPropValue: this._blogListPropValue,
|
|
21849
|
+
filterCategoryId: this._filterCategoryId,
|
|
21047
21850
|
};
|
|
21048
21851
|
};
|
|
21049
|
-
return
|
|
21852
|
+
return IkasBlogList;
|
|
21050
21853
|
}());
|
|
21051
|
-
(function (
|
|
21052
|
-
|
|
21053
|
-
|
|
21054
|
-
|
|
21055
|
-
(
|
|
21056
|
-
IkasBrandListSortType["A_Z"] = "A_Z";
|
|
21057
|
-
IkasBrandListSortType["Z_A"] = "Z_A";
|
|
21058
|
-
})(exports.IkasBrandListSortType || (exports.IkasBrandListSortType = {}));
|
|
21059
|
-
|
|
21060
|
-
var IkasBrandListPropValue = /** @class */ (function () {
|
|
21061
|
-
function IkasBrandListPropValue(data) {
|
|
21062
|
-
this.initialSort = null;
|
|
21063
|
-
this.initialLimit = null;
|
|
21064
|
-
// Only for static lists
|
|
21065
|
-
this.brandCount = null;
|
|
21066
|
-
this.brandIds = null;
|
|
21067
|
-
this.brandListType = data.brandListType || exports.IkasBrandListType.ALL;
|
|
21068
|
-
this.initialSort = data.initialSort || exports.IkasBrandListSortType.A_Z;
|
|
21069
|
-
this.initialLimit = data.initialLimit || 20;
|
|
21070
|
-
this.brandCount = data.brandCount;
|
|
21071
|
-
this.brandIds = data.brandIds;
|
|
21072
|
-
mobx.makeAutoObservable(this);
|
|
21073
|
-
}
|
|
21074
|
-
return IkasBrandListPropValue;
|
|
21075
|
-
}());
|
|
21854
|
+
(function (IkasBlogListType) {
|
|
21855
|
+
IkasBlogListType["ALL"] = "ALL";
|
|
21856
|
+
IkasBlogListType["STATIC"] = "STATIC";
|
|
21857
|
+
IkasBlogListType["CATEGORY"] = "CATEGORY";
|
|
21858
|
+
})(exports.IkasBlogListType || (exports.IkasBlogListType = {}));
|
|
21076
21859
|
|
|
21077
21860
|
var IkasCategoryList = /** @class */ (function () {
|
|
21078
21861
|
function IkasCategoryList(data) {
|
|
@@ -21083,30 +21866,31 @@ var IkasCategoryList = /** @class */ (function () {
|
|
|
21083
21866
|
this.getInitial = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
21084
21867
|
var response_1, err_1;
|
|
21085
21868
|
var _this = this;
|
|
21086
|
-
|
|
21087
|
-
|
|
21869
|
+
var _a;
|
|
21870
|
+
return __generator(this, function (_b) {
|
|
21871
|
+
switch (_b.label) {
|
|
21088
21872
|
case 0:
|
|
21089
21873
|
if (this._isLoading)
|
|
21090
21874
|
return [2 /*return*/];
|
|
21091
21875
|
this._isLoading = true;
|
|
21092
|
-
|
|
21876
|
+
_b.label = 1;
|
|
21093
21877
|
case 1:
|
|
21094
|
-
|
|
21878
|
+
_b.trys.push([1, 3, 4, 5]);
|
|
21095
21879
|
return [4 /*yield*/, IkasCategoryAPI.listCategories({
|
|
21096
21880
|
idList: this.isStatic
|
|
21097
21881
|
? this._categoryListPropValue.categoryIds || undefined
|
|
21098
21882
|
: undefined,
|
|
21099
21883
|
page: this.isStatic ? undefined : this.page,
|
|
21100
21884
|
limit: this.isStatic ? undefined : this.limit,
|
|
21885
|
+
sort: this.getSortParams(),
|
|
21101
21886
|
})];
|
|
21102
21887
|
case 2:
|
|
21103
|
-
response_1 =
|
|
21888
|
+
response_1 = _b.sent();
|
|
21104
21889
|
if (this.isStatic) {
|
|
21105
|
-
this.data =
|
|
21106
|
-
.categoryIds.map(function (cID) {
|
|
21107
|
-
|
|
21108
|
-
|
|
21109
|
-
.filter(function (c) { return !!c; });
|
|
21890
|
+
this.data =
|
|
21891
|
+
((_a = this._categoryListPropValue.categoryIds) === null || _a === void 0 ? void 0 : _a.map(function (cID) {
|
|
21892
|
+
return response_1.categories.find(function (c) { return c.id === cID; });
|
|
21893
|
+
}).filter(function (c) { return !!c; })) || [];
|
|
21110
21894
|
}
|
|
21111
21895
|
else {
|
|
21112
21896
|
this.data = response_1.categories;
|
|
@@ -21116,7 +21900,7 @@ var IkasCategoryList = /** @class */ (function () {
|
|
|
21116
21900
|
this._minPage = this.page;
|
|
21117
21901
|
return [3 /*break*/, 5];
|
|
21118
21902
|
case 3:
|
|
21119
|
-
err_1 =
|
|
21903
|
+
err_1 = _b.sent();
|
|
21120
21904
|
console.log(err_1);
|
|
21121
21905
|
return [3 /*break*/, 5];
|
|
21122
21906
|
case 4:
|
|
@@ -21144,6 +21928,7 @@ var IkasCategoryList = /** @class */ (function () {
|
|
|
21144
21928
|
return [4 /*yield*/, IkasCategoryAPI.listCategories({
|
|
21145
21929
|
page: minPage_1,
|
|
21146
21930
|
limit: this.limit,
|
|
21931
|
+
sort: this.getSortParams(),
|
|
21147
21932
|
})];
|
|
21148
21933
|
case 2:
|
|
21149
21934
|
response_2 = _a.sent();
|
|
@@ -21181,6 +21966,7 @@ var IkasCategoryList = /** @class */ (function () {
|
|
|
21181
21966
|
return [4 /*yield*/, IkasCategoryAPI.listCategories({
|
|
21182
21967
|
page: this.page + 1,
|
|
21183
21968
|
limit: this.limit,
|
|
21969
|
+
sort: this.getSortParams(),
|
|
21184
21970
|
})];
|
|
21185
21971
|
case 2:
|
|
21186
21972
|
response_3 = _a.sent();
|
|
@@ -21218,6 +22004,7 @@ var IkasCategoryList = /** @class */ (function () {
|
|
|
21218
22004
|
return [4 /*yield*/, IkasCategoryAPI.listCategories({
|
|
21219
22005
|
page: page,
|
|
21220
22006
|
limit: this.limit,
|
|
22007
|
+
sort: this.getSortParams(),
|
|
21221
22008
|
})];
|
|
21222
22009
|
case 2:
|
|
21223
22010
|
response_4 = _a.sent();
|
|
@@ -21325,6 +22112,26 @@ var IkasCategoryList = /** @class */ (function () {
|
|
|
21325
22112
|
enumerable: false,
|
|
21326
22113
|
configurable: true
|
|
21327
22114
|
});
|
|
22115
|
+
IkasCategoryList.prototype.getSortParams = function () {
|
|
22116
|
+
if (this._sort === exports.IkasCategoryListSortType.A_Z)
|
|
22117
|
+
return "name";
|
|
22118
|
+
else
|
|
22119
|
+
return "-name";
|
|
22120
|
+
};
|
|
22121
|
+
IkasCategoryList.prototype.setSortType = function (sortType) {
|
|
22122
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
22123
|
+
return __generator(this, function (_a) {
|
|
22124
|
+
switch (_a.label) {
|
|
22125
|
+
case 0:
|
|
22126
|
+
this._sort = sortType;
|
|
22127
|
+
return [4 /*yield*/, this.getInitial()];
|
|
22128
|
+
case 1:
|
|
22129
|
+
_a.sent();
|
|
22130
|
+
return [2 /*return*/];
|
|
22131
|
+
}
|
|
22132
|
+
});
|
|
22133
|
+
});
|
|
22134
|
+
};
|
|
21328
22135
|
IkasCategoryList.prototype.toJSON = function () {
|
|
21329
22136
|
return {
|
|
21330
22137
|
data: this.data,
|
|
@@ -21350,12 +22157,10 @@ var IkasCategoryList = /** @class */ (function () {
|
|
|
21350
22157
|
})(exports.IkasCategoryListSortType || (exports.IkasCategoryListSortType = {}));
|
|
21351
22158
|
|
|
21352
22159
|
var IkasProductDetail = /** @class */ (function () {
|
|
21353
|
-
function IkasProductDetail(product, selectedVariantValues,
|
|
21354
|
-
this.usePageData = null;
|
|
22160
|
+
function IkasProductDetail(product, selectedVariantValues, router) {
|
|
21355
22161
|
this.router = null;
|
|
21356
22162
|
this.product = new IkasProduct(product);
|
|
21357
22163
|
this.selectedVariantValues = selectedVariantValues.map(function (vv) { return new IkasVariantValue(vv); });
|
|
21358
|
-
this.usePageData = usePageData;
|
|
21359
22164
|
this.router = router;
|
|
21360
22165
|
mobx.makeAutoObservable(this);
|
|
21361
22166
|
}
|
|
@@ -22188,6 +22993,345 @@ function debounce(func, wait, options) {
|
|
|
22188
22993
|
|
|
22189
22994
|
var debounce_1 = debounce;
|
|
22190
22995
|
|
|
22996
|
+
/* tslint:disable */
|
|
22997
|
+
/* eslint-disable */
|
|
22998
|
+
// @generated
|
|
22999
|
+
// This file was automatically generated and should not be edited.
|
|
23000
|
+
//==============================================================
|
|
23001
|
+
// START Enums and Input Objects
|
|
23002
|
+
//==============================================================
|
|
23003
|
+
/**
|
|
23004
|
+
* OrderAdjustment Enum
|
|
23005
|
+
*/
|
|
23006
|
+
var AdjustmentEnum;
|
|
23007
|
+
(function (AdjustmentEnum) {
|
|
23008
|
+
AdjustmentEnum["DECREMENT"] = "DECREMENT";
|
|
23009
|
+
AdjustmentEnum["INCREMENT"] = "INCREMENT";
|
|
23010
|
+
})(AdjustmentEnum || (AdjustmentEnum = {}));
|
|
23011
|
+
/**
|
|
23012
|
+
* Amount Type Enum
|
|
23013
|
+
*/
|
|
23014
|
+
var AmountTypeEnum;
|
|
23015
|
+
(function (AmountTypeEnum) {
|
|
23016
|
+
AmountTypeEnum["AMOUNT"] = "AMOUNT";
|
|
23017
|
+
AmountTypeEnum["RATIO"] = "RATIO";
|
|
23018
|
+
})(AmountTypeEnum || (AmountTypeEnum = {}));
|
|
23019
|
+
/**
|
|
23020
|
+
* Url Slug Target Type Enum Codes
|
|
23021
|
+
*/
|
|
23022
|
+
var BlogMetadataTargetTypeEnum;
|
|
23023
|
+
(function (BlogMetadataTargetTypeEnum) {
|
|
23024
|
+
BlogMetadataTargetTypeEnum["BLOG"] = "BLOG";
|
|
23025
|
+
BlogMetadataTargetTypeEnum["BLOG_CATEGORY"] = "BLOG_CATEGORY";
|
|
23026
|
+
})(BlogMetadataTargetTypeEnum || (BlogMetadataTargetTypeEnum = {}));
|
|
23027
|
+
/**
|
|
23028
|
+
* Cancelled Reason Enum
|
|
23029
|
+
*/
|
|
23030
|
+
var CancelledReasonEnum;
|
|
23031
|
+
(function (CancelledReasonEnum) {
|
|
23032
|
+
CancelledReasonEnum["CUSTOMER"] = "CUSTOMER";
|
|
23033
|
+
CancelledReasonEnum["DECLINED"] = "DECLINED";
|
|
23034
|
+
CancelledReasonEnum["INVENTORY"] = "INVENTORY";
|
|
23035
|
+
CancelledReasonEnum["OTHER"] = "OTHER";
|
|
23036
|
+
})(CancelledReasonEnum || (CancelledReasonEnum = {}));
|
|
23037
|
+
/**
|
|
23038
|
+
* Cart Status Enum
|
|
23039
|
+
*/
|
|
23040
|
+
var CartStatusEnum;
|
|
23041
|
+
(function (CartStatusEnum) {
|
|
23042
|
+
CartStatusEnum["ACTIVE"] = "ACTIVE";
|
|
23043
|
+
CartStatusEnum["PASSIVE"] = "PASSIVE";
|
|
23044
|
+
})(CartStatusEnum || (CartStatusEnum = {}));
|
|
23045
|
+
/**
|
|
23046
|
+
* Checkout Recovery Email Status Enum
|
|
23047
|
+
*/
|
|
23048
|
+
var CheckoutRecoveryEmailStatusEnum;
|
|
23049
|
+
(function (CheckoutRecoveryEmailStatusEnum) {
|
|
23050
|
+
CheckoutRecoveryEmailStatusEnum["NOT_SENT"] = "NOT_SENT";
|
|
23051
|
+
CheckoutRecoveryEmailStatusEnum["SENT"] = "SENT";
|
|
23052
|
+
})(CheckoutRecoveryEmailStatusEnum || (CheckoutRecoveryEmailStatusEnum = {}));
|
|
23053
|
+
/**
|
|
23054
|
+
* Checkout Recovery Status Enum
|
|
23055
|
+
*/
|
|
23056
|
+
var CheckoutRecoveryStatusEnum;
|
|
23057
|
+
(function (CheckoutRecoveryStatusEnum) {
|
|
23058
|
+
CheckoutRecoveryStatusEnum["NOT_RECOVERED"] = "NOT_RECOVERED";
|
|
23059
|
+
CheckoutRecoveryStatusEnum["RECOVERED"] = "RECOVERED";
|
|
23060
|
+
})(CheckoutRecoveryStatusEnum || (CheckoutRecoveryStatusEnum = {}));
|
|
23061
|
+
/**
|
|
23062
|
+
* Checkout Requirement Enum
|
|
23063
|
+
*/
|
|
23064
|
+
var CheckoutRequirementEnum;
|
|
23065
|
+
(function (CheckoutRequirementEnum) {
|
|
23066
|
+
CheckoutRequirementEnum["INVISIBLE"] = "INVISIBLE";
|
|
23067
|
+
CheckoutRequirementEnum["MANDATORY"] = "MANDATORY";
|
|
23068
|
+
CheckoutRequirementEnum["OPTIONAL"] = "OPTIONAL";
|
|
23069
|
+
})(CheckoutRequirementEnum || (CheckoutRequirementEnum = {}));
|
|
23070
|
+
/**
|
|
23071
|
+
* Checkout Status Enum
|
|
23072
|
+
*/
|
|
23073
|
+
var CheckoutStatusEnum;
|
|
23074
|
+
(function (CheckoutStatusEnum) {
|
|
23075
|
+
CheckoutStatusEnum["COMPLETED"] = "COMPLETED";
|
|
23076
|
+
CheckoutStatusEnum["OPEN"] = "OPEN";
|
|
23077
|
+
})(CheckoutStatusEnum || (CheckoutStatusEnum = {}));
|
|
23078
|
+
/**
|
|
23079
|
+
* Customer Account Statuses
|
|
23080
|
+
*/
|
|
23081
|
+
var CustomerAccountStatusesEnum;
|
|
23082
|
+
(function (CustomerAccountStatusesEnum) {
|
|
23083
|
+
CustomerAccountStatusesEnum["ACTIVE_ACCOUNT"] = "ACTIVE_ACCOUNT";
|
|
23084
|
+
CustomerAccountStatusesEnum["DECLINED_ACCOUNT_INVITATION"] = "DECLINED_ACCOUNT_INVITATION";
|
|
23085
|
+
CustomerAccountStatusesEnum["DISABLED_ACCOUNT"] = "DISABLED_ACCOUNT";
|
|
23086
|
+
CustomerAccountStatusesEnum["INVITED_TO_CREATE_ACCOUNT"] = "INVITED_TO_CREATE_ACCOUNT";
|
|
23087
|
+
})(CustomerAccountStatusesEnum || (CustomerAccountStatusesEnum = {}));
|
|
23088
|
+
/**
|
|
23089
|
+
* Url Slug Target Type Enum Codes
|
|
23090
|
+
*/
|
|
23091
|
+
var HTMLMetaDataTargetTypeEnum;
|
|
23092
|
+
(function (HTMLMetaDataTargetTypeEnum) {
|
|
23093
|
+
HTMLMetaDataTargetTypeEnum["BRAND"] = "BRAND";
|
|
23094
|
+
HTMLMetaDataTargetTypeEnum["CATEGORY"] = "CATEGORY";
|
|
23095
|
+
HTMLMetaDataTargetTypeEnum["PAGE"] = "PAGE";
|
|
23096
|
+
HTMLMetaDataTargetTypeEnum["PRODUCT"] = "PRODUCT";
|
|
23097
|
+
})(HTMLMetaDataTargetTypeEnum || (HTMLMetaDataTargetTypeEnum = {}));
|
|
23098
|
+
/**
|
|
23099
|
+
* Order Line Item Status Enum
|
|
23100
|
+
*/
|
|
23101
|
+
var OrderLineItemStatusEnum$1;
|
|
23102
|
+
(function (OrderLineItemStatusEnum) {
|
|
23103
|
+
OrderLineItemStatusEnum["CANCELLED"] = "CANCELLED";
|
|
23104
|
+
OrderLineItemStatusEnum["CANCEL_REJECTED"] = "CANCEL_REJECTED";
|
|
23105
|
+
OrderLineItemStatusEnum["CANCEL_REQUESTED"] = "CANCEL_REQUESTED";
|
|
23106
|
+
OrderLineItemStatusEnum["DELIVERED"] = "DELIVERED";
|
|
23107
|
+
OrderLineItemStatusEnum["FULFILLED"] = "FULFILLED";
|
|
23108
|
+
OrderLineItemStatusEnum["REFUNDED"] = "REFUNDED";
|
|
23109
|
+
OrderLineItemStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
|
|
23110
|
+
OrderLineItemStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
|
|
23111
|
+
OrderLineItemStatusEnum["REFUND_REQUEST_ACCEPTED"] = "REFUND_REQUEST_ACCEPTED";
|
|
23112
|
+
OrderLineItemStatusEnum["UNFULFILLED"] = "UNFULFILLED";
|
|
23113
|
+
})(OrderLineItemStatusEnum$1 || (OrderLineItemStatusEnum$1 = {}));
|
|
23114
|
+
/**
|
|
23115
|
+
* Order Package Fulfill Status Enum
|
|
23116
|
+
*/
|
|
23117
|
+
var OrderPackageFulfillStatusEnum;
|
|
23118
|
+
(function (OrderPackageFulfillStatusEnum) {
|
|
23119
|
+
OrderPackageFulfillStatusEnum["CANCELLED"] = "CANCELLED";
|
|
23120
|
+
OrderPackageFulfillStatusEnum["CANCEL_REJECTED"] = "CANCEL_REJECTED";
|
|
23121
|
+
OrderPackageFulfillStatusEnum["CANCEL_REQUESTED"] = "CANCEL_REQUESTED";
|
|
23122
|
+
OrderPackageFulfillStatusEnum["DELIVERED"] = "DELIVERED";
|
|
23123
|
+
OrderPackageFulfillStatusEnum["ERROR"] = "ERROR";
|
|
23124
|
+
OrderPackageFulfillStatusEnum["FULFILLED"] = "FULFILLED";
|
|
23125
|
+
OrderPackageFulfillStatusEnum["READY_FOR_SHIPMENT"] = "READY_FOR_SHIPMENT";
|
|
23126
|
+
OrderPackageFulfillStatusEnum["REFUNDED"] = "REFUNDED";
|
|
23127
|
+
OrderPackageFulfillStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
|
|
23128
|
+
OrderPackageFulfillStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
|
|
23129
|
+
OrderPackageFulfillStatusEnum["REFUND_REQUEST_ACCEPTED"] = "REFUND_REQUEST_ACCEPTED";
|
|
23130
|
+
})(OrderPackageFulfillStatusEnum || (OrderPackageFulfillStatusEnum = {}));
|
|
23131
|
+
/**
|
|
23132
|
+
* Order Package Status Enum
|
|
23133
|
+
*/
|
|
23134
|
+
var OrderPackageStatusEnum;
|
|
23135
|
+
(function (OrderPackageStatusEnum) {
|
|
23136
|
+
OrderPackageStatusEnum["CANCELLED"] = "CANCELLED";
|
|
23137
|
+
OrderPackageStatusEnum["CANCEL_REJECTED"] = "CANCEL_REJECTED";
|
|
23138
|
+
OrderPackageStatusEnum["CANCEL_REQUESTED"] = "CANCEL_REQUESTED";
|
|
23139
|
+
OrderPackageStatusEnum["DELIVERED"] = "DELIVERED";
|
|
23140
|
+
OrderPackageStatusEnum["FULFILLED"] = "FULFILLED";
|
|
23141
|
+
OrderPackageStatusEnum["PARTIALLY_CANCELLED"] = "PARTIALLY_CANCELLED";
|
|
23142
|
+
OrderPackageStatusEnum["PARTIALLY_DELIVERED"] = "PARTIALLY_DELIVERED";
|
|
23143
|
+
OrderPackageStatusEnum["PARTIALLY_FULFILLED"] = "PARTIALLY_FULFILLED";
|
|
23144
|
+
OrderPackageStatusEnum["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
|
|
23145
|
+
OrderPackageStatusEnum["READY_FOR_SHIPMENT"] = "READY_FOR_SHIPMENT";
|
|
23146
|
+
OrderPackageStatusEnum["REFUNDED"] = "REFUNDED";
|
|
23147
|
+
OrderPackageStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
|
|
23148
|
+
OrderPackageStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
|
|
23149
|
+
OrderPackageStatusEnum["REFUND_REQUEST_ACCEPTED"] = "REFUND_REQUEST_ACCEPTED";
|
|
23150
|
+
OrderPackageStatusEnum["UNABLE_TO_DELIVER"] = "UNABLE_TO_DELIVER";
|
|
23151
|
+
OrderPackageStatusEnum["UNFULFILLED"] = "UNFULFILLED";
|
|
23152
|
+
})(OrderPackageStatusEnum || (OrderPackageStatusEnum = {}));
|
|
23153
|
+
/**
|
|
23154
|
+
* Order Status Enum
|
|
23155
|
+
*/
|
|
23156
|
+
var OrderStatusEnum;
|
|
23157
|
+
(function (OrderStatusEnum) {
|
|
23158
|
+
OrderStatusEnum["CANCELLED"] = "CANCELLED";
|
|
23159
|
+
OrderStatusEnum["CREATED"] = "CREATED";
|
|
23160
|
+
OrderStatusEnum["DRAFT"] = "DRAFT";
|
|
23161
|
+
OrderStatusEnum["PARTIALLY_CANCELLED"] = "PARTIALLY_CANCELLED";
|
|
23162
|
+
OrderStatusEnum["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
|
|
23163
|
+
OrderStatusEnum["REFUNDED"] = "REFUNDED";
|
|
23164
|
+
OrderStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
|
|
23165
|
+
OrderStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
|
|
23166
|
+
})(OrderStatusEnum || (OrderStatusEnum = {}));
|
|
23167
|
+
/**
|
|
23168
|
+
* Payment Method Enum
|
|
23169
|
+
*/
|
|
23170
|
+
var PaymentMethodEnum;
|
|
23171
|
+
(function (PaymentMethodEnum) {
|
|
23172
|
+
PaymentMethodEnum["BUY_ONLINE_PAY_AT_STORE"] = "BUY_ONLINE_PAY_AT_STORE";
|
|
23173
|
+
PaymentMethodEnum["CASH"] = "CASH";
|
|
23174
|
+
PaymentMethodEnum["CASH_ON_DELIVERY"] = "CASH_ON_DELIVERY";
|
|
23175
|
+
PaymentMethodEnum["CREDIT_CARD"] = "CREDIT_CARD";
|
|
23176
|
+
PaymentMethodEnum["CREDIT_CARD_ON_DELIVERY"] = "CREDIT_CARD_ON_DELIVERY";
|
|
23177
|
+
PaymentMethodEnum["GIFT_CARD"] = "GIFT_CARD";
|
|
23178
|
+
PaymentMethodEnum["MONEY_ORDER"] = "MONEY_ORDER";
|
|
23179
|
+
PaymentMethodEnum["OTHER"] = "OTHER";
|
|
23180
|
+
})(PaymentMethodEnum || (PaymentMethodEnum = {}));
|
|
23181
|
+
/**
|
|
23182
|
+
* Payment Status Enum
|
|
23183
|
+
*/
|
|
23184
|
+
var PaymentStatusEnum;
|
|
23185
|
+
(function (PaymentStatusEnum) {
|
|
23186
|
+
PaymentStatusEnum["PAID"] = "PAID";
|
|
23187
|
+
PaymentStatusEnum["PARTIALLY_PAID"] = "PARTIALLY_PAID";
|
|
23188
|
+
PaymentStatusEnum["WAITING"] = "WAITING";
|
|
23189
|
+
})(PaymentStatusEnum || (PaymentStatusEnum = {}));
|
|
23190
|
+
/**
|
|
23191
|
+
* ProductAttribute Types
|
|
23192
|
+
*/
|
|
23193
|
+
var ProductAttributeTypeEnum;
|
|
23194
|
+
(function (ProductAttributeTypeEnum) {
|
|
23195
|
+
ProductAttributeTypeEnum["BOOLEAN"] = "BOOLEAN";
|
|
23196
|
+
ProductAttributeTypeEnum["CHOICE"] = "CHOICE";
|
|
23197
|
+
ProductAttributeTypeEnum["DATETIME"] = "DATETIME";
|
|
23198
|
+
ProductAttributeTypeEnum["HTML"] = "HTML";
|
|
23199
|
+
ProductAttributeTypeEnum["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
|
|
23200
|
+
ProductAttributeTypeEnum["NUMERIC"] = "NUMERIC";
|
|
23201
|
+
ProductAttributeTypeEnum["TEXT"] = "TEXT";
|
|
23202
|
+
})(ProductAttributeTypeEnum || (ProductAttributeTypeEnum = {}));
|
|
23203
|
+
/**
|
|
23204
|
+
* Product Filter Type Enum Codes
|
|
23205
|
+
*/
|
|
23206
|
+
var ProductFilterDisplayTypeEnum;
|
|
23207
|
+
(function (ProductFilterDisplayTypeEnum) {
|
|
23208
|
+
ProductFilterDisplayTypeEnum["BOX"] = "BOX";
|
|
23209
|
+
ProductFilterDisplayTypeEnum["DATE_RANGE"] = "DATE_RANGE";
|
|
23210
|
+
ProductFilterDisplayTypeEnum["LIST"] = "LIST";
|
|
23211
|
+
ProductFilterDisplayTypeEnum["NUMBER_RANGE"] = "NUMBER_RANGE";
|
|
23212
|
+
ProductFilterDisplayTypeEnum["NUMBER_RANGE_LIST"] = "NUMBER_RANGE_LIST";
|
|
23213
|
+
ProductFilterDisplayTypeEnum["SWATCH"] = "SWATCH";
|
|
23214
|
+
})(ProductFilterDisplayTypeEnum || (ProductFilterDisplayTypeEnum = {}));
|
|
23215
|
+
/**
|
|
23216
|
+
* ProductFilter Sort Type Enum
|
|
23217
|
+
*/
|
|
23218
|
+
var ProductFilterSortTypeEnum;
|
|
23219
|
+
(function (ProductFilterSortTypeEnum) {
|
|
23220
|
+
ProductFilterSortTypeEnum["ALPHABETICAL_ASC"] = "ALPHABETICAL_ASC";
|
|
23221
|
+
ProductFilterSortTypeEnum["ALPHABETICAL_DESC"] = "ALPHABETICAL_DESC";
|
|
23222
|
+
ProductFilterSortTypeEnum["PRODUCT_COUNT_ASC"] = "PRODUCT_COUNT_ASC";
|
|
23223
|
+
ProductFilterSortTypeEnum["PRODUCT_COUNT_DESC"] = "PRODUCT_COUNT_DESC";
|
|
23224
|
+
})(ProductFilterSortTypeEnum || (ProductFilterSortTypeEnum = {}));
|
|
23225
|
+
/**
|
|
23226
|
+
* Product Filter Type Enum Codes
|
|
23227
|
+
*/
|
|
23228
|
+
var ProductFilterTypeEnum;
|
|
23229
|
+
(function (ProductFilterTypeEnum) {
|
|
23230
|
+
ProductFilterTypeEnum["ATTRIBUTE"] = "ATTRIBUTE";
|
|
23231
|
+
ProductFilterTypeEnum["BRAND"] = "BRAND";
|
|
23232
|
+
ProductFilterTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
|
|
23233
|
+
ProductFilterTypeEnum["PRICE"] = "PRICE";
|
|
23234
|
+
ProductFilterTypeEnum["STOCK_STATUS"] = "STOCK_STATUS";
|
|
23235
|
+
ProductFilterTypeEnum["TAG"] = "TAG";
|
|
23236
|
+
ProductFilterTypeEnum["VARIANT_TYPE"] = "VARIANT_TYPE";
|
|
23237
|
+
})(ProductFilterTypeEnum || (ProductFilterTypeEnum = {}));
|
|
23238
|
+
/**
|
|
23239
|
+
* Shipping Method Enum
|
|
23240
|
+
*/
|
|
23241
|
+
var ShippingMethodEnum;
|
|
23242
|
+
(function (ShippingMethodEnum) {
|
|
23243
|
+
ShippingMethodEnum["CLICK_AND_COLLECT"] = "CLICK_AND_COLLECT";
|
|
23244
|
+
ShippingMethodEnum["NO_SHIPMENT"] = "NO_SHIPMENT";
|
|
23245
|
+
ShippingMethodEnum["SHIPMENT"] = "SHIPMENT";
|
|
23246
|
+
})(ShippingMethodEnum || (ShippingMethodEnum = {}));
|
|
23247
|
+
/**
|
|
23248
|
+
* Sort By Direction Enum Codes
|
|
23249
|
+
*/
|
|
23250
|
+
var SortByDirectionEnum;
|
|
23251
|
+
(function (SortByDirectionEnum) {
|
|
23252
|
+
SortByDirectionEnum["ASC"] = "ASC";
|
|
23253
|
+
SortByDirectionEnum["DESC"] = "DESC";
|
|
23254
|
+
})(SortByDirectionEnum || (SortByDirectionEnum = {}));
|
|
23255
|
+
/**
|
|
23256
|
+
* Sort By Type Enum Codes
|
|
23257
|
+
*/
|
|
23258
|
+
var SortByTypeEnum;
|
|
23259
|
+
(function (SortByTypeEnum) {
|
|
23260
|
+
SortByTypeEnum["CREATED_AT"] = "CREATED_AT";
|
|
23261
|
+
SortByTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
|
|
23262
|
+
SortByTypeEnum["NAME"] = "NAME";
|
|
23263
|
+
SortByTypeEnum["PRICE"] = "PRICE";
|
|
23264
|
+
})(SortByTypeEnum || (SortByTypeEnum = {}));
|
|
23265
|
+
/**
|
|
23266
|
+
* StorefrontStatusEnum
|
|
23267
|
+
*/
|
|
23268
|
+
var StorefrontStatusTypes;
|
|
23269
|
+
(function (StorefrontStatusTypes) {
|
|
23270
|
+
StorefrontStatusTypes["FAILED"] = "FAILED";
|
|
23271
|
+
StorefrontStatusTypes["NOT_DEPLOYED"] = "NOT_DEPLOYED";
|
|
23272
|
+
StorefrontStatusTypes["READY"] = "READY";
|
|
23273
|
+
StorefrontStatusTypes["WAITING"] = "WAITING";
|
|
23274
|
+
})(StorefrontStatusTypes || (StorefrontStatusTypes = {}));
|
|
23275
|
+
/**
|
|
23276
|
+
* StorefrontThemeStatusEnum
|
|
23277
|
+
*/
|
|
23278
|
+
var StorefrontThemeStatus;
|
|
23279
|
+
(function (StorefrontThemeStatus) {
|
|
23280
|
+
StorefrontThemeStatus["FAILED"] = "FAILED";
|
|
23281
|
+
StorefrontThemeStatus["NOT_DEPLOYED"] = "NOT_DEPLOYED";
|
|
23282
|
+
StorefrontThemeStatus["READY"] = "READY";
|
|
23283
|
+
StorefrontThemeStatus["WAITING"] = "WAITING";
|
|
23284
|
+
})(StorefrontThemeStatus || (StorefrontThemeStatus = {}));
|
|
23285
|
+
/**
|
|
23286
|
+
* Transaction Card Association Enum
|
|
23287
|
+
*/
|
|
23288
|
+
var TransactionCardAssociationEnum;
|
|
23289
|
+
(function (TransactionCardAssociationEnum) {
|
|
23290
|
+
TransactionCardAssociationEnum["AMERICAN_EXPRESS"] = "AMERICAN_EXPRESS";
|
|
23291
|
+
TransactionCardAssociationEnum["MASTER_CARD"] = "MASTER_CARD";
|
|
23292
|
+
TransactionCardAssociationEnum["TROY"] = "TROY";
|
|
23293
|
+
TransactionCardAssociationEnum["VISA"] = "VISA";
|
|
23294
|
+
})(TransactionCardAssociationEnum || (TransactionCardAssociationEnum = {}));
|
|
23295
|
+
/**
|
|
23296
|
+
* Transaction Card Type Enum
|
|
23297
|
+
*/
|
|
23298
|
+
var TransactionCardTypeEnum;
|
|
23299
|
+
(function (TransactionCardTypeEnum) {
|
|
23300
|
+
TransactionCardTypeEnum["CREDIT"] = "CREDIT";
|
|
23301
|
+
TransactionCardTypeEnum["DEBIT"] = "DEBIT";
|
|
23302
|
+
TransactionCardTypeEnum["PREPAID"] = "PREPAID";
|
|
23303
|
+
})(TransactionCardTypeEnum || (TransactionCardTypeEnum = {}));
|
|
23304
|
+
/**
|
|
23305
|
+
* Transaction Status Enum
|
|
23306
|
+
*/
|
|
23307
|
+
var TransactionStatusEnum;
|
|
23308
|
+
(function (TransactionStatusEnum) {
|
|
23309
|
+
TransactionStatusEnum["AUTHORIZED"] = "AUTHORIZED";
|
|
23310
|
+
TransactionStatusEnum["FAILED"] = "FAILED";
|
|
23311
|
+
TransactionStatusEnum["PENDING"] = "PENDING";
|
|
23312
|
+
TransactionStatusEnum["SUCCESS"] = "SUCCESS";
|
|
23313
|
+
})(TransactionStatusEnum || (TransactionStatusEnum = {}));
|
|
23314
|
+
/**
|
|
23315
|
+
* Transaction Type Enum
|
|
23316
|
+
*/
|
|
23317
|
+
var TransactionTypeEnum;
|
|
23318
|
+
(function (TransactionTypeEnum) {
|
|
23319
|
+
TransactionTypeEnum["REFUND"] = "REFUND";
|
|
23320
|
+
TransactionTypeEnum["SALE"] = "SALE";
|
|
23321
|
+
TransactionTypeEnum["VOID"] = "VOID";
|
|
23322
|
+
})(TransactionTypeEnum || (TransactionTypeEnum = {}));
|
|
23323
|
+
/**
|
|
23324
|
+
* Variant Selection Types
|
|
23325
|
+
*/
|
|
23326
|
+
var VariantSelectionTypeEnum;
|
|
23327
|
+
(function (VariantSelectionTypeEnum) {
|
|
23328
|
+
VariantSelectionTypeEnum["CHOICE"] = "CHOICE";
|
|
23329
|
+
VariantSelectionTypeEnum["COLOR"] = "COLOR";
|
|
23330
|
+
})(VariantSelectionTypeEnum || (VariantSelectionTypeEnum = {}));
|
|
23331
|
+
//==============================================================
|
|
23332
|
+
// END Enums and Input Objects
|
|
23333
|
+
//==============================================================
|
|
23334
|
+
|
|
22191
23335
|
var IkasProductList = /** @class */ (function () {
|
|
22192
23336
|
function IkasProductList(data, router) {
|
|
22193
23337
|
var _this = this;
|
|
@@ -22232,22 +23376,23 @@ var IkasProductList = /** @class */ (function () {
|
|
|
22232
23376
|
}); };
|
|
22233
23377
|
this.getInitial = function (queryParams) { return __awaiter(_this, void 0, void 0, function () {
|
|
22234
23378
|
var fetchRequestTime, page, limit, response_1, data, err_1;
|
|
22235
|
-
|
|
22236
|
-
|
|
23379
|
+
var _a;
|
|
23380
|
+
return __generator(this, function (_b) {
|
|
23381
|
+
switch (_b.label) {
|
|
22237
23382
|
case 0:
|
|
22238
23383
|
this._isLoading = true;
|
|
22239
23384
|
fetchRequestTime = Date.now();
|
|
22240
23385
|
this._fetchRequestTime = fetchRequestTime;
|
|
22241
|
-
|
|
23386
|
+
_b.label = 1;
|
|
22242
23387
|
case 1:
|
|
22243
|
-
|
|
23388
|
+
_b.trys.push([1, 5, 6, 7]);
|
|
22244
23389
|
page = 1;
|
|
22245
23390
|
limit = this._limit;
|
|
22246
23391
|
if (!(this.isFilterable && !this.filters)) return [3 /*break*/, 3];
|
|
22247
23392
|
return [4 /*yield*/, this.getFilters()];
|
|
22248
23393
|
case 2:
|
|
22249
|
-
|
|
22250
|
-
|
|
23394
|
+
_b.sent();
|
|
23395
|
+
_b.label = 3;
|
|
22251
23396
|
case 3:
|
|
22252
23397
|
this.applyQueryParamFilters(queryParams);
|
|
22253
23398
|
if (this.isSearch && !this.hasAppliedfilter) {
|
|
@@ -22272,16 +23417,18 @@ var IkasProductList = /** @class */ (function () {
|
|
|
22272
23417
|
}
|
|
22273
23418
|
return [4 /*yield*/, this.searchProducts(page || 1, limit || 10)];
|
|
22274
23419
|
case 4:
|
|
22275
|
-
response_1 =
|
|
23420
|
+
response_1 = _b.sent();
|
|
22276
23421
|
if (!response_1 || this._fetchRequestTime !== fetchRequestTime)
|
|
22277
23422
|
return [2 /*return*/];
|
|
22278
23423
|
data = [];
|
|
22279
23424
|
if (this.isStatic) {
|
|
22280
|
-
data =
|
|
22281
|
-
|
|
22282
|
-
|
|
22283
|
-
|
|
22284
|
-
|
|
23425
|
+
data =
|
|
23426
|
+
((_a = this._productListPropValue.productIds) === null || _a === void 0 ? void 0 : _a.map(function (pID) {
|
|
23427
|
+
var product = response_1.data.find(function (p) { return p.id === pID.productId; });
|
|
23428
|
+
var variant = product === null || product === void 0 ? void 0 : product.variants.find(function (v) { return v.id === pID.variantId; });
|
|
23429
|
+
if (product && variant)
|
|
23430
|
+
return new IkasProductDetail(product, variant.variantValues);
|
|
23431
|
+
}).filter(function (p) { return !!p; })) || [];
|
|
22285
23432
|
}
|
|
22286
23433
|
else {
|
|
22287
23434
|
data = response_1.data.map(function (product) {
|
|
@@ -22296,7 +23443,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
22296
23443
|
this._minPage = this.page;
|
|
22297
23444
|
return [2 /*return*/, true];
|
|
22298
23445
|
case 5:
|
|
22299
|
-
err_1 =
|
|
23446
|
+
err_1 = _b.sent();
|
|
22300
23447
|
console.log(err_1);
|
|
22301
23448
|
return [3 /*break*/, 7];
|
|
22302
23449
|
case 6:
|
|
@@ -22437,7 +23584,11 @@ var IkasProductList = /** @class */ (function () {
|
|
|
22437
23584
|
this._sort =
|
|
22438
23585
|
data.sort ||
|
|
22439
23586
|
data.productListPropValue.initialSort ||
|
|
22440
|
-
exports.IkasProductListSortType.
|
|
23587
|
+
exports.IkasProductListSortType.LAST_ADDED;
|
|
23588
|
+
// TODO remove this later
|
|
23589
|
+
//@ts-ignore
|
|
23590
|
+
if (this.initialSort === "A_Z" || this.initialSort === "Z_A")
|
|
23591
|
+
this._sort = exports.IkasProductListSortType.LAST_ADDED;
|
|
22441
23592
|
this._limit = data.limit || data.productListPropValue.initialLimit || 20;
|
|
22442
23593
|
this._page = data.page || 1;
|
|
22443
23594
|
this._count = data.count || 0;
|
|
@@ -22621,6 +23772,48 @@ var IkasProductList = /** @class */ (function () {
|
|
|
22621
23772
|
enumerable: false,
|
|
22622
23773
|
configurable: true
|
|
22623
23774
|
});
|
|
23775
|
+
IkasProductList.prototype.getSortParams = function () {
|
|
23776
|
+
var direction = SortByDirectionEnum.DESC;
|
|
23777
|
+
var type = SortByTypeEnum.CREATED_AT;
|
|
23778
|
+
switch (this._sort) {
|
|
23779
|
+
// case IkasProductListSortType.A_Z:
|
|
23780
|
+
// direction = SortByDirectionEnum.ASC;
|
|
23781
|
+
// type = SortByTypeEnum.NAME;
|
|
23782
|
+
// break;
|
|
23783
|
+
// case IkasProductListSortType.Z_A:
|
|
23784
|
+
// direction = SortByDirectionEnum.DESC;
|
|
23785
|
+
// type = SortByTypeEnum.NAME;
|
|
23786
|
+
// break;
|
|
23787
|
+
case exports.IkasProductListSortType.INCREASING_PRICE:
|
|
23788
|
+
direction = SortByDirectionEnum.ASC;
|
|
23789
|
+
type = SortByTypeEnum.PRICE;
|
|
23790
|
+
break;
|
|
23791
|
+
case exports.IkasProductListSortType.DECREASING_PRICE:
|
|
23792
|
+
direction = SortByDirectionEnum.DESC;
|
|
23793
|
+
type = SortByTypeEnum.PRICE;
|
|
23794
|
+
break;
|
|
23795
|
+
case exports.IkasProductListSortType.FIRST_ADDED:
|
|
23796
|
+
direction = SortByDirectionEnum.DESC;
|
|
23797
|
+
type = SortByTypeEnum.CREATED_AT;
|
|
23798
|
+
break;
|
|
23799
|
+
case exports.IkasProductListSortType.LAST_ADDED:
|
|
23800
|
+
direction = SortByDirectionEnum.ASC;
|
|
23801
|
+
type = SortByTypeEnum.CREATED_AT;
|
|
23802
|
+
break;
|
|
23803
|
+
case exports.IkasProductListSortType.INCREASING_DISCOUNT:
|
|
23804
|
+
direction = SortByDirectionEnum.ASC;
|
|
23805
|
+
type = SortByTypeEnum.DISCOUNT_RATIO;
|
|
23806
|
+
break;
|
|
23807
|
+
case exports.IkasProductListSortType.DECRASING_DISCOUNT:
|
|
23808
|
+
direction = SortByDirectionEnum.DESC;
|
|
23809
|
+
type = SortByTypeEnum.DISCOUNT_RATIO;
|
|
23810
|
+
break;
|
|
23811
|
+
}
|
|
23812
|
+
return {
|
|
23813
|
+
direction: direction,
|
|
23814
|
+
type: type,
|
|
23815
|
+
};
|
|
23816
|
+
};
|
|
22624
23817
|
IkasProductList.prototype.searchProducts = function (page, limit) {
|
|
22625
23818
|
var _a, _b;
|
|
22626
23819
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -22661,6 +23854,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
22661
23854
|
priceListId: IkasStorefrontConfig.priceListId,
|
|
22662
23855
|
salesChannelId: IkasStorefrontConfig.salesChannelId,
|
|
22663
23856
|
query: this._searchKeyword,
|
|
23857
|
+
order: [this.getSortParams()],
|
|
22664
23858
|
})];
|
|
22665
23859
|
case 1: return [2 /*return*/, _c.sent()];
|
|
22666
23860
|
}
|
|
@@ -22759,6 +23953,20 @@ var IkasProductList = /** @class */ (function () {
|
|
|
22759
23953
|
}
|
|
22760
23954
|
this.applyFilters();
|
|
22761
23955
|
};
|
|
23956
|
+
IkasProductList.prototype.setSortType = function (sortType) {
|
|
23957
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23958
|
+
return __generator(this, function (_a) {
|
|
23959
|
+
switch (_a.label) {
|
|
23960
|
+
case 0:
|
|
23961
|
+
this._sort = sortType;
|
|
23962
|
+
return [4 /*yield*/, this.getInitial()];
|
|
23963
|
+
case 1:
|
|
23964
|
+
_a.sent();
|
|
23965
|
+
return [2 /*return*/];
|
|
23966
|
+
}
|
|
23967
|
+
});
|
|
23968
|
+
});
|
|
23969
|
+
};
|
|
22762
23970
|
IkasProductList.prototype.onFilterCategoryClick = function (filterCategory, disableRoute) {
|
|
22763
23971
|
var _a;
|
|
22764
23972
|
if (disableRoute === void 0) { disableRoute = false; }
|
|
@@ -22820,14 +24028,14 @@ var IkasProductList = /** @class */ (function () {
|
|
|
22820
24028
|
IkasProductListType["SEARCH"] = "SEARCH";
|
|
22821
24029
|
})(exports.IkasProductListType || (exports.IkasProductListType = {}));
|
|
22822
24030
|
(function (IkasProductListSortType) {
|
|
22823
|
-
|
|
22824
|
-
|
|
24031
|
+
// A_Z = "A_Z",
|
|
24032
|
+
// Z_A = "Z_A",
|
|
22825
24033
|
IkasProductListSortType["INCREASING_PRICE"] = "INCREASING_PRICE";
|
|
22826
24034
|
IkasProductListSortType["DECREASING_PRICE"] = "DECREASING_PRICE";
|
|
22827
|
-
IkasProductListSortType["A_Z"] = "A_Z";
|
|
22828
|
-
IkasProductListSortType["Z_A"] = "Z_A";
|
|
22829
24035
|
IkasProductListSortType["LAST_ADDED"] = "LAST_ADDED";
|
|
22830
24036
|
IkasProductListSortType["FIRST_ADDED"] = "FIRST_ADDED";
|
|
24037
|
+
IkasProductListSortType["INCREASING_DISCOUNT"] = "INCREASING_DISCOUNT";
|
|
24038
|
+
IkasProductListSortType["DECRASING_DISCOUNT"] = "DECRASING_DISCOUNT";
|
|
22831
24039
|
})(exports.IkasProductListSortType || (exports.IkasProductListSortType = {}));
|
|
22832
24040
|
|
|
22833
24041
|
/**
|
|
@@ -24736,7 +25944,7 @@ var IkasProductListPropValue = /** @class */ (function () {
|
|
|
24736
25944
|
this.usePageFilter = null;
|
|
24737
25945
|
this.category = null;
|
|
24738
25946
|
this.productListType = data.productListType || exports.IkasProductListType.ALL;
|
|
24739
|
-
this.initialSort = data.initialSort || exports.IkasProductListSortType.
|
|
25947
|
+
this.initialSort = data.initialSort || exports.IkasProductListSortType.LAST_ADDED;
|
|
24740
25948
|
this.initialLimit = data.initialLimit || 20;
|
|
24741
25949
|
this.productCount = data.productCount;
|
|
24742
25950
|
this.productIds = data.productIds;
|
|
@@ -24790,6 +25998,34 @@ var IkasCategoryListPropValue = /** @class */ (function () {
|
|
|
24790
25998
|
return IkasCategoryListPropValue;
|
|
24791
25999
|
}());
|
|
24792
26000
|
|
|
26001
|
+
var IkasBlogPropValue = /** @class */ (function () {
|
|
26002
|
+
function IkasBlogPropValue(data) {
|
|
26003
|
+
this.blogId = null;
|
|
26004
|
+
// Only for product detail page
|
|
26005
|
+
this.usePageData = null;
|
|
26006
|
+
this.blogId = data.blogId;
|
|
26007
|
+
this.usePageData = data.usePageData;
|
|
26008
|
+
mobx.makeAutoObservable(this);
|
|
26009
|
+
}
|
|
26010
|
+
return IkasBlogPropValue;
|
|
26011
|
+
}());
|
|
26012
|
+
|
|
26013
|
+
var IkasBlogListPropValue = /** @class */ (function () {
|
|
26014
|
+
function IkasBlogListPropValue(data) {
|
|
26015
|
+
this.initialLimit = null;
|
|
26016
|
+
// Only for static lists
|
|
26017
|
+
this.blogIds = null;
|
|
26018
|
+
this.usePageFilter = null;
|
|
26019
|
+
this.blogListType = data.blogListType || exports.IkasBlogListType.ALL;
|
|
26020
|
+
this.initialLimit = data.initialLimit || 20;
|
|
26021
|
+
this.blogIds = data.blogIds;
|
|
26022
|
+
this.categoryId = data.categoryId || null;
|
|
26023
|
+
this.usePageFilter = data.usePageFilter || null;
|
|
26024
|
+
mobx.makeAutoObservable(this);
|
|
26025
|
+
}
|
|
26026
|
+
return IkasBlogListPropValue;
|
|
26027
|
+
}());
|
|
26028
|
+
|
|
24793
26029
|
var IkasBrandAPI = /** @class */ (function () {
|
|
24794
26030
|
function IkasBrandAPI() {
|
|
24795
26031
|
}
|
|
@@ -24799,7 +26035,7 @@ var IkasBrandAPI = /** @class */ (function () {
|
|
|
24799
26035
|
return __generator(this, function (_b) {
|
|
24800
26036
|
switch (_b.label) {
|
|
24801
26037
|
case 0:
|
|
24802
|
-
LIST_QUERY = src(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query listProductBrand(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listProductBrand(id: $id
|
|
26038
|
+
LIST_QUERY = src(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n query listProductBrand(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n $sort: String\n ) {\n listProductBrand(\n id: $id\n pagination: $pagination\n name: $name\n sort: $sort\n ) {\n data {\n id\n name\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n count\n }\n }\n "], ["\n query listProductBrand(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n $sort: String\n ) {\n listProductBrand(\n id: $id\n pagination: $pagination\n name: $name\n sort: $sort\n ) {\n data {\n id\n name\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n count\n }\n }\n "])));
|
|
24803
26039
|
_b.label = 1;
|
|
24804
26040
|
case 1:
|
|
24805
26041
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -24822,6 +26058,7 @@ var IkasBrandAPI = /** @class */ (function () {
|
|
|
24822
26058
|
like: params.search,
|
|
24823
26059
|
}
|
|
24824
26060
|
: undefined,
|
|
26061
|
+
sort: (params === null || params === void 0 ? void 0 : params.sort) || null,
|
|
24825
26062
|
},
|
|
24826
26063
|
})];
|
|
24827
26064
|
case 2:
|
|
@@ -24860,7 +26097,7 @@ var IkasBrandAPI = /** @class */ (function () {
|
|
|
24860
26097
|
};
|
|
24861
26098
|
return IkasBrandAPI;
|
|
24862
26099
|
}());
|
|
24863
|
-
var templateObject_1;
|
|
26100
|
+
var templateObject_1$1;
|
|
24864
26101
|
|
|
24865
26102
|
var IkasCartAPI = /** @class */ (function () {
|
|
24866
26103
|
function IkasCartAPI() {
|
|
@@ -24871,7 +26108,7 @@ var IkasCartAPI = /** @class */ (function () {
|
|
|
24871
26108
|
return __generator(this, function (_b) {
|
|
24872
26109
|
switch (_b.label) {
|
|
24873
26110
|
case 0:
|
|
24874
|
-
MUTATION = src(templateObject_1$
|
|
26111
|
+
MUTATION = src(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n mutation saveItemToCart($input: SaveItemToCartInput!) {\n saveItemToCart(input: $input) {\n id\n createdAt\n updatedAt\n dueDate\n currencyCode\n customerId\n merchantId\n itemCount\n totalPrice\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n items {\n createdAt\n currencyCode\n deleted\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n id\n name\n sku\n slug\n barcodeList\n mainImageId\n productId\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n }\n }\n "], ["\n mutation saveItemToCart($input: SaveItemToCartInput!) {\n saveItemToCart(input: $input) {\n id\n createdAt\n updatedAt\n dueDate\n currencyCode\n customerId\n merchantId\n itemCount\n totalPrice\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n items {\n createdAt\n currencyCode\n deleted\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n id\n name\n sku\n slug\n barcodeList\n mainImageId\n productId\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n }\n }\n "])));
|
|
24875
26112
|
_b.label = 1;
|
|
24876
26113
|
case 1:
|
|
24877
26114
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -24906,7 +26143,7 @@ var IkasCartAPI = /** @class */ (function () {
|
|
|
24906
26143
|
return __generator(this, function (_b) {
|
|
24907
26144
|
switch (_b.label) {
|
|
24908
26145
|
case 0:
|
|
24909
|
-
QUERY = src(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query getCart(\n $cartId: String\n $customerId: String\n $storefrontRoutingId: String\n ) {\n getCart(\n id: $cartId\n customerId: $customerId\n storefrontRoutingId: $storefrontRoutingId\n ) {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n slug\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n }\n "], ["\n query getCart(\n $cartId: String\n $customerId: String\n $storefrontRoutingId: String\n ) {\n getCart(\n id: $cartId\n customerId: $customerId\n storefrontRoutingId: $storefrontRoutingId\n ) {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n slug\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n }\n "])));
|
|
26146
|
+
QUERY = src(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n query getCart(\n $cartId: String\n $customerId: String\n $storefrontRoutingId: String\n ) {\n getCart(\n id: $cartId\n customerId: $customerId\n storefrontRoutingId: $storefrontRoutingId\n ) {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n slug\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n }\n "], ["\n query getCart(\n $cartId: String\n $customerId: String\n $storefrontRoutingId: String\n ) {\n getCart(\n id: $cartId\n customerId: $customerId\n storefrontRoutingId: $storefrontRoutingId\n ) {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n slug\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n }\n "])));
|
|
24910
26147
|
_b.label = 1;
|
|
24911
26148
|
case 1:
|
|
24912
26149
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -24939,7 +26176,7 @@ var IkasCartAPI = /** @class */ (function () {
|
|
|
24939
26176
|
};
|
|
24940
26177
|
return IkasCartAPI;
|
|
24941
26178
|
}());
|
|
24942
|
-
var templateObject_1$
|
|
26179
|
+
var templateObject_1$2, templateObject_2$1;
|
|
24943
26180
|
|
|
24944
26181
|
var IkasCategoryAPI = /** @class */ (function () {
|
|
24945
26182
|
function IkasCategoryAPI() {
|
|
@@ -24950,7 +26187,7 @@ var IkasCategoryAPI = /** @class */ (function () {
|
|
|
24950
26187
|
return __generator(this, function (_b) {
|
|
24951
26188
|
switch (_b.label) {
|
|
24952
26189
|
case 0:
|
|
24953
|
-
LIST_QUERY = src(templateObject_1$
|
|
26190
|
+
LIST_QUERY = src(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n $sort: String\n ) {\n listCategory(\n id: $id\n pagination: $pagination\n name: $name\n sort: $sort\n ) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n categoryPath\n }\n count\n }\n }\n "], ["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n $sort: String\n ) {\n listCategory(\n id: $id\n pagination: $pagination\n name: $name\n sort: $sort\n ) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n categoryPath\n }\n count\n }\n }\n "])));
|
|
24954
26191
|
_b.label = 1;
|
|
24955
26192
|
case 1:
|
|
24956
26193
|
_b.trys.push([1, 10, , 11]);
|
|
@@ -24973,6 +26210,7 @@ var IkasCategoryAPI = /** @class */ (function () {
|
|
|
24973
26210
|
like: params.search,
|
|
24974
26211
|
}
|
|
24975
26212
|
: undefined,
|
|
26213
|
+
sort: (params === null || params === void 0 ? void 0 : params.sort) || null,
|
|
24976
26214
|
},
|
|
24977
26215
|
})];
|
|
24978
26216
|
case 2:
|
|
@@ -25059,7 +26297,7 @@ var IkasCategoryAPI = /** @class */ (function () {
|
|
|
25059
26297
|
return __generator(this, function (_b) {
|
|
25060
26298
|
switch (_b.label) {
|
|
25061
26299
|
case 0:
|
|
25062
|
-
LIST_QUERY = src(templateObject_2$
|
|
26300
|
+
LIST_QUERY = src(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n query listCategoryPaths(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "], ["\n query listCategoryPaths(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "])));
|
|
25063
26301
|
_b.label = 1;
|
|
25064
26302
|
case 1:
|
|
25065
26303
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25109,7 +26347,7 @@ var IkasCategoryAPI = /** @class */ (function () {
|
|
|
25109
26347
|
};
|
|
25110
26348
|
return IkasCategoryAPI;
|
|
25111
26349
|
}());
|
|
25112
|
-
var templateObject_1$
|
|
26350
|
+
var templateObject_1$3, templateObject_2$2;
|
|
25113
26351
|
|
|
25114
26352
|
var IkasCheckoutAPI = /** @class */ (function () {
|
|
25115
26353
|
function IkasCheckoutAPI() {
|
|
@@ -25120,7 +26358,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
|
|
|
25120
26358
|
return __generator(this, function (_b) {
|
|
25121
26359
|
switch (_b.label) {
|
|
25122
26360
|
case 0:
|
|
25123
|
-
QUERY = src(templateObject_1$
|
|
26361
|
+
QUERY = src(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n query getCheckoutByCartId($cartId: String!) {\n getCheckoutByCartId(cartId: $cartId) {\n id\n }\n }\n "], ["\n query getCheckoutByCartId($cartId: String!) {\n getCheckoutByCartId(cartId: $cartId) {\n id\n }\n }\n "])));
|
|
25124
26362
|
_b.label = 1;
|
|
25125
26363
|
case 1:
|
|
25126
26364
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25155,7 +26393,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
|
|
|
25155
26393
|
return __generator(this, function (_b) {
|
|
25156
26394
|
switch (_b.label) {
|
|
25157
26395
|
case 0:
|
|
25158
|
-
QUERY = src(templateObject_2$
|
|
26396
|
+
QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n }\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n }\n }\n }\n "])));
|
|
25159
26397
|
_b.label = 1;
|
|
25160
26398
|
case 1:
|
|
25161
26399
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25191,7 +26429,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
|
|
|
25191
26429
|
return __generator(this, function (_f) {
|
|
25192
26430
|
switch (_f.label) {
|
|
25193
26431
|
case 0:
|
|
25194
|
-
MUTATION = src(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n mutation saveCheckout($input: SaveCheckoutInput!) {\n saveCheckout(input: $input) {\n id\n }\n }\n "], ["\n mutation saveCheckout($input: SaveCheckoutInput!) {\n saveCheckout(input: $input) {\n id\n }\n }\n "])));
|
|
26432
|
+
MUTATION = src(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n mutation saveCheckout($input: SaveCheckoutInput!) {\n saveCheckout(input: $input) {\n id\n }\n }\n "], ["\n mutation saveCheckout($input: SaveCheckoutInput!) {\n saveCheckout(input: $input) {\n id\n }\n }\n "])));
|
|
25195
26433
|
_f.label = 1;
|
|
25196
26434
|
case 1:
|
|
25197
26435
|
_f.trys.push([1, 3, , 4]);
|
|
@@ -25285,7 +26523,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
|
|
|
25285
26523
|
return __generator(this, function (_b) {
|
|
25286
26524
|
switch (_b.label) {
|
|
25287
26525
|
case 0:
|
|
25288
|
-
MUTATION = src(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n mutation createSaleTransactionWithCheckout(\n $input: CreateSaleTransactionWithCheckoutInput!\n ) {\n createSaleTransactionWithCheckout(input: $input) {\n orderId\n orderNumber\n transactionId\n transactionStatus\n returnSlug\n error {\n code\n declineCode\n message\n }\n }\n }\n "], ["\n mutation createSaleTransactionWithCheckout(\n $input: CreateSaleTransactionWithCheckoutInput!\n ) {\n createSaleTransactionWithCheckout(input: $input) {\n orderId\n orderNumber\n transactionId\n transactionStatus\n returnSlug\n error {\n code\n declineCode\n message\n }\n }\n }\n "])));
|
|
26526
|
+
MUTATION = src(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n mutation createSaleTransactionWithCheckout(\n $input: CreateSaleTransactionWithCheckoutInput!\n ) {\n createSaleTransactionWithCheckout(input: $input) {\n orderId\n orderNumber\n transactionId\n transactionStatus\n returnSlug\n error {\n code\n declineCode\n message\n }\n }\n }\n "], ["\n mutation createSaleTransactionWithCheckout(\n $input: CreateSaleTransactionWithCheckoutInput!\n ) {\n createSaleTransactionWithCheckout(input: $input) {\n orderId\n orderNumber\n transactionId\n transactionStatus\n returnSlug\n error {\n code\n declineCode\n message\n }\n }\n }\n "])));
|
|
25289
26527
|
_b.label = 1;
|
|
25290
26528
|
case 1:
|
|
25291
26529
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25464,7 +26702,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
|
|
|
25464
26702
|
};
|
|
25465
26703
|
return IkasCheckoutAPI;
|
|
25466
26704
|
}());
|
|
25467
|
-
var templateObject_1$
|
|
26705
|
+
var templateObject_1$4, templateObject_2$3, templateObject_3$1, templateObject_4$1, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
25468
26706
|
|
|
25469
26707
|
var IkasCityAPI = /** @class */ (function () {
|
|
25470
26708
|
function IkasCityAPI() {
|
|
@@ -25475,7 +26713,7 @@ var IkasCityAPI = /** @class */ (function () {
|
|
|
25475
26713
|
return __generator(this, function (_b) {
|
|
25476
26714
|
switch (_b.label) {
|
|
25477
26715
|
case 0:
|
|
25478
|
-
QUERY = src(templateObject_1$
|
|
26716
|
+
QUERY = src(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n query listCity(\n $stateId: StringFilterInput!\n $countryId: StringFilterInput\n ) {\n listCity(stateId: $stateId, countryId: $countryId) {\n id\n name\n order\n }\n }\n "], ["\n query listCity(\n $stateId: StringFilterInput!\n $countryId: StringFilterInput\n ) {\n listCity(stateId: $stateId, countryId: $countryId) {\n id\n name\n order\n }\n }\n "])));
|
|
25479
26717
|
_b.label = 1;
|
|
25480
26718
|
case 1:
|
|
25481
26719
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25514,7 +26752,7 @@ var IkasCityAPI = /** @class */ (function () {
|
|
|
25514
26752
|
};
|
|
25515
26753
|
return IkasCityAPI;
|
|
25516
26754
|
}());
|
|
25517
|
-
var templateObject_1$
|
|
26755
|
+
var templateObject_1$5;
|
|
25518
26756
|
|
|
25519
26757
|
var IkasCountryAPI = /** @class */ (function () {
|
|
25520
26758
|
function IkasCountryAPI() {
|
|
@@ -25525,7 +26763,7 @@ var IkasCountryAPI = /** @class */ (function () {
|
|
|
25525
26763
|
return __generator(this, function (_b) {
|
|
25526
26764
|
switch (_b.label) {
|
|
25527
26765
|
case 0:
|
|
25528
|
-
QUERY = src(templateObject_1$
|
|
26766
|
+
QUERY = src(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n query listCountry($iso2: StringFilterInput) {\n listCountry(iso2: $iso2) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "], ["\n query listCountry($iso2: StringFilterInput) {\n listCountry(iso2: $iso2) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "])));
|
|
25529
26767
|
_b.label = 1;
|
|
25530
26768
|
case 1:
|
|
25531
26769
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25565,7 +26803,7 @@ var IkasCountryAPI = /** @class */ (function () {
|
|
|
25565
26803
|
return __generator(this, function (_b) {
|
|
25566
26804
|
switch (_b.label) {
|
|
25567
26805
|
case 0:
|
|
25568
|
-
QUERY = src(templateObject_2$
|
|
26806
|
+
QUERY = src(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n query getAvailableShippingCountries($salesChannelId: String!) {\n getAvailableShippingCountries(salesChannelId: $salesChannelId)\n }\n "], ["\n query getAvailableShippingCountries($salesChannelId: String!) {\n getAvailableShippingCountries(salesChannelId: $salesChannelId)\n }\n "])));
|
|
25569
26807
|
_b.label = 1;
|
|
25570
26808
|
case 1:
|
|
25571
26809
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25600,7 +26838,7 @@ var IkasCountryAPI = /** @class */ (function () {
|
|
|
25600
26838
|
return __generator(this, function (_a) {
|
|
25601
26839
|
switch (_a.label) {
|
|
25602
26840
|
case 0:
|
|
25603
|
-
QUERY = src(templateObject_3$
|
|
26841
|
+
QUERY = src(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n query getMyCountry {\n getMyCountry\n }\n "], ["\n query getMyCountry {\n getMyCountry\n }\n "])));
|
|
25604
26842
|
_a.label = 1;
|
|
25605
26843
|
case 1:
|
|
25606
26844
|
_a.trys.push([1, 3, , 4]);
|
|
@@ -25621,7 +26859,7 @@ var IkasCountryAPI = /** @class */ (function () {
|
|
|
25621
26859
|
};
|
|
25622
26860
|
return IkasCountryAPI;
|
|
25623
26861
|
}());
|
|
25624
|
-
var templateObject_1$
|
|
26862
|
+
var templateObject_1$6, templateObject_2$4, templateObject_3$2;
|
|
25625
26863
|
|
|
25626
26864
|
var IkasCustomerAPI = /** @class */ (function () {
|
|
25627
26865
|
function IkasCustomerAPI() {
|
|
@@ -25632,7 +26870,7 @@ var IkasCustomerAPI = /** @class */ (function () {
|
|
|
25632
26870
|
return __generator(this, function (_b) {
|
|
25633
26871
|
switch (_b.label) {
|
|
25634
26872
|
case 0:
|
|
25635
|
-
MUTATION = src(templateObject_1$
|
|
26873
|
+
MUTATION = src(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n mutation customerLogin($email: String!, $password: String!) {\n customerLogin(email: $email, password: $password) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n identityNumber\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation customerLogin($email: String!, $password: String!) {\n customerLogin(email: $email, password: $password) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n identityNumber\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
|
|
25636
26874
|
_b.label = 1;
|
|
25637
26875
|
case 1:
|
|
25638
26876
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25668,7 +26906,7 @@ var IkasCustomerAPI = /** @class */ (function () {
|
|
|
25668
26906
|
return __generator(this, function (_b) {
|
|
25669
26907
|
switch (_b.label) {
|
|
25670
26908
|
case 0:
|
|
25671
|
-
MUTATION = src(templateObject_2$
|
|
26909
|
+
MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
|
|
25672
26910
|
_b.label = 1;
|
|
25673
26911
|
case 1:
|
|
25674
26912
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25706,7 +26944,7 @@ var IkasCustomerAPI = /** @class */ (function () {
|
|
|
25706
26944
|
return __generator(this, function (_b) {
|
|
25707
26945
|
switch (_b.label) {
|
|
25708
26946
|
case 0:
|
|
25709
|
-
MUTATION = src(templateObject_3$
|
|
26947
|
+
MUTATION = src(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n mutation customerRefreshToken($token: String!) {\n customerRefreshToken(token: $token) {\n token\n tokenExpiry\n }\n }\n "], ["\n mutation customerRefreshToken($token: String!) {\n customerRefreshToken(token: $token) {\n token\n tokenExpiry\n }\n }\n "])));
|
|
25710
26948
|
_b.label = 1;
|
|
25711
26949
|
case 1:
|
|
25712
26950
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -25741,7 +26979,7 @@ var IkasCustomerAPI = /** @class */ (function () {
|
|
|
25741
26979
|
return __generator(this, function (_b) {
|
|
25742
26980
|
switch (_b.label) {
|
|
25743
26981
|
case 0:
|
|
25744
|
-
MUTATION = src(templateObject_4$
|
|
26982
|
+
MUTATION = src(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation customerForgotPassword($email: String!) {\n customerForgotPassword(email: $email)\n }\n "], ["\n mutation customerForgotPassword($email: String!) {\n customerForgotPassword(email: $email)\n }\n "])));
|
|
25745
26983
|
_b.label = 1;
|
|
25746
26984
|
case 1:
|
|
25747
26985
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26022,7 +27260,7 @@ var IkasCustomerAPI = /** @class */ (function () {
|
|
|
26022
27260
|
};
|
|
26023
27261
|
return IkasCustomerAPI;
|
|
26024
27262
|
}());
|
|
26025
|
-
var templateObject_1$
|
|
27263
|
+
var templateObject_1$7, templateObject_2$5, templateObject_3$3, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11;
|
|
26026
27264
|
|
|
26027
27265
|
var IkasDistrictAPI = /** @class */ (function () {
|
|
26028
27266
|
function IkasDistrictAPI() {
|
|
@@ -26033,7 +27271,7 @@ var IkasDistrictAPI = /** @class */ (function () {
|
|
|
26033
27271
|
return __generator(this, function (_b) {
|
|
26034
27272
|
switch (_b.label) {
|
|
26035
27273
|
case 0:
|
|
26036
|
-
QUERY = src(templateObject_1$
|
|
27274
|
+
QUERY = src(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n query listDistrict(\n $cityId: StringFilterInput!\n $stateId: StringFilterInput\n ) {\n listDistrict(cityId: $cityId, stateId: $stateId) {\n id\n name\n }\n }\n "], ["\n query listDistrict(\n $cityId: StringFilterInput!\n $stateId: StringFilterInput\n ) {\n listDistrict(cityId: $cityId, stateId: $stateId) {\n id\n name\n }\n }\n "])));
|
|
26037
27275
|
_b.label = 1;
|
|
26038
27276
|
case 1:
|
|
26039
27277
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26074,7 +27312,7 @@ var IkasDistrictAPI = /** @class */ (function () {
|
|
|
26074
27312
|
};
|
|
26075
27313
|
return IkasDistrictAPI;
|
|
26076
27314
|
}());
|
|
26077
|
-
var templateObject_1$
|
|
27315
|
+
var templateObject_1$8;
|
|
26078
27316
|
|
|
26079
27317
|
var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
26080
27318
|
function IkasHTMLMetaDataAPI() {
|
|
@@ -26085,7 +27323,7 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
|
26085
27323
|
return __generator(this, function (_b) {
|
|
26086
27324
|
switch (_b.label) {
|
|
26087
27325
|
case 0:
|
|
26088
|
-
LIST_QUERY = src(templateObject_1$
|
|
27326
|
+
LIST_QUERY = src(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "], ["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "])));
|
|
26089
27327
|
_b.label = 1;
|
|
26090
27328
|
case 1:
|
|
26091
27329
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26128,7 +27366,7 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
|
26128
27366
|
};
|
|
26129
27367
|
return IkasHTMLMetaDataAPI;
|
|
26130
27368
|
}());
|
|
26131
|
-
var templateObject_1$
|
|
27369
|
+
var templateObject_1$9;
|
|
26132
27370
|
|
|
26133
27371
|
var IkasMerchantAPI = /** @class */ (function () {
|
|
26134
27372
|
function IkasMerchantAPI() {
|
|
@@ -26139,7 +27377,7 @@ var IkasMerchantAPI = /** @class */ (function () {
|
|
|
26139
27377
|
return __generator(this, function (_b) {
|
|
26140
27378
|
switch (_b.label) {
|
|
26141
27379
|
case 0:
|
|
26142
|
-
QUERY = src(templateObject_1$
|
|
27380
|
+
QUERY = src(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n query listMerchantSettings($merchantId: StringFilterInput!) {\n listMerchantSettings(merchantId: $merchantId) {\n id\n logoId\n merchantName\n }\n }\n "], ["\n query listMerchantSettings($merchantId: StringFilterInput!) {\n listMerchantSettings(merchantId: $merchantId) {\n id\n logoId\n merchantName\n }\n }\n "])));
|
|
26143
27381
|
_b.label = 1;
|
|
26144
27382
|
case 1:
|
|
26145
27383
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26171,7 +27409,7 @@ var IkasMerchantAPI = /** @class */ (function () {
|
|
|
26171
27409
|
};
|
|
26172
27410
|
return IkasMerchantAPI;
|
|
26173
27411
|
}());
|
|
26174
|
-
var templateObject_1$
|
|
27412
|
+
var templateObject_1$a;
|
|
26175
27413
|
|
|
26176
27414
|
var IkasProductSearchAPI = /** @class */ (function () {
|
|
26177
27415
|
function IkasProductSearchAPI() {
|
|
@@ -26183,7 +27421,7 @@ var IkasProductSearchAPI = /** @class */ (function () {
|
|
|
26183
27421
|
switch (_b.label) {
|
|
26184
27422
|
case 0:
|
|
26185
27423
|
_b.trys.push([0, 2, , 3]);
|
|
26186
|
-
SEARCH_PRODUCTS = src(templateObject_1$
|
|
27424
|
+
SEARCH_PRODUCTS = src(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "], ["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "])));
|
|
26187
27425
|
return [4 /*yield*/, apollo
|
|
26188
27426
|
.getClient()
|
|
26189
27427
|
.query({
|
|
@@ -26217,7 +27455,7 @@ var IkasProductSearchAPI = /** @class */ (function () {
|
|
|
26217
27455
|
switch (_b.label) {
|
|
26218
27456
|
case 0:
|
|
26219
27457
|
_b.trys.push([0, 2, , 3]);
|
|
26220
|
-
QUERY = src(templateObject_2$
|
|
27458
|
+
QUERY = src(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n query getProductFilterData($categoryId: String) {\n getProductFilterData(categoryId: $categoryId) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "], ["\n query getProductFilterData($categoryId: String) {\n getProductFilterData(categoryId: $categoryId) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "])));
|
|
26221
27459
|
return [4 /*yield*/, apollo
|
|
26222
27460
|
.getClient()
|
|
26223
27461
|
.query({
|
|
@@ -26376,7 +27614,7 @@ function simpleToProduct(simple) {
|
|
|
26376
27614
|
}),
|
|
26377
27615
|
});
|
|
26378
27616
|
}
|
|
26379
|
-
var templateObject_1$
|
|
27617
|
+
var templateObject_1$b, templateObject_2$6;
|
|
26380
27618
|
|
|
26381
27619
|
var IkasProductAttributeAPI = /** @class */ (function () {
|
|
26382
27620
|
function IkasProductAttributeAPI() {
|
|
@@ -26387,7 +27625,7 @@ var IkasProductAttributeAPI = /** @class */ (function () {
|
|
|
26387
27625
|
return __generator(this, function (_b) {
|
|
26388
27626
|
switch (_b.label) {
|
|
26389
27627
|
case 0:
|
|
26390
|
-
LIST_PRODUCT_ATTRIBUTES = src(templateObject_1$
|
|
27628
|
+
LIST_PRODUCT_ATTRIBUTES = src(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n query listProductAttribute($id: StringFilterInput!) {\n listProductAttribute(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n type\n options {\n id\n createdAt\n updatedAt\n deleted\n name\n }\n }\n }\n "], ["\n query listProductAttribute($id: StringFilterInput!) {\n listProductAttribute(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n type\n options {\n id\n createdAt\n updatedAt\n deleted\n name\n }\n }\n }\n "])));
|
|
26391
27629
|
_b.label = 1;
|
|
26392
27630
|
case 1:
|
|
26393
27631
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26420,7 +27658,7 @@ var IkasProductAttributeAPI = /** @class */ (function () {
|
|
|
26420
27658
|
};
|
|
26421
27659
|
return IkasProductAttributeAPI;
|
|
26422
27660
|
}());
|
|
26423
|
-
var templateObject_1$
|
|
27661
|
+
var templateObject_1$c;
|
|
26424
27662
|
|
|
26425
27663
|
var IkasFavoriteProductAPI = /** @class */ (function () {
|
|
26426
27664
|
function IkasFavoriteProductAPI() {
|
|
@@ -26431,7 +27669,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
|
|
|
26431
27669
|
return __generator(this, function (_b) {
|
|
26432
27670
|
switch (_b.label) {
|
|
26433
27671
|
case 0:
|
|
26434
|
-
LIST_FAVORITE_PRODUCTS = src(templateObject_1$
|
|
27672
|
+
LIST_FAVORITE_PRODUCTS = src(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n query listFavoriteProducts {\n listFavoriteProducts {\n id\n createdAt\n updatedAt\n deleted\n productId\n customerId\n }\n }\n "], ["\n query listFavoriteProducts {\n listFavoriteProducts {\n id\n createdAt\n updatedAt\n deleted\n productId\n customerId\n }\n }\n "])));
|
|
26435
27673
|
_b.label = 1;
|
|
26436
27674
|
case 1:
|
|
26437
27675
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26460,7 +27698,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
|
|
|
26460
27698
|
return __generator(this, function (_b) {
|
|
26461
27699
|
switch (_b.label) {
|
|
26462
27700
|
case 0:
|
|
26463
|
-
IS_FAVORITE_PRODUCT = src(templateObject_2$
|
|
27701
|
+
IS_FAVORITE_PRODUCT = src(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n query isFavoriteProduct($productId: String!) {\n isFavoriteProduct(productId: $productId)\n }\n "], ["\n query isFavoriteProduct($productId: String!) {\n isFavoriteProduct(productId: $productId)\n }\n "])));
|
|
26464
27702
|
_b.label = 1;
|
|
26465
27703
|
case 1:
|
|
26466
27704
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26490,7 +27728,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
|
|
|
26490
27728
|
return __generator(this, function (_b) {
|
|
26491
27729
|
switch (_b.label) {
|
|
26492
27730
|
case 0:
|
|
26493
|
-
SAVE_FAVORITE_PRODUCT = src(templateObject_3$
|
|
27731
|
+
SAVE_FAVORITE_PRODUCT = src(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n mutation saveFavoriteProduct($isFavorite: Boolean!, $productId: String!) {\n saveFavoriteProduct(isFavorite: $isFavorite, productId: $productId)\n }\n "], ["\n mutation saveFavoriteProduct($isFavorite: Boolean!, $productId: String!) {\n saveFavoriteProduct(isFavorite: $isFavorite, productId: $productId)\n }\n "])));
|
|
26494
27732
|
_b.label = 1;
|
|
26495
27733
|
case 1:
|
|
26496
27734
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26516,7 +27754,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
|
|
|
26516
27754
|
};
|
|
26517
27755
|
return IkasFavoriteProductAPI;
|
|
26518
27756
|
}());
|
|
26519
|
-
var templateObject_1$
|
|
27757
|
+
var templateObject_1$d, templateObject_2$7, templateObject_3$4;
|
|
26520
27758
|
|
|
26521
27759
|
var IkasContactFormAPI = /** @class */ (function () {
|
|
26522
27760
|
function IkasContactFormAPI() {
|
|
@@ -26527,7 +27765,7 @@ var IkasContactFormAPI = /** @class */ (function () {
|
|
|
26527
27765
|
return __generator(this, function (_b) {
|
|
26528
27766
|
switch (_b.label) {
|
|
26529
27767
|
case 0:
|
|
26530
|
-
MUTATION = src(templateObject_1$
|
|
27768
|
+
MUTATION = src(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n mutation sendContactFormToMerchant(\n $email: String!\n $message: String!\n $firstName: String!\n $lastName: String!\n ) {\n sendContactFormToMerchant(\n email: $email\n message: $message\n firstName: $firstName\n lastName: $lastName\n )\n }\n "], ["\n mutation sendContactFormToMerchant(\n $email: String!\n $message: String!\n $firstName: String!\n $lastName: String!\n ) {\n sendContactFormToMerchant(\n email: $email\n message: $message\n firstName: $firstName\n lastName: $lastName\n )\n }\n "])));
|
|
26531
27769
|
_b.label = 1;
|
|
26532
27770
|
case 1:
|
|
26533
27771
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26559,7 +27797,7 @@ var IkasContactFormAPI = /** @class */ (function () {
|
|
|
26559
27797
|
};
|
|
26560
27798
|
return IkasContactFormAPI;
|
|
26561
27799
|
}());
|
|
26562
|
-
var templateObject_1$
|
|
27800
|
+
var templateObject_1$e;
|
|
26563
27801
|
|
|
26564
27802
|
var IkasStateAPI = /** @class */ (function () {
|
|
26565
27803
|
function IkasStateAPI() {
|
|
@@ -26570,7 +27808,7 @@ var IkasStateAPI = /** @class */ (function () {
|
|
|
26570
27808
|
return __generator(this, function (_b) {
|
|
26571
27809
|
switch (_b.label) {
|
|
26572
27810
|
case 0:
|
|
26573
|
-
QUERY = src(templateObject_1$
|
|
27811
|
+
QUERY = src(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n query listState($countryId: StringFilterInput!) {\n listState(countryId: $countryId) {\n id\n name\n stateCode\n }\n }\n "], ["\n query listState($countryId: StringFilterInput!) {\n listState(countryId: $countryId) {\n id\n name\n stateCode\n }\n }\n "])));
|
|
26574
27812
|
_b.label = 1;
|
|
26575
27813
|
case 1:
|
|
26576
27814
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26607,7 +27845,7 @@ var IkasStateAPI = /** @class */ (function () {
|
|
|
26607
27845
|
};
|
|
26608
27846
|
return IkasStateAPI;
|
|
26609
27847
|
}());
|
|
26610
|
-
var templateObject_1$
|
|
27848
|
+
var templateObject_1$f;
|
|
26611
27849
|
|
|
26612
27850
|
var IkasVariantTypeAPI = /** @class */ (function () {
|
|
26613
27851
|
function IkasVariantTypeAPI() {
|
|
@@ -26618,7 +27856,7 @@ var IkasVariantTypeAPI = /** @class */ (function () {
|
|
|
26618
27856
|
return __generator(this, function (_b) {
|
|
26619
27857
|
switch (_b.label) {
|
|
26620
27858
|
case 0:
|
|
26621
|
-
LIST_VARIANT_TYPE = src(templateObject_1$
|
|
27859
|
+
LIST_VARIANT_TYPE = src(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n query listVariantType($id: StringFilterInput!) {\n listVariantType(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n selectionType\n values {\n id\n createdAt\n updatedAt\n deleted\n name\n thumbnailImageId\n colorCode\n }\n }\n }\n "], ["\n query listVariantType($id: StringFilterInput!) {\n listVariantType(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n selectionType\n values {\n id\n createdAt\n updatedAt\n deleted\n name\n thumbnailImageId\n colorCode\n }\n }\n }\n "])));
|
|
26622
27860
|
_b.label = 1;
|
|
26623
27861
|
case 1:
|
|
26624
27862
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26664,7 +27902,7 @@ var IkasVariantTypeAPI = /** @class */ (function () {
|
|
|
26664
27902
|
};
|
|
26665
27903
|
return IkasVariantTypeAPI;
|
|
26666
27904
|
}());
|
|
26667
|
-
var templateObject_1$
|
|
27905
|
+
var templateObject_1$g;
|
|
26668
27906
|
|
|
26669
27907
|
function styleInject(css, ref) {
|
|
26670
27908
|
if ( ref === void 0 ) ref = {};
|
|
@@ -26841,27 +28079,30 @@ var SVGCheck = function (_a) {
|
|
|
26841
28079
|
React.createElement("path", { fill: "currentColor", d: "M12.6 8.1l-3.7-3.8 1-1.1 2.7 2.7 5.5-5.4 1 1z" })));
|
|
26842
28080
|
};
|
|
26843
28081
|
|
|
26844
|
-
var css_248z$1 = ".style-module_CheckboxWrapper__2tSbx {\n width: 100%;\n display: flex;\n padding: 0.5em;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxContainer__1zRvT {\n position: relative;\n width: 20px;\n height: 20px;\n margin-right: 0.75em; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3 {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n position: absolute;\n top: 0;\n left: 0;\n transition: border-width .2s ease-in-out; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3.style-module_Checked__3-ZM4 {\n border: 10px solid #111111; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ- {\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n color: white;\n z-index: 2;\n transition: all 0.2s ease-in-out;\n transition-delay: .1s;\n opacity: 0;\n transform: scale(0.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ-.style-module_Visible__2Ng5Q {\n opacity: 1;\n transform: scale(1.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabel__30uMC {\n flex: 1 1 auto;\n font-weight: normal;\n font-size: 0.85em;\n color: #545454; }\n";
|
|
26845
|
-
var styles$1 = {"CheckboxWrapper":"style-module_CheckboxWrapper__2tSbx","CheckboxContainer":"style-module_CheckboxContainer__1zRvT","CheckboxBorder":"style-module_CheckboxBorder__281X3","Checked":"style-module_Checked__3-ZM4","CheckboxTick":"style-module_CheckboxTick__2LpQ-","Visible":"style-module_Visible__2Ng5Q","CheckboxLabel":"style-module_CheckboxLabel__30uMC"};
|
|
28082
|
+
var css_248z$1 = ".style-module_CheckboxWrapper__2tSbx {\n width: 100%;\n display: flex;\n padding: 0.5em;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxContainer__1zRvT {\n position: relative;\n width: 20px;\n height: 20px;\n margin-right: 0.75em; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3 {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n position: absolute;\n top: 0;\n left: 0;\n transition: border-width .2s ease-in-out; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3.style-module_Checked__3-ZM4 {\n border: 10px solid #111111; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ- {\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n color: white;\n z-index: 2;\n transition: all 0.2s ease-in-out;\n transition-delay: .1s;\n opacity: 0;\n transform: scale(0.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ-.style-module_Visible__2Ng5Q {\n opacity: 1;\n transform: scale(1.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabel__30uMC {\n flex: 1 1 auto;\n font-weight: normal;\n font-size: 0.85em;\n color: #545454; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabelError__FmdxF {\n color: #ff6d6d; }\n";
|
|
28083
|
+
var styles$1 = {"CheckboxWrapper":"style-module_CheckboxWrapper__2tSbx","CheckboxContainer":"style-module_CheckboxContainer__1zRvT","CheckboxBorder":"style-module_CheckboxBorder__281X3","Checked":"style-module_Checked__3-ZM4","CheckboxTick":"style-module_CheckboxTick__2LpQ-","Visible":"style-module_Visible__2Ng5Q","CheckboxLabel":"style-module_CheckboxLabel__30uMC","CheckboxLabelError":"style-module_CheckboxLabelError__FmdxF"};
|
|
26846
28084
|
styleInject(css_248z$1);
|
|
26847
28085
|
|
|
26848
28086
|
var Checkbox = mobxReactLite.observer(function (_a) {
|
|
26849
|
-
var value = _a.value, label = _a.label, onChange = _a.onChange;
|
|
28087
|
+
var value = _a.value, label = _a.label, hasError = _a.hasError, onChange = _a.onChange;
|
|
26850
28088
|
var _onChange = function () {
|
|
26851
28089
|
onChange(!value);
|
|
26852
28090
|
};
|
|
26853
28091
|
var checkboxBorderClasses = [styles$1.CheckboxBorder];
|
|
28092
|
+
var labelClasses = [styles$1.CheckboxLabel];
|
|
26854
28093
|
var tickClasses = [styles$1.CheckboxTick];
|
|
26855
28094
|
if (value) {
|
|
26856
28095
|
checkboxBorderClasses.push(styles$1.Checked);
|
|
26857
28096
|
tickClasses.push(styles$1.Visible);
|
|
26858
28097
|
}
|
|
28098
|
+
if (hasError)
|
|
28099
|
+
labelClasses.push(styles$1.CheckboxLabelError);
|
|
26859
28100
|
return (React.createElement("div", { className: styles$1.CheckboxWrapper, onClick: _onChange },
|
|
26860
28101
|
React.createElement("div", { className: styles$1.CheckboxContainer },
|
|
26861
28102
|
React.createElement("div", { className: checkboxBorderClasses.join(" ") }),
|
|
26862
28103
|
React.createElement("div", { className: tickClasses.join(" ") },
|
|
26863
28104
|
React.createElement(SVGCheck, null))),
|
|
26864
|
-
!!label && React.createElement("div", { className:
|
|
28105
|
+
!!label && React.createElement("div", { className: labelClasses.join(" ") }, label)));
|
|
26865
28106
|
});
|
|
26866
28107
|
|
|
26867
28108
|
var AddressFormViewModel = /** @class */ (function () {
|
|
@@ -27509,7 +28750,7 @@ var PaymentGateways = mobxReactLite.observer(function (_a) {
|
|
|
27509
28750
|
vm.installmentInfo && React.createElement(Installments, { vm: vm }))) : pg.description ? (React.createElement("div", null, pg.description)) : undefined,
|
|
27510
28751
|
rightContent: (React.createElement(PaymentMethodLogos, null, pg.paymentMethods.map(function (pm, index) {
|
|
27511
28752
|
return pm.logoUrl ? (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index },
|
|
27512
|
-
React.createElement("img", { src: pm.logoUrl }))) : (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index }
|
|
28753
|
+
React.createElement("img", { src: pm.logoUrl }))) : (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index }));
|
|
27513
28754
|
}))),
|
|
27514
28755
|
}); });
|
|
27515
28756
|
return (React.createElement(React.Fragment, null,
|
|
@@ -27573,7 +28814,7 @@ var CheckoutStepPayment = mobxReactLite.observer(function (_a) {
|
|
|
27573
28814
|
React.createElement("div", { className: [commonStyles.Title].join(" ") }, "Sipari\u015F Notu")),
|
|
27574
28815
|
React.createElement(FormItem, { type: FormItemType.TEXT_AREA, label: "", value: vm.checkout.note || "", onChange: vm.onCheckoutNoteChange }))),
|
|
27575
28816
|
vm.checkoutSettings.showTermsAndConditionsCheckbox && (React.createElement("div", { style: { marginTop: "12px" } },
|
|
27576
|
-
React.createElement(Checkbox, { value: vm.isTermsAndConditionsChecked, label: React.createElement(React.Fragment, null,
|
|
28817
|
+
React.createElement(Checkbox, { value: vm.isTermsAndConditionsChecked, hasError: vm.isErrorsVisible && !vm.isTermsAndConditionsChecked, label: React.createElement(React.Fragment, null,
|
|
27577
28818
|
React.createElement("span", { className: styles$d.TermsLabelSpan, onClick: onShowTermsClick }, "Mesafeli sat\u0131\u015F s\u00F6zle\u015Fmesini"),
|
|
27578
28819
|
" ",
|
|
27579
28820
|
"okudum ve onayl\u0131yorum"), onChange: vm.onTermsAndConditionsCheckedChange }))),
|
|
@@ -27666,7 +28907,9 @@ var CartSummary = mobxReactLite.observer(function (_a) {
|
|
|
27666
28907
|
React.createElement("span", { className: styles$f.Label }, expandHeaderLabel),
|
|
27667
28908
|
React.createElement("div", { className: arrowDownClasses },
|
|
27668
28909
|
React.createElement(SVGArrowDown, null))),
|
|
27669
|
-
React.createElement("div", { className: styles$f.Price }, formatMoney(
|
|
28910
|
+
React.createElement("div", { className: styles$f.Price }, formatMoney(vm.installmentPrice ||
|
|
28911
|
+
vm.checkout.totalFinalPrice ||
|
|
28912
|
+
cart.totalPrice, cart.currencyCode)))),
|
|
27670
28913
|
React.createElement("div", { className: styles$f.DetailsContainer, style: detailsContainerStyle },
|
|
27671
28914
|
React.createElement("div", { className: styles$f.Details, ref: setDetailsContainer }, cart === null || cart === void 0 ? void 0 :
|
|
27672
28915
|
cart.items.map(function (item, index) { return (React.createElement("div", { key: index },
|
|
@@ -28104,6 +29347,15 @@ var CustomerLoginRequiredError = mobxReactLite.observer(function (_a) {
|
|
|
28104
29347
|
"Bu email ile i\u015Fleme devam edebilmek i\u00E7in l\u00FCtfen giri\u015F yap\u0131n\u0131z.")));
|
|
28105
29348
|
});
|
|
28106
29349
|
|
|
29350
|
+
var Image = function (_a) {
|
|
29351
|
+
var image = _a.image, others = __rest(_a, ["image"]);
|
|
29352
|
+
var loader = function (_a) {
|
|
29353
|
+
var width = _a.width;
|
|
29354
|
+
return image.getSrc(width);
|
|
29355
|
+
};
|
|
29356
|
+
return (React.createElement(NextImage__default['default'], __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image" })));
|
|
29357
|
+
};
|
|
29358
|
+
|
|
28107
29359
|
var IkasCheckoutPage = mobxReactLite.observer(function (_a) {
|
|
28108
29360
|
var _b, _c, _d;
|
|
28109
29361
|
var checkout = _a.checkout, checkoutSettings = _a.checkoutSettings, returnPolicy = _a.returnPolicy, privacyPolicy = _a.privacyPolicy, termsOfService = _a.termsOfService, queryParams = _a.queryParams;
|
|
@@ -28194,7 +29446,7 @@ var IkasCheckoutPage = mobxReactLite.observer(function (_a) {
|
|
|
28194
29446
|
React.createElement("div", null,
|
|
28195
29447
|
React.createElement("div", { className: styles$2.Header },
|
|
28196
29448
|
React.createElement("a", { href: "/" }, !!((_c = vm.merchantSettings) === null || _c === void 0 ? void 0 : _c.logoId) ? (React.createElement("div", { className: styles$2.Logo },
|
|
28197
|
-
React.createElement(
|
|
29449
|
+
React.createElement(Image, { layout: "fill", image: vm.merchantSettings.logo, sizes: "64px" }))) : (((_d = vm.merchantSettings) === null || _d === void 0 ? void 0 : _d.merchantName) || ""))),
|
|
28198
29450
|
vm.step !== CheckoutStep.SUCCESS && React.createElement(Breadcrumbs, { vm: vm }),
|
|
28199
29451
|
!!vm.error && renderError(),
|
|
28200
29452
|
React.createElement("div", { className: styles$2.MobileCartSummary },
|
|
@@ -28227,6 +29479,7 @@ var style = {
|
|
|
28227
29479
|
backgroundColor: "rgba(255, 0, 0, 0.5)",
|
|
28228
29480
|
};
|
|
28229
29481
|
|
|
29482
|
+
var PACKAGE_VERSION = "0.0.128";
|
|
28230
29483
|
var PageViewModel = /** @class */ (function () {
|
|
28231
29484
|
function PageViewModel(router) {
|
|
28232
29485
|
var _this = this;
|
|
@@ -28242,7 +29495,7 @@ var PageViewModel = /** @class */ (function () {
|
|
|
28242
29495
|
this.pageDataProvider = null;
|
|
28243
29496
|
this.startMessaging = function () {
|
|
28244
29497
|
window.addEventListener("message", _this.onMessage, false);
|
|
28245
|
-
_this.sendMessage(BridgeMessageType.FRAME_DID_LOAD);
|
|
29498
|
+
_this.sendMessage(BridgeMessageType.FRAME_DID_LOAD, PACKAGE_VERSION);
|
|
28246
29499
|
};
|
|
28247
29500
|
this.onMessage = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
28248
29501
|
var type, data, _a;
|
|
@@ -28692,15 +29945,6 @@ var pageStyle$1 = {
|
|
|
28692
29945
|
justifyContent: "space-between",
|
|
28693
29946
|
};
|
|
28694
29947
|
|
|
28695
|
-
var Image = function (_a) {
|
|
28696
|
-
var image = _a.image, others = __rest(_a, ["image"]);
|
|
28697
|
-
var loader = function (_a) {
|
|
28698
|
-
var width = _a.width;
|
|
28699
|
-
return image.getSrc(width);
|
|
28700
|
-
};
|
|
28701
|
-
return (React.createElement(Image__default['default'], __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image" })));
|
|
28702
|
-
};
|
|
28703
|
-
|
|
28704
29948
|
var index = /*#__PURE__*/Object.freeze({
|
|
28705
29949
|
__proto__: null,
|
|
28706
29950
|
IkasCheckoutPage: IkasCheckoutPage,
|
|
@@ -28850,7 +30094,7 @@ var IkasStorefrontAPI = /** @class */ (function () {
|
|
|
28850
30094
|
return __generator(this, function (_b) {
|
|
28851
30095
|
switch (_b.label) {
|
|
28852
30096
|
case 0:
|
|
28853
|
-
QUERY = src(templateObject_1$
|
|
30097
|
+
QUERY = src(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "], ["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "])));
|
|
28854
30098
|
_b.label = 1;
|
|
28855
30099
|
case 1:
|
|
28856
30100
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -28881,7 +30125,7 @@ var IkasStorefrontAPI = /** @class */ (function () {
|
|
|
28881
30125
|
};
|
|
28882
30126
|
return IkasStorefrontAPI;
|
|
28883
30127
|
}());
|
|
28884
|
-
var templateObject_1$
|
|
30128
|
+
var templateObject_1$h;
|
|
28885
30129
|
|
|
28886
30130
|
var SettingsHelper = /** @class */ (function () {
|
|
28887
30131
|
function SettingsHelper() {
|
|
@@ -28989,7 +30233,7 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
28989
30233
|
});
|
|
28990
30234
|
}); });
|
|
28991
30235
|
};
|
|
28992
|
-
SettingsHelper.getPageData = function (context, isServer, pageType) {
|
|
30236
|
+
SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes) {
|
|
28993
30237
|
var _a;
|
|
28994
30238
|
return __awaiter(this, void 0, void 0, function () {
|
|
28995
30239
|
var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, provider;
|
|
@@ -29027,6 +30271,7 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
29027
30271
|
IkasStorefrontConfig.gtmId = storefront.gtmId || undefined;
|
|
29028
30272
|
IkasStorefrontConfig.fbpId = storefront.fbpId || undefined;
|
|
29029
30273
|
provider = new IkasPageDataProvider(themeLocalization.themeJson, context.params, pageType);
|
|
30274
|
+
provider.possiblePageTypes = possiblePageTypes;
|
|
29030
30275
|
return [4 /*yield*/, provider.getPageData()];
|
|
29031
30276
|
case 2:
|
|
29032
30277
|
_b.sent();
|
|
@@ -29047,11 +30292,11 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
29047
30292
|
});
|
|
29048
30293
|
});
|
|
29049
30294
|
};
|
|
29050
|
-
SettingsHelper.getStaticProps = function (context, pageType) {
|
|
30295
|
+
SettingsHelper.getStaticProps = function (context, pageType, possiblePageTypes) {
|
|
29051
30296
|
return __awaiter(this, void 0, void 0, function () {
|
|
29052
30297
|
return __generator(this, function (_a) {
|
|
29053
30298
|
switch (_a.label) {
|
|
29054
|
-
case 0: return [4 /*yield*/, SettingsHelper.getPageData(context, false, pageType)];
|
|
30299
|
+
case 0: return [4 /*yield*/, SettingsHelper.getPageData(context, false, pageType, possiblePageTypes)];
|
|
29055
30300
|
case 1: return [2 /*return*/, _a.sent()];
|
|
29056
30301
|
}
|
|
29057
30302
|
});
|
|
@@ -29140,7 +30385,11 @@ var getStaticPaths = function (context) { return __awaiter(void 0, void 0, void
|
|
|
29140
30385
|
var getStaticProps$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29141
30386
|
return __generator(this, function (_a) {
|
|
29142
30387
|
switch (_a.label) {
|
|
29143
|
-
case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context
|
|
30388
|
+
case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, [
|
|
30389
|
+
exports.IkasThemePageType.BRAND,
|
|
30390
|
+
exports.IkasThemePageType.CATEGORY,
|
|
30391
|
+
exports.IkasThemePageType.PRODUCT,
|
|
30392
|
+
])];
|
|
29144
30393
|
case 1: return [2 /*return*/, _a.sent()];
|
|
29145
30394
|
}
|
|
29146
30395
|
});
|
|
@@ -29802,6 +31051,15 @@ exports.ForgotPasswordForm = ForgotPasswordForm;
|
|
|
29802
31051
|
exports.ForgotPasswordPage = forgotPassword;
|
|
29803
31052
|
exports.IkasApplicableProductFilterValue = IkasApplicableProductFilterValue;
|
|
29804
31053
|
exports.IkasBaseStore = IkasBaseStore;
|
|
31054
|
+
exports.IkasBlog = IkasBlog;
|
|
31055
|
+
exports.IkasBlogAPI = IkasBlogAPI;
|
|
31056
|
+
exports.IkasBlogCategory = IkasBlogCategory;
|
|
31057
|
+
exports.IkasBlogContent = IkasBlogContent;
|
|
31058
|
+
exports.IkasBlogList = IkasBlogList;
|
|
31059
|
+
exports.IkasBlogListPropValue = IkasBlogListPropValue;
|
|
31060
|
+
exports.IkasBlogMetaData = IkasBlogMetaData;
|
|
31061
|
+
exports.IkasBlogPropValue = IkasBlogPropValue;
|
|
31062
|
+
exports.IkasBlogWriter = IkasBlogWriter;
|
|
29805
31063
|
exports.IkasBrand = IkasBrand;
|
|
29806
31064
|
exports.IkasBrandAPI = IkasBrandAPI;
|
|
29807
31065
|
exports.IkasBrandList = IkasBrandList;
|
|
@@ -29893,6 +31151,10 @@ exports.Validator = Validator;
|
|
|
29893
31151
|
exports.apollo = apollo;
|
|
29894
31152
|
exports.decodeBase64 = decodeBase64;
|
|
29895
31153
|
exports.formatMoney = formatMoney;
|
|
31154
|
+
exports.getPlaceholderBlog = getPlaceholderBlog;
|
|
31155
|
+
exports.getPlaceholderBrand = getPlaceholderBrand;
|
|
31156
|
+
exports.getPlaceholderCategory = getPlaceholderCategory;
|
|
31157
|
+
exports.getPlaceholderProduct = getPlaceholderProduct;
|
|
29896
31158
|
exports.parseRangeStr = parseRangeStr;
|
|
29897
31159
|
exports.pascalCase = pascalCase;
|
|
29898
31160
|
exports.stringToSlug = stringToSlug;
|