@ikas/storefront-providers 4.0.0-alpha.7 → 4.0.0-alpha.70

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 (170) hide show
  1. package/build/ext/tslib/tslib.es6.js +1 -0
  2. package/{src/index.ts → build/index.d.ts} +20 -22
  3. package/build/index.js +1 -0
  4. package/build/models/prop-value/attribute-list.d.ts +6 -0
  5. package/build/models/prop-value/attribute.d.ts +6 -0
  6. package/build/models/prop-value/blog-category-list.d.ts +6 -0
  7. package/build/models/prop-value/blog-category.d.ts +4 -0
  8. package/build/models/prop-value/blog-list.d.ts +8 -0
  9. package/build/models/prop-value/blog.d.ts +4 -0
  10. package/build/models/prop-value/brand-list.d.ts +8 -0
  11. package/build/models/prop-value/brand.d.ts +4 -0
  12. package/build/models/prop-value/brand.js +1 -0
  13. package/build/models/prop-value/category-list.d.ts +8 -0
  14. package/build/models/prop-value/category.d.ts +4 -0
  15. package/build/models/prop-value/link.d.ts +18 -0
  16. package/build/models/prop-value/link.js +1 -0
  17. package/build/models/prop-value/product-list.d.ts +17 -0
  18. package/build/models/prop-value/product.d.ts +5 -0
  19. package/build/models/prop-value/raffle-list.d.ts +4 -0
  20. package/build/models/prop-value/raffle.d.ts +4 -0
  21. package/build/models/ui/blog-category-list/index.d.ts +17 -0
  22. package/build/models/ui/blog-category-list/index.js +1 -0
  23. package/build/models/ui/blog-category-list/init.d.ts +2 -0
  24. package/build/models/ui/blog-category-list/init.js +1 -0
  25. package/build/models/ui/blog-list/index.d.ts +19 -0
  26. package/build/models/ui/blog-list/index.js +1 -0
  27. package/build/models/ui/blog-list/init.d.ts +2 -0
  28. package/build/models/ui/blog-list/init.js +1 -0
  29. package/build/models/ui/brand-list/index.d.ts +22 -0
  30. package/build/models/ui/brand-list/index.js +1 -0
  31. package/build/models/ui/brand-list/init.d.ts +2 -0
  32. package/build/models/ui/brand-list/init.js +1 -0
  33. package/build/models/ui/category-list/index.d.ts +22 -0
  34. package/build/models/ui/category-list/index.js +1 -0
  35. package/build/models/ui/category-list/init.d.ts +2 -0
  36. package/build/models/ui/category-list/init.js +1 -0
  37. package/build/models/ui/component-renderer/index.d.ts +6 -0
  38. package/build/models/ui/customer-review-list/index.d.ts +11 -0
  39. package/build/models/ui/customer-review-list/init.d.ts +2 -0
  40. package/build/models/ui/customer-review-summary-list/index.d.ts +11 -0
  41. package/build/models/ui/customer-review-summary-list/init.d.ts +2 -0
  42. package/{src/models/ui/index.ts → build/models/ui/index.d.ts} +12 -12
  43. package/build/models/ui/navigation-link/index.d.ts +7 -0
  44. package/build/models/ui/product-attribute-detail/index.d.ts +6 -0
  45. package/build/models/ui/product-attribute-list/index.d.ts +6 -0
  46. package/build/models/ui/product-list/index.d.ts +64 -0
  47. package/build/models/ui/product-list/index.js +1 -0
  48. package/build/models/ui/product-list/init.d.ts +2 -0
  49. package/build/models/ui/product-list/init.js +1 -0
  50. package/build/models/ui/raffle-list/index.d.ts +16 -0
  51. package/build/models/ui/raffle-list/init.d.ts +2 -0
  52. package/build/models/ui/raffle-list/init.js +1 -0
  53. package/build/providers/helpers/raffle.d.ts +2 -0
  54. package/build/providers/helpers/raffle.js +1 -0
  55. package/build/providers/page-data-get.d.ts +31 -0
  56. package/build/providers/page-data-get.js +1 -0
  57. package/build/providers/placeholders.d.ts +7 -0
  58. package/build/providers/placeholders.js +1 -0
  59. package/build/providers/prop-value/attribute-list.d.ts +8 -0
  60. package/build/providers/prop-value/attribute-list.js +1 -0
  61. package/build/providers/prop-value/attribute.d.ts +8 -0
  62. package/build/providers/prop-value/attribute.js +1 -0
  63. package/build/providers/prop-value/blog-category-list.d.ts +8 -0
  64. package/build/providers/prop-value/blog-category-list.js +1 -0
  65. package/build/providers/prop-value/blog-category.d.ts +8 -0
  66. package/build/providers/prop-value/blog-category.js +1 -0
  67. package/build/providers/prop-value/blog-list.d.ts +11 -0
  68. package/build/providers/prop-value/blog-list.js +1 -0
  69. package/build/providers/prop-value/blog.d.ts +8 -0
  70. package/build/providers/prop-value/blog.js +1 -0
  71. package/build/providers/prop-value/boolean.d.ts +6 -0
  72. package/build/providers/prop-value/boolean.js +1 -0
  73. package/build/providers/prop-value/brand-list.d.ts +8 -0
  74. package/build/providers/prop-value/brand-list.js +1 -0
  75. package/build/providers/prop-value/brand.d.ts +8 -0
  76. package/build/providers/prop-value/brand.js +1 -0
  77. package/build/providers/prop-value/category-list.d.ts +8 -0
  78. package/build/providers/prop-value/category-list.js +1 -0
  79. package/build/providers/prop-value/category.d.ts +8 -0
  80. package/build/providers/prop-value/category.js +1 -0
  81. package/build/providers/prop-value/color.d.ts +6 -0
  82. package/build/providers/prop-value/color.js +1 -0
  83. package/build/providers/prop-value/custom.d.ts +42 -0
  84. package/build/providers/prop-value/custom.js +1 -0
  85. package/build/providers/prop-value/image-list.d.ts +7 -0
  86. package/build/providers/prop-value/image-list.js +1 -0
  87. package/build/providers/prop-value/image.d.ts +7 -0
  88. package/build/providers/prop-value/image.js +1 -0
  89. package/{src/providers/prop-value/index.ts → build/providers/prop-value/index.d.ts} +3 -3
  90. package/build/providers/prop-value/link.d.ts +26 -0
  91. package/build/providers/prop-value/link.js +1 -0
  92. package/build/providers/prop-value/product-detail.d.ts +8 -0
  93. package/build/providers/prop-value/product-detail.js +1 -0
  94. package/build/providers/prop-value/product-list.d.ts +17 -0
  95. package/build/providers/prop-value/product-list.js +1 -0
  96. package/build/providers/prop-value/raffle-list.d.ts +5 -0
  97. package/build/providers/prop-value/raffle-list.js +1 -0
  98. package/build/providers/prop-value/raffle.d.ts +8 -0
  99. package/build/providers/prop-value/raffle.js +1 -0
  100. package/build/providers/prop-value/rich-text.d.ts +6 -0
  101. package/build/providers/prop-value/rich-text.js +1 -0
  102. package/build/providers/prop-value/slider.d.ts +7 -0
  103. package/build/providers/prop-value/slider.js +1 -0
  104. package/build/providers/prop-value/text.d.ts +6 -0
  105. package/build/providers/prop-value/text.js +1 -0
  106. package/build/providers/types.d.ts +66 -0
  107. package/build/providers/types.js +1 -0
  108. package/package.json +13 -12
  109. package/src/models/prop-value/attribute-list.ts +0 -8
  110. package/src/models/prop-value/attribute.ts +0 -8
  111. package/src/models/prop-value/blog-category-list.ts +0 -9
  112. package/src/models/prop-value/blog-category.ts +0 -6
  113. package/src/models/prop-value/blog-list.ts +0 -13
  114. package/src/models/prop-value/blog.ts +0 -6
  115. package/src/models/prop-value/brand-list.ts +0 -11
  116. package/src/models/prop-value/brand.ts +0 -6
  117. package/src/models/prop-value/category-list.ts +0 -11
  118. package/src/models/prop-value/category.ts +0 -6
  119. package/src/models/prop-value/link.ts +0 -22
  120. package/src/models/prop-value/product-list.ts +0 -29
  121. package/src/models/prop-value/product.ts +0 -7
  122. package/src/models/prop-value/raffle-list.ts +0 -6
  123. package/src/models/prop-value/raffle.ts +0 -6
  124. package/src/models/ui/blog-category-list/index.ts +0 -19
  125. package/src/models/ui/blog-category-list/init.ts +0 -54
  126. package/src/models/ui/blog-list/index.ts +0 -21
  127. package/src/models/ui/blog-list/init.ts +0 -49
  128. package/src/models/ui/brand-list/index.ts +0 -25
  129. package/src/models/ui/brand-list/init.ts +0 -47
  130. package/src/models/ui/category-list/index.ts +0 -25
  131. package/src/models/ui/category-list/init.ts +0 -50
  132. package/src/models/ui/component-renderer/index.ts +0 -5
  133. package/src/models/ui/customer-review-list/index.ts +0 -12
  134. package/src/models/ui/customer-review-list/init.ts +0 -33
  135. package/src/models/ui/customer-review-summary-list/index.ts +0 -12
  136. package/src/models/ui/customer-review-summary-list/init.ts +0 -33
  137. package/src/models/ui/navigation-link/index.ts +0 -7
  138. package/src/models/ui/product-attribute-detail/index.ts +0 -7
  139. package/src/models/ui/product-attribute-list/index.ts +0 -7
  140. package/src/models/ui/product-list/index.ts +0 -80
  141. package/src/models/ui/product-list/init.ts +0 -407
  142. package/src/models/ui/raffle-list/index.ts +0 -17
  143. package/src/models/ui/raffle-list/init.ts +0 -44
  144. package/src/providers/helpers/raffle.ts +0 -69
  145. package/src/providers/page-data-get.ts +0 -708
  146. package/src/providers/placeholders.ts +0 -138
  147. package/src/providers/prop-value/attribute-list.ts +0 -75
  148. package/src/providers/prop-value/attribute.ts +0 -77
  149. package/src/providers/prop-value/blog-category-list.ts +0 -29
  150. package/src/providers/prop-value/blog-category.ts +0 -49
  151. package/src/providers/prop-value/blog-list.ts +0 -61
  152. package/src/providers/prop-value/blog.ts +0 -41
  153. package/src/providers/prop-value/boolean.ts +0 -14
  154. package/src/providers/prop-value/brand-list.ts +0 -30
  155. package/src/providers/prop-value/brand.ts +0 -46
  156. package/src/providers/prop-value/category-list.ts +0 -31
  157. package/src/providers/prop-value/category.ts +0 -45
  158. package/src/providers/prop-value/color.ts +0 -14
  159. package/src/providers/prop-value/custom.ts +0 -560
  160. package/src/providers/prop-value/image-list.ts +0 -16
  161. package/src/providers/prop-value/image.ts +0 -16
  162. package/src/providers/prop-value/link.ts +0 -259
  163. package/src/providers/prop-value/product-detail.ts +0 -92
  164. package/src/providers/prop-value/product-list.ts +0 -124
  165. package/src/providers/prop-value/raffle-list.ts +0 -20
  166. package/src/providers/prop-value/raffle.ts +0 -41
  167. package/src/providers/prop-value/rich-text.ts +0 -14
  168. package/src/providers/prop-value/slider.ts +0 -19
  169. package/src/providers/prop-value/text.ts +0 -14
  170. package/src/providers/types.ts +0 -88
@@ -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 * from "./models/ui";
18
-
19
- export { IkasPageDataProvider } from "./providers/page-data-get";
20
- export * from "./providers/types";
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,6 @@
1
+ export declare type IkasAttributeListPropValue = {
2
+ attributeIds?: string[] | null;
3
+ productId?: string | null;
4
+ variantId?: string | null;
5
+ usePageData?: boolean | null;
6
+ };
@@ -0,0 +1,6 @@
1
+ export declare type IkasAttributePropValue = {
2
+ attributeId?: string | null;
3
+ productId?: string | null;
4
+ variantId?: string | null;
5
+ usePageData?: boolean | null;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { IkasBlogCategoryListType } from "../ui";
2
+ export declare type IkasBlogCategoryListPropValue = {
3
+ blogCategoryListType: IkasBlogCategoryListType;
4
+ initialLimit?: number | null;
5
+ blogCategoryIds?: string[] | null;
6
+ };
@@ -0,0 +1,4 @@
1
+ export declare type IkasBlogCategoryPropValue = {
2
+ blogCategoryId?: string | null;
3
+ usePageData?: boolean | null;
4
+ };
@@ -0,0 +1,8 @@
1
+ import { IkasBlogListType } from "../ui";
2
+ export declare type IkasBlogListPropValue = {
3
+ blogListType: IkasBlogListType;
4
+ initialLimit?: number | null;
5
+ blogIds?: string[] | null;
6
+ categoryId: string | null;
7
+ usePageFilter?: boolean | null;
8
+ };
@@ -0,0 +1,4 @@
1
+ export declare type IkasBlogPropValue = {
2
+ blogId?: string | null;
3
+ usePageData?: boolean | null;
4
+ };
@@ -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,4 @@
1
+ export declare class IkasBrandPropValue {
2
+ brandId?: string | null;
3
+ usePageData?: boolean | null;
4
+ }
@@ -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,4 @@
1
+ export declare type IkasCategoryPropValue = {
2
+ categoryId?: string | null;
3
+ usePageData?: boolean | null;
4
+ };
@@ -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,5 @@
1
+ export declare type IkasProductPropValue = {
2
+ productId?: string | null;
3
+ variantId?: string | null;
4
+ usePageData?: boolean | null;
5
+ };
@@ -0,0 +1,4 @@
1
+ export declare type IkasRaffleListPropValue = {
2
+ initialLimit?: number | null;
3
+ raffleIds?: string[] | null;
4
+ };
@@ -0,0 +1,4 @@
1
+ export declare type IkasRafflePropValue = {
2
+ raffleId?: string | null;
3
+ usePageData?: boolean | null;
4
+ };
@@ -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,2 @@
1
+ import { IkasBlogCategoryList } from ".";
2
+ export declare function getInitial(list: IkasBlogCategoryList): Promise<void>;
@@ -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,2 @@
1
+ import { IkasBlogList } from ".";
2
+ export declare function getInitial(list: IkasBlogList): Promise<void>;
@@ -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,2 @@
1
+ import { IkasBrandList } from ".";
2
+ export declare function getInitial(list: IkasBrandList): Promise<void>;
@@ -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,2 @@
1
+ import { IkasCategoryList } from ".";
2
+ export declare function getInitial(list: IkasCategoryList): Promise<void>;
@@ -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,6 @@
1
+ /// <reference types="react" />
2
+ declare type RenderFunction = () => React.ReactNode;
3
+ export declare type IkasComponentRenderer = {
4
+ render: RenderFunction;
5
+ };
6
+ export {};
@@ -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,2 @@
1
+ import { IkasCustomerReviewList } from ".";
2
+ export declare function getInitial(list: IkasCustomerReviewList): Promise<void>;
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ import { IkasCustomerReviewSummaryList } from ".";
2
+ export declare function getInitial(list: IkasCustomerReviewSummaryList): Promise<void>;
@@ -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,7 @@
1
+ export declare type IkasNavigationLink = {
2
+ href: string;
3
+ label: string;
4
+ subLinks: IkasNavigationLink[];
5
+ isExternal?: boolean | null;
6
+ itemId?: string;
7
+ };
@@ -0,0 +1,6 @@
1
+ import { IkasProduct } from "@ikas/storefront-models";
2
+ import { IkasAttributePropValue } from "../../prop-value/attribute";
3
+ export declare type IkasProductAttributeDetail = {
4
+ productDetail: IkasProduct | null;
5
+ attributePropValue: IkasAttributePropValue;
6
+ };
@@ -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,64 @@
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
+ DEFAULT = "DEFAULT"
46
+ }
47
+ export declare enum IkasRelatedProductsType {
48
+ CATEGORY = "CATEGORY",
49
+ BRAND = "BRAND"
50
+ }
51
+ export declare enum IkasProductSearchShowStockOption {
52
+ HIDE_OUT_OF_STOCK = "HIDE_OUT_OF_STOCK",
53
+ SHOW_ALL = "SHOW_ALL",
54
+ SHOW_OUT_OF_STOCK_AT_END = "SHOW_OUT_OF_STOCK_AT_END"
55
+ }
56
+ export declare type Facet = {
57
+ id: string;
58
+ values: FacetValue[];
59
+ };
60
+ export declare type FacetValue = {
61
+ id: string;
62
+ count: number;
63
+ };
64
+ 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",E.DEFAULT="DEFAULT"}(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,2 @@
1
+ import { IkasProductList } from "../product-list";
2
+ export declare function getInitial(list: IkasProductList, isInfiteScrollReturn?: boolean): Promise<true | undefined>;
@@ -0,0 +1 @@
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 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 e(this,void 0,void 0,(function(){var e,v,p,I,T,y,g;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)&&[o.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=a?i.page:1,p=i.limit,!function(e){return e.type===o.ALL||e.type===o.CATEGORY}(i)||i.filters?[3,3]:[4,D(i)];case 2:t.sent(),t.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(e){return e.type===o.DISCOUNTED}(i))v=1,p=10;else if(function(e){return e.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=t.sent())&&i.fetchRequestTime===e?(T=[],E(i)?[2]:(C(i)?(y=i.productListPropValue.productIds||[],T=(null==y?void 0:y.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})),o=null==n?void 0:n.variants.find((function(t){return t.id===e.variantId}));if((null==o?void 0:o.isActive)||(o=null==n?void 0:n.variants.find((function(e){return e.isActive}))),n&&o)return r(r({},n),{selectedVariantValues:o.variantValues})})).filter((function(e){return!!e})))||[]):T=(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,o,a=null==t?void 0:t.find((function(t){return t.id===e.id}));a?null===(r=e.values)||void 0===r||r.forEach((function(t){var r=a.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===(o=e.values)||void 0===o||o.forEach((function(e){return e.resultCount=0}))}));var o=null==t?void 0:t.find((function(e){return"category"===e.id}));o&&(null===(i=e.filterCategories)||void 0===i||i.forEach((function(e){var t=o.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=T,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=t.sent(),console.error(g),[3,6];case 6:return[2]}}))}))}function C(e){return e.type===o.STATIC}function E(e){return e.type===o.LAST_VIEWED}function S(e){return e.type===o.SEARCH}function A(r,n,c,I){var E,A,D;return e(this,void 0,void 0,(function(){var e,T,y,g,R;return t(this,(function(t){switch(t.label){case 0:return e=[],T=[],y=d.getValueList,null===(E=r.filters)||void 0===E||E.forEach((function(t){var r=y(t);r.length&&e.push({id:t.id,type:t.type,displayType:t.displayType,valueList:r}),t.isFacetFilter&&T.push({id:t.id,type:t.type,displayType:t.displayType})})),g=null===(A=r.filterCategories)||void 0===A?void 0:A.filter((function(e){return e.isSelected})).map((function(e){return e.id})),R=function(e){var t,r;switch(e.sort){case u.INCREASING_PRICE:t=f.ASC,r=v.PRICE;break;case u.DECREASING_PRICE:t=f.DESC,r=v.PRICE;break;case u.FIRST_ADDED:t=f.ASC,r=v.CREATED_AT;break;case u.LAST_ADDED:t=f.DESC,r=v.CREATED_AT;break;case u.INCREASING_DISCOUNT:t=f.ASC,r=v.DISCOUNT_RATIO;break;case u.DECRASING_DISCOUNT:t=f.DESC,r=v.DISCOUNT_RATIO;break;case u.FEATURED:if(S(e))return;t=f.ASC,r=v.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===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,t.sent()];case 2:return[4,s({input:{page:n,perPage:c,productIdList:C(r)?null===(D=r.productListPropValue.productIds)||void 0===D?void 0:D.map((function(e){return e.productId})):I,filterList:e,facetList:T,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?[]:R?[R]:[],locale:p.getCurrentLocale(),showStockOption:p.getStockPreference()||a.SHOW_ALL}})]}}))}))}function D(r){var n,o,a;return e(this,void 0,void 0,(function(){var e,u;return t(this,(function(t){switch(t.label){case 0:return[4,c({categoryId:r.filterCategoryId?r.filterCategoryId:void 0})];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===(o=null==e?void 0:e.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(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{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,2 @@
1
+ import { IkasRaffleList } from ".";
2
+ export declare function getInitial(list: IkasRaffleList): Promise<void>;
@@ -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,2 @@
1
+ import { IkasRaffle } from "@ikas/storefront-models";
2
+ export declare const populateRaffleProducts: (raffles: IkasRaffle[]) => Promise<void>;
@@ -0,0 +1 @@
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";import{IkasStorefrontConfig as o}from"@ikas/storefront-config";var a=function(a){return t(void 0,void 0,void 0,(function(){var t,u,d,e,c,s,f,l,v,p,h;return n(this,(function(n){switch(n.label){case 0:for(t=[],u=0,d=a;u<d.length;u++)e=d[u],null===(p=e.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,locale:o.getCurrentLocale()}})];case 1:return(c=n.sent()).isSuccess&&(s=(null===(h=c.data)||void 0===h?void 0:h.data)||[]).length?(f=s.map((function(t){return t.productOptionSetId})).filter((function(t){return!!t})),[4,r({id:{in:f}})]):[3,3];case 2:l=n.sent(),v=l.data,a.forEach((function(t){var n;null===(n=t.variants)||void 0===n||n.forEach((function(n){var r=s.find((function(t){return n.productId===t.id}));if(r){r.productOptionSet=null==v?void 0:v.find((function(t){return t.id===r.productOptionSetId}));var i=r.variants.find((function(t){return t.isActive&&n.variantId===t.id}))||r.variants[0];t.products.find((function(t){return t.id===r.id}))||(r.selectedVariantValues=i.variantValues,r.variants=r.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.push(r))}}))})),n.label=3;case 3:return[2]}}))}))};export{a 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
+ }