@ikas/storefront-providers 4.0.0-alpha.58 → 4.0.0-alpha.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ext/tslib/tslib.es6.js +1 -0
- package/{src/index.ts → build/index.d.ts} +20 -22
- package/build/index.js +1 -0
- package/build/models/prop-value/attribute-list.d.ts +6 -0
- package/build/models/prop-value/attribute.d.ts +6 -0
- package/build/models/prop-value/blog-category-list.d.ts +6 -0
- package/build/models/prop-value/blog-category.d.ts +4 -0
- package/build/models/prop-value/blog-list.d.ts +8 -0
- package/build/models/prop-value/blog.d.ts +4 -0
- package/build/models/prop-value/brand-list.d.ts +8 -0
- package/build/models/prop-value/brand.d.ts +4 -0
- package/build/models/prop-value/brand.js +1 -0
- package/build/models/prop-value/category-list.d.ts +8 -0
- package/build/models/prop-value/category.d.ts +4 -0
- package/build/models/prop-value/link.d.ts +18 -0
- package/build/models/prop-value/link.js +1 -0
- package/build/models/prop-value/product-list.d.ts +17 -0
- package/build/models/prop-value/product.d.ts +5 -0
- package/build/models/prop-value/raffle-list.d.ts +4 -0
- package/build/models/prop-value/raffle.d.ts +4 -0
- package/build/models/ui/blog-category-list/index.d.ts +17 -0
- package/build/models/ui/blog-category-list/index.js +1 -0
- package/build/models/ui/blog-category-list/init.d.ts +2 -0
- package/build/models/ui/blog-category-list/init.js +1 -0
- package/build/models/ui/blog-list/index.d.ts +19 -0
- package/build/models/ui/blog-list/index.js +1 -0
- package/build/models/ui/blog-list/init.d.ts +2 -0
- package/build/models/ui/blog-list/init.js +1 -0
- package/build/models/ui/brand-list/index.d.ts +22 -0
- package/build/models/ui/brand-list/index.js +1 -0
- package/build/models/ui/brand-list/init.d.ts +2 -0
- package/build/models/ui/brand-list/init.js +1 -0
- package/build/models/ui/category-list/index.d.ts +22 -0
- package/build/models/ui/category-list/index.js +1 -0
- package/build/models/ui/category-list/init.d.ts +2 -0
- package/build/models/ui/category-list/init.js +1 -0
- package/build/models/ui/component-renderer/index.d.ts +6 -0
- package/build/models/ui/customer-review-list/index.d.ts +11 -0
- package/build/models/ui/customer-review-list/init.d.ts +2 -0
- package/build/models/ui/customer-review-summary-list/index.d.ts +11 -0
- package/build/models/ui/customer-review-summary-list/init.d.ts +2 -0
- package/{src/models/ui/index.ts → build/models/ui/index.d.ts} +12 -12
- package/build/models/ui/navigation-link/index.d.ts +7 -0
- package/build/models/ui/product-attribute-detail/index.d.ts +6 -0
- package/build/models/ui/product-attribute-list/index.d.ts +6 -0
- package/build/models/ui/product-list/index.d.ts +63 -0
- package/build/models/ui/product-list/index.js +1 -0
- package/build/models/ui/product-list/init.d.ts +2 -0
- package/build/models/ui/product-list/init.js +1 -0
- package/build/models/ui/raffle-list/index.d.ts +16 -0
- package/build/models/ui/raffle-list/init.d.ts +2 -0
- package/build/models/ui/raffle-list/init.js +1 -0
- package/build/providers/helpers/raffle.d.ts +2 -0
- package/build/providers/helpers/raffle.js +1 -0
- package/build/providers/page-data-get.d.ts +31 -0
- package/build/providers/page-data-get.js +1 -0
- package/build/providers/placeholders.d.ts +7 -0
- package/build/providers/placeholders.js +1 -0
- package/build/providers/prop-value/attribute-list.d.ts +8 -0
- package/build/providers/prop-value/attribute-list.js +1 -0
- package/build/providers/prop-value/attribute.d.ts +8 -0
- package/build/providers/prop-value/attribute.js +1 -0
- package/build/providers/prop-value/blog-category-list.d.ts +8 -0
- package/build/providers/prop-value/blog-category-list.js +1 -0
- package/build/providers/prop-value/blog-category.d.ts +8 -0
- package/build/providers/prop-value/blog-category.js +1 -0
- package/build/providers/prop-value/blog-list.d.ts +11 -0
- package/build/providers/prop-value/blog-list.js +1 -0
- package/build/providers/prop-value/blog.d.ts +8 -0
- package/build/providers/prop-value/blog.js +1 -0
- package/build/providers/prop-value/boolean.d.ts +6 -0
- package/build/providers/prop-value/boolean.js +1 -0
- package/build/providers/prop-value/brand-list.d.ts +8 -0
- package/build/providers/prop-value/brand-list.js +1 -0
- package/build/providers/prop-value/brand.d.ts +8 -0
- package/build/providers/prop-value/brand.js +1 -0
- package/build/providers/prop-value/category-list.d.ts +8 -0
- package/build/providers/prop-value/category-list.js +1 -0
- package/build/providers/prop-value/category.d.ts +8 -0
- package/build/providers/prop-value/category.js +1 -0
- package/build/providers/prop-value/color.d.ts +6 -0
- package/build/providers/prop-value/color.js +1 -0
- package/build/providers/prop-value/custom.d.ts +42 -0
- package/build/providers/prop-value/custom.js +1 -0
- package/build/providers/prop-value/image-list.d.ts +7 -0
- package/build/providers/prop-value/image-list.js +1 -0
- package/build/providers/prop-value/image.d.ts +7 -0
- package/build/providers/prop-value/image.js +1 -0
- package/{src/providers/prop-value/index.ts → build/providers/prop-value/index.d.ts} +3 -3
- package/build/providers/prop-value/link.d.ts +26 -0
- package/build/providers/prop-value/link.js +1 -0
- package/build/providers/prop-value/product-detail.d.ts +8 -0
- package/build/providers/prop-value/product-detail.js +1 -0
- package/build/providers/prop-value/product-list.d.ts +17 -0
- package/build/providers/prop-value/product-list.js +1 -0
- package/build/providers/prop-value/raffle-list.d.ts +5 -0
- package/build/providers/prop-value/raffle-list.js +1 -0
- package/build/providers/prop-value/raffle.d.ts +8 -0
- package/build/providers/prop-value/raffle.js +1 -0
- package/build/providers/prop-value/rich-text.d.ts +6 -0
- package/build/providers/prop-value/rich-text.js +1 -0
- package/build/providers/prop-value/slider.d.ts +7 -0
- package/build/providers/prop-value/slider.js +1 -0
- package/build/providers/prop-value/text.d.ts +6 -0
- package/build/providers/prop-value/text.js +1 -0
- package/build/providers/types.d.ts +59 -0
- package/build/providers/types.js +1 -0
- package/package.json +12 -12
- package/src/models/prop-value/attribute-list.ts +0 -8
- package/src/models/prop-value/attribute.ts +0 -8
- package/src/models/prop-value/blog-category-list.ts +0 -9
- package/src/models/prop-value/blog-category.ts +0 -6
- package/src/models/prop-value/blog-list.ts +0 -13
- package/src/models/prop-value/blog.ts +0 -6
- package/src/models/prop-value/brand-list.ts +0 -11
- package/src/models/prop-value/brand.ts +0 -6
- package/src/models/prop-value/category-list.ts +0 -11
- package/src/models/prop-value/category.ts +0 -6
- package/src/models/prop-value/link.ts +0 -22
- package/src/models/prop-value/product-list.ts +0 -29
- package/src/models/prop-value/product.ts +0 -7
- package/src/models/prop-value/raffle-list.ts +0 -6
- package/src/models/prop-value/raffle.ts +0 -6
- package/src/models/ui/blog-category-list/index.ts +0 -19
- package/src/models/ui/blog-category-list/init.ts +0 -54
- package/src/models/ui/blog-list/index.ts +0 -21
- package/src/models/ui/blog-list/init.ts +0 -49
- package/src/models/ui/brand-list/index.ts +0 -25
- package/src/models/ui/brand-list/init.ts +0 -47
- package/src/models/ui/category-list/index.ts +0 -25
- package/src/models/ui/category-list/init.ts +0 -50
- package/src/models/ui/component-renderer/index.ts +0 -5
- package/src/models/ui/customer-review-list/index.ts +0 -12
- package/src/models/ui/customer-review-list/init.ts +0 -33
- package/src/models/ui/customer-review-summary-list/index.ts +0 -12
- package/src/models/ui/customer-review-summary-list/init.ts +0 -33
- package/src/models/ui/navigation-link/index.ts +0 -7
- package/src/models/ui/product-attribute-detail/index.ts +0 -7
- package/src/models/ui/product-attribute-list/index.ts +0 -7
- package/src/models/ui/product-list/index.ts +0 -80
- package/src/models/ui/product-list/init.ts +0 -407
- package/src/models/ui/raffle-list/index.ts +0 -17
- package/src/models/ui/raffle-list/init.ts +0 -44
- package/src/providers/helpers/raffle.ts +0 -69
- package/src/providers/page-data-get.ts +0 -712
- package/src/providers/placeholders.ts +0 -137
- package/src/providers/prop-value/attribute-list.ts +0 -75
- package/src/providers/prop-value/attribute.ts +0 -77
- package/src/providers/prop-value/blog-category-list.ts +0 -29
- package/src/providers/prop-value/blog-category.ts +0 -49
- package/src/providers/prop-value/blog-list.ts +0 -61
- package/src/providers/prop-value/blog.ts +0 -41
- package/src/providers/prop-value/boolean.ts +0 -14
- package/src/providers/prop-value/brand-list.ts +0 -30
- package/src/providers/prop-value/brand.ts +0 -46
- package/src/providers/prop-value/category-list.ts +0 -31
- package/src/providers/prop-value/category.ts +0 -45
- package/src/providers/prop-value/color.ts +0 -14
- package/src/providers/prop-value/custom.ts +0 -560
- package/src/providers/prop-value/image-list.ts +0 -16
- package/src/providers/prop-value/image.ts +0 -16
- package/src/providers/prop-value/link.ts +0 -276
- package/src/providers/prop-value/product-detail.ts +0 -92
- package/src/providers/prop-value/product-list.ts +0 -122
- package/src/providers/prop-value/raffle-list.ts +0 -20
- package/src/providers/prop-value/raffle.ts +0 -41
- package/src/providers/prop-value/rich-text.ts +0 -14
- package/src/providers/prop-value/slider.ts +0 -19
- package/src/providers/prop-value/text.ts +0 -14
- package/src/providers/types.ts +0 -91
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -1,22 +1,20 @@
|
|
|
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
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
export * from "./providers/
|
|
21
|
-
export * from "./providers/placeholders";
|
|
22
|
-
export * from "./providers/helpers/raffle";
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
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{populateRaffleProducts}from"./providers/helpers/raffle.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=function(){};export{n as IkasBrandPropValue};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var E;!function(E){E.PAGE="PAGE",E.EXTERNAL="EXTERNAL",E.FILE="FILE"}(E||(E={}));export{E as IkasLinkType};
|
|
@@ -0,0 +1,17 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A;!function(A){A.ALL="ALL",A.STATIC="STATIC"}(A||(A={}));export{A as IkasBlogCategoryListType};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A;!function(A){A.ALL="ALL",A.STATIC="STATIC",A.CATEGORY="CATEGORY"}(A||(A={}));export{A as IkasBlogListType};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 +1,12 @@
|
|
|
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
|
+
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";
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IkasBrand, IkasCategory, IkasFilterCategory, IkasProduct, IkasProductFilter, IkasThemeJsonPageType } from "@ikas/storefront-models";
|
|
2
|
+
import { IkasRelatedProductProps } 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
|
+
pageSpecificData: IkasCategory | IkasBrand | null;
|
|
23
|
+
recommendFor?: string | null;
|
|
24
|
+
isLoading?: boolean;
|
|
25
|
+
fetchRequestTime?: number;
|
|
26
|
+
};
|
|
27
|
+
export declare enum IkasProductListType {
|
|
28
|
+
ALL = "ALL",
|
|
29
|
+
STATIC = "STATIC",
|
|
30
|
+
DISCOUNTED = "DISCOUNTED",
|
|
31
|
+
RECOMMENDED = "RECOMMENDED",
|
|
32
|
+
CATEGORY = "CATEGORY",
|
|
33
|
+
SEARCH = "SEARCH",
|
|
34
|
+
LAST_VIEWED = "LAST_VIEWED",
|
|
35
|
+
RELATED_PRODUCTS = "RELATED_PRODUCTS"
|
|
36
|
+
}
|
|
37
|
+
export declare enum IkasProductListSortType {
|
|
38
|
+
INCREASING_PRICE = "INCREASING_PRICE",
|
|
39
|
+
DECREASING_PRICE = "DECREASING_PRICE",
|
|
40
|
+
LAST_ADDED = "LAST_ADDED",
|
|
41
|
+
FIRST_ADDED = "FIRST_ADDED",
|
|
42
|
+
INCREASING_DISCOUNT = "INCREASING_DISCOUNT",
|
|
43
|
+
DECRASING_DISCOUNT = "DECRASING_DISCOUNT",
|
|
44
|
+
FEATURED = "FEATURED"
|
|
45
|
+
}
|
|
46
|
+
export declare enum IkasRelatedProductsType {
|
|
47
|
+
CATEGORY = "CATEGORY",
|
|
48
|
+
BRAND = "BRAND"
|
|
49
|
+
}
|
|
50
|
+
export declare enum IkasProductSearchShowStockOption {
|
|
51
|
+
HIDE_OUT_OF_STOCK = "HIDE_OUT_OF_STOCK",
|
|
52
|
+
SHOW_ALL = "SHOW_ALL",
|
|
53
|
+
SHOW_OUT_OF_STOCK_AT_END = "SHOW_OUT_OF_STOCK_AT_END"
|
|
54
|
+
}
|
|
55
|
+
export declare type Facet = {
|
|
56
|
+
id: string;
|
|
57
|
+
values: FacetValue[];
|
|
58
|
+
};
|
|
59
|
+
export declare type FacetValue = {
|
|
60
|
+
id: string;
|
|
61
|
+
count: number;
|
|
62
|
+
};
|
|
63
|
+
export type { IkasRelatedProductProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var E,D,A,T;!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||(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"}(D||(D={})),function(E){E.CATEGORY="CATEGORY",E.BRAND="BRAND"}(A||(A={})),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"}(T||(T={}));export{D as IkasProductListSortType,E as IkasProductListType,T as IkasProductSearchShowStockOption,A as IkasRelatedProductsType};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as r}from'./../../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as i,IkasCategoryProductsOrderType as n}from"@ikas/storefront-models";import{IkasProductListType as o,IkasProductSearchShowStockOption as a,IkasProductListSortType as u}from"./index.js";import{IkasProductFilterFunctions as d}from"@ikas/storefront-model-functions";import{searchProducts as s,getRelatedProducts as l,getProductFilterData as c,SortByDirectionEnum as f,SortByTypeEnum as v}from"@ikas/storefront-api";import{IkasStorefrontConfig as p}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 I(i,a){var s,l,c,f;return t(this,void 0,void 0,(function(){var t,v,p,I,D,y,g;return e(this,(function(e){switch(e.label){case 0:!function(t){var e;if((null===(e=t.pageSpecificData)||void 0===e?void 0:e.orderType)&&[o.ALL,o.CATEGORY].includes(t.type))switch(t.pageSpecificData.orderType){case n.HIGHEST_DISCOUNT_RATIO:t.sort=u.DECRASING_DISCOUNT;break;case n.LOWEST_DISCOUNT_RATIO:t.sort=u.INCREASING_DISCOUNT;break;case n.HIGHEST_PRICE:t.sort=u.DECREASING_PRICE;break;case n.LOWEST_PRICE:t.sort=u.INCREASING_PRICE;break;case n.NEWEST:t.sort=u.LAST_ADDED;break;case n.OLDEST:t.sort=u.FIRST_ADDED;break;case n.MANUALLY:t.sort=u.FEATURED}}(i),i.isLoading=!0,t=Date.now(),i.fetchRequestTime=t,e.label=1;case 1:return e.trys.push([1,5,,6]),v=a?i.page:1,p=i.limit,!function(t){return t.type===o.ALL||t.type===o.CATEGORY}(i)||i.filters?[3,3]:[4,T(i)];case 2:e.sent(),e.label=3;case 3:if(S(i))return i.data=[],i.page=1,i.minPage=1,i.count=0,i.initialized=!0,[2,!0];if(void 0,C(i))v=void 0,p=200;else if(function(t){return t.type===o.DISCOUNTED}(i))v=1,p=10;else if(function(t){return t.type===o.RECOMMENDED}(i))v=1,p=10;else if(E(i))return[2];return[4,A(i,v||1,p||10,undefined)];case 4:return(I=e.sent())&&i.fetchRequestTime===t?(D=[],E(i)?[2]:(C(i)?(y=i.productListPropValue.productIds||[],D=(null==y?void 0:y.map((function(t){var e,i,n=null===(i=null===(e=I.data)||void 0===e?void 0:e.data)||void 0===i?void 0:i.find((function(e){return e.id===t.productId})),o=null==n?void 0:n.variants.find((function(e){return e.id===t.variantId}));if((null==o?void 0:o.isActive)||(o=null==n?void 0:n.variants.find((function(t){return t.isActive}))),n&&o)return r(r({},n),{selectedVariantValues:o.variantValues})})).filter((function(t){return!!t})))||[]):D=(null===(l=null===(s=I.data)||void 0===s?void 0:s.data)||void 0===l?void 0:l.map((function(t){var e=t.variants.find((function(t){return t.isActive}));return r(r({},t),{selectedVariantValues:(e||t.variants[0]).variantValues})})))||[],function(t,e){var r,i,n=d.isCustomValueFilter;null===(r=t.filters)||void 0===r||r.forEach((function(t){var r,i,o,a=null==e?void 0:e.find((function(e){return e.id===t.id}));a?null===(r=t.values)||void 0===r||r.forEach((function(e){var r=a.values.find((function(t){return t.id===e.id}));r?e.resultCount=r.count:n(t)?e.resultCount=null:e.resultCount=0})):n(t)?null===(i=t.values)||void 0===i||i.forEach((function(t){return t.resultCount=null})):null===(o=t.values)||void 0===o||o.forEach((function(t){return t.resultCount=0}))}));var o=null==e?void 0:e.find((function(t){return"category"===t.id}));o&&(null===(i=t.filterCategories)||void 0===i||i.forEach((function(t){var e=o.values.find((function(e){return e.id===t.id}));t.resultCount=e?e.count:0})))}(i,null===(c=I.data)||void 0===c?void 0:c.facets),i.data=D,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 g=e.sent(),console.error(g),[3,6];case 6:return[2]}}))}))}function C(t){return t.type===o.STATIC}function E(t){return t.type===o.LAST_VIEWED}function S(t){return t.type===o.SEARCH}function A(r,n,c,I){var E,A,T;return t(this,void 0,void 0,(function(){var t,D,y,g,R;return e(this,(function(e){switch(e.label){case 0:return t=[],D=[],y=d.getValueList,null===(E=r.filters)||void 0===E||E.forEach((function(e){var r=y(e);r.length&&t.push({id:e.id,type:e.type,displayType:e.displayType,valueList:r}),e.isFacetFilter&&D.push({id:e.id,type:e.type,displayType:e.displayType})})),g=null===(A=r.filterCategories)||void 0===A?void 0:A.filter((function(t){return t.isSelected})).map((function(t){return t.id})),R=function(t){var e=f.DESC,r=v.CREATED_AT;switch(t.sort){case u.INCREASING_PRICE:e=f.ASC,r=v.PRICE;break;case u.DECREASING_PRICE:e=f.DESC,r=v.PRICE;break;case u.FIRST_ADDED:e=f.ASC,r=v.CREATED_AT;break;case u.LAST_ADDED:e=f.DESC,r=v.CREATED_AT;break;case u.INCREASING_DISCOUNT:e=f.ASC,r=v.DISCOUNT_RATIO;break;case u.DECRASING_DISCOUNT:e=f.DESC,r=v.DISCOUNT_RATIO;break;case u.FEATURED:if(S(t))return;e=f.ASC,r=v.MANUAL_SORT}return{direction:e,type:r}}(r),function(t){return t.type===o.RELATED_PRODUCTS}(r)&&r.relatedProductData?[4,l({priceListId:p.getPriceListId(),salesChannelId:p.getSalesChannelId(),productId:r.relatedProductData.productId,brandIds:r.relatedProductData.brandIds,categoryIds:r.relatedProductData.categoryIds})]:[3,2];case 1:case 3:return[2,e.sent()];case 2:return[4,s({input:{page:n,perPage:c,productIdList:C(r)?null===(T=r.productListPropValue.productIds)||void 0===T?void 0:T.map((function(t){return t.productId})):I,filterList:t,facetList:D,brandId:r.pageType===i.BRAND&&r.type!==o.SEARCH?r.filterBrandId:void 0,categoryIdList:g&&g.length?g:r.filterCategoryId?[r.filterCategoryId]:void 0,priceListId:p.getPriceListId(),salesChannelId:p.getSalesChannelId(),query:r.searchKeyword,order:r.type===o.SEARCH?null:R?[R]:null,showStockOption:p.getStockPreference()||a.SHOW_ALL}})]}}))}))}function T(r){var n,o,a;return t(this,void 0,void 0,(function(){var t,u;return e(this,(function(e){switch(e.label){case 0:return[4,c({categoryId:r.filterCategoryId?r.filterCategoryId:void 0})];case 1:return t=e.sent(),r.filters=(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.filters)||null,r.filterCategories=(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.categories)||null,r.pageType!==i.CATEGORY&&r.filterCategoryId&&(u=null===(a=r.filterCategories)||void 0===a?void 0:a.find((function(t){return t.id===r.filterCategoryId})))&&(u.isSelected=!0),r.filters&&r.filters.sort((function(t,e){return t.order>e.order?1:-1})),[2]}}))}))}export{I as getInitial};
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{listStorefrontRaffle as t}from"@ikas/storefront-api";import{populateRaffleProducts as n}from"../../../providers/helpers/raffle.js";function a(t){var n,a;return e(this,void 0,void 0,(function(){var e,o;return i(this,(function(i){switch(i.label){case 0:if(t.isLoading)return[2];t.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r(t,t.page,t.limit)];case 2:return e=i.sent(),t.data=(null===(n=e.data)||void 0===n?void 0:n.data)||[],t.count=(null===(a=e.data)||void 0===a?void 0:a.count)||0,t.initialized=!0,t.minPage=t.page,[3,5];case 3:return o=i.sent(),console.log(o),[3,5];case 4:return t.isLoading=!1,[7];case 5:return[2]}}))}))}function r(a,r,o){var s;return e(this,void 0,void 0,(function(){var e;return i(this,(function(i){switch(i.label){case 0:return[4,t({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:o,page:r}})];case 1:return e=i.sent(),[4,n((null===(s=e.data)||void 0===s?void 0:s.data)||[])];case 2:return i.sent(),[2,e]}}))}))}export{a as getInitial};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as n,__generator as t}from'./../../ext/tslib/tslib.es6.js';import{listProductOptionSet as i,searchProducts as r}from"@ikas/storefront-api";var o=function(o){return n(void 0,void 0,void 0,(function(){var n,u,a,d,e,c,s,f,v,l,p;return t(this,(function(t){switch(t.label){case 0:for(n=[],u=0,a=o;u<a.length;u++)d=a[u],null===(l=d.variants)||void 0===l||l.forEach((function(t){n.find((function(n){return n===t.productId}))||n.push(t.productId)}));return[4,r({input:{productIdList:n}})];case 1:return(e=t.sent()).isSuccess&&(c=(null===(p=e.data)||void 0===p?void 0:p.data)||[]).length?(s=c.map((function(n){return n.productOptionSetId})).filter((function(n){return!!n})),[4,i({id:{in:s}})]):[3,3];case 2:f=t.sent(),v=f.data,o.forEach((function(n){var t;null===(t=n.variants)||void 0===t||t.forEach((function(t){var i=c.find((function(n){return t.productId===n.id}));if(i){i.productOptionSet=null==v?void 0:v.find((function(n){return n.id===i.productOptionSetId}));var r=i.variants.find((function(n){return n.isActive&&t.variantId===n.id}))||i.variants[0];n.products.find((function(n){return n.id===i.id}))||(i.selectedVariantValues=r.variantValues,i.variants=i.variants.filter((function(t){var i;return null===(i=n.variants)||void 0===i?void 0:i.find((function(n){return n.variantId===t.id}))})),n.products.push(i))}}))})),t.label=3;case 3:return[2]}}))}))};export{o as populateRaffleProducts};
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|