cabloy 5.1.69 → 5.1.70
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 +11 -0
- package/cabloy-docs/frontend/api-schema-guide.md +18 -0
- package/cabloy-docs/frontend/form-guide.md +8 -0
- package/cabloy-docs/frontend/table-guide.md +8 -0
- package/package.json +1 -1
- 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 +14 -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/pnpm-lock.yaml +40 -40
- package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +24 -3
- 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 +4 -4
- 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/formField/controller.tsx +10 -8
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +4 -4
- package/zova/src/suite-vendor/a-zova/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.70
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Improve CEL numeric formatting for training records.
|
|
8
|
+
- Trigger `onEffect` callbacks for form fields.
|
|
9
|
+
|
|
10
|
+
### Improvements
|
|
11
|
+
|
|
12
|
+
- Add examples for CEL numeric formatting to the documentation.
|
|
13
|
+
|
|
3
14
|
## 5.1.69
|
|
4
15
|
|
|
5
16
|
### Features
|
|
@@ -27,6 +27,24 @@ Use `$apiSchema` when the frontend needs to inspect what the backend contract sa
|
|
|
27
27
|
|
|
28
28
|
That usually means the problem is shifting from “fetch data” to “use metadata to drive behavior.”
|
|
29
29
|
|
|
30
|
+
## One practical metadata-driven expression example
|
|
31
|
+
|
|
32
|
+
When schema-driven form or table rendering uses JSX/CEL evaluation, the runtime can resolve helper functions against the current scope.
|
|
33
|
+
|
|
34
|
+
For example, frontend CEL expressions can now use `toFixed(value, precision)` to keep a numeric value at the desired precision:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
toFixed(getValue('price'), 2)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
In the shared form/table CEL environment:
|
|
41
|
+
|
|
42
|
+
- `toFixed(...)` returns a string with fixed decimal precision
|
|
43
|
+
- `getValue(name)` reads the current field value or current row value from the active runtime scope
|
|
44
|
+
- `getProperty(name)` reads the current schema property metadata from the active runtime scope
|
|
45
|
+
|
|
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
|
+
|
|
30
48
|
## Read together with
|
|
31
49
|
|
|
32
50
|
Use this page together with:
|
|
@@ -308,6 +308,14 @@ Schema-driven rendering is a strong fit when:
|
|
|
308
308
|
- frontend and backend should stay close to the same Student contract truth
|
|
309
309
|
- you want to reduce duplicated Student field configuration
|
|
310
310
|
|
|
311
|
+
A practical expression example is a schema-driven field display that formats a numeric value through CEL:
|
|
312
|
+
|
|
313
|
+
```text
|
|
314
|
+
toFixed(getValue('price'), 2)
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
In the shared form CEL scope, `getValue(name)` reads the current field value and `toFixed(...)` returns a string with fixed decimal precision.
|
|
318
|
+
|
|
311
319
|
Read together with [API Schema Guide](/frontend/api-schema-guide).
|
|
312
320
|
|
|
313
321
|
## Step 6: Add validation
|
|
@@ -146,6 +146,14 @@ and more:
|
|
|
146
146
|
|
|
147
147
|
This is why table work often belongs in the broader contract loop when the real source of truth is backend field metadata.
|
|
148
148
|
|
|
149
|
+
A practical expression example is a schema-driven cell display that formats the current row value through CEL:
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
toFixed(getValue('price'), 2)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
In the shared table CEL scope, `getValue(name)` reads the current row value and `toFixed(...)` returns a string with fixed decimal precision.
|
|
156
|
+
|
|
149
157
|
For the schema side of that contract, also see [API Schema Guide](/frontend/api-schema-guide).
|
|
150
158
|
|
|
151
159
|
## Step 4: Use built-in or custom `tableCell` render resources
|
package/package.json
CHANGED
|
@@ -26,6 +26,12 @@ celEnvBase.registerFunction('join(list,string):string', (list, sep) => {
|
|
|
26
26
|
celEnvBase.registerFunction('string(null):string', value => {
|
|
27
27
|
return String(value);
|
|
28
28
|
});
|
|
29
|
+
celEnvBase.registerFunction('toFixed(double,int):string', (value, precision) => {
|
|
30
|
+
return _toFixed(value, precision);
|
|
31
|
+
});
|
|
32
|
+
celEnvBase.registerFunction('toFixed(int,int):string', (value, precision) => {
|
|
33
|
+
return _toFixed(value, precision);
|
|
34
|
+
});
|
|
29
35
|
|
|
30
36
|
// operator: +
|
|
31
37
|
celEnvBase.registerOperator('string + int', (str, n) => str + String(n));
|
|
@@ -83,3 +89,11 @@ function _join(list?: [], sep?: string): string {
|
|
|
83
89
|
if (!list) return '';
|
|
84
90
|
return list.join(sep);
|
|
85
91
|
}
|
|
92
|
+
|
|
93
|
+
function _toFixed(value: number | bigint, precision: number | bigint): string {
|
|
94
|
+
const precisionInt = Number(precision);
|
|
95
|
+
if (typeof value === 'bigint') {
|
|
96
|
+
return precisionInt > 0 ? `${value}.${'0'.repeat(precisionInt)}` : String(value);
|
|
97
|
+
}
|
|
98
|
+
return value.toFixed(precisionInt);
|
|
99
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.58",
|
|
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": [
|
package/vona/pnpm-lock.yaml
CHANGED
|
@@ -7382,11 +7382,11 @@ packages:
|
|
|
7382
7382
|
peerDependencies:
|
|
7383
7383
|
zod: ^3.25.28 || ^4
|
|
7384
7384
|
|
|
7385
|
-
zova-core@5.1.
|
|
7386
|
-
resolution: {integrity: sha512-
|
|
7385
|
+
zova-core@5.1.58:
|
|
7386
|
+
resolution: {integrity: sha512-lHJLbyyXV01jOPCazId5tup2Sz2b2ejRCvclvHnkiRQeGhbF55AAKZVN3dsCv4QE4hpxrIaVV2/rhRaPtfWjUQ==}
|
|
7387
7387
|
|
|
7388
|
-
zova-jsx@1.1.
|
|
7389
|
-
resolution: {integrity: sha512-
|
|
7388
|
+
zova-jsx@1.1.64:
|
|
7389
|
+
resolution: {integrity: sha512-zQcf3INkOxwYEREz4ZRsU191gvCPa6EsuBwRG/dJOivxT6gUh613H/vtq71JL+gsI7sw3Bu+USce43xZmbTXVw==}
|
|
7390
7390
|
|
|
7391
7391
|
zova-module-a-api@5.1.21:
|
|
7392
7392
|
resolution: {integrity: sha512-qjm/hfjC4/+7Ap/uzJfBzV0PwRlp2idEmEKwCZYxquaXq6QtJBbTWTznw1iukT4lkJZip2KFkjOvXTzdvZA2UA==}
|
|
@@ -7412,8 +7412,8 @@ packages:
|
|
|
7412
7412
|
zova-module-a-fetch@5.1.23:
|
|
7413
7413
|
resolution: {integrity: sha512-druyz1WsNTnSuuXVuScRfkA7yv9oNWAEJuf+3PuuHH5Cv4Q2XYqf5i4DWKevc+Ewct6ls5QXPj4Z1X6D2HYrSQ==}
|
|
7414
7414
|
|
|
7415
|
-
zova-module-a-form@5.1.
|
|
7416
|
-
resolution: {integrity: sha512-
|
|
7415
|
+
zova-module-a-form@5.1.41:
|
|
7416
|
+
resolution: {integrity: sha512-QXA45De667qJhcuJLpavSNoA3yAq2EReGp1D7ggPz1MUrhvP+9MdM5HhOdW6p1w+SqLaDmyyQSbWwOmK8af1iQ==}
|
|
7417
7417
|
|
|
7418
7418
|
zova-module-a-icon@5.1.26:
|
|
7419
7419
|
resolution: {integrity: sha512-zV7hWilh3p+XfzvwPiWf2temW71kZNwqAyTs4RSHIoTJDO9XqjDFbuo39rfbDacgp0CLrbUp5yaCskRkG3lIbg==}
|
|
@@ -7430,8 +7430,8 @@ packages:
|
|
|
7430
7430
|
zova-module-a-model@5.1.30:
|
|
7431
7431
|
resolution: {integrity: sha512-DrOXf0ZPe0ZW/ZlXeBCmletEuxCD55MMs/1AHmGavXLridqNvbhkwhHpFHah+hM69+F2VeU05ToJc0PLjN5gmA==}
|
|
7432
7432
|
|
|
7433
|
-
zova-module-a-openapi@5.1.
|
|
7434
|
-
resolution: {integrity: sha512-
|
|
7433
|
+
zova-module-a-openapi@5.1.41:
|
|
7434
|
+
resolution: {integrity: sha512-a4A+Zt6GBo8ARCkyo4vuN/0b1PMLQ8mnoD0eRsj1np4u3I9Qc/2WjL2Ao24yAc7LlnNZoylFgccaYuTKxVO25A==}
|
|
7435
7435
|
|
|
7436
7436
|
zova-module-a-router@5.1.29:
|
|
7437
7437
|
resolution: {integrity: sha512-7vIXOf0aPUXvZAFC9hM1JQyNwmQAG+EtSbQ1et8+iP6roff8yUhhq50Dw8PFU5eb7hjk1TTxpUFhCTvev5JZqQ==}
|
|
@@ -7457,11 +7457,11 @@ packages:
|
|
|
7457
7457
|
zova-module-a-table@5.1.36:
|
|
7458
7458
|
resolution: {integrity: sha512-tbz2gEtjr2QfBxrmgcGDW2fuX3S9vFu0T3I0NHCmqGnQKSHVx9bMMn5PHjrqbiGf+HtYt7AtPJ7iInaPhkuW8A==}
|
|
7459
7459
|
|
|
7460
|
-
zova-module-a-zod@5.1.
|
|
7461
|
-
resolution: {integrity: sha512-
|
|
7460
|
+
zova-module-a-zod@5.1.34:
|
|
7461
|
+
resolution: {integrity: sha512-CURvuDMIID7iyIG3cP6RefJ53e7fMM8TPY/hvjMxJsfCphILK3ZG8DjPN3L1fAjhR1m9OOuXmkYUwrPaoRbtUw==}
|
|
7462
7462
|
|
|
7463
|
-
zova-module-a-zova@5.1.
|
|
7464
|
-
resolution: {integrity: sha512-
|
|
7463
|
+
zova-module-a-zova@5.1.78:
|
|
7464
|
+
resolution: {integrity: sha512-QiACszaljC5y/oyIFLbr4bmVfxt2vLkYCBzm+L5I+K9oO2HeJSzjpjCytY9wdvDvKywCS7k91a3paFRD2QJc4w==}
|
|
7465
7465
|
|
|
7466
7466
|
zova-module-rest-resource@5.1.40:
|
|
7467
7467
|
resolution: {integrity: sha512-rMqZaXSK6nJ4LW2O1yO/jZqxI7joCiWylzjutMTKpx7EfNmtK1t1nVoWFd+gCTxqgbbv9uXh0vfFaSFA7GKYFg==}
|
|
@@ -7472,11 +7472,11 @@ packages:
|
|
|
7472
7472
|
zova-rest-cabloy-basic-web@file:.zova-rest/cabloy-basic-web:
|
|
7473
7473
|
resolution: {directory: .zova-rest/cabloy-basic-web, type: directory}
|
|
7474
7474
|
|
|
7475
|
-
zova-suite-a-zova@5.1.
|
|
7476
|
-
resolution: {integrity: sha512-
|
|
7475
|
+
zova-suite-a-zova@5.1.114:
|
|
7476
|
+
resolution: {integrity: sha512-aHSb6mTaGyZTWgkL7XzQVYpk4Krw3EGrE6YwjzcquAQrqcICCGHpDDRVwp03k0RkRVIGwz9bY4JtHKcxZSIJWg==}
|
|
7477
7477
|
|
|
7478
|
-
zova@5.1.
|
|
7479
|
-
resolution: {integrity: sha512-
|
|
7478
|
+
zova@5.1.115:
|
|
7479
|
+
resolution: {integrity: sha512-tCwoUShcn2O6JqdawsuUI0U8elvwCHuoEdy5c4fIBmSgeCwajVV3PlLX1eYXGhAyBb9TyBGeJZyS2gsIygyAVQ==}
|
|
7480
7480
|
|
|
7481
7481
|
zwitch@1.0.5:
|
|
7482
7482
|
resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==}
|
|
@@ -12945,7 +12945,7 @@ snapshots:
|
|
|
12945
12945
|
dependencies:
|
|
12946
12946
|
zod: '@cabloy/zod@4.3.8'
|
|
12947
12947
|
|
|
12948
|
-
zova-core@5.1.
|
|
12948
|
+
zova-core@5.1.58(typescript@5.9.3):
|
|
12949
12949
|
dependencies:
|
|
12950
12950
|
'@cabloy/compose': link:packages-utils/compose
|
|
12951
12951
|
'@cabloy/extend': link:packages-utils/extend
|
|
@@ -12974,14 +12974,14 @@ snapshots:
|
|
|
12974
12974
|
transitivePeerDependencies:
|
|
12975
12975
|
- typescript
|
|
12976
12976
|
|
|
12977
|
-
zova-jsx@1.1.
|
|
12977
|
+
zova-jsx@1.1.64(typescript@5.9.3):
|
|
12978
12978
|
dependencies:
|
|
12979
12979
|
'@cabloy/compose': link:packages-utils/compose
|
|
12980
12980
|
'@cabloy/utils': link:packages-utils/utils
|
|
12981
12981
|
'@cabloy/word-utils': 2.1.14
|
|
12982
12982
|
typestyle: 2.4.0
|
|
12983
12983
|
vue: 3.5.39(typescript@5.9.3)
|
|
12984
|
-
zova-core: 5.1.
|
|
12984
|
+
zova-core: 5.1.58(typescript@5.9.3)
|
|
12985
12985
|
transitivePeerDependencies:
|
|
12986
12986
|
- typescript
|
|
12987
12987
|
|
|
@@ -13008,7 +13008,7 @@ snapshots:
|
|
|
13008
13008
|
- debug
|
|
13009
13009
|
- supports-color
|
|
13010
13010
|
|
|
13011
|
-
zova-module-a-form@5.1.
|
|
13011
|
+
zova-module-a-form@5.1.41(vue@3.5.39(typescript@5.9.3)):
|
|
13012
13012
|
dependencies:
|
|
13013
13013
|
'@tanstack/vue-form': 1.33.0(vue@3.5.39(typescript@5.9.3))
|
|
13014
13014
|
transitivePeerDependencies:
|
|
@@ -13037,7 +13037,7 @@ snapshots:
|
|
|
13037
13037
|
- '@vue/composition-api'
|
|
13038
13038
|
- vue
|
|
13039
13039
|
|
|
13040
|
-
zova-module-a-openapi@5.1.
|
|
13040
|
+
zova-module-a-openapi@5.1.41:
|
|
13041
13041
|
dependencies:
|
|
13042
13042
|
'@cabloy/json-schema-to-zod': 2.6.5
|
|
13043
13043
|
openapi3-ts: 4.6.0
|
|
@@ -13075,14 +13075,14 @@ snapshots:
|
|
|
13075
13075
|
transitivePeerDependencies:
|
|
13076
13076
|
- vue
|
|
13077
13077
|
|
|
13078
|
-
zova-module-a-zod@5.1.
|
|
13078
|
+
zova-module-a-zod@5.1.34:
|
|
13079
13079
|
dependencies:
|
|
13080
13080
|
'@cabloy/zod-errors-custom': link:packages-utils/zod-errors-custom
|
|
13081
13081
|
'@cabloy/zod-openapi': link:packages-utils/zod-openapi
|
|
13082
13082
|
'@cabloy/zod-query': link:packages-utils/zod-query
|
|
13083
13083
|
zod: '@cabloy/zod@4.3.8'
|
|
13084
13084
|
|
|
13085
|
-
zova-module-a-zova@5.1.
|
|
13085
|
+
zova-module-a-zova@5.1.78(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
|
|
13086
13086
|
dependencies:
|
|
13087
13087
|
'@cabloy/compose': link:packages-utils/compose
|
|
13088
13088
|
'@cabloy/deps': link:packages-utils/deps
|
|
@@ -13093,7 +13093,7 @@ snapshots:
|
|
|
13093
13093
|
'@cabloy/word-utils': 2.1.14
|
|
13094
13094
|
defu: 6.1.7
|
|
13095
13095
|
luxon: 3.7.2
|
|
13096
|
-
zova-jsx: 1.1.
|
|
13096
|
+
zova-jsx: 1.1.64(typescript@5.9.3)
|
|
13097
13097
|
transitivePeerDependencies:
|
|
13098
13098
|
- typescript
|
|
13099
13099
|
- vue
|
|
@@ -13108,17 +13108,17 @@ snapshots:
|
|
|
13108
13108
|
table-identity: link:packages-utils/table-identity
|
|
13109
13109
|
vue: 3.5.39(typescript@5.9.3)
|
|
13110
13110
|
zod: '@cabloy/zod@4.3.8'
|
|
13111
|
-
zova: 5.1.
|
|
13112
|
-
zova-jsx: 1.1.
|
|
13111
|
+
zova: 5.1.115(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
|
|
13112
|
+
zova-jsx: 1.1.64(typescript@5.9.3)
|
|
13113
13113
|
zova-module-a-api: 5.1.21
|
|
13114
13114
|
zova-module-a-bean: 5.1.31
|
|
13115
13115
|
zova-module-a-behavior: 5.1.25
|
|
13116
13116
|
zova-module-a-command: 5.1.33
|
|
13117
|
-
zova-module-a-form: 5.1.
|
|
13117
|
+
zova-module-a-form: 5.1.41(vue@3.5.39(typescript@5.9.3))
|
|
13118
13118
|
zova-module-a-icon: 5.1.26
|
|
13119
13119
|
zova-module-a-interceptor: 5.1.29
|
|
13120
13120
|
zova-module-a-model: 5.1.30(vue@3.5.39(typescript@5.9.3))
|
|
13121
|
-
zova-module-a-openapi: 5.1.
|
|
13121
|
+
zova-module-a-openapi: 5.1.41
|
|
13122
13122
|
zova-module-a-router: 5.1.29
|
|
13123
13123
|
zova-module-a-routertabs: 5.1.32
|
|
13124
13124
|
zova-module-a-ssr: 5.1.26
|
|
@@ -13139,17 +13139,17 @@ snapshots:
|
|
|
13139
13139
|
table-identity: link:packages-utils/table-identity
|
|
13140
13140
|
vue: 3.5.39(typescript@5.9.3)
|
|
13141
13141
|
zod: '@cabloy/zod@4.3.8'
|
|
13142
|
-
zova: 5.1.
|
|
13143
|
-
zova-jsx: 1.1.
|
|
13142
|
+
zova: 5.1.115(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
|
|
13143
|
+
zova-jsx: 1.1.64(typescript@5.9.3)
|
|
13144
13144
|
zova-module-a-api: 5.1.21
|
|
13145
13145
|
zova-module-a-bean: 5.1.31
|
|
13146
13146
|
zova-module-a-behavior: 5.1.25
|
|
13147
13147
|
zova-module-a-command: 5.1.33
|
|
13148
|
-
zova-module-a-form: 5.1.
|
|
13148
|
+
zova-module-a-form: 5.1.41(vue@3.5.39(typescript@5.9.3))
|
|
13149
13149
|
zova-module-a-icon: 5.1.26
|
|
13150
13150
|
zova-module-a-interceptor: 5.1.29
|
|
13151
13151
|
zova-module-a-model: 5.1.30(vue@3.5.39(typescript@5.9.3))
|
|
13152
|
-
zova-module-a-openapi: 5.1.
|
|
13152
|
+
zova-module-a-openapi: 5.1.41
|
|
13153
13153
|
zova-module-a-router: 5.1.29
|
|
13154
13154
|
zova-module-a-routertabs: 5.1.32
|
|
13155
13155
|
zova-module-a-ssr: 5.1.26
|
|
@@ -13162,7 +13162,7 @@ snapshots:
|
|
|
13162
13162
|
- supports-color
|
|
13163
13163
|
- typescript
|
|
13164
13164
|
|
|
13165
|
-
zova-suite-a-zova@5.1.
|
|
13165
|
+
zova-suite-a-zova@5.1.114(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
|
|
13166
13166
|
dependencies:
|
|
13167
13167
|
zova-module-a-api: 5.1.21
|
|
13168
13168
|
zova-module-a-app: 5.1.24
|
|
@@ -13172,13 +13172,13 @@ snapshots:
|
|
|
13172
13172
|
zova-module-a-boundary: 5.1.21
|
|
13173
13173
|
zova-module-a-command: 5.1.33
|
|
13174
13174
|
zova-module-a-fetch: 5.1.23
|
|
13175
|
-
zova-module-a-form: 5.1.
|
|
13175
|
+
zova-module-a-form: 5.1.41(vue@3.5.39(typescript@5.9.3))
|
|
13176
13176
|
zova-module-a-icon: 5.1.26
|
|
13177
13177
|
zova-module-a-interceptor: 5.1.29
|
|
13178
13178
|
zova-module-a-logger: 5.1.26
|
|
13179
13179
|
zova-module-a-meta: 5.1.21
|
|
13180
13180
|
zova-module-a-model: 5.1.30(vue@3.5.39(typescript@5.9.3))
|
|
13181
|
-
zova-module-a-openapi: 5.1.
|
|
13181
|
+
zova-module-a-openapi: 5.1.41
|
|
13182
13182
|
zova-module-a-router: 5.1.29
|
|
13183
13183
|
zova-module-a-routerstack: 5.1.26
|
|
13184
13184
|
zova-module-a-routertabs: 5.1.32
|
|
@@ -13187,8 +13187,8 @@ snapshots:
|
|
|
13187
13187
|
zova-module-a-ssrserver: 5.1.22
|
|
13188
13188
|
zova-module-a-style: 5.1.32
|
|
13189
13189
|
zova-module-a-table: 5.1.36(vue@3.5.39(typescript@5.9.3))
|
|
13190
|
-
zova-module-a-zod: 5.1.
|
|
13191
|
-
zova-module-a-zova: 5.1.
|
|
13190
|
+
zova-module-a-zod: 5.1.34
|
|
13191
|
+
zova-module-a-zova: 5.1.78(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
|
|
13192
13192
|
transitivePeerDependencies:
|
|
13193
13193
|
- '@vue/composition-api'
|
|
13194
13194
|
- debug
|
|
@@ -13196,10 +13196,10 @@ snapshots:
|
|
|
13196
13196
|
- typescript
|
|
13197
13197
|
- vue
|
|
13198
13198
|
|
|
13199
|
-
zova@5.1.
|
|
13199
|
+
zova@5.1.115(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
|
|
13200
13200
|
dependencies:
|
|
13201
|
-
zova-core: 5.1.
|
|
13202
|
-
zova-suite-a-zova: 5.1.
|
|
13201
|
+
zova-core: 5.1.58(typescript@5.9.3)
|
|
13202
|
+
zova-suite-a-zova: 5.1.114(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
|
|
13203
13203
|
transitivePeerDependencies:
|
|
13204
13204
|
- '@vue/composition-api'
|
|
13205
13205
|
- debug
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { TableIdentity } from 'table-identity';
|
|
2
2
|
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
3
3
|
|
|
4
|
+
import { cel } from '@cabloy/utils';
|
|
5
|
+
import React from 'react';
|
|
4
6
|
import { $makeMetadata, $resourceName, Api, v } from 'vona-module-a-openapiutils';
|
|
5
7
|
import { Entity, EntityBase } from 'vona-module-a-orm';
|
|
6
|
-
import
|
|
8
|
+
import z from 'zod';
|
|
9
|
+
import { ZovaCommand, ZovaEvent, ZovaRender } from 'zova-rest-cabloy-basic-admin';
|
|
7
10
|
|
|
8
11
|
import { $locale } from '../.metadata/locales.ts';
|
|
9
12
|
|
|
@@ -51,10 +54,28 @@ export class EntityRecord extends EntityBase {
|
|
|
51
54
|
)
|
|
52
55
|
studentId: TableIdentity;
|
|
53
56
|
|
|
54
|
-
@Api.field(v.title($locale('SubjectCount')), v.optional(), ZovaRender.order(3))
|
|
57
|
+
@Api.field(v.title($locale('SubjectCount')), v.optional(), ZovaRender.order(3), z.int())
|
|
55
58
|
subjectCount?: number;
|
|
56
59
|
|
|
57
|
-
@Api.field(
|
|
60
|
+
@Api.field(
|
|
61
|
+
v.title($locale('TotalScore')),
|
|
62
|
+
v.optional(),
|
|
63
|
+
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
|
+
),
|
|
77
|
+
z.int(),
|
|
78
|
+
)
|
|
58
79
|
totalScore?: number;
|
|
59
80
|
|
|
60
81
|
@Api.field(v.title($locale('AverageScore')), v.optional(), ZovaRender.order(5))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.91",
|
|
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.24",
|
|
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.89"
|
|
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.89",
|
|
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.24",
|
|
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.23",
|
|
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.40"
|
|
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.65",
|
|
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.23",
|
|
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.59"
|
|
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.40",
|
|
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.14",
|
|
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.116",
|
|
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.59",
|
|
49
|
+
"zova-suite-a-zova": "^5.1.115"
|
|
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.59",
|
|
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.23",
|
|
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
|
@@ -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.88
|
|
399
399
|
version: link:../cli-set-front
|
|
400
400
|
devDependencies:
|
|
401
401
|
clean-package:
|
|
@@ -816,7 +816,7 @@ importers:
|
|
|
816
816
|
specifier: ^5.1.58
|
|
817
817
|
version: link:../zova-core
|
|
818
818
|
zova-suite-a-zova:
|
|
819
|
-
specifier: ^5.1.
|
|
819
|
+
specifier: ^5.1.114
|
|
820
820
|
version: link:../../src/suite-vendor/a-zova
|
|
821
821
|
devDependencies:
|
|
822
822
|
clean-package:
|
|
@@ -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.41
|
|
957
957
|
version: link:modules/a-form
|
|
958
958
|
zova-module-a-icon:
|
|
959
959
|
specifier: ^5.1.26
|
|
@@ -971,7 +971,7 @@ importers:
|
|
|
971
971
|
specifier: ^5.1.30
|
|
972
972
|
version: link:modules/a-model
|
|
973
973
|
zova-module-a-openapi:
|
|
974
|
-
specifier: ^5.1.
|
|
974
|
+
specifier: ^5.1.41
|
|
975
975
|
version: link:modules/a-openapi
|
|
976
976
|
zova-module-a-router:
|
|
977
977
|
specifier: ^5.1.29
|
|
@@ -69,14 +69,16 @@ export class ControllerFormField<TParentData extends {} = {}> extends BeanContro
|
|
|
69
69
|
return this._getFieldBehaviors();
|
|
70
70
|
},
|
|
71
71
|
});
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
// onEffect
|
|
73
|
+
if (process.env.CLIENT && this.$props.onEffect) {
|
|
74
|
+
this.$watch(
|
|
75
|
+
() => this.$$form.getFieldValue(this.name),
|
|
76
|
+
(newValue, oldValue) => {
|
|
77
|
+
if (newValue === oldValue) return;
|
|
78
|
+
this.$props.onEffect?.(newValue);
|
|
79
|
+
},
|
|
80
|
+
);
|
|
81
|
+
}
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
public get form() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.79",
|
|
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.23",
|
|
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.65"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@cabloy/cli": "^3.1.
|
|
49
|
+
"@cabloy/cli": "^3.1.24",
|
|
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.115",
|
|
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.42",
|
|
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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"zova-module-a-style": "^5.1.32",
|
|
33
33
|
"zova-module-a-table": "^5.1.36",
|
|
34
34
|
"zova-module-a-zod": "^5.1.34",
|
|
35
|
-
"zova-module-a-zova": "^5.1.
|
|
35
|
+
"zova-module-a-zova": "^5.1.79"
|
|
36
36
|
},
|
|
37
37
|
"title": "a-zova"
|
|
38
38
|
}
|