@ikas/storefront 0.0.127 → 0.0.129

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.
Files changed (42) hide show
  1. package/build/__generated__/global-types.d.ts +13 -0
  2. package/build/api/blog/__generated__/getBlog.d.ts +81 -0
  3. package/build/api/blog/__generated__/listBlog.d.ts +75 -0
  4. package/build/api/blog/__generated__/listBlogCategory.d.ts +38 -0
  5. package/build/api/blog/__generated__/listBlogMetaData.d.ts +29 -0
  6. package/build/api/blog/index.d.ts +32 -0
  7. package/build/api/brand/__generated__/listProductBrand.d.ts +1 -0
  8. package/build/api/brand/index.d.ts +1 -0
  9. package/build/api/category/__generated__/listCategory.d.ts +1 -0
  10. package/build/api/category/index.d.ts +1 -0
  11. package/build/api/index.d.ts +1 -0
  12. package/build/index.es.js +1624 -307
  13. package/build/index.js +1639 -309
  14. package/build/models/data/blog/index.d.ts +54 -0
  15. package/build/models/data/brand/index.d.ts +1 -1
  16. package/build/models/data/category/index.d.ts +1 -1
  17. package/build/models/data/index.d.ts +1 -0
  18. package/build/models/theme/component/prop/index.d.ts +3 -1
  19. package/build/models/theme/custom-data/index.d.ts +2 -0
  20. package/build/models/theme/index.d.ts +2 -0
  21. package/build/models/theme/page/component/prop-value/blog-list.d.ts +9 -0
  22. package/build/models/theme/page/component/prop-value/blog.d.ts +5 -0
  23. package/build/models/theme/page/index.d.ts +4 -1
  24. package/build/models/ui/blog-list/index.d.ts +55 -0
  25. package/build/models/ui/brand-list/index.d.ts +2 -0
  26. package/build/models/ui/category-list/index.d.ts +2 -0
  27. package/build/models/ui/index.d.ts +1 -0
  28. package/build/models/ui/product-detail/index.d.ts +1 -2
  29. package/build/models/ui/product-list/index.d.ts +5 -5
  30. package/build/pages/blog/[slug].d.ts +18 -0
  31. package/build/pages/blog/index.d.ts +13 -0
  32. package/build/pages/index.d.ts +3 -1
  33. package/build/store/customer.d.ts +1 -0
  34. package/build/utils/index.d.ts +1 -0
  35. package/build/utils/providers/page-data.d.ts +7 -1
  36. package/build/utils/providers/placeholders.d.ts +5 -0
  37. package/build/utils/providers/prop-value/blog-list.d.ts +9 -0
  38. package/build/utils/providers/prop-value/blog.d.ts +8 -0
  39. package/build/utils/providers/prop-value/custom.d.ts +2 -0
  40. package/build/utils/providers/prop-value/product-list.d.ts +1 -3
  41. package/build/utils/settings.d.ts +2 -2
  42. package/package.json +1 -1
package/build/index.es.js CHANGED
@@ -3,8 +3,8 @@ import React, { createElement, useState, useEffect, Fragment, useCallback, useRe
3
3
  import { observer } from 'mobx-react-lite';
4
4
  import Head from 'next/head';
5
5
  import { useRouter } from 'next/router';
6
- import Image$1 from 'next/image';
7
6
  import Link from 'next/link';
7
+ import NextImage from 'next/image';
8
8
  import fs from 'fs';
9
9
  import getConfig from 'next/config';
10
10
  import dynamic from 'next/dynamic';
@@ -10965,13 +10965,362 @@ var Apollo = /** @class */ (function () {
10965
10965
  }());
10966
10966
  var apollo = new Apollo();
10967
10967
 
10968
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
10969
+ // require the crypto API and do not support built-in fallback to lower quality random number
10970
+ // generators (like Math.random()).
10971
+ var getRandomValues;
10972
+ var rnds8 = new Uint8Array(16);
10973
+ function rng() {
10974
+ // lazy load so that environments that need to polyfill have a chance to do so
10975
+ if (!getRandomValues) {
10976
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
10977
+ // find the complete implementation of crypto (msCrypto) on IE11.
10978
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
10979
+
10980
+ if (!getRandomValues) {
10981
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
10982
+ }
10983
+ }
10984
+
10985
+ return getRandomValues(rnds8);
10986
+ }
10987
+
10988
+ 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;
10989
+
10990
+ function validate(uuid) {
10991
+ return typeof uuid === 'string' && REGEX.test(uuid);
10992
+ }
10993
+
10994
+ /**
10995
+ * Convert array of 16 byte values to UUID string format of the form:
10996
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
10997
+ */
10998
+
10999
+ var byteToHex = [];
11000
+
11001
+ for (var i = 0; i < 256; ++i) {
11002
+ byteToHex.push((i + 0x100).toString(16).substr(1));
11003
+ }
11004
+
11005
+ function stringify(arr) {
11006
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
11007
+ // Note: Be careful editing this code! It's been tuned for performance
11008
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
11009
+ 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
11010
+ // of the following:
11011
+ // - One or more input array values don't map to a hex octet (leading to
11012
+ // "undefined" in the uuid)
11013
+ // - Invalid input values for the RFC `version` or `variant` fields
11014
+
11015
+ if (!validate(uuid)) {
11016
+ throw TypeError('Stringified UUID is invalid');
11017
+ }
11018
+
11019
+ return uuid;
11020
+ }
11021
+
11022
+ function v4(options, buf, offset) {
11023
+ options = options || {};
11024
+ var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
11025
+
11026
+ rnds[6] = rnds[6] & 0x0f | 0x40;
11027
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
11028
+
11029
+ if (buf) {
11030
+ offset = offset || 0;
11031
+
11032
+ for (var i = 0; i < 16; ++i) {
11033
+ buf[offset + i] = rnds[i];
11034
+ }
11035
+
11036
+ return buf;
11037
+ }
11038
+
11039
+ return stringify(rnds);
11040
+ }
11041
+
11042
+ var IkasBlog = /** @class */ (function () {
11043
+ function IkasBlog(data) {
11044
+ if (data === void 0) { data = {}; }
11045
+ this.id = data.id || v4();
11046
+ this.createdAt = data.createdAt || Date.now() + "";
11047
+ this.updatedAt = data.updatedAt || Date.now() + "";
11048
+ this.categoryId = data.categoryId || null;
11049
+ this.category = data.category ? new IkasBlogCategory(data.category) : null;
11050
+ this.imageId = data.imageId || null;
11051
+ this.title = data.title || null;
11052
+ this.shortDescription = data.shortDescription || null;
11053
+ this.isPublished = data.isPublished || false;
11054
+ this.storefrontId = data.storefrontId || "";
11055
+ this.tagIds = data.tagIds || [];
11056
+ this.writer = data.writer
11057
+ ? new IkasBlogWriter(data.writer)
11058
+ : new IkasBlogWriter();
11059
+ this.blogContent = data.blogContent
11060
+ ? new IkasBlogContent(data.blogContent)
11061
+ : new IkasBlogContent();
11062
+ this.metadata = data.metadata ? new IkasBlogMetaData(data.metadata) : null;
11063
+ makeAutoObservable(this);
11064
+ }
11065
+ return IkasBlog;
11066
+ }());
11067
+ var IkasBlogContent = /** @class */ (function () {
11068
+ function IkasBlogContent(data) {
11069
+ if (data === void 0) { data = {}; }
11070
+ this.id = data.id || v4();
11071
+ this.createdAt = data.createdAt || Date.now() + "";
11072
+ this.updatedAt = data.updatedAt || Date.now() + "";
11073
+ this.content = data.content || "";
11074
+ makeAutoObservable(this);
11075
+ }
11076
+ return IkasBlogContent;
11077
+ }());
11078
+ var IkasBlogWriter = /** @class */ (function () {
11079
+ function IkasBlogWriter(data) {
11080
+ if (data === void 0) { data = {}; }
11081
+ this.firstName = data.firstName || "";
11082
+ this.lastName = data.lastName || "";
11083
+ makeAutoObservable(this);
11084
+ }
11085
+ return IkasBlogWriter;
11086
+ }());
11087
+ var IkasBlogMetadataTargetType;
11088
+ (function (IkasBlogMetadataTargetType) {
11089
+ IkasBlogMetadataTargetType["BLOG"] = "BLOG";
11090
+ IkasBlogMetadataTargetType["BLOG_CATEGORY"] = "BLOG_CATEGORY";
11091
+ })(IkasBlogMetadataTargetType || (IkasBlogMetadataTargetType = {}));
11092
+ var IkasBlogMetaData = /** @class */ (function () {
11093
+ function IkasBlogMetaData(data) {
11094
+ if (data === void 0) { data = {}; }
11095
+ this.pageTitle = null;
11096
+ this.description = null;
11097
+ this.id = data.id || v4();
11098
+ this.createdAt = data.createdAt || Date.now() + "";
11099
+ this.updatedAt = data.updatedAt || Date.now() + "";
11100
+ this.description = data.description || "";
11101
+ this.pageTitle = data.pageTitle || "";
11102
+ this.slug = data.slug || "";
11103
+ this.targetId = data.targetId || "";
11104
+ this.targetType = data.targetType || IkasBlogMetadataTargetType.BLOG;
11105
+ makeAutoObservable(this);
11106
+ }
11107
+ return IkasBlogMetaData;
11108
+ }());
11109
+ var IkasBlogCategory = /** @class */ (function () {
11110
+ function IkasBlogCategory(data) {
11111
+ if (data === void 0) { data = {}; }
11112
+ this.id = data.id || "";
11113
+ this.createdAt = data.createdAt || Date.now() + "";
11114
+ this.updatedAt = data.updatedAt || Date.now() + "";
11115
+ this.deleted = data.deleted || false;
11116
+ this.name = data.name || "";
11117
+ this.imageId = data.imageId || "";
11118
+ this.metadata = data.metadata ? new IkasBlogMetaData(data.metadata) : null;
11119
+ makeAutoObservable(this);
11120
+ }
11121
+ return IkasBlogCategory;
11122
+ }());
11123
+
11124
+ var IkasBlogAPI = /** @class */ (function () {
11125
+ function IkasBlogAPI() {
11126
+ }
11127
+ IkasBlogAPI.listBlog = function (params) {
11128
+ return __awaiter(this, void 0, void 0, function () {
11129
+ var QUERY, _a, data, errors, err_1;
11130
+ return __generator(this, function (_b) {
11131
+ switch (_b.label) {
11132
+ case 0:
11133
+ 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 "])));
11134
+ _b.label = 1;
11135
+ case 1:
11136
+ _b.trys.push([1, 3, , 4]);
11137
+ return [4 /*yield*/, apollo
11138
+ .getClient()
11139
+ .query({
11140
+ query: QUERY,
11141
+ variables: {
11142
+ id: params.idList ? { in: params.idList } : undefined,
11143
+ categoryId: params.categoryId
11144
+ ? { eq: params.categoryId }
11145
+ : undefined,
11146
+ pagination: {
11147
+ page: params.page,
11148
+ limit: params.limit,
11149
+ },
11150
+ tagId: params.tagId ? { eq: params.tagId } : undefined,
11151
+ title: params.title ? { like: params.title } : undefined,
11152
+ storefrontId: { eq: IkasStorefrontConfig.storefrontId },
11153
+ },
11154
+ })];
11155
+ case 2:
11156
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
11157
+ if (errors && errors.length) {
11158
+ return [2 /*return*/, {
11159
+ blogs: [],
11160
+ count: 0,
11161
+ }];
11162
+ }
11163
+ return [2 /*return*/, {
11164
+ blogs: data.listBlog.data.map(function (b) { return new IkasBlog(b); }),
11165
+ count: data.listBlog.count,
11166
+ }];
11167
+ case 3:
11168
+ err_1 = _b.sent();
11169
+ console.log(err_1);
11170
+ return [2 /*return*/, {
11171
+ blogs: [],
11172
+ count: 0,
11173
+ }];
11174
+ case 4: return [2 /*return*/];
11175
+ }
11176
+ });
11177
+ });
11178
+ };
11179
+ IkasBlogAPI.getBlog = function (params) {
11180
+ return __awaiter(this, void 0, void 0, function () {
11181
+ var QUERY, _a, data, errors, blogs, err_2;
11182
+ return __generator(this, function (_b) {
11183
+ switch (_b.label) {
11184
+ case 0:
11185
+ 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 "])));
11186
+ _b.label = 1;
11187
+ case 1:
11188
+ _b.trys.push([1, 3, , 4]);
11189
+ return [4 /*yield*/, apollo
11190
+ .getClient()
11191
+ .query({
11192
+ query: QUERY,
11193
+ variables: {
11194
+ id: params.id ? { eq: params.id } : undefined,
11195
+ pagination: {
11196
+ page: 1,
11197
+ limit: 1,
11198
+ },
11199
+ storefrontId: { eq: IkasStorefrontConfig.storefrontId },
11200
+ },
11201
+ })];
11202
+ case 2:
11203
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
11204
+ if (errors && errors.length) {
11205
+ return [2 /*return*/];
11206
+ }
11207
+ blogs = data.listBlog.data.map(function (b) { return new IkasBlog(b); });
11208
+ if (blogs.length)
11209
+ return [2 /*return*/, blogs[0]];
11210
+ return [3 /*break*/, 4];
11211
+ case 3:
11212
+ err_2 = _b.sent();
11213
+ console.log(err_2);
11214
+ return [3 /*break*/, 4];
11215
+ case 4: return [2 /*return*/];
11216
+ }
11217
+ });
11218
+ });
11219
+ };
11220
+ IkasBlogAPI.listBlogMetaData = function (slug, targetId, targetType) {
11221
+ return __awaiter(this, void 0, void 0, function () {
11222
+ var LIST_QUERY, _a, data, errors, err_3;
11223
+ return __generator(this, function (_b) {
11224
+ switch (_b.label) {
11225
+ case 0:
11226
+ 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 "])));
11227
+ _b.label = 1;
11228
+ case 1:
11229
+ _b.trys.push([1, 3, , 4]);
11230
+ return [4 /*yield*/, apollo
11231
+ .getClient()
11232
+ .query({
11233
+ query: LIST_QUERY,
11234
+ variables: {
11235
+ slug: slug
11236
+ ? {
11237
+ eq: slug,
11238
+ }
11239
+ : undefined,
11240
+ targetId: targetId
11241
+ ? {
11242
+ eq: targetId,
11243
+ }
11244
+ : undefined,
11245
+ targetType: targetType
11246
+ ? {
11247
+ in: targetType,
11248
+ }
11249
+ : undefined,
11250
+ },
11251
+ })];
11252
+ case 2:
11253
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
11254
+ if (errors && errors.length) {
11255
+ return [2 /*return*/, []];
11256
+ }
11257
+ return [2 /*return*/, data.listBlogMetadata.data.map(function (d) { return new IkasBlogMetaData(d); })];
11258
+ case 3:
11259
+ err_3 = _b.sent();
11260
+ console.log(err_3);
11261
+ return [2 /*return*/, []];
11262
+ case 4: return [2 /*return*/];
11263
+ }
11264
+ });
11265
+ });
11266
+ };
11267
+ IkasBlogAPI.listBlogCategory = function (params) {
11268
+ return __awaiter(this, void 0, void 0, function () {
11269
+ var QUERY, _a, data, errors;
11270
+ return __generator(this, function (_b) {
11271
+ switch (_b.label) {
11272
+ case 0:
11273
+ 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 "])));
11274
+ _b.label = 1;
11275
+ case 1:
11276
+ _b.trys.push([1, 3, , 4]);
11277
+ return [4 /*yield*/, apollo
11278
+ .getClient()
11279
+ .query({
11280
+ query: QUERY,
11281
+ variables: {
11282
+ id: params.idList ? { in: params.idList } : undefined,
11283
+ pagination: {
11284
+ page: params.page,
11285
+ limit: params.limit,
11286
+ },
11287
+ },
11288
+ })];
11289
+ case 2:
11290
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
11291
+ if (errors && errors.length) {
11292
+ return [2 /*return*/, {
11293
+ blogCategories: [],
11294
+ count: 0,
11295
+ hasNext: false,
11296
+ }];
11297
+ }
11298
+ return [2 /*return*/, {
11299
+ blogCategories: data.listBlogCategory.data.map(function (b) { return new IkasBlogCategory(b); }),
11300
+ count: data.listBlogCategory.count,
11301
+ hasNext: data.listBlogCategory.hasNext,
11302
+ }];
11303
+ case 3:
11304
+ _b.sent();
11305
+ return [2 /*return*/, {
11306
+ blogCategories: [],
11307
+ count: 0,
11308
+ hasNext: false,
11309
+ }];
11310
+ case 4: return [2 /*return*/];
11311
+ }
11312
+ });
11313
+ });
11314
+ };
11315
+ return IkasBlogAPI;
11316
+ }());
11317
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
11318
+
10968
11319
  var IkasProductListPropValueProvider = /** @class */ (function () {
10969
- function IkasProductListPropValueProvider(pageType, productListPropValue, pageParams, pageSpecificData, skipInitialFetch) {
11320
+ function IkasProductListPropValueProvider(pageType, productListPropValue, pageSpecificData) {
10970
11321
  this.pageType = pageType;
10971
11322
  this.productListPropValue = productListPropValue;
10972
- this.pageParams = pageParams;
10973
11323
  this.pageSpecificData = pageSpecificData;
10974
- this.skipInitialFetch = skipInitialFetch;
10975
11324
  }
10976
11325
  IkasProductListPropValueProvider.prototype.getValue = function () {
10977
11326
  return __awaiter(this, void 0, void 0, function () {
@@ -10980,7 +11329,6 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
10980
11329
  switch (_a.label) {
10981
11330
  case 0:
10982
11331
  if (this.productListPropValue.productListType === IkasProductListType.ALL) {
10983
- // TODO use pageParams to insert filters
10984
11332
  if (this.productListPropValue.usePageFilter) {
10985
11333
  if (this.pageType === IkasThemePageType.CATEGORY) {
10986
11334
  category = this.pageSpecificData;
@@ -11003,12 +11351,12 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
11003
11351
  filterCategoryId: filterCategoryId,
11004
11352
  pageType: this.pageType,
11005
11353
  });
11006
- if (!!this.skipInitialFetch) return [3 /*break*/, 2];
11354
+ //@ts-ignore
11007
11355
  return [4 /*yield*/, productList.getInitial()];
11008
11356
  case 1:
11357
+ //@ts-ignore
11009
11358
  _a.sent();
11010
- _a.label = 2;
11011
- case 2: return [2 /*return*/, productList];
11359
+ return [2 /*return*/, productList];
11012
11360
  }
11013
11361
  });
11014
11362
  });
@@ -11016,6 +11364,21 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
11016
11364
  return IkasProductListPropValueProvider;
11017
11365
  }());
11018
11366
 
11367
+ function getPlaceholderProduct() {
11368
+ return new IkasProductDetail(new IkasProduct({
11369
+ variants: [new IkasProductVariant()],
11370
+ }), []);
11371
+ }
11372
+ function getPlaceholderCategory() {
11373
+ return new IkasCategory();
11374
+ }
11375
+ function getPlaceholderBrand() {
11376
+ return new IkasBrand();
11377
+ }
11378
+ function getPlaceholderBlog() {
11379
+ return new IkasBlog();
11380
+ }
11381
+
11019
11382
  var IkasProductDetailPropValueProvider = /** @class */ (function () {
11020
11383
  function IkasProductDetailPropValueProvider(prop, pageSpecificData) {
11021
11384
  this.productDetailPropValue = prop;
@@ -11030,7 +11393,7 @@ var IkasProductDetailPropValueProvider = /** @class */ (function () {
11030
11393
  switch (_b.label) {
11031
11394
  case 0:
11032
11395
  if ((_a = this.productDetailPropValue) === null || _a === void 0 ? void 0 : _a.usePageData) {
11033
- return [2 /*return*/, this.pageSpecificData];
11396
+ return [2 /*return*/, this.pageSpecificData || getPlaceholderProduct()];
11034
11397
  }
11035
11398
  if (!this.productDetailPropValue.productId)
11036
11399
  return [2 /*return*/, null];
@@ -11056,6 +11419,9 @@ var IkasProductDetailPropValueProvider = /** @class */ (function () {
11056
11419
  return [2 /*return*/, new IkasProductDetail(product, product.variants[0].variantValues)];
11057
11420
  }
11058
11421
  }
11422
+ else {
11423
+ return [2 /*return*/, getPlaceholderProduct()];
11424
+ }
11059
11425
  }
11060
11426
  return [2 /*return*/, null];
11061
11427
  }
@@ -11096,7 +11462,7 @@ var IkasBrandPropValueProvider = /** @class */ (function () {
11096
11462
  }
11097
11463
  IkasBrandPropValueProvider.prototype.getValue = function () {
11098
11464
  return __awaiter(this, void 0, void 0, function () {
11099
- var response, brand, err_1;
11465
+ var response, err_1;
11100
11466
  return __generator(this, function (_a) {
11101
11467
  switch (_a.label) {
11102
11468
  case 0:
@@ -11113,8 +11479,10 @@ var IkasBrandPropValueProvider = /** @class */ (function () {
11113
11479
  })];
11114
11480
  case 2:
11115
11481
  response = _a.sent();
11116
- brand = response.brands[0];
11117
- return [2 /*return*/, new IkasBrand(brand)];
11482
+ if (response.brands.length)
11483
+ return [2 /*return*/, response.brands[0]];
11484
+ else
11485
+ return [2 /*return*/, getPlaceholderBrand()];
11118
11486
  case 3:
11119
11487
  err_1 = _a.sent();
11120
11488
  console.log(err_1);
@@ -11400,6 +11768,80 @@ var IkasRichTextPropValueProvider = /** @class */ (function () {
11400
11768
  return IkasRichTextPropValueProvider;
11401
11769
  }());
11402
11770
 
11771
+ var IkasBlogPropValueProvider = /** @class */ (function () {
11772
+ function IkasBlogPropValueProvider(propValue, pageSpecificData) {
11773
+ this.blogPropValue = propValue;
11774
+ this.pageSpecificData = pageSpecificData;
11775
+ }
11776
+ IkasBlogPropValueProvider.prototype.getValue = function () {
11777
+ var _a;
11778
+ return __awaiter(this, void 0, void 0, function () {
11779
+ var blog;
11780
+ return __generator(this, function (_b) {
11781
+ switch (_b.label) {
11782
+ case 0:
11783
+ if ((_a = this.blogPropValue) === null || _a === void 0 ? void 0 : _a.usePageData) {
11784
+ return [2 /*return*/, this.pageSpecificData || getPlaceholderBlog()];
11785
+ }
11786
+ if (!this.blogPropValue.blogId)
11787
+ return [2 /*return*/, null];
11788
+ return [4 /*yield*/, IkasBlogAPI.getBlog({
11789
+ id: this.blogPropValue.blogId,
11790
+ })];
11791
+ case 1:
11792
+ blog = _b.sent();
11793
+ if (blog)
11794
+ return [2 /*return*/, blog];
11795
+ else
11796
+ return [2 /*return*/, getPlaceholderBlog()];
11797
+ }
11798
+ });
11799
+ });
11800
+ };
11801
+ return IkasBlogPropValueProvider;
11802
+ }());
11803
+
11804
+ var IkasBlogListPropValueProvider = /** @class */ (function () {
11805
+ function IkasBlogListPropValueProvider(pageType, brandListPropValue, pageSpecificData) {
11806
+ this.pageType = pageType;
11807
+ this.blogListPropValue = brandListPropValue;
11808
+ this.pageSpecificData = pageSpecificData;
11809
+ }
11810
+ IkasBlogListPropValueProvider.prototype.getValue = function () {
11811
+ return __awaiter(this, void 0, void 0, function () {
11812
+ var filterCategoryId, blogCategory, blogList;
11813
+ return __generator(this, function (_a) {
11814
+ switch (_a.label) {
11815
+ case 0:
11816
+ filterCategoryId = null;
11817
+ if (this.blogListPropValue.blogListType === IkasBlogListType.ALL &&
11818
+ this.blogListPropValue.usePageFilter &&
11819
+ this.pageType === IkasThemePageType.BLOG_CATEGORY &&
11820
+ this.pageSpecificData) {
11821
+ blogCategory = this.pageSpecificData;
11822
+ filterCategoryId = blogCategory.id;
11823
+ }
11824
+ if (this.blogListPropValue.blogListType === IkasBlogListType.CATEGORY &&
11825
+ this.blogListPropValue.categoryId) {
11826
+ filterCategoryId = this.blogListPropValue.categoryId;
11827
+ }
11828
+ blogList = new IkasBlogList({
11829
+ blogListPropValue: this.blogListPropValue,
11830
+ filterCategoryId: filterCategoryId,
11831
+ });
11832
+ //@ts-ignore
11833
+ return [4 /*yield*/, blogList.getInitial()];
11834
+ case 1:
11835
+ //@ts-ignore
11836
+ _a.sent();
11837
+ return [2 /*return*/, blogList];
11838
+ }
11839
+ });
11840
+ });
11841
+ };
11842
+ return IkasBlogListPropValueProvider;
11843
+ }());
11844
+
11403
11845
  var IkasCustomPropValueProvider = /** @class */ (function () {
11404
11846
  function IkasCustomPropValueProvider(value, customData, theme, pageType, pageDataProvider, pageSpecificData, pageParams) {
11405
11847
  this.value = value;
@@ -11420,7 +11862,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11420
11862
  return [2 /*return*/];
11421
11863
  _b.label = 1;
11422
11864
  case 1:
11423
- _b.trys.push([1, 36, , 37]);
11865
+ _b.trys.push([1, 40, , 41]);
11424
11866
  _a = this.customData.type;
11425
11867
  switch (_a) {
11426
11868
  case IkasThemeCustomDataType.TEXT: return [3 /*break*/, 2];
@@ -11442,78 +11884,88 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11442
11884
  case IkasThemeCustomDataType.STATIC_LIST: return [3 /*break*/, 30];
11443
11885
  case IkasThemeCustomDataType.COMPONENT: return [3 /*break*/, 32];
11444
11886
  case IkasThemeCustomDataType.COMPONENT_LIST: return [3 /*break*/, 32];
11887
+ case IkasThemeCustomDataType.BLOG: return [3 /*break*/, 34];
11888
+ case IkasThemeCustomDataType.BLOG_LIST: return [3 /*break*/, 36];
11445
11889
  }
11446
- return [3 /*break*/, 34];
11890
+ return [3 /*break*/, 38];
11447
11891
  case 2: return [4 /*yield*/, this.getTextValue()];
11448
11892
  case 3:
11449
11893
  customDataValue = _b.sent();
11450
- return [3 /*break*/, 35];
11894
+ return [3 /*break*/, 39];
11451
11895
  case 4: return [4 /*yield*/, this.getRichTextPropValue()];
11452
11896
  case 5:
11453
11897
  customDataValue = _b.sent();
11454
- return [3 /*break*/, 35];
11898
+ return [3 /*break*/, 39];
11455
11899
  case 6: return [4 /*yield*/, this.getBooleanValue()];
11456
11900
  case 7:
11457
11901
  customDataValue = _b.sent();
11458
- return [3 /*break*/, 35];
11902
+ return [3 /*break*/, 39];
11459
11903
  case 8: return [4 /*yield*/, this.getBrandListPropValue()];
11460
11904
  case 9:
11461
11905
  customDataValue = _b.sent();
11462
- return [3 /*break*/, 35];
11906
+ return [3 /*break*/, 39];
11463
11907
  case 10: return [4 /*yield*/, this.getBrandPropValue()];
11464
11908
  case 11:
11465
11909
  customDataValue = _b.sent();
11466
- return [3 /*break*/, 35];
11910
+ return [3 /*break*/, 39];
11467
11911
  case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
11468
11912
  case 13:
11469
11913
  customDataValue = _b.sent();
11470
- return [3 /*break*/, 35];
11914
+ return [3 /*break*/, 39];
11471
11915
  case 14: return [4 /*yield*/, this.getCategoryPropValue()];
11472
11916
  case 15:
11473
11917
  customDataValue = _b.sent();
11474
- return [3 /*break*/, 35];
11918
+ return [3 /*break*/, 39];
11475
11919
  case 16: return [4 /*yield*/, this.getColorPropValue()];
11476
11920
  case 17:
11477
11921
  customDataValue = _b.sent();
11478
- return [3 /*break*/, 35];
11922
+ return [3 /*break*/, 39];
11479
11923
  case 18: return [4 /*yield*/, this.getImageListPropValue()];
11480
11924
  case 19:
11481
11925
  customDataValue = _b.sent();
11482
- return [3 /*break*/, 35];
11926
+ return [3 /*break*/, 39];
11483
11927
  case 20: return [4 /*yield*/, this.getImagePropValue()];
11484
11928
  case 21:
11485
11929
  customDataValue = _b.sent();
11486
- return [3 /*break*/, 35];
11930
+ return [3 /*break*/, 39];
11487
11931
  case 22: return [4 /*yield*/, this.getLinkPropValue()];
11488
11932
  case 23:
11489
11933
  customDataValue = _b.sent();
11490
- return [3 /*break*/, 35];
11934
+ return [3 /*break*/, 39];
11491
11935
  case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
11492
11936
  case 25:
11493
11937
  customDataValue = _b.sent();
11494
- return [3 /*break*/, 35];
11938
+ return [3 /*break*/, 39];
11495
11939
  case 26: return [4 /*yield*/, this.getProductListPropValue()];
11496
11940
  case 27:
11497
11941
  customDataValue = _b.sent();
11498
- return [3 /*break*/, 35];
11942
+ return [3 /*break*/, 39];
11499
11943
  case 28: return [4 /*yield*/, this.getObjectValue()];
11500
11944
  case 29:
11501
11945
  customDataValue = _b.sent();
11502
- return [3 /*break*/, 35];
11946
+ return [3 /*break*/, 39];
11503
11947
  case 30: return [4 /*yield*/, this.getArrayValue()];
11504
11948
  case 31:
11505
11949
  customDataValue = _b.sent();
11506
- return [3 /*break*/, 35];
11950
+ return [3 /*break*/, 39];
11507
11951
  case 32: return [4 /*yield*/, this.getComponentListValue()];
11508
11952
  case 33:
11509
11953
  customDataValue = _b.sent();
11510
- return [3 /*break*/, 35];
11511
- case 34: return [3 /*break*/, 35];
11512
- case 35: return [3 /*break*/, 37];
11513
- case 36:
11954
+ return [3 /*break*/, 39];
11955
+ case 34: return [4 /*yield*/, this.getBlogValue()];
11956
+ case 35:
11957
+ customDataValue = _b.sent();
11958
+ return [3 /*break*/, 39];
11959
+ case 36: return [4 /*yield*/, this.getBlogListValue()];
11960
+ case 37:
11961
+ customDataValue = _b.sent();
11962
+ return [3 /*break*/, 39];
11963
+ case 38: return [3 /*break*/, 39];
11964
+ case 39: return [3 /*break*/, 41];
11965
+ case 40:
11514
11966
  _b.sent();
11515
11967
  return [2 /*return*/];
11516
- case 37: return [2 /*return*/, JSON.parse(JSON.stringify(customDataValue))];
11968
+ case 41: return [2 /*return*/, JSON.parse(JSON.stringify(customDataValue))];
11517
11969
  }
11518
11970
  });
11519
11971
  });
@@ -11722,7 +12174,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11722
12174
  return __generator(this, function (_a) {
11723
12175
  switch (_a.label) {
11724
12176
  case 0:
11725
- provider = new IkasProductListPropValueProvider(this.pageType, this.value, this.pageParams || {}, this.pageSpecificData);
12177
+ provider = new IkasProductListPropValueProvider(this.pageType, this.value, this.pageSpecificData);
11726
12178
  return [4 /*yield*/, provider.getValue()];
11727
12179
  case 1:
11728
12180
  value = _a.sent();
@@ -11852,6 +12304,42 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11852
12304
  });
11853
12305
  });
11854
12306
  };
12307
+ IkasCustomPropValueProvider.prototype.getBlogValue = function () {
12308
+ return __awaiter(this, void 0, void 0, function () {
12309
+ var provider, value;
12310
+ return __generator(this, function (_a) {
12311
+ switch (_a.label) {
12312
+ case 0:
12313
+ provider = new IkasBlogPropValueProvider(this.value, this.pageSpecificData);
12314
+ return [4 /*yield*/, provider.getValue()];
12315
+ case 1:
12316
+ value = _a.sent();
12317
+ return [2 /*return*/, {
12318
+ value: value,
12319
+ customData: this.customData,
12320
+ }];
12321
+ }
12322
+ });
12323
+ });
12324
+ };
12325
+ IkasCustomPropValueProvider.prototype.getBlogListValue = function () {
12326
+ return __awaiter(this, void 0, void 0, function () {
12327
+ var provider, value;
12328
+ return __generator(this, function (_a) {
12329
+ switch (_a.label) {
12330
+ case 0:
12331
+ provider = new IkasBlogListPropValueProvider(this.pageType, this.value, this.pageSpecificData);
12332
+ return [4 /*yield*/, provider.getValue()];
12333
+ case 1:
12334
+ value = _a.sent();
12335
+ return [2 /*return*/, {
12336
+ value: value,
12337
+ customData: this.customData,
12338
+ }];
12339
+ }
12340
+ });
12341
+ });
12342
+ };
11855
12343
  return IkasCustomPropValueProvider;
11856
12344
  }());
11857
12345
 
@@ -12160,6 +12648,7 @@ var IkasPageDataProvider = /** @class */ (function () {
12160
12648
  this.pageComponentPropValues = [];
12161
12649
  this.pageSpecificData = null;
12162
12650
  this.merchantSettings = null;
12651
+ this.possiblePageTypes = []; // Used for distinguishing blog slug page from main slug page
12163
12652
  this.theme = new IkasTheme(theme);
12164
12653
  this.pageParams = pageParams || {};
12165
12654
  this.pageType = pageType;
@@ -12286,29 +12775,40 @@ var IkasPageDataProvider = /** @class */ (function () {
12286
12775
  });
12287
12776
  };
12288
12777
  IkasPageDataProvider.prototype.getPageSpecificData = function () {
12778
+ var _a, _b;
12289
12779
  return __awaiter(this, void 0, void 0, function () {
12290
- var slug, metaDataList, metaData, handleBrandPage, handleCategoryPage, _a;
12780
+ var slug, metaDataList, metaData, handleBrandPage, handleCategoryPage, handleBlogPage, handleBlogCategoryPage, _c;
12291
12781
  var _this = this;
12292
- return __generator(this, function (_b) {
12293
- switch (_b.label) {
12782
+ return __generator(this, function (_d) {
12783
+ switch (_d.label) {
12294
12784
  case 0:
12295
12785
  if (this.pageType &&
12296
12786
  ![
12297
12787
  IkasThemePageType.BRAND,
12298
12788
  IkasThemePageType.PRODUCT,
12299
12789
  IkasThemePageType.CATEGORY,
12790
+ IkasThemePageType.BLOG,
12791
+ IkasThemePageType.BLOG_CATEGORY,
12300
12792
  ].includes(this.pageType))
12301
12793
  return [2 /*return*/];
12302
12794
  slug = this.pageParams.slug;
12303
12795
  if (!slug) {
12304
12796
  return [2 /*return*/];
12305
12797
  }
12306
- return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(slug)];
12798
+ metaDataList = [];
12799
+ if (!(((_a = this.possiblePageTypes) === null || _a === void 0 ? void 0 : _a.includes(IkasThemePageType.BLOG)) || ((_b = this.possiblePageTypes) === null || _b === void 0 ? void 0 : _b.includes(IkasThemePageType.BLOG_CATEGORY)))) return [3 /*break*/, 2];
12800
+ return [4 /*yield*/, IkasBlogAPI.listBlogMetaData(slug)];
12307
12801
  case 1:
12308
- metaDataList = _b.sent();
12802
+ metaDataList = _d.sent();
12803
+ return [3 /*break*/, 4];
12804
+ case 2: return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(slug)];
12805
+ case 3:
12806
+ metaDataList = _d.sent();
12309
12807
  if (!metaDataList || !metaDataList.length) {
12310
12808
  return [2 /*return*/, this.getPageSpecificProduct()];
12311
12809
  }
12810
+ _d.label = 4;
12811
+ case 4:
12312
12812
  metaData = metaDataList[0];
12313
12813
  handleBrandPage = function () { return __awaiter(_this, void 0, void 0, function () {
12314
12814
  var brandsResponse, brand;
@@ -12348,21 +12848,67 @@ var IkasPageDataProvider = /** @class */ (function () {
12348
12848
  }
12349
12849
  });
12350
12850
  }); };
12351
- _a = metaData.targetType;
12352
- switch (_a) {
12353
- case IkasHTMLMetaDataTargetType.BRAND: return [3 /*break*/, 2];
12354
- case IkasHTMLMetaDataTargetType.CATEGORY: return [3 /*break*/, 4];
12355
- case IkasHTMLMetaDataTargetType.PRODUCT: return [3 /*break*/, 6];
12851
+ handleBlogPage = function () { return __awaiter(_this, void 0, void 0, function () {
12852
+ var blog;
12853
+ return __generator(this, function (_a) {
12854
+ switch (_a.label) {
12855
+ case 0: return [4 /*yield*/, IkasBlogAPI.getBlog({
12856
+ id: metaData.targetId,
12857
+ })];
12858
+ case 1:
12859
+ blog = _a.sent();
12860
+ if (!blog)
12861
+ return [2 /*return*/];
12862
+ this.pageSpecificData = blog;
12863
+ this.pageType = IkasThemePageType.BLOG;
12864
+ this.setPageMetaData(metaData);
12865
+ return [2 /*return*/];
12866
+ }
12867
+ });
12868
+ }); };
12869
+ handleBlogCategoryPage = function () { return __awaiter(_this, void 0, void 0, function () {
12870
+ var blogCategoriesResponse, blogCategory;
12871
+ return __generator(this, function (_a) {
12872
+ switch (_a.label) {
12873
+ case 0: return [4 /*yield*/, IkasBlogAPI.listBlogCategory({
12874
+ idList: [metaData.targetId],
12875
+ page: 1,
12876
+ limit: 1,
12877
+ })];
12878
+ case 1:
12879
+ blogCategoriesResponse = _a.sent();
12880
+ if (!blogCategoriesResponse ||
12881
+ !blogCategoriesResponse.blogCategories.length)
12882
+ return [2 /*return*/];
12883
+ blogCategory = blogCategoriesResponse.blogCategories[0];
12884
+ this.pageSpecificData = blogCategory;
12885
+ this.pageType = IkasThemePageType.BLOG_CATEGORY;
12886
+ this.setPageMetaData(metaData);
12887
+ return [2 /*return*/];
12888
+ }
12889
+ });
12890
+ }); };
12891
+ _c = metaData.targetType;
12892
+ switch (_c) {
12893
+ case IkasHTMLMetaDataTargetType.BRAND: return [3 /*break*/, 5];
12894
+ case IkasHTMLMetaDataTargetType.CATEGORY: return [3 /*break*/, 7];
12895
+ case IkasHTMLMetaDataTargetType.PRODUCT: return [3 /*break*/, 9];
12896
+ case IkasBlogMetadataTargetType.BLOG: return [3 /*break*/, 11];
12897
+ case IkasBlogMetadataTargetType.BLOG_CATEGORY: return [3 /*break*/, 13];
12356
12898
  }
12357
- return [3 /*break*/, 8];
12358
- case 2: return [4 /*yield*/, handleBrandPage()];
12359
- case 3: return [2 /*return*/, _b.sent()];
12360
- case 4: return [4 /*yield*/, handleCategoryPage()];
12361
- case 5: return [2 /*return*/, _b.sent()];
12362
- case 6: return [4 /*yield*/, this.getPageSpecificProduct()];
12363
- case 7: return [2 /*return*/, _b.sent()];
12364
- case 8: return [3 /*break*/, 9];
12365
- case 9: return [2 /*return*/];
12899
+ return [3 /*break*/, 15];
12900
+ case 5: return [4 /*yield*/, handleBrandPage()];
12901
+ case 6: return [2 /*return*/, _d.sent()];
12902
+ case 7: return [4 /*yield*/, handleCategoryPage()];
12903
+ case 8: return [2 /*return*/, _d.sent()];
12904
+ case 9: return [4 /*yield*/, this.getPageSpecificProduct()];
12905
+ case 10: return [2 /*return*/, _d.sent()];
12906
+ case 11: return [4 /*yield*/, handleBlogPage()];
12907
+ case 12: return [2 /*return*/, _d.sent()];
12908
+ case 13: return [4 /*yield*/, handleBlogCategoryPage()];
12909
+ case 14: return [2 /*return*/, _d.sent()];
12910
+ case 15: return [3 /*break*/, 16];
12911
+ case 16: return [2 /*return*/];
12366
12912
  }
12367
12913
  });
12368
12914
  });
@@ -12431,7 +12977,7 @@ var IkasPageDataProvider = /** @class */ (function () {
12431
12977
  }
12432
12978
  this.pageSpecificData = new IkasProductDetail(product, selectedVariantValues.length
12433
12979
  ? selectedVariantValues
12434
- : product.variants[0].variantValues, true);
12980
+ : product.variants[0].variantValues);
12435
12981
  this.pageType = IkasThemePageType.PRODUCT;
12436
12982
  this.setPageMetaData(metaDataResponse.metaData);
12437
12983
  return [2 /*return*/];
@@ -12503,60 +13049,68 @@ var IkasPageDataProvider = /** @class */ (function () {
12503
13049
  case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 14];
12504
13050
  case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 15];
12505
13051
  case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 15];
13052
+ case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 17];
13053
+ case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 18];
12506
13054
  }
12507
- return [3 /*break*/, 17];
13055
+ return [3 /*break*/, 19];
12508
13056
  case 1:
12509
13057
  propValueProvider = new IkasTextPropValueProvider(propValue);
12510
- return [3 /*break*/, 18];
13058
+ return [3 /*break*/, 20];
12511
13059
  case 2:
12512
13060
  propValueProvider = new IkasRichTextPropValueProvider(propValue);
12513
- return [3 /*break*/, 18];
13061
+ return [3 /*break*/, 20];
12514
13062
  case 3:
12515
13063
  propValueProvider = new IkasBooleanPropValueProvider(propValue);
12516
- return [3 /*break*/, 18];
13064
+ return [3 /*break*/, 20];
12517
13065
  case 4:
12518
13066
  propValueProvider = new IkasImagePropValueProvider(propValue);
12519
- return [3 /*break*/, 18];
13067
+ return [3 /*break*/, 20];
12520
13068
  case 5:
12521
13069
  propValueProvider = new IkasImageListPropValueProvider(propValue);
12522
- return [3 /*break*/, 18];
13070
+ return [3 /*break*/, 20];
12523
13071
  case 6:
12524
13072
  propValueProvider = new IkasBrandPropValueProvider(propValue, this.pageSpecificData);
12525
- return [3 /*break*/, 18];
13073
+ return [3 /*break*/, 20];
12526
13074
  case 7:
12527
13075
  propValueProvider = new IkasBrandListPropValueProvider(propValue);
12528
- return [3 /*break*/, 18];
13076
+ return [3 /*break*/, 20];
12529
13077
  case 8:
12530
- propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageParams, this.pageSpecificData);
12531
- return [3 /*break*/, 18];
13078
+ propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
13079
+ return [3 /*break*/, 20];
12532
13080
  case 9:
12533
13081
  propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
12534
- return [3 /*break*/, 18];
13082
+ return [3 /*break*/, 20];
12535
13083
  case 10:
12536
13084
  propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
12537
- return [3 /*break*/, 18];
13085
+ return [3 /*break*/, 20];
12538
13086
  case 11:
12539
13087
  propValueProvider = new IkasCategoryListPropValueProvider(propValue);
12540
- return [3 /*break*/, 18];
13088
+ return [3 /*break*/, 20];
12541
13089
  case 12:
12542
13090
  propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
12543
- return [3 /*break*/, 18];
13091
+ return [3 /*break*/, 20];
12544
13092
  case 13:
12545
13093
  propValueProvider = new IkasColorPropValueProvider(propValue);
12546
- return [3 /*break*/, 18];
13094
+ return [3 /*break*/, 20];
12547
13095
  case 14:
12548
13096
  customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
12549
13097
  if (!customData)
12550
13098
  return [2 /*return*/];
12551
13099
  propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this, this.pageSpecificData, this.pageParams);
12552
- return [3 /*break*/, 18];
13100
+ return [3 /*break*/, 20];
12553
13101
  case 15:
12554
13102
  pageComponents = propValue;
12555
13103
  return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) { return _this.getPageComponentPropValues(tp); }))];
12556
13104
  case 16: return [2 /*return*/, _b.sent()];
12557
- case 17: return [3 /*break*/, 18];
12558
- case 18: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
12559
- case 19: return [2 /*return*/, _b.sent()];
13105
+ case 17:
13106
+ propValueProvider = new IkasBlogPropValueProvider(propValue, this.pageSpecificData);
13107
+ return [3 /*break*/, 20];
13108
+ case 18:
13109
+ propValueProvider = new IkasBlogListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
13110
+ return [3 /*break*/, 20];
13111
+ case 19: return [3 /*break*/, 20];
13112
+ case 20: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
13113
+ case 21: return [2 /*return*/, _b.sent()];
12560
13114
  }
12561
13115
  });
12562
13116
  });
@@ -12621,6 +13175,12 @@ var IkasPageDataProvider = /** @class */ (function () {
12621
13175
  case IkasThemeComponentPropType.CUSTOM:
12622
13176
  IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValue, router, settings, isBrowser);
12623
13177
  break;
13178
+ case IkasThemeComponentPropType.BLOG:
13179
+ IkasPageDataProvider.initBlogPropValue(prop, propValue, pageComponentPropValue);
13180
+ break;
13181
+ case IkasThemeComponentPropType.BLOG_LIST:
13182
+ IkasPageDataProvider.initBlogListPropValue(prop, propValue, pageComponentPropValue);
13183
+ break;
12624
13184
  }
12625
13185
  });
12626
13186
  });
@@ -12661,7 +13221,6 @@ var IkasPageDataProvider = /** @class */ (function () {
12661
13221
  pageComponentPropValue.propValues[prop.name] = this._initProductDetailPropValue(propValue, router, isBrowser);
12662
13222
  };
12663
13223
  IkasPageDataProvider._initProductDetailPropValue = function (propValue, router, isBrowser) {
12664
- var usePageData = propValue.usePageData;
12665
13224
  var _propValue = propValue;
12666
13225
  var productDetail = new IkasProductDetail(_propValue.product, _propValue.selectedVariantValues);
12667
13226
  if (isBrowser) {
@@ -12674,7 +13233,7 @@ var IkasPageDataProvider = /** @class */ (function () {
12674
13233
  }
12675
13234
  }
12676
13235
  }
12677
- return new IkasProductDetail(productDetail.product, productDetail.selectedVariantValues, usePageData, router);
13236
+ return new IkasProductDetail(productDetail.product, productDetail.selectedVariantValues, router);
12678
13237
  };
12679
13238
  IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
12680
13239
  pageComponentPropValue.propValues[prop.name] = this._initLinkPropValue(propValue);
@@ -12795,6 +13354,18 @@ var IkasPageDataProvider = /** @class */ (function () {
12795
13354
  });
12796
13355
  return [];
12797
13356
  };
13357
+ IkasPageDataProvider.initBlogPropValue = function (prop, propValue, pageComponentPropValue) {
13358
+ pageComponentPropValue.propValues[prop.name] = IkasPageDataProvider._initBlogPropValue(propValue);
13359
+ };
13360
+ IkasPageDataProvider._initBlogPropValue = function (propValue) {
13361
+ return new IkasBlog(propValue);
13362
+ };
13363
+ IkasPageDataProvider.initBlogListPropValue = function (prop, propValue, pageComponentPropValue) {
13364
+ pageComponentPropValue.propValues[prop.name] = this._initBlogListPropValue(propValue);
13365
+ };
13366
+ IkasPageDataProvider._initBlogListPropValue = function (propValue) {
13367
+ return new IkasBlogList(propValue);
13368
+ };
12798
13369
  return IkasPageDataProvider;
12799
13370
  }());
12800
13371
  var IkasPageComponentPropValue = /** @class */ (function () {
@@ -12881,9 +13452,10 @@ var IkasHTMLMetaDataTargetType;
12881
13452
 
12882
13453
  var IkasBrand = /** @class */ (function () {
12883
13454
  function IkasBrand(data) {
13455
+ if (data === void 0) { data = {}; }
12884
13456
  this.metaData = null;
12885
13457
  this.image = null;
12886
- this.id = data.id || "";
13458
+ this.id = data.id || v4();
12887
13459
  this.name = data.name || "";
12888
13460
  this.metaData = data.metaData
12889
13461
  ? new IkasHTMLMetaData(data.metaData)
@@ -12906,9 +13478,10 @@ var IkasBrand = /** @class */ (function () {
12906
13478
 
12907
13479
  var IkasCategory = /** @class */ (function () {
12908
13480
  function IkasCategory(data) {
13481
+ if (data === void 0) { data = {}; }
12909
13482
  this.metaData = null;
12910
13483
  this.image = null;
12911
- this.id = data.id || "";
13484
+ this.id = data.id || v4();
12912
13485
  this.name = data.name || "";
12913
13486
  this.parentId = data.parentId || null;
12914
13487
  this.metaData = data.metaData
@@ -19337,12 +19910,7 @@ var IkasCustomerStore = /** @class */ (function () {
19337
19910
  }); };
19338
19911
  this.logout = function () {
19339
19912
  var _a;
19340
- localStorage.removeItem(LS_TOKEN_KEY);
19341
- localStorage.removeItem(LS_TOKEN_EXPIRY);
19342
- localStorage.removeItem(LS_CUSTOMER_KEY);
19343
- _this.customer = undefined;
19344
- _this.token = undefined;
19345
- _this.tokenExpiry = undefined;
19913
+ _this.clearLocalData();
19346
19914
  (_a = _this.baseStore) === null || _a === void 0 ? void 0 : _a.cartStore.removeCart();
19347
19915
  };
19348
19916
  this.saveCustomer = function (customer) { return __awaiter(_this, void 0, void 0, function () {
@@ -19557,6 +20125,9 @@ var IkasCustomerStore = /** @class */ (function () {
19557
20125
  response = _a.sent();
19558
20126
  if ((response === null || response === void 0 ? void 0 : response.token) || (response === null || response === void 0 ? void 0 : response.tokenExpiry))
19559
20127
  this.setToken(response.token, response.tokenExpiry);
20128
+ else {
20129
+ this.clearLocalData();
20130
+ }
19560
20131
  return [2 /*return*/];
19561
20132
  }
19562
20133
  });
@@ -19597,6 +20168,14 @@ var IkasCustomerStore = /** @class */ (function () {
19597
20168
  this.setToken(token, parseInt(tokenExpiry));
19598
20169
  }
19599
20170
  };
20171
+ IkasCustomerStore.prototype.clearLocalData = function () {
20172
+ localStorage.removeItem(LS_TOKEN_KEY);
20173
+ localStorage.removeItem(LS_TOKEN_EXPIRY);
20174
+ localStorage.removeItem(LS_CUSTOMER_KEY);
20175
+ this.customer = undefined;
20176
+ this.token = undefined;
20177
+ this.tokenExpiry = undefined;
20178
+ };
19600
20179
  return IkasCustomerStore;
19601
20180
  }());
19602
20181
 
@@ -19894,7 +20473,7 @@ var IkasProductAttributeValue = /** @class */ (function () {
19894
20473
  var IkasProductVariant = /** @class */ (function () {
19895
20474
  function IkasProductVariant(data) {
19896
20475
  if (data === void 0) { data = {}; }
19897
- this.id = data.id || "";
20476
+ this.id = data.id || v4();
19898
20477
  this.sku = data.sku || null;
19899
20478
  this.barcodeList = data.barcodeList || [];
19900
20479
  this.variantValues = data.variantValues
@@ -19985,7 +20564,7 @@ var IkasProductTag = /** @class */ (function () {
19985
20564
  var IkasProduct = /** @class */ (function () {
19986
20565
  function IkasProduct(data) {
19987
20566
  if (data === void 0) { data = {}; }
19988
- this.id = data.id || "";
20567
+ this.id = data.id || v4();
19989
20568
  this.name = data.name || "";
19990
20569
  this.type = data.type || IkasProductType.PHYSICAL;
19991
20570
  this.description = data.description || "";
@@ -20452,88 +21031,14 @@ var IkasTransactionStatusEnum;
20452
21031
  IkasTransactionStatusEnum["FAILED"] = "FAILED";
20453
21032
  IkasTransactionStatusEnum["PENDING"] = "PENDING";
20454
21033
  IkasTransactionStatusEnum["SUCCESS"] = "SUCCESS";
20455
- IkasTransactionStatusEnum["AUTHORIZED"] = "AUTHORIZED";
20456
- })(IkasTransactionStatusEnum || (IkasTransactionStatusEnum = {}));
20457
- var IkasTransactionTypeEnum;
20458
- (function (IkasTransactionTypeEnum) {
20459
- IkasTransactionTypeEnum["REFUND"] = "REFUND";
20460
- IkasTransactionTypeEnum["SALE"] = "SALE";
20461
- IkasTransactionTypeEnum["VOID"] = "VOID";
20462
- })(IkasTransactionTypeEnum || (IkasTransactionTypeEnum = {}));
20463
-
20464
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
20465
- // require the crypto API and do not support built-in fallback to lower quality random number
20466
- // generators (like Math.random()).
20467
- var getRandomValues;
20468
- var rnds8 = new Uint8Array(16);
20469
- function rng() {
20470
- // lazy load so that environments that need to polyfill have a chance to do so
20471
- if (!getRandomValues) {
20472
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
20473
- // find the complete implementation of crypto (msCrypto) on IE11.
20474
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
20475
-
20476
- if (!getRandomValues) {
20477
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
20478
- }
20479
- }
20480
-
20481
- return getRandomValues(rnds8);
20482
- }
20483
-
20484
- 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;
20485
-
20486
- function validate(uuid) {
20487
- return typeof uuid === 'string' && REGEX.test(uuid);
20488
- }
20489
-
20490
- /**
20491
- * Convert array of 16 byte values to UUID string format of the form:
20492
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
20493
- */
20494
-
20495
- var byteToHex = [];
20496
-
20497
- for (var i = 0; i < 256; ++i) {
20498
- byteToHex.push((i + 0x100).toString(16).substr(1));
20499
- }
20500
-
20501
- function stringify(arr) {
20502
- var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
20503
- // Note: Be careful editing this code! It's been tuned for performance
20504
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
20505
- 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
20506
- // of the following:
20507
- // - One or more input array values don't map to a hex octet (leading to
20508
- // "undefined" in the uuid)
20509
- // - Invalid input values for the RFC `version` or `variant` fields
20510
-
20511
- if (!validate(uuid)) {
20512
- throw TypeError('Stringified UUID is invalid');
20513
- }
20514
-
20515
- return uuid;
20516
- }
20517
-
20518
- function v4(options, buf, offset) {
20519
- options = options || {};
20520
- var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
20521
-
20522
- rnds[6] = rnds[6] & 0x0f | 0x40;
20523
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
20524
-
20525
- if (buf) {
20526
- offset = offset || 0;
20527
-
20528
- for (var i = 0; i < 16; ++i) {
20529
- buf[offset + i] = rnds[i];
20530
- }
20531
-
20532
- return buf;
20533
- }
20534
-
20535
- return stringify(rnds);
20536
- }
21034
+ IkasTransactionStatusEnum["AUTHORIZED"] = "AUTHORIZED";
21035
+ })(IkasTransactionStatusEnum || (IkasTransactionStatusEnum = {}));
21036
+ var IkasTransactionTypeEnum;
21037
+ (function (IkasTransactionTypeEnum) {
21038
+ IkasTransactionTypeEnum["REFUND"] = "REFUND";
21039
+ IkasTransactionTypeEnum["SALE"] = "SALE";
21040
+ IkasTransactionTypeEnum["VOID"] = "VOID";
21041
+ })(IkasTransactionTypeEnum || (IkasTransactionTypeEnum = {}));
20537
21042
 
20538
21043
  var IkasThemeComponentProp = /** @class */ (function () {
20539
21044
  function IkasThemeComponentProp(data) {
@@ -20566,6 +21071,8 @@ var IkasThemeComponentPropType;
20566
21071
  IkasThemeComponentPropType["CUSTOM"] = "CUSTOM";
20567
21072
  IkasThemeComponentPropType["COMPONENT"] = "COMPONENT";
20568
21073
  IkasThemeComponentPropType["COMPONENT_LIST"] = "COMPONENT_LIST";
21074
+ IkasThemeComponentPropType["BLOG"] = "BLOG";
21075
+ IkasThemeComponentPropType["BLOG_LIST"] = "BLOG_LIST";
20569
21076
  })(IkasThemeComponentPropType || (IkasThemeComponentPropType = {}));
20570
21077
 
20571
21078
  var IkasThemeComponent = /** @class */ (function () {
@@ -20630,6 +21137,8 @@ var IkasThemeCustomDataType;
20630
21137
  IkasThemeCustomDataType["COLOR"] = "COLOR";
20631
21138
  IkasThemeCustomDataType["COMPONENT"] = "COMPONENT";
20632
21139
  IkasThemeCustomDataType["COMPONENT_LIST"] = "COMPONENT_LIST";
21140
+ IkasThemeCustomDataType["BLOG"] = "BLOG";
21141
+ IkasThemeCustomDataType["BLOG_LIST"] = "BLOG_LIST";
20633
21142
  IkasThemeCustomDataType["OBJECT"] = "OBJECT";
20634
21143
  IkasThemeCustomDataType["STATIC_LIST"] = "STATIC_LIST";
20635
21144
  IkasThemeCustomDataType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
@@ -20692,6 +21201,9 @@ var IkasThemePageType;
20692
21201
  IkasThemePageType["FAVORITE_PRODUCTS"] = "FAVORITE_PRODUCTS";
20693
21202
  IkasThemePageType["SEARCH"] = "SEARCH";
20694
21203
  IkasThemePageType["NOT_FOUND"] = "NOT_FOUND";
21204
+ IkasThemePageType["BLOG"] = "BLOG";
21205
+ IkasThemePageType["BLOG_INDEX"] = "BLOG_INDEX";
21206
+ IkasThemePageType["BLOG_CATEGORY"] = "BLOG_CATEGORY";
20695
21207
  })(IkasThemePageType || (IkasThemePageType = {}));
20696
21208
 
20697
21209
  var IkasThemeColor = /** @class */ (function () {
@@ -20804,30 +21316,31 @@ var IkasBrandList = /** @class */ (function () {
20804
21316
  this.getInitial = function () { return __awaiter(_this, void 0, void 0, function () {
20805
21317
  var response_1, err_1;
20806
21318
  var _this = this;
20807
- return __generator(this, function (_a) {
20808
- switch (_a.label) {
21319
+ var _a;
21320
+ return __generator(this, function (_b) {
21321
+ switch (_b.label) {
20809
21322
  case 0:
20810
21323
  if (this._isLoading)
20811
21324
  return [2 /*return*/];
20812
21325
  this._isLoading = true;
20813
- _a.label = 1;
21326
+ _b.label = 1;
20814
21327
  case 1:
20815
- _a.trys.push([1, 3, 4, 5]);
21328
+ _b.trys.push([1, 3, 4, 5]);
20816
21329
  return [4 /*yield*/, IkasBrandAPI.listBrands({
20817
21330
  idList: this.isStatic
20818
21331
  ? this._brandListPropValue.brandIds || undefined
20819
21332
  : undefined,
20820
21333
  page: this.isStatic ? undefined : this.page,
20821
21334
  limit: this.isStatic ? undefined : this.limit,
21335
+ sort: this.getSortParams(),
20822
21336
  })];
20823
21337
  case 2:
20824
- response_1 = _a.sent();
21338
+ response_1 = _b.sent();
20825
21339
  if (this.isStatic) {
20826
- this.data = this._brandListPropValue
20827
- .brandIds.map(function (bID) {
20828
- return response_1.brands.find(function (b) { return b.id === bID; });
20829
- })
20830
- .filter(function (b) { return !!b; });
21340
+ this.data =
21341
+ ((_a = this._brandListPropValue.brandIds) === null || _a === void 0 ? void 0 : _a.map(function (bID) {
21342
+ return response_1.brands.find(function (b) { return b.id === bID; });
21343
+ }).filter(function (b) { return !!b; })) || [];
20831
21344
  }
20832
21345
  else {
20833
21346
  this.data = response_1.brands;
@@ -20837,7 +21350,7 @@ var IkasBrandList = /** @class */ (function () {
20837
21350
  this._minPage = this.page;
20838
21351
  return [3 /*break*/, 5];
20839
21352
  case 3:
20840
- err_1 = _a.sent();
21353
+ err_1 = _b.sent();
20841
21354
  console.log(err_1);
20842
21355
  return [3 /*break*/, 5];
20843
21356
  case 4:
@@ -20865,6 +21378,7 @@ var IkasBrandList = /** @class */ (function () {
20865
21378
  return [4 /*yield*/, IkasBrandAPI.listBrands({
20866
21379
  page: minPage_1,
20867
21380
  limit: this.limit,
21381
+ sort: this.getSortParams(),
20868
21382
  })];
20869
21383
  case 2:
20870
21384
  response_2 = _a.sent();
@@ -20902,6 +21416,7 @@ var IkasBrandList = /** @class */ (function () {
20902
21416
  return [4 /*yield*/, IkasBrandAPI.listBrands({
20903
21417
  page: this.page + 1,
20904
21418
  limit: this.limit,
21419
+ sort: this.getSortParams(),
20905
21420
  })];
20906
21421
  case 2:
20907
21422
  response_3 = _a.sent();
@@ -20939,6 +21454,7 @@ var IkasBrandList = /** @class */ (function () {
20939
21454
  return [4 /*yield*/, IkasBrandAPI.listBrands({
20940
21455
  page: page,
20941
21456
  limit: this.limit,
21457
+ sort: this.getSortParams(),
20942
21458
  })];
20943
21459
  case 2:
20944
21460
  response_4 = _a.sent();
@@ -21046,48 +21562,317 @@ var IkasBrandList = /** @class */ (function () {
21046
21562
  enumerable: false,
21047
21563
  configurable: true
21048
21564
  });
21565
+ IkasBrandList.prototype.getSortParams = function () {
21566
+ if (this._sort === IkasBrandListSortType.A_Z)
21567
+ return "name";
21568
+ else
21569
+ return "-name";
21570
+ };
21571
+ IkasBrandList.prototype.setSortType = function (sortType) {
21572
+ return __awaiter(this, void 0, void 0, function () {
21573
+ return __generator(this, function (_a) {
21574
+ switch (_a.label) {
21575
+ case 0:
21576
+ this._sort = sortType;
21577
+ return [4 /*yield*/, this.getInitial()];
21578
+ case 1:
21579
+ _a.sent();
21580
+ return [2 /*return*/];
21581
+ }
21582
+ });
21583
+ });
21584
+ };
21049
21585
  IkasBrandList.prototype.toJSON = function () {
21050
21586
  return {
21051
21587
  data: this.data,
21052
21588
  type: this._type,
21053
- sort: this._sort,
21589
+ sort: this._sort,
21590
+ limit: this._limit,
21591
+ page: this._page,
21592
+ count: this._count,
21593
+ initialized: this._initialized,
21594
+ minPage: this._minPage,
21595
+ brandListPropValue: this._brandListPropValue,
21596
+ };
21597
+ };
21598
+ return IkasBrandList;
21599
+ }());
21600
+ var IkasBrandListType;
21601
+ (function (IkasBrandListType) {
21602
+ IkasBrandListType["ALL"] = "ALL";
21603
+ IkasBrandListType["STATIC"] = "STATIC";
21604
+ })(IkasBrandListType || (IkasBrandListType = {}));
21605
+ var IkasBrandListSortType;
21606
+ (function (IkasBrandListSortType) {
21607
+ IkasBrandListSortType["A_Z"] = "A_Z";
21608
+ IkasBrandListSortType["Z_A"] = "Z_A";
21609
+ })(IkasBrandListSortType || (IkasBrandListSortType = {}));
21610
+
21611
+ var IkasBrandListPropValue = /** @class */ (function () {
21612
+ function IkasBrandListPropValue(data) {
21613
+ this.initialSort = null;
21614
+ this.initialLimit = null;
21615
+ // Only for static lists
21616
+ this.brandCount = null;
21617
+ this.brandIds = null;
21618
+ this.brandListType = data.brandListType || IkasBrandListType.ALL;
21619
+ this.initialSort = data.initialSort || IkasBrandListSortType.A_Z;
21620
+ this.initialLimit = data.initialLimit || 20;
21621
+ this.brandCount = data.brandCount;
21622
+ this.brandIds = data.brandIds;
21623
+ makeAutoObservable(this);
21624
+ }
21625
+ return IkasBrandListPropValue;
21626
+ }());
21627
+
21628
+ var IkasBlogList = /** @class */ (function () {
21629
+ function IkasBlogList(data) {
21630
+ var _this = this;
21631
+ this._initialized = false;
21632
+ this._minPage = null;
21633
+ this._filterCategoryId = null;
21634
+ this._isLoading = false;
21635
+ // Used by the provider
21636
+ this.getInitial = function () { return __awaiter(_this, void 0, void 0, function () {
21637
+ var response_1, err_1;
21638
+ var _a, _b;
21639
+ return __generator(this, function (_c) {
21640
+ switch (_c.label) {
21641
+ case 0:
21642
+ if (this._isLoading)
21643
+ return [2 /*return*/];
21644
+ this._isLoading = true;
21645
+ _c.label = 1;
21646
+ case 1:
21647
+ _c.trys.push([1, 3, 4, 5]);
21648
+ return [4 /*yield*/, this.listBlogs(this.isStatic ? 1 : this.page, this.isStatic
21649
+ ? ((_a = this._blogListPropValue.blogIds) === null || _a === void 0 ? void 0 : _a.length) || 10
21650
+ : this.limit)];
21651
+ case 2:
21652
+ response_1 = _c.sent();
21653
+ if (this.isStatic) {
21654
+ this.data =
21655
+ ((_b = this._blogListPropValue.blogIds) === null || _b === void 0 ? void 0 : _b.map(function (bID) {
21656
+ return response_1.blogs.find(function (b) { return b.id === bID; });
21657
+ }).filter(function (b) { return !!b; })) || [];
21658
+ }
21659
+ else {
21660
+ this.data = response_1.blogs;
21661
+ }
21662
+ this._count = response_1.count;
21663
+ this._initialized = true;
21664
+ this._minPage = this.page;
21665
+ return [3 /*break*/, 5];
21666
+ case 3:
21667
+ err_1 = _c.sent();
21668
+ console.log(err_1);
21669
+ return [3 /*break*/, 5];
21670
+ case 4:
21671
+ this._isLoading = false;
21672
+ return [7 /*endfinally*/];
21673
+ case 5: return [2 /*return*/];
21674
+ }
21675
+ });
21676
+ }); };
21677
+ this.getPrev = function () { return __awaiter(_this, void 0, void 0, function () {
21678
+ var minPage, response, err_2;
21679
+ return __generator(this, function (_a) {
21680
+ switch (_a.label) {
21681
+ case 0:
21682
+ if (this.isStatic || this._isLoading || !this.hasPrev)
21683
+ return [2 /*return*/];
21684
+ this._isLoading = true;
21685
+ _a.label = 1;
21686
+ case 1:
21687
+ _a.trys.push([1, 3, 4, 5]);
21688
+ minPage = this._minPage - 1;
21689
+ return [4 /*yield*/, this.listBlogs(minPage, this.limit)];
21690
+ case 2:
21691
+ response = _a.sent();
21692
+ this.data = response.blogs.concat(this.data);
21693
+ this._count = response.count;
21694
+ this._minPage = minPage;
21695
+ return [3 /*break*/, 5];
21696
+ case 3:
21697
+ err_2 = _a.sent();
21698
+ console.log(err_2);
21699
+ return [3 /*break*/, 5];
21700
+ case 4:
21701
+ this._isLoading = false;
21702
+ return [7 /*endfinally*/];
21703
+ case 5: return [2 /*return*/];
21704
+ }
21705
+ });
21706
+ }); };
21707
+ this.getNext = function () { return __awaiter(_this, void 0, void 0, function () {
21708
+ var response, err_3;
21709
+ return __generator(this, function (_a) {
21710
+ switch (_a.label) {
21711
+ case 0:
21712
+ if (this.isStatic || this._isLoading || !this.hasNext)
21713
+ return [2 /*return*/];
21714
+ this._isLoading = true;
21715
+ _a.label = 1;
21716
+ case 1:
21717
+ _a.trys.push([1, 3, 4, 5]);
21718
+ return [4 /*yield*/, this.listBlogs(this.page + 1, this.limit)];
21719
+ case 2:
21720
+ response = _a.sent();
21721
+ this.data = this.data.concat(response.blogs);
21722
+ this._count = response.count;
21723
+ this._page = this.page + 1;
21724
+ return [3 /*break*/, 5];
21725
+ case 3:
21726
+ err_3 = _a.sent();
21727
+ console.log(err_3);
21728
+ return [3 /*break*/, 5];
21729
+ case 4:
21730
+ this._isLoading = false;
21731
+ return [7 /*endfinally*/];
21732
+ case 5: return [2 /*return*/];
21733
+ }
21734
+ });
21735
+ }); };
21736
+ this.getPage = function (page) { return __awaiter(_this, void 0, void 0, function () {
21737
+ var response, err_4;
21738
+ return __generator(this, function (_a) {
21739
+ switch (_a.label) {
21740
+ case 0:
21741
+ if (this._isLoading || this.isStatic)
21742
+ return [2 /*return*/];
21743
+ this._isLoading = true;
21744
+ _a.label = 1;
21745
+ case 1:
21746
+ _a.trys.push([1, 3, 4, 5]);
21747
+ return [4 /*yield*/, this.listBlogs(page, this.limit)];
21748
+ case 2:
21749
+ response = _a.sent();
21750
+ this.data = response.blogs;
21751
+ this._count = response.count;
21752
+ this._page = page;
21753
+ this._minPage = page;
21754
+ return [3 /*break*/, 5];
21755
+ case 3:
21756
+ err_4 = _a.sent();
21757
+ console.log(err_4);
21758
+ return [3 /*break*/, 5];
21759
+ case 4:
21760
+ this._isLoading = false;
21761
+ return [7 /*endfinally*/];
21762
+ case 5: return [2 /*return*/];
21763
+ }
21764
+ });
21765
+ }); };
21766
+ this.data = data.data ? data.data.map(function (b) { return new IkasBlog(b); }) : [];
21767
+ this._type =
21768
+ data.type || data.blogListPropValue.blogListType || IkasBlogListType.ALL;
21769
+ this._limit = data.limit || data.blogListPropValue.initialLimit || 20;
21770
+ this._page = data.page || 1;
21771
+ this._count = data.count || 0;
21772
+ this._initialized = data.initialized || false;
21773
+ this._minPage = data.minPage;
21774
+ this._blogListPropValue = data.blogListPropValue;
21775
+ this._filterCategoryId = data.filterCategoryId || null;
21776
+ makeAutoObservable(this);
21777
+ }
21778
+ Object.defineProperty(IkasBlogList.prototype, "limit", {
21779
+ get: function () {
21780
+ return this._limit;
21781
+ },
21782
+ enumerable: false,
21783
+ configurable: true
21784
+ });
21785
+ Object.defineProperty(IkasBlogList.prototype, "page", {
21786
+ get: function () {
21787
+ return this._page;
21788
+ },
21789
+ enumerable: false,
21790
+ configurable: true
21791
+ });
21792
+ Object.defineProperty(IkasBlogList.prototype, "count", {
21793
+ get: function () {
21794
+ return this._count;
21795
+ },
21796
+ enumerable: false,
21797
+ configurable: true
21798
+ });
21799
+ Object.defineProperty(IkasBlogList.prototype, "isInitialized", {
21800
+ get: function () {
21801
+ return this._initialized;
21802
+ },
21803
+ enumerable: false,
21804
+ configurable: true
21805
+ });
21806
+ Object.defineProperty(IkasBlogList.prototype, "isStatic", {
21807
+ get: function () {
21808
+ return this._type === IkasBlogListType.STATIC;
21809
+ },
21810
+ enumerable: false,
21811
+ configurable: true
21812
+ });
21813
+ Object.defineProperty(IkasBlogList.prototype, "hasPrev", {
21814
+ get: function () {
21815
+ if (this.isStatic || !this._minPage)
21816
+ return false;
21817
+ return this._minPage > 1;
21818
+ },
21819
+ enumerable: false,
21820
+ configurable: true
21821
+ });
21822
+ Object.defineProperty(IkasBlogList.prototype, "hasNext", {
21823
+ get: function () {
21824
+ if (this.isStatic)
21825
+ return false;
21826
+ return this.page * this.limit < this.count;
21827
+ },
21828
+ enumerable: false,
21829
+ configurable: true
21830
+ });
21831
+ Object.defineProperty(IkasBlogList.prototype, "isLoading", {
21832
+ get: function () {
21833
+ return this._isLoading;
21834
+ },
21835
+ enumerable: false,
21836
+ configurable: true
21837
+ });
21838
+ IkasBlogList.prototype.listBlogs = function (page, limit) {
21839
+ return __awaiter(this, void 0, void 0, function () {
21840
+ return __generator(this, function (_a) {
21841
+ switch (_a.label) {
21842
+ case 0: return [4 /*yield*/, IkasBlogAPI.listBlog({
21843
+ idList: this.isStatic
21844
+ ? this._blogListPropValue.blogIds || undefined
21845
+ : undefined,
21846
+ page: page,
21847
+ limit: limit,
21848
+ categoryId: this._filterCategoryId || undefined,
21849
+ })];
21850
+ case 1: return [2 /*return*/, _a.sent()];
21851
+ }
21852
+ });
21853
+ });
21854
+ };
21855
+ IkasBlogList.prototype.toJSON = function () {
21856
+ return {
21857
+ data: this.data,
21858
+ type: this._type,
21054
21859
  limit: this._limit,
21055
21860
  page: this._page,
21056
21861
  count: this._count,
21057
21862
  initialized: this._initialized,
21058
21863
  minPage: this._minPage,
21059
- brandListPropValue: this._brandListPropValue,
21864
+ blogListPropValue: this._blogListPropValue,
21865
+ filterCategoryId: this._filterCategoryId,
21060
21866
  };
21061
21867
  };
21062
- return IkasBrandList;
21868
+ return IkasBlogList;
21063
21869
  }());
21064
- var IkasBrandListType;
21065
- (function (IkasBrandListType) {
21066
- IkasBrandListType["ALL"] = "ALL";
21067
- IkasBrandListType["STATIC"] = "STATIC";
21068
- })(IkasBrandListType || (IkasBrandListType = {}));
21069
- var IkasBrandListSortType;
21070
- (function (IkasBrandListSortType) {
21071
- IkasBrandListSortType["A_Z"] = "A_Z";
21072
- IkasBrandListSortType["Z_A"] = "Z_A";
21073
- })(IkasBrandListSortType || (IkasBrandListSortType = {}));
21074
-
21075
- var IkasBrandListPropValue = /** @class */ (function () {
21076
- function IkasBrandListPropValue(data) {
21077
- this.initialSort = null;
21078
- this.initialLimit = null;
21079
- // Only for static lists
21080
- this.brandCount = null;
21081
- this.brandIds = null;
21082
- this.brandListType = data.brandListType || IkasBrandListType.ALL;
21083
- this.initialSort = data.initialSort || IkasBrandListSortType.A_Z;
21084
- this.initialLimit = data.initialLimit || 20;
21085
- this.brandCount = data.brandCount;
21086
- this.brandIds = data.brandIds;
21087
- makeAutoObservable(this);
21088
- }
21089
- return IkasBrandListPropValue;
21090
- }());
21870
+ var IkasBlogListType;
21871
+ (function (IkasBlogListType) {
21872
+ IkasBlogListType["ALL"] = "ALL";
21873
+ IkasBlogListType["STATIC"] = "STATIC";
21874
+ IkasBlogListType["CATEGORY"] = "CATEGORY";
21875
+ })(IkasBlogListType || (IkasBlogListType = {}));
21091
21876
 
21092
21877
  var IkasCategoryList = /** @class */ (function () {
21093
21878
  function IkasCategoryList(data) {
@@ -21098,30 +21883,31 @@ var IkasCategoryList = /** @class */ (function () {
21098
21883
  this.getInitial = function () { return __awaiter(_this, void 0, void 0, function () {
21099
21884
  var response_1, err_1;
21100
21885
  var _this = this;
21101
- return __generator(this, function (_a) {
21102
- switch (_a.label) {
21886
+ var _a;
21887
+ return __generator(this, function (_b) {
21888
+ switch (_b.label) {
21103
21889
  case 0:
21104
21890
  if (this._isLoading)
21105
21891
  return [2 /*return*/];
21106
21892
  this._isLoading = true;
21107
- _a.label = 1;
21893
+ _b.label = 1;
21108
21894
  case 1:
21109
- _a.trys.push([1, 3, 4, 5]);
21895
+ _b.trys.push([1, 3, 4, 5]);
21110
21896
  return [4 /*yield*/, IkasCategoryAPI.listCategories({
21111
21897
  idList: this.isStatic
21112
21898
  ? this._categoryListPropValue.categoryIds || undefined
21113
21899
  : undefined,
21114
21900
  page: this.isStatic ? undefined : this.page,
21115
21901
  limit: this.isStatic ? undefined : this.limit,
21902
+ sort: this.getSortParams(),
21116
21903
  })];
21117
21904
  case 2:
21118
- response_1 = _a.sent();
21905
+ response_1 = _b.sent();
21119
21906
  if (this.isStatic) {
21120
- this.data = this._categoryListPropValue
21121
- .categoryIds.map(function (cID) {
21122
- return response_1.categories.find(function (c) { return c.id === cID; });
21123
- })
21124
- .filter(function (c) { return !!c; });
21907
+ this.data =
21908
+ ((_a = this._categoryListPropValue.categoryIds) === null || _a === void 0 ? void 0 : _a.map(function (cID) {
21909
+ return response_1.categories.find(function (c) { return c.id === cID; });
21910
+ }).filter(function (c) { return !!c; })) || [];
21125
21911
  }
21126
21912
  else {
21127
21913
  this.data = response_1.categories;
@@ -21131,7 +21917,7 @@ var IkasCategoryList = /** @class */ (function () {
21131
21917
  this._minPage = this.page;
21132
21918
  return [3 /*break*/, 5];
21133
21919
  case 3:
21134
- err_1 = _a.sent();
21920
+ err_1 = _b.sent();
21135
21921
  console.log(err_1);
21136
21922
  return [3 /*break*/, 5];
21137
21923
  case 4:
@@ -21159,6 +21945,7 @@ var IkasCategoryList = /** @class */ (function () {
21159
21945
  return [4 /*yield*/, IkasCategoryAPI.listCategories({
21160
21946
  page: minPage_1,
21161
21947
  limit: this.limit,
21948
+ sort: this.getSortParams(),
21162
21949
  })];
21163
21950
  case 2:
21164
21951
  response_2 = _a.sent();
@@ -21196,6 +21983,7 @@ var IkasCategoryList = /** @class */ (function () {
21196
21983
  return [4 /*yield*/, IkasCategoryAPI.listCategories({
21197
21984
  page: this.page + 1,
21198
21985
  limit: this.limit,
21986
+ sort: this.getSortParams(),
21199
21987
  })];
21200
21988
  case 2:
21201
21989
  response_3 = _a.sent();
@@ -21233,6 +22021,7 @@ var IkasCategoryList = /** @class */ (function () {
21233
22021
  return [4 /*yield*/, IkasCategoryAPI.listCategories({
21234
22022
  page: page,
21235
22023
  limit: this.limit,
22024
+ sort: this.getSortParams(),
21236
22025
  })];
21237
22026
  case 2:
21238
22027
  response_4 = _a.sent();
@@ -21340,6 +22129,26 @@ var IkasCategoryList = /** @class */ (function () {
21340
22129
  enumerable: false,
21341
22130
  configurable: true
21342
22131
  });
22132
+ IkasCategoryList.prototype.getSortParams = function () {
22133
+ if (this._sort === IkasCategoryListSortType.A_Z)
22134
+ return "name";
22135
+ else
22136
+ return "-name";
22137
+ };
22138
+ IkasCategoryList.prototype.setSortType = function (sortType) {
22139
+ return __awaiter(this, void 0, void 0, function () {
22140
+ return __generator(this, function (_a) {
22141
+ switch (_a.label) {
22142
+ case 0:
22143
+ this._sort = sortType;
22144
+ return [4 /*yield*/, this.getInitial()];
22145
+ case 1:
22146
+ _a.sent();
22147
+ return [2 /*return*/];
22148
+ }
22149
+ });
22150
+ });
22151
+ };
21343
22152
  IkasCategoryList.prototype.toJSON = function () {
21344
22153
  return {
21345
22154
  data: this.data,
@@ -21367,12 +22176,10 @@ var IkasCategoryListSortType;
21367
22176
  })(IkasCategoryListSortType || (IkasCategoryListSortType = {}));
21368
22177
 
21369
22178
  var IkasProductDetail = /** @class */ (function () {
21370
- function IkasProductDetail(product, selectedVariantValues, usePageData, router) {
21371
- this.usePageData = null;
22179
+ function IkasProductDetail(product, selectedVariantValues, router) {
21372
22180
  this.router = null;
21373
22181
  this.product = new IkasProduct(product);
21374
22182
  this.selectedVariantValues = selectedVariantValues.map(function (vv) { return new IkasVariantValue(vv); });
21375
- this.usePageData = usePageData;
21376
22183
  this.router = router;
21377
22184
  makeAutoObservable(this);
21378
22185
  }
@@ -22205,6 +23012,345 @@ function debounce(func, wait, options) {
22205
23012
 
22206
23013
  var debounce_1 = debounce;
22207
23014
 
23015
+ /* tslint:disable */
23016
+ /* eslint-disable */
23017
+ // @generated
23018
+ // This file was automatically generated and should not be edited.
23019
+ //==============================================================
23020
+ // START Enums and Input Objects
23021
+ //==============================================================
23022
+ /**
23023
+ * OrderAdjustment Enum
23024
+ */
23025
+ var AdjustmentEnum;
23026
+ (function (AdjustmentEnum) {
23027
+ AdjustmentEnum["DECREMENT"] = "DECREMENT";
23028
+ AdjustmentEnum["INCREMENT"] = "INCREMENT";
23029
+ })(AdjustmentEnum || (AdjustmentEnum = {}));
23030
+ /**
23031
+ * Amount Type Enum
23032
+ */
23033
+ var AmountTypeEnum;
23034
+ (function (AmountTypeEnum) {
23035
+ AmountTypeEnum["AMOUNT"] = "AMOUNT";
23036
+ AmountTypeEnum["RATIO"] = "RATIO";
23037
+ })(AmountTypeEnum || (AmountTypeEnum = {}));
23038
+ /**
23039
+ * Url Slug Target Type Enum Codes
23040
+ */
23041
+ var BlogMetadataTargetTypeEnum;
23042
+ (function (BlogMetadataTargetTypeEnum) {
23043
+ BlogMetadataTargetTypeEnum["BLOG"] = "BLOG";
23044
+ BlogMetadataTargetTypeEnum["BLOG_CATEGORY"] = "BLOG_CATEGORY";
23045
+ })(BlogMetadataTargetTypeEnum || (BlogMetadataTargetTypeEnum = {}));
23046
+ /**
23047
+ * Cancelled Reason Enum
23048
+ */
23049
+ var CancelledReasonEnum;
23050
+ (function (CancelledReasonEnum) {
23051
+ CancelledReasonEnum["CUSTOMER"] = "CUSTOMER";
23052
+ CancelledReasonEnum["DECLINED"] = "DECLINED";
23053
+ CancelledReasonEnum["INVENTORY"] = "INVENTORY";
23054
+ CancelledReasonEnum["OTHER"] = "OTHER";
23055
+ })(CancelledReasonEnum || (CancelledReasonEnum = {}));
23056
+ /**
23057
+ * Cart Status Enum
23058
+ */
23059
+ var CartStatusEnum;
23060
+ (function (CartStatusEnum) {
23061
+ CartStatusEnum["ACTIVE"] = "ACTIVE";
23062
+ CartStatusEnum["PASSIVE"] = "PASSIVE";
23063
+ })(CartStatusEnum || (CartStatusEnum = {}));
23064
+ /**
23065
+ * Checkout Recovery Email Status Enum
23066
+ */
23067
+ var CheckoutRecoveryEmailStatusEnum;
23068
+ (function (CheckoutRecoveryEmailStatusEnum) {
23069
+ CheckoutRecoveryEmailStatusEnum["NOT_SENT"] = "NOT_SENT";
23070
+ CheckoutRecoveryEmailStatusEnum["SENT"] = "SENT";
23071
+ })(CheckoutRecoveryEmailStatusEnum || (CheckoutRecoveryEmailStatusEnum = {}));
23072
+ /**
23073
+ * Checkout Recovery Status Enum
23074
+ */
23075
+ var CheckoutRecoveryStatusEnum;
23076
+ (function (CheckoutRecoveryStatusEnum) {
23077
+ CheckoutRecoveryStatusEnum["NOT_RECOVERED"] = "NOT_RECOVERED";
23078
+ CheckoutRecoveryStatusEnum["RECOVERED"] = "RECOVERED";
23079
+ })(CheckoutRecoveryStatusEnum || (CheckoutRecoveryStatusEnum = {}));
23080
+ /**
23081
+ * Checkout Requirement Enum
23082
+ */
23083
+ var CheckoutRequirementEnum;
23084
+ (function (CheckoutRequirementEnum) {
23085
+ CheckoutRequirementEnum["INVISIBLE"] = "INVISIBLE";
23086
+ CheckoutRequirementEnum["MANDATORY"] = "MANDATORY";
23087
+ CheckoutRequirementEnum["OPTIONAL"] = "OPTIONAL";
23088
+ })(CheckoutRequirementEnum || (CheckoutRequirementEnum = {}));
23089
+ /**
23090
+ * Checkout Status Enum
23091
+ */
23092
+ var CheckoutStatusEnum;
23093
+ (function (CheckoutStatusEnum) {
23094
+ CheckoutStatusEnum["COMPLETED"] = "COMPLETED";
23095
+ CheckoutStatusEnum["OPEN"] = "OPEN";
23096
+ })(CheckoutStatusEnum || (CheckoutStatusEnum = {}));
23097
+ /**
23098
+ * Customer Account Statuses
23099
+ */
23100
+ var CustomerAccountStatusesEnum;
23101
+ (function (CustomerAccountStatusesEnum) {
23102
+ CustomerAccountStatusesEnum["ACTIVE_ACCOUNT"] = "ACTIVE_ACCOUNT";
23103
+ CustomerAccountStatusesEnum["DECLINED_ACCOUNT_INVITATION"] = "DECLINED_ACCOUNT_INVITATION";
23104
+ CustomerAccountStatusesEnum["DISABLED_ACCOUNT"] = "DISABLED_ACCOUNT";
23105
+ CustomerAccountStatusesEnum["INVITED_TO_CREATE_ACCOUNT"] = "INVITED_TO_CREATE_ACCOUNT";
23106
+ })(CustomerAccountStatusesEnum || (CustomerAccountStatusesEnum = {}));
23107
+ /**
23108
+ * Url Slug Target Type Enum Codes
23109
+ */
23110
+ var HTMLMetaDataTargetTypeEnum;
23111
+ (function (HTMLMetaDataTargetTypeEnum) {
23112
+ HTMLMetaDataTargetTypeEnum["BRAND"] = "BRAND";
23113
+ HTMLMetaDataTargetTypeEnum["CATEGORY"] = "CATEGORY";
23114
+ HTMLMetaDataTargetTypeEnum["PAGE"] = "PAGE";
23115
+ HTMLMetaDataTargetTypeEnum["PRODUCT"] = "PRODUCT";
23116
+ })(HTMLMetaDataTargetTypeEnum || (HTMLMetaDataTargetTypeEnum = {}));
23117
+ /**
23118
+ * Order Line Item Status Enum
23119
+ */
23120
+ var OrderLineItemStatusEnum$2;
23121
+ (function (OrderLineItemStatusEnum) {
23122
+ OrderLineItemStatusEnum["CANCELLED"] = "CANCELLED";
23123
+ OrderLineItemStatusEnum["CANCEL_REJECTED"] = "CANCEL_REJECTED";
23124
+ OrderLineItemStatusEnum["CANCEL_REQUESTED"] = "CANCEL_REQUESTED";
23125
+ OrderLineItemStatusEnum["DELIVERED"] = "DELIVERED";
23126
+ OrderLineItemStatusEnum["FULFILLED"] = "FULFILLED";
23127
+ OrderLineItemStatusEnum["REFUNDED"] = "REFUNDED";
23128
+ OrderLineItemStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
23129
+ OrderLineItemStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
23130
+ OrderLineItemStatusEnum["REFUND_REQUEST_ACCEPTED"] = "REFUND_REQUEST_ACCEPTED";
23131
+ OrderLineItemStatusEnum["UNFULFILLED"] = "UNFULFILLED";
23132
+ })(OrderLineItemStatusEnum$2 || (OrderLineItemStatusEnum$2 = {}));
23133
+ /**
23134
+ * Order Package Fulfill Status Enum
23135
+ */
23136
+ var OrderPackageFulfillStatusEnum;
23137
+ (function (OrderPackageFulfillStatusEnum) {
23138
+ OrderPackageFulfillStatusEnum["CANCELLED"] = "CANCELLED";
23139
+ OrderPackageFulfillStatusEnum["CANCEL_REJECTED"] = "CANCEL_REJECTED";
23140
+ OrderPackageFulfillStatusEnum["CANCEL_REQUESTED"] = "CANCEL_REQUESTED";
23141
+ OrderPackageFulfillStatusEnum["DELIVERED"] = "DELIVERED";
23142
+ OrderPackageFulfillStatusEnum["ERROR"] = "ERROR";
23143
+ OrderPackageFulfillStatusEnum["FULFILLED"] = "FULFILLED";
23144
+ OrderPackageFulfillStatusEnum["READY_FOR_SHIPMENT"] = "READY_FOR_SHIPMENT";
23145
+ OrderPackageFulfillStatusEnum["REFUNDED"] = "REFUNDED";
23146
+ OrderPackageFulfillStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
23147
+ OrderPackageFulfillStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
23148
+ OrderPackageFulfillStatusEnum["REFUND_REQUEST_ACCEPTED"] = "REFUND_REQUEST_ACCEPTED";
23149
+ })(OrderPackageFulfillStatusEnum || (OrderPackageFulfillStatusEnum = {}));
23150
+ /**
23151
+ * Order Package Status Enum
23152
+ */
23153
+ var OrderPackageStatusEnum;
23154
+ (function (OrderPackageStatusEnum) {
23155
+ OrderPackageStatusEnum["CANCELLED"] = "CANCELLED";
23156
+ OrderPackageStatusEnum["CANCEL_REJECTED"] = "CANCEL_REJECTED";
23157
+ OrderPackageStatusEnum["CANCEL_REQUESTED"] = "CANCEL_REQUESTED";
23158
+ OrderPackageStatusEnum["DELIVERED"] = "DELIVERED";
23159
+ OrderPackageStatusEnum["FULFILLED"] = "FULFILLED";
23160
+ OrderPackageStatusEnum["PARTIALLY_CANCELLED"] = "PARTIALLY_CANCELLED";
23161
+ OrderPackageStatusEnum["PARTIALLY_DELIVERED"] = "PARTIALLY_DELIVERED";
23162
+ OrderPackageStatusEnum["PARTIALLY_FULFILLED"] = "PARTIALLY_FULFILLED";
23163
+ OrderPackageStatusEnum["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
23164
+ OrderPackageStatusEnum["READY_FOR_SHIPMENT"] = "READY_FOR_SHIPMENT";
23165
+ OrderPackageStatusEnum["REFUNDED"] = "REFUNDED";
23166
+ OrderPackageStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
23167
+ OrderPackageStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
23168
+ OrderPackageStatusEnum["REFUND_REQUEST_ACCEPTED"] = "REFUND_REQUEST_ACCEPTED";
23169
+ OrderPackageStatusEnum["UNABLE_TO_DELIVER"] = "UNABLE_TO_DELIVER";
23170
+ OrderPackageStatusEnum["UNFULFILLED"] = "UNFULFILLED";
23171
+ })(OrderPackageStatusEnum || (OrderPackageStatusEnum = {}));
23172
+ /**
23173
+ * Order Status Enum
23174
+ */
23175
+ var OrderStatusEnum;
23176
+ (function (OrderStatusEnum) {
23177
+ OrderStatusEnum["CANCELLED"] = "CANCELLED";
23178
+ OrderStatusEnum["CREATED"] = "CREATED";
23179
+ OrderStatusEnum["DRAFT"] = "DRAFT";
23180
+ OrderStatusEnum["PARTIALLY_CANCELLED"] = "PARTIALLY_CANCELLED";
23181
+ OrderStatusEnum["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
23182
+ OrderStatusEnum["REFUNDED"] = "REFUNDED";
23183
+ OrderStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
23184
+ OrderStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
23185
+ })(OrderStatusEnum || (OrderStatusEnum = {}));
23186
+ /**
23187
+ * Payment Method Enum
23188
+ */
23189
+ var PaymentMethodEnum;
23190
+ (function (PaymentMethodEnum) {
23191
+ PaymentMethodEnum["BUY_ONLINE_PAY_AT_STORE"] = "BUY_ONLINE_PAY_AT_STORE";
23192
+ PaymentMethodEnum["CASH"] = "CASH";
23193
+ PaymentMethodEnum["CASH_ON_DELIVERY"] = "CASH_ON_DELIVERY";
23194
+ PaymentMethodEnum["CREDIT_CARD"] = "CREDIT_CARD";
23195
+ PaymentMethodEnum["CREDIT_CARD_ON_DELIVERY"] = "CREDIT_CARD_ON_DELIVERY";
23196
+ PaymentMethodEnum["GIFT_CARD"] = "GIFT_CARD";
23197
+ PaymentMethodEnum["MONEY_ORDER"] = "MONEY_ORDER";
23198
+ PaymentMethodEnum["OTHER"] = "OTHER";
23199
+ })(PaymentMethodEnum || (PaymentMethodEnum = {}));
23200
+ /**
23201
+ * Payment Status Enum
23202
+ */
23203
+ var PaymentStatusEnum;
23204
+ (function (PaymentStatusEnum) {
23205
+ PaymentStatusEnum["PAID"] = "PAID";
23206
+ PaymentStatusEnum["PARTIALLY_PAID"] = "PARTIALLY_PAID";
23207
+ PaymentStatusEnum["WAITING"] = "WAITING";
23208
+ })(PaymentStatusEnum || (PaymentStatusEnum = {}));
23209
+ /**
23210
+ * ProductAttribute Types
23211
+ */
23212
+ var ProductAttributeTypeEnum;
23213
+ (function (ProductAttributeTypeEnum) {
23214
+ ProductAttributeTypeEnum["BOOLEAN"] = "BOOLEAN";
23215
+ ProductAttributeTypeEnum["CHOICE"] = "CHOICE";
23216
+ ProductAttributeTypeEnum["DATETIME"] = "DATETIME";
23217
+ ProductAttributeTypeEnum["HTML"] = "HTML";
23218
+ ProductAttributeTypeEnum["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
23219
+ ProductAttributeTypeEnum["NUMERIC"] = "NUMERIC";
23220
+ ProductAttributeTypeEnum["TEXT"] = "TEXT";
23221
+ })(ProductAttributeTypeEnum || (ProductAttributeTypeEnum = {}));
23222
+ /**
23223
+ * Product Filter Type Enum Codes
23224
+ */
23225
+ var ProductFilterDisplayTypeEnum;
23226
+ (function (ProductFilterDisplayTypeEnum) {
23227
+ ProductFilterDisplayTypeEnum["BOX"] = "BOX";
23228
+ ProductFilterDisplayTypeEnum["DATE_RANGE"] = "DATE_RANGE";
23229
+ ProductFilterDisplayTypeEnum["LIST"] = "LIST";
23230
+ ProductFilterDisplayTypeEnum["NUMBER_RANGE"] = "NUMBER_RANGE";
23231
+ ProductFilterDisplayTypeEnum["NUMBER_RANGE_LIST"] = "NUMBER_RANGE_LIST";
23232
+ ProductFilterDisplayTypeEnum["SWATCH"] = "SWATCH";
23233
+ })(ProductFilterDisplayTypeEnum || (ProductFilterDisplayTypeEnum = {}));
23234
+ /**
23235
+ * ProductFilter Sort Type Enum
23236
+ */
23237
+ var ProductFilterSortTypeEnum;
23238
+ (function (ProductFilterSortTypeEnum) {
23239
+ ProductFilterSortTypeEnum["ALPHABETICAL_ASC"] = "ALPHABETICAL_ASC";
23240
+ ProductFilterSortTypeEnum["ALPHABETICAL_DESC"] = "ALPHABETICAL_DESC";
23241
+ ProductFilterSortTypeEnum["PRODUCT_COUNT_ASC"] = "PRODUCT_COUNT_ASC";
23242
+ ProductFilterSortTypeEnum["PRODUCT_COUNT_DESC"] = "PRODUCT_COUNT_DESC";
23243
+ })(ProductFilterSortTypeEnum || (ProductFilterSortTypeEnum = {}));
23244
+ /**
23245
+ * Product Filter Type Enum Codes
23246
+ */
23247
+ var ProductFilterTypeEnum;
23248
+ (function (ProductFilterTypeEnum) {
23249
+ ProductFilterTypeEnum["ATTRIBUTE"] = "ATTRIBUTE";
23250
+ ProductFilterTypeEnum["BRAND"] = "BRAND";
23251
+ ProductFilterTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
23252
+ ProductFilterTypeEnum["PRICE"] = "PRICE";
23253
+ ProductFilterTypeEnum["STOCK_STATUS"] = "STOCK_STATUS";
23254
+ ProductFilterTypeEnum["TAG"] = "TAG";
23255
+ ProductFilterTypeEnum["VARIANT_TYPE"] = "VARIANT_TYPE";
23256
+ })(ProductFilterTypeEnum || (ProductFilterTypeEnum = {}));
23257
+ /**
23258
+ * Shipping Method Enum
23259
+ */
23260
+ var ShippingMethodEnum;
23261
+ (function (ShippingMethodEnum) {
23262
+ ShippingMethodEnum["CLICK_AND_COLLECT"] = "CLICK_AND_COLLECT";
23263
+ ShippingMethodEnum["NO_SHIPMENT"] = "NO_SHIPMENT";
23264
+ ShippingMethodEnum["SHIPMENT"] = "SHIPMENT";
23265
+ })(ShippingMethodEnum || (ShippingMethodEnum = {}));
23266
+ /**
23267
+ * Sort By Direction Enum Codes
23268
+ */
23269
+ var SortByDirectionEnum;
23270
+ (function (SortByDirectionEnum) {
23271
+ SortByDirectionEnum["ASC"] = "ASC";
23272
+ SortByDirectionEnum["DESC"] = "DESC";
23273
+ })(SortByDirectionEnum || (SortByDirectionEnum = {}));
23274
+ /**
23275
+ * Sort By Type Enum Codes
23276
+ */
23277
+ var SortByTypeEnum;
23278
+ (function (SortByTypeEnum) {
23279
+ SortByTypeEnum["CREATED_AT"] = "CREATED_AT";
23280
+ SortByTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
23281
+ SortByTypeEnum["NAME"] = "NAME";
23282
+ SortByTypeEnum["PRICE"] = "PRICE";
23283
+ })(SortByTypeEnum || (SortByTypeEnum = {}));
23284
+ /**
23285
+ * StorefrontStatusEnum
23286
+ */
23287
+ var StorefrontStatusTypes;
23288
+ (function (StorefrontStatusTypes) {
23289
+ StorefrontStatusTypes["FAILED"] = "FAILED";
23290
+ StorefrontStatusTypes["NOT_DEPLOYED"] = "NOT_DEPLOYED";
23291
+ StorefrontStatusTypes["READY"] = "READY";
23292
+ StorefrontStatusTypes["WAITING"] = "WAITING";
23293
+ })(StorefrontStatusTypes || (StorefrontStatusTypes = {}));
23294
+ /**
23295
+ * StorefrontThemeStatusEnum
23296
+ */
23297
+ var StorefrontThemeStatus;
23298
+ (function (StorefrontThemeStatus) {
23299
+ StorefrontThemeStatus["FAILED"] = "FAILED";
23300
+ StorefrontThemeStatus["NOT_DEPLOYED"] = "NOT_DEPLOYED";
23301
+ StorefrontThemeStatus["READY"] = "READY";
23302
+ StorefrontThemeStatus["WAITING"] = "WAITING";
23303
+ })(StorefrontThemeStatus || (StorefrontThemeStatus = {}));
23304
+ /**
23305
+ * Transaction Card Association Enum
23306
+ */
23307
+ var TransactionCardAssociationEnum;
23308
+ (function (TransactionCardAssociationEnum) {
23309
+ TransactionCardAssociationEnum["AMERICAN_EXPRESS"] = "AMERICAN_EXPRESS";
23310
+ TransactionCardAssociationEnum["MASTER_CARD"] = "MASTER_CARD";
23311
+ TransactionCardAssociationEnum["TROY"] = "TROY";
23312
+ TransactionCardAssociationEnum["VISA"] = "VISA";
23313
+ })(TransactionCardAssociationEnum || (TransactionCardAssociationEnum = {}));
23314
+ /**
23315
+ * Transaction Card Type Enum
23316
+ */
23317
+ var TransactionCardTypeEnum;
23318
+ (function (TransactionCardTypeEnum) {
23319
+ TransactionCardTypeEnum["CREDIT"] = "CREDIT";
23320
+ TransactionCardTypeEnum["DEBIT"] = "DEBIT";
23321
+ TransactionCardTypeEnum["PREPAID"] = "PREPAID";
23322
+ })(TransactionCardTypeEnum || (TransactionCardTypeEnum = {}));
23323
+ /**
23324
+ * Transaction Status Enum
23325
+ */
23326
+ var TransactionStatusEnum;
23327
+ (function (TransactionStatusEnum) {
23328
+ TransactionStatusEnum["AUTHORIZED"] = "AUTHORIZED";
23329
+ TransactionStatusEnum["FAILED"] = "FAILED";
23330
+ TransactionStatusEnum["PENDING"] = "PENDING";
23331
+ TransactionStatusEnum["SUCCESS"] = "SUCCESS";
23332
+ })(TransactionStatusEnum || (TransactionStatusEnum = {}));
23333
+ /**
23334
+ * Transaction Type Enum
23335
+ */
23336
+ var TransactionTypeEnum;
23337
+ (function (TransactionTypeEnum) {
23338
+ TransactionTypeEnum["REFUND"] = "REFUND";
23339
+ TransactionTypeEnum["SALE"] = "SALE";
23340
+ TransactionTypeEnum["VOID"] = "VOID";
23341
+ })(TransactionTypeEnum || (TransactionTypeEnum = {}));
23342
+ /**
23343
+ * Variant Selection Types
23344
+ */
23345
+ var VariantSelectionTypeEnum;
23346
+ (function (VariantSelectionTypeEnum) {
23347
+ VariantSelectionTypeEnum["CHOICE"] = "CHOICE";
23348
+ VariantSelectionTypeEnum["COLOR"] = "COLOR";
23349
+ })(VariantSelectionTypeEnum || (VariantSelectionTypeEnum = {}));
23350
+ //==============================================================
23351
+ // END Enums and Input Objects
23352
+ //==============================================================
23353
+
22208
23354
  var IkasProductList = /** @class */ (function () {
22209
23355
  function IkasProductList(data, router) {
22210
23356
  var _this = this;
@@ -22249,22 +23395,23 @@ var IkasProductList = /** @class */ (function () {
22249
23395
  }); };
22250
23396
  this.getInitial = function (queryParams) { return __awaiter(_this, void 0, void 0, function () {
22251
23397
  var fetchRequestTime, page, limit, response_1, data, err_1;
22252
- return __generator(this, function (_a) {
22253
- switch (_a.label) {
23398
+ var _a;
23399
+ return __generator(this, function (_b) {
23400
+ switch (_b.label) {
22254
23401
  case 0:
22255
23402
  this._isLoading = true;
22256
23403
  fetchRequestTime = Date.now();
22257
23404
  this._fetchRequestTime = fetchRequestTime;
22258
- _a.label = 1;
23405
+ _b.label = 1;
22259
23406
  case 1:
22260
- _a.trys.push([1, 5, 6, 7]);
23407
+ _b.trys.push([1, 5, 6, 7]);
22261
23408
  page = 1;
22262
23409
  limit = this._limit;
22263
23410
  if (!(this.isFilterable && !this.filters)) return [3 /*break*/, 3];
22264
23411
  return [4 /*yield*/, this.getFilters()];
22265
23412
  case 2:
22266
- _a.sent();
22267
- _a.label = 3;
23413
+ _b.sent();
23414
+ _b.label = 3;
22268
23415
  case 3:
22269
23416
  this.applyQueryParamFilters(queryParams);
22270
23417
  if (this.isSearch && !this.hasAppliedfilter) {
@@ -22289,16 +23436,18 @@ var IkasProductList = /** @class */ (function () {
22289
23436
  }
22290
23437
  return [4 /*yield*/, this.searchProducts(page || 1, limit || 10)];
22291
23438
  case 4:
22292
- response_1 = _a.sent();
23439
+ response_1 = _b.sent();
22293
23440
  if (!response_1 || this._fetchRequestTime !== fetchRequestTime)
22294
23441
  return [2 /*return*/];
22295
23442
  data = [];
22296
23443
  if (this.isStatic) {
22297
- data = this._productListPropValue.productIds.map(function (pID) {
22298
- var product = response_1.data.find(function (p) { return p.id === pID.productId; });
22299
- var variant = product === null || product === void 0 ? void 0 : product.variants.find(function (v) { return v.id === pID.variantId; });
22300
- return new IkasProductDetail(product, variant.variantValues);
22301
- });
23444
+ data =
23445
+ ((_a = this._productListPropValue.productIds) === null || _a === void 0 ? void 0 : _a.map(function (pID) {
23446
+ var product = response_1.data.find(function (p) { return p.id === pID.productId; });
23447
+ var variant = product === null || product === void 0 ? void 0 : product.variants.find(function (v) { return v.id === pID.variantId; });
23448
+ if (product && variant)
23449
+ return new IkasProductDetail(product, variant.variantValues);
23450
+ }).filter(function (p) { return !!p; })) || [];
22302
23451
  }
22303
23452
  else {
22304
23453
  data = response_1.data.map(function (product) {
@@ -22313,7 +23462,7 @@ var IkasProductList = /** @class */ (function () {
22313
23462
  this._minPage = this.page;
22314
23463
  return [2 /*return*/, true];
22315
23464
  case 5:
22316
- err_1 = _a.sent();
23465
+ err_1 = _b.sent();
22317
23466
  console.log(err_1);
22318
23467
  return [3 /*break*/, 7];
22319
23468
  case 6:
@@ -22454,7 +23603,11 @@ var IkasProductList = /** @class */ (function () {
22454
23603
  this._sort =
22455
23604
  data.sort ||
22456
23605
  data.productListPropValue.initialSort ||
22457
- IkasProductListSortType.A_Z;
23606
+ IkasProductListSortType.LAST_ADDED;
23607
+ // TODO remove this later
23608
+ //@ts-ignore
23609
+ if (this.initialSort === "A_Z" || this.initialSort === "Z_A")
23610
+ this._sort = IkasProductListSortType.LAST_ADDED;
22458
23611
  this._limit = data.limit || data.productListPropValue.initialLimit || 20;
22459
23612
  this._page = data.page || 1;
22460
23613
  this._count = data.count || 0;
@@ -22638,6 +23791,48 @@ var IkasProductList = /** @class */ (function () {
22638
23791
  enumerable: false,
22639
23792
  configurable: true
22640
23793
  });
23794
+ IkasProductList.prototype.getSortParams = function () {
23795
+ var direction = SortByDirectionEnum.DESC;
23796
+ var type = SortByTypeEnum.CREATED_AT;
23797
+ switch (this._sort) {
23798
+ // case IkasProductListSortType.A_Z:
23799
+ // direction = SortByDirectionEnum.ASC;
23800
+ // type = SortByTypeEnum.NAME;
23801
+ // break;
23802
+ // case IkasProductListSortType.Z_A:
23803
+ // direction = SortByDirectionEnum.DESC;
23804
+ // type = SortByTypeEnum.NAME;
23805
+ // break;
23806
+ case IkasProductListSortType.INCREASING_PRICE:
23807
+ direction = SortByDirectionEnum.ASC;
23808
+ type = SortByTypeEnum.PRICE;
23809
+ break;
23810
+ case IkasProductListSortType.DECREASING_PRICE:
23811
+ direction = SortByDirectionEnum.DESC;
23812
+ type = SortByTypeEnum.PRICE;
23813
+ break;
23814
+ case IkasProductListSortType.FIRST_ADDED:
23815
+ direction = SortByDirectionEnum.DESC;
23816
+ type = SortByTypeEnum.CREATED_AT;
23817
+ break;
23818
+ case IkasProductListSortType.LAST_ADDED:
23819
+ direction = SortByDirectionEnum.ASC;
23820
+ type = SortByTypeEnum.CREATED_AT;
23821
+ break;
23822
+ case IkasProductListSortType.INCREASING_DISCOUNT:
23823
+ direction = SortByDirectionEnum.ASC;
23824
+ type = SortByTypeEnum.DISCOUNT_RATIO;
23825
+ break;
23826
+ case IkasProductListSortType.DECRASING_DISCOUNT:
23827
+ direction = SortByDirectionEnum.DESC;
23828
+ type = SortByTypeEnum.DISCOUNT_RATIO;
23829
+ break;
23830
+ }
23831
+ return {
23832
+ direction: direction,
23833
+ type: type,
23834
+ };
23835
+ };
22641
23836
  IkasProductList.prototype.searchProducts = function (page, limit) {
22642
23837
  var _a, _b;
22643
23838
  return __awaiter(this, void 0, void 0, function () {
@@ -22678,6 +23873,7 @@ var IkasProductList = /** @class */ (function () {
22678
23873
  priceListId: IkasStorefrontConfig.priceListId,
22679
23874
  salesChannelId: IkasStorefrontConfig.salesChannelId,
22680
23875
  query: this._searchKeyword,
23876
+ order: [this.getSortParams()],
22681
23877
  })];
22682
23878
  case 1: return [2 /*return*/, _c.sent()];
22683
23879
  }
@@ -22776,6 +23972,20 @@ var IkasProductList = /** @class */ (function () {
22776
23972
  }
22777
23973
  this.applyFilters();
22778
23974
  };
23975
+ IkasProductList.prototype.setSortType = function (sortType) {
23976
+ return __awaiter(this, void 0, void 0, function () {
23977
+ return __generator(this, function (_a) {
23978
+ switch (_a.label) {
23979
+ case 0:
23980
+ this._sort = sortType;
23981
+ return [4 /*yield*/, this.getInitial()];
23982
+ case 1:
23983
+ _a.sent();
23984
+ return [2 /*return*/];
23985
+ }
23986
+ });
23987
+ });
23988
+ };
22779
23989
  IkasProductList.prototype.onFilterCategoryClick = function (filterCategory, disableRoute) {
22780
23990
  var _a;
22781
23991
  if (disableRoute === void 0) { disableRoute = false; }
@@ -22839,14 +24049,14 @@ var IkasProductListType;
22839
24049
  })(IkasProductListType || (IkasProductListType = {}));
22840
24050
  var IkasProductListSortType;
22841
24051
  (function (IkasProductListSortType) {
22842
- IkasProductListSortType["MOST_SOLD"] = "MOST_SOLD";
22843
- IkasProductListSortType["FEATURED"] = "FEATURED";
24052
+ // A_Z = "A_Z",
24053
+ // Z_A = "Z_A",
22844
24054
  IkasProductListSortType["INCREASING_PRICE"] = "INCREASING_PRICE";
22845
24055
  IkasProductListSortType["DECREASING_PRICE"] = "DECREASING_PRICE";
22846
- IkasProductListSortType["A_Z"] = "A_Z";
22847
- IkasProductListSortType["Z_A"] = "Z_A";
22848
24056
  IkasProductListSortType["LAST_ADDED"] = "LAST_ADDED";
22849
24057
  IkasProductListSortType["FIRST_ADDED"] = "FIRST_ADDED";
24058
+ IkasProductListSortType["INCREASING_DISCOUNT"] = "INCREASING_DISCOUNT";
24059
+ IkasProductListSortType["DECRASING_DISCOUNT"] = "DECRASING_DISCOUNT";
22850
24060
  })(IkasProductListSortType || (IkasProductListSortType = {}));
22851
24061
 
22852
24062
  /**
@@ -24756,7 +25966,7 @@ var IkasProductListPropValue = /** @class */ (function () {
24756
25966
  this.usePageFilter = null;
24757
25967
  this.category = null;
24758
25968
  this.productListType = data.productListType || IkasProductListType.ALL;
24759
- this.initialSort = data.initialSort || IkasProductListSortType.A_Z;
25969
+ this.initialSort = data.initialSort || IkasProductListSortType.LAST_ADDED;
24760
25970
  this.initialLimit = data.initialLimit || 20;
24761
25971
  this.productCount = data.productCount;
24762
25972
  this.productIds = data.productIds;
@@ -24810,6 +26020,34 @@ var IkasCategoryListPropValue = /** @class */ (function () {
24810
26020
  return IkasCategoryListPropValue;
24811
26021
  }());
24812
26022
 
26023
+ var IkasBlogPropValue = /** @class */ (function () {
26024
+ function IkasBlogPropValue(data) {
26025
+ this.blogId = null;
26026
+ // Only for product detail page
26027
+ this.usePageData = null;
26028
+ this.blogId = data.blogId;
26029
+ this.usePageData = data.usePageData;
26030
+ makeAutoObservable(this);
26031
+ }
26032
+ return IkasBlogPropValue;
26033
+ }());
26034
+
26035
+ var IkasBlogListPropValue = /** @class */ (function () {
26036
+ function IkasBlogListPropValue(data) {
26037
+ this.initialLimit = null;
26038
+ // Only for static lists
26039
+ this.blogIds = null;
26040
+ this.usePageFilter = null;
26041
+ this.blogListType = data.blogListType || IkasBlogListType.ALL;
26042
+ this.initialLimit = data.initialLimit || 20;
26043
+ this.blogIds = data.blogIds;
26044
+ this.categoryId = data.categoryId || null;
26045
+ this.usePageFilter = data.usePageFilter || null;
26046
+ makeAutoObservable(this);
26047
+ }
26048
+ return IkasBlogListPropValue;
26049
+ }());
26050
+
24813
26051
  var IkasBrandAPI = /** @class */ (function () {
24814
26052
  function IkasBrandAPI() {
24815
26053
  }
@@ -24819,7 +26057,7 @@ var IkasBrandAPI = /** @class */ (function () {
24819
26057
  return __generator(this, function (_b) {
24820
26058
  switch (_b.label) {
24821
26059
  case 0:
24822
- 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, pagination: $pagination, name: $name) {\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 ) {\n listProductBrand(id: $id, pagination: $pagination, name: $name) {\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 "])));
26060
+ 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 "])));
24823
26061
  _b.label = 1;
24824
26062
  case 1:
24825
26063
  _b.trys.push([1, 3, , 4]);
@@ -24842,6 +26080,7 @@ var IkasBrandAPI = /** @class */ (function () {
24842
26080
  like: params.search,
24843
26081
  }
24844
26082
  : undefined,
26083
+ sort: (params === null || params === void 0 ? void 0 : params.sort) || null,
24845
26084
  },
24846
26085
  })];
24847
26086
  case 2:
@@ -24880,7 +26119,7 @@ var IkasBrandAPI = /** @class */ (function () {
24880
26119
  };
24881
26120
  return IkasBrandAPI;
24882
26121
  }());
24883
- var templateObject_1;
26122
+ var templateObject_1$1;
24884
26123
 
24885
26124
  var IkasCartAPI = /** @class */ (function () {
24886
26125
  function IkasCartAPI() {
@@ -24891,7 +26130,7 @@ var IkasCartAPI = /** @class */ (function () {
24891
26130
  return __generator(this, function (_b) {
24892
26131
  switch (_b.label) {
24893
26132
  case 0:
24894
- MUTATION = src(templateObject_1$1 || (templateObject_1$1 = __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 "])));
26133
+ 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 "])));
24895
26134
  _b.label = 1;
24896
26135
  case 1:
24897
26136
  _b.trys.push([1, 3, , 4]);
@@ -24926,7 +26165,7 @@ var IkasCartAPI = /** @class */ (function () {
24926
26165
  return __generator(this, function (_b) {
24927
26166
  switch (_b.label) {
24928
26167
  case 0:
24929
- 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 "])));
26168
+ 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 "])));
24930
26169
  _b.label = 1;
24931
26170
  case 1:
24932
26171
  _b.trys.push([1, 3, , 4]);
@@ -24959,7 +26198,7 @@ var IkasCartAPI = /** @class */ (function () {
24959
26198
  };
24960
26199
  return IkasCartAPI;
24961
26200
  }());
24962
- var templateObject_1$1, templateObject_2;
26201
+ var templateObject_1$2, templateObject_2$1;
24963
26202
 
24964
26203
  var IkasCategoryAPI = /** @class */ (function () {
24965
26204
  function IkasCategoryAPI() {
@@ -24970,7 +26209,7 @@ var IkasCategoryAPI = /** @class */ (function () {
24970
26209
  return __generator(this, function (_b) {
24971
26210
  switch (_b.label) {
24972
26211
  case 0:
24973
- LIST_QUERY = src(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\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 ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\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 "])));
26212
+ 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 "])));
24974
26213
  _b.label = 1;
24975
26214
  case 1:
24976
26215
  _b.trys.push([1, 10, , 11]);
@@ -24993,6 +26232,7 @@ var IkasCategoryAPI = /** @class */ (function () {
24993
26232
  like: params.search,
24994
26233
  }
24995
26234
  : undefined,
26235
+ sort: (params === null || params === void 0 ? void 0 : params.sort) || null,
24996
26236
  },
24997
26237
  })];
24998
26238
  case 2:
@@ -25079,7 +26319,7 @@ var IkasCategoryAPI = /** @class */ (function () {
25079
26319
  return __generator(this, function (_b) {
25080
26320
  switch (_b.label) {
25081
26321
  case 0:
25082
- LIST_QUERY = src(templateObject_2$1 || (templateObject_2$1 = __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 "])));
26322
+ 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 "])));
25083
26323
  _b.label = 1;
25084
26324
  case 1:
25085
26325
  _b.trys.push([1, 3, , 4]);
@@ -25129,7 +26369,7 @@ var IkasCategoryAPI = /** @class */ (function () {
25129
26369
  };
25130
26370
  return IkasCategoryAPI;
25131
26371
  }());
25132
- var templateObject_1$2, templateObject_2$1;
26372
+ var templateObject_1$3, templateObject_2$2;
25133
26373
 
25134
26374
  var IkasCheckoutAPI = /** @class */ (function () {
25135
26375
  function IkasCheckoutAPI() {
@@ -25140,7 +26380,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
25140
26380
  return __generator(this, function (_b) {
25141
26381
  switch (_b.label) {
25142
26382
  case 0:
25143
- QUERY = src(templateObject_1$3 || (templateObject_1$3 = __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 "])));
26383
+ 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 "])));
25144
26384
  _b.label = 1;
25145
26385
  case 1:
25146
26386
  _b.trys.push([1, 3, , 4]);
@@ -25175,7 +26415,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
25175
26415
  return __generator(this, function (_b) {
25176
26416
  switch (_b.label) {
25177
26417
  case 0:
25178
- QUERY = src(templateObject_2$2 || (templateObject_2$2 = __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 "])));
26418
+ 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 "])));
25179
26419
  _b.label = 1;
25180
26420
  case 1:
25181
26421
  _b.trys.push([1, 3, , 4]);
@@ -25211,7 +26451,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
25211
26451
  return __generator(this, function (_f) {
25212
26452
  switch (_f.label) {
25213
26453
  case 0:
25214
- 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 "])));
26454
+ 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 "])));
25215
26455
  _f.label = 1;
25216
26456
  case 1:
25217
26457
  _f.trys.push([1, 3, , 4]);
@@ -25305,7 +26545,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
25305
26545
  return __generator(this, function (_b) {
25306
26546
  switch (_b.label) {
25307
26547
  case 0:
25308
- 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 "])));
26548
+ 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 "])));
25309
26549
  _b.label = 1;
25310
26550
  case 1:
25311
26551
  _b.trys.push([1, 3, , 4]);
@@ -25484,7 +26724,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
25484
26724
  };
25485
26725
  return IkasCheckoutAPI;
25486
26726
  }());
25487
- var templateObject_1$3, templateObject_2$2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
26727
+ var templateObject_1$4, templateObject_2$3, templateObject_3$1, templateObject_4$1, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
25488
26728
 
25489
26729
  var IkasCityAPI = /** @class */ (function () {
25490
26730
  function IkasCityAPI() {
@@ -25495,7 +26735,7 @@ var IkasCityAPI = /** @class */ (function () {
25495
26735
  return __generator(this, function (_b) {
25496
26736
  switch (_b.label) {
25497
26737
  case 0:
25498
- QUERY = src(templateObject_1$4 || (templateObject_1$4 = __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 "])));
26738
+ 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 "])));
25499
26739
  _b.label = 1;
25500
26740
  case 1:
25501
26741
  _b.trys.push([1, 3, , 4]);
@@ -25534,7 +26774,7 @@ var IkasCityAPI = /** @class */ (function () {
25534
26774
  };
25535
26775
  return IkasCityAPI;
25536
26776
  }());
25537
- var templateObject_1$4;
26777
+ var templateObject_1$5;
25538
26778
 
25539
26779
  var IkasCountryAPI = /** @class */ (function () {
25540
26780
  function IkasCountryAPI() {
@@ -25545,7 +26785,7 @@ var IkasCountryAPI = /** @class */ (function () {
25545
26785
  return __generator(this, function (_b) {
25546
26786
  switch (_b.label) {
25547
26787
  case 0:
25548
- QUERY = src(templateObject_1$5 || (templateObject_1$5 = __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 "])));
26788
+ 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 "])));
25549
26789
  _b.label = 1;
25550
26790
  case 1:
25551
26791
  _b.trys.push([1, 3, , 4]);
@@ -25585,7 +26825,7 @@ var IkasCountryAPI = /** @class */ (function () {
25585
26825
  return __generator(this, function (_b) {
25586
26826
  switch (_b.label) {
25587
26827
  case 0:
25588
- QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getAvailableShippingCountries($salesChannelId: String!) {\n getAvailableShippingCountries(salesChannelId: $salesChannelId)\n }\n "], ["\n query getAvailableShippingCountries($salesChannelId: String!) {\n getAvailableShippingCountries(salesChannelId: $salesChannelId)\n }\n "])));
26828
+ 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 "])));
25589
26829
  _b.label = 1;
25590
26830
  case 1:
25591
26831
  _b.trys.push([1, 3, , 4]);
@@ -25620,7 +26860,7 @@ var IkasCountryAPI = /** @class */ (function () {
25620
26860
  return __generator(this, function (_a) {
25621
26861
  switch (_a.label) {
25622
26862
  case 0:
25623
- QUERY = src(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n query getMyCountry {\n getMyCountry\n }\n "], ["\n query getMyCountry {\n getMyCountry\n }\n "])));
26863
+ QUERY = src(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n query getMyCountry {\n getMyCountry\n }\n "], ["\n query getMyCountry {\n getMyCountry\n }\n "])));
25624
26864
  _a.label = 1;
25625
26865
  case 1:
25626
26866
  _a.trys.push([1, 3, , 4]);
@@ -25641,7 +26881,7 @@ var IkasCountryAPI = /** @class */ (function () {
25641
26881
  };
25642
26882
  return IkasCountryAPI;
25643
26883
  }());
25644
- var templateObject_1$5, templateObject_2$3, templateObject_3$1;
26884
+ var templateObject_1$6, templateObject_2$4, templateObject_3$2;
25645
26885
 
25646
26886
  var IkasCustomerAPI = /** @class */ (function () {
25647
26887
  function IkasCustomerAPI() {
@@ -25652,7 +26892,7 @@ var IkasCustomerAPI = /** @class */ (function () {
25652
26892
  return __generator(this, function (_b) {
25653
26893
  switch (_b.label) {
25654
26894
  case 0:
25655
- MUTATION = src(templateObject_1$6 || (templateObject_1$6 = __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 "])));
26895
+ 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 "])));
25656
26896
  _b.label = 1;
25657
26897
  case 1:
25658
26898
  _b.trys.push([1, 3, , 4]);
@@ -25688,7 +26928,7 @@ var IkasCustomerAPI = /** @class */ (function () {
25688
26928
  return __generator(this, function (_b) {
25689
26929
  switch (_b.label) {
25690
26930
  case 0:
25691
- MUTATION = src(templateObject_2$4 || (templateObject_2$4 = __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 "])));
26931
+ 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 "])));
25692
26932
  _b.label = 1;
25693
26933
  case 1:
25694
26934
  _b.trys.push([1, 3, , 4]);
@@ -25726,7 +26966,7 @@ var IkasCustomerAPI = /** @class */ (function () {
25726
26966
  return __generator(this, function (_b) {
25727
26967
  switch (_b.label) {
25728
26968
  case 0:
25729
- MUTATION = src(templateObject_3$2 || (templateObject_3$2 = __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 "])));
26969
+ 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 "])));
25730
26970
  _b.label = 1;
25731
26971
  case 1:
25732
26972
  _b.trys.push([1, 3, , 4]);
@@ -25761,7 +27001,7 @@ var IkasCustomerAPI = /** @class */ (function () {
25761
27001
  return __generator(this, function (_b) {
25762
27002
  switch (_b.label) {
25763
27003
  case 0:
25764
- MUTATION = src(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n mutation customerForgotPassword($email: String!) {\n customerForgotPassword(email: $email)\n }\n "], ["\n mutation customerForgotPassword($email: String!) {\n customerForgotPassword(email: $email)\n }\n "])));
27004
+ 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 "])));
25765
27005
  _b.label = 1;
25766
27006
  case 1:
25767
27007
  _b.trys.push([1, 3, , 4]);
@@ -26042,7 +27282,7 @@ var IkasCustomerAPI = /** @class */ (function () {
26042
27282
  };
26043
27283
  return IkasCustomerAPI;
26044
27284
  }());
26045
- var templateObject_1$6, templateObject_2$4, templateObject_3$2, templateObject_4$1, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11;
27285
+ 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;
26046
27286
 
26047
27287
  var IkasDistrictAPI = /** @class */ (function () {
26048
27288
  function IkasDistrictAPI() {
@@ -26053,7 +27293,7 @@ var IkasDistrictAPI = /** @class */ (function () {
26053
27293
  return __generator(this, function (_b) {
26054
27294
  switch (_b.label) {
26055
27295
  case 0:
26056
- QUERY = src(templateObject_1$7 || (templateObject_1$7 = __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 "])));
27296
+ 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 "])));
26057
27297
  _b.label = 1;
26058
27298
  case 1:
26059
27299
  _b.trys.push([1, 3, , 4]);
@@ -26094,7 +27334,7 @@ var IkasDistrictAPI = /** @class */ (function () {
26094
27334
  };
26095
27335
  return IkasDistrictAPI;
26096
27336
  }());
26097
- var templateObject_1$7;
27337
+ var templateObject_1$8;
26098
27338
 
26099
27339
  var IkasHTMLMetaDataAPI = /** @class */ (function () {
26100
27340
  function IkasHTMLMetaDataAPI() {
@@ -26105,7 +27345,7 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
26105
27345
  return __generator(this, function (_b) {
26106
27346
  switch (_b.label) {
26107
27347
  case 0:
26108
- LIST_QUERY = src(templateObject_1$8 || (templateObject_1$8 = __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 "])));
27348
+ 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 "])));
26109
27349
  _b.label = 1;
26110
27350
  case 1:
26111
27351
  _b.trys.push([1, 3, , 4]);
@@ -26148,7 +27388,7 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
26148
27388
  };
26149
27389
  return IkasHTMLMetaDataAPI;
26150
27390
  }());
26151
- var templateObject_1$8;
27391
+ var templateObject_1$9;
26152
27392
 
26153
27393
  var IkasMerchantAPI = /** @class */ (function () {
26154
27394
  function IkasMerchantAPI() {
@@ -26159,7 +27399,7 @@ var IkasMerchantAPI = /** @class */ (function () {
26159
27399
  return __generator(this, function (_b) {
26160
27400
  switch (_b.label) {
26161
27401
  case 0:
26162
- QUERY = src(templateObject_1$9 || (templateObject_1$9 = __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 "])));
27402
+ 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 "])));
26163
27403
  _b.label = 1;
26164
27404
  case 1:
26165
27405
  _b.trys.push([1, 3, , 4]);
@@ -26191,7 +27431,7 @@ var IkasMerchantAPI = /** @class */ (function () {
26191
27431
  };
26192
27432
  return IkasMerchantAPI;
26193
27433
  }());
26194
- var templateObject_1$9;
27434
+ var templateObject_1$a;
26195
27435
 
26196
27436
  var IkasProductSearchAPI = /** @class */ (function () {
26197
27437
  function IkasProductSearchAPI() {
@@ -26203,7 +27443,7 @@ var IkasProductSearchAPI = /** @class */ (function () {
26203
27443
  switch (_b.label) {
26204
27444
  case 0:
26205
27445
  _b.trys.push([0, 2, , 3]);
26206
- SEARCH_PRODUCTS = src(templateObject_1$a || (templateObject_1$a = __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 "])));
27446
+ 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 "])));
26207
27447
  return [4 /*yield*/, apollo
26208
27448
  .getClient()
26209
27449
  .query({
@@ -26237,7 +27477,7 @@ var IkasProductSearchAPI = /** @class */ (function () {
26237
27477
  switch (_b.label) {
26238
27478
  case 0:
26239
27479
  _b.trys.push([0, 2, , 3]);
26240
- QUERY = src(templateObject_2$5 || (templateObject_2$5 = __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 "])));
27480
+ 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 "])));
26241
27481
  return [4 /*yield*/, apollo
26242
27482
  .getClient()
26243
27483
  .query({
@@ -26396,7 +27636,7 @@ function simpleToProduct(simple) {
26396
27636
  }),
26397
27637
  });
26398
27638
  }
26399
- var templateObject_1$a, templateObject_2$5;
27639
+ var templateObject_1$b, templateObject_2$6;
26400
27640
 
26401
27641
  var IkasProductAttributeAPI = /** @class */ (function () {
26402
27642
  function IkasProductAttributeAPI() {
@@ -26407,7 +27647,7 @@ var IkasProductAttributeAPI = /** @class */ (function () {
26407
27647
  return __generator(this, function (_b) {
26408
27648
  switch (_b.label) {
26409
27649
  case 0:
26410
- LIST_PRODUCT_ATTRIBUTES = src(templateObject_1$b || (templateObject_1$b = __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 "])));
27650
+ 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 "])));
26411
27651
  _b.label = 1;
26412
27652
  case 1:
26413
27653
  _b.trys.push([1, 3, , 4]);
@@ -26440,7 +27680,7 @@ var IkasProductAttributeAPI = /** @class */ (function () {
26440
27680
  };
26441
27681
  return IkasProductAttributeAPI;
26442
27682
  }());
26443
- var templateObject_1$b;
27683
+ var templateObject_1$c;
26444
27684
 
26445
27685
  var IkasFavoriteProductAPI = /** @class */ (function () {
26446
27686
  function IkasFavoriteProductAPI() {
@@ -26451,7 +27691,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
26451
27691
  return __generator(this, function (_b) {
26452
27692
  switch (_b.label) {
26453
27693
  case 0:
26454
- LIST_FAVORITE_PRODUCTS = src(templateObject_1$c || (templateObject_1$c = __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 "])));
27694
+ 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 "])));
26455
27695
  _b.label = 1;
26456
27696
  case 1:
26457
27697
  _b.trys.push([1, 3, , 4]);
@@ -26480,7 +27720,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
26480
27720
  return __generator(this, function (_b) {
26481
27721
  switch (_b.label) {
26482
27722
  case 0:
26483
- IS_FAVORITE_PRODUCT = src(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n query isFavoriteProduct($productId: String!) {\n isFavoriteProduct(productId: $productId)\n }\n "], ["\n query isFavoriteProduct($productId: String!) {\n isFavoriteProduct(productId: $productId)\n }\n "])));
27723
+ 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 "])));
26484
27724
  _b.label = 1;
26485
27725
  case 1:
26486
27726
  _b.trys.push([1, 3, , 4]);
@@ -26510,7 +27750,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
26510
27750
  return __generator(this, function (_b) {
26511
27751
  switch (_b.label) {
26512
27752
  case 0:
26513
- SAVE_FAVORITE_PRODUCT = src(templateObject_3$3 || (templateObject_3$3 = __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 "])));
27753
+ 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 "])));
26514
27754
  _b.label = 1;
26515
27755
  case 1:
26516
27756
  _b.trys.push([1, 3, , 4]);
@@ -26536,7 +27776,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
26536
27776
  };
26537
27777
  return IkasFavoriteProductAPI;
26538
27778
  }());
26539
- var templateObject_1$c, templateObject_2$6, templateObject_3$3;
27779
+ var templateObject_1$d, templateObject_2$7, templateObject_3$4;
26540
27780
 
26541
27781
  var IkasContactFormAPI = /** @class */ (function () {
26542
27782
  function IkasContactFormAPI() {
@@ -26547,7 +27787,7 @@ var IkasContactFormAPI = /** @class */ (function () {
26547
27787
  return __generator(this, function (_b) {
26548
27788
  switch (_b.label) {
26549
27789
  case 0:
26550
- MUTATION = src(templateObject_1$d || (templateObject_1$d = __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 "])));
27790
+ 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 "])));
26551
27791
  _b.label = 1;
26552
27792
  case 1:
26553
27793
  _b.trys.push([1, 3, , 4]);
@@ -26579,7 +27819,7 @@ var IkasContactFormAPI = /** @class */ (function () {
26579
27819
  };
26580
27820
  return IkasContactFormAPI;
26581
27821
  }());
26582
- var templateObject_1$d;
27822
+ var templateObject_1$e;
26583
27823
 
26584
27824
  var IkasStateAPI = /** @class */ (function () {
26585
27825
  function IkasStateAPI() {
@@ -26590,7 +27830,7 @@ var IkasStateAPI = /** @class */ (function () {
26590
27830
  return __generator(this, function (_b) {
26591
27831
  switch (_b.label) {
26592
27832
  case 0:
26593
- QUERY = src(templateObject_1$e || (templateObject_1$e = __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 "])));
27833
+ 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 "])));
26594
27834
  _b.label = 1;
26595
27835
  case 1:
26596
27836
  _b.trys.push([1, 3, , 4]);
@@ -26627,7 +27867,7 @@ var IkasStateAPI = /** @class */ (function () {
26627
27867
  };
26628
27868
  return IkasStateAPI;
26629
27869
  }());
26630
- var templateObject_1$e;
27870
+ var templateObject_1$f;
26631
27871
 
26632
27872
  var IkasVariantTypeAPI = /** @class */ (function () {
26633
27873
  function IkasVariantTypeAPI() {
@@ -26638,7 +27878,7 @@ var IkasVariantTypeAPI = /** @class */ (function () {
26638
27878
  return __generator(this, function (_b) {
26639
27879
  switch (_b.label) {
26640
27880
  case 0:
26641
- LIST_VARIANT_TYPE = src(templateObject_1$f || (templateObject_1$f = __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 "])));
27881
+ 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 "])));
26642
27882
  _b.label = 1;
26643
27883
  case 1:
26644
27884
  _b.trys.push([1, 3, , 4]);
@@ -26684,7 +27924,7 @@ var IkasVariantTypeAPI = /** @class */ (function () {
26684
27924
  };
26685
27925
  return IkasVariantTypeAPI;
26686
27926
  }());
26687
- var templateObject_1$f;
27927
+ var templateObject_1$g;
26688
27928
 
26689
27929
  function styleInject(css, ref) {
26690
27930
  if ( ref === void 0 ) ref = {};
@@ -27532,7 +28772,7 @@ var PaymentGateways = observer(function (_a) {
27532
28772
  vm.installmentInfo && createElement(Installments, { vm: vm }))) : pg.description ? (createElement("div", null, pg.description)) : undefined,
27533
28773
  rightContent: (createElement(PaymentMethodLogos, null, pg.paymentMethods.map(function (pm, index) {
27534
28774
  return pm.logoUrl ? (createElement("div", { className: styles$b.PaymentLogoContainer, key: index },
27535
- createElement("img", { src: pm.logoUrl }))) : (createElement("div", { className: styles$b.PaymentLogoContainer, key: index }, pm.name));
28775
+ createElement("img", { src: pm.logoUrl }))) : (createElement("div", { className: styles$b.PaymentLogoContainer, key: index }));
27536
28776
  }))),
27537
28777
  }); });
27538
28778
  return (createElement(Fragment, null,
@@ -27689,7 +28929,9 @@ var CartSummary = observer(function (_a) {
27689
28929
  createElement("span", { className: styles$f.Label }, expandHeaderLabel),
27690
28930
  createElement("div", { className: arrowDownClasses },
27691
28931
  createElement(SVGArrowDown, null))),
27692
- createElement("div", { className: styles$f.Price }, formatMoney(cart.totalPrice, cart.currencyCode)))),
28932
+ createElement("div", { className: styles$f.Price }, formatMoney(vm.installmentPrice ||
28933
+ vm.checkout.totalFinalPrice ||
28934
+ cart.totalPrice, cart.currencyCode)))),
27693
28935
  createElement("div", { className: styles$f.DetailsContainer, style: detailsContainerStyle },
27694
28936
  createElement("div", { className: styles$f.Details, ref: setDetailsContainer }, cart === null || cart === void 0 ? void 0 :
27695
28937
  cart.items.map(function (item, index) { return (createElement("div", { key: index },
@@ -28127,6 +29369,15 @@ var CustomerLoginRequiredError = observer(function (_a) {
28127
29369
  "Bu email ile i\u015Fleme devam edebilmek i\u00E7in l\u00FCtfen giri\u015F yap\u0131n\u0131z.")));
28128
29370
  });
28129
29371
 
29372
+ var Image = function (_a) {
29373
+ var image = _a.image, others = __rest(_a, ["image"]);
29374
+ var loader = function (_a) {
29375
+ var width = _a.width;
29376
+ return image.getSrc(width);
29377
+ };
29378
+ return (createElement(NextImage, __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image" })));
29379
+ };
29380
+
28130
29381
  var IkasCheckoutPage = observer(function (_a) {
28131
29382
  var _b, _c, _d;
28132
29383
  var checkout = _a.checkout, checkoutSettings = _a.checkoutSettings, returnPolicy = _a.returnPolicy, privacyPolicy = _a.privacyPolicy, termsOfService = _a.termsOfService, queryParams = _a.queryParams;
@@ -28217,7 +29468,7 @@ var IkasCheckoutPage = observer(function (_a) {
28217
29468
  createElement("div", null,
28218
29469
  createElement("div", { className: styles$2.Header },
28219
29470
  createElement("a", { href: "/" }, !!((_c = vm.merchantSettings) === null || _c === void 0 ? void 0 : _c.logoId) ? (createElement("div", { className: styles$2.Logo },
28220
- createElement(Image$1, { layout: "fill", src: vm.merchantSettings.logo.src, quality: 100 }))) : (((_d = vm.merchantSettings) === null || _d === void 0 ? void 0 : _d.merchantName) || ""))),
29471
+ createElement(Image, { layout: "fill", image: vm.merchantSettings.logo, sizes: "64px" }))) : (((_d = vm.merchantSettings) === null || _d === void 0 ? void 0 : _d.merchantName) || ""))),
28221
29472
  vm.step !== CheckoutStep.SUCCESS && createElement(Breadcrumbs, { vm: vm }),
28222
29473
  !!vm.error && renderError(),
28223
29474
  createElement("div", { className: styles$2.MobileCartSummary },
@@ -28250,6 +29501,7 @@ var style = {
28250
29501
  backgroundColor: "rgba(255, 0, 0, 0.5)",
28251
29502
  };
28252
29503
 
29504
+ var PACKAGE_VERSION = "0.0.128";
28253
29505
  var PageViewModel = /** @class */ (function () {
28254
29506
  function PageViewModel(router) {
28255
29507
  var _this = this;
@@ -28265,7 +29517,7 @@ var PageViewModel = /** @class */ (function () {
28265
29517
  this.pageDataProvider = null;
28266
29518
  this.startMessaging = function () {
28267
29519
  window.addEventListener("message", _this.onMessage, false);
28268
- _this.sendMessage(BridgeMessageType.FRAME_DID_LOAD);
29520
+ _this.sendMessage(BridgeMessageType.FRAME_DID_LOAD, PACKAGE_VERSION);
28269
29521
  };
28270
29522
  this.onMessage = function (event) { return __awaiter(_this, void 0, void 0, function () {
28271
29523
  var type, data, _a;
@@ -28715,15 +29967,6 @@ var pageStyle$1 = {
28715
29967
  justifyContent: "space-between",
28716
29968
  };
28717
29969
 
28718
- var Image = function (_a) {
28719
- var image = _a.image, others = __rest(_a, ["image"]);
28720
- var loader = function (_a) {
28721
- var width = _a.width;
28722
- return image.getSrc(width);
28723
- };
28724
- return (createElement(Image$1, __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image" })));
28725
- };
28726
-
28727
29970
  var index = /*#__PURE__*/Object.freeze({
28728
29971
  __proto__: null,
28729
29972
  IkasCheckoutPage: IkasCheckoutPage,
@@ -28873,7 +30116,7 @@ var IkasStorefrontAPI = /** @class */ (function () {
28873
30116
  return __generator(this, function (_b) {
28874
30117
  switch (_b.label) {
28875
30118
  case 0:
28876
- QUERY = src(templateObject_1$g || (templateObject_1$g = __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 "])));
30119
+ 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 "])));
28877
30120
  _b.label = 1;
28878
30121
  case 1:
28879
30122
  _b.trys.push([1, 3, , 4]);
@@ -28904,7 +30147,7 @@ var IkasStorefrontAPI = /** @class */ (function () {
28904
30147
  };
28905
30148
  return IkasStorefrontAPI;
28906
30149
  }());
28907
- var templateObject_1$g;
30150
+ var templateObject_1$h;
28908
30151
 
28909
30152
  var SettingsHelper = /** @class */ (function () {
28910
30153
  function SettingsHelper() {
@@ -29012,7 +30255,7 @@ var SettingsHelper = /** @class */ (function () {
29012
30255
  });
29013
30256
  }); });
29014
30257
  };
29015
- SettingsHelper.getPageData = function (context, isServer, pageType) {
30258
+ SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes) {
29016
30259
  var _a;
29017
30260
  return __awaiter(this, void 0, void 0, function () {
29018
30261
  var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, provider;
@@ -29050,6 +30293,7 @@ var SettingsHelper = /** @class */ (function () {
29050
30293
  IkasStorefrontConfig.gtmId = storefront.gtmId || undefined;
29051
30294
  IkasStorefrontConfig.fbpId = storefront.fbpId || undefined;
29052
30295
  provider = new IkasPageDataProvider(themeLocalization.themeJson, context.params, pageType);
30296
+ provider.possiblePageTypes = possiblePageTypes;
29053
30297
  return [4 /*yield*/, provider.getPageData()];
29054
30298
  case 2:
29055
30299
  _b.sent();
@@ -29070,11 +30314,11 @@ var SettingsHelper = /** @class */ (function () {
29070
30314
  });
29071
30315
  });
29072
30316
  };
29073
- SettingsHelper.getStaticProps = function (context, pageType) {
30317
+ SettingsHelper.getStaticProps = function (context, pageType, possiblePageTypes) {
29074
30318
  return __awaiter(this, void 0, void 0, function () {
29075
30319
  return __generator(this, function (_a) {
29076
30320
  switch (_a.label) {
29077
- case 0: return [4 /*yield*/, SettingsHelper.getPageData(context, false, pageType)];
30321
+ case 0: return [4 /*yield*/, SettingsHelper.getPageData(context, false, pageType, possiblePageTypes)];
29078
30322
  case 1: return [2 /*return*/, _a.sent()];
29079
30323
  }
29080
30324
  });
@@ -29163,7 +30407,11 @@ var getStaticPaths = function (context) { return __awaiter(void 0, void 0, void
29163
30407
  var getStaticProps$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
29164
30408
  return __generator(this, function (_a) {
29165
30409
  switch (_a.label) {
29166
- case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context)];
30410
+ case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, [
30411
+ IkasThemePageType.BRAND,
30412
+ IkasThemePageType.CATEGORY,
30413
+ IkasThemePageType.PRODUCT,
30414
+ ])];
29167
30415
  case 1: return [2 /*return*/, _a.sent()];
29168
30416
  }
29169
30417
  });
@@ -29676,6 +30924,75 @@ var _404 = /*#__PURE__*/Object.freeze({
29676
30924
  getStaticProps: getStaticProps$d
29677
30925
  });
29678
30926
 
30927
+ var Page$g = function (_a) {
30928
+ var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
30929
+ IkasStorefrontConfig.initWithJson(configJson);
30930
+ var router = useRouter();
30931
+ var propValues = useMemo(function () {
30932
+ return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
30933
+ }, [propValuesStr]);
30934
+ return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
30935
+ };
30936
+ var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, void 0, function () {
30937
+ return __generator(this, function (_a) {
30938
+ switch (_a.label) {
30939
+ case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, IkasThemePageType.BLOG_INDEX)];
30940
+ case 1: return [2 /*return*/, _a.sent()];
30941
+ }
30942
+ });
30943
+ }); };
30944
+
30945
+ var index$5 = /*#__PURE__*/Object.freeze({
30946
+ __proto__: null,
30947
+ 'default': Page$g,
30948
+ getStaticProps: getStaticProps$e
30949
+ });
30950
+
30951
+ var Page$h = function (_a) {
30952
+ var page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
30953
+ IkasStorefrontConfig.initWithJson(configJson);
30954
+ var router = useRouter();
30955
+ var _b = useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
30956
+ var initialPropValues = useMemo(function () {
30957
+ return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
30958
+ }, [propValuesStr]);
30959
+ var _c = useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
30960
+ useEffect(function () {
30961
+ setIsBrowser(typeof window !== "undefined");
30962
+ }, []);
30963
+ useEffect(function () {
30964
+ setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr, isBrowser));
30965
+ }, [isBrowser, propValuesStr]);
30966
+ return (createElement(IkasPage, { page: page, propValues: propValues, pageSpecificDataStr: pageSpecificDataStr, settingsStr: settingsStr, merchantSettings: merchantSettings, addOgpMetas: true }));
30967
+ };
30968
+ var _slug_$1 = observer(Page$h);
30969
+ var getStaticPaths$2 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
30970
+ return __generator(this, function (_a) {
30971
+ return [2 /*return*/, {
30972
+ paths: [],
30973
+ fallback: "blocking",
30974
+ }];
30975
+ });
30976
+ }); };
30977
+ var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, void 0, function () {
30978
+ return __generator(this, function (_a) {
30979
+ switch (_a.label) {
30980
+ case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, [
30981
+ IkasThemePageType.BLOG,
30982
+ IkasThemePageType.BLOG_CATEGORY,
30983
+ ])];
30984
+ case 1: return [2 /*return*/, _a.sent()];
30985
+ }
30986
+ });
30987
+ }); };
30988
+
30989
+ var _slug_$2 = /*#__PURE__*/Object.freeze({
30990
+ __proto__: null,
30991
+ 'default': _slug_$1,
30992
+ getStaticPaths: getStaticPaths$2,
30993
+ getStaticProps: getStaticProps$f
30994
+ });
30995
+
29679
30996
  /**
29680
30997
  * Flattens `array` a single level deep.
29681
30998
  *
@@ -29806,4 +31123,4 @@ var IkasBaseStore = /** @class */ (function () {
29806
31123
  return IkasBaseStore;
29807
31124
  }());
29808
31125
 
29809
- export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, cart as CartPage, _id_$1 as CheckoutPage, ContactForm, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageComponentPropValue, IkasPageDataProvider, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemeCustomDataType, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home as IndexPage, LessThanRule, LoginForm, login as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$2 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$4 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword as RecoverPasswordPage, RegisterForm, register as RegisterPage, RequiredRule, search as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, decodeBase64, formatMoney, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
31126
+ export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$5 as BlogPage, _slug_$2 as BlogSlugPage, cart as CartPage, _id_$1 as CheckoutPage, ContactForm, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageComponentPropValue, IkasPageDataProvider, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemeCustomDataType, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home as IndexPage, LessThanRule, LoginForm, login as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$2 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$4 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword as RecoverPasswordPage, RegisterForm, register as RegisterPage, RequiredRule, search as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, decodeBase64, formatMoney, getPlaceholderBlog, getPlaceholderBrand, getPlaceholderCategory, getPlaceholderProduct, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };