@websolutespa/bom-next 3.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/CHANGELOG.md +7 -0
- package/README.md +11 -0
- package/dist/config.client-B8As5DY0.js +2 -0
- package/dist/config.edge-B8As5DY0.js +2 -0
- package/dist/config.server-B8As5DY0.js +2 -0
- package/dist/exports/client-xcFJNcG7.d.ts +979 -0
- package/dist/exports/client-xcFJNcG7.d.ts.map +1 -0
- package/dist/exports/client.js +5735 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/instrumentation-DBO6QH4d.d.ts +13 -0
- package/dist/exports/instrumentation-DBO6QH4d.d.ts.map +1 -0
- package/dist/exports/instrumentation.js +25 -0
- package/dist/exports/instrumentation.js.map +1 -0
- package/dist/exports/proxy-Cv7QFVci.d.ts +71 -0
- package/dist/exports/proxy-Cv7QFVci.d.ts.map +1 -0
- package/dist/exports/proxy.js +254 -0
- package/dist/exports/proxy.js.map +1 -0
- package/dist/exports/server-BHObJHJ6.d.ts +402 -0
- package/dist/exports/server-BHObJHJ6.d.ts.map +1 -0
- package/dist/exports/server.js +1974 -0
- package/dist/exports/server.js.map +1 -0
- package/dist/http-_2M-UFRx.js +61 -0
- package/dist/http-_2M-UFRx.js.map +1 -0
- package/dist/index-CdYcvudT.d.ts +4 -0
- package/dist/index-CtfAJ0y7.d.ts +499 -0
- package/dist/index-CtfAJ0y7.d.ts.map +1 -0
- package/dist/index.js +201 -0
- package/dist/index.js.map +1 -0
- package/dist/route-DzFwERQP.js +65 -0
- package/dist/route-DzFwERQP.js.map +1 -0
- package/dist/store-CJzqrHsl.js +73 -0
- package/dist/store-CJzqrHsl.js.map +1 -0
- package/dist/types-BatUTdbZ.d.ts +15 -0
- package/dist/types-BatUTdbZ.d.ts.map +1 -0
- package/dist/types-D29_snYY.d.ts +191 -0
- package/dist/types-D29_snYY.d.ts.map +1 -0
- package/dist/utils-Ca7xh5mm.js +78 -0
- package/dist/utils-Ca7xh5mm.js.map +1 -0
- package/dist/utils-YwteTbk7.js +23 -0
- package/dist/utils-YwteTbk7.js.map +1 -0
- package/package.json +156 -0
- package/src/client/client.tsx +18 -0
- package/src/client/extra.tsx +21 -0
- package/src/client/label.tsx +24 -0
- package/src/client/layout.tsx +22 -0
- package/src/client/local.collection.ts +33 -0
- package/src/client/metadata.tsx +217 -0
- package/src/client/page.tsx +22 -0
- package/src/client/useApi.test.tsx +203 -0
- package/src/client/useApi.ts +59 -0
- package/src/client/useCollectionApi.test.tsx +201 -0
- package/src/client/useCollectionApi.ts +66 -0
- package/src/client/useExtra.tsx +12 -0
- package/src/client/useHttp.ts +54 -0
- package/src/client/useLabel.test.tsx +76 -0
- package/src/client/useLabel.tsx +12 -0
- package/src/client/useLayout.tsx +13 -0
- package/src/client/useLink.tsx +13 -0
- package/src/client/useMetaData.tsx +12 -0
- package/src/client/usePage.tsx +12 -0
- package/src/client/useUser.tsx +12 -0
- package/src/client/user.tsx +43 -0
- package/src/exports/client.ts +20 -0
- package/src/exports/instrumentation.ts +1 -0
- package/src/exports/proxy.ts +5 -0
- package/src/exports/server.ts +19 -0
- package/src/global.d.ts +6 -0
- package/src/index.ts +17 -0
- package/src/instrumentation/client.ts +19 -0
- package/src/instrumentation/sentry/capture.requestError.ts +6 -0
- package/src/instrumentation/sentry/capture.routerTransitionStart.ts +4 -0
- package/src/instrumentation/sentry/config.client.ts +9 -0
- package/src/instrumentation/sentry/config.edge.ts +9 -0
- package/src/instrumentation/sentry/config.server.ts +9 -0
- package/src/instrumentation/server.ts +24 -0
- package/src/instrumentation/types.ts +12 -0
- package/src/lib/breadcrumb.ts +21 -0
- package/src/lib/const.ts +3 -0
- package/src/lib/http.test.ts +25 -0
- package/src/lib/http.ts +74 -0
- package/src/lib/label.ts +43 -0
- package/src/lib/layout.defaults.ts +167 -0
- package/src/lib/link.ts +19 -0
- package/src/lib/meta-data.ts +60 -0
- package/src/lib/open-graph.ts +165 -0
- package/src/lib/pagination.ts +78 -0
- package/src/lib/payload.config.ts +12 -0
- package/src/lib/route.ts +83 -0
- package/src/lib/store.ts +63 -0
- package/src/lib/structured-data.ts +24 -0
- package/src/lib/twitter-card.ts +49 -0
- package/src/lib/utils.ts +45 -0
- package/src/mock.ts +264 -0
- package/src/proxy/protected-route.test.ts +75 -0
- package/src/proxy/protected-route.ts +57 -0
- package/src/proxy/proxy.test.ts +48 -0
- package/src/proxy/proxy.ts +64 -0
- package/src/proxy/route-auto-detection.ts +126 -0
- package/src/proxy/route-proxy.ts +187 -0
- package/src/server/context.ts +147 -0
- package/src/server/handlers/auth.handler.ts +27 -0
- package/src/server/handlers/captions.handler.ts +32 -0
- package/src/server/handlers/collection.handler.test.ts +57 -0
- package/src/server/handlers/collection.handler.ts +212 -0
- package/src/server/handlers/error-response.ts +45 -0
- package/src/server/handlers/index.handler.ts +146 -0
- package/src/server/handlers/preview.handler.ts +63 -0
- package/src/server/handlers/registry.handler.test.ts +65 -0
- package/src/server/handlers/registry.handler.ts +259 -0
- package/src/server/handlers/route.handler.ts +161 -0
- package/src/server/handlers/sitemap.handler.ts +374 -0
- package/src/server/handlers/static-params.handler.ts +111 -0
- package/src/server/handlers/vars.handler.ts +167 -0
- package/src/server/layout.ts +120 -0
- package/src/server/lazy.ts +41 -0
- package/src/server/local-api.ts +63 -0
- package/src/server/metadata.ts +87 -0
- package/src/server/mixer-payload.ts +124 -0
- package/src/server/mixer-payload.type-test.ts +27 -0
- package/src/server/mixer.ts +439 -0
- package/src/server/mock/category.ts +34 -0
- package/src/server/mock/collection.ts +21 -0
- package/src/server/mock/page.ts +62 -0
- package/src/server/mock/route.ts +36 -0
- package/src/server/mock/store.ts +159 -0
- package/src/server/page.ts +86 -0
- package/src/server/session/session.ts +101 -0
- package/src/server/utils.ts +23 -0
- package/src/server/utmz.ts +11 -0
- package/src/types.ts +211 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { a as routeToRouteLink, i as routeToLink, n as newRouteLink, r as resolveRoute, t as getRouteLinkCategory } from "./route-DzFwERQP.js";
|
|
2
|
+
import { a as nextPhase, c as guest, i as buildStrategy, l as buildBreadcrumb, n as NextPhase, o as storeCacheDuration, r as StoreStrategy, s as storeStrategy, t as BuildStrategy } from "./store-CJzqrHsl.js";
|
|
3
|
+
import { a as localApiFetch, c as localApiPost, i as localApiDelete, l as localApiPut, n as getLocalApiUrl, o as localApiGet, r as getRemoteApiRequestOptions, s as localApiPatch, t as getLocalApiRequestOptions } from "./http-_2M-UFRx.js";
|
|
4
|
+
import { a as sanitizeRedirectTo, c as getLink, d as interpolateText, i as sanitizeRedirectFrom, l as LabelService, n as resolveHref, o as sanitizeRedirectUrl, r as sanitizeHref, s as trimTerminalSlash, t as getPublicUrl, u as getLabelFromLabels } from "./utils-Ca7xh5mm.js";
|
|
5
|
+
import { isArray, isObject } from "@websolutespa/bom-core";
|
|
6
|
+
//#region src/lib/layout.defaults.ts
|
|
7
|
+
const LayoutDefaults = {
|
|
8
|
+
labels: [{
|
|
9
|
+
id: "error.required",
|
|
10
|
+
text: "Required field"
|
|
11
|
+
}, {
|
|
12
|
+
id: "items.found",
|
|
13
|
+
text: "@items items found"
|
|
14
|
+
}],
|
|
15
|
+
locale: "en",
|
|
16
|
+
locales: [],
|
|
17
|
+
market: "ww",
|
|
18
|
+
markets: [],
|
|
19
|
+
app: {
|
|
20
|
+
id: "app",
|
|
21
|
+
brand: {
|
|
22
|
+
name: "Mixer",
|
|
23
|
+
social: []
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
menu: { main: {
|
|
27
|
+
id: "main",
|
|
28
|
+
items: [{
|
|
29
|
+
id: 1,
|
|
30
|
+
type: "category",
|
|
31
|
+
title: "Collections",
|
|
32
|
+
category: "product_index",
|
|
33
|
+
href: "#collections",
|
|
34
|
+
items: [{
|
|
35
|
+
id: "product_category_tile",
|
|
36
|
+
type: "category",
|
|
37
|
+
title: "Tiles",
|
|
38
|
+
category: "product_category_tile",
|
|
39
|
+
href: "#collections/tiles",
|
|
40
|
+
items: [],
|
|
41
|
+
media: {
|
|
42
|
+
type: "image",
|
|
43
|
+
src: "https://placehold.co/960x600/e4e5eb/f4f5fb.webp?text=placehold"
|
|
44
|
+
}
|
|
45
|
+
}]
|
|
46
|
+
}]
|
|
47
|
+
} },
|
|
48
|
+
tree: {
|
|
49
|
+
id: "homepage",
|
|
50
|
+
category: "homepage",
|
|
51
|
+
schema: "homepage",
|
|
52
|
+
title: "Homepage",
|
|
53
|
+
href: "/",
|
|
54
|
+
items: [
|
|
55
|
+
{
|
|
56
|
+
id: "product_index",
|
|
57
|
+
category: "product_index",
|
|
58
|
+
schema: "product_index",
|
|
59
|
+
title: "Collections",
|
|
60
|
+
href: "#collections",
|
|
61
|
+
items: [
|
|
62
|
+
{
|
|
63
|
+
id: "product_category",
|
|
64
|
+
category: "product_category",
|
|
65
|
+
schema: "product_category",
|
|
66
|
+
title: "Tiles",
|
|
67
|
+
href: "#product_category",
|
|
68
|
+
media: {
|
|
69
|
+
type: "image",
|
|
70
|
+
src: "https://bom-mixer.wslabs.it/assets/header/6366_n_tiles.jpg"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "product_category",
|
|
75
|
+
category: "product_category",
|
|
76
|
+
schema: "product_category",
|
|
77
|
+
title: "3D Elements",
|
|
78
|
+
href: "#product_category",
|
|
79
|
+
media: {
|
|
80
|
+
type: "image",
|
|
81
|
+
src: "https://bom-mixer.wslabs.it/assets/header/6369_n_3d_elements_menu_cover.webp"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "product_category",
|
|
86
|
+
category: "product_category",
|
|
87
|
+
schema: "product_category",
|
|
88
|
+
title: "Paints",
|
|
89
|
+
href: "#product_category",
|
|
90
|
+
media: {
|
|
91
|
+
type: "image",
|
|
92
|
+
src: "https://bom-mixer.wslabs.it/assets/header/6367_n_paints.jpg"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "product_category",
|
|
97
|
+
category: "product_category",
|
|
98
|
+
schema: "product_category",
|
|
99
|
+
title: "Wood & Metal",
|
|
100
|
+
href: "#product_category",
|
|
101
|
+
media: {
|
|
102
|
+
type: "image",
|
|
103
|
+
src: "https://bom-mixer.wslabs.it/assets/header/6368_n_menu_wood_metal.webp"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "product_category",
|
|
108
|
+
category: "product_category",
|
|
109
|
+
schema: "product_category",
|
|
110
|
+
title: "Accessories",
|
|
111
|
+
href: "#product_category",
|
|
112
|
+
media: {
|
|
113
|
+
type: "image",
|
|
114
|
+
src: "https://bom-mixer.wslabs.it/assets/header/6371_n_accessories.jpg"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "product_category",
|
|
119
|
+
category: "product_category",
|
|
120
|
+
schema: "product_category",
|
|
121
|
+
title: "Editions",
|
|
122
|
+
href: "#product_category",
|
|
123
|
+
media: {
|
|
124
|
+
type: "image",
|
|
125
|
+
src: "https://bom-mixer.wslabs.it/assets/header/7858_n_Menu.webp"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "magazine_index",
|
|
132
|
+
category: "magazine_index",
|
|
133
|
+
schema: "magazine_index",
|
|
134
|
+
title: "Magazine",
|
|
135
|
+
href: "#magazine_index"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: "store_index",
|
|
139
|
+
category: "store_index",
|
|
140
|
+
schema: "store_index",
|
|
141
|
+
title: "Stores",
|
|
142
|
+
href: "#store_index"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "contact",
|
|
146
|
+
category: "contact",
|
|
147
|
+
schema: "contact",
|
|
148
|
+
title: "Contacts",
|
|
149
|
+
href: "#contact"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: "shop_index",
|
|
153
|
+
category: "shop_index",
|
|
154
|
+
schema: "shop_index",
|
|
155
|
+
title: "Shop",
|
|
156
|
+
href: "#shop_index"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
topLevelHrefs: {},
|
|
161
|
+
topLevelRoutes: {}
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/lib/pagination.ts
|
|
165
|
+
function isPaginationInfo(item) {
|
|
166
|
+
return isObject(item) && typeof item.page === "number" && typeof item.pages === "number" && typeof item.perPage === "number" && typeof item.total === "number" && isArray(item.items);
|
|
167
|
+
}
|
|
168
|
+
function getPagedItems(items, page, perPage) {
|
|
169
|
+
const from = (page - 1) * perPage;
|
|
170
|
+
const to = Math.min(page * perPage, items.length);
|
|
171
|
+
return items.slice(from, to);
|
|
172
|
+
}
|
|
173
|
+
function getMoreItems(items, page, perPage) {
|
|
174
|
+
const total = items.length;
|
|
175
|
+
const position = Math.min(total, perPage * page);
|
|
176
|
+
return items.slice(0, position);
|
|
177
|
+
}
|
|
178
|
+
function getPaginationInfo(items, options) {
|
|
179
|
+
const mode = options?.mode || "pagination";
|
|
180
|
+
const page = options?.page || 1;
|
|
181
|
+
const perPage = options?.perPage || 12;
|
|
182
|
+
const total = items.length;
|
|
183
|
+
const pages = Math.ceil(total / perPage);
|
|
184
|
+
const hasMore = page < pages;
|
|
185
|
+
const prevPage = page > 1 ? page - 1 : void 0;
|
|
186
|
+
const nextPage = page < pages ? page + 1 : void 0;
|
|
187
|
+
return {
|
|
188
|
+
items: mode === "pagination" ? getPagedItems(items, page, perPage) : getMoreItems(items, page, perPage),
|
|
189
|
+
hasMore,
|
|
190
|
+
nextPage,
|
|
191
|
+
page,
|
|
192
|
+
pages,
|
|
193
|
+
perPage,
|
|
194
|
+
prevPage,
|
|
195
|
+
total
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
export { BuildStrategy, LabelService, LayoutDefaults, NextPhase, StoreStrategy, buildBreadcrumb, buildStrategy, getLabelFromLabels, getLink, getLocalApiRequestOptions, getLocalApiUrl, getMoreItems, getPagedItems, getPaginationInfo, getPublicUrl, getRemoteApiRequestOptions, getRouteLinkCategory, guest, interpolateText, isPaginationInfo, localApiDelete, localApiFetch, localApiGet, localApiPatch, localApiPost, localApiPut, newRouteLink, nextPhase, resolveHref, resolveRoute, routeToLink, routeToRouteLink, sanitizeHref, sanitizeRedirectFrom, sanitizeRedirectTo, sanitizeRedirectUrl, storeCacheDuration, storeStrategy, trimTerminalSlash };
|
|
200
|
+
|
|
201
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/lib/layout.defaults.ts","../src/lib/pagination.ts"],"sourcesContent":["import { ILayout } from '@websolutespa/bom-core';\r\n\r\nexport const LayoutDefaults: ILayout = {\r\n labels: [\r\n {\r\n id: 'error.required',\r\n text: 'Required field',\r\n },\r\n {\r\n id: 'items.found',\r\n text: '@items items found',\r\n },\r\n ],\r\n locale: 'en',\r\n locales: [],\r\n market: 'ww',\r\n markets: [],\r\n app: {\r\n id: 'app',\r\n brand: {\r\n name: 'Mixer',\r\n social: [],\r\n },\r\n },\r\n menu: {\r\n main: {\r\n id: 'main',\r\n items: [\r\n {\r\n id: 1,\r\n type: 'category',\r\n title: 'Collections',\r\n category: 'product_index',\r\n href: '#collections',\r\n items: [\r\n {\r\n id: 'product_category_tile',\r\n type: 'category',\r\n title: 'Tiles',\r\n category: 'product_category_tile',\r\n href: '#collections/tiles',\r\n items: [],\r\n media: {\r\n type: 'image',\r\n src: 'https://placehold.co/960x600/e4e5eb/f4f5fb.webp?text=placehold',\r\n },\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n },\r\n tree: {\r\n id: 'homepage',\r\n category: 'homepage',\r\n schema: 'homepage',\r\n title: 'Homepage',\r\n href: '/',\r\n items: [\r\n {\r\n id: 'product_index',\r\n category: 'product_index',\r\n schema: 'product_index',\r\n title: 'Collections',\r\n href: '#collections',\r\n items: [\r\n {\r\n id: 'product_category',\r\n category: 'product_category',\r\n schema: 'product_category',\r\n title: 'Tiles',\r\n href: '#product_category',\r\n media: {\r\n type: 'image',\r\n src: 'https://bom-mixer.wslabs.it/assets/header/6366_n_tiles.jpg',\r\n },\r\n },\r\n {\r\n id: 'product_category',\r\n category: 'product_category',\r\n schema: 'product_category',\r\n title: '3D Elements',\r\n href: '#product_category',\r\n media: {\r\n type: 'image',\r\n src: 'https://bom-mixer.wslabs.it/assets/header/6369_n_3d_elements_menu_cover.webp',\r\n },\r\n },\r\n {\r\n id: 'product_category',\r\n category: 'product_category',\r\n schema: 'product_category',\r\n title: 'Paints',\r\n href: '#product_category',\r\n media: {\r\n type: 'image',\r\n src: 'https://bom-mixer.wslabs.it/assets/header/6367_n_paints.jpg',\r\n },\r\n },\r\n {\r\n id: 'product_category',\r\n category: 'product_category',\r\n schema: 'product_category',\r\n title: 'Wood & Metal',\r\n href: '#product_category',\r\n media: {\r\n type: 'image',\r\n src: 'https://bom-mixer.wslabs.it/assets/header/6368_n_menu_wood_metal.webp',\r\n },\r\n },\r\n {\r\n id: 'product_category',\r\n category: 'product_category',\r\n schema: 'product_category',\r\n title: 'Accessories',\r\n href: '#product_category',\r\n media: {\r\n type: 'image',\r\n src: 'https://bom-mixer.wslabs.it/assets/header/6371_n_accessories.jpg',\r\n },\r\n },\r\n {\r\n id: 'product_category',\r\n category: 'product_category',\r\n schema: 'product_category',\r\n title: 'Editions',\r\n href: '#product_category',\r\n media: {\r\n type: 'image',\r\n src: 'https://bom-mixer.wslabs.it/assets/header/7858_n_Menu.webp',\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n id: 'magazine_index',\r\n category: 'magazine_index',\r\n schema: 'magazine_index',\r\n title: 'Magazine',\r\n href: '#magazine_index',\r\n },\r\n {\r\n id: 'store_index',\r\n category: 'store_index',\r\n schema: 'store_index',\r\n title: 'Stores',\r\n href: '#store_index',\r\n },\r\n {\r\n id: 'contact',\r\n category: 'contact',\r\n schema: 'contact',\r\n title: 'Contacts',\r\n href: '#contact',\r\n },\r\n {\r\n id: 'shop_index',\r\n category: 'shop_index',\r\n schema: 'shop_index',\r\n title: 'Shop',\r\n href: '#shop_index',\r\n },\r\n ],\r\n },\r\n topLevelHrefs: {},\r\n topLevelRoutes: {},\r\n};\r\n","import { isArray, isObject } from '@websolutespa/bom-core';\r\n\r\nexport type IPaginationItem = any;\r\n\r\nexport type IPaginationOptions = {\r\n mode?: 'pagination' | 'infinite'; // default to pagination\r\n page?: number;\r\n perPage?: number;\r\n delayInMs?: number;\r\n};\r\n\r\nexport type IPaginationInfo<T extends IPaginationItem = IPaginationItem> = {\r\n items: T[];\r\n hasMore: boolean;\r\n nextPage: number | undefined;\r\n page: number;\r\n pages: number;\r\n perPage: number;\r\n prevPage: number | undefined;\r\n total: number;\r\n};\r\n\r\nexport function isPaginationInfo(item: unknown): item is IPaginationInfo {\r\n return isObject(item) && (\r\n typeof item.page === 'number' &&\r\n typeof item.pages === 'number' &&\r\n typeof item.perPage === 'number' &&\r\n typeof item.total === 'number' &&\r\n isArray(item.items)\r\n );\r\n}\r\n\r\nexport function getPagedItems<T extends IPaginationItem = IPaginationItem>(\r\n items: T[],\r\n page: number,\r\n perPage: number\r\n): T[] {\r\n const from = (page - 1) * perPage;\r\n const to = Math.min(page * perPage, items.length);\r\n return items.slice(from, to);\r\n}\r\n\r\nexport function getMoreItems<T extends IPaginationItem = IPaginationItem>(\r\n items: T[],\r\n page: number,\r\n perPage: number\r\n): T[] {\r\n const total = items.length;\r\n const position = Math.min(total, perPage * page);\r\n return items.slice(0, position);\r\n}\r\n\r\nexport function getPaginationInfo<T extends IPaginationItem = IPaginationItem>(\r\n items: T[],\r\n options?: IPaginationOptions\r\n): IPaginationInfo<T> {\r\n const mode = options?.mode || 'pagination';\r\n const page = options?.page || 1;\r\n const perPage = options?.perPage || 12;\r\n const total = items.length;\r\n const pages = Math.ceil(total / perPage);\r\n const hasMore = page < pages;\r\n const prevPage = page > 1 ? page - 1 : undefined;\r\n const nextPage = page < pages ? page + 1 : undefined;\r\n const pagedItems = mode === 'pagination' ?\r\n getPagedItems(items, page, perPage) :\r\n getMoreItems(items, page, perPage);\r\n return {\r\n items: pagedItems,\r\n hasMore,\r\n nextPage,\r\n page,\r\n pages,\r\n perPage,\r\n prevPage,\r\n total,\r\n };\r\n}\r\n"],"mappings":";;;;;;AAEA,MAAa,iBAA0B;CACrC,QAAQ,CACN;EACE,IAAI;EACJ,MAAM;CACR,GACA;EACE,IAAI;EACJ,MAAM;CACR,CACF;CACA,QAAQ;CACR,SAAS,CAAC;CACV,QAAQ;CACR,SAAS,CAAC;CACV,KAAK;EACH,IAAI;EACJ,OAAO;GACL,MAAM;GACN,QAAQ,CAAC;EACX;CACF;CACA,MAAM,EACJ,MAAM;EACJ,IAAI;EACJ,OAAO,CACL;GACE,IAAI;GACJ,MAAM;GACN,OAAO;GACP,UAAU;GACV,MAAM;GACN,OAAO,CACL;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,UAAU;IACV,MAAM;IACN,OAAO,CAAC;IACR,OAAO;KACL,MAAM;KACN,KAAK;IACP;GACF,CACF;EACF,CACF;CACF,EACF;CACA,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,QAAQ;EACR,OAAO;EACP,MAAM;EACN,OAAO;GACL;IACE,IAAI;IACJ,UAAU;IACV,QAAQ;IACR,OAAO;IACP,MAAM;IACN,OAAO;KACL;MACE,IAAI;MACJ,UAAU;MACV,QAAQ;MACR,OAAO;MACP,MAAM;MACN,OAAO;OACL,MAAM;OACN,KAAK;MACP;KACF;KACA;MACE,IAAI;MACJ,UAAU;MACV,QAAQ;MACR,OAAO;MACP,MAAM;MACN,OAAO;OACL,MAAM;OACN,KAAK;MACP;KACF;KACA;MACE,IAAI;MACJ,UAAU;MACV,QAAQ;MACR,OAAO;MACP,MAAM;MACN,OAAO;OACL,MA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AAO,SAAS,QAAQ;CAC9B,MAAM,UAAU,SAAS,WAAW;CACpC,MAAM,QAAQ,MAAM;CACpB,MAAM,QAAQ,KAAK,KAAK,QAAQ,OAAO;CACvC,MAAM,UAAU,OAAO;CACvB,MAAM,WAAW,OAAO,IAAI,OAAO,IAAI,KAAA;CACvC,MAAM,WAAW,OAAO,QAAQ,OAAO,IAAI,KAAA;CAI3C,OAAO;EACL,OAJiB,SAAS,eAC1B,cAAc,OAAO,MAAM,OAAO,IAClC,aAAa,OAAO,MAAM,OAAO;EAGjC;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { asCategoryId, findRouteOfCategory, localize } from "@websolutespa/bom-core";
|
|
2
|
+
//#region src/lib/route.ts
|
|
3
|
+
function getRouteLinkCategory(locale, routes, categories, rootCategory, category) {
|
|
4
|
+
const route = findRouteOfCategory(routes, category.id);
|
|
5
|
+
const otherCategories = categories.filter((x) => x.id !== category.id);
|
|
6
|
+
const childCategories = otherCategories.filter((x) => asCategoryId(x.category) === category.id);
|
|
7
|
+
const routeLink = newRouteLink(category, route, locale);
|
|
8
|
+
const items = [];
|
|
9
|
+
for (const childCategory of childCategories) {
|
|
10
|
+
const itemOrItems = getRouteLinkCategory(locale, routes, otherCategories, rootCategory, childCategory);
|
|
11
|
+
if (Array.isArray(itemOrItems)) items.push(...itemOrItems);
|
|
12
|
+
else if (itemOrItems) items.push(itemOrItems);
|
|
13
|
+
}
|
|
14
|
+
if (!route || category.isHidden && category.id !== rootCategory.id) return items;
|
|
15
|
+
routeLink.items = items;
|
|
16
|
+
return routeLink;
|
|
17
|
+
}
|
|
18
|
+
function newRouteLink(category, route, locale) {
|
|
19
|
+
const href = route && route.id ? route.id.toString() : "/";
|
|
20
|
+
const id = route?.page || category.id;
|
|
21
|
+
const media = category.media || route?.media;
|
|
22
|
+
const schema = route?.template || route?.schema || category?.schema || "unknown";
|
|
23
|
+
const title = localize(category.title || route?.title || "untitled", locale);
|
|
24
|
+
return {
|
|
25
|
+
category: category.id,
|
|
26
|
+
href,
|
|
27
|
+
id,
|
|
28
|
+
items: [],
|
|
29
|
+
media,
|
|
30
|
+
schema,
|
|
31
|
+
title
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function resolveRoute(route) {
|
|
35
|
+
return `/${route.market}/${route.locale}/${route.schema}/${route.page}`;
|
|
36
|
+
}
|
|
37
|
+
function routeToRouteLink(route) {
|
|
38
|
+
return {
|
|
39
|
+
category: asCategoryId(route.category),
|
|
40
|
+
href: route.id,
|
|
41
|
+
id: route.page,
|
|
42
|
+
items: [],
|
|
43
|
+
media: route.media,
|
|
44
|
+
schema: route.schema,
|
|
45
|
+
title: route.title
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Converts a route (and optional override title) into an IRouteLink.
|
|
50
|
+
* route.id is the pathname (href), route.page is the document ID.
|
|
51
|
+
*/
|
|
52
|
+
function routeToLink(route, title) {
|
|
53
|
+
return {
|
|
54
|
+
category: route.category,
|
|
55
|
+
href: route.id,
|
|
56
|
+
id: route.page,
|
|
57
|
+
schema: route.schema,
|
|
58
|
+
title: title ?? route.title,
|
|
59
|
+
media: route.media
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { routeToRouteLink as a, routeToLink as i, newRouteLink as n, resolveRoute as r, getRouteLinkCategory as t };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=route-DzFwERQP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-DzFwERQP.js","names":[],"sources":["../src/lib/route.ts"],"sourcesContent":["import { asCategoryId, findRouteOfCategory, ICategory, IRoute, IRouteLink, localize } from '@websolutespa/bom-core';\r\n\r\nexport function getRouteLinkCategory(\r\n locale: string,\r\n routes: IRoute[],\r\n categories: ICategory[],\r\n rootCategory: ICategory,\r\n category: ICategory\r\n): IRouteLink | IRouteLink[] | undefined {\r\n const route = findRouteOfCategory(routes, category.id);\r\n const otherCategories = categories.filter(x => x.id !== category.id);\r\n const childCategories = otherCategories.filter(x => asCategoryId(x.category) === category.id);\r\n // console.log('childCategories', category.id, childCategories.map(x => x.id));\r\n const routeLink = newRouteLink(category, route, locale);\r\n // console.log('getRouteLinkCategory', href, category.id, route);\r\n const items: IRouteLink[] = [];\r\n for (const childCategory of childCategories) {\r\n const itemOrItems = getRouteLinkCategory(locale, routes, otherCategories, rootCategory, childCategory);\r\n if (Array.isArray(itemOrItems)) {\r\n items.push(...itemOrItems);\r\n } else if (itemOrItems) {\r\n items.push(itemOrItems);\r\n }\r\n }\r\n if (\r\n !route ||\r\n (category.isHidden && category.id !== rootCategory.id)\r\n ) {\r\n return items;\r\n }\r\n routeLink.items = items;\r\n return routeLink;\r\n}\r\n\r\nexport function newRouteLink(category: ICategory, route: IRoute | undefined, locale: string): IRouteLink {\r\n const href = (route && route.id) ? route.id.toString() : '/';\r\n const id = route?.page || category.id;\r\n const media = category.media || route?.media;\r\n const schema = route?.template || route?.schema || category?.schema || 'unknown';\r\n const title = localize(category.title || route?.title || 'untitled', locale);\r\n const routeLink = {\r\n category: category.id,\r\n href,\r\n id,\r\n items: [],\r\n media,\r\n schema,\r\n title,\r\n };\r\n return routeLink;\r\n}\r\n\r\nexport function resolveRoute(route: IRoute) {\r\n return `/${route.market}/${route.locale}/${route.schema}/${route.page}`;\r\n}\r\n\r\nexport function routeToRouteLink(route: IRoute): IRouteLink {\r\n const routeLink: IRouteLink = {\r\n category: asCategoryId(route.category),\r\n href: route.id,\r\n id: route.page,\r\n items: [],\r\n media: route.media,\r\n schema: route.schema,\r\n title: route.title,\r\n };\r\n return routeLink;\r\n}\r\n\r\n/**\r\n * Converts a route (and optional override title) into an IRouteLink.\r\n * route.id is the pathname (href), route.page is the document ID.\r\n */\r\nexport function routeToLink(route: IRoute, title?: string): IRouteLink {\r\n return {\r\n category: route.category,\r\n href: route.id,\r\n id: route.page,\r\n sch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C,MAAM,MAAM;EACZ,IAAI,MAAM;EACV,OAAO,CAAC;EACR,OAAO,MAAM;EACb,QAAQ,MAAM;EACd,OAAO,MAAM;CAEA;AACjB;;;;;AAMA,SAAgB,YAAY,OAAe,OAA4B;CACrE,OAAO;EACL,UAAU,MAAM;EAChB,MAAM,MAAM;EACZ,IAAI,MAAM;EACV,QAAQ,MAAM;EACd,OAAO,SAAS,MAAM;EACtB,OAAO,MAAM;CACf;AACF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { i as routeToLink } from "./route-DzFwERQP.js";
|
|
2
|
+
import { findRouteOfCategory } from "@websolutespa/bom-core";
|
|
3
|
+
//#region src/lib/breadcrumb.ts
|
|
4
|
+
/**
|
|
5
|
+
* Builds the breadcrumb trail from category segments + the current route.
|
|
6
|
+
* Uses currentRoutes (already filtered by market+locale) to resolve each segment's href.
|
|
7
|
+
* Replicates the logic of getBreadcrumbFromSegments without any store calls.
|
|
8
|
+
*/
|
|
9
|
+
function buildBreadcrumb(segments, currentRoute, currentRoutes) {
|
|
10
|
+
const tree = segments.map((segment) => {
|
|
11
|
+
const route = findRouteOfCategory(currentRoutes, segment.id);
|
|
12
|
+
return route ? routeToLink(route) : null;
|
|
13
|
+
}).filter((x) => x !== null);
|
|
14
|
+
if (!currentRoute.isDefault) tree.push(routeToLink(currentRoute));
|
|
15
|
+
return tree;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/lib/const.ts
|
|
19
|
+
const guest = {
|
|
20
|
+
collection: "users",
|
|
21
|
+
roles: ["guest"]
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/lib/store.ts
|
|
25
|
+
let NextPhase = /* @__PURE__ */ function(NextPhase) {
|
|
26
|
+
NextPhase["Export"] = "phase-export";
|
|
27
|
+
NextPhase["ProductionBuild"] = "phase-production-build";
|
|
28
|
+
NextPhase["ProductionServer"] = "phase-production-server";
|
|
29
|
+
NextPhase["DevelopmentServer"] = "phase-development-server";
|
|
30
|
+
NextPhase["Test"] = "phase-test";
|
|
31
|
+
return NextPhase;
|
|
32
|
+
}({});
|
|
33
|
+
function getNextPhase() {
|
|
34
|
+
let nextPhase = "phase-export";
|
|
35
|
+
if (typeof process !== "undefined" && process.env.NEXT_PHASE) nextPhase = process.env.NEXT_PHASE;
|
|
36
|
+
return nextPhase;
|
|
37
|
+
}
|
|
38
|
+
const nextPhase = getNextPhase();
|
|
39
|
+
let BuildStrategy = /* @__PURE__ */ function(BuildStrategy) {
|
|
40
|
+
BuildStrategy["Static"] = "static";
|
|
41
|
+
BuildStrategy["Runtime"] = "runtime";
|
|
42
|
+
return BuildStrategy;
|
|
43
|
+
}({});
|
|
44
|
+
function getBuildStrategy() {
|
|
45
|
+
let buildStrategy = "static";
|
|
46
|
+
if (typeof process !== "undefined" && process.env.BUILD_STRATEGY) buildStrategy = process.env.BUILD_STRATEGY;
|
|
47
|
+
return buildStrategy;
|
|
48
|
+
}
|
|
49
|
+
const buildStrategy = getBuildStrategy();
|
|
50
|
+
let StoreStrategy = /* @__PURE__ */ function(StoreStrategy) {
|
|
51
|
+
StoreStrategy["Local"] = "local";
|
|
52
|
+
StoreStrategy["Api"] = "api";
|
|
53
|
+
StoreStrategy["DecoratedApi"] = "decoratedApi";
|
|
54
|
+
StoreStrategy["Data"] = "data";
|
|
55
|
+
StoreStrategy["Mock"] = "mock";
|
|
56
|
+
return StoreStrategy;
|
|
57
|
+
}({});
|
|
58
|
+
function getStoreStrategy() {
|
|
59
|
+
let storeStrategy = "mock";
|
|
60
|
+
if (typeof process !== "undefined" && process.env.STORE_STRATEGY) storeStrategy = process.env.STORE_STRATEGY;
|
|
61
|
+
return storeStrategy;
|
|
62
|
+
}
|
|
63
|
+
const storeStrategy = getStoreStrategy();
|
|
64
|
+
function getStoreCacheDuration() {
|
|
65
|
+
let storeCacheDuration = 6e4;
|
|
66
|
+
if (typeof process !== "undefined" && process.env.STORE_CACHE_DURATION) storeCacheDuration = parseInt(process.env.STORE_CACHE_DURATION);
|
|
67
|
+
return storeCacheDuration;
|
|
68
|
+
}
|
|
69
|
+
const storeCacheDuration = getStoreCacheDuration();
|
|
70
|
+
//#endregion
|
|
71
|
+
export { nextPhase as a, guest as c, buildStrategy as i, buildBreadcrumb as l, NextPhase as n, storeCacheDuration as o, StoreStrategy as r, storeStrategy as s, BuildStrategy as t };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=store-CJzqrHsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-CJzqrHsl.js","names":[],"sources":["../src/lib/breadcrumb.ts","../src/lib/const.ts","../src/lib/store.ts"],"sourcesContent":["import { findRouteOfCategory, ICategory, IRoute, IRouteLink } from '@websolutespa/bom-core';\r\nimport { routeToLink } from './route';\r\n\r\n/**\r\n * Builds the breadcrumb trail from category segments + the current route.\r\n * Uses currentRoutes (already filtered by market+locale) to resolve each segment's href.\r\n * Replicates the logic of getBreadcrumbFromSegments without any store calls.\r\n */\r\nexport function buildBreadcrumb(segments: ICategory[], currentRoute: IRoute, currentRoutes: IRoute[]): IRouteLink[] {\r\n const tree: IRouteLink[] = segments\r\n .map(segment => {\r\n const route = findRouteOfCategory(currentRoutes, segment.id);\r\n return route ? routeToLink(route) : null;\r\n })\r\n .filter((x): x is IRouteLink => x !== null);\r\n // Append the leaf page only when it is not the default/index route of its category\r\n if (!currentRoute.isDefault) {\r\n tree.push(routeToLink(currentRoute));\r\n }\r\n return tree;\r\n}\r\n","import type { Config, User } from '@websolutespa/payload-plugin-bowl';\r\n\r\nexport const guest = { collection: 'users', roles: ['guest'] } as (User & Config['user']);\r\n","export enum NextPhase {\r\n Export = 'phase-export',\r\n ProductionBuild = 'phase-production-build',\r\n ProductionServer = 'phase-production-server',\r\n DevelopmentServer = 'phase-development-server',\r\n Test = 'phase-test',\r\n}\r\n\r\nfunction getNextPhase(): NextPhase {\r\n let nextPhase = NextPhase.Export;\r\n if (typeof process !== 'undefined' && process.env.NEXT_PHASE) {\r\n nextPhase = process.env.NEXT_PHASE as NextPhase;\r\n }\r\n return nextPhase;\r\n}\r\n\r\nexport const nextPhase: NextPhase = getNextPhase();\r\n\r\n// buildStrategy\r\nexport enum BuildStrategy {\r\n Static = 'static',\r\n Runtime = 'runtime',\r\n}\r\n\r\nfunction getBuildStrategy(): BuildStrategy {\r\n let buildStrategy = BuildStrategy.Static;\r\n if (typeof process !== 'undefined' && process.env.BUILD_STRATEGY) {\r\n buildStrategy = process.env.BUILD_STRATEGY as BuildStrategy;\r\n }\r\n return buildStrategy;\r\n}\r\n\r\nexport const buildStrategy: BuildStrategy = getBuildStrategy();\r\n\r\n// storeStrategy\r\nexport enum StoreStrategy {\r\n Local = 'local',\r\n Api = 'api',\r\n DecoratedApi = 'decoratedApi',\r\n Data = 'data',\r\n Mock = 'mock',\r\n}\r\n\r\nfunction getStoreStrategy(): StoreStrategy {\r\n let storeStrategy = StoreStrategy.Mock;\r\n if (typeof process !== 'undefined' && process.env.STORE_STRATEGY) {\r\n storeStrategy = process.env.STORE_STRATEGY as StoreStrategy;\r\n }\r\n return storeStrategy;\r\n}\r\n\r\nexport const storeStrategy: StoreStrategy = getStoreStrategy();\r\n\r\n// storeCacheDuration\r\nfunction getStoreCacheDuration(): number {\r\n let storeCacheDuration = (1 * 60 * 1000);\r\n if (typeof process !== 'undefined' && process.env.STORE_CACHE_DURATION) {\r\n storeCacheDuration = parseInt(process.env.STORE_CACHE_DURATION);\r\n }\r\n return storeCacheDuration;\r\n}\r\n\r\nexport const storeCacheDuration: number = getStoreCacheDuration();\r\n"],"mappings":";;;;;;;;AAQA,SAAgB,gBAAgB,UAAuB,cAAsB,eAAuC;CAClH,MAAM,OAAqB,SACxB,KAAI,YAAW;EACd,MAAM,QAAQ,oBAAoB,eAAe,QAAQ,EAAE;EAC3D,OAAO,QAAQ,YAAY,KAAK,IAAI;CACtC,CAAC,CAAC,CACD,QAAQ,MAAuB,MAAM,IAAI;CAE5C,IAAI,CAAC,aA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|
|
3
|
+
path: string;
|
|
4
|
+
method: string;
|
|
5
|
+
headers: Record<string, string | string[] | undefined>;
|
|
6
|
+
};
|
|
7
|
+
type ErrorContext = {
|
|
8
|
+
routerKind: string;
|
|
9
|
+
routePath: string;
|
|
10
|
+
routeType: string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
13
|
+
//#endregion
|
|
14
|
+
export { RequestInfo as n, ErrorContext as t };
|
|
15
|
+
//# sourceMappingURL=types-BatUTdbZ.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BatUTdbZ.d.ts","names":[],"sources":["../src/instrumentation/types.ts"],"mappings":";KACY,WAAA;EAAA,IAAA,EAAA,MAAA;EAMA,MAAA,EAAA,MAAA;WAHD;;KAGC,YAAA"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { ICategorized, IComponent, ILayout, ILocale, IMarket, IMenu, IMenuItem, IPage, IPrettify, IRoute, PageProps } from "@websolutespa/bom-core";
|
|
2
|
+
import { ComponentType, ReactNode } from "react";
|
|
3
|
+
import { Category, EndUser, MixerReadContext, User } from "@websolutespa/payload-plugin-bowl";
|
|
4
|
+
import { BasePayload, CollectionSlug, DataFromCollectionSlug, DataFromGlobalSlug, FindOptions, GlobalSlug, PaginatedDocs, RequestContext, SanitizedConfig, TypedFallbackLocale, TypedLocale } from "payload";
|
|
5
|
+
import { DynamicOptions, Loader } from "next/dynamic";
|
|
6
|
+
|
|
7
|
+
//#region src/server/mixer-payload.d.ts
|
|
8
|
+
/** Fields added to the root document by Bowl's market- and locale-aware reads. */
|
|
9
|
+
type BowlDocumentDecoration = {
|
|
10
|
+
schema: string;
|
|
11
|
+
href?: string | null;
|
|
12
|
+
};
|
|
13
|
+
type BowlDecoratedCategory<T> = T extends null ? null : T extends string ? T : T extends readonly (infer TItem)[] ? BowlDecoratedCategory<TItem>[] : T extends object ? BowlDecoratedValue<T> & {
|
|
14
|
+
href: string | null;
|
|
15
|
+
} : T;
|
|
16
|
+
type BowlDecoratedNav<T> = Extract<T, null | undefined> | IMenuItem | IMenuItem[];
|
|
17
|
+
type BowlDecoratedNavs<T> = T extends null | undefined ? T : IMenuItem[];
|
|
18
|
+
type BowlDecoratedProperty<TKey, TValue> = TValue extends {
|
|
19
|
+
root: unknown;
|
|
20
|
+
} ? string : TKey extends 'category' ? BowlDecoratedCategory<TValue> : TKey extends 'nav' ? BowlDecoratedNav<TValue> : TKey extends 'navs' ? BowlDecoratedNavs<TValue> : BowlDecoratedValue<TValue>;
|
|
21
|
+
type BowlDecoratedObject<T> = { [TKey in keyof T]: BowlDecoratedProperty<TKey, T[TKey]> } & (T extends {
|
|
22
|
+
mimeType?: unknown;
|
|
23
|
+
filename?: unknown;
|
|
24
|
+
} ? {
|
|
25
|
+
type: string;
|
|
26
|
+
} : unknown);
|
|
27
|
+
type BowlDecoratedValue<T> = T extends Date ? T : T extends readonly (infer TItem)[] ? BowlDecoratedValue<TItem>[] : T extends object ? BowlDecoratedObject<T> : T;
|
|
28
|
+
/**
|
|
29
|
+
* Represents a document returned by a Bowl-decorated local Payload read.
|
|
30
|
+
*
|
|
31
|
+
* Localized values are selected by Payload's `locale` option. Bowl recursively
|
|
32
|
+
* serializes Lexical rich-text values to HTML, resolves populated category
|
|
33
|
+
* relationships, normalizes nav fields, and adds upload media types. Bowl menu
|
|
34
|
+
* collections return their `IMenu` projection rather than their stored shape.
|
|
35
|
+
*/
|
|
36
|
+
type BowlDecorator<T, TSlug extends string = ''> = TSlug extends 'menu' ? IMenu : BowlDecoratedValue<T> & BowlDocumentDecoration;
|
|
37
|
+
/** @deprecated Use `BowlDecorator<T>` for a decorated document result. */
|
|
38
|
+
|
|
39
|
+
type DecorateForMixer<T, TSlug extends string, TContext> = TContext extends MixerReadContext ? BowlDecorator<T, TSlug> : T;
|
|
40
|
+
type MixerFindOptions<TSlug extends CollectionSlug, TContext> = Omit<FindOptions<TSlug, any>, 'context'> & {
|
|
41
|
+
context?: TContext;
|
|
42
|
+
};
|
|
43
|
+
type MixerFindByIDOptions<TSlug extends CollectionSlug, TContext> = Omit<FindOptions<TSlug, any>, 'context'> & {
|
|
44
|
+
context?: TContext;
|
|
45
|
+
disableErrors?: boolean;
|
|
46
|
+
id: number | string;
|
|
47
|
+
};
|
|
48
|
+
type MixerFindGlobalOptions<TSlug extends GlobalSlug, TContext> = Omit<FindOptions<CollectionSlug, any>, 'collection' | 'context'> & {
|
|
49
|
+
context?: TContext;
|
|
50
|
+
slug: TSlug;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Type-only view returned by BOM Next's getPayload loader.
|
|
54
|
+
*
|
|
55
|
+
* It is the same Payload instance at runtime. Standard local reads retain
|
|
56
|
+
* generated Payload types until their context includes market and locale.
|
|
57
|
+
*/
|
|
58
|
+
type MixerPayload = Omit<BasePayload, 'find' | 'findByID' | 'findGlobal'> & {
|
|
59
|
+
find: <TSlug extends CollectionSlug, TContext extends RequestContext | undefined = undefined>(options: MixerFindOptions<TSlug, TContext>) => Promise<PaginatedDocs<DecorateForMixer<DataFromCollectionSlug<TSlug>, TSlug, TContext>>>;
|
|
60
|
+
findByID: <TSlug extends CollectionSlug, TContext extends RequestContext | undefined = undefined>(options: MixerFindByIDOptions<TSlug, TContext>) => Promise<DecorateForMixer<DataFromCollectionSlug<TSlug>, TSlug, TContext> | null>;
|
|
61
|
+
findGlobal: <TSlug extends GlobalSlug, TContext extends RequestContext | undefined = undefined>(options: MixerFindGlobalOptions<TSlug, TContext>) => Promise<DecorateForMixer<DataFromGlobalSlug<TSlug>, TSlug, TContext>>;
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/types.d.ts
|
|
65
|
+
type ReadonlyHeaders = Headers & {
|
|
66
|
+
/** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */
|
|
67
|
+
append(...args: any[]): void;
|
|
68
|
+
/** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */
|
|
69
|
+
set(...args: any[]): void;
|
|
70
|
+
/** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */
|
|
71
|
+
delete(...args: any[]): void;
|
|
72
|
+
};
|
|
73
|
+
type BaseOptions = {
|
|
74
|
+
currentDepth?: number;
|
|
75
|
+
depth?: number;
|
|
76
|
+
disableErrors?: boolean;
|
|
77
|
+
fallbackLocale?: TypedFallbackLocale;
|
|
78
|
+
includeLockStatus?: boolean;
|
|
79
|
+
limit?: number;
|
|
80
|
+
locale?: 'all' | TypedLocale;
|
|
81
|
+
overrideAccess?: boolean;
|
|
82
|
+
page?: number;
|
|
83
|
+
pagination?: boolean;
|
|
84
|
+
showHiddenFields?: boolean;
|
|
85
|
+
trash?: boolean;
|
|
86
|
+
user?: any;
|
|
87
|
+
draft?: boolean;
|
|
88
|
+
};
|
|
89
|
+
type LocalProvider = {
|
|
90
|
+
config: Promise<SanitizedConfig> | undefined;
|
|
91
|
+
sanitizedConfig: SanitizedConfig | undefined;
|
|
92
|
+
payload: BasePayload | undefined;
|
|
93
|
+
};
|
|
94
|
+
type SearchParams = {
|
|
95
|
+
[key: string]: string | string[] | undefined;
|
|
96
|
+
};
|
|
97
|
+
type MarketLocaleParams = {
|
|
98
|
+
market: string;
|
|
99
|
+
locale: string;
|
|
100
|
+
};
|
|
101
|
+
type NotFoundParams = IPrettify<MarketLocaleParams & {
|
|
102
|
+
slug: string;
|
|
103
|
+
}>;
|
|
104
|
+
type NotFoundContext = Readonly<{
|
|
105
|
+
params: Promise<NotFoundParams>;
|
|
106
|
+
}>;
|
|
107
|
+
type LayoutContext = Readonly<{
|
|
108
|
+
children: ReactNode;
|
|
109
|
+
params: Promise<MarketLocaleParams>;
|
|
110
|
+
}>;
|
|
111
|
+
type PageParams = IPrettify<MarketLocaleParams & {
|
|
112
|
+
id: string;
|
|
113
|
+
}>;
|
|
114
|
+
type PageContext = Readonly<{
|
|
115
|
+
params: Promise<PageParams>;
|
|
116
|
+
searchParams?: Promise<SearchParams>;
|
|
117
|
+
}>;
|
|
118
|
+
type PageLayoutContext = Readonly<{
|
|
119
|
+
params: Promise<PageParams>;
|
|
120
|
+
children: ReactNode;
|
|
121
|
+
}>;
|
|
122
|
+
type PartialPageProps<T extends ICategorized, B> = Omit<PageProps<T>, 'page'> & Partial<Pick<PageProps<T>, 'page'>> & B;
|
|
123
|
+
type ComponentProps<T extends Record<string, any> = Record<string, any>> = {
|
|
124
|
+
item: IComponent & T;
|
|
125
|
+
};
|
|
126
|
+
type ComponentContext<T extends Record<string, any> = Record<string, any>> = PageContext & {
|
|
127
|
+
page: IPage;
|
|
128
|
+
} & ComponentProps<T>;
|
|
129
|
+
type IUser = User;
|
|
130
|
+
type IEndUser = EndUser;
|
|
131
|
+
type MixerContext = {
|
|
132
|
+
market: string;
|
|
133
|
+
marketIds: string[];
|
|
134
|
+
markets: IMarket[];
|
|
135
|
+
locale: string;
|
|
136
|
+
localeIds: string[];
|
|
137
|
+
locales: ILocale[];
|
|
138
|
+
routes: IRoute[];
|
|
139
|
+
currentRoutes: IRoute[];
|
|
140
|
+
categories: Category[];
|
|
141
|
+
richText: boolean;
|
|
142
|
+
};
|
|
143
|
+
type IContext = {
|
|
144
|
+
payload: MixerPayload;
|
|
145
|
+
context: MixerContext;
|
|
146
|
+
};
|
|
147
|
+
type PageDocument<TSlug extends CollectionSlug> = DataFromCollectionSlug<TSlug>;
|
|
148
|
+
/** A generated page collection document enriched with Bowl's page envelope. */
|
|
149
|
+
type TypedPage<TSlug extends CollectionSlug> = BowlDecorator<PageDocument<TSlug>> & IPage<ICategorized>;
|
|
150
|
+
type TypedPageContext<TSlug extends CollectionSlug = CollectionSlug> = {
|
|
151
|
+
layout: ILayout;
|
|
152
|
+
page: TypedPage<TSlug> | undefined;
|
|
153
|
+
user: IUser | IEndUser | null;
|
|
154
|
+
label: (key: string, params?: Record<string, any>) => string;
|
|
155
|
+
link: (category: string) => string | undefined;
|
|
156
|
+
};
|
|
157
|
+
/** Broad page context used where the page collection is only known at runtime. */
|
|
158
|
+
type IPageContext = TypedPageContext;
|
|
159
|
+
type ILazyComponent = IComponent;
|
|
160
|
+
type ILazyProps<T> = {
|
|
161
|
+
item: T & ILazyComponent;
|
|
162
|
+
index: number;
|
|
163
|
+
children?: ReactNode;
|
|
164
|
+
};
|
|
165
|
+
type ILazyableProps<T> = {
|
|
166
|
+
item: T & Partial<ILazyComponent>;
|
|
167
|
+
index?: number;
|
|
168
|
+
children?: ReactNode;
|
|
169
|
+
};
|
|
170
|
+
type INullableLazyableProps<T> = {
|
|
171
|
+
item?: T & Partial<ILazyComponent>;
|
|
172
|
+
index?: number;
|
|
173
|
+
children?: ReactNode;
|
|
174
|
+
};
|
|
175
|
+
type ILazyedProps<T> = Omit<ILazyProps<T>, 'children'>;
|
|
176
|
+
type ILazyComponentProps = {
|
|
177
|
+
item: ILazyComponent;
|
|
178
|
+
index: number;
|
|
179
|
+
};
|
|
180
|
+
type ILazyModules = Record<string, ComponentType<ILazyProps<any>>>;
|
|
181
|
+
type ILazyComponentFunc<P = {}> = DynamicOptions<P> | Loader<P>;
|
|
182
|
+
type ILazyFuncProps<T> = IContext & IPageContext & {
|
|
183
|
+
component: T & ILazyComponent;
|
|
184
|
+
};
|
|
185
|
+
type ILazyStaticPropsFunc<T = any> = (props: ILazyFuncProps<T>) => Promise<T & ILazyComponent>;
|
|
186
|
+
type ILazyStaticProps = Record<string, ILazyStaticPropsFunc>;
|
|
187
|
+
//# sourceMappingURL=types.d.ts.map
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
export { ReadonlyHeaders as A, NotFoundContext as C, PageLayoutContext as D, PageDocument as E, TypedPage as M, TypedPageContext as N, PageParams as O, MixerPayload as P, MixerContext as S, PageContext as T, IPageContext as _, IEndUser as a, LocalProvider as b, ILazyComponentProps as c, ILazyProps as d, ILazyStaticProps as f, INullableLazyableProps as g, ILazyedProps as h, IContext as i, SearchParams as j, PartialPageProps as k, ILazyFuncProps as l, ILazyableProps as m, ComponentContext as n, ILazyComponent as o, ILazyStaticPropsFunc as p, ComponentProps as r, ILazyComponentFunc as s, BaseOptions as t, ILazyModules as u, IUser as v, NotFoundParams as w, MarketLocaleParams as x, LayoutContext as y };
|
|
191
|
+
//# sourceMappingURL=types-D29_snYY.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-D29_snYY.d.ts","names":[],"sources":["../src/server/mixer-payload.ts","../src/types.ts"],"mappings":";;;;;;;;KAcY,sBAAA;;;AAAZ,CAAA;AAGE,KAEG,qBAAA,CAAA,CAAqB,CAAA,GAAM,CAAN,SAAA,IAAA,GAAA,IAAA,GAEtB,CAFsB,SAAA,MAAA,GAGtB,CAHsB,GAItB,CAJsB,SAAA,SAAA,CAAA,KAAA,MAAA,CAAA,EAAA,GAKtB,qBALsB,CAKA,KALA,CAAA,EAAA,GAMtB,CANsB,SAAA,MAAA,GAOtB,kBAPsB,CAOH,CAPG,CAAA,GAAA;EAAA,IAAA,EAAA,MAAA,GAAA,IAAA;AAAM,CAAA,GAQ5B,CAR4B;AAE5B,KAQC,gBARD,CAAA,CAAA,CAAA,GAQuB,OARvB,CAQ+B,CAR/B,EAAA,IAAA,GAAA,SAAA,CAAA,GAQsD,SARtD,GAQkE,SARlE,EAAA;AACA,KASC,iBATD,CAAA,CAAA,CAAA,GASwB,CATxB,SAAA,IAAA,GAAA,SAAA,GASqD,CATrD,GASyD,SATzD,EAAA;AACA,KAUC,qBAVD,CAAA,IAAA,EAAA,MAAA,CAAA,GAUuC,MAVvC,SAAA;EACsB,IAAA,EAAA,OAAA;AAAtB,CAAA,GAAA,MAAA,GAWA,IAXA,SAAA,UAAA,GAYA,qBAZA,CAYsB,MAZtB,CAAA,GAaA,IAbA,SAAA,KAAA,GAcA,gBAdA,CAciB,MAdjB,CAAA,GAeA,IAfA,SAAA,MAAA,GAgBA,i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