cabloy 5.1.70 → 5.1.71
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 +13 -0
- package/cabloy-docs/.vitepress/config.mjs +4 -0
- package/cabloy-docs/frontend/api-schema-guide.md +2 -0
- package/cabloy-docs/frontend/command-scene-authoring.md +2 -0
- package/cabloy-docs/frontend/form-guide.md +4 -0
- package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +2 -0
- package/cabloy-docs/frontend/schema-driven-field-effects-guide.md +252 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +2 -0
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +4 -0
- package/lint-staged.config.mjs +37 -29
- package/package.json +2 -2
- package/scripts/run-oxfmt-safe.mjs +53 -0
- package/vona/packages-cli/cabloy-cli/package.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-utils/module-glob/package.json +1 -1
- package/vona/packages-utils/utils/package.json +1 -1
- package/vona/packages-utils/utils/src/celjs/base.ts +11 -0
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +34 -14
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/packages-cli/cli/package.json +3 -3
- package/zova/packages-cli/cli-set-front/package.json +4 -4
- package/zova/packages-utils/zova-jsx/package.json +3 -3
- package/zova/packages-utils/zova-vite/package.json +2 -2
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +2 -2
- package/zova/pnpm-lock.yaml +45 -45
- package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/controller.tsx +3 -0
- 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 +4 -1
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +4 -4
- package/zova/src/suite-vendor/a-zova/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.71
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Improve CEL default value handling.
|
|
8
|
+
- Update published functionality.
|
|
9
|
+
|
|
10
|
+
### Improvements
|
|
11
|
+
|
|
12
|
+
- Harden ignored-file handling in lint-staged.
|
|
13
|
+
- Normalize `commandssync` metadata formatting.
|
|
14
|
+
- Add a schema-driven field effects guide.
|
|
15
|
+
|
|
3
16
|
## 5.1.70
|
|
4
17
|
|
|
5
18
|
### Features
|
|
@@ -422,6 +422,10 @@ export default defineConfig({
|
|
|
422
422
|
text: 'Form Scene to Page Meta',
|
|
423
423
|
link: '/frontend/form-scene-to-page-meta-guide',
|
|
424
424
|
},
|
|
425
|
+
{
|
|
426
|
+
text: 'Schema-Driven Field Effects',
|
|
427
|
+
link: '/frontend/schema-driven-field-effects-guide',
|
|
428
|
+
},
|
|
425
429
|
{
|
|
426
430
|
text: 'Permission, formScene, and Action Visibility',
|
|
427
431
|
link: '/frontend/permission-formscene-action-visibility-guide',
|
|
@@ -45,6 +45,8 @@ In the shared form/table CEL environment:
|
|
|
45
45
|
|
|
46
46
|
That is useful when the backend contract already owns the field metadata and the frontend only needs a thin expression layer for schema-driven display behavior.
|
|
47
47
|
|
|
48
|
+
If your next question is not only how expressions read schema-driven scope, but how backend-owned field metadata attaches live field-side behavior through `ZovaRender.onEffect(...)`, `ZovaEvent`, and command chains, continue with [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide).
|
|
49
|
+
|
|
48
50
|
## Read together with
|
|
49
51
|
|
|
50
52
|
Use this page together with:
|
|
@@ -438,6 +438,8 @@ Why it matters:
|
|
|
438
438
|
|
|
439
439
|
This is the clearest example that command beans can be scene-sensitive without fitting the resource-row patterns.
|
|
440
440
|
|
|
441
|
+
If your next question is not only what this command bean does, but how backend field metadata, `ZovaRender.onEffect(...)`, `ZovaEvent`, and command chains cooperate to implement schema-driven form effects, continue with [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide).
|
|
442
|
+
|
|
441
443
|
### `basic-commandssync:log`
|
|
442
444
|
|
|
443
445
|
Read:
|
|
@@ -34,6 +34,8 @@ If your next question is how these public APIs cooperate internally at runtime,
|
|
|
34
34
|
|
|
35
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
36
|
|
|
37
|
+
If your next question is how backend/entity schema metadata drives field-level reactive form behavior such as normalization, derived values, and field-to-field updates, continue with [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide).
|
|
38
|
+
|
|
37
39
|
## What you should learn first
|
|
38
40
|
|
|
39
41
|
If you only remember one idea, remember this one:
|
|
@@ -64,6 +66,8 @@ That Student thread is a good specimen because it grows through the same path mo
|
|
|
64
66
|
|
|
65
67
|
So as you read the code samples below, treat them as different stages of the same Student form rather than unrelated fragments.
|
|
66
68
|
|
|
69
|
+
If your next question is not only how a schema-driven form renders, but how backend/entity field metadata can attach live field-to-field behavior such as normalization and derived-value updates, continue with [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide).
|
|
70
|
+
|
|
67
71
|
## Step 1: Choose the right form style
|
|
68
72
|
|
|
69
73
|
Before writing code, choose which of these three styles matches your Student page.
|
|
@@ -116,11 +116,13 @@ Start here when your question is about `ZForm`, `formMeta`, page-entry forms, or
|
|
|
116
116
|
### Focused deep dives
|
|
117
117
|
|
|
118
118
|
- [Form Scene to Page Meta Guide](/frontend/form-scene-to-page-meta-guide)
|
|
119
|
+
- [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide)
|
|
119
120
|
|
|
120
121
|
### Best next step
|
|
121
122
|
|
|
122
123
|
- if the question is “how does form runtime work?” -> read [Zova Form Under the Hood](/frontend/zova-form-under-the-hood)
|
|
123
124
|
- if the question is “how does `formScene` become shell-visible state?” -> read [Form Scene to Page Meta Guide](/frontend/form-scene-to-page-meta-guide)
|
|
125
|
+
- if the question is “how does backend/schema metadata drive field-level reactive behavior?” -> read [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide)
|
|
124
126
|
|
|
125
127
|
## Topic cluster: resources and ModelResource
|
|
126
128
|
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Schema-Driven Field Effects Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how schema-driven field effects work in current Cabloy Basic when backend-owned field metadata drives live frontend form behavior.
|
|
4
|
+
|
|
5
|
+
Use this page when you want to understand questions such as:
|
|
6
|
+
|
|
7
|
+
- how can a backend entity field drive frontend form behavior
|
|
8
|
+
- what does `ZovaRender.onEffect(...)` actually attach to
|
|
9
|
+
- how do `ZovaEvent` and `ZovaCommand` cooperate to update other fields
|
|
10
|
+
- when should a derived-field rule live in schema metadata instead of page/controller logic
|
|
11
|
+
- which files should I read first for schema-driven field reactivity
|
|
12
|
+
|
|
13
|
+
Use this page together with:
|
|
14
|
+
|
|
15
|
+
- [Form Guide](/frontend/form-guide)
|
|
16
|
+
- [Zova Form Under the Hood](/frontend/zova-form-under-the-hood)
|
|
17
|
+
- [Zova Form Source Reading Map](/frontend/zova-form-source-reading-map)
|
|
18
|
+
- [API Schema Guide](/frontend/api-schema-guide)
|
|
19
|
+
- [Command Scene Authoring](/frontend/command-scene-authoring)
|
|
20
|
+
|
|
21
|
+
Use this page after [Form Guide](/frontend/form-guide) when your next question is not only how schema-driven forms render, but how backend-owned field metadata becomes live field-side behavior through `ZovaRender.onEffect(...)`, `ZovaEvent`, and command chains.
|
|
22
|
+
|
|
23
|
+
## Why this page exists
|
|
24
|
+
|
|
25
|
+
The current frontend docs already explain nearby pieces well:
|
|
26
|
+
|
|
27
|
+
- [Form Guide](/frontend/form-guide) explains the public form authoring surface
|
|
28
|
+
- [Zova Form Under the Hood](/frontend/zova-form-under-the-hood) explains the runtime cooperation among form controllers, field controllers, schema metadata, and behaviors
|
|
29
|
+
- [Zova Form Source Reading Map](/frontend/zova-form-source-reading-map) explains which framework files to read next
|
|
30
|
+
- [Command Scene Authoring](/frontend/command-scene-authoring) explains the built-in `command` scene and representative command beans
|
|
31
|
+
- [API Schema Guide](/frontend/api-schema-guide) explains why schema metadata can drive frontend behavior
|
|
32
|
+
|
|
33
|
+
What those pages do not isolate directly is one common cross-layer pattern:
|
|
34
|
+
|
|
35
|
+
- backend entity metadata contributes frontend render metadata
|
|
36
|
+
- field metadata attaches a field-side effect
|
|
37
|
+
- the effect emits a declarative event/command chain
|
|
38
|
+
- command beans write the result back into form state
|
|
39
|
+
|
|
40
|
+
That is the gap this page fills.
|
|
41
|
+
|
|
42
|
+
## The shortest accurate mental model
|
|
43
|
+
|
|
44
|
+
A practical mental model is:
|
|
45
|
+
|
|
46
|
+
1. backend entity or DTO schema owns the field metadata truth
|
|
47
|
+
2. `ZovaRender.onEffect(...)` adds field-side frontend behavior to that metadata
|
|
48
|
+
3. the form runtime turns that metadata into a live field render context
|
|
49
|
+
4. a `ZovaEvent` executes one or more `ZovaCommand` nodes declaratively
|
|
50
|
+
5. those commands read current field scope and write normalized or derived values back into the form
|
|
51
|
+
|
|
52
|
+
That means a field effect in Zova is **schema-owned frontend behavior**, not only a page-local callback or ad hoc widget trick.
|
|
53
|
+
|
|
54
|
+
## What this page is not
|
|
55
|
+
|
|
56
|
+
This page is not:
|
|
57
|
+
|
|
58
|
+
- a replacement for [Form Guide](/frontend/form-guide)
|
|
59
|
+
- a full command-scene guide instead of [Command Scene Authoring](/frontend/command-scene-authoring)
|
|
60
|
+
- a general page-workflow guide for routing, dialogs, submit flow, or page lifecycle orchestration
|
|
61
|
+
- the separate `formScene -> formMeta -> pageMeta -> shell/tab state` bridge covered by [Form Scene to Page Meta Guide](/frontend/form-scene-to-page-meta-guide)
|
|
62
|
+
|
|
63
|
+
Its job is narrower:
|
|
64
|
+
|
|
65
|
+
- explain how schema-owned field metadata becomes live field-side behavior
|
|
66
|
+
- clarify where `ZovaRender.onEffect(...)`, `ZovaEvent`, `ZovaCommand`, and form runtime each fit
|
|
67
|
+
- give a short source-confirmed reading path for this pattern
|
|
68
|
+
|
|
69
|
+
## A representative specimen
|
|
70
|
+
|
|
71
|
+
A compact specimen lives in:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
vona/src/suite/a-training/modules/training-record/src/entity/record.tsx
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The key pattern in that file is:
|
|
78
|
+
|
|
79
|
+
- one shared `onEffectForAverageScore` event chain is declared once
|
|
80
|
+
- `subjectCount` and `totalScore` both attach that same effect through `ZovaRender.onEffect(...)`
|
|
81
|
+
- the effect first normalizes input through `basic-commandssync:expr`
|
|
82
|
+
- the effect then writes the derived `averageScore` through `basic-commands:setValue`
|
|
83
|
+
|
|
84
|
+
This specimen matters because it demonstrates three durable rules:
|
|
85
|
+
|
|
86
|
+
1. one field effect can be reused by multiple driving fields
|
|
87
|
+
2. normalization can happen before the derived-field writeback
|
|
88
|
+
3. the derived-field rule stays declarative and schema-owned rather than being buried in one page-local method
|
|
89
|
+
|
|
90
|
+
The business example is average score, but the reusable pattern is broader:
|
|
91
|
+
|
|
92
|
+
- normalize one or more source fields
|
|
93
|
+
- compute a small derived value
|
|
94
|
+
- write that value back into form state through commands
|
|
95
|
+
|
|
96
|
+
## Where each concept lives
|
|
97
|
+
|
|
98
|
+
This topic becomes much easier to read once the layers are separated clearly.
|
|
99
|
+
|
|
100
|
+
### 1. Entity or DTO field metadata owns schema truth
|
|
101
|
+
|
|
102
|
+
In current Cabloy Basic authoring, backend-side schema definitions can carry frontend render metadata through `@Api.field(...)` and related helpers.
|
|
103
|
+
|
|
104
|
+
That metadata is not only validation truth.
|
|
105
|
+
It can also describe:
|
|
106
|
+
|
|
107
|
+
- field order
|
|
108
|
+
- render provider selection
|
|
109
|
+
- scene-specific behavior
|
|
110
|
+
- field-side effects
|
|
111
|
+
|
|
112
|
+
For the surrounding metadata-driven model, also see [API Schema Guide](/frontend/api-schema-guide).
|
|
113
|
+
|
|
114
|
+
### 2. `ZovaRender.onEffect(...)` attaches field-side behavior
|
|
115
|
+
|
|
116
|
+
`ZovaRender.onEffect(...)` belongs on field render metadata.
|
|
117
|
+
|
|
118
|
+
Its role is not to define a command bean and not to replace a page controller.
|
|
119
|
+
Its role is to say:
|
|
120
|
+
|
|
121
|
+
- when this field participates in runtime interaction
|
|
122
|
+
- execute this declarative effect chain in the field runtime context
|
|
123
|
+
|
|
124
|
+
That keeps the effect attached to the schema-owned field definition instead of scattering it across unrelated page code.
|
|
125
|
+
|
|
126
|
+
### 3. `ZovaEvent` is the declarative event container
|
|
127
|
+
|
|
128
|
+
`ZovaEvent` groups one or more command invocations into a small event pipeline.
|
|
129
|
+
|
|
130
|
+
In this pattern, the important point is not JSX syntax by itself.
|
|
131
|
+
The important point is that the field effect stays:
|
|
132
|
+
|
|
133
|
+
- declarative
|
|
134
|
+
- composable
|
|
135
|
+
- command-oriented
|
|
136
|
+
- readable as metadata-driven behavior rather than imperative widget code
|
|
137
|
+
|
|
138
|
+
### 4. `ZovaCommand` nodes perform the concrete steps
|
|
139
|
+
|
|
140
|
+
A `ZovaCommand` node names one concrete action.
|
|
141
|
+
In the average-score specimen, two built-in command families matter:
|
|
142
|
+
|
|
143
|
+
- `basic-commandssync:expr`
|
|
144
|
+
- `basic-commands:setValue`
|
|
145
|
+
|
|
146
|
+
`basic-commandssync:expr` is a small synchronous command bean that returns the evaluated expression result.
|
|
147
|
+
A representative source file is:
|
|
148
|
+
|
|
149
|
+
```text
|
|
150
|
+
zova/src/suite/cabloy-basic/modules/basic-commandssync/src/bean/command.expr.tsx
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`basic-commands:setValue` is the built-in form-field writeback command bean.
|
|
154
|
+
A representative source file is:
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.setValue.tsx
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
That `setValue` command is especially important because it checks `renderContext.$scene === 'formField'` and then updates the target field through the live form runtime.
|
|
161
|
+
For the command-scene side of that story, see [Command Scene Authoring](/frontend/command-scene-authoring).
|
|
162
|
+
|
|
163
|
+
### 5. The form runtime provides the live field scope
|
|
164
|
+
|
|
165
|
+
The field effect does not run against a dead schema object.
|
|
166
|
+
It runs inside the form runtime, where the field and form controllers provide live helpers such as current field scope and form-state mutation.
|
|
167
|
+
|
|
168
|
+
That is why a schema-owned effect can still read current values and write derived values back into the active form.
|
|
169
|
+
For the runtime side, see [Zova Form Under the Hood](/frontend/zova-form-under-the-hood) and [Zova Form Source Reading Map](/frontend/zova-form-source-reading-map).
|
|
170
|
+
|
|
171
|
+
## When this pattern fits well
|
|
172
|
+
|
|
173
|
+
This pattern fits best when the behavior is:
|
|
174
|
+
|
|
175
|
+
- field-local or cross-field within one form
|
|
176
|
+
- small enough to stay declarative
|
|
177
|
+
- closely tied to schema-owned field semantics
|
|
178
|
+
- useful across more than one page or runtime path that consumes the same schema truth
|
|
179
|
+
|
|
180
|
+
Typical good fits include:
|
|
181
|
+
|
|
182
|
+
- derived fields such as totals, labels, or averages
|
|
183
|
+
- lightweight input normalization
|
|
184
|
+
- small field-to-field synchronization rules
|
|
185
|
+
- metadata-driven behavior that should travel with the backend contract
|
|
186
|
+
|
|
187
|
+
## When page or controller logic fits better
|
|
188
|
+
|
|
189
|
+
Do not force every interactive rule into field metadata.
|
|
190
|
+
|
|
191
|
+
Prefer page/controller logic when the behavior is:
|
|
192
|
+
|
|
193
|
+
- strongly tied to one page workflow
|
|
194
|
+
- asynchronous or orchestration-heavy
|
|
195
|
+
- dependent on routing, dialogs, or page lifecycle
|
|
196
|
+
- too large or too stateful to stay readable as a field event chain
|
|
197
|
+
|
|
198
|
+
A practical boundary is:
|
|
199
|
+
|
|
200
|
+
- if the rule reads like a small schema-owned field behavior, prefer field effects
|
|
201
|
+
- if the rule reads like a page workflow, prefer page/controller code
|
|
202
|
+
|
|
203
|
+
## Source-confirmed reading path
|
|
204
|
+
|
|
205
|
+
When reading this topic, use this order:
|
|
206
|
+
|
|
207
|
+
1. `vona/src/suite/a-training/modules/training-record/src/entity/record.tsx`
|
|
208
|
+
2. `zova/src/suite/cabloy-basic/modules/basic-commandssync/src/bean/command.expr.tsx`
|
|
209
|
+
3. `zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.setValue.tsx`
|
|
210
|
+
4. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/controller.tsx`
|
|
211
|
+
5. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx`
|
|
212
|
+
6. `zova/src/suite-vendor/a-zova/modules/a-form/src/types/formField.ts`
|
|
213
|
+
|
|
214
|
+
That order moves from one business-facing specimen, to the effect commands themselves, to the form and field runtime that make the effect live.
|
|
215
|
+
|
|
216
|
+
## Relationship to other guides
|
|
217
|
+
|
|
218
|
+
Use these boundaries when choosing the next page:
|
|
219
|
+
|
|
220
|
+
- if you want public form authoring first, read [Form Guide](/frontend/form-guide)
|
|
221
|
+
- if you want general schema-driven metadata behavior, read [API Schema Guide](/frontend/api-schema-guide)
|
|
222
|
+
- if you want deeper form runtime cooperation, read [Zova Form Under the Hood](/frontend/zova-form-under-the-hood)
|
|
223
|
+
- if you want the shortest file-order map for form internals, read [Zova Form Source Reading Map](/frontend/zova-form-source-reading-map)
|
|
224
|
+
- if you want the command-scene runtime model behind named commands, read [Command Scene Authoring](/frontend/command-scene-authoring)
|
|
225
|
+
- if you want the separate `formScene -> formMeta -> pageMeta -> shell/tab state` bridge, read [Form Scene to Page Meta Guide](/frontend/form-scene-to-page-meta-guide)
|
|
226
|
+
|
|
227
|
+
## Final takeaway
|
|
228
|
+
|
|
229
|
+
The most accurate way to read schema-driven field effects in current Cabloy Basic is:
|
|
230
|
+
|
|
231
|
+
- schema metadata owns the field-level behavior contract
|
|
232
|
+
- `ZovaRender.onEffect(...)` attaches declarative field-side behavior
|
|
233
|
+
- `ZovaEvent` and `ZovaCommand` execute the effect as a small command pipeline
|
|
234
|
+
- form runtime scope makes the effect live
|
|
235
|
+
- command beans write normalized or derived values back into the active form state
|
|
236
|
+
|
|
237
|
+
That is the source-confirmed meaning of schema-driven field effects in the current frontend architecture.
|
|
238
|
+
|
|
239
|
+
## Verification checklist
|
|
240
|
+
|
|
241
|
+
When documenting or changing this area, verify in this order:
|
|
242
|
+
|
|
243
|
+
1. confirm the specimen still matches the current `training-record` entity metadata
|
|
244
|
+
2. confirm command claims still match `command.expr.tsx` and `command.setValue.tsx`
|
|
245
|
+
3. confirm the runtime boundary still matches the current `a-form` form and form-field controllers
|
|
246
|
+
4. build the docs site:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
npm run docs:build
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
5. verify the page is reachable from the frontend sidebar and related form/command guides
|
|
@@ -249,6 +249,8 @@ Use this path when you are asking questions like:
|
|
|
249
249
|
|
|
250
250
|
If your next question becomes 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).
|
|
251
251
|
|
|
252
|
+
If your next question becomes how backend/entity schema metadata attaches field-side effects through `ZovaRender.onEffect(...)` and command chains, continue with [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide).
|
|
253
|
+
|
|
252
254
|
## 8. Representative specimens to read before editing the framework
|
|
253
255
|
|
|
254
256
|
Use this section when you want one small example before reading the framework internals.
|
|
@@ -18,6 +18,8 @@ If your next question is not “how does this runtime work?” but “which file
|
|
|
18
18
|
|
|
19
19
|
If your next question is specifically how `formScene` flows into `formMeta`, then `pageMeta`, and finally shell/tab state, continue with [Form Scene to Page Meta Guide](/frontend/form-scene-to-page-meta-guide).
|
|
20
20
|
|
|
21
|
+
If your next question is how backend/entity schema metadata attaches live field-side behavior through `ZovaRender.onEffect(...)`, `ZovaEvent`, and command chains, continue with [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide).
|
|
22
|
+
|
|
21
23
|
> [!TIP]
|
|
22
24
|
> **Zova Form docs path**
|
|
23
25
|
>
|
|
@@ -94,6 +96,8 @@ That page shows:
|
|
|
94
96
|
- a provider-level layout behavior override
|
|
95
97
|
- a blank row used for action controls
|
|
96
98
|
|
|
99
|
+
If you want a business-facing specimen where backend entity metadata attaches live field-side behavior through `ZovaRender.onEffect(...)`, `ZovaEvent`, and command chains, continue with [Schema-Driven Field Effects Guide](/frontend/schema-driven-field-effects-guide).
|
|
100
|
+
|
|
97
101
|
The rest of this page explains how those public authoring shapes become real runtime behavior.
|
|
98
102
|
|
|
99
103
|
## The core source-reading path
|
package/lint-staged.config.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { basename, isAbsolute, matchesGlob, relative, sep } from 'node:path';
|
|
2
|
+
|
|
1
3
|
// Must stay in sync with oxfmt.config.ts ignorePatterns
|
|
2
4
|
const OXFMT_IGNORE_PATTERNS = [
|
|
3
5
|
// root original
|
|
@@ -40,53 +42,59 @@ const OXFMT_IGNORE_PATTERNS = [
|
|
|
40
42
|
'zova/packages-cli/cli-set-front/cli/templates',
|
|
41
43
|
];
|
|
42
44
|
|
|
45
|
+
function normalizeFilepath(filepath) {
|
|
46
|
+
const normalized = isAbsolute(filepath) ? relative(process.cwd(), filepath) : filepath;
|
|
47
|
+
return normalized.split(sep).join('/');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function matchesPathPattern(filepath, pattern) {
|
|
51
|
+
if (matchesGlob(filepath, pattern)) return true;
|
|
52
|
+
if (pattern.startsWith('**/')) {
|
|
53
|
+
const suffix = pattern.slice(3);
|
|
54
|
+
if (!/[*?]/.test(suffix)) {
|
|
55
|
+
return (
|
|
56
|
+
filepath === suffix || filepath.endsWith(`/${suffix}`) || filepath.includes(`/${suffix}/`)
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (!/[*?]/.test(pattern)) {
|
|
61
|
+
return filepath === pattern || filepath.startsWith(`${pattern}/`);
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
|
|
43
66
|
function isOxfmtIgnored(filepath) {
|
|
44
|
-
const
|
|
45
|
-
const
|
|
67
|
+
const normalized = normalizeFilepath(filepath);
|
|
68
|
+
const filename = basename(normalized);
|
|
46
69
|
return OXFMT_IGNORE_PATTERNS.some(pattern => {
|
|
47
|
-
// basename-only patterns (e.g. *.min.js)
|
|
48
70
|
if (!pattern.includes('/')) {
|
|
49
|
-
|
|
71
|
+
return matchesGlob(filename, pattern);
|
|
50
72
|
}
|
|
51
|
-
|
|
52
|
-
if (pattern.startsWith('**/')) {
|
|
53
|
-
const suffix = pattern.slice(3);
|
|
54
|
-
for (let i = 0; i < parts.length; i++) {
|
|
55
|
-
if (matchGlob(parts[i], suffix)) return true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// **/dir/** patterns
|
|
59
|
-
if (pattern.startsWith('**/') && pattern.endsWith('/**')) {
|
|
60
|
-
const dir = pattern.slice(3, -3);
|
|
61
|
-
if (parts.includes(dir)) return true;
|
|
62
|
-
}
|
|
63
|
-
// prefix/path patterns (no **)
|
|
64
|
-
if (!pattern.startsWith('**') && filepath.includes(pattern)) return true;
|
|
65
|
-
return false;
|
|
73
|
+
return matchesPathPattern(normalized, pattern);
|
|
66
74
|
});
|
|
67
75
|
}
|
|
68
76
|
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return
|
|
77
|
+
function filterIgnored(filenames) {
|
|
78
|
+
return filenames.filter(filename => !isOxfmtIgnored(filename));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function joinShellArgs(filenames) {
|
|
82
|
+
return filenames.map(filename => JSON.stringify(filename)).join(' ');
|
|
75
83
|
}
|
|
76
84
|
|
|
77
|
-
function
|
|
78
|
-
return
|
|
85
|
+
function createOxfmtCommand(filenames) {
|
|
86
|
+
return `node scripts/run-oxfmt-safe.mjs ${joinShellArgs(filenames)}`;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
export default {
|
|
82
90
|
'*.{js,jsx,ts,tsx,vue,mjs,cjs}': filenames => {
|
|
83
91
|
const filtered = filterIgnored(filenames);
|
|
84
92
|
if (filtered.length === 0) return [];
|
|
85
|
-
return ['npm run lint:fix',
|
|
93
|
+
return ['npm run lint:fix', createOxfmtCommand(filtered)];
|
|
86
94
|
},
|
|
87
95
|
'*.{json,yaml,yml,md,css,scss,html}': filenames => {
|
|
88
96
|
const filtered = filterIgnored(filenames);
|
|
89
97
|
if (filtered.length === 0) return [];
|
|
90
|
-
return [
|
|
98
|
+
return [createOxfmtCommand(filtered)];
|
|
91
99
|
},
|
|
92
100
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cabloy",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.71",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A Node.js fullstack framework",
|
|
6
6
|
"keywords": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=24.4.0"
|
|
84
84
|
},
|
|
85
|
-
"packageManager": "pnpm@11.
|
|
85
|
+
"packageManager": "pnpm@11.9.0"
|
|
86
86
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
|
|
3
|
+
const NO_TARGETS_MESSAGE =
|
|
4
|
+
'Expected at least one target file. All matched files may have been excluded by ignore rules.';
|
|
5
|
+
|
|
6
|
+
function stripNoTargetsMessage(output) {
|
|
7
|
+
return output
|
|
8
|
+
.split('\n')
|
|
9
|
+
.filter(line => !line.includes(NO_TARGETS_MESSAGE))
|
|
10
|
+
.join('\n')
|
|
11
|
+
.trimEnd();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function writeOutput(stream, output) {
|
|
15
|
+
if (output) {
|
|
16
|
+
stream.write(output);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const filenames = process.argv.slice(2);
|
|
21
|
+
if (filenames.length === 0) {
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const result = spawnSync('pnpm', ['exec', 'oxfmt', '--write', ...filenames], {
|
|
26
|
+
encoding: 'utf8',
|
|
27
|
+
stdio: 'pipe',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (result.error) {
|
|
31
|
+
throw result.error;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const stdout = result.stdout ?? '';
|
|
35
|
+
const stderr = result.stderr ?? '';
|
|
36
|
+
if (result.status === 0) {
|
|
37
|
+
writeOutput(process.stdout, stdout);
|
|
38
|
+
writeOutput(process.stderr, stderr);
|
|
39
|
+
process.exit(0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const combinedOutput = `${stdout}\n${stderr}`;
|
|
43
|
+
if (combinedOutput.includes(NO_TARGETS_MESSAGE)) {
|
|
44
|
+
const cleanStdout = stripNoTargetsMessage(stdout);
|
|
45
|
+
const cleanStderr = stripNoTargetsMessage(stderr);
|
|
46
|
+
writeOutput(process.stdout, cleanStdout ? `${cleanStdout}\n` : '');
|
|
47
|
+
writeOutput(process.stderr, cleanStderr ? `${cleanStderr}\n` : '');
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
writeOutput(process.stdout, stdout);
|
|
52
|
+
writeOutput(process.stderr, stderr);
|
|
53
|
+
process.exit(result.status ?? 1);
|
|
@@ -21,6 +21,9 @@ celEnvBase.registerFunction('join(list):string', list => {
|
|
|
21
21
|
celEnvBase.registerFunction('join(list,string):string', (list, sep) => {
|
|
22
22
|
return _join(list, sep);
|
|
23
23
|
});
|
|
24
|
+
celEnvBase.registerFunction('sum(list):int', list => {
|
|
25
|
+
return _sum(list);
|
|
26
|
+
});
|
|
24
27
|
|
|
25
28
|
// string
|
|
26
29
|
celEnvBase.registerFunction('string(null):string', value => {
|
|
@@ -90,6 +93,14 @@ function _join(list?: [], sep?: string): string {
|
|
|
90
93
|
return list.join(sep);
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
function _sum(list?: []): bigint {
|
|
97
|
+
if (!list || list.length === 0) return 0n;
|
|
98
|
+
return list.reduce((acc, item) => {
|
|
99
|
+
if (item === null || item === undefined) return acc;
|
|
100
|
+
return acc + BigInt(item as number | string | bigint);
|
|
101
|
+
}, 0n);
|
|
102
|
+
}
|
|
103
|
+
|
|
93
104
|
function _toFixed(value: number | bigint, precision: number | bigint): string {
|
|
94
105
|
const precisionInt = Number(precision);
|
|
95
106
|
if (typeof value === 'bigint') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.59",
|
|
4
4
|
"gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
|
|
5
5
|
"description": "Vona is an intuitive, elegant and powerful Node.js framework for rapidly developing enterprise applications of any size",
|
|
6
6
|
"keywords": [
|
|
@@ -12,6 +12,32 @@ import { $locale } from '../.metadata/locales.ts';
|
|
|
12
12
|
|
|
13
13
|
export interface IEntityOptionsRecord extends IDecoratorEntityOptions {}
|
|
14
14
|
|
|
15
|
+
const onEffectForAverageScore = (
|
|
16
|
+
<ZovaEvent>
|
|
17
|
+
<ZovaCommand
|
|
18
|
+
name="basic-commandssync:expr"
|
|
19
|
+
res="subjectCount"
|
|
20
|
+
options={{
|
|
21
|
+
expression: cel('int(getValue("subjectCount",0))'),
|
|
22
|
+
}}
|
|
23
|
+
></ZovaCommand>
|
|
24
|
+
<ZovaCommand
|
|
25
|
+
name="basic-commandssync:expr"
|
|
26
|
+
res="totalScore"
|
|
27
|
+
options={{
|
|
28
|
+
expression: cel('int(getValue("totalScore",0))'),
|
|
29
|
+
}}
|
|
30
|
+
></ZovaCommand>
|
|
31
|
+
<ZovaCommand
|
|
32
|
+
name="basic-commands:setValue"
|
|
33
|
+
options={{
|
|
34
|
+
name: 'averageScore',
|
|
35
|
+
value: cel('subjectCount==0 ? "" : toFixed(double(totalScore) / double(subjectCount), 2)'),
|
|
36
|
+
}}
|
|
37
|
+
></ZovaCommand>
|
|
38
|
+
</ZovaEvent>
|
|
39
|
+
);
|
|
40
|
+
|
|
15
41
|
@Entity<IEntityOptionsRecord>('trainingRecord', {
|
|
16
42
|
openapi: { title: $locale('TrainingRecord') },
|
|
17
43
|
fields: {
|
|
@@ -54,26 +80,20 @@ export class EntityRecord extends EntityBase {
|
|
|
54
80
|
)
|
|
55
81
|
studentId: TableIdentity;
|
|
56
82
|
|
|
57
|
-
@Api.field(
|
|
83
|
+
@Api.field(
|
|
84
|
+
v.title($locale('SubjectCount')),
|
|
85
|
+
v.optional(),
|
|
86
|
+
ZovaRender.order(3),
|
|
87
|
+
ZovaRender.onEffect(onEffectForAverageScore),
|
|
88
|
+
z.int(),
|
|
89
|
+
)
|
|
58
90
|
subjectCount?: number;
|
|
59
91
|
|
|
60
92
|
@Api.field(
|
|
61
93
|
v.title($locale('TotalScore')),
|
|
62
94
|
v.optional(),
|
|
63
95
|
ZovaRender.order(4),
|
|
64
|
-
ZovaRender.onEffect(
|
|
65
|
-
<ZovaEvent>
|
|
66
|
-
<ZovaCommand
|
|
67
|
-
name="basic-commands:setValue"
|
|
68
|
-
options={{
|
|
69
|
-
name: 'averageScore',
|
|
70
|
-
value: cel(
|
|
71
|
-
'int(getValue("subjectCount"))==0 ? null : fixed(double(getValue("totalScore")) / double(getValue("subjectCount")), 2)',
|
|
72
|
-
),
|
|
73
|
-
}}
|
|
74
|
-
></ZovaCommand>
|
|
75
|
-
</ZovaEvent>,
|
|
76
|
-
),
|
|
96
|
+
ZovaRender.onEffect(onEffectForAverageScore),
|
|
77
97
|
z.int(),
|
|
78
98
|
)
|
|
79
99
|
totalScore?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.92",
|
|
4
4
|
"gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
|
|
5
5
|
"description": "zova cli",
|
|
6
6
|
"keywords": [
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"postpack": "clean-package restore"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cabloy/cli": "^3.1.
|
|
43
|
+
"@cabloy/cli": "^3.1.25",
|
|
44
44
|
"@cabloy/process-helper": "^3.1.8",
|
|
45
45
|
"fs-extra": "^11.3.5",
|
|
46
46
|
"semver": "^7.6.2",
|
|
47
|
-
"zova-cli-set-front": "^1.2.
|
|
47
|
+
"zova-cli-set-front": "^1.2.90"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-cli-set-front",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.90",
|
|
4
4
|
"gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
|
|
5
5
|
"description": "zova cli-set-front",
|
|
6
6
|
"keywords": [
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@babel/plugin-proposal-decorators": "^7.29.0",
|
|
42
42
|
"@babel/plugin-transform-class-properties": "^7.28.6",
|
|
43
43
|
"@babel/plugin-transform-typescript": "^7.28.6",
|
|
44
|
-
"@cabloy/cli": "^3.1.
|
|
44
|
+
"@cabloy/cli": "^3.1.25",
|
|
45
45
|
"@cabloy/extend": "^3.2.8",
|
|
46
46
|
"@cabloy/module-info": "^2.0.0",
|
|
47
47
|
"@cabloy/openapi-typescript": "^7.9.2",
|
|
48
|
-
"@cabloy/utils": "^2.1.
|
|
48
|
+
"@cabloy/utils": "^2.1.24",
|
|
49
49
|
"@cabloy/vite-plugin-babel": "^1.3.3",
|
|
50
50
|
"@cabloy/vue-babel-plugin-jsx": "^2.0.1",
|
|
51
51
|
"@cabloy/word-utils": "^2.1.14",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"vite": "^8.0.14",
|
|
71
71
|
"yaml": "^2.8.3",
|
|
72
72
|
"zova-openapi": "^1.1.17",
|
|
73
|
-
"zova-vite": "^1.1.
|
|
73
|
+
"zova-vite": "^1.1.41"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-jsx",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.66",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "Zova JSX",
|
|
6
6
|
"keywords": [
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@cabloy/compose": "^2.1.8",
|
|
49
|
-
"@cabloy/utils": "^2.1.
|
|
49
|
+
"@cabloy/utils": "^2.1.24",
|
|
50
50
|
"@cabloy/word-utils": "^2.1.14",
|
|
51
51
|
"typestyle": "^2.4.0",
|
|
52
52
|
"vue": "^3.5.38",
|
|
53
|
-
"zova-core": "^5.1.
|
|
53
|
+
"zova-core": "^5.1.60"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-vite",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.41",
|
|
4
4
|
"gitHead": "09d901d17140a80ee0764211b441cda72fd94663",
|
|
5
5
|
"description": "zova vite",
|
|
6
6
|
"keywords": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@babel/plugin-transform-typescript": "^7.28.6",
|
|
43
43
|
"@cabloy/dotenv": "^1.2.8",
|
|
44
44
|
"@cabloy/extend": "^3.2.8",
|
|
45
|
-
"@cabloy/module-glob": "^5.3.
|
|
45
|
+
"@cabloy/module-glob": "^5.3.15",
|
|
46
46
|
"@cabloy/module-info": "^2.0.0",
|
|
47
47
|
"@cabloy/vite-plugin-babel": "^1.3.3",
|
|
48
48
|
"@cabloy/vue-babel-plugin-jsx": "^2.0.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.117",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"postpack": "clean-package restore"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"zova-core": "^5.1.
|
|
49
|
-
"zova-suite-a-zova": "^5.1.
|
|
48
|
+
"zova-core": "^5.1.60",
|
|
49
|
+
"zova-suite-a-zova": "^5.1.116"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-core",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.60",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@cabloy/localeutil": "^2.1.8",
|
|
53
53
|
"@cabloy/logger": "^1.1.24",
|
|
54
54
|
"@cabloy/module-info": "^2.0.0",
|
|
55
|
-
"@cabloy/utils": "^2.1.
|
|
55
|
+
"@cabloy/utils": "^2.1.24",
|
|
56
56
|
"@cabloy/vue-compiler-sfc": "^3.5.14",
|
|
57
57
|
"@cabloy/vue-reactivity": "^3.5.16",
|
|
58
58
|
"@cabloy/vue-router": "^4.4.16",
|
package/zova/pnpm-lock.yaml
CHANGED
|
@@ -37,8 +37,8 @@ importers:
|
|
|
37
37
|
specifier: ^2.0.0
|
|
38
38
|
version: 2.0.0
|
|
39
39
|
'@cabloy/utils':
|
|
40
|
-
specifier: ^2.1.
|
|
41
|
-
version: 2.1.
|
|
40
|
+
specifier: ^2.1.23
|
|
41
|
+
version: 2.1.23
|
|
42
42
|
'@cabloy/vue-router':
|
|
43
43
|
specifier: ^4.4.16
|
|
44
44
|
version: 4.4.16(vue@3.5.38(typescript@5.9.3))
|
|
@@ -133,7 +133,7 @@ importers:
|
|
|
133
133
|
specifier: workspace:^
|
|
134
134
|
version: link:packages-zova/zova
|
|
135
135
|
zova-jsx:
|
|
136
|
-
specifier: ^1.1.
|
|
136
|
+
specifier: ^1.1.65
|
|
137
137
|
version: link:packages-utils/zova-jsx
|
|
138
138
|
zova-module-a-api:
|
|
139
139
|
specifier: workspace:^
|
|
@@ -308,8 +308,8 @@ importers:
|
|
|
308
308
|
version: link:src/suite/a-training/modules/training-student
|
|
309
309
|
devDependencies:
|
|
310
310
|
'@cabloy/cli':
|
|
311
|
-
specifier: ^3.1.
|
|
312
|
-
version: 3.1.
|
|
311
|
+
specifier: ^3.1.24
|
|
312
|
+
version: 3.1.24(vue@3.5.38(typescript@5.9.3))
|
|
313
313
|
'@cabloy/lint':
|
|
314
314
|
specifier: ^5.1.27
|
|
315
315
|
version: 5.1.30(@typescript-eslint/eslint-plugin@8.62.0(@typescript-eslint/parser@8.62.0(eslint@10.5.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.5.0(jiti@2.7.0))(typescript@5.9.3))(@typescript-eslint/rule-tester@8.62.0(eslint@10.5.0(jiti@2.7.0))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.62.0(typescript@5.9.3))(@typescript-eslint/utils@8.62.0(eslint@10.5.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.5.0(jiti@2.7.0))(oxfmt@0.45.0)(oxlint@1.71.0)(supports-color@10.2.2)(typescript@5.9.3)(vue-eslint-parser@10.4.1(eslint@10.5.0(jiti@2.7.0)))
|
|
@@ -383,8 +383,8 @@ importers:
|
|
|
383
383
|
packages-cli/cli:
|
|
384
384
|
dependencies:
|
|
385
385
|
'@cabloy/cli':
|
|
386
|
-
specifier: ^3.1.
|
|
387
|
-
version: 3.1.
|
|
386
|
+
specifier: ^3.1.24
|
|
387
|
+
version: 3.1.24(vue@3.5.38(typescript@5.9.3))
|
|
388
388
|
'@cabloy/process-helper':
|
|
389
389
|
specifier: ^3.1.8
|
|
390
390
|
version: 3.1.8
|
|
@@ -395,7 +395,7 @@ importers:
|
|
|
395
395
|
specifier: ^7.6.2
|
|
396
396
|
version: 7.8.5
|
|
397
397
|
zova-cli-set-front:
|
|
398
|
-
specifier: ^1.2.
|
|
398
|
+
specifier: ^1.2.89
|
|
399
399
|
version: link:../cli-set-front
|
|
400
400
|
devDependencies:
|
|
401
401
|
clean-package:
|
|
@@ -417,8 +417,8 @@ importers:
|
|
|
417
417
|
specifier: ^7.28.6
|
|
418
418
|
version: 7.29.7(@babel/core@7.29.7)
|
|
419
419
|
'@cabloy/cli':
|
|
420
|
-
specifier: ^3.1.
|
|
421
|
-
version: 3.1.
|
|
420
|
+
specifier: ^3.1.24
|
|
421
|
+
version: 3.1.24(vue@3.5.38(typescript@5.9.3))
|
|
422
422
|
'@cabloy/extend':
|
|
423
423
|
specifier: ^3.2.8
|
|
424
424
|
version: 3.2.8
|
|
@@ -429,8 +429,8 @@ importers:
|
|
|
429
429
|
specifier: ^7.9.2
|
|
430
430
|
version: 7.9.2(typescript@5.9.3)
|
|
431
431
|
'@cabloy/utils':
|
|
432
|
-
specifier: ^2.1.
|
|
433
|
-
version: 2.1.
|
|
432
|
+
specifier: ^2.1.23
|
|
433
|
+
version: 2.1.23
|
|
434
434
|
'@cabloy/vite-plugin-babel':
|
|
435
435
|
specifier: ^1.3.3
|
|
436
436
|
version: 1.3.3(@babel/core@7.29.7)(vite@8.1.0(@types/node@22.20.0)(esbuild@0.27.7)(jiti@2.7.0)(sass-embedded@1.100.0)(sass@1.101.0)(terser@5.48.0)(yaml@2.9.0))
|
|
@@ -504,7 +504,7 @@ importers:
|
|
|
504
504
|
specifier: ^1.1.17
|
|
505
505
|
version: link:../../packages-utils/zova-openapi
|
|
506
506
|
zova-vite:
|
|
507
|
-
specifier: ^1.1.
|
|
507
|
+
specifier: ^1.1.40
|
|
508
508
|
version: link:../../packages-utils/zova-vite
|
|
509
509
|
devDependencies:
|
|
510
510
|
clean-package:
|
|
@@ -660,8 +660,8 @@ importers:
|
|
|
660
660
|
specifier: ^2.1.8
|
|
661
661
|
version: 2.1.8
|
|
662
662
|
'@cabloy/utils':
|
|
663
|
-
specifier: ^2.1.
|
|
664
|
-
version: 2.1.
|
|
663
|
+
specifier: ^2.1.23
|
|
664
|
+
version: 2.1.23
|
|
665
665
|
'@cabloy/word-utils':
|
|
666
666
|
specifier: ^2.1.14
|
|
667
667
|
version: link:../word-utils
|
|
@@ -672,7 +672,7 @@ importers:
|
|
|
672
672
|
specifier: ^3.5.38
|
|
673
673
|
version: 3.5.38(typescript@5.9.3)
|
|
674
674
|
zova-core:
|
|
675
|
-
specifier: ^5.1.
|
|
675
|
+
specifier: ^5.1.59
|
|
676
676
|
version: link:../../packages-zova/zova-core
|
|
677
677
|
devDependencies:
|
|
678
678
|
clean-package:
|
|
@@ -713,8 +713,8 @@ importers:
|
|
|
713
713
|
specifier: ^3.2.8
|
|
714
714
|
version: 3.2.8
|
|
715
715
|
'@cabloy/module-glob':
|
|
716
|
-
specifier: ^5.3.
|
|
717
|
-
version: 5.3.
|
|
716
|
+
specifier: ^5.3.14
|
|
717
|
+
version: 5.3.14
|
|
718
718
|
'@cabloy/module-info':
|
|
719
719
|
specifier: ^2.0.0
|
|
720
720
|
version: 2.0.0
|
|
@@ -813,10 +813,10 @@ importers:
|
|
|
813
813
|
packages-zova/zova:
|
|
814
814
|
dependencies:
|
|
815
815
|
zova-core:
|
|
816
|
-
specifier: ^5.1.
|
|
816
|
+
specifier: ^5.1.59
|
|
817
817
|
version: link:../zova-core
|
|
818
818
|
zova-suite-a-zova:
|
|
819
|
-
specifier: ^5.1.
|
|
819
|
+
specifier: ^5.1.115
|
|
820
820
|
version: link:../../src/suite-vendor/a-zova
|
|
821
821
|
devDependencies:
|
|
822
822
|
clean-package:
|
|
@@ -847,8 +847,8 @@ importers:
|
|
|
847
847
|
specifier: ^2.0.0
|
|
848
848
|
version: 2.0.0
|
|
849
849
|
'@cabloy/utils':
|
|
850
|
-
specifier: ^2.1.
|
|
851
|
-
version: 2.1.
|
|
850
|
+
specifier: ^2.1.23
|
|
851
|
+
version: 2.1.23
|
|
852
852
|
'@cabloy/vue-compiler-sfc':
|
|
853
853
|
specifier: ^3.5.14
|
|
854
854
|
version: 3.5.14
|
|
@@ -953,7 +953,7 @@ importers:
|
|
|
953
953
|
specifier: ^5.1.23
|
|
954
954
|
version: link:modules/a-fetch
|
|
955
955
|
zova-module-a-form:
|
|
956
|
-
specifier: ^5.1.
|
|
956
|
+
specifier: ^5.1.42
|
|
957
957
|
version: link:modules/a-form
|
|
958
958
|
zova-module-a-icon:
|
|
959
959
|
specifier: ^5.1.26
|
|
@@ -1001,7 +1001,7 @@ importers:
|
|
|
1001
1001
|
specifier: ^5.1.34
|
|
1002
1002
|
version: link:modules/a-zod
|
|
1003
1003
|
zova-module-a-zova:
|
|
1004
|
-
specifier: ^5.1.
|
|
1004
|
+
specifier: ^5.1.79
|
|
1005
1005
|
version: link:modules/a-zova
|
|
1006
1006
|
|
|
1007
1007
|
src/suite-vendor/a-zova/modules/a-api:
|
|
@@ -1325,8 +1325,8 @@ importers:
|
|
|
1325
1325
|
specifier: ^2.0.0
|
|
1326
1326
|
version: 2.0.0
|
|
1327
1327
|
'@cabloy/utils':
|
|
1328
|
-
specifier: ^2.1.
|
|
1329
|
-
version: 2.1.
|
|
1328
|
+
specifier: ^2.1.23
|
|
1329
|
+
version: 2.1.23
|
|
1330
1330
|
'@cabloy/vue-router':
|
|
1331
1331
|
specifier: ^4.4.16
|
|
1332
1332
|
version: 4.4.16(vue@3.5.38(typescript@5.9.3))
|
|
@@ -1340,12 +1340,12 @@ importers:
|
|
|
1340
1340
|
specifier: ^3.7.2
|
|
1341
1341
|
version: 3.7.2
|
|
1342
1342
|
zova-jsx:
|
|
1343
|
-
specifier: ^1.1.
|
|
1343
|
+
specifier: ^1.1.65
|
|
1344
1344
|
version: link:../../../../../packages-utils/zova-jsx
|
|
1345
1345
|
devDependencies:
|
|
1346
1346
|
'@cabloy/cli':
|
|
1347
|
-
specifier: ^3.1.
|
|
1348
|
-
version: 3.1.
|
|
1347
|
+
specifier: ^3.1.24
|
|
1348
|
+
version: 3.1.24(vue@3.5.38(typescript@5.9.3))
|
|
1349
1349
|
'@types/luxon':
|
|
1350
1350
|
specifier: ^3.7.1
|
|
1351
1351
|
version: 3.7.2
|
|
@@ -1961,8 +1961,8 @@ packages:
|
|
|
1961
1961
|
'@bufbuild/protobuf@2.12.1':
|
|
1962
1962
|
resolution: {integrity: sha512-BvAMfS6LrgZiryOAZ4pBYucu4wG/Ei/9o9DZ9akbREnMLbPJiom2i8b9C8IsKErQoiKqVhrerzt3kOT/RrzLHg==}
|
|
1963
1963
|
|
|
1964
|
-
'@cabloy/cli@3.1.
|
|
1965
|
-
resolution: {integrity: sha512-
|
|
1964
|
+
'@cabloy/cli@3.1.24':
|
|
1965
|
+
resolution: {integrity: sha512-1UPQFGxX/677O+7cnSG40XfTMmfVk+Id+1kITaw5Eb5Z20L6LadbQrLb4xQ5AOg5Vhgd4xv93PaC2Xmqx5B0Ag==}
|
|
1966
1966
|
|
|
1967
1967
|
'@cabloy/compose@2.1.8':
|
|
1968
1968
|
resolution: {integrity: sha512-TdEr9BY54BYoIlTjkrOKkzK8yJWmP07OrRTh4punJMnWzM+oDExQ2EGCGAHXnEHjLWqdhyMGm/ejmxnVgBmraQ==}
|
|
@@ -1992,8 +1992,8 @@ packages:
|
|
|
1992
1992
|
'@cabloy/localeutil@2.1.8':
|
|
1993
1993
|
resolution: {integrity: sha512-haHUf245W2hmMrTw4UE23kOLcCPFj3XYWkjVYA643C/qhSGD7/ztMPf0VQL/AvmDnvIsjvKWdt79M4vjgOyD/A==}
|
|
1994
1994
|
|
|
1995
|
-
'@cabloy/module-glob@5.3.
|
|
1996
|
-
resolution: {integrity: sha512-
|
|
1995
|
+
'@cabloy/module-glob@5.3.14':
|
|
1996
|
+
resolution: {integrity: sha512-JOR7KOmPzxSrn+jo3fhLSHsnr2efPCGm+wkZGLsaT12JgnIamgbAS+zNI3LaoJXzB/FUHw9WZ/DaK4DldCCxrg==}
|
|
1997
1997
|
|
|
1998
1998
|
'@cabloy/module-info@2.0.0':
|
|
1999
1999
|
resolution: {integrity: sha512-ArN0/Ei4LH2LklWB2fy4+DVvli56A0m4mZPnKnQYoXEfkMtXChxbNDm6DZScY57lfTSyx7ZfGTgNVEbxF6VwYg==}
|
|
@@ -2047,8 +2047,8 @@ packages:
|
|
|
2047
2047
|
'@cabloy/socket@2.1.9':
|
|
2048
2048
|
resolution: {integrity: sha512-iuqHddhxlQBg/bftoFPX5iTzELYEkPfm1DLC7YJX+qUvU3rO99EilAmqimpMTVbZNOM4d1Fa2+xgdKoNVDd9cA==}
|
|
2049
2049
|
|
|
2050
|
-
'@cabloy/utils@2.1.
|
|
2051
|
-
resolution: {integrity: sha512-
|
|
2050
|
+
'@cabloy/utils@2.1.23':
|
|
2051
|
+
resolution: {integrity: sha512-9aa9EGklQHWqCT1eHMqEDiaCqAQ9QB8HDz0UWDUe+zmLt2eM51ODzWOJoX8NFqZJ8JzmtIRX8wmWoEwwj5r2+A==}
|
|
2052
2052
|
|
|
2053
2053
|
'@cabloy/vite-plugin-babel@1.3.3':
|
|
2054
2054
|
resolution: {integrity: sha512-fr4XlCREJDFi0bg3rXpm1jmvGN2M7WHGG4vCzpLmXGMzrM3X68Bk/gem16NoVSBteKH/ybm4CaNFIOy6Gqu8cg==}
|
|
@@ -7981,7 +7981,7 @@ snapshots:
|
|
|
7981
7981
|
|
|
7982
7982
|
'@babel/generator@8.0.0-rc.2':
|
|
7983
7983
|
dependencies:
|
|
7984
|
-
'@babel/parser': 8.0.0
|
|
7984
|
+
'@babel/parser': 8.0.0
|
|
7985
7985
|
'@babel/types': 8.0.0-rc.2
|
|
7986
7986
|
'@jridgewell/gen-mapping': 0.3.13
|
|
7987
7987
|
'@jridgewell/trace-mapping': 0.3.31
|
|
@@ -7990,7 +7990,7 @@ snapshots:
|
|
|
7990
7990
|
|
|
7991
7991
|
'@babel/generator@8.0.0-rc.3':
|
|
7992
7992
|
dependencies:
|
|
7993
|
-
'@babel/parser': 8.0.0
|
|
7993
|
+
'@babel/parser': 8.0.0
|
|
7994
7994
|
'@babel/types': 8.0.0-rc.3
|
|
7995
7995
|
'@jridgewell/gen-mapping': 0.3.13
|
|
7996
7996
|
'@jridgewell/trace-mapping': 0.3.31
|
|
@@ -8189,16 +8189,16 @@ snapshots:
|
|
|
8189
8189
|
|
|
8190
8190
|
'@bufbuild/protobuf@2.12.1': {}
|
|
8191
8191
|
|
|
8192
|
-
'@cabloy/cli@3.1.
|
|
8192
|
+
'@cabloy/cli@3.1.24(vue@3.5.38(typescript@5.9.3))':
|
|
8193
8193
|
dependencies:
|
|
8194
8194
|
'@babel/parser': 7.29.7
|
|
8195
|
-
'@cabloy/module-glob': 5.3.
|
|
8195
|
+
'@cabloy/module-glob': 5.3.14
|
|
8196
8196
|
'@cabloy/module-info': 2.0.0
|
|
8197
8197
|
'@cabloy/process-helper': 3.1.8
|
|
8198
|
-
'@cabloy/utils': 2.1.
|
|
8198
|
+
'@cabloy/utils': 2.1.23
|
|
8199
8199
|
'@cabloy/word-utils': link:packages-utils/word-utils
|
|
8200
8200
|
'@npmcli/config': 10.11.0
|
|
8201
|
-
'@zhennann/common-bin': 4.0.1
|
|
8201
|
+
'@zhennann/common-bin': 4.0.1
|
|
8202
8202
|
'@zhennann/ejs': 3.0.1
|
|
8203
8203
|
boxen: 4.2.0
|
|
8204
8204
|
chalk: 3.0.0
|
|
@@ -8269,10 +8269,10 @@ snapshots:
|
|
|
8269
8269
|
|
|
8270
8270
|
'@cabloy/localeutil@2.1.8': {}
|
|
8271
8271
|
|
|
8272
|
-
'@cabloy/module-glob@5.3.
|
|
8272
|
+
'@cabloy/module-glob@5.3.14':
|
|
8273
8273
|
dependencies:
|
|
8274
8274
|
'@cabloy/module-info': 2.0.0
|
|
8275
|
-
'@cabloy/utils': 2.1.
|
|
8275
|
+
'@cabloy/utils': 2.1.23
|
|
8276
8276
|
boxen: 4.2.0
|
|
8277
8277
|
chalk: 3.0.0
|
|
8278
8278
|
fs-extra: 11.3.5
|
|
@@ -8366,7 +8366,7 @@ snapshots:
|
|
|
8366
8366
|
|
|
8367
8367
|
'@cabloy/socket@2.1.9': {}
|
|
8368
8368
|
|
|
8369
|
-
'@cabloy/utils@2.1.
|
|
8369
|
+
'@cabloy/utils@2.1.23':
|
|
8370
8370
|
dependencies:
|
|
8371
8371
|
'@cabloy/module-info': 2.0.0
|
|
8372
8372
|
'@cabloy/word-utils': link:packages-utils/word-utils
|
|
@@ -10218,7 +10218,7 @@ snapshots:
|
|
|
10218
10218
|
|
|
10219
10219
|
'@vue/shared@3.5.13': {}
|
|
10220
10220
|
|
|
10221
|
-
'@zhennann/common-bin@4.0.1
|
|
10221
|
+
'@zhennann/common-bin@4.0.1':
|
|
10222
10222
|
dependencies:
|
|
10223
10223
|
chalk: 4.1.2
|
|
10224
10224
|
change-case: 4.1.2
|
|
@@ -174,6 +174,9 @@ export class ControllerForm<
|
|
|
174
174
|
celEnv.registerFunction('getValue(string):dyn', name => {
|
|
175
175
|
return this.form.getFieldValue(name) ?? null;
|
|
176
176
|
});
|
|
177
|
+
celEnv.registerFunction('getValue(string, dyn):dyn', (name, defaultValue) => {
|
|
178
|
+
return this.form.getFieldValue(name) ?? defaultValue;
|
|
179
|
+
});
|
|
177
180
|
celEnv.registerFunction('getProperty(string):dyn', name => {
|
|
178
181
|
return this.getFieldProperty(name) ?? null;
|
|
179
182
|
});
|
|
@@ -428,7 +428,10 @@ export class ControllerTable<TData extends {} = {}> extends BeanControllerTableB
|
|
|
428
428
|
return this.getColumnProperty(name);
|
|
429
429
|
});
|
|
430
430
|
celEnv.registerFunction('getValue(string):dyn', name => {
|
|
431
|
-
return this.zovaJsx.transientObject.getValue(name);
|
|
431
|
+
return this.zovaJsx.transientObject.getValue(name) ?? null;
|
|
432
|
+
});
|
|
433
|
+
celEnv.registerFunction('getValue(string, dyn):dyn', (name, defaultValue) => {
|
|
434
|
+
return this.zovaJsx.transientObject.getValue(name) ?? defaultValue;
|
|
432
435
|
});
|
|
433
436
|
return celEnv;
|
|
434
437
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.80",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "zova",
|
|
6
6
|
"keywords": [
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"@cabloy/deps": "^1.1.8",
|
|
39
39
|
"@cabloy/json5": "^1.1.9",
|
|
40
40
|
"@cabloy/module-info": "^2.0.0",
|
|
41
|
-
"@cabloy/utils": "^2.1.
|
|
41
|
+
"@cabloy/utils": "^2.1.24",
|
|
42
42
|
"@cabloy/vue-router": "^4.4.16",
|
|
43
43
|
"@cabloy/word-utils": "^2.1.14",
|
|
44
44
|
"defu": "^6.1.7",
|
|
45
45
|
"luxon": "^3.7.2",
|
|
46
|
-
"zova-jsx": "^1.1.
|
|
46
|
+
"zova-jsx": "^1.1.66"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@cabloy/cli": "^3.1.
|
|
49
|
+
"@cabloy/cli": "^3.1.25",
|
|
50
50
|
"@types/luxon": "^3.7.1",
|
|
51
51
|
"clean-package": "^2.2.0",
|
|
52
52
|
"fs-extra": "^11.3.5",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-suite-a-zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.116",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "zova",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"zova-module-a-boundary": "^5.1.21",
|
|
17
17
|
"zova-module-a-command": "^5.1.33",
|
|
18
18
|
"zova-module-a-fetch": "^5.1.23",
|
|
19
|
-
"zova-module-a-form": "^5.1.
|
|
19
|
+
"zova-module-a-form": "^5.1.43",
|
|
20
20
|
"zova-module-a-icon": "^5.1.26",
|
|
21
21
|
"zova-module-a-interceptor": "^5.1.29",
|
|
22
22
|
"zova-module-a-logger": "^5.1.26",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"zova-module-a-ssrhmr": "^5.1.22",
|
|
31
31
|
"zova-module-a-ssrserver": "^5.1.22",
|
|
32
32
|
"zova-module-a-style": "^5.1.32",
|
|
33
|
-
"zova-module-a-table": "^5.1.
|
|
33
|
+
"zova-module-a-table": "^5.1.37",
|
|
34
34
|
"zova-module-a-zod": "^5.1.34",
|
|
35
|
-
"zova-module-a-zova": "^5.1.
|
|
35
|
+
"zova-module-a-zova": "^5.1.80"
|
|
36
36
|
},
|
|
37
37
|
"title": "a-zova"
|
|
38
38
|
}
|