cabloy 5.1.174 → 5.1.176
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/.cabloy-version +1 -1
- package/.claude/scheduled_tasks.lock +1 -1
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +4 -0
- package/CHANGELOG.md +25 -0
- package/package.json +2 -2
- package/repo-docs/.vitepress/config.mjs +7 -0
- package/repo-docs/frontend/a-model-under-the-hood.md +11 -0
- package/repo-docs/frontend/behavior-guide.md +73 -0
- package/repo-docs/frontend/column-configuration-guide.md +254 -0
- package/repo-docs/frontend/component-guide.md +2 -29
- package/repo-docs/frontend/controller-boundary-guide.md +229 -0
- package/repo-docs/frontend/introduction.md +4 -0
- package/repo-docs/frontend/page-route-guide.md +6 -0
- package/repo-docs/frontend/resource-picker-guide.md +223 -0
- package/repo-docs/frontend/rest-resource-source-reading-map.md +37 -21
- package/repo-docs/frontend/rest-resource-under-the-hood.md +50 -30
- package/repo-docs/frontend/routed-dialog-guide.md +471 -0
- package/repo-docs/frontend/router-stack-guide.md +4 -2
- package/repo-docs/frontend/router-view-hosts-guide.md +3 -2
- package/repo-docs/frontend/ssr-client-only.md +6 -0
- package/repo-docs/frontend/table-guide.md +2 -1
- package/repo-docs/frontend/table-resource-crud-cookbook.md +1 -0
- package/repo-docs/frontend/use-state-data-best-practices.md +26 -0
- package/repo-docs/fullstack/a-pay-payment-suite.md +31 -17
- package/repo-e2e/specs/cabloy-basic.spec.ts +11 -0
- package/repo-e2e/specs/controller-boundary.spec.ts +1 -2
- package/test-results/.last-run.json +1 -1
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-core/src/lib/utils/util.ts +1 -0
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-layoutprofile/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-layoutprofile/test/layoutprofile.test.ts +2 -3
- package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-executor/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-executor/src/service/executor.ts +6 -1
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/package.original.json +1 -1
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +45 -38
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/page/product/controller.tsx +4 -3
- package/zova/src/suite/a-commerce/modules/commerce-member/src/page/address/controller.tsx +4 -3
- package/zova/src/suite/a-commerce/modules/commerce-trade/package.json +3 -1
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionAdjustStock/controller.tsx +3 -2
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionRefund/controller.tsx +16 -20
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionShip/controller.tsx +3 -2
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/cart/controller.tsx +6 -5
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/checkout/controller.tsx +5 -4
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/order/controller.tsx +4 -4
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +1 -1
- package/zova/src/suite/a-demo/modules/demo-basic/src/page/controllerBoundary/controller.tsx +2 -2
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +4 -4
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +4 -4
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/monkey.ts +11 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/types/appModal.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/test/lib/routedDialogContext.test.ts +60 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionUpdate.tsx +4 -4
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/actionCreate/controller.tsx +4 -4
- package/zova/src/suite/cabloy-basic/modules/basic-metrics/src/page/dashboard/controller.tsx +8 -2
- package/zova/src/{suite-vendor/a-zova/modules/a-boundary → suite/cabloy-basic/modules/basic-pay}/package.json +13 -5
- package/zova/src/{suite-vendor/a-pay/modules/a-pay → suite/cabloy-basic/modules/basic-pay}/src/.metadata/component/paymentNextAction.ts +2 -2
- package/zova/src/suite/cabloy-basic/modules/basic-pay/src/.metadata/index.ts +68 -0
- package/zova/src/suite/cabloy-basic/modules/basic-pay/src/.metadata/this.ts +2 -0
- package/zova/src/{suite-vendor/a-pay/modules/a-pay → suite/cabloy-basic/modules/basic-pay}/src/component/paymentNextAction/controller.tsx +13 -24
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/bean/tableCell.actionUpdate.tsx +4 -4
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/actionCreate/controller.tsx +4 -4
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/actionDeleteBulk/controller.tsx +4 -4
- package/zova/src/suite/cabloy-basic/package.json +1 -0
- package/zova/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/.metadata/index.ts +4 -46
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/types/payment.ts +13 -0
- package/zova/src/suite-vendor/a-pay/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-router/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts +17 -3
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +1 -2
- package/zova/src/suite-vendor/a-zova/package.json +3 -4
- package/zova/src/suite-vendor/a-zova/modules/a-boundary/LICENSE +0 -21
- package/zova/src/suite-vendor/a-zova/modules/a-boundary/src/.metadata/index.ts +0 -26
- package/zova/src/suite-vendor/a-zova/modules/a-boundary/src/.metadata/this.ts +0 -2
- /package/zova/src/{suite-vendor/a-zova/modules/a-boundary → suite/cabloy-basic/modules/basic-pay}/src/index.ts +0 -0
- /package/zova/src/{suite-vendor/a-zova/modules/a-boundary → suite/cabloy-basic/modules/basic-pay}/tsconfig.build.json +0 -0
- /package/zova/src/{suite-vendor/a-zova/modules/a-boundary → suite/cabloy-basic/modules/basic-pay}/tsconfig.json +0 -0
|
@@ -9,6 +9,7 @@ Use this page together with:
|
|
|
9
9
|
- [Using `ModelResource` in Your Module](/frontend/model-resource-usage-guide)
|
|
10
10
|
- [Table + Resource CRUD Cookbook](/frontend/table-resource-crud-cookbook)
|
|
11
11
|
- [Form Guide](/frontend/form-guide)
|
|
12
|
+
- [Resource Picker Guide](/frontend/resource-picker-guide)
|
|
12
13
|
- [Zova Source Reading Map](/frontend/zova-source-reading-map)
|
|
13
14
|
|
|
14
15
|
Use this page after [Model Resource Owner Pattern](/frontend/model-resource-owner-pattern) when you want to move from the model-focused explanation to the internal cooperation among route records, generated page wrappers, page-shell controllers, schema-driven block rendering, selector-backed resource ownership, and downstream CRUD block runtimes.
|
|
@@ -62,12 +63,12 @@ This page is that bridge.
|
|
|
62
63
|
|
|
63
64
|
For a typical `rest-resource` page, the shortest accurate model is:
|
|
64
65
|
|
|
65
|
-
1. `routes.ts` declares one generic resource list route
|
|
66
|
+
1. `routes.ts` declares one generic resource list route, two generic resource entry routes, and one host-dependent Resource Picker route
|
|
66
67
|
2. generated `ZPage*` wrappers bind those route records to page-controller classes through `createZovaComponentPage(...)`
|
|
67
|
-
3. the page
|
|
68
|
+
3. the ordinary page controllers resolve a selector-backed `ModelResource` instance from the current `resource`; the picker controller also requires a matching host-scoped picker contract
|
|
68
69
|
4. `ModelResource.__init__(resource)` bootstraps the resource metadata and resolves the final `resourceApi`
|
|
69
70
|
5. the model exposes resource-level computed surfaces such as permissions, form provider, and select/view/create/update schemas
|
|
70
|
-
6. the list
|
|
71
|
+
6. the list and picker shells read `schemaRow.rest.blocks`, while the entry shell reads `formSchema.rest.blocks`
|
|
71
72
|
7. those blocks usually enter downstream generic runtimes such as `basic-page:blockPage` or `basic-pageentry:blockPageEntry`
|
|
72
73
|
8. those downstream runtimes resolve the same selector-backed `ModelResource` again and own the deeper list/form behavior
|
|
73
74
|
9. commands such as delete can also reuse the same model boundary instead of inventing page-local mutation logic
|
|
@@ -93,10 +94,11 @@ Use this diagram when the question is:
|
|
|
93
94
|
```text
|
|
94
95
|
Route record
|
|
95
96
|
└─ routes.ts
|
|
96
|
-
└─ ZPageResource / ZPageEntry / ZPageEntryCreate
|
|
97
|
+
└─ ZPageResource / ZPageEntry / ZPageEntryCreate / ZPageResourcePicker
|
|
97
98
|
└─ createZovaComponentPage(...)
|
|
98
99
|
└─ page-controller shell
|
|
99
100
|
├─ resolves current resource / id / formScene
|
|
101
|
+
├─ picker route additionally resolves its host-scoped picker contract
|
|
100
102
|
├─ resolves selector-backed ModelResource
|
|
101
103
|
├─ ensures top-level API schema surface is loaded
|
|
102
104
|
└─ reads schemaRow.rest.blocks or formSchema.rest.blocks
|
|
@@ -127,7 +129,8 @@ Route record
|
|
|
127
129
|
|
|
128
130
|
Read this top-down:
|
|
129
131
|
|
|
130
|
-
- the route and page shell choose the scene
|
|
132
|
+
- the ordinary route and page shell choose the CRUD scene
|
|
133
|
+
- the picker route additionally requires its routed-dialog host to choose its selection workflow
|
|
131
134
|
- schema metadata chooses the block composition
|
|
132
135
|
- generic Basic blocks own the richer CRUD page behavior
|
|
133
136
|
- `ModelResource` remains the stable owner of resource semantics underneath all of them
|
|
@@ -140,6 +143,7 @@ The smallest module-level source set is:
|
|
|
140
143
|
zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/routes.ts
|
|
141
144
|
zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resource/controller.tsx
|
|
142
145
|
zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/entry/controller.tsx
|
|
146
|
+
zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resourcePicker/controller.tsx
|
|
143
147
|
zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts
|
|
144
148
|
```
|
|
145
149
|
|
|
@@ -166,14 +170,16 @@ When you want to trace the full mechanism, read these files in order:
|
|
|
166
170
|
2. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/.metadata/page/resource.ts`
|
|
167
171
|
3. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/.metadata/page/entry.ts`
|
|
168
172
|
4. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/.metadata/page/entryCreate.ts`
|
|
169
|
-
5. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/
|
|
170
|
-
6. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/
|
|
171
|
-
7. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/
|
|
172
|
-
8. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/
|
|
173
|
-
9. `zova/src/suite/cabloy
|
|
174
|
-
10. `zova/src/suite/cabloy
|
|
175
|
-
11. `zova/src/suite/cabloy-basic/modules/basic-
|
|
176
|
-
12. `zova/src/suite
|
|
173
|
+
5. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/.metadata/page/resourcePicker.ts`
|
|
174
|
+
6. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resource/controller.tsx`
|
|
175
|
+
7. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/entry/controller.tsx`
|
|
176
|
+
8. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/entryCreate/controller.tsx`
|
|
177
|
+
9. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resourcePicker/controller.tsx`
|
|
178
|
+
10. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts`
|
|
179
|
+
11. `zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPage/controller.tsx`
|
|
180
|
+
12. `zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockPageEntry/controller.tsx`
|
|
181
|
+
13. `zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.delete.tsx`
|
|
182
|
+
14. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/.metadata/index.ts`
|
|
177
183
|
|
|
178
184
|
A compact role map is:
|
|
179
185
|
|
|
@@ -182,6 +188,7 @@ A compact role map is:
|
|
|
182
188
|
- `page/resource/controller.tsx` shows the list-page shell
|
|
183
189
|
- `page/entry/controller.tsx` shows the entry-page shell
|
|
184
190
|
- `page/entryCreate/controller.tsx` shows virtual create-route reuse
|
|
191
|
+
- `page/resourcePicker/controller.tsx` shows the host-dependent picker shell
|
|
185
192
|
- `model/resource.ts` shows the owner core
|
|
186
193
|
- `blockPage/controller.tsx` shows the deeper list runtime
|
|
187
194
|
- `blockPageEntry/controller.tsx` shows the deeper form runtime
|
|
@@ -198,29 +205,28 @@ Start with:
|
|
|
198
205
|
zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/routes.ts
|
|
199
206
|
```
|
|
200
207
|
|
|
201
|
-
This file declares
|
|
208
|
+
This file declares four routes:
|
|
202
209
|
|
|
203
210
|
- `:resource`
|
|
204
211
|
- `:resource/create`
|
|
205
212
|
- `:resource/:id/:formScene?`
|
|
213
|
+
- `:resource/picker`
|
|
206
214
|
|
|
207
|
-
|
|
215
|
+
The first three are ordinary resource workspace routes. The fourth is the host-dependent Resource Picker route; it is normally embedded in a routed dialog instead of entered as a direct browser destination. See [Resource Picker Guide](/frontend/resource-picker-guide) for the public field contract.
|
|
208
216
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
It is a generic module whose runtime identity comes from the route params.
|
|
217
|
+
The module is not a resource-specific module such as Student or Product. Its runtime identity comes from the route params.
|
|
212
218
|
|
|
213
219
|
### Why the shared `tabKey` matters
|
|
214
220
|
|
|
215
|
-
|
|
221
|
+
The list, create, and entry routes use the same `tabKey(route)` shape:
|
|
216
222
|
|
|
217
223
|
```typescript
|
|
218
224
|
`/rest/resource/${encodeURIComponent(route.params.resource)}`;
|
|
219
225
|
```
|
|
220
226
|
|
|
221
|
-
This means
|
|
227
|
+
This means their workspace identity is resource-level rather than row-level. The picker route deliberately does not share the workspace tab identity because its controller requires the host-scoped picker contract supplied by the routed-dialog caller.
|
|
222
228
|
|
|
223
|
-
|
|
229
|
+
The list page, create page, and entry page for one resource remain grouped under one resource-oriented tab boundary.
|
|
224
230
|
|
|
225
231
|
## 2. Generated page wrappers enter the normal Zova page-controller path
|
|
226
232
|
|
|
@@ -229,6 +235,7 @@ Read next:
|
|
|
229
235
|
- `src/.metadata/page/resource.ts`
|
|
230
236
|
- `src/.metadata/page/entry.ts`
|
|
231
237
|
- `src/.metadata/page/entryCreate.ts`
|
|
238
|
+
- `src/.metadata/page/resourcePicker.ts`
|
|
232
239
|
|
|
233
240
|
These files are intentionally thin.
|
|
234
241
|
|
|
@@ -237,6 +244,7 @@ They show that each route component is generated as a `ZPage*` wrapper through:
|
|
|
237
244
|
- `createZovaComponentPage(ControllerPageResource, ...)`
|
|
238
245
|
- `createZovaComponentPage(ControllerPageEntry, ...)`
|
|
239
246
|
- `createZovaComponentPage(ControllerPageEntryCreate, ...)`
|
|
247
|
+
- `createZovaComponentPage(ControllerPageResourcePicker, ...)`
|
|
240
248
|
|
|
241
249
|
They also surface the Zod-based params schemas for each page.
|
|
242
250
|
|
|
@@ -333,7 +341,19 @@ This is an important Zova design clue:
|
|
|
333
341
|
- page identity can differ
|
|
334
342
|
- controller logic can still stay shared
|
|
335
343
|
|
|
336
|
-
## 6.
|
|
344
|
+
## 6. Resource Picker shell requires its routed-dialog host
|
|
345
|
+
|
|
346
|
+
Read:
|
|
347
|
+
|
|
348
|
+
```text
|
|
349
|
+
zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resourcePicker/controller.tsx
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
`ControllerPageResourcePicker` resolves the target resource and its select schema, then renders the target resource's existing list blocks through a host adapter. It is intentionally unlike the ordinary CRUD page shells: it requires a host-scoped picker contract, verifies that the host resource matches the route resource, and delegates selection adaptation plus confirmation/cancellation to that host.
|
|
353
|
+
|
|
354
|
+
The route is therefore part of a hosted routed-dialog workflow rather than a standalone page-navigation surface. For the supported metadata, value, and display contract, see [Resource Picker Guide](/frontend/resource-picker-guide).
|
|
355
|
+
|
|
356
|
+
## 7. `ModelResource` is the owner core behind both shells
|
|
337
357
|
|
|
338
358
|
Read:
|
|
339
359
|
|
|
@@ -345,7 +365,7 @@ This file is the stable owner boundary behind the route shells.
|
|
|
345
365
|
|
|
346
366
|
At the module-runtime level, the most important steps are:
|
|
347
367
|
|
|
348
|
-
###
|
|
368
|
+
### 7.1 Selector-backed initialization
|
|
349
369
|
|
|
350
370
|
`ModelResource` is decorated with:
|
|
351
371
|
|
|
@@ -361,7 +381,7 @@ protected async __init__(resource: string)
|
|
|
361
381
|
|
|
362
382
|
That means one generic model class can serve many resources safely, because the runtime identity comes from the selector resource name.
|
|
363
383
|
|
|
364
|
-
###
|
|
384
|
+
### 7.2 Bootstrap resolves the final `resourceApi`
|
|
365
385
|
|
|
366
386
|
Inside initialization, `_bootstrap()` calls:
|
|
367
387
|
|
|
@@ -381,7 +401,7 @@ The model does not assume a hardcoded final API path.
|
|
|
381
401
|
|
|
382
402
|
It bootstraps the resource metadata first, then derives the stable runtime API boundary from that metadata.
|
|
383
403
|
|
|
384
|
-
###
|
|
404
|
+
### 7.3 The model exposes resource-level metadata surfaces
|
|
385
405
|
|
|
386
406
|
Still inside initialization, the model creates computed surfaces for:
|
|
387
407
|
|
|
@@ -398,7 +418,7 @@ That is why the page shells can stay thin.
|
|
|
398
418
|
|
|
399
419
|
They do not need to invent schema or permission lookup rules locally, because the owner already exposes them.
|
|
400
420
|
|
|
401
|
-
###
|
|
421
|
+
### 7.4 The model owns query, mutation, and form semantics
|
|
402
422
|
|
|
403
423
|
The same owner also provides:
|
|
404
424
|
|
|
@@ -419,7 +439,7 @@ A practical reading takeaway is:
|
|
|
419
439
|
|
|
420
440
|
> routes and page shells give the module its outer shape, but `ModelResource` gives it its resource truth.
|
|
421
441
|
|
|
422
|
-
##
|
|
442
|
+
## 8. `basic-page:blockPage` is the deeper list runtime
|
|
423
443
|
|
|
424
444
|
Read:
|
|
425
445
|
|
|
@@ -450,7 +470,7 @@ rest-resource page shell
|
|
|
450
470
|
|
|
451
471
|
So if you are debugging list-page behavior such as paging, filtering, or table refresh, stopping at `ControllerPageResource` is usually too early.
|
|
452
472
|
|
|
453
|
-
##
|
|
473
|
+
## 9. `basic-pageentry:blockPageEntry` is the deeper form runtime
|
|
454
474
|
|
|
455
475
|
Read:
|
|
456
476
|
|
|
@@ -483,7 +503,7 @@ rest-resource entry shell
|
|
|
483
503
|
|
|
484
504
|
So if you are debugging entry-page behavior such as submit, title updates, or row-data loading, stopping at `ControllerPageEntry` is usually too early.
|
|
485
505
|
|
|
486
|
-
##
|
|
506
|
+
## 10. Commands can reuse the same owner boundary
|
|
487
507
|
|
|
488
508
|
Read:
|
|
489
509
|
|
|
@@ -510,7 +530,7 @@ This is one reason the owner boundary is so valuable.
|
|
|
510
530
|
|
|
511
531
|
The mutation policy remains centralized even when the caller is not a page.
|
|
512
532
|
|
|
513
|
-
##
|
|
533
|
+
## 11. Generated metadata is a registry layer, not the main runtime layer
|
|
514
534
|
|
|
515
535
|
Read last:
|
|
516
536
|
|