@meaple-com/react-headless-components 3.0.0 → 4.0.0
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/dist/index.cjs +10 -6
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +10 -6
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -270,6 +270,7 @@ var import_react_query4 = require("@meaple-com/react-query");
|
|
|
270
270
|
var ListEventProducts = ({
|
|
271
271
|
children,
|
|
272
272
|
eventId,
|
|
273
|
+
channelId,
|
|
273
274
|
privateToken,
|
|
274
275
|
options
|
|
275
276
|
}) => {
|
|
@@ -278,9 +279,10 @@ var ListEventProducts = ({
|
|
|
278
279
|
privateToken,
|
|
279
280
|
options
|
|
280
281
|
);
|
|
281
|
-
const { data: platformFee } = (0, import_react_query4.usePlatformFee)(
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
const { data: platformFee } = (0, import_react_query4.usePlatformFee)(
|
|
283
|
+
{ eventId, channelId },
|
|
284
|
+
{ enabled: !!eventId && !!channelId }
|
|
285
|
+
);
|
|
284
286
|
const fee = platformFee?.fee ?? 0;
|
|
285
287
|
return children({
|
|
286
288
|
products: data?.products ?? [],
|
|
@@ -306,6 +308,7 @@ var import_react_query6 = require("@meaple-com/react-query");
|
|
|
306
308
|
var ListEventTickets = ({
|
|
307
309
|
children,
|
|
308
310
|
eventId,
|
|
311
|
+
channelId,
|
|
309
312
|
privateToken,
|
|
310
313
|
predecessorIds,
|
|
311
314
|
options
|
|
@@ -316,9 +319,10 @@ var ListEventTickets = ({
|
|
|
316
319
|
predecessorIds,
|
|
317
320
|
options
|
|
318
321
|
);
|
|
319
|
-
const { data: platformFee } = (0, import_react_query6.usePlatformFee)(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
+
const { data: platformFee } = (0, import_react_query6.usePlatformFee)(
|
|
323
|
+
{ eventId, channelId },
|
|
324
|
+
{ enabled: !!eventId && !!channelId }
|
|
325
|
+
);
|
|
322
326
|
const fee = platformFee?.fee ?? 0;
|
|
323
327
|
return children({
|
|
324
328
|
tickets: data?.tickets ?? [],
|
package/dist/index.d.cts
CHANGED
|
@@ -123,10 +123,11 @@ type ListEventProductsProps = {
|
|
|
123
123
|
error: Error | null;
|
|
124
124
|
}) => ReactNode;
|
|
125
125
|
eventId: string;
|
|
126
|
+
channelId: string;
|
|
126
127
|
privateToken?: string | null;
|
|
127
128
|
options?: Parameters<typeof useEventProducts>[2];
|
|
128
129
|
};
|
|
129
|
-
declare const ListEventProducts: ({ children, eventId, privateToken, options, }: ListEventProductsProps) => ReactNode;
|
|
130
|
+
declare const ListEventProducts: ({ children, eventId, channelId, privateToken, options, }: ListEventProductsProps) => ReactNode;
|
|
130
131
|
|
|
131
132
|
type ListEventsProps = {
|
|
132
133
|
children: (props: {
|
|
@@ -148,11 +149,12 @@ type ListEventTicketsProps = {
|
|
|
148
149
|
error: Error | null;
|
|
149
150
|
}) => ReactNode;
|
|
150
151
|
eventId: string;
|
|
152
|
+
channelId: string;
|
|
151
153
|
privateToken?: string | null;
|
|
152
154
|
predecessorIds?: string[];
|
|
153
155
|
options?: Parameters<typeof useEventTickets>[3];
|
|
154
156
|
};
|
|
155
|
-
declare const ListEventTickets: ({ children, eventId, privateToken, predecessorIds, options, }: ListEventTicketsProps) => ReactNode;
|
|
157
|
+
declare const ListEventTickets: ({ children, eventId, channelId, privateToken, predecessorIds, options, }: ListEventTicketsProps) => ReactNode;
|
|
156
158
|
|
|
157
159
|
type SectionType = 'coming_soon' | 'past' | 'awards';
|
|
158
160
|
type ListUserEventsProps = {
|
package/dist/index.d.ts
CHANGED
|
@@ -123,10 +123,11 @@ type ListEventProductsProps = {
|
|
|
123
123
|
error: Error | null;
|
|
124
124
|
}) => ReactNode;
|
|
125
125
|
eventId: string;
|
|
126
|
+
channelId: string;
|
|
126
127
|
privateToken?: string | null;
|
|
127
128
|
options?: Parameters<typeof useEventProducts>[2];
|
|
128
129
|
};
|
|
129
|
-
declare const ListEventProducts: ({ children, eventId, privateToken, options, }: ListEventProductsProps) => ReactNode;
|
|
130
|
+
declare const ListEventProducts: ({ children, eventId, channelId, privateToken, options, }: ListEventProductsProps) => ReactNode;
|
|
130
131
|
|
|
131
132
|
type ListEventsProps = {
|
|
132
133
|
children: (props: {
|
|
@@ -148,11 +149,12 @@ type ListEventTicketsProps = {
|
|
|
148
149
|
error: Error | null;
|
|
149
150
|
}) => ReactNode;
|
|
150
151
|
eventId: string;
|
|
152
|
+
channelId: string;
|
|
151
153
|
privateToken?: string | null;
|
|
152
154
|
predecessorIds?: string[];
|
|
153
155
|
options?: Parameters<typeof useEventTickets>[3];
|
|
154
156
|
};
|
|
155
|
-
declare const ListEventTickets: ({ children, eventId, privateToken, predecessorIds, options, }: ListEventTicketsProps) => ReactNode;
|
|
157
|
+
declare const ListEventTickets: ({ children, eventId, channelId, privateToken, predecessorIds, options, }: ListEventTicketsProps) => ReactNode;
|
|
156
158
|
|
|
157
159
|
type SectionType = 'coming_soon' | 'past' | 'awards';
|
|
158
160
|
type ListUserEventsProps = {
|
package/dist/index.js
CHANGED
|
@@ -236,6 +236,7 @@ import { useEventProducts, usePlatformFee } from "@meaple-com/react-query";
|
|
|
236
236
|
var ListEventProducts = ({
|
|
237
237
|
children,
|
|
238
238
|
eventId,
|
|
239
|
+
channelId,
|
|
239
240
|
privateToken,
|
|
240
241
|
options
|
|
241
242
|
}) => {
|
|
@@ -244,9 +245,10 @@ var ListEventProducts = ({
|
|
|
244
245
|
privateToken,
|
|
245
246
|
options
|
|
246
247
|
);
|
|
247
|
-
const { data: platformFee } = usePlatformFee(
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
const { data: platformFee } = usePlatformFee(
|
|
249
|
+
{ eventId, channelId },
|
|
250
|
+
{ enabled: !!eventId && !!channelId }
|
|
251
|
+
);
|
|
250
252
|
const fee = platformFee?.fee ?? 0;
|
|
251
253
|
return children({
|
|
252
254
|
products: data?.products ?? [],
|
|
@@ -272,6 +274,7 @@ import { useEventTickets, usePlatformFee as usePlatformFee2 } from "@meaple-com/
|
|
|
272
274
|
var ListEventTickets = ({
|
|
273
275
|
children,
|
|
274
276
|
eventId,
|
|
277
|
+
channelId,
|
|
275
278
|
privateToken,
|
|
276
279
|
predecessorIds,
|
|
277
280
|
options
|
|
@@ -282,9 +285,10 @@ var ListEventTickets = ({
|
|
|
282
285
|
predecessorIds,
|
|
283
286
|
options
|
|
284
287
|
);
|
|
285
|
-
const { data: platformFee } = usePlatformFee2(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
const { data: platformFee } = usePlatformFee2(
|
|
289
|
+
{ eventId, channelId },
|
|
290
|
+
{ enabled: !!eventId && !!channelId }
|
|
291
|
+
);
|
|
288
292
|
const fee = platformFee?.fee ?? 0;
|
|
289
293
|
return children({
|
|
290
294
|
tickets: data?.tickets ?? [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meaple-com/react-headless-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Headless React components for Meaple SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@eslint/js": "^9.36.0",
|
|
35
|
-
"@meaple-com/react-query": "^
|
|
35
|
+
"@meaple-com/react-query": "^2.0.0",
|
|
36
36
|
"@types/react": "^19.0.0",
|
|
37
37
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
38
38
|
"@typescript-eslint/parser": "^7.18.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"rimraf": "^5.0.5"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@meaple-com/react-query": "^
|
|
47
|
+
"@meaple-com/react-query": "^2.0.0",
|
|
48
48
|
"react": "^19.2.4"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|