cabloy 5.1.61 → 5.1.62
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/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -1
- package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +2 -0
- package/CHANGELOG.md +42 -0
- package/CLAUDE.md +1 -0
- package/cabloy-docs/.vitepress/config.mjs +158 -12
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +8 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +2 -0
- package/cabloy-docs/ai/skills.md +1 -0
- package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
- package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
- package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
- package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
- package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
- package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
- package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
- package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
- package/cabloy-docs/backend/broadcast-guide.md +3 -3
- package/cabloy-docs/backend/cli.md +20 -11
- package/cabloy-docs/backend/config-guide.md +4 -4
- package/cabloy-docs/backend/controller-aop-guide.md +10 -10
- package/cabloy-docs/backend/controller-guide.md +12 -2
- package/cabloy-docs/backend/crud-workflow.md +7 -3
- package/cabloy-docs/backend/dto-guide.md +12 -2
- package/cabloy-docs/backend/dto-infer-generation.md +201 -25
- package/cabloy-docs/backend/election-guide.md +2 -2
- package/cabloy-docs/backend/entity-guide.md +12 -3
- package/cabloy-docs/backend/error-guide.md +3 -3
- package/cabloy-docs/backend/event-guide.md +4 -4
- package/cabloy-docs/backend/external-aop-guide.md +2 -2
- package/cabloy-docs/backend/field-indexes.md +9 -3
- package/cabloy-docs/backend/foundation.md +8 -8
- package/cabloy-docs/backend/i18n-guide.md +6 -6
- package/cabloy-docs/backend/internal-aop-guide.md +2 -2
- package/cabloy-docs/backend/introduction.md +13 -0
- package/cabloy-docs/backend/migration-and-changes.md +3 -3
- package/cabloy-docs/backend/model-guide.md +16 -6
- package/cabloy-docs/backend/openapi-guide.md +3 -0
- package/cabloy-docs/backend/queue-guide.md +3 -3
- package/cabloy-docs/backend/redlock-guide.md +2 -2
- package/cabloy-docs/backend/schedule-guide.md +2 -2
- package/cabloy-docs/backend/scripts.md +8 -0
- package/cabloy-docs/backend/serialization-guide.md +2 -2
- package/cabloy-docs/backend/service-guide.md +18 -9
- package/cabloy-docs/backend/startup-guide.md +5 -5
- package/cabloy-docs/backend/status-guide.md +7 -7
- package/cabloy-docs/backend/unit-testing.md +3 -3
- package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
- package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
- package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
- package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
- package/cabloy-docs/frontend/a-router-guide.md +307 -0
- package/cabloy-docs/frontend/api-guide.md +4 -4
- package/cabloy-docs/frontend/api-schema-guide.md +1 -0
- package/cabloy-docs/frontend/app-startup-guide.md +7 -4
- package/cabloy-docs/frontend/bean-scene-authoring.md +1 -1
- package/cabloy-docs/frontend/behavior-guide.md +16 -16
- package/cabloy-docs/frontend/cli.md +5 -5
- package/cabloy-docs/frontend/command-scene-authoring.md +17 -8
- package/cabloy-docs/frontend/component-guide.md +5 -5
- package/cabloy-docs/frontend/component-props-guide.md +1 -1
- package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
- package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
- package/cabloy-docs/frontend/form-guide.md +19 -28
- package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
- package/cabloy-docs/frontend/foundation.md +10 -6
- package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
- package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
- package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
- package/cabloy-docs/frontend/generic-component-guide.md +1 -1
- package/cabloy-docs/frontend/introduction.md +29 -7
- package/cabloy-docs/frontend/model-architecture.md +38 -2
- package/cabloy-docs/frontend/model-resource-cookbook.md +11 -8
- package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +22 -2
- package/cabloy-docs/frontend/model-resource-usage-guide.md +22 -6
- package/cabloy-docs/frontend/model-state-guide.md +12 -9
- package/cabloy-docs/frontend/module-scope.md +8 -8
- package/cabloy-docs/frontend/modules-and-suites.md +2 -1
- package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +12 -4
- package/cabloy-docs/frontend/page-guide.md +9 -9
- package/cabloy-docs/frontend/page-meta-guide.md +466 -0
- package/cabloy-docs/frontend/page-params-guide.md +3 -3
- package/cabloy-docs/frontend/page-query-guide.md +2 -2
- package/cabloy-docs/frontend/page-route-guide.md +6 -0
- package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
- package/cabloy-docs/frontend/quickstart.md +14 -2
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
- package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
- package/cabloy-docs/frontend/route-alias-guide.md +6 -0
- package/cabloy-docs/frontend/router-stack-guide.md +229 -0
- package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
- package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
- package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
- package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
- package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
- package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
- package/cabloy-docs/frontend/server-data.md +2 -1
- package/cabloy-docs/frontend/system-startup-guide.md +2 -2
- package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
- package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
- package/cabloy-docs/frontend/table-guide.md +373 -0
- package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
- package/cabloy-docs/frontend/zova-app-guide.md +251 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +7 -9
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +5 -0
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +101 -7
- package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
- package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
- package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
- package/cabloy-docs/fullstack/contract-loop-playbook.md +8 -2
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +181 -48
- package/cabloy-docs/fullstack/introduction.md +3 -0
- package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -2
- package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
- package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
- package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
- package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +4 -0
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +31 -19
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +5 -0
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +4 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +1 -1
- package/cabloy-docs/reference/bean-scene-boilerplates.md +13 -13
- package/cabloy-docs/reference/package-map.md +4 -3
- package/package.json +1 -1
- package/vona/pnpm-lock.yaml +22 -258
- package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
- package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
- package/vona/src/suite/a-training/package.json +12 -0
- package/vona/src/suite/a-training/tsconfig.base.json +4 -0
- package/vona/src/suite/a-training/tsconfig.json +10 -0
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +406 -680
- package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
- package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
- package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
- package/zova/src/suite/a-training/package.json +12 -0
- package/zova/src/suite/a-training/tsconfig.base.json +4 -0
- package/zova/src/suite/a-training/tsconfig.json +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# Filter to Query to Select Data Flow Guide
|
|
2
|
+
|
|
3
|
+
This guide explains the list-page data path from filter UI into query state, then into `ModelResource.select(query)`, and finally into table and pager state in Zova.
|
|
4
|
+
|
|
5
|
+
Use this page when you want to understand:
|
|
6
|
+
|
|
7
|
+
- how filter UI changes become list-page query state
|
|
8
|
+
- how paging state joins that query
|
|
9
|
+
- how the final query reaches `ModelResource.select(query)`
|
|
10
|
+
- how the resulting paged/list data is consumed by table and pager
|
|
11
|
+
- where permission-driven table-meta refresh sits relative to that data flow
|
|
12
|
+
|
|
13
|
+
## Why this page exists
|
|
14
|
+
|
|
15
|
+
Several existing docs already explain nearby pieces:
|
|
16
|
+
|
|
17
|
+
- [Resource List Page Deep Dive](/frontend/resource-list-page-deep-dive) explains the broader list-page runtime assembly
|
|
18
|
+
- [Rest Resource Under the Hood](/frontend/rest-resource-under-the-hood) explains the module-level bridge
|
|
19
|
+
- [Table + Resource CRUD Cookbook](/frontend/table-resource-crud-cookbook) explains practical authoring for CRUD list pages
|
|
20
|
+
|
|
21
|
+
What those pages do not isolate directly is the one compact data-flow path from filter UI into the owner-side query execution boundary.
|
|
22
|
+
|
|
23
|
+
That is the gap this page fills.
|
|
24
|
+
|
|
25
|
+
## The shortest accurate mental model
|
|
26
|
+
|
|
27
|
+
A practical mental model is:
|
|
28
|
+
|
|
29
|
+
1. `blockFilter` normalizes user-entered filter values
|
|
30
|
+
2. `blockPage` stores those values in `queryFilterData`
|
|
31
|
+
3. `blockPage` also owns paging state in `queryPaged`
|
|
32
|
+
4. `blockPage` computes one merged `query`
|
|
33
|
+
5. `ModelResource.select(query)` becomes the owner-side query execution boundary
|
|
34
|
+
6. the select result provides both `list` and paged metadata
|
|
35
|
+
7. `blockTable` consumes the list data
|
|
36
|
+
8. `blockPager` consumes the paged metadata
|
|
37
|
+
|
|
38
|
+
That means the list-page fetch path is not scattered across table, pager, and filter. It is centralized in the page runtime and then handed to the owner.
|
|
39
|
+
|
|
40
|
+
## Source-confirmed reading path
|
|
41
|
+
|
|
42
|
+
When reading this topic, use this order:
|
|
43
|
+
|
|
44
|
+
1. `zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPage/controller.tsx`
|
|
45
|
+
2. `zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockFilter/controller.tsx`
|
|
46
|
+
3. `zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPager/controller.tsx`
|
|
47
|
+
4. `zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockTable/controller.tsx`
|
|
48
|
+
5. `zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts`
|
|
49
|
+
|
|
50
|
+
That order moves from the page-owned state source, to filter and pager inputs, to the table bridge, and finally to the owner-side query execution path.
|
|
51
|
+
|
|
52
|
+
## Runtime path by layer
|
|
53
|
+
|
|
54
|
+
### 1. Filter UI becomes `queryFilterData`
|
|
55
|
+
|
|
56
|
+
The filter bridge lives in:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockFilter/controller.tsx
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This block renders `ZForm` with:
|
|
63
|
+
|
|
64
|
+
- `data={$$page.queryFilterData}`
|
|
65
|
+
- `schema={$$page.schemaFilter}`
|
|
66
|
+
- `schemaScene="filter"`
|
|
67
|
+
|
|
68
|
+
Its submit and reset flow both pass through `_onFilter(dataOld)`.
|
|
69
|
+
|
|
70
|
+
The important source-confirmed behavior is:
|
|
71
|
+
|
|
72
|
+
- nil and empty-string values are removed
|
|
73
|
+
- the normalized object is passed to `$$page.onFilter(dataNew)`
|
|
74
|
+
|
|
75
|
+
This is the first key rule:
|
|
76
|
+
|
|
77
|
+
- `blockFilter` does not fetch directly
|
|
78
|
+
- it normalizes filter values and pushes them into page-owned state
|
|
79
|
+
|
|
80
|
+
### 2. Paging state becomes `queryPaged`
|
|
81
|
+
|
|
82
|
+
The page runtime owner lives in:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPage/controller.tsx
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Inside `__init__()`, it initializes:
|
|
89
|
+
|
|
90
|
+
- `queryFilterData = {}`
|
|
91
|
+
- `queryPaged = { pageNo: 1, pageSize: this.$props.pageSize }`
|
|
92
|
+
|
|
93
|
+
It also owns:
|
|
94
|
+
|
|
95
|
+
- `gotoPage(pageNo)`
|
|
96
|
+
- `setPageSize(pageSize)`
|
|
97
|
+
|
|
98
|
+
That means paging is page-owned runtime state, not something the pager block owns independently.
|
|
99
|
+
|
|
100
|
+
### 3. `query` is the canonical merged state
|
|
101
|
+
|
|
102
|
+
The same `blockPage` controller computes:
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
this.query = this.$computed(() => {
|
|
106
|
+
return Object.assign({}, this.queryFilterData, this.queryPaged);
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This is the canonical query object for the list page.
|
|
111
|
+
|
|
112
|
+
A practical reading rule is:
|
|
113
|
+
|
|
114
|
+
- filter state and paging state stay separate while they are being edited
|
|
115
|
+
- `query` is the merged runtime shape passed into the owner
|
|
116
|
+
|
|
117
|
+
### 4. `ModelResource.select(query)` is the owner-side query boundary
|
|
118
|
+
|
|
119
|
+
The owner-side boundary lives in:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
`blockPage` uses:
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
get queryData() {
|
|
129
|
+
return this.$$modelResource.select(this.query);
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Inside the owner:
|
|
134
|
+
|
|
135
|
+
- `select(query?)` delegates to `selectGeneral(undefined, query)`
|
|
136
|
+
- `selectGeneral(...)` creates a query key shaped like:
|
|
137
|
+
- `['select', actionPath ?? '', hashkey(query)]`
|
|
138
|
+
- it fetches the list result from the resolved `resourceApi`
|
|
139
|
+
|
|
140
|
+
This is the second key rule:
|
|
141
|
+
|
|
142
|
+
- pages assemble query state
|
|
143
|
+
- `ModelResource` owns query execution, query-key identity, and fetch semantics
|
|
144
|
+
|
|
145
|
+
### 5. The select result becomes both `data` and `paged`
|
|
146
|
+
|
|
147
|
+
Back in `blockPage`, two important derived surfaces are exposed:
|
|
148
|
+
|
|
149
|
+
- `data = queryData.data?.list`
|
|
150
|
+
- `paged = queryData.data`
|
|
151
|
+
|
|
152
|
+
This matters because the select result is not only a list.
|
|
153
|
+
|
|
154
|
+
It is the paged result surface that both table and pager depend on.
|
|
155
|
+
|
|
156
|
+
### 6. `blockTable` consumes list data
|
|
157
|
+
|
|
158
|
+
The table bridge lives in:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockTable/controller.tsx
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
It consumes the shared page runtime and passes into `ZTable`:
|
|
165
|
+
|
|
166
|
+
- `data={$$page.data}`
|
|
167
|
+
- `schema={$$page.schemaRow}`
|
|
168
|
+
- `tableScope={$$page.jsxCelScope}`
|
|
169
|
+
|
|
170
|
+
That means `blockTable` is not the owner of the fetch path.
|
|
171
|
+
|
|
172
|
+
It is the bridge from page-owned list result into the table runtime.
|
|
173
|
+
|
|
174
|
+
### 7. `blockPager` consumes paged metadata
|
|
175
|
+
|
|
176
|
+
The pager block lives in:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPager/controller.tsx
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
It reads:
|
|
183
|
+
|
|
184
|
+
- `$$page.paged`
|
|
185
|
+
|
|
186
|
+
and delegates navigation back into page-owned state with:
|
|
187
|
+
|
|
188
|
+
- `$$page.gotoPage(...)`
|
|
189
|
+
|
|
190
|
+
This is the third key rule:
|
|
191
|
+
|
|
192
|
+
- the pager does not fetch directly
|
|
193
|
+
- it mutates page-owned paging state and lets the central query path react
|
|
194
|
+
|
|
195
|
+
## Permission-driven table-meta refresh is adjacent, not the data path itself
|
|
196
|
+
|
|
197
|
+
`blockPage` also watches:
|
|
198
|
+
|
|
199
|
+
- `permissions`
|
|
200
|
+
|
|
201
|
+
and refreshes table meta when permission state changes.
|
|
202
|
+
|
|
203
|
+
That behavior is important, but it is not the same thing as the filter/query/select data path.
|
|
204
|
+
|
|
205
|
+
A practical rule is:
|
|
206
|
+
|
|
207
|
+
- filter/paging changes affect query identity and data fetches
|
|
208
|
+
- permission changes affect table metadata and visible action/column behavior
|
|
209
|
+
|
|
210
|
+
Those are related, but distinct, flows.
|
|
211
|
+
|
|
212
|
+
## A compact end-to-end trace
|
|
213
|
+
|
|
214
|
+
The shortest end-to-end trace is:
|
|
215
|
+
|
|
216
|
+
- filter UI normalizes user input
|
|
217
|
+
- `queryFilterData` changes
|
|
218
|
+
- `queryPaged` changes when navigation changes page
|
|
219
|
+
- `query = { ...queryFilterData, ...queryPaged }`
|
|
220
|
+
- `queryData = $$modelResource.select(query)`
|
|
221
|
+
- `data = queryData.data?.list`
|
|
222
|
+
- `paged = queryData.data`
|
|
223
|
+
- table consumes `data`
|
|
224
|
+
- pager consumes `paged`
|
|
225
|
+
|
|
226
|
+
That is the source-confirmed filter -> query -> select data path in the current Basic list-page runtime.
|
|
227
|
+
|
|
228
|
+
## Debugging checklist
|
|
229
|
+
|
|
230
|
+
If list data looks wrong, ask:
|
|
231
|
+
|
|
232
|
+
1. did `blockFilter` normalize away a field unexpectedly?
|
|
233
|
+
2. did `queryFilterData` actually change?
|
|
234
|
+
3. did `queryPaged` change as expected?
|
|
235
|
+
4. does the merged `query` contain the expected fields?
|
|
236
|
+
5. did `ModelResource.select(query)` create the expected query-key identity?
|
|
237
|
+
6. is `queryData.data?.list` populated as expected?
|
|
238
|
+
7. is `paged` present and consistent with the list result?
|
|
239
|
+
8. is the issue really data flow, or is it permission-driven table-meta refresh instead?
|
|
240
|
+
|
|
241
|
+
## Where to read next
|
|
242
|
+
|
|
243
|
+
Use these next steps depending on your question:
|
|
244
|
+
|
|
245
|
+
- if you want the broader list-page runtime assembly, read [Resource List Page Deep Dive](/frontend/resource-list-page-deep-dive)
|
|
246
|
+
- if you want the owner internals behind `select(query)`, read [ModelResource Internals Deep Dive](/frontend/model-resource-internals-deep-dive)
|
|
247
|
+
- if you want practical CRUD authoring guidance, read [Table + Resource CRUD Cookbook](/frontend/table-resource-crud-cookbook)
|
|
248
|
+
- if you want row/bulk action visibility, read [Table Action Visibility and Permission Flow Guide](/frontend/table-action-visibility-permission-flow-guide)
|
|
249
|
+
|
|
250
|
+
## Final takeaway
|
|
251
|
+
|
|
252
|
+
The most accurate way to read the current Basic list-page data path is:
|
|
253
|
+
|
|
254
|
+
- `blockFilter` owns filter normalization
|
|
255
|
+
- `blockPage` owns query state assembly
|
|
256
|
+
- `ModelResource.select(query)` owns owner-side query execution
|
|
257
|
+
- `data` and `paged` are the shared outputs
|
|
258
|
+
- table and pager consume those outputs instead of owning the fetch logic
|
|
259
|
+
|
|
260
|
+
That is the source-confirmed `filter -> query -> select` runtime path in the current Cabloy Basic frontend architecture.
|
|
@@ -22,6 +22,7 @@ Use this page together with:
|
|
|
22
22
|
|
|
23
23
|
> [!TIP]
|
|
24
24
|
> **Zova Form docs path**
|
|
25
|
+
>
|
|
25
26
|
> 1. **[Form Guide](/frontend/form-guide)** — learn the public authoring surface
|
|
26
27
|
> 2. **[Zova Form Under the Hood](/frontend/zova-form-under-the-hood)** — learn how the runtime pieces cooperate
|
|
27
28
|
> 3. **[Zova Form Source Reading Map](/frontend/zova-form-source-reading-map)** — learn which files to read next
|
|
@@ -31,6 +32,8 @@ Use this page together with:
|
|
|
31
32
|
|
|
32
33
|
If your next question is how these public APIs cooperate internally at runtime, continue with [Zova Form Under the Hood](/frontend/zova-form-under-the-hood).
|
|
33
34
|
|
|
35
|
+
If your next question is how `formScene` becomes `formMeta`, then `pageMeta`, and finally visible shell/tab state, continue with [Form Scene to Page Meta Guide](/frontend/form-scene-to-page-meta-guide).
|
|
36
|
+
|
|
34
37
|
## What you should learn first
|
|
35
38
|
|
|
36
39
|
If you only remember one idea, remember this one:
|
|
@@ -48,7 +51,7 @@ That leads to four common authoring surfaces:
|
|
|
48
51
|
|
|
49
52
|
To keep the guide concrete, the examples below all use the same teaching resource:
|
|
50
53
|
|
|
51
|
-
- resource: `
|
|
54
|
+
- resource: `training-student:student`
|
|
52
55
|
- representative fields: `name`, `level`, and `mobile`
|
|
53
56
|
- common scenes: Student create, Student edit, and Student view
|
|
54
57
|
|
|
@@ -101,10 +104,7 @@ The smallest useful Zova form is usually a mixed Student form with `ZForm`, a co
|
|
|
101
104
|
|
|
102
105
|
```tsx
|
|
103
106
|
<ZForm data={this.studentFormData} onSubmitData={data => this.submitStudent(data)}>
|
|
104
|
-
<ZFormFieldPreset
|
|
105
|
-
name="name"
|
|
106
|
-
layout={{ label: 'Student Name:' }}
|
|
107
|
-
></ZFormFieldPreset>
|
|
107
|
+
<ZFormFieldPreset name="name" layout={{ label: 'Student Name:' }}></ZFormFieldPreset>
|
|
108
108
|
|
|
109
109
|
<ZFormFieldPreset
|
|
110
110
|
name="level"
|
|
@@ -277,7 +277,7 @@ Use `onShowError` when you want a centralized user-facing error handler.
|
|
|
277
277
|
```tsx
|
|
278
278
|
<ZForm
|
|
279
279
|
onShowError={({ error }) => {
|
|
280
|
-
window.alert(error.message)
|
|
280
|
+
window.alert(error.message);
|
|
281
281
|
}}
|
|
282
282
|
></ZForm>
|
|
283
283
|
```
|
|
@@ -325,19 +325,13 @@ That is the best default when:
|
|
|
325
325
|
You can also provide validators directly on a field.
|
|
326
326
|
|
|
327
327
|
```tsx
|
|
328
|
-
<ZFormFieldPreset
|
|
329
|
-
name="name"
|
|
330
|
-
validators={{ onDynamic: z.string().min(3) }}
|
|
331
|
-
></ZFormFieldPreset>
|
|
328
|
+
<ZFormFieldPreset name="name" validators={{ onDynamic: z.string().min(3) }}></ZFormFieldPreset>
|
|
332
329
|
```
|
|
333
330
|
|
|
334
331
|
Or, for a custom Student field:
|
|
335
332
|
|
|
336
333
|
```tsx
|
|
337
|
-
<ZFormField
|
|
338
|
-
name="mobile"
|
|
339
|
-
validators={{ onBlur: z.string().min(6) }}
|
|
340
|
-
></ZFormField>
|
|
334
|
+
<ZFormField name="mobile" validators={{ onBlur: z.string().min(6) }}></ZFormField>
|
|
341
335
|
```
|
|
342
336
|
|
|
343
337
|
The common validator hooks are:
|
|
@@ -368,7 +362,7 @@ Zova Form also normalizes server validation failures back into the form pipeline
|
|
|
368
362
|
this.studentFormMeta = {
|
|
369
363
|
formMode: 'edit',
|
|
370
364
|
editMode: 'update',
|
|
371
|
-
}
|
|
365
|
+
};
|
|
372
366
|
```
|
|
373
367
|
|
|
374
368
|
A practical way to read it is:
|
|
@@ -396,10 +390,7 @@ In practice, Student field rendering can be influenced by:
|
|
|
396
390
|
### Use `layout` for label and wrapper concerns
|
|
397
391
|
|
|
398
392
|
```tsx
|
|
399
|
-
<ZFormFieldPreset
|
|
400
|
-
name="level"
|
|
401
|
-
layout={{ label: 'Student Level:' }}
|
|
402
|
-
></ZFormFieldPreset>
|
|
393
|
+
<ZFormFieldPreset name="level" layout={{ label: 'Student Level:' }}></ZFormFieldPreset>
|
|
403
394
|
```
|
|
404
395
|
|
|
405
396
|
Use `layout` for concerns such as:
|
|
@@ -430,7 +421,7 @@ Use `options` when the concrete Student field renderer needs its own input optio
|
|
|
430
421
|
|
|
431
422
|
```tsx
|
|
432
423
|
<ZForm
|
|
433
|
-
formProvider={{ behaviors: { FormFieldLayout: '
|
|
424
|
+
formProvider={{ behaviors: { FormFieldLayout: 'training-student:formFieldLayoutStudent' } }}
|
|
434
425
|
>
|
|
435
426
|
```
|
|
436
427
|
|
|
@@ -546,7 +537,7 @@ protected async __init__() {
|
|
|
546
537
|
this.$$modelResource = await this.bean._getBeanSelector(
|
|
547
538
|
'rest-resource.model.resource',
|
|
548
539
|
true,
|
|
549
|
-
'
|
|
540
|
+
'training-student:student',
|
|
550
541
|
);
|
|
551
542
|
|
|
552
543
|
this.studentFormMeta = this.$computed(() => {
|
|
@@ -575,7 +566,7 @@ async submitStudent(data: TypeFormOnSubmitData<StudentFormData>) {
|
|
|
575
566
|
|
|
576
567
|
Read that example as four ownership boundaries:
|
|
577
568
|
|
|
578
|
-
- `
|
|
569
|
+
- `training-student:student` identifies the business resource
|
|
579
570
|
- `ModelResource` owns resource-level Student form schema/data/provider lookup
|
|
580
571
|
- `studentFormMeta` decides whether the Student page is create/edit/view
|
|
581
572
|
- `submitStudent` delegates to the Student mutation policy instead of inventing a page-local submit rule
|
|
@@ -593,7 +584,7 @@ Once the Student model side is prepared, the render side can stay thin:
|
|
|
593
584
|
formProvider={this.studentFormProvider}
|
|
594
585
|
onSubmitData={data => this.submitStudent(data)}
|
|
595
586
|
onShowError={({ error }) => {
|
|
596
|
-
window.alert(error.message)
|
|
587
|
+
window.alert(error.message);
|
|
597
588
|
}}
|
|
598
589
|
></ZForm>
|
|
599
590
|
```
|
|
@@ -638,11 +629,11 @@ Read together with:
|
|
|
638
629
|
|
|
639
630
|
Use this table when you are unsure which style to choose.
|
|
640
631
|
|
|
641
|
-
| Style
|
|
642
|
-
|
|
|
643
|
-
| Schema-driven | resource CRUD pages, contract-first forms, metadata-rich pages | least duplication, easiest to keep aligned with backend truth, fastest way to scale many forms | less suitable when one page has unusual UI structure
|
|
644
|
-
| Manual
|
|
645
|
-
| Mixed
|
|
632
|
+
| Style | Best fit | Strengths | Trade-offs |
|
|
633
|
+
| ------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
634
|
+
| Schema-driven | resource CRUD pages, contract-first forms, metadata-rich pages | least duplication, easiest to keep aligned with backend truth, fastest way to scale many forms | less suitable when one page has unusual UI structure |
|
|
635
|
+
| Manual | highly custom UI, one-off interaction-heavy forms | maximum render control | easiest way to drift away from contract truth and duplicate field wiring |
|
|
636
|
+
| Mixed | most business pages | keeps standard fields cheap while leaving room for custom rows or custom renderers | requires discipline about which layer should own each customization |
|
|
646
637
|
|
|
647
638
|
A practical recommendation is:
|
|
648
639
|
|