@ikas/storefront-providers 4.0.0-alpha.29 → 4.0.0-alpha.30
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-providers",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.30",
|
|
4
4
|
"description": "Data providers for ikas storefront theme components.",
|
|
5
5
|
"author": "Umut Ozan Yıldırım",
|
|
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.0.0-alpha.
|
|
21
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
22
|
-
"@ikas/storefront-model-functions": "^4.0.0-alpha.
|
|
23
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
20
|
+
"@ikas/storefront-api": "^4.0.0-alpha.30",
|
|
21
|
+
"@ikas/storefront-config": "^4.0.0-alpha.30",
|
|
22
|
+
"@ikas/storefront-model-functions": "^4.0.0-alpha.30",
|
|
23
|
+
"@ikas/storefront-models": "^4.0.0-alpha.30",
|
|
24
24
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
25
25
|
"@types/lodash": "^4.14.168",
|
|
26
26
|
"@types/react": "^16.9.55",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"mobx": "^6.1.3",
|
|
40
|
-
"@ikas/storefront-api": "^4.0.0-alpha.
|
|
41
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
42
|
-
"@ikas/storefront-model-functions": "^4.0.0-alpha.
|
|
43
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
40
|
+
"@ikas/storefront-api": "^4.0.0-alpha.30",
|
|
41
|
+
"@ikas/storefront-config": "^4.0.0-alpha.30",
|
|
42
|
+
"@ikas/storefront-model-functions": "^4.0.0-alpha.30",
|
|
43
|
+
"@ikas/storefront-models": "^4.0.0-alpha.30",
|
|
44
44
|
"lodash": "^4.17.20"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { listStorefrontRaffle } from "@ikas/storefront-api";
|
|
2
2
|
import { IkasRaffleList } from ".";
|
|
3
3
|
import { populateRaffleProducts } from "../../../providers/helpers/raffle";
|
|
4
4
|
|
|
@@ -25,7 +25,7 @@ async function getRaffleList(
|
|
|
25
25
|
page: number,
|
|
26
26
|
limit: number
|
|
27
27
|
) {
|
|
28
|
-
const response = await
|
|
28
|
+
const response = await listStorefrontRaffle({
|
|
29
29
|
start: list.start ? { eq: list.start } : undefined,
|
|
30
30
|
end: list.end ? { eq: list.end } : undefined,
|
|
31
31
|
includeDeleted: list.includeDeleted || false,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
listHTMLMetaData,
|
|
63
63
|
listMerchantSettings,
|
|
64
64
|
listProductOptionSet,
|
|
65
|
-
|
|
65
|
+
listStorefrontRaffle,
|
|
66
66
|
listRaffleMetaData,
|
|
67
67
|
searchProducts,
|
|
68
68
|
} from "@ikas/storefront-api";
|
|
@@ -92,14 +92,13 @@ export class IkasPageDataProvider {
|
|
|
92
92
|
constructor(
|
|
93
93
|
theme: IkasThemeJson,
|
|
94
94
|
pageParams?: Record<string, any>,
|
|
95
|
-
pageType?: IkasThemeJsonPageType
|
|
96
|
-
isEditor?: boolean
|
|
95
|
+
pageType?: IkasThemeJsonPageType
|
|
97
96
|
) {
|
|
98
97
|
this.theme = theme;
|
|
99
98
|
this.pageParams = pageParams || {};
|
|
100
99
|
this.pageType = pageType;
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
makeAutoObservable(this);
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
get page(): IkasThemeJsonPage | undefined {
|
|
@@ -379,7 +378,7 @@ export class IkasPageDataProvider {
|
|
|
379
378
|
};
|
|
380
379
|
|
|
381
380
|
const handleRafflePage = async () => {
|
|
382
|
-
const response = await
|
|
381
|
+
const response = await listStorefrontRaffle({
|
|
383
382
|
id: { eq: metaData.targetId },
|
|
384
383
|
});
|
|
385
384
|
|
|
@@ -112,13 +112,11 @@ export function getPlaceholderRaffle(): IkasRaffle {
|
|
|
112
112
|
dateRange: null,
|
|
113
113
|
metadata: null,
|
|
114
114
|
name: "",
|
|
115
|
-
participantCount: null,
|
|
116
115
|
requiredCustomerAccount: false,
|
|
117
116
|
status: false,
|
|
118
117
|
variants: [],
|
|
119
118
|
products: [],
|
|
120
119
|
verificationType: IkasRaffleVerificationType.EMAIL,
|
|
121
|
-
isCustomerWinner: false,
|
|
122
120
|
};
|
|
123
121
|
}
|
|
124
122
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { listStorefrontRaffle } from "@ikas/storefront-api";
|
|
2
2
|
import IkasPropValueProvider from ".";
|
|
3
3
|
import { IkasRafflePropValue } from "../../models/prop-value/raffle";
|
|
4
4
|
import { populateRaffleProducts } from "../helpers/raffle";
|
|
@@ -23,7 +23,7 @@ export class IkasRafflePropValueProvider
|
|
|
23
23
|
}
|
|
24
24
|
if (!this.rafflePropValue.raffleId) return null;
|
|
25
25
|
|
|
26
|
-
const rafflesResponse = await
|
|
26
|
+
const rafflesResponse = await listStorefrontRaffle({
|
|
27
27
|
id: { eq: this.rafflePropValue.raffleId },
|
|
28
28
|
});
|
|
29
29
|
|