@ikas/storefront-providers 4.5.0-beta.1 → 4.5.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -9
- package/build/ext/tslib/tslib.es6.js +0 -1
- package/build/index.d.ts +0 -20
- package/build/index.js +0 -1
- package/build/models/prop-value/attribute-list.d.ts +0 -6
- package/build/models/prop-value/attribute.d.ts +0 -6
- package/build/models/prop-value/blog-category-list.d.ts +0 -6
- package/build/models/prop-value/blog-category.d.ts +0 -4
- package/build/models/prop-value/blog-list.d.ts +0 -8
- package/build/models/prop-value/blog.d.ts +0 -4
- package/build/models/prop-value/brand-list.d.ts +0 -8
- package/build/models/prop-value/brand.d.ts +0 -4
- package/build/models/prop-value/brand.js +0 -1
- package/build/models/prop-value/category-list.d.ts +0 -8
- package/build/models/prop-value/category.d.ts +0 -4
- package/build/models/prop-value/image.d.ts +0 -4
- package/build/models/prop-value/link.d.ts +0 -18
- package/build/models/prop-value/link.js +0 -1
- package/build/models/prop-value/product-list.d.ts +0 -17
- package/build/models/prop-value/product.d.ts +0 -5
- package/build/models/prop-value/raffle-list.d.ts +0 -4
- package/build/models/prop-value/raffle.d.ts +0 -4
- package/build/models/ui/blog-category-list/index.d.ts +0 -17
- package/build/models/ui/blog-category-list/index.js +0 -1
- package/build/models/ui/blog-category-list/init.d.ts +0 -2
- package/build/models/ui/blog-category-list/init.js +0 -1
- package/build/models/ui/blog-list/index.d.ts +0 -19
- package/build/models/ui/blog-list/index.js +0 -1
- package/build/models/ui/blog-list/init.d.ts +0 -2
- package/build/models/ui/blog-list/init.js +0 -1
- package/build/models/ui/brand-list/index.d.ts +0 -22
- package/build/models/ui/brand-list/index.js +0 -1
- package/build/models/ui/brand-list/init.d.ts +0 -2
- package/build/models/ui/brand-list/init.js +0 -1
- package/build/models/ui/category-list/index.d.ts +0 -22
- package/build/models/ui/category-list/index.js +0 -1
- package/build/models/ui/category-list/init.d.ts +0 -2
- package/build/models/ui/category-list/init.js +0 -1
- package/build/models/ui/component-renderer/index.d.ts +0 -6
- package/build/models/ui/customer-review-list/index.d.ts +0 -11
- package/build/models/ui/customer-review-list/init.d.ts +0 -2
- package/build/models/ui/customer-review-summary-list/index.d.ts +0 -11
- package/build/models/ui/customer-review-summary-list/init.d.ts +0 -2
- package/build/models/ui/index.d.ts +0 -12
- package/build/models/ui/navigation-link/index.d.ts +0 -7
- package/build/models/ui/product-attribute-detail/index.d.ts +0 -6
- package/build/models/ui/product-attribute-list/index.d.ts +0 -6
- package/build/models/ui/product-list/index.d.ts +0 -66
- package/build/models/ui/product-list/index.js +0 -1
- package/build/models/ui/product-list/init.d.ts +0 -2
- package/build/models/ui/product-list/init.js +0 -1
- package/build/models/ui/raffle-list/index.d.ts +0 -16
- package/build/models/ui/raffle-list/init.d.ts +0 -2
- package/build/models/ui/raffle-list/init.js +0 -1
- package/build/providers/helpers/raffle.d.ts +0 -3
- package/build/providers/helpers/raffle.js +0 -1
- package/build/providers/page-data-get.d.ts +0 -32
- package/build/providers/page-data-get.js +0 -1
- package/build/providers/placeholders.d.ts +0 -7
- package/build/providers/placeholders.js +0 -1
- package/build/providers/prop-value/attribute-list.d.ts +0 -8
- package/build/providers/prop-value/attribute-list.js +0 -1
- package/build/providers/prop-value/attribute.d.ts +0 -8
- package/build/providers/prop-value/attribute.js +0 -1
- package/build/providers/prop-value/blog-category-list.d.ts +0 -8
- package/build/providers/prop-value/blog-category-list.js +0 -1
- package/build/providers/prop-value/blog-category.d.ts +0 -8
- package/build/providers/prop-value/blog-category.js +0 -1
- package/build/providers/prop-value/blog-list.d.ts +0 -11
- package/build/providers/prop-value/blog-list.js +0 -1
- package/build/providers/prop-value/blog.d.ts +0 -8
- package/build/providers/prop-value/blog.js +0 -1
- package/build/providers/prop-value/boolean.d.ts +0 -6
- package/build/providers/prop-value/boolean.js +0 -1
- package/build/providers/prop-value/brand-list.d.ts +0 -8
- package/build/providers/prop-value/brand-list.js +0 -1
- package/build/providers/prop-value/brand.d.ts +0 -8
- package/build/providers/prop-value/brand.js +0 -1
- package/build/providers/prop-value/category-list.d.ts +0 -8
- package/build/providers/prop-value/category-list.js +0 -1
- package/build/providers/prop-value/category.d.ts +0 -8
- package/build/providers/prop-value/category.js +0 -1
- package/build/providers/prop-value/color.d.ts +0 -6
- package/build/providers/prop-value/color.js +0 -1
- package/build/providers/prop-value/custom.d.ts +0 -42
- package/build/providers/prop-value/custom.js +0 -1
- package/build/providers/prop-value/image-list.d.ts +0 -8
- package/build/providers/prop-value/image-list.js +0 -1
- package/build/providers/prop-value/image.d.ts +0 -9
- package/build/providers/prop-value/image.js +0 -1
- package/build/providers/prop-value/index.d.ts +0 -3
- package/build/providers/prop-value/link.d.ts +0 -26
- package/build/providers/prop-value/link.js +0 -1
- package/build/providers/prop-value/product-detail.d.ts +0 -8
- package/build/providers/prop-value/product-detail.js +0 -1
- package/build/providers/prop-value/product-list.d.ts +0 -21
- package/build/providers/prop-value/product-list.js +0 -1
- package/build/providers/prop-value/raffle-list.d.ts +0 -5
- package/build/providers/prop-value/raffle-list.js +0 -1
- package/build/providers/prop-value/raffle.d.ts +0 -8
- package/build/providers/prop-value/raffle.js +0 -1
- package/build/providers/prop-value/rich-text.d.ts +0 -6
- package/build/providers/prop-value/rich-text.js +0 -1
- package/build/providers/prop-value/slider.d.ts +0 -7
- package/build/providers/prop-value/slider.js +0 -1
- package/build/providers/prop-value/text.d.ts +0 -6
- package/build/providers/prop-value/text.js +0 -1
- package/build/providers/types.d.ts +0 -66
- package/build/providers/types.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-providers",
|
|
3
|
-
"version": "4.5.0-beta.
|
|
3
|
+
"version": "4.5.0-beta.3",
|
|
4
4
|
"description": "Data providers for ikas storefront theme components.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
20
|
-
"@ikas/storefront-api": "^4.5.0-beta.
|
|
21
|
-
"@ikas/storefront-config": "^4.5.0-beta.
|
|
22
|
-
"@ikas/storefront-model-functions": "^4.5.0-beta.
|
|
23
|
-
"@ikas/storefront-models": "^4.5.0-beta.
|
|
20
|
+
"@ikas/storefront-api": "^4.5.0-beta.3",
|
|
21
|
+
"@ikas/storefront-config": "^4.5.0-beta.3",
|
|
22
|
+
"@ikas/storefront-model-functions": "^4.5.0-beta.3",
|
|
23
|
+
"@ikas/storefront-models": "^4.5.0-beta.3",
|
|
24
24
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
25
25
|
"rollup-plugin-rename-node-modules": "^1.2.0",
|
|
26
26
|
"@types/lodash": "^4.14.168",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"mobx": "^6.1.3",
|
|
41
|
-
"@ikas/storefront-api": "^4.5.0-beta.
|
|
42
|
-
"@ikas/storefront-config": "^4.5.0-beta.
|
|
43
|
-
"@ikas/storefront-model-functions": "^4.5.0-beta.
|
|
44
|
-
"@ikas/storefront-models": "^4.5.0-beta.
|
|
41
|
+
"@ikas/storefront-api": "^4.5.0-beta.3",
|
|
42
|
+
"@ikas/storefront-config": "^4.5.0-beta.3",
|
|
43
|
+
"@ikas/storefront-model-functions": "^4.5.0-beta.3",
|
|
44
|
+
"@ikas/storefront-models": "^4.5.0-beta.3",
|
|
45
45
|
"lodash": "^4.17.21"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=function(){return n=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},n.apply(this,arguments)};function t(n,t,e,r){return new(e||(e=Promise))((function(o,a){function u(n){try{c(r.next(n))}catch(n){a(n)}}function l(n){try{c(r.throw(n))}catch(n){a(n)}}function c(n){var t;n.done?o(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(u,l)}c((r=r.apply(n,t||[])).next())}))}function e(n,t){var e,r,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(n,u)}catch(n){a=[6,n],r=0}finally{e=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}export{n as __assign,t as __awaiter,e as __generator};
|
package/build/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from "./models/prop-value/attribute";
|
|
2
|
-
export * from "./models/prop-value/attribute-list";
|
|
3
|
-
export * from "./models/prop-value/blog-category-list";
|
|
4
|
-
export * from "./models/prop-value/blog-category";
|
|
5
|
-
export * from "./models/prop-value/blog-list";
|
|
6
|
-
export * from "./models/prop-value/blog";
|
|
7
|
-
export * from "./models/prop-value/brand-list";
|
|
8
|
-
export * from "./models/prop-value/brand";
|
|
9
|
-
export * from "./models/prop-value/category-list";
|
|
10
|
-
export * from "./models/prop-value/category";
|
|
11
|
-
export * from "./models/prop-value/link";
|
|
12
|
-
export * from "./models/prop-value/product-list";
|
|
13
|
-
export * from "./models/prop-value/product";
|
|
14
|
-
export * from "./models/prop-value/raffle-list";
|
|
15
|
-
export * from "./models/prop-value/raffle";
|
|
16
|
-
export * from "./models/ui";
|
|
17
|
-
export { IkasPageDataProvider } from "./providers/page-data-get";
|
|
18
|
-
export * from "./providers/types";
|
|
19
|
-
export * from "./providers/placeholders";
|
|
20
|
-
export * from "./providers/helpers/raffle";
|
package/build/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{IkasBrandPropValue}from"./models/prop-value/brand.js";export{IkasLinkType}from"./models/prop-value/link.js";export{IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasProductListSortType,IkasProductListType,IkasProductSearchShowStockOption,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasPageDataProvider}from"./providers/page-data-get.js";export{IkasPageComponentPropValue}from"./providers/types.js";export{getPlaceholderBlog,getPlaceholderBlogCategory,getPlaceholderBrand,getPlaceholderCategory,getPlaceholderProduct,getPlaceholderRaffle}from"./providers/placeholders.js";export{populateRaffleParticipantProducts,populateRaffleProducts}from"./providers/helpers/raffle.js";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IkasBrandListSortType, IkasBrandListType } from "../ui";
|
|
2
|
-
export declare type IkasBrandListPropValue = {
|
|
3
|
-
brandListType: IkasBrandListType;
|
|
4
|
-
initialSort?: IkasBrandListSortType | null;
|
|
5
|
-
initialLimit?: number | null;
|
|
6
|
-
brandCount?: number | null;
|
|
7
|
-
brandIds?: string[] | null;
|
|
8
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=function(){};export{n as IkasBrandPropValue};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IkasCategoryListSortType, IkasCategoryListType } from "../ui";
|
|
2
|
-
export declare type IkasCategoryListPropValue = {
|
|
3
|
-
categoryListType: IkasCategoryListType;
|
|
4
|
-
initialSort?: IkasCategoryListSortType | null;
|
|
5
|
-
initialLimit?: number | null;
|
|
6
|
-
categoryCount?: number | null;
|
|
7
|
-
categoryIds?: string[] | null;
|
|
8
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IkasThemeJsonPageType } from "@ikas/storefront-models";
|
|
2
|
-
export declare type IkasLinkPropValue = {
|
|
3
|
-
id?: string | null;
|
|
4
|
-
linkType?: IkasLinkType | null;
|
|
5
|
-
label?: string | null;
|
|
6
|
-
pageId?: string | null;
|
|
7
|
-
pageType?: IkasThemeJsonPageType | null;
|
|
8
|
-
itemId?: string | null;
|
|
9
|
-
externalLink?: string | null;
|
|
10
|
-
fileUrl?: string | null;
|
|
11
|
-
pageComponentId?: string | null;
|
|
12
|
-
subLinks: IkasLinkPropValue[];
|
|
13
|
-
};
|
|
14
|
-
export declare enum IkasLinkType {
|
|
15
|
-
PAGE = "PAGE",
|
|
16
|
-
EXTERNAL = "EXTERNAL",
|
|
17
|
-
FILE = "FILE"
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var E;!function(E){E.PAGE="PAGE",E.EXTERNAL="EXTERNAL",E.FILE="FILE"}(E||(E={}));export{E as IkasLinkType};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IkasProductListSortType, IkasProductListType, IkasRelatedProductsType } from "../ui";
|
|
2
|
-
export declare type IkasProductListPropValue = {
|
|
3
|
-
id: string;
|
|
4
|
-
productListType: IkasProductListType;
|
|
5
|
-
initialSort?: IkasProductListSortType | null;
|
|
6
|
-
initialLimit?: number | null;
|
|
7
|
-
productCount?: number | null;
|
|
8
|
-
productIds?: IkasProductVariantId[] | null;
|
|
9
|
-
usePageFilter?: boolean | null;
|
|
10
|
-
category?: string | null;
|
|
11
|
-
relatedProductsType?: IkasRelatedProductsType | null;
|
|
12
|
-
};
|
|
13
|
-
declare type IkasProductVariantId = {
|
|
14
|
-
productId: string;
|
|
15
|
-
variantId: string;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IkasBlogCategory } from "@ikas/storefront-models";
|
|
2
|
-
import { IkasBlogCategoryListPropValue } from "../../prop-value/blog-category-list";
|
|
3
|
-
export declare type IkasBlogCategoryList = {
|
|
4
|
-
data: IkasBlogCategory[];
|
|
5
|
-
type: IkasBlogCategoryListType;
|
|
6
|
-
limit: number;
|
|
7
|
-
page: number;
|
|
8
|
-
count: number;
|
|
9
|
-
initialized?: boolean;
|
|
10
|
-
minPage?: number | null;
|
|
11
|
-
blogCategoryListPropValue: IkasBlogCategoryListPropValue;
|
|
12
|
-
isLoading?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare enum IkasBlogCategoryListType {
|
|
15
|
-
ALL = "ALL",
|
|
16
|
-
STATIC = "STATIC"
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var A;!function(A){A.ALL="ALL",A.STATIC="STATIC"}(A||(A={}));export{A as IkasBlogCategoryListType};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as o}from'./../../../ext/tslib/tslib.es6.js';import{listBlogCategory as i}from"@ikas/storefront-api";import{IkasBlogCategoryListType as r}from"./index.js";function n(i){var r,n,u,l;return t(this,void 0,void 0,(function(){var t,d;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,a(i,e(i)?1:i.page,e(i)?(null===(r=i.blogCategoryListPropValue.blogCategoryIds)||void 0===r?void 0:r.length)||10:i.limit)];case 1:return t=o.sent(),e(i)?i.data=(null===(n=i.blogCategoryListPropValue.blogCategoryIds)||void 0===n?void 0:n.map((function(o){var i,r;return null===(r=null===(i=t.data)||void 0===i?void 0:i.data)||void 0===r?void 0:r.find((function(t){return t.id===o}))})).filter((function(t){return!!t})))||[]:i.data=(null===(u=t.data)||void 0===u?void 0:u.data)||[],i.count=(null===(l=t.data)||void 0===l?void 0:l.count)||0,i.initialized=!0,i.minPage=i.page,[3,3];case 2:return d=o.sent(),console.error(d),[3,3];case 3:return[2]}}))}))}function e(t){return t.type===r.STATIC}function a(r,n,a){return t(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,i({id:e(r)&&r.blogCategoryListPropValue.blogCategoryIds?{in:r.blogCategoryListPropValue.blogCategoryIds}:void 0,pagination:{page:n,limit:a}})];case 1:return[2,t.sent()]}}))}))}export{n as getInitial};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IkasBlog } from "@ikas/storefront-models";
|
|
2
|
-
import { IkasBlogListPropValue } from "../../prop-value/blog-list";
|
|
3
|
-
export declare type IkasBlogList = {
|
|
4
|
-
data: IkasBlog[];
|
|
5
|
-
type: IkasBlogListType;
|
|
6
|
-
limit: number;
|
|
7
|
-
page: number;
|
|
8
|
-
count: number;
|
|
9
|
-
initialized?: boolean;
|
|
10
|
-
minPage?: number | null;
|
|
11
|
-
blogListPropValue: IkasBlogListPropValue;
|
|
12
|
-
filterCategoryId: string | null;
|
|
13
|
-
isLoading?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare enum IkasBlogListType {
|
|
16
|
-
ALL = "ALL",
|
|
17
|
-
STATIC = "STATIC",
|
|
18
|
-
CATEGORY = "CATEGORY"
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var A;!function(A){A.ALL="ALL",A.STATIC="STATIC",A.CATEGORY="CATEGORY"}(A||(A={}));export{A as IkasBlogListType};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{listBlog as o}from"@ikas/storefront-api";import{IkasBlogListType as n}from"./index.js";function r(o){var n,r,d,u;return t(this,void 0,void 0,(function(){var t,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,a(o,e(o)?1:o.page,e(o)?(null===(n=o.blogListPropValue.blogIds)||void 0===n?void 0:n.length)||10:o.limit)];case 1:return t=i.sent(),e(o)?o.data=(null===(r=o.blogListPropValue.blogIds)||void 0===r?void 0:r.map((function(i){var o,n;return null===(n=null===(o=t.data)||void 0===o?void 0:o.data)||void 0===n?void 0:n.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:o.data=(null===(d=t.data)||void 0===d?void 0:d.data)||[],o.count=(null===(u=t.data)||void 0===u?void 0:u.count)||0,o.initialized=!0,o.minPage=o.page,[3,3];case 2:return l=i.sent(),console.error(l),[3,3];case 3:return[2]}}))}))}function e(t){return t.type===n.STATIC}function a(n,r,a){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o({id:e(n)?{in:n.blogListPropValue.blogIds}:void 0,pagination:{page:r,limit:a},categoryId:n.filterCategoryId?{eq:n.filterCategoryId}:void 0})];case 1:return[2,t.sent()]}}))}))}export{r as getInitial};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IkasBrand } from "@ikas/storefront-models";
|
|
2
|
-
import { IkasBrandListPropValue } from "../../prop-value/brand-list";
|
|
3
|
-
export declare type IkasBrandList = {
|
|
4
|
-
data: IkasBrand[];
|
|
5
|
-
type: IkasBrandListType;
|
|
6
|
-
sort: IkasBrandListSortType;
|
|
7
|
-
limit: number;
|
|
8
|
-
page: number;
|
|
9
|
-
count: number;
|
|
10
|
-
initialized?: boolean;
|
|
11
|
-
minPage?: number | null;
|
|
12
|
-
brandListPropValue: IkasBrandListPropValue;
|
|
13
|
-
isLoading?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare enum IkasBrandListType {
|
|
16
|
-
ALL = "ALL",
|
|
17
|
-
STATIC = "STATIC"
|
|
18
|
-
}
|
|
19
|
-
export declare enum IkasBrandListSortType {
|
|
20
|
-
A_Z = "A_Z",
|
|
21
|
-
Z_A = "Z_A"
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var A,n;!function(A){A.ALL="ALL",A.STATIC="STATIC"}(A||(A={})),function(A){A.A_Z="A_Z",A.Z_A="Z_A"}(n||(n={}));export{n as IkasBrandListSortType,A as IkasBrandListType};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as n,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{listProductBrand as t}from"@ikas/storefront-api";import{IkasBrandListType as r,IkasBrandListSortType as o}from"./index.js";function a(o){var a,d,u;return n(this,void 0,void 0,(function(){var n,s,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),n=function(n){return n.type===r.STATIC}(o),[4,t({id:n&&o.brandListPropValue.brandIds?{in:o.brandListPropValue.brandIds}:void 0,pagination:{page:n?void 0:o.page,limit:n?void 0:o.limit},sort:e(o)})];case 1:return s=i.sent(),o.data=n?(null===(a=o.brandListPropValue.brandIds)||void 0===a?void 0:a.map((function(n){var i,t;return null===(t=null===(i=s.data)||void 0===i?void 0:i.data)||void 0===t?void 0:t.find((function(i){return i.id===n}))})).filter((function(n){return!!n})))||[]:(null===(d=s.data)||void 0===d?void 0:d.data)||[],o.count=(null===(u=s.data)||void 0===u?void 0:u.count)||0,o.initialized=!0,o.minPage=o.page,[3,3];case 2:return l=i.sent(),console.error(l),[3,3];case 3:return[2]}}))}))}function e(n){return n.sort===o.A_Z?"name":"-name"}export{a as getInitial};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IkasCategory } from "@ikas/storefront-models";
|
|
2
|
-
import { IkasCategoryListPropValue } from "../../prop-value/category-list";
|
|
3
|
-
export declare type IkasCategoryList = {
|
|
4
|
-
data: IkasCategory[];
|
|
5
|
-
type: IkasCategoryListType;
|
|
6
|
-
sort: IkasCategoryListSortType;
|
|
7
|
-
limit: number;
|
|
8
|
-
page: number;
|
|
9
|
-
count: number;
|
|
10
|
-
initialized?: boolean;
|
|
11
|
-
minPage?: number | null;
|
|
12
|
-
categoryListPropValue: IkasCategoryListPropValue;
|
|
13
|
-
isLoading?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare enum IkasCategoryListType {
|
|
16
|
-
ALL = "ALL",
|
|
17
|
-
STATIC = "STATIC"
|
|
18
|
-
}
|
|
19
|
-
export declare enum IkasCategoryListSortType {
|
|
20
|
-
A_Z = "A_Z",
|
|
21
|
-
Z_A = "Z_A"
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var A,n;!function(A){A.ALL="ALL",A.STATIC="STATIC"}(A||(A={})),function(A){A.A_Z="A_Z",A.Z_A="Z_A"}(n||(n={}));export{n as IkasCategoryListSortType,A as IkasCategoryListType};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{listCategory as o}from"@ikas/storefront-api";import{IkasCategoryListType as r,IkasCategoryListSortType as n}from"./index.js";function e(r){var n,e,u;return t(this,void 0,void 0,(function(){var t,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,o({id:a(r)&&r.categoryListPropValue.categoryIds?{in:r.categoryListPropValue.categoryIds}:void 0,pagination:{page:a(r)?void 0:r.page,limit:a(r)?void 0:r.limit},sort:d(r)})];case 1:return t=i.sent(),a(r)?r.data=(null===(n=r.categoryListPropValue.categoryIds)||void 0===n?void 0:n.map((function(i){var o,r;return null===(r=null===(o=t.data)||void 0===o?void 0:o.data)||void 0===r?void 0:r.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:r.data=(null===(e=t.data)||void 0===e?void 0:e.data)||[],r.count=(null===(u=t.data)||void 0===u?void 0:u.count)||0,r.initialized=!0,r.minPage=r.page,[3,3];case 2:return s=i.sent(),console.error(s),[3,3];case 3:return[2]}}))}))}function a(t){return t.type===r.STATIC}function d(t){return t.sort===n.A_Z?"name":"-name"}export{e as getInitial};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IkasCustomerReview } from "@ikas/storefront-models";
|
|
2
|
-
export declare type IkasCustomerReviewList = {
|
|
3
|
-
data: IkasCustomerReview[];
|
|
4
|
-
limit: number;
|
|
5
|
-
page: number;
|
|
6
|
-
count: number;
|
|
7
|
-
initialized?: boolean;
|
|
8
|
-
minPage?: number | null;
|
|
9
|
-
productId: string;
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IkasCustomerReviewSummary } from "@ikas/storefront-models";
|
|
2
|
-
export declare type IkasCustomerReviewSummaryList = {
|
|
3
|
-
data: IkasCustomerReviewSummary[];
|
|
4
|
-
limit: number;
|
|
5
|
-
page: number;
|
|
6
|
-
count: number;
|
|
7
|
-
initialized?: boolean;
|
|
8
|
-
minPage?: number | null;
|
|
9
|
-
productId: string;
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./blog-category-list";
|
|
2
|
-
export * from "./blog-list";
|
|
3
|
-
export * from "./brand-list";
|
|
4
|
-
export * from "./category-list";
|
|
5
|
-
export * from "./component-renderer";
|
|
6
|
-
export * from "./customer-review-list";
|
|
7
|
-
export * from "./customer-review-summary-list";
|
|
8
|
-
export * from "./navigation-link";
|
|
9
|
-
export * from "./product-attribute-detail";
|
|
10
|
-
export * from "./product-attribute-list";
|
|
11
|
-
export * from "./product-list";
|
|
12
|
-
export * from "./raffle-list";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IkasProduct } from "@ikas/storefront-models";
|
|
2
|
-
import { IkasAttributeListPropValue } from "../../prop-value/attribute-list";
|
|
3
|
-
export declare type IkasAttributeList = {
|
|
4
|
-
productDetail: IkasProduct | null;
|
|
5
|
-
attributeListPropValue: IkasAttributeListPropValue;
|
|
6
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { IkasBrand, IkasCategory, IkasFilterCategory, IkasProduct, IkasProductFilter, IkasThemeJsonPageType } from "@ikas/storefront-models";
|
|
2
|
-
import { IkasRelatedProductProps, IkasViewedTogetherProductProps } from "../../../providers/prop-value/product-list";
|
|
3
|
-
import { IkasProductListPropValue } from "../../prop-value/product-list";
|
|
4
|
-
export declare type IkasProductList = {
|
|
5
|
-
data: IkasProduct[];
|
|
6
|
-
filters: IkasProductFilter[] | null;
|
|
7
|
-
filterCategories?: IkasFilterCategory[] | null;
|
|
8
|
-
type: IkasProductListType;
|
|
9
|
-
pageType: IkasThemeJsonPageType;
|
|
10
|
-
sort: IkasProductListSortType;
|
|
11
|
-
limit: number;
|
|
12
|
-
page: number;
|
|
13
|
-
infiniteScrollPage: number | null;
|
|
14
|
-
count: number;
|
|
15
|
-
searchKeyword?: string;
|
|
16
|
-
initialized?: boolean;
|
|
17
|
-
minPage?: number | null;
|
|
18
|
-
productListPropValue: IkasProductListPropValue;
|
|
19
|
-
filterBrandId?: string | null;
|
|
20
|
-
filterCategoryId?: string | null;
|
|
21
|
-
relatedProductData?: IkasRelatedProductProps | null;
|
|
22
|
-
viewedTogetherProductData?: IkasViewedTogetherProductProps | null;
|
|
23
|
-
pageSpecificData: IkasCategory | IkasBrand | null;
|
|
24
|
-
recommendFor?: string | null;
|
|
25
|
-
isLoading?: boolean;
|
|
26
|
-
fetchRequestTime?: number;
|
|
27
|
-
};
|
|
28
|
-
export declare enum IkasProductListType {
|
|
29
|
-
ALL = "ALL",
|
|
30
|
-
STATIC = "STATIC",
|
|
31
|
-
DISCOUNTED = "DISCOUNTED",
|
|
32
|
-
RECOMMENDED = "RECOMMENDED",
|
|
33
|
-
CATEGORY = "CATEGORY",
|
|
34
|
-
SEARCH = "SEARCH",
|
|
35
|
-
LAST_VIEWED = "LAST_VIEWED",
|
|
36
|
-
RELATED_PRODUCTS = "RELATED_PRODUCTS",
|
|
37
|
-
VIEWED_TOGETHER = "VIEWED_TOGETHER"
|
|
38
|
-
}
|
|
39
|
-
export declare enum IkasProductListSortType {
|
|
40
|
-
INCREASING_PRICE = "INCREASING_PRICE",
|
|
41
|
-
DECREASING_PRICE = "DECREASING_PRICE",
|
|
42
|
-
LAST_ADDED = "LAST_ADDED",
|
|
43
|
-
FIRST_ADDED = "FIRST_ADDED",
|
|
44
|
-
INCREASING_DISCOUNT = "INCREASING_DISCOUNT",
|
|
45
|
-
DECRASING_DISCOUNT = "DECRASING_DISCOUNT",
|
|
46
|
-
FEATURED = "FEATURED",
|
|
47
|
-
DEFAULT = "DEFAULT"
|
|
48
|
-
}
|
|
49
|
-
export declare enum IkasRelatedProductsType {
|
|
50
|
-
CATEGORY = "CATEGORY",
|
|
51
|
-
BRAND = "BRAND"
|
|
52
|
-
}
|
|
53
|
-
export declare enum IkasProductSearchShowStockOption {
|
|
54
|
-
HIDE_OUT_OF_STOCK = "HIDE_OUT_OF_STOCK",
|
|
55
|
-
SHOW_ALL = "SHOW_ALL",
|
|
56
|
-
SHOW_OUT_OF_STOCK_AT_END = "SHOW_OUT_OF_STOCK_AT_END"
|
|
57
|
-
}
|
|
58
|
-
export declare type Facet = {
|
|
59
|
-
id: string;
|
|
60
|
-
values: FacetValue[];
|
|
61
|
-
};
|
|
62
|
-
export declare type FacetValue = {
|
|
63
|
-
id: string;
|
|
64
|
-
count: number;
|
|
65
|
-
};
|
|
66
|
-
export type { IkasRelatedProductProps, IkasViewedTogetherProductProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var E,D,T,A;!function(E){E.ALL="ALL",E.STATIC="STATIC",E.DISCOUNTED="DISCOUNTED",E.RECOMMENDED="RECOMMENDED",E.CATEGORY="CATEGORY",E.SEARCH="SEARCH",E.LAST_VIEWED="LAST_VIEWED",E.RELATED_PRODUCTS="RELATED_PRODUCTS",E.VIEWED_TOGETHER="VIEWED_TOGETHER"}(E||(E={})),function(E){E.INCREASING_PRICE="INCREASING_PRICE",E.DECREASING_PRICE="DECREASING_PRICE",E.LAST_ADDED="LAST_ADDED",E.FIRST_ADDED="FIRST_ADDED",E.INCREASING_DISCOUNT="INCREASING_DISCOUNT",E.DECRASING_DISCOUNT="DECRASING_DISCOUNT",E.FEATURED="FEATURED",E.DEFAULT="DEFAULT"}(D||(D={})),function(E){E.CATEGORY="CATEGORY",E.BRAND="BRAND"}(T||(T={})),function(E){E.HIDE_OUT_OF_STOCK="HIDE_OUT_OF_STOCK",E.SHOW_ALL="SHOW_ALL",E.SHOW_OUT_OF_STOCK_AT_END="SHOW_OUT_OF_STOCK_AT_END"}(A||(A={}));export{D as IkasProductListSortType,E as IkasProductListType,A as IkasProductSearchShowStockOption,T as IkasRelatedProductsType};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__assign as r}from'./../../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as i,IkasCategoryProductsOrderType as n}from"@ikas/storefront-models";import{IkasProductListType as a,IkasProductSearchShowStockOption as o,IkasProductListSortType as u}from"./index.js";import{IkasProductFilterFunctions as d}from"@ikas/storefront-model-functions";import{searchProducts as s,getSuggestedProducts as l,GetSuggestedProductsMethodEnum as c,getProductFilterData as f,SortByDirectionEnum as v,SortByTypeEnum as p}from"@ikas/storefront-api";import{IkasStorefrontConfig as I}from"@ikas/storefront-config";import"../blog-category-list/index.js";import"../blog-list/index.js";import"../brand-list/index.js";import"../category-list/index.js";function C(i,o){var s,l,c,f;return e(this,void 0,void 0,(function(){var e,v,p,I,C,A,y;return t(this,(function(t){switch(t.label){case 0:!function(e){var t;if((null===(t=e.pageSpecificData)||void 0===t?void 0:t.orderType)&&[a.ALL].includes(e.type))switch(e.pageSpecificData.orderType){case n.HIGHEST_DISCOUNT_RATIO:e.sort=u.DECRASING_DISCOUNT;break;case n.LOWEST_DISCOUNT_RATIO:e.sort=u.INCREASING_DISCOUNT;break;case n.HIGHEST_PRICE:e.sort=u.DECREASING_PRICE;break;case n.LOWEST_PRICE:e.sort=u.INCREASING_PRICE;break;case n.NEWEST:e.sort=u.LAST_ADDED;break;case n.OLDEST:e.sort=u.FIRST_ADDED;break;case n.MANUALLY:e.sort=u.FEATURED}}(i),i.isLoading=!0,e=Date.now(),i.fetchRequestTime=e,t.label=1;case 1:return t.trys.push([1,5,,6]),v=o?i.page:1,p=i.limit,!function(e){return e.type===a.ALL||e.type===a.CATEGORY}(i)||i.filters?[3,3]:[4,g(i)];case 2:t.sent(),t.label=3;case 3:if(D(i))return i.data=[],i.page=1,i.minPage=1,i.count=0,i.initialized=!0,[2,!0];if(void 0,E(i))v=void 0,p=200;else if(function(e){return e.type===a.DISCOUNTED}(i))v=1,p=10;else if(function(e){return e.type===a.RECOMMENDED}(i))v=1,p=10;else if(T(i))return[2];return[4,S(i,v||1,p||10,undefined)];case 4:return(I=t.sent())&&i.fetchRequestTime===e?(C=[],T(i)?[2]:(E(i)?(A=i.productListPropValue.productIds||[],C=(null==A?void 0:A.map((function(e){var t,i,n=null===(i=null===(t=I.data)||void 0===t?void 0:t.data)||void 0===i?void 0:i.find((function(t){return t.id===e.productId})),a=null==n?void 0:n.variants.find((function(t){return t.id===e.variantId}));if((null==a?void 0:a.isActive)||(a=null==n?void 0:n.variants.find((function(e){return e.isActive}))),n&&a)return r(r({},n),{selectedVariantValues:a.variantValues})})).filter((function(e){return!!e})))||[]):C=(null===(l=null===(s=I.data)||void 0===s?void 0:s.data)||void 0===l?void 0:l.map((function(e){var t=e.variants.find((function(e){return e.isActive}));return r(r({},e),{selectedVariantValues:(t||e.variants[0]).variantValues})})))||[],function(e,t){var r,i,n=d.isCustomValueFilter;null===(r=e.filters)||void 0===r||r.forEach((function(e){var r,i,a,o=null==t?void 0:t.find((function(t){return t.id===e.id}));o?null===(r=e.values)||void 0===r||r.forEach((function(t){var r=o.values.find((function(e){return e.id===t.id}));r?t.resultCount=r.count:n(e)?t.resultCount=null:t.resultCount=0})):n(e)?null===(i=e.values)||void 0===i||i.forEach((function(e){return e.resultCount=null})):null===(a=e.values)||void 0===a||a.forEach((function(e){return e.resultCount=0}))}));var a=null==t?void 0:t.find((function(e){return"category"===e.id}));a&&(null===(i=e.filterCategories)||void 0===i||i.forEach((function(e){var t=a.values.find((function(t){return t.id===e.id}));e.resultCount=t?t.count:0})))}(i,null===(c=I.data)||void 0===c?void 0:c.facets),i.data=C,i.count=(null===(f=I.data)||void 0===f?void 0:f.count)||0,i.initialized=!0,i.page=v||1,i.minPage=i.page,[2,!0])):[2];case 5:return y=t.sent(),console.error(y),[3,6];case 6:return[2]}}))}))}function E(e){return e.type===a.STATIC}function T(e){return e.type===a.LAST_VIEWED}function D(e){return e.type===a.SEARCH}function S(r,n,f,C){var T,S,g;return e(this,void 0,void 0,(function(){var e,A,y,R,h;return t(this,(function(t){switch(t.label){case 0:return e=[],A=[],y=d.getValueList,null===(T=r.filters)||void 0===T||T.forEach((function(t){var r=y(t);r.length&&e.push({id:t.id,type:t.type,displayType:t.displayType,valueList:r}),t.isFacetFilter&&A.push({id:t.id,type:t.type,displayType:t.displayType})})),R=null===(S=r.filterCategories)||void 0===S?void 0:S.filter((function(e){return e.isSelected})).map((function(e){return e.id})),h=function(e){var t,r;switch(e.sort){case u.INCREASING_PRICE:t=v.ASC,r=p.PRICE;break;case u.DECREASING_PRICE:t=v.DESC,r=p.PRICE;break;case u.FIRST_ADDED:t=v.ASC,r=p.CREATED_AT;break;case u.LAST_ADDED:t=v.DESC,r=p.CREATED_AT;break;case u.INCREASING_DISCOUNT:t=v.ASC,r=p.DISCOUNT_RATIO;break;case u.DECRASING_DISCOUNT:t=v.DESC,r=p.DISCOUNT_RATIO;break;case u.FEATURED:if(D(e))return;t=v.ASC,r=p.MANUAL_SORT;break;case u.DEFAULT:t=void 0,r=void 0}if(t&&r)return{direction:t,type:r}}(r),function(e){return e.type===a.RELATED_PRODUCTS}(r)&&r.relatedProductData?[4,l({priceListId:I.getPriceListId(),salesChannelId:I.getSalesChannelId(),productId:r.relatedProductData.productId,brandIds:r.relatedProductData.brandIds,categoryIds:r.relatedProductData.categoryIds,locale:I.getCurrentLocale()})]:[3,2];case 1:case 3:case 5:return[2,t.sent()];case 2:return function(e){return e.type===a.VIEWED_TOGETHER}(r)&&r.viewedTogetherProductData?[4,l({priceListId:I.getPriceListId(),salesChannelId:I.getSalesChannelId(),method:c.VIEWED_TOGETHER,productIds:r.viewedTogetherProductData.productIds,locale:I.getCurrentLocale()})]:[3,4];case 4:return[4,s({input:{page:n,perPage:f,productIdList:E(r)?null===(g=r.productListPropValue.productIds)||void 0===g?void 0:g.map((function(e){return e.productId})):C,filterList:e,facetList:A,brandId:r.pageType===i.BRAND&&r.type!==a.SEARCH?r.filterBrandId:void 0,categoryIdList:R&&R.length?R:r.filterCategoryId?[r.filterCategoryId]:void 0,priceListId:I.getPriceListId(),salesChannelId:I.getSalesChannelId(),query:r.searchKeyword,order:r.type===a.SEARCH?[]:h?[h]:[],showStockOption:I.getStockPreference()||o.SHOW_ALL}})]}}))}))}function g(r){var n,a,o;return e(this,void 0,void 0,(function(){var e,u;return t(this,(function(t){switch(t.label){case 0:return[4,f({categoryId:r.filterCategoryId?r.filterCategoryId:void 0,locale:I.getCurrentLocale()})];case 1:return e=t.sent(),r.filters=(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.filters)||null,r.filterCategories=(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.categories)||null,r.pageType!==i.CATEGORY&&r.filterCategoryId&&(u=null===(o=r.filterCategories)||void 0===o?void 0:o.find((function(e){return e.id===r.filterCategoryId})))&&(u.isSelected=!0),r.filters&&r.filters.sort((function(e,t){return e.order>t.order?1:-1})),[2]}}))}))}export{C as getInitial};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IkasRaffle } from "@ikas/storefront-models";
|
|
2
|
-
export declare type IkasRaffleList = {
|
|
3
|
-
data: IkasRaffle[];
|
|
4
|
-
limit: number;
|
|
5
|
-
page: number;
|
|
6
|
-
count: number;
|
|
7
|
-
initialized?: boolean;
|
|
8
|
-
minPage?: number | null;
|
|
9
|
-
start?: number | null;
|
|
10
|
-
end?: number | null;
|
|
11
|
-
includeDeleted?: boolean | null;
|
|
12
|
-
name?: string | null;
|
|
13
|
-
search?: string | null;
|
|
14
|
-
id?: string | null;
|
|
15
|
-
isLoading?: boolean;
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../../ext/tslib/tslib.es6.js';import{listStorefrontRaffle as i}from"@ikas/storefront-api";import{IkasStorefrontConfig as r}from"@ikas/storefront-config";import{initIkasRaffle as n}from"@ikas/storefront-models";import{populateRaffleProducts as o}from"../../../providers/helpers/raffle.js";function a(i){var r,n;return e(this,void 0,void 0,(function(){var e,o;return t(this,(function(t){switch(t.label){case 0:if(i.isLoading)return[2];i.isLoading=!0,t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,s(i,i.page,i.limit)];case 2:return e=t.sent(),i.data=(null===(r=e.data)||void 0===r?void 0:r.data)||[],i.count=(null===(n=e.data)||void 0===n?void 0:n.count)||0,i.initialized=!0,i.minPage=i.page,[3,5];case 3:return o=t.sent(),console.log(o),[3,5];case 4:return i.isLoading=!1,[7];case 5:return[2]}}))}))}function s(a,s,d){var u;return e(this,void 0,void 0,(function(){var e,l;return t(this,(function(t){switch(t.label){case 0:return[4,i({start:a.start?{eq:a.start}:void 0,end:a.end?{eq:a.end}:void 0,includeDeleted:a.includeDeleted||!1,name:a.name?{eq:a.name}:void 0,id:a.id?{eq:a.id}:void 0,search:a.search||void 0,pagination:{limit:d,page:s}})];case 1:return e=t.sent(),l=null===(u=e.data)||void 0===u?void 0:u.data,[4,o(l||[])];case 2:return t.sent(),null==l||l.forEach((function(e){return n(e,r.getCurrentLocale())})),[2,e]}}))}))}export{a as getInitial};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IkasRaffle, IkasRaffleParticipant } from "@ikas/storefront-models";
|
|
2
|
-
export declare const populateRaffleProducts: (raffles: IkasRaffle[]) => Promise<void>;
|
|
3
|
-
export declare const populateRaffleParticipantProducts: (raffleParticipants: IkasRaffleParticipant[]) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n}from'./../../ext/tslib/tslib.es6.js';import{listProductOptionSet as r,searchProducts as i}from"@ikas/storefront-api";var u=function(u){return t(void 0,void 0,void 0,(function(){var t,d,o,a,e,c,f,s,l,p,v;return n(this,(function(n){switch(n.label){case 0:for(t=[],d=0,o=u;d<o.length;d++)a=o[d],null===(p=a.variants)||void 0===p||p.forEach((function(n){t.find((function(t){return t===n.productId}))||t.push(n.productId)}));return[4,i({input:{productIdList:t}})];case 1:return(e=n.sent()).isSuccess&&(c=(null===(v=e.data)||void 0===v?void 0:v.data)||[]).length?(f=c.map((function(t){return t.productOptionSetId})).filter((function(t){return!!t})),[4,r({id:{in:f}})]):[3,3];case 2:s=n.sent(),l=s.data,u.forEach((function(t){var n;null===(n=t.variants)||void 0===n||n.forEach((function(n){var r,i=c.find((function(t){return n.productId===t.id}));if(i){i.productOptionSet=null==l?void 0:l.find((function(t){return t.id===i.productOptionSetId}));var u=i.variants.find((function(t){return t.isActive&&n.variantId===t.id}))||i.variants[0];(null===(r=t.products)||void 0===r?void 0:r.find((function(t){return t.id===i.id})))||(i.selectedVariantValues=u.variantValues,i.variants=i.variants.filter((function(n){var r;return null===(r=t.variants)||void 0===r?void 0:r.find((function(t){return t.variantId===n.id}))})),t.products||(t.products=[]),t.products.push(i))}}))})),n.label=3;case 3:return[2]}}))}))},d=function(u){return t(void 0,void 0,void 0,(function(){var t,d,o,a,e,c,f;return n(this,(function(n){switch(n.label){case 0:return(t=u.filter((function(t){return!!t.appliedProduct.productId})).map((function(t){return t.appliedProduct.productId})))&&t.length?[4,i({input:{productIdList:t}})]:[3,3];case 1:return(d=n.sent())&&((o=null===(f=d.data)||void 0===f?void 0:f.data)&&o&&o.length)?(a=o.map((function(t){return t.productOptionSetId})).filter((function(t){return!!t})),[4,r({id:{in:a}})]):[3,3];case 2:e=n.sent(),c=e.data,u.forEach((function(t){var n=o.find((function(n){return n.id===t.appliedProduct.productId})),r=(null==n?void 0:n.variants.find((function(n){return n.isActive&&t.appliedProduct.variantId===n.id})))||(null==n?void 0:n.variants[0]);n&&r&&(n.productOptionSet=null==c?void 0:c.find((function(t){return t.id===n.productOptionSetId})),n.selectedVariantValues=r.variantValues,t.raffle&&(t.raffle.products?t.raffle.products.push(n):t.raffle.products=[n]))})),n.label=3;case 3:return[2]}}))}))};export{d as populateRaffleParticipantProducts,u as populateRaffleProducts};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { IkasThemeJson, IkasThemeJsonPageType, IkasThemeJsonPageComponent, IkasThemeJsonComponentProp, IkasThemeJsonPage, IkasMerchantSettings, IkasCustomerReviewSummary, IkasThemeJsonPageSpecification } from "@ikas/storefront-models";
|
|
2
|
-
import { IkasLinkMetaDataTargetId } from "./prop-value/link";
|
|
3
|
-
import { IkasPageComponentPropValue } from "./types";
|
|
4
|
-
export declare class IkasPageDataProvider {
|
|
5
|
-
theme: IkasThemeJson;
|
|
6
|
-
pageType?: IkasThemeJsonPageType | null;
|
|
7
|
-
pageParams: Record<string, any>;
|
|
8
|
-
private pageComponentPropValues;
|
|
9
|
-
pageSpecificData?: any | null;
|
|
10
|
-
merchantSettings?: IkasMerchantSettings | null;
|
|
11
|
-
possiblePageTypes?: IkasThemeJsonPageType[];
|
|
12
|
-
linkMetaDataTargetIds: IkasLinkMetaDataTargetId[];
|
|
13
|
-
productReviewSummary: IkasCustomerReviewSummary | null;
|
|
14
|
-
constructor(theme: IkasThemeJson, pageParams?: Record<string, any>, pageType?: IkasThemeJsonPageType);
|
|
15
|
-
get page(): IkasThemeJsonPage | undefined;
|
|
16
|
-
get nextPageData(): {
|
|
17
|
-
props: any;
|
|
18
|
-
};
|
|
19
|
-
get specification(): IkasThemeJsonPageSpecification | undefined;
|
|
20
|
-
get pageComponents(): IkasThemeJsonPageComponent[];
|
|
21
|
-
get $pageComponentPropValues(): IkasPageComponentPropValue[];
|
|
22
|
-
getMerchantSettings(): Promise<void>;
|
|
23
|
-
getPageData(): Promise<void>;
|
|
24
|
-
getProductReviewSummary(): Promise<void>;
|
|
25
|
-
getPageSpecificData(): Promise<void>;
|
|
26
|
-
getPageComponentPropValues(pageComponent: IkasThemeJsonPageComponent): Promise<IkasPageComponentPropValue>;
|
|
27
|
-
getPageComponentPropValue(pageComponent: IkasThemeJsonPageComponent, prop: IkasThemeJsonComponentProp): Promise<any>;
|
|
28
|
-
private setPageMetaData;
|
|
29
|
-
setLinkSlugs(): Promise<[void, void, void]>;
|
|
30
|
-
private getLinkSlugs;
|
|
31
|
-
private getFlatCustomData;
|
|
32
|
-
}
|