@voyantjs/availability-react 0.108.0 → 0.109.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/admin/index.d.ts +4 -6
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +21 -13
- package/package.json +14 -14
package/dist/admin/index.d.ts
CHANGED
|
@@ -17,12 +17,10 @@ declare module "@voyantjs/admin" {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export { AvailabilitySlotDetailHost, type AvailabilitySlotDetailHostProps, } from "./slot-detail-host.js";
|
|
25
|
-
export { AvailabilityStartTimeDetailHost, type AvailabilityStartTimeDetailHostProps, } from "./start-time-detail-host.js";
|
|
20
|
+
export type { OptionResourceTemplatesPanelProps } from "./option-resource-templates-panel.js";
|
|
21
|
+
export type { AvailabilityRuleDetailHostProps } from "./rule-detail-host.js";
|
|
22
|
+
export type { AvailabilitySlotDetailHostProps } from "./slot-detail-host.js";
|
|
23
|
+
export type { AvailabilityStartTimeDetailHostProps } from "./start-time-detail-host.js";
|
|
26
24
|
export interface CreateAvailabilityAdminExtensionOptions {
|
|
27
25
|
/** Mount path of the availability pages inside the admin workspace. Default `/availability`. */
|
|
28
26
|
basePath?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,iBAAiB,CAAA;AAsBxB;;;;;;;GAOG;AACH,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,iBAAiB;QACzB,6DAA6D;QAC7D,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC9C,gDAAgD;QAChD,8BAA8B,EAAE;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,CAAA;KACxD;CACF;AAYD,YAAY,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAA;AAC7F,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AAC5E,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AAC5E,YAAY,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAA;AAEvF,MAAM,WAAW,uCAAuC;IACtD,gGAAgG;IAChG,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,GAAE,uCAA4C,GACpD,cAAc,CA0FhB"}
|
package/dist/admin/index.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { adminRoutePageModule, defineAdminExtension, } from "@voyantjs/admin";
|
|
2
|
+
// Lean static only: the client module (fetcher). The page-data helper pulls
|
|
3
|
+
// the availability query options (client + response schemas), so the index
|
|
4
|
+
// loader resolves it via dynamic import instead of pinning it into the
|
|
5
|
+
// workspace-chrome chunk that evaluates this factory.
|
|
6
|
+
import { defaultFetcher } from "../client.js";
|
|
2
7
|
import { AvailabilityPageSkeleton, AvailabilityRuleDetailSkeleton, AvailabilitySlotDetailSkeleton, AvailabilityStartTimeDetailSkeleton, } from "../components/availability-skeletons.js";
|
|
3
|
-
import { defaultFetcher } from "../index.js";
|
|
4
|
-
import { ensureAvailabilityPageData } from "./availability-page-data.js";
|
|
5
|
-
// Packaged admin hosts (packaged-admin RFC Phase 3): the operator-grade
|
|
6
|
-
// availability pages bound to their data wiring + semantic-destination
|
|
7
|
-
// navigation. Host route files only bind route params onto these.
|
|
8
|
-
export { AvailabilityIndexHost } from "./availability-index-host.js";
|
|
9
|
-
export { ensureAvailabilityPageData } from "./availability-page-data.js";
|
|
10
|
-
export { OptionResourceTemplatesPanel, } from "./option-resource-templates-panel.js";
|
|
11
|
-
export { AvailabilityRuleDetailHost, } from "./rule-detail-host.js";
|
|
12
|
-
export { AvailabilitySlotDetailHost, } from "./slot-detail-host.js";
|
|
13
|
-
export { AvailabilityStartTimeDetailHost, } from "./start-time-detail-host.js";
|
|
14
8
|
/**
|
|
15
9
|
* The availability admin contribution (packaged-admin RFC Phase 3,
|
|
16
10
|
* `@voyantjs/<domain>-ui/admin` convention).
|
|
@@ -58,18 +52,30 @@ export function createAvailabilityAdminExtension(options = {}) {
|
|
|
58
52
|
id: "availability-index",
|
|
59
53
|
path: basePath,
|
|
60
54
|
title: availability,
|
|
55
|
+
// Route-backed destination (RFC §4.7 endgame): the key resolves by
|
|
56
|
+
// pure path interpolation of this route, so the host's resolver is
|
|
57
|
+
// generated (`voyant admin generate --destinations`).
|
|
58
|
+
destination: "availabilitySlot.list",
|
|
61
59
|
ssr: "data-only",
|
|
62
60
|
page: () => import("./availability-index-host.js").then((module) => adminRoutePageModule(module.AvailabilityIndexHost)),
|
|
63
61
|
// Awaits only what the slots tab + the products picker need for
|
|
64
62
|
// first paint; the slot dialog's rules/start-times dimensions
|
|
65
|
-
// prefetch in the background.
|
|
66
|
-
|
|
63
|
+
// prefetch in the background. Dynamic import on purpose: the helper
|
|
64
|
+
// pulls the availability query options, and a static import here
|
|
65
|
+
// would pin them into the workspace-chrome chunk.
|
|
66
|
+
loader: async ({ queryClient, runtime }) => {
|
|
67
|
+
const { ensureAvailabilityPageData } = await import("./availability-page-data.js");
|
|
68
|
+
return ensureAvailabilityPageData(queryClient, loaderClient(runtime));
|
|
69
|
+
},
|
|
67
70
|
pendingComponent: AvailabilityPageSkeleton,
|
|
68
71
|
},
|
|
69
72
|
{
|
|
70
73
|
id: "availability-slot-detail",
|
|
71
74
|
path: `${basePath}/$id`,
|
|
72
75
|
title: availability,
|
|
76
|
+
// Key declared by @voyantjs/bookings-react/admin (bound type-only above).
|
|
77
|
+
destination: "availabilitySlot.detail",
|
|
78
|
+
destinationParams: { id: "slotId" },
|
|
73
79
|
page: () => import("./pages/availability-slot-detail-page.js"),
|
|
74
80
|
loader: async ({ queryClient, runtime, params }) => {
|
|
75
81
|
const id = params.id;
|
|
@@ -104,6 +110,8 @@ export function createAvailabilityAdminExtension(options = {}) {
|
|
|
104
110
|
id: "availability-start-time-detail",
|
|
105
111
|
path: `${basePath}/start-times/$id`,
|
|
106
112
|
title: availability,
|
|
113
|
+
destination: "availabilityStartTime.detail",
|
|
114
|
+
destinationParams: { id: "startTimeId" },
|
|
107
115
|
page: () => import("./pages/availability-start-time-detail-page.js"),
|
|
108
116
|
loader: async ({ queryClient, runtime, params }) => {
|
|
109
117
|
const id = params.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/availability-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.109.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"react-hook-form": "^7.72.1",
|
|
74
74
|
"sonner": "^2.0.7",
|
|
75
75
|
"zod": "^4.0.0",
|
|
76
|
-
"@voyantjs/
|
|
77
|
-
"@voyantjs/allocation-ui": "^0.
|
|
78
|
-
"@voyantjs/availability": "^0.
|
|
79
|
-
"@voyantjs/
|
|
80
|
-
"@voyantjs/extras-react": "^0.
|
|
81
|
-
"@voyantjs/
|
|
82
|
-
"@voyantjs/
|
|
76
|
+
"@voyantjs/bookings-react": "^0.112.0",
|
|
77
|
+
"@voyantjs/allocation-ui": "^0.110.0",
|
|
78
|
+
"@voyantjs/availability": "^0.109.0",
|
|
79
|
+
"@voyantjs/products-react": "^0.112.0",
|
|
80
|
+
"@voyantjs/extras-react": "^0.112.0",
|
|
81
|
+
"@voyantjs/ui": "^0.106.0",
|
|
82
|
+
"@voyantjs/admin": "^0.109.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
85
85
|
"@tanstack/react-table": {
|
|
@@ -130,13 +130,13 @@
|
|
|
130
130
|
"typescript": "^6.0.2",
|
|
131
131
|
"vitest": "^4.1.2",
|
|
132
132
|
"zod": "^4.3.6",
|
|
133
|
-
"@voyantjs/admin": "^0.
|
|
134
|
-
"@voyantjs/allocation-ui": "^0.
|
|
135
|
-
"@voyantjs/availability": "^0.
|
|
136
|
-
"@voyantjs/bookings-react": "^0.
|
|
137
|
-
"@voyantjs/extras-react": "^0.
|
|
133
|
+
"@voyantjs/admin": "^0.109.0",
|
|
134
|
+
"@voyantjs/allocation-ui": "^0.110.0",
|
|
135
|
+
"@voyantjs/availability": "^0.109.0",
|
|
136
|
+
"@voyantjs/bookings-react": "^0.112.0",
|
|
137
|
+
"@voyantjs/extras-react": "^0.112.0",
|
|
138
138
|
"@voyantjs/i18n": "^0.106.0",
|
|
139
|
-
"@voyantjs/products-react": "^0.
|
|
139
|
+
"@voyantjs/products-react": "^0.112.0",
|
|
140
140
|
"@voyantjs/react": "^0.104.1",
|
|
141
141
|
"@voyantjs/ui": "^0.106.0",
|
|
142
142
|
"@voyantjs/voyant-typescript-config": "^0.1.0"
|