@shwfed/config 2.10.7 → 2.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.mjs +28 -25
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-CV3u1wuG.js → FieldGroup.vue_vue_type_script_setup_true_lang-BX_UfcPb.js} +1 -1
- package/dist/preview/assets/{badge-De7TI8Ef.js → badge-obDKnV3E.js} +1 -1
- package/dist/preview/assets/{config-BJL5R6TO.js → config-9weuJKPA.js} +1 -1
- package/dist/preview/assets/{config-CnPPWHxs.js → config-B27gvYuN.js} +1 -1
- package/dist/preview/assets/{config-Ckn8NixF.js → config-BKVK2els.js} +1 -1
- package/dist/preview/assets/{config-DBrYVSus.js → config-BYhrPimZ.js} +1 -1
- package/dist/preview/assets/{config-C6AzmvwL.js → config-C6IfQR2K.js} +1 -1
- package/dist/preview/assets/{config-A0pwpJhu.js → config-CYdIN2D7.js} +1 -1
- package/dist/preview/assets/{config-DqHlKqr-.js → config-CaaIte9f.js} +1 -1
- package/dist/preview/assets/{config-CtW_DgDv.js → config-CnpY7wA_.js} +1 -1
- package/dist/preview/assets/{config-Bei-4M8U.js → config-DGJLbdm3.js} +1 -1
- package/dist/preview/assets/{config-DGj2Xh1R.js → config-DSD3RZZt.js} +1 -1
- package/dist/preview/assets/{config-BF4I0Pko.js → config-DbdgS5Ng.js} +1 -1
- package/dist/preview/assets/{config-Cc-RiKc0.js → config-DxmfhxW9.js} +1 -1
- package/dist/preview/assets/{config-RuqJAgHJ.js → config-jBRCpIX5.js} +1 -1
- package/dist/preview/assets/{config-DccYHX13.js → config-xdKDKKAa.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-Ceh2rttd.js → definition.vue_vue_type_script_setup_true_lang-C97mjLAr.js} +1 -1
- package/dist/preview/assets/index-ADrQrdaQ.js +1 -0
- package/dist/preview/assets/{index-DAjdcrqQ.js → index-BWc0rZ2y.js} +1 -1
- package/dist/preview/assets/{index-BQIP6UfB.js → index-DFmBrVzd.js} +177 -177
- package/dist/preview/assets/{item-BNOUeB-e.js → item-BRGONTEu.js} +1 -1
- package/dist/preview/assets/{runtime-CdrOV1KF.js → runtime-BGRgWBLF.js} +1 -1
- package/dist/preview/assets/{runtime-B-m0fZl0.js → runtime-BoiTEUZt.js} +1 -1
- package/dist/preview/assets/{runtime-Bb0APo4d.js → runtime-CHOWqPGP.js} +1 -1
- package/dist/preview/assets/{runtime-CtG2gR_k.js → runtime-CJVZpawP.js} +1 -1
- package/dist/preview/assets/{runtime-DzDI7B5M.js → runtime-Ci3L--AW.js} +1 -1
- package/dist/preview/assets/{runtime-DDz8U0kg.js → runtime-Czg0F_NN.js} +1 -1
- package/dist/preview/assets/{runtime-BtDC6qh0.js → runtime-D-9NZJ0Z.js} +1 -1
- package/dist/preview/assets/{runtime-CXSBPV7c.js → runtime-DZtGKJgS.js} +1 -1
- package/dist/preview/assets/{runtime-DCyGTrMp.js → runtime-DcQjFFJx.js} +1 -1
- package/dist/preview/assets/{runtime-D2Qtb13C.js → runtime-DqhT5NCm.js} +1 -1
- package/dist/preview/assets/{schema-meta-DmDYh6aL.js → schema-meta-xFd44RnL.js} +1 -1
- package/dist/preview/index.html +1 -1
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/schema.js +24 -25
- package/dist/runtime/vendor/cel-js/CLAUDE.md +1 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.d.ts +1 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.js +4 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-DpLMRp28.js +0 -1
|
@@ -137,52 +137,49 @@ const SORTS_VAR_DESCRIPTION = md`
|
|
|
137
137
|
|
|
138
138
|
未排序的字段,**不会出现在这个列表中**。
|
|
139
139
|
`;
|
|
140
|
+
function registerVariableIfAbsent(env, name, type, opts) {
|
|
141
|
+
const declared = env.getDefinitions().variables.some((v) => v.name === name);
|
|
142
|
+
if (!declared) env.registerVariable(name, type, opts);
|
|
143
|
+
}
|
|
140
144
|
export function configureTableActionsScope(env, configure) {
|
|
141
145
|
configure(env);
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
if (!declared.has("sorts")) {
|
|
156
|
-
env.registerVariable("sorts", "list<map<string, string>>", {
|
|
157
|
-
label: "\u6392\u5E8F\u72B6\u6001",
|
|
158
|
-
description: SORTS_VAR_DESCRIPTION
|
|
159
|
-
});
|
|
160
|
-
}
|
|
146
|
+
registerVariableIfAbsent(env, "selected", "list<dyn>", {
|
|
147
|
+
label: "\u5DF2\u9009\u884C",
|
|
148
|
+
description: "\u5F53\u524D\u5DF2\u52FE\u9009\u7684\u6240\u6709\u884C\uFF08`row` \u7684\u6570\u7EC4\uFF09"
|
|
149
|
+
});
|
|
150
|
+
registerVariableIfAbsent(env, "query", "dyn", {
|
|
151
|
+
label: "\u641C\u7D22\u6761\u4EF6",
|
|
152
|
+
description: QUERY_VAR_DESCRIPTION
|
|
153
|
+
});
|
|
154
|
+
registerVariableIfAbsent(env, "sorts", "list<map<string, string>>", {
|
|
155
|
+
label: "\u6392\u5E8F\u72B6\u6001",
|
|
156
|
+
description: SORTS_VAR_DESCRIPTION
|
|
157
|
+
});
|
|
161
158
|
}
|
|
162
159
|
export function registerDataSourceRequestVars(env) {
|
|
163
|
-
env
|
|
160
|
+
registerVariableIfAbsent(env, "pageIndex", "number", {
|
|
164
161
|
label: "\u5F53\u524D\u9875\u7801",
|
|
165
162
|
description: "\u4ECE `0` \u5F00\u59CB\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A `0`"
|
|
166
163
|
});
|
|
167
|
-
env
|
|
164
|
+
registerVariableIfAbsent(env, "pageSize", "number", {
|
|
168
165
|
label: "\u6BCF\u9875\u884C\u6570",
|
|
169
166
|
description: "\u5F53\u524D\u6BCF\u9875\u884C\u6570\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A `0`"
|
|
170
167
|
});
|
|
171
|
-
env
|
|
168
|
+
registerVariableIfAbsent(env, "sorts", "list<map<string, string>>", {
|
|
172
169
|
label: "\u6392\u5E8F\u72B6\u6001",
|
|
173
170
|
description: SORTS_VAR_DESCRIPTION
|
|
174
171
|
});
|
|
175
|
-
env
|
|
172
|
+
registerVariableIfAbsent(env, "query", "dyn", {
|
|
176
173
|
label: "\u641C\u7D22\u6761\u4EF6",
|
|
177
174
|
description: QUERY_VAR_DESCRIPTION
|
|
178
175
|
});
|
|
179
176
|
}
|
|
180
177
|
export function registerDataSourceResponseVars(env) {
|
|
181
|
-
env
|
|
178
|
+
registerVariableIfAbsent(env, "json", "optional<dyn>", {
|
|
182
179
|
label: "HTTP \u54CD\u5E94\u4F53",
|
|
183
180
|
description: JSON_VAR_DESCRIPTION
|
|
184
181
|
});
|
|
185
|
-
env
|
|
182
|
+
registerVariableIfAbsent(env, "query", "dyn", {
|
|
186
183
|
label: "\u641C\u7D22\u6761\u4EF6",
|
|
187
184
|
description: QUERY_VAR_DESCRIPTION
|
|
188
185
|
});
|
|
@@ -273,6 +270,8 @@ export function TableConfig(configure) {
|
|
|
273
270
|
configure: (env) => {
|
|
274
271
|
configure(env);
|
|
275
272
|
registerRowVariablesIfAbsent(env);
|
|
273
|
+
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
274
|
+
if (declared.has("selected")) env.deleteVariable("selected");
|
|
276
275
|
env.registerVariable("id", "string", { description: "\u5217 ID" });
|
|
277
276
|
env.registerVariable("selected", "bool", { description: "\u884C\u662F\u5426\u9009\u4E2D" });
|
|
278
277
|
env.registerVariable("pinned", "dyn", { description: "\u5217\u56FA\u5B9A\u72B6\u6001" });
|
|
@@ -69,6 +69,7 @@ import { Environment, ParseError, TypeError, EvaluationError } from './lib/index
|
|
|
69
69
|
- `.check(expr)` — Returns `Either<string, ParseError | TypeError>` (success = type name string)
|
|
70
70
|
- `.evaluate<T>(expr, ctx?)` — Returns `Effect<T, ParseError | TypeError | EvaluationError>`
|
|
71
71
|
- `.registerVariable(name, type, options?)`
|
|
72
|
+
- `.deleteVariable(name)` — Remove a previously-registered variable (no-op if absent). Lets a narrower scope override an inherited declaration with a different type (e.g. the table cell-style scope's per-row `selected: bool` vs. an enclosing toolbar's `selected: list<dyn>`), since `registerVariable` throws on a duplicate name.
|
|
72
73
|
- `.registerConstant(name, type, value)`
|
|
73
74
|
- `.registerFunction(signature, handler, options?)`
|
|
74
75
|
- `.registerOperator(signature, handler)`
|
|
@@ -26,6 +26,7 @@ declare class Environment {
|
|
|
26
26
|
registerOperator(signature: string, handler?: (...args: unknown[]) => unknown, opts?: unknown): this;
|
|
27
27
|
registerType(typename: string, constructor: unknown): this;
|
|
28
28
|
registerVariable(name: string, type?: unknown, opts?: unknown): this;
|
|
29
|
+
deleteVariable(name: string): this;
|
|
29
30
|
registerConstant(name: string, type: unknown, value: unknown): this;
|
|
30
31
|
getDefinitions(): ReturnType<Registry['getDefinitions']>;
|
|
31
32
|
check(expression: string): Either.Either<string, ParseError | TypeError>;
|
|
@@ -54,6 +54,10 @@ class Environment {
|
|
|
54
54
|
this.#registry.registerVariable(name, type, opts);
|
|
55
55
|
return this;
|
|
56
56
|
}
|
|
57
|
+
deleteVariable(name) {
|
|
58
|
+
this.#registry.deleteVariable(name);
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
57
61
|
registerConstant(name, type, value) {
|
|
58
62
|
this.#registry.registerConstant(name, type, value);
|
|
59
63
|
return this;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{be as e}from"./index-BQIP6UfB.js";import{bf as b,bg as r,bh as s}from"./index-BQIP6UfB.js";export{b as TableConfig,r as createTableConfig,e as default,s as getColumnTechnicalKey};
|