@btst/stack 5.0.0 → 5.1.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/api/index.d.cts +2 -2
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/packages/stack/src/plugins/cms/api/getters.cjs +142 -6
- package/dist/packages/stack/src/plugins/cms/api/getters.mjs +139 -8
- package/dist/packages/stack/src/plugins/cms/api/operations.cjs +67 -61
- package/dist/packages/stack/src/plugins/cms/api/operations.mjs +69 -63
- package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +26 -8
- package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +27 -9
- package/dist/packages/stack/src/plugins/cms/api/query-key-defs.cjs +15 -1
- package/dist/packages/stack/src/plugins/cms/api/query-key-defs.mjs +14 -2
- package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.cjs +45 -24
- package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.mjs +45 -24
- package/dist/packages/stack/src/plugins/cms/schemas.cjs +22 -0
- package/dist/packages/stack/src/plugins/cms/schemas.mjs +20 -1
- package/dist/plugins/api/index.d.cts +2 -2
- package/dist/plugins/api/index.d.mts +2 -2
- package/dist/plugins/api/index.d.ts +2 -2
- package/dist/plugins/blog/api/index.d.cts +2 -2
- package/dist/plugins/blog/api/index.d.mts +2 -2
- package/dist/plugins/blog/api/index.d.ts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +2 -2
- package/dist/plugins/blog/client/index.d.mts +2 -2
- package/dist/plugins/blog/client/index.d.ts +2 -2
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/plugins/client/index.d.cts +2 -2
- package/dist/plugins/client/index.d.mts +2 -2
- package/dist/plugins/client/index.d.ts +2 -2
- package/dist/plugins/cms/api/index.cjs +1 -0
- package/dist/plugins/cms/api/index.d.cts +43 -11
- package/dist/plugins/cms/api/index.d.mts +43 -11
- package/dist/plugins/cms/api/index.d.ts +43 -11
- package/dist/plugins/cms/api/index.mjs +1 -1
- package/dist/plugins/cms/client/hooks/index.d.cts +90 -45
- package/dist/plugins/cms/client/hooks/index.d.mts +90 -45
- package/dist/plugins/cms/client/hooks/index.d.ts +90 -45
- package/dist/plugins/cms/client/index.d.cts +2 -1
- package/dist/plugins/cms/client/index.d.mts +2 -1
- package/dist/plugins/cms/client/index.d.ts +2 -1
- package/dist/plugins/cms/query-keys.cjs +69 -13
- package/dist/plugins/cms/query-keys.d.cts +89 -212
- package/dist/plugins/cms/query-keys.d.mts +89 -212
- package/dist/plugins/cms/query-keys.d.ts +89 -212
- package/dist/plugins/cms/query-keys.mjs +70 -14
- package/dist/plugins/kanban/client/index.d.cts +1 -1
- package/dist/plugins/kanban/client/index.d.mts +1 -1
- package/dist/plugins/kanban/client/index.d.ts +1 -1
- package/dist/plugins/route-docs/client/index.d.cts +1 -1
- package/dist/plugins/route-docs/client/index.d.mts +1 -1
- package/dist/plugins/route-docs/client/index.d.ts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.cts +3 -3
- package/dist/plugins/ui-builder/client/hooks/index.d.mts +3 -3
- package/dist/plugins/ui-builder/client/hooks/index.d.ts +3 -3
- package/dist/plugins/ui-builder/client/index.d.cts +3 -3
- package/dist/plugins/ui-builder/client/index.d.mts +3 -3
- package/dist/plugins/ui-builder/client/index.d.ts +3 -3
- package/dist/plugins/ui-builder/query-keys.d.cts +4 -3
- package/dist/plugins/ui-builder/query-keys.d.mts +4 -3
- package/dist/plugins/ui-builder/query-keys.d.ts +4 -3
- package/dist/shared/{stack.DMj68qY0.d.mts → stack.B2jlVVhD.d.mts} +5 -5
- package/dist/shared/{stack.Cvnj99cs.d.ts → stack.BB9tubJJ.d.ts} +9 -3
- package/dist/shared/{stack.Bt3WG2yb.d.cts → stack.BWduIMKG.d.cts} +35 -35
- package/dist/shared/stack.Bw09Lg2z.d.ts +1420 -0
- package/dist/shared/{stack.CkEz7vSt.d.mts → stack.C2Pvl-RS.d.mts} +9 -3
- package/dist/shared/{stack.C2l2wd_X.d.ts → stack.Ch9-ppmQ.d.ts} +35 -35
- package/dist/shared/{stack.Ht8mhDj5.d.cts → stack.D17yFglU.d.cts} +5 -5
- package/dist/shared/{stack.CiD115Ov.d.mts → stack.D6fPBfYe.d.mts} +35 -35
- package/dist/shared/stack.DFGj0gb7.d.mts +1420 -0
- package/dist/shared/{stack.pi0FxoEa.d.ts → stack.Dcfg4GNN.d.ts} +5 -5
- package/dist/shared/{stack.3rxARhgS.d.cts → stack.DrB3L7Ih.d.cts} +52 -3
- package/dist/shared/{stack.3rxARhgS.d.mts → stack.DrB3L7Ih.d.mts} +52 -3
- package/dist/shared/{stack.3rxARhgS.d.ts → stack.DrB3L7Ih.d.ts} +52 -3
- package/dist/shared/stack.NNrBKBkM.d.cts +1420 -0
- package/dist/shared/{stack.mRRyZBUg.d.cts → stack.Rb87lHqK.d.cts} +9 -3
- package/package.json +1 -1
- package/src/__tests__/cms-query-keys.test.ts +57 -0
- package/src/plugins/api/index.ts +1 -0
- package/src/plugins/api/operation.ts +16 -3
- package/src/plugins/cms/__tests__/authorization.test.ts +652 -187
- package/src/plugins/cms/__tests__/client-runtime.browser.test.tsx +655 -0
- package/src/plugins/cms/__tests__/content-read.typecheck.ts +351 -0
- package/src/plugins/cms/__tests__/getters.test.ts +286 -0
- package/src/plugins/cms/api/getters.ts +270 -12
- package/src/plugins/cms/api/index.ts +10 -0
- package/src/plugins/cms/api/operations.ts +163 -75
- package/src/plugins/cms/api/plugin.ts +50 -12
- package/src/plugins/cms/api/query-key-defs.ts +29 -2
- package/src/plugins/cms/client/hooks/cms-hooks.tsx +400 -91
- package/src/plugins/cms/client/index.ts +9 -0
- package/src/plugins/cms/query-keys.ts +171 -16
- package/src/plugins/cms/schemas.ts +30 -0
- package/src/plugins/cms/types.ts +49 -2
- package/src/plugins/media/__tests__/identity-partition.test.tsx +26 -16
- package/dist/shared/stack.CAmVUwjV.d.cts +0 -764
- package/dist/shared/stack.CQK02ujt.d.ts +0 -764
- package/dist/shared/stack.D9x1fR5a.d.mts +0 -764
- package/dist/shared/{stack.CKc_Bais.d.cts → stack.Csi-4Mgz.d.cts} +7 -7
- package/dist/shared/{stack.CKc_Bais.d.mts → stack.Csi-4Mgz.d.mts} +7 -7
- package/dist/shared/{stack.CKc_Bais.d.ts → stack.Csi-4Mgz.d.ts} +7 -7
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const schemas = require('../schemas.cjs');
|
|
4
|
+
|
|
5
|
+
function contentReadDiscriminator(options) {
|
|
6
|
+
return {
|
|
7
|
+
...options?.view ? { view: options.view } : {},
|
|
8
|
+
...options?.fields !== void 0 ? { fields: schemas.normalizeContentFields(options.fields) } : {}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function contentReadKey(options) {
|
|
12
|
+
return options?.view || options?.fields !== void 0 ? [contentReadDiscriminator(options)] : [];
|
|
13
|
+
}
|
|
3
14
|
function contentListDiscriminator(params) {
|
|
4
15
|
return {
|
|
16
|
+
...contentReadDiscriminator(params),
|
|
5
17
|
typeSlug: params.typeSlug,
|
|
6
18
|
limit: params.limit ?? 20,
|
|
7
19
|
offset: params.offset ?? 0,
|
|
@@ -23,8 +35,10 @@ const CMS_QUERY_KEYS = {
|
|
|
23
35
|
* Key for the cmsContent.detail(typeSlug, id) query.
|
|
24
36
|
* Full key: ["cmsContent", "detail", typeSlug, id]
|
|
25
37
|
*/
|
|
26
|
-
contentDetail: (typeSlug, id) => ["cmsContent", "detail", typeSlug, id]
|
|
38
|
+
contentDetail: (typeSlug, id, options) => ["cmsContent", "detail", typeSlug, id, ...contentReadKey(options)]
|
|
27
39
|
};
|
|
28
40
|
|
|
29
41
|
exports.CMS_QUERY_KEYS = CMS_QUERY_KEYS;
|
|
30
42
|
exports.contentListDiscriminator = contentListDiscriminator;
|
|
43
|
+
exports.contentReadDiscriminator = contentReadDiscriminator;
|
|
44
|
+
exports.contentReadKey = contentReadKey;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
import { normalizeContentFields } from '../schemas.mjs';
|
|
2
|
+
|
|
3
|
+
function contentReadDiscriminator(options) {
|
|
4
|
+
return {
|
|
5
|
+
...options?.view ? { view: options.view } : {},
|
|
6
|
+
...options?.fields !== void 0 ? { fields: normalizeContentFields(options.fields) } : {}
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function contentReadKey(options) {
|
|
10
|
+
return options?.view || options?.fields !== void 0 ? [contentReadDiscriminator(options)] : [];
|
|
11
|
+
}
|
|
1
12
|
function contentListDiscriminator(params) {
|
|
2
13
|
return {
|
|
14
|
+
...contentReadDiscriminator(params),
|
|
3
15
|
typeSlug: params.typeSlug,
|
|
4
16
|
limit: params.limit ?? 20,
|
|
5
17
|
offset: params.offset ?? 0,
|
|
@@ -21,7 +33,7 @@ const CMS_QUERY_KEYS = {
|
|
|
21
33
|
* Key for the cmsContent.detail(typeSlug, id) query.
|
|
22
34
|
* Full key: ["cmsContent", "detail", typeSlug, id]
|
|
23
35
|
*/
|
|
24
|
-
contentDetail: (typeSlug, id) => ["cmsContent", "detail", typeSlug, id]
|
|
36
|
+
contentDetail: (typeSlug, id, options) => ["cmsContent", "detail", typeSlug, id, ...contentReadKey(options)]
|
|
25
37
|
};
|
|
26
38
|
|
|
27
|
-
export { CMS_QUERY_KEYS, contentListDiscriminator };
|
|
39
|
+
export { CMS_QUERY_KEYS, contentListDiscriminator, contentReadDiscriminator, contentReadKey };
|
|
@@ -38,7 +38,7 @@ function useContentType(slug) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function useContent(typeSlug, options = {}) {
|
|
41
|
-
const { limit = 10, enabled = true, search } = options;
|
|
41
|
+
const { limit = 10, enabled = true, search, view, fields } = options;
|
|
42
42
|
const {
|
|
43
43
|
data,
|
|
44
44
|
isLoading,
|
|
@@ -47,10 +47,15 @@ function useContent(typeSlug, options = {}) {
|
|
|
47
47
|
hasNextPage,
|
|
48
48
|
isFetchingNextPage,
|
|
49
49
|
refetch
|
|
50
|
-
} = cmsResource.cms.cmsContent.list.useInfinite(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
} = cmsResource.cms.cmsContent.list.useInfinite(
|
|
51
|
+
[{ typeSlug, limit, search, view, fields }],
|
|
52
|
+
{
|
|
53
|
+
enabled: enabled && !!typeSlug
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
const { items, total } = flattenPages(
|
|
57
|
+
data?.pages
|
|
58
|
+
);
|
|
54
59
|
return {
|
|
55
60
|
items,
|
|
56
61
|
total,
|
|
@@ -63,9 +68,13 @@ function useContent(typeSlug, options = {}) {
|
|
|
63
68
|
};
|
|
64
69
|
}
|
|
65
70
|
function useSuspenseContent(typeSlug, options = {}) {
|
|
66
|
-
const { limit = 10, search } = options;
|
|
67
|
-
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch } = cmsResource.cms.cmsContent.list.useSuspenseInfinite([
|
|
68
|
-
|
|
71
|
+
const { limit = 10, search, view, fields } = options;
|
|
72
|
+
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch } = cmsResource.cms.cmsContent.list.useSuspenseInfinite([
|
|
73
|
+
{ typeSlug, limit, search, view, fields }
|
|
74
|
+
]);
|
|
75
|
+
const { items, total } = flattenPages(
|
|
76
|
+
data.pages
|
|
77
|
+
);
|
|
69
78
|
return {
|
|
70
79
|
items,
|
|
71
80
|
total,
|
|
@@ -75,9 +84,9 @@ function useSuspenseContent(typeSlug, options = {}) {
|
|
|
75
84
|
refetch
|
|
76
85
|
};
|
|
77
86
|
}
|
|
78
|
-
function useContentItem(typeSlug, id) {
|
|
87
|
+
function useContentItem(typeSlug, id, options) {
|
|
79
88
|
const { data, isLoading, error, refetch } = cmsResource.cms.cmsContent.detail.use(
|
|
80
|
-
[typeSlug, id],
|
|
89
|
+
[typeSlug, id, options],
|
|
81
90
|
{ enabled: !!typeSlug && !!id }
|
|
82
91
|
);
|
|
83
92
|
return {
|
|
@@ -87,16 +96,20 @@ function useContentItem(typeSlug, id) {
|
|
|
87
96
|
refetch
|
|
88
97
|
};
|
|
89
98
|
}
|
|
90
|
-
function useSuspenseContentItem(typeSlug, id) {
|
|
91
|
-
const { data, refetch } = cmsResource.cms.cmsContent.detail.useSuspense([
|
|
99
|
+
function useSuspenseContentItem(typeSlug, id, options) {
|
|
100
|
+
const { data, refetch } = cmsResource.cms.cmsContent.detail.useSuspense([
|
|
101
|
+
typeSlug,
|
|
102
|
+
id,
|
|
103
|
+
options
|
|
104
|
+
]);
|
|
92
105
|
return {
|
|
93
106
|
item: data ?? null,
|
|
94
107
|
refetch
|
|
95
108
|
};
|
|
96
109
|
}
|
|
97
|
-
function useContentItemBySlug(typeSlug, slug) {
|
|
110
|
+
function useContentItemBySlug(typeSlug, slug, options) {
|
|
98
111
|
const { data, isLoading, error, refetch } = cmsResource.cms.cmsContent.bySlug.use(
|
|
99
|
-
[typeSlug, slug],
|
|
112
|
+
[typeSlug, slug, options],
|
|
100
113
|
{ enabled: !!typeSlug && !!slug }
|
|
101
114
|
);
|
|
102
115
|
return {
|
|
@@ -151,14 +164,14 @@ function useContentItemForm(config) {
|
|
|
151
164
|
);
|
|
152
165
|
}
|
|
153
166
|
function useContentOptions(config) {
|
|
154
|
-
const { targetType, value, getOptionLabel } = config;
|
|
167
|
+
const { targetType, value, getOptionLabel, view, fields } = config;
|
|
155
168
|
return cmsResource.cms.cmsContent.useSelect({
|
|
156
169
|
query: "options",
|
|
157
|
-
searchArgs: (search) => [{ typeSlug: targetType, search }],
|
|
170
|
+
searchArgs: (search) => [{ typeSlug: targetType, search, view, fields }],
|
|
158
171
|
getOptionValue: (item) => item.id,
|
|
159
172
|
getOptionLabel,
|
|
160
173
|
value,
|
|
161
|
-
preload: { args: (id) => [targetType, id] },
|
|
174
|
+
preload: { args: (id) => [targetType, id, { view, fields }] },
|
|
162
175
|
enabled: !!targetType
|
|
163
176
|
});
|
|
164
177
|
}
|
|
@@ -185,7 +198,7 @@ function useSuspenseContentItemPopulated(typeSlug, id) {
|
|
|
185
198
|
};
|
|
186
199
|
}
|
|
187
200
|
function useContentByRelation(typeSlug, fieldName, targetId, options = {}) {
|
|
188
|
-
const { limit = 20, enabled = true } = options;
|
|
201
|
+
const { limit = 20, enabled = true, view, fields } = options;
|
|
189
202
|
const {
|
|
190
203
|
data,
|
|
191
204
|
isLoading,
|
|
@@ -195,10 +208,12 @@ function useContentByRelation(typeSlug, fieldName, targetId, options = {}) {
|
|
|
195
208
|
isFetchingNextPage,
|
|
196
209
|
refetch
|
|
197
210
|
} = cmsResource.cms.cmsContent.byRelation.useInfinite(
|
|
198
|
-
[{ typeSlug, field: fieldName, targetId, limit }],
|
|
211
|
+
[{ typeSlug, field: fieldName, targetId, limit, view, fields }],
|
|
199
212
|
{ enabled: enabled && !!typeSlug && !!fieldName && !!targetId }
|
|
200
213
|
);
|
|
201
|
-
const { items, total } = flattenPages(
|
|
214
|
+
const { items, total } = flattenPages(
|
|
215
|
+
data?.pages
|
|
216
|
+
);
|
|
202
217
|
return {
|
|
203
218
|
items,
|
|
204
219
|
total,
|
|
@@ -211,11 +226,13 @@ function useContentByRelation(typeSlug, fieldName, targetId, options = {}) {
|
|
|
211
226
|
};
|
|
212
227
|
}
|
|
213
228
|
function useSuspenseContentByRelation(typeSlug, fieldName, targetId, options = {}) {
|
|
214
|
-
const { limit = 20 } = options;
|
|
229
|
+
const { limit = 20, view, fields } = options;
|
|
215
230
|
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch } = cmsResource.cms.cmsContent.byRelation.useSuspenseInfinite([
|
|
216
|
-
{ typeSlug, field: fieldName, targetId, limit }
|
|
231
|
+
{ typeSlug, field: fieldName, targetId, limit, view, fields }
|
|
217
232
|
]);
|
|
218
|
-
const { items, total } = flattenPages(
|
|
233
|
+
const { items, total } = flattenPages(
|
|
234
|
+
data.pages
|
|
235
|
+
);
|
|
219
236
|
return {
|
|
220
237
|
items,
|
|
221
238
|
total,
|
|
@@ -244,7 +261,11 @@ function useInverseRelationItems(params, options = {}) {
|
|
|
244
261
|
slug: params.contentTypeSlug,
|
|
245
262
|
sourceType: params.sourceType,
|
|
246
263
|
itemId: params.itemId,
|
|
247
|
-
fieldName: params.fieldName
|
|
264
|
+
fieldName: params.fieldName,
|
|
265
|
+
view: options.view,
|
|
266
|
+
fields: options.fields,
|
|
267
|
+
limit: options.limit,
|
|
268
|
+
offset: options.offset
|
|
248
269
|
}
|
|
249
270
|
],
|
|
250
271
|
{ enabled: options.enabled ?? true }
|
|
@@ -36,7 +36,7 @@ function useContentType(slug) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
function useContent(typeSlug, options = {}) {
|
|
39
|
-
const { limit = 10, enabled = true, search } = options;
|
|
39
|
+
const { limit = 10, enabled = true, search, view, fields } = options;
|
|
40
40
|
const {
|
|
41
41
|
data,
|
|
42
42
|
isLoading,
|
|
@@ -45,10 +45,15 @@ function useContent(typeSlug, options = {}) {
|
|
|
45
45
|
hasNextPage,
|
|
46
46
|
isFetchingNextPage,
|
|
47
47
|
refetch
|
|
48
|
-
} = cms.cmsContent.list.useInfinite(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
} = cms.cmsContent.list.useInfinite(
|
|
49
|
+
[{ typeSlug, limit, search, view, fields }],
|
|
50
|
+
{
|
|
51
|
+
enabled: enabled && !!typeSlug
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
const { items, total } = flattenPages(
|
|
55
|
+
data?.pages
|
|
56
|
+
);
|
|
52
57
|
return {
|
|
53
58
|
items,
|
|
54
59
|
total,
|
|
@@ -61,9 +66,13 @@ function useContent(typeSlug, options = {}) {
|
|
|
61
66
|
};
|
|
62
67
|
}
|
|
63
68
|
function useSuspenseContent(typeSlug, options = {}) {
|
|
64
|
-
const { limit = 10, search } = options;
|
|
65
|
-
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch } = cms.cmsContent.list.useSuspenseInfinite([
|
|
66
|
-
|
|
69
|
+
const { limit = 10, search, view, fields } = options;
|
|
70
|
+
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch } = cms.cmsContent.list.useSuspenseInfinite([
|
|
71
|
+
{ typeSlug, limit, search, view, fields }
|
|
72
|
+
]);
|
|
73
|
+
const { items, total } = flattenPages(
|
|
74
|
+
data.pages
|
|
75
|
+
);
|
|
67
76
|
return {
|
|
68
77
|
items,
|
|
69
78
|
total,
|
|
@@ -73,9 +82,9 @@ function useSuspenseContent(typeSlug, options = {}) {
|
|
|
73
82
|
refetch
|
|
74
83
|
};
|
|
75
84
|
}
|
|
76
|
-
function useContentItem(typeSlug, id) {
|
|
85
|
+
function useContentItem(typeSlug, id, options) {
|
|
77
86
|
const { data, isLoading, error, refetch } = cms.cmsContent.detail.use(
|
|
78
|
-
[typeSlug, id],
|
|
87
|
+
[typeSlug, id, options],
|
|
79
88
|
{ enabled: !!typeSlug && !!id }
|
|
80
89
|
);
|
|
81
90
|
return {
|
|
@@ -85,16 +94,20 @@ function useContentItem(typeSlug, id) {
|
|
|
85
94
|
refetch
|
|
86
95
|
};
|
|
87
96
|
}
|
|
88
|
-
function useSuspenseContentItem(typeSlug, id) {
|
|
89
|
-
const { data, refetch } = cms.cmsContent.detail.useSuspense([
|
|
97
|
+
function useSuspenseContentItem(typeSlug, id, options) {
|
|
98
|
+
const { data, refetch } = cms.cmsContent.detail.useSuspense([
|
|
99
|
+
typeSlug,
|
|
100
|
+
id,
|
|
101
|
+
options
|
|
102
|
+
]);
|
|
90
103
|
return {
|
|
91
104
|
item: data ?? null,
|
|
92
105
|
refetch
|
|
93
106
|
};
|
|
94
107
|
}
|
|
95
|
-
function useContentItemBySlug(typeSlug, slug) {
|
|
108
|
+
function useContentItemBySlug(typeSlug, slug, options) {
|
|
96
109
|
const { data, isLoading, error, refetch } = cms.cmsContent.bySlug.use(
|
|
97
|
-
[typeSlug, slug],
|
|
110
|
+
[typeSlug, slug, options],
|
|
98
111
|
{ enabled: !!typeSlug && !!slug }
|
|
99
112
|
);
|
|
100
113
|
return {
|
|
@@ -149,14 +162,14 @@ function useContentItemForm(config) {
|
|
|
149
162
|
);
|
|
150
163
|
}
|
|
151
164
|
function useContentOptions(config) {
|
|
152
|
-
const { targetType, value, getOptionLabel } = config;
|
|
165
|
+
const { targetType, value, getOptionLabel, view, fields } = config;
|
|
153
166
|
return cms.cmsContent.useSelect({
|
|
154
167
|
query: "options",
|
|
155
|
-
searchArgs: (search) => [{ typeSlug: targetType, search }],
|
|
168
|
+
searchArgs: (search) => [{ typeSlug: targetType, search, view, fields }],
|
|
156
169
|
getOptionValue: (item) => item.id,
|
|
157
170
|
getOptionLabel,
|
|
158
171
|
value,
|
|
159
|
-
preload: { args: (id) => [targetType, id] },
|
|
172
|
+
preload: { args: (id) => [targetType, id, { view, fields }] },
|
|
160
173
|
enabled: !!targetType
|
|
161
174
|
});
|
|
162
175
|
}
|
|
@@ -183,7 +196,7 @@ function useSuspenseContentItemPopulated(typeSlug, id) {
|
|
|
183
196
|
};
|
|
184
197
|
}
|
|
185
198
|
function useContentByRelation(typeSlug, fieldName, targetId, options = {}) {
|
|
186
|
-
const { limit = 20, enabled = true } = options;
|
|
199
|
+
const { limit = 20, enabled = true, view, fields } = options;
|
|
187
200
|
const {
|
|
188
201
|
data,
|
|
189
202
|
isLoading,
|
|
@@ -193,10 +206,12 @@ function useContentByRelation(typeSlug, fieldName, targetId, options = {}) {
|
|
|
193
206
|
isFetchingNextPage,
|
|
194
207
|
refetch
|
|
195
208
|
} = cms.cmsContent.byRelation.useInfinite(
|
|
196
|
-
[{ typeSlug, field: fieldName, targetId, limit }],
|
|
209
|
+
[{ typeSlug, field: fieldName, targetId, limit, view, fields }],
|
|
197
210
|
{ enabled: enabled && !!typeSlug && !!fieldName && !!targetId }
|
|
198
211
|
);
|
|
199
|
-
const { items, total } = flattenPages(
|
|
212
|
+
const { items, total } = flattenPages(
|
|
213
|
+
data?.pages
|
|
214
|
+
);
|
|
200
215
|
return {
|
|
201
216
|
items,
|
|
202
217
|
total,
|
|
@@ -209,11 +224,13 @@ function useContentByRelation(typeSlug, fieldName, targetId, options = {}) {
|
|
|
209
224
|
};
|
|
210
225
|
}
|
|
211
226
|
function useSuspenseContentByRelation(typeSlug, fieldName, targetId, options = {}) {
|
|
212
|
-
const { limit = 20 } = options;
|
|
227
|
+
const { limit = 20, view, fields } = options;
|
|
213
228
|
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch } = cms.cmsContent.byRelation.useSuspenseInfinite([
|
|
214
|
-
{ typeSlug, field: fieldName, targetId, limit }
|
|
229
|
+
{ typeSlug, field: fieldName, targetId, limit, view, fields }
|
|
215
230
|
]);
|
|
216
|
-
const { items, total } = flattenPages(
|
|
231
|
+
const { items, total } = flattenPages(
|
|
232
|
+
data.pages
|
|
233
|
+
);
|
|
217
234
|
return {
|
|
218
235
|
items,
|
|
219
236
|
total,
|
|
@@ -242,7 +259,11 @@ function useInverseRelationItems(params, options = {}) {
|
|
|
242
259
|
slug: params.contentTypeSlug,
|
|
243
260
|
sourceType: params.sourceType,
|
|
244
261
|
itemId: params.itemId,
|
|
245
|
-
fieldName: params.fieldName
|
|
262
|
+
fieldName: params.fieldName,
|
|
263
|
+
view: options.view,
|
|
264
|
+
fields: options.fields,
|
|
265
|
+
limit: options.limit,
|
|
266
|
+
offset: options.offset
|
|
246
267
|
}
|
|
247
268
|
],
|
|
248
269
|
{ enabled: options.enabled ?? true }
|
|
@@ -2,9 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
const z = require('zod');
|
|
4
4
|
|
|
5
|
+
function normalizeContentFields(fields) {
|
|
6
|
+
return fields === void 0 ? void 0 : [...new Set(fields)].sort();
|
|
7
|
+
}
|
|
5
8
|
const DEFAULT_MAX_PAGE_SIZE = 1e3;
|
|
9
|
+
const contentReadOptionsSchema = z.z.object({
|
|
10
|
+
view: z.z.literal("content").optional(),
|
|
11
|
+
fields: z.z.array(z.z.string()).min(1).transform((fields) => normalizeContentFields(fields)).optional()
|
|
12
|
+
});
|
|
13
|
+
const contentReadQuerySchema = contentReadOptionsSchema.extend({
|
|
14
|
+
fields: z.z.preprocess((value) => {
|
|
15
|
+
if (value === void 0) return void 0;
|
|
16
|
+
if (typeof value !== "string") return z.z.NEVER;
|
|
17
|
+
try {
|
|
18
|
+
return JSON.parse(value);
|
|
19
|
+
} catch {
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
}, contentReadOptionsSchema.shape.fields)
|
|
23
|
+
});
|
|
6
24
|
function createListContentQuerySchema(maxPageSize = DEFAULT_MAX_PAGE_SIZE) {
|
|
7
25
|
return z.z.object({
|
|
26
|
+
...contentReadOptionsSchema.shape,
|
|
8
27
|
slug: z.z.string().optional(),
|
|
9
28
|
search: z.z.string().max(200).optional(),
|
|
10
29
|
limit: z.z.coerce.number().min(1).max(maxPageSize).optional().default(20),
|
|
@@ -55,5 +74,8 @@ z.z.object({
|
|
|
55
74
|
exports.DEFAULT_MAX_PAGE_SIZE = DEFAULT_MAX_PAGE_SIZE;
|
|
56
75
|
exports.contentItemResponseSchema = contentItemResponseSchema;
|
|
57
76
|
exports.contentItemWithDataResponseSchema = contentItemWithDataResponseSchema;
|
|
77
|
+
exports.contentReadOptionsSchema = contentReadOptionsSchema;
|
|
78
|
+
exports.contentReadQuerySchema = contentReadQuerySchema;
|
|
58
79
|
exports.contentTypeResponseSchema = contentTypeResponseSchema;
|
|
59
80
|
exports.createListContentQuerySchema = createListContentQuerySchema;
|
|
81
|
+
exports.normalizeContentFields = normalizeContentFields;
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
function normalizeContentFields(fields) {
|
|
4
|
+
return fields === void 0 ? void 0 : [...new Set(fields)].sort();
|
|
5
|
+
}
|
|
3
6
|
const DEFAULT_MAX_PAGE_SIZE = 1e3;
|
|
7
|
+
const contentReadOptionsSchema = z.object({
|
|
8
|
+
view: z.literal("content").optional(),
|
|
9
|
+
fields: z.array(z.string()).min(1).transform((fields) => normalizeContentFields(fields)).optional()
|
|
10
|
+
});
|
|
11
|
+
const contentReadQuerySchema = contentReadOptionsSchema.extend({
|
|
12
|
+
fields: z.preprocess((value) => {
|
|
13
|
+
if (value === void 0) return void 0;
|
|
14
|
+
if (typeof value !== "string") return z.NEVER;
|
|
15
|
+
try {
|
|
16
|
+
return JSON.parse(value);
|
|
17
|
+
} catch {
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
}, contentReadOptionsSchema.shape.fields)
|
|
21
|
+
});
|
|
4
22
|
function createListContentQuerySchema(maxPageSize = DEFAULT_MAX_PAGE_SIZE) {
|
|
5
23
|
return z.object({
|
|
24
|
+
...contentReadOptionsSchema.shape,
|
|
6
25
|
slug: z.string().optional(),
|
|
7
26
|
search: z.string().max(200).optional(),
|
|
8
27
|
limit: z.coerce.number().min(1).max(maxPageSize).optional().default(20),
|
|
@@ -50,4 +69,4 @@ z.object({
|
|
|
50
69
|
offset: z.number()
|
|
51
70
|
});
|
|
52
71
|
|
|
53
|
-
export { DEFAULT_MAX_PAGE_SIZE, contentItemResponseSchema, contentItemWithDataResponseSchema, contentTypeResponseSchema, createListContentQuerySchema };
|
|
72
|
+
export { DEFAULT_MAX_PAGE_SIZE, contentItemResponseSchema, contentItemWithDataResponseSchema, contentReadOptionsSchema, contentReadQuerySchema, contentTypeResponseSchema, createListContentQuerySchema, normalizeContentFields };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OperationRecord, B as BackendPlugin } from '../../shared/stack.
|
|
2
|
-
export { A as AnyOperation, C as ClientPlugin, a as ComposedEndpointInventoryEntry, D as DeepReadonly, I as InfrastructureRouteDeclaration, b as InfrastructureRouteInventory, c as Operation, d as OperationAccess, e as OperationApi, f as
|
|
1
|
+
import { O as OperationRecord, B as BackendPlugin } from '../../shared/stack.Rb87lHqK.cjs';
|
|
2
|
+
export { A as AnyOperation, C as ClientPlugin, a as ComposedEndpointInventoryEntry, D as DeepReadonly, I as InfrastructureRouteDeclaration, b as InfrastructureRouteInventory, c as Operation, d as OperationAccess, e as OperationApi, f as OperationCallSignature, g as OperationContext, h as OperationData, i as OperationErrorContext, j as OperationHttpError, k as OperationPermissionRequest, l as OperationResultMode, m as RouteOperation, n as RouteOperationApi, o as defineOperation, p as definePassthroughOperation } from '../../shared/stack.Rb87lHqK.cjs';
|
|
3
3
|
import { createEndpoint as createEndpoint$1, Endpoint } from 'better-call';
|
|
4
4
|
export { Endpoint, Router, createRouter } from 'better-call';
|
|
5
5
|
export { DBAdapter as Adapter, DatabaseDefinition, DbPlugin, createDbPlugin } from '@btst/db';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OperationRecord, B as BackendPlugin } from '../../shared/stack.
|
|
2
|
-
export { A as AnyOperation, C as ClientPlugin, a as ComposedEndpointInventoryEntry, D as DeepReadonly, I as InfrastructureRouteDeclaration, b as InfrastructureRouteInventory, c as Operation, d as OperationAccess, e as OperationApi, f as
|
|
1
|
+
import { O as OperationRecord, B as BackendPlugin } from '../../shared/stack.C2Pvl-RS.mjs';
|
|
2
|
+
export { A as AnyOperation, C as ClientPlugin, a as ComposedEndpointInventoryEntry, D as DeepReadonly, I as InfrastructureRouteDeclaration, b as InfrastructureRouteInventory, c as Operation, d as OperationAccess, e as OperationApi, f as OperationCallSignature, g as OperationContext, h as OperationData, i as OperationErrorContext, j as OperationHttpError, k as OperationPermissionRequest, l as OperationResultMode, m as RouteOperation, n as RouteOperationApi, o as defineOperation, p as definePassthroughOperation } from '../../shared/stack.C2Pvl-RS.mjs';
|
|
3
3
|
import { createEndpoint as createEndpoint$1, Endpoint } from 'better-call';
|
|
4
4
|
export { Endpoint, Router, createRouter } from 'better-call';
|
|
5
5
|
export { DBAdapter as Adapter, DatabaseDefinition, DbPlugin, createDbPlugin } from '@btst/db';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OperationRecord, B as BackendPlugin } from '../../shared/stack.
|
|
2
|
-
export { A as AnyOperation, C as ClientPlugin, a as ComposedEndpointInventoryEntry, D as DeepReadonly, I as InfrastructureRouteDeclaration, b as InfrastructureRouteInventory, c as Operation, d as OperationAccess, e as OperationApi, f as
|
|
1
|
+
import { O as OperationRecord, B as BackendPlugin } from '../../shared/stack.BB9tubJJ.js';
|
|
2
|
+
export { A as AnyOperation, C as ClientPlugin, a as ComposedEndpointInventoryEntry, D as DeepReadonly, I as InfrastructureRouteDeclaration, b as InfrastructureRouteInventory, c as Operation, d as OperationAccess, e as OperationApi, f as OperationCallSignature, g as OperationContext, h as OperationData, i as OperationErrorContext, j as OperationHttpError, k as OperationPermissionRequest, l as OperationResultMode, m as RouteOperation, n as RouteOperationApi, o as defineOperation, p as definePassthroughOperation } from '../../shared/stack.BB9tubJJ.js';
|
|
3
3
|
import { createEndpoint as createEndpoint$1, Endpoint } from 'better-call';
|
|
4
4
|
export { Endpoint, Router, createRouter } from 'better-call';
|
|
5
5
|
export { DBAdapter as Adapter, DatabaseDefinition, DbPlugin, createDbPlugin } from '@btst/db';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { B as BLOG_QUERY_KEYS, a as BlogApiRouter, b as BlogBackendHooks, c as BlogBackendOptions, d as BlogCreateErrorContext, e as BlogCreateOperationContext, f as BlogCreateResultContext, g as BlogDeleteErrorContext, h as BlogDeleteOperationContext, i as BlogDeleteResultContext, j as BlogListErrorContext, k as BlogListOperationContext, l as BlogListResultContext, m as BlogNextPreviousErrorContext, n as BlogNextPreviousOperationContext, o as BlogNextPreviousResultContext, p as BlogRouteKey, q as BlogUpdateErrorContext, r as BlogUpdateOperationContext, s as BlogUpdateResultContext, C as CreatePostOperationInputSchema, N as NextPreviousPostsQuerySchema, P as PostListParams, t as PostListQuerySchema, u as PostListResult, S as SerializedNextPreviousPostsResult, v as SerializedPostListResult, U as UpdatePostOperationInputSchema, w as blogBackendPlugin, x as createBlogQueryKeys, y as getAllPosts, z as getAllTags, A as getPostBySlug } from '../../../shared/stack.
|
|
1
|
+
export { B as BLOG_QUERY_KEYS, a as BlogApiRouter, b as BlogBackendHooks, c as BlogBackendOptions, d as BlogCreateErrorContext, e as BlogCreateOperationContext, f as BlogCreateResultContext, g as BlogDeleteErrorContext, h as BlogDeleteOperationContext, i as BlogDeleteResultContext, j as BlogListErrorContext, k as BlogListOperationContext, l as BlogListResultContext, m as BlogNextPreviousErrorContext, n as BlogNextPreviousOperationContext, o as BlogNextPreviousResultContext, p as BlogRouteKey, q as BlogUpdateErrorContext, r as BlogUpdateOperationContext, s as BlogUpdateResultContext, C as CreatePostOperationInputSchema, N as NextPreviousPostsQuerySchema, P as PostListParams, t as PostListQuerySchema, u as PostListResult, S as SerializedNextPreviousPostsResult, v as SerializedPostListResult, U as UpdatePostOperationInputSchema, w as blogBackendPlugin, x as createBlogQueryKeys, y as getAllPosts, z as getAllTags, A as getPostBySlug } from '../../../shared/stack.BWduIMKG.cjs';
|
|
2
2
|
import { DBAdapter } from '@btst/db';
|
|
3
3
|
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Dsatjh0B.cjs';
|
|
4
4
|
export { blogPermissions } from '../permissions.cjs';
|
|
5
5
|
import '@btst/stack/plugins/client';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../../../shared/stack.
|
|
7
|
+
import '../../../shared/stack.Csi-4Mgz.cjs';
|
|
8
8
|
import '@btst/stack/plugins/api';
|
|
9
9
|
import '../../../authorization/index.cjs';
|
|
10
10
|
import 'zod/v4/core';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { B as BLOG_QUERY_KEYS, a as BlogApiRouter, b as BlogBackendHooks, c as BlogBackendOptions, d as BlogCreateErrorContext, e as BlogCreateOperationContext, f as BlogCreateResultContext, g as BlogDeleteErrorContext, h as BlogDeleteOperationContext, i as BlogDeleteResultContext, j as BlogListErrorContext, k as BlogListOperationContext, l as BlogListResultContext, m as BlogNextPreviousErrorContext, n as BlogNextPreviousOperationContext, o as BlogNextPreviousResultContext, p as BlogRouteKey, q as BlogUpdateErrorContext, r as BlogUpdateOperationContext, s as BlogUpdateResultContext, C as CreatePostOperationInputSchema, N as NextPreviousPostsQuerySchema, P as PostListParams, t as PostListQuerySchema, u as PostListResult, S as SerializedNextPreviousPostsResult, v as SerializedPostListResult, U as UpdatePostOperationInputSchema, w as blogBackendPlugin, x as createBlogQueryKeys, y as getAllPosts, z as getAllTags, A as getPostBySlug } from '../../../shared/stack.
|
|
1
|
+
export { B as BLOG_QUERY_KEYS, a as BlogApiRouter, b as BlogBackendHooks, c as BlogBackendOptions, d as BlogCreateErrorContext, e as BlogCreateOperationContext, f as BlogCreateResultContext, g as BlogDeleteErrorContext, h as BlogDeleteOperationContext, i as BlogDeleteResultContext, j as BlogListErrorContext, k as BlogListOperationContext, l as BlogListResultContext, m as BlogNextPreviousErrorContext, n as BlogNextPreviousOperationContext, o as BlogNextPreviousResultContext, p as BlogRouteKey, q as BlogUpdateErrorContext, r as BlogUpdateOperationContext, s as BlogUpdateResultContext, C as CreatePostOperationInputSchema, N as NextPreviousPostsQuerySchema, P as PostListParams, t as PostListQuerySchema, u as PostListResult, S as SerializedNextPreviousPostsResult, v as SerializedPostListResult, U as UpdatePostOperationInputSchema, w as blogBackendPlugin, x as createBlogQueryKeys, y as getAllPosts, z as getAllTags, A as getPostBySlug } from '../../../shared/stack.D6fPBfYe.mjs';
|
|
2
2
|
import { DBAdapter } from '@btst/db';
|
|
3
3
|
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Dsatjh0B.mjs';
|
|
4
4
|
export { blogPermissions } from '../permissions.mjs';
|
|
5
5
|
import '@btst/stack/plugins/client';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../../../shared/stack.
|
|
7
|
+
import '../../../shared/stack.Csi-4Mgz.mjs';
|
|
8
8
|
import '@btst/stack/plugins/api';
|
|
9
9
|
import '../../../authorization/index.mjs';
|
|
10
10
|
import 'zod/v4/core';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { B as BLOG_QUERY_KEYS, a as BlogApiRouter, b as BlogBackendHooks, c as BlogBackendOptions, d as BlogCreateErrorContext, e as BlogCreateOperationContext, f as BlogCreateResultContext, g as BlogDeleteErrorContext, h as BlogDeleteOperationContext, i as BlogDeleteResultContext, j as BlogListErrorContext, k as BlogListOperationContext, l as BlogListResultContext, m as BlogNextPreviousErrorContext, n as BlogNextPreviousOperationContext, o as BlogNextPreviousResultContext, p as BlogRouteKey, q as BlogUpdateErrorContext, r as BlogUpdateOperationContext, s as BlogUpdateResultContext, C as CreatePostOperationInputSchema, N as NextPreviousPostsQuerySchema, P as PostListParams, t as PostListQuerySchema, u as PostListResult, S as SerializedNextPreviousPostsResult, v as SerializedPostListResult, U as UpdatePostOperationInputSchema, w as blogBackendPlugin, x as createBlogQueryKeys, y as getAllPosts, z as getAllTags, A as getPostBySlug } from '../../../shared/stack.
|
|
1
|
+
export { B as BLOG_QUERY_KEYS, a as BlogApiRouter, b as BlogBackendHooks, c as BlogBackendOptions, d as BlogCreateErrorContext, e as BlogCreateOperationContext, f as BlogCreateResultContext, g as BlogDeleteErrorContext, h as BlogDeleteOperationContext, i as BlogDeleteResultContext, j as BlogListErrorContext, k as BlogListOperationContext, l as BlogListResultContext, m as BlogNextPreviousErrorContext, n as BlogNextPreviousOperationContext, o as BlogNextPreviousResultContext, p as BlogRouteKey, q as BlogUpdateErrorContext, r as BlogUpdateOperationContext, s as BlogUpdateResultContext, C as CreatePostOperationInputSchema, N as NextPreviousPostsQuerySchema, P as PostListParams, t as PostListQuerySchema, u as PostListResult, S as SerializedNextPreviousPostsResult, v as SerializedPostListResult, U as UpdatePostOperationInputSchema, w as blogBackendPlugin, x as createBlogQueryKeys, y as getAllPosts, z as getAllTags, A as getPostBySlug } from '../../../shared/stack.Ch9-ppmQ.js';
|
|
2
2
|
import { DBAdapter } from '@btst/db';
|
|
3
3
|
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Dsatjh0B.js';
|
|
4
4
|
export { blogPermissions } from '../permissions.js';
|
|
5
5
|
import '@btst/stack/plugins/client';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../../../shared/stack.
|
|
7
|
+
import '../../../shared/stack.Csi-4Mgz.js';
|
|
8
8
|
import '@btst/stack/plugins/api';
|
|
9
9
|
import '../../../authorization/index.js';
|
|
10
10
|
import 'zod/v4/core';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { P as PostCreateInput, a as PostUpdateInput, U as UseNextPreviousPostsOptions, b as UseNextPreviousPostsResult, c as UsePostResult, d as UsePostSearchOptions, e as UsePostSearchResult, f as UsePostsOptions, g as UsePostsResult, h as UseRecentPostsOptions, i as UseRecentPostsResult, u as useCreatePost, j as useDeletePost, k as useNextPreviousPosts, l as usePost, m as usePostForm, n as usePostSearch, o as usePosts, p as useRecentPosts, q as useSuspensePost, r as useSuspensePosts, s as useSuspenseTags, t as useTags, v as useUpdatePost } from '../../../../shared/stack.
|
|
1
|
+
export { P as PostCreateInput, a as PostUpdateInput, U as UseNextPreviousPostsOptions, b as UseNextPreviousPostsResult, c as UsePostResult, d as UsePostSearchOptions, e as UsePostSearchResult, f as UsePostsOptions, g as UsePostsResult, h as UseRecentPostsOptions, i as UseRecentPostsResult, u as useCreatePost, j as useDeletePost, k as useNextPreviousPosts, l as usePost, m as usePostForm, n as usePostSearch, o as usePosts, p as useRecentPosts, q as useSuspensePost, r as useSuspensePosts, s as useSuspenseTags, t as useTags, v as useUpdatePost } from '../../../../shared/stack.D17yFglU.cjs';
|
|
2
2
|
export { useDebounce } from '@btst/stack/plugins/client/hooks';
|
|
3
3
|
import '@tanstack/react-query';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../../../shared/stack.Dsatjh0B.cjs';
|
|
6
|
-
import '../../../../shared/stack.
|
|
6
|
+
import '../../../../shared/stack.Csi-4Mgz.cjs';
|
|
7
7
|
|
|
8
8
|
declare function useThrottle<T>(value: T, wait?: number): T;
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { P as PostCreateInput, a as PostUpdateInput, U as UseNextPreviousPostsOptions, b as UseNextPreviousPostsResult, c as UsePostResult, d as UsePostSearchOptions, e as UsePostSearchResult, f as UsePostsOptions, g as UsePostsResult, h as UseRecentPostsOptions, i as UseRecentPostsResult, u as useCreatePost, j as useDeletePost, k as useNextPreviousPosts, l as usePost, m as usePostForm, n as usePostSearch, o as usePosts, p as useRecentPosts, q as useSuspensePost, r as useSuspensePosts, s as useSuspenseTags, t as useTags, v as useUpdatePost } from '../../../../shared/stack.
|
|
1
|
+
export { P as PostCreateInput, a as PostUpdateInput, U as UseNextPreviousPostsOptions, b as UseNextPreviousPostsResult, c as UsePostResult, d as UsePostSearchOptions, e as UsePostSearchResult, f as UsePostsOptions, g as UsePostsResult, h as UseRecentPostsOptions, i as UseRecentPostsResult, u as useCreatePost, j as useDeletePost, k as useNextPreviousPosts, l as usePost, m as usePostForm, n as usePostSearch, o as usePosts, p as useRecentPosts, q as useSuspensePost, r as useSuspensePosts, s as useSuspenseTags, t as useTags, v as useUpdatePost } from '../../../../shared/stack.B2jlVVhD.mjs';
|
|
2
2
|
export { useDebounce } from '@btst/stack/plugins/client/hooks';
|
|
3
3
|
import '@tanstack/react-query';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../../../shared/stack.Dsatjh0B.mjs';
|
|
6
|
-
import '../../../../shared/stack.
|
|
6
|
+
import '../../../../shared/stack.Csi-4Mgz.mjs';
|
|
7
7
|
|
|
8
8
|
declare function useThrottle<T>(value: T, wait?: number): T;
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { P as PostCreateInput, a as PostUpdateInput, U as UseNextPreviousPostsOptions, b as UseNextPreviousPostsResult, c as UsePostResult, d as UsePostSearchOptions, e as UsePostSearchResult, f as UsePostsOptions, g as UsePostsResult, h as UseRecentPostsOptions, i as UseRecentPostsResult, u as useCreatePost, j as useDeletePost, k as useNextPreviousPosts, l as usePost, m as usePostForm, n as usePostSearch, o as usePosts, p as useRecentPosts, q as useSuspensePost, r as useSuspensePosts, s as useSuspenseTags, t as useTags, v as useUpdatePost } from '../../../../shared/stack.
|
|
1
|
+
export { P as PostCreateInput, a as PostUpdateInput, U as UseNextPreviousPostsOptions, b as UseNextPreviousPostsResult, c as UsePostResult, d as UsePostSearchOptions, e as UsePostSearchResult, f as UsePostsOptions, g as UsePostsResult, h as UseRecentPostsOptions, i as UseRecentPostsResult, u as useCreatePost, j as useDeletePost, k as useNextPreviousPosts, l as usePost, m as usePostForm, n as usePostSearch, o as usePosts, p as useRecentPosts, q as useSuspensePost, r as useSuspensePosts, s as useSuspenseTags, t as useTags, v as useUpdatePost } from '../../../../shared/stack.Dcfg4GNN.js';
|
|
2
2
|
export { useDebounce } from '@btst/stack/plugins/client/hooks';
|
|
3
3
|
import '@tanstack/react-query';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../../../shared/stack.Dsatjh0B.js';
|
|
6
|
-
import '../../../../shared/stack.
|
|
6
|
+
import '../../../../shared/stack.Csi-4Mgz.js';
|
|
7
7
|
|
|
8
8
|
declare function useThrottle<T>(value: T, wait?: number): T;
|
|
9
9
|
|
|
@@ -4,11 +4,11 @@ import * as react from 'react';
|
|
|
4
4
|
import { ComponentType, ReactNode } from 'react';
|
|
5
5
|
import { S as SerializedPost, P as Post } from '../../../shared/stack.Dsatjh0B.cjs';
|
|
6
6
|
import { N as NewPostPageComponent } from '../../../shared/stack.DA5isGwz.cjs';
|
|
7
|
-
export { f as UsePostsOptions, g as UsePostsResult } from '../../../shared/stack.
|
|
7
|
+
export { f as UsePostsOptions, g as UsePostsResult } from '../../../shared/stack.D17yFglU.cjs';
|
|
8
8
|
import '@tanstack/react-query';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@btst/stack/plugins/client/hooks';
|
|
11
|
-
import '../../../shared/stack.
|
|
11
|
+
import '../../../shared/stack.Csi-4Mgz.cjs';
|
|
12
12
|
|
|
13
13
|
declare const BLOG_LOCALIZATION: {
|
|
14
14
|
BLOG_FORMS_TITLE_LABEL: string;
|
|
@@ -4,11 +4,11 @@ import * as react from 'react';
|
|
|
4
4
|
import { ComponentType, ReactNode } from 'react';
|
|
5
5
|
import { S as SerializedPost, P as Post } from '../../../shared/stack.Dsatjh0B.mjs';
|
|
6
6
|
import { N as NewPostPageComponent } from '../../../shared/stack.DA5isGwz.mjs';
|
|
7
|
-
export { f as UsePostsOptions, g as UsePostsResult } from '../../../shared/stack.
|
|
7
|
+
export { f as UsePostsOptions, g as UsePostsResult } from '../../../shared/stack.B2jlVVhD.mjs';
|
|
8
8
|
import '@tanstack/react-query';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@btst/stack/plugins/client/hooks';
|
|
11
|
-
import '../../../shared/stack.
|
|
11
|
+
import '../../../shared/stack.Csi-4Mgz.mjs';
|
|
12
12
|
|
|
13
13
|
declare const BLOG_LOCALIZATION: {
|
|
14
14
|
BLOG_FORMS_TITLE_LABEL: string;
|
|
@@ -4,11 +4,11 @@ import * as react from 'react';
|
|
|
4
4
|
import { ComponentType, ReactNode } from 'react';
|
|
5
5
|
import { S as SerializedPost, P as Post } from '../../../shared/stack.Dsatjh0B.js';
|
|
6
6
|
import { N as NewPostPageComponent } from '../../../shared/stack.DA5isGwz.js';
|
|
7
|
-
export { f as UsePostsOptions, g as UsePostsResult } from '../../../shared/stack.
|
|
7
|
+
export { f as UsePostsOptions, g as UsePostsResult } from '../../../shared/stack.Dcfg4GNN.js';
|
|
8
8
|
import '@tanstack/react-query';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@btst/stack/plugins/client/hooks';
|
|
11
|
-
import '../../../shared/stack.
|
|
11
|
+
import '../../../shared/stack.Csi-4Mgz.js';
|
|
12
12
|
|
|
13
13
|
declare const BLOG_LOCALIZATION: {
|
|
14
14
|
BLOG_FORMS_TITLE_LABEL: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@btst/stack/plugins/client';
|
|
2
|
-
export { D as blogResources, x as createBlogQueryKeys } from '../../shared/stack.
|
|
2
|
+
export { D as blogResources, x as createBlogQueryKeys } from '../../shared/stack.BWduIMKG.cjs';
|
|
3
3
|
import 'zod';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.Csi-4Mgz.cjs';
|
|
5
5
|
import '../../shared/stack.Dsatjh0B.cjs';
|
|
6
6
|
import '@btst/stack/plugins/api';
|
|
7
7
|
import '../../authorization/index.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@btst/stack/plugins/client';
|
|
2
|
-
export { D as blogResources, x as createBlogQueryKeys } from '../../shared/stack.
|
|
2
|
+
export { D as blogResources, x as createBlogQueryKeys } from '../../shared/stack.D6fPBfYe.mjs';
|
|
3
3
|
import 'zod';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.Csi-4Mgz.mjs';
|
|
5
5
|
import '../../shared/stack.Dsatjh0B.mjs';
|
|
6
6
|
import '@btst/stack/plugins/api';
|
|
7
7
|
import '../../authorization/index.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@btst/stack/plugins/client';
|
|
2
|
-
export { D as blogResources, x as createBlogQueryKeys } from '../../shared/stack.
|
|
2
|
+
export { D as blogResources, x as createBlogQueryKeys } from '../../shared/stack.Ch9-ppmQ.js';
|
|
3
3
|
import 'zod';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.Csi-4Mgz.js';
|
|
5
5
|
import '../../shared/stack.Dsatjh0B.js';
|
|
6
6
|
import '@btst/stack/plugins/api';
|
|
7
7
|
import '../../authorization/index.js';
|