@shwfed/config 2.10.6 → 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 +24 -10
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-DoTYH4r0.js → FieldGroup.vue_vue_type_script_setup_true_lang-BX_UfcPb.js} +1 -1
- package/dist/preview/assets/{badge-DigodVby.js → badge-obDKnV3E.js} +1 -1
- package/dist/preview/assets/{config-Bjb63ooF.js → config-9weuJKPA.js} +1 -1
- package/dist/preview/assets/{config-DOqjxDka.js → config-B27gvYuN.js} +1 -1
- package/dist/preview/assets/{config-Cn5zWISv.js → config-BKVK2els.js} +1 -1
- package/dist/preview/assets/{config-dwZBY29w.js → config-BYhrPimZ.js} +1 -1
- package/dist/preview/assets/{config-C1-hX0FZ.js → config-C6IfQR2K.js} +1 -1
- package/dist/preview/assets/{config-WRBBSsbf.js → config-CYdIN2D7.js} +1 -1
- package/dist/preview/assets/{config-ia-gXiHl.js → config-CaaIte9f.js} +1 -1
- package/dist/preview/assets/{config-CNjSJQmf.js → config-CnpY7wA_.js} +1 -1
- package/dist/preview/assets/{config-BiRUzXVx.js → config-DGJLbdm3.js} +1 -1
- package/dist/preview/assets/{config-Yzim7dYM.js → config-DSD3RZZt.js} +1 -1
- package/dist/preview/assets/{config-D3BYzFT7.js → config-DbdgS5Ng.js} +1 -1
- package/dist/preview/assets/{config-BFLui9zF.js → config-DxmfhxW9.js} +1 -1
- package/dist/preview/assets/{config-GquBxa0k.js → config-jBRCpIX5.js} +1 -1
- package/dist/preview/assets/{config-fj68oKtH.js → config-xdKDKKAa.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-DLRdfLnh.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-DjPejdGe.js → index-BWc0rZ2y.js} +1 -1
- package/dist/preview/assets/{index-DyMqqPo8.css → index-Cj7bRG7B.css} +1 -1
- package/dist/preview/assets/{index-ByDPdF8R.js → index-DFmBrVzd.js} +164 -164
- package/dist/preview/assets/{item-D1eyfO0S.js → item-BRGONTEu.js} +1 -1
- package/dist/preview/assets/{runtime-BnmMh817.js → runtime-BGRgWBLF.js} +1 -1
- package/dist/preview/assets/{runtime-CersyeE4.js → runtime-BoiTEUZt.js} +1 -1
- package/dist/preview/assets/{runtime-DlviPSYa.js → runtime-CHOWqPGP.js} +1 -1
- package/dist/preview/assets/{runtime-D2v11Q9f.js → runtime-CJVZpawP.js} +1 -1
- package/dist/preview/assets/{runtime-DDLzkTJO.js → runtime-Ci3L--AW.js} +1 -1
- package/dist/preview/assets/{runtime-DVt270HE.js → runtime-Czg0F_NN.js} +1 -1
- package/dist/preview/assets/{runtime-CeWW9OWp.js → runtime-D-9NZJ0Z.js} +1 -1
- package/dist/preview/assets/{runtime-uMgaWxns.js → runtime-DZtGKJgS.js} +1 -1
- package/dist/preview/assets/{runtime-PGalcWzI.js → runtime-DcQjFFJx.js} +1 -1
- package/dist/preview/assets/{runtime-BDsoGLTr.js → runtime-DqhT5NCm.js} +1 -1
- package/dist/preview/assets/{schema-meta-DudoTEwn.js → schema-meta-xFd44RnL.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/runtime.vue +6 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.js +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.js +4 -0
- package/dist/runtime/components/config/config.vue +42 -3
- package/dist/runtime/components/config/use-editor.js +3 -1
- package/dist/runtime/components/config/utils/resolve.d.ts +12 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +22 -22
- 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-04-28/com.shwfed.form.field.number/config.d.vue.ts +28 -28
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +28 -28
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +23 -1
- 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/config.vue +1 -1
- package/dist/runtime/components/table/schema.js +15 -9
- package/dist/runtime/components/ui/expression-editor/picker-entries.js +1 -1
- package/dist/runtime/components/ui/expression-editor/selection-refs.js +1 -1
- 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-5uVTbNBd.js +0 -1
|
@@ -137,45 +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
|
-
env
|
|
146
|
+
registerVariableIfAbsent(env, "selected", "list<dyn>", {
|
|
143
147
|
label: "\u5DF2\u9009\u884C",
|
|
144
148
|
description: "\u5F53\u524D\u5DF2\u52FE\u9009\u7684\u6240\u6709\u884C\uFF08`row` \u7684\u6570\u7EC4\uFF09"
|
|
145
149
|
});
|
|
146
|
-
env
|
|
150
|
+
registerVariableIfAbsent(env, "query", "dyn", {
|
|
147
151
|
label: "\u641C\u7D22\u6761\u4EF6",
|
|
148
152
|
description: QUERY_VAR_DESCRIPTION
|
|
149
153
|
});
|
|
150
|
-
env
|
|
154
|
+
registerVariableIfAbsent(env, "sorts", "list<map<string, string>>", {
|
|
151
155
|
label: "\u6392\u5E8F\u72B6\u6001",
|
|
152
156
|
description: SORTS_VAR_DESCRIPTION
|
|
153
157
|
});
|
|
154
158
|
}
|
|
155
159
|
export function registerDataSourceRequestVars(env) {
|
|
156
|
-
env
|
|
160
|
+
registerVariableIfAbsent(env, "pageIndex", "number", {
|
|
157
161
|
label: "\u5F53\u524D\u9875\u7801",
|
|
158
162
|
description: "\u4ECE `0` \u5F00\u59CB\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A `0`"
|
|
159
163
|
});
|
|
160
|
-
env
|
|
164
|
+
registerVariableIfAbsent(env, "pageSize", "number", {
|
|
161
165
|
label: "\u6BCF\u9875\u884C\u6570",
|
|
162
166
|
description: "\u5F53\u524D\u6BCF\u9875\u884C\u6570\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A `0`"
|
|
163
167
|
});
|
|
164
|
-
env
|
|
168
|
+
registerVariableIfAbsent(env, "sorts", "list<map<string, string>>", {
|
|
165
169
|
label: "\u6392\u5E8F\u72B6\u6001",
|
|
166
170
|
description: SORTS_VAR_DESCRIPTION
|
|
167
171
|
});
|
|
168
|
-
env
|
|
172
|
+
registerVariableIfAbsent(env, "query", "dyn", {
|
|
169
173
|
label: "\u641C\u7D22\u6761\u4EF6",
|
|
170
174
|
description: QUERY_VAR_DESCRIPTION
|
|
171
175
|
});
|
|
172
176
|
}
|
|
173
177
|
export function registerDataSourceResponseVars(env) {
|
|
174
|
-
env
|
|
178
|
+
registerVariableIfAbsent(env, "json", "optional<dyn>", {
|
|
175
179
|
label: "HTTP \u54CD\u5E94\u4F53",
|
|
176
180
|
description: JSON_VAR_DESCRIPTION
|
|
177
181
|
});
|
|
178
|
-
env
|
|
182
|
+
registerVariableIfAbsent(env, "query", "dyn", {
|
|
179
183
|
label: "\u641C\u7D22\u6761\u4EF6",
|
|
180
184
|
description: QUERY_VAR_DESCRIPTION
|
|
181
185
|
});
|
|
@@ -266,6 +270,8 @@ export function TableConfig(configure) {
|
|
|
266
270
|
configure: (env) => {
|
|
267
271
|
configure(env);
|
|
268
272
|
registerRowVariablesIfAbsent(env);
|
|
273
|
+
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
274
|
+
if (declared.has("selected")) env.deleteVariable("selected");
|
|
269
275
|
env.registerVariable("id", "string", { description: "\u5217 ID" });
|
|
270
276
|
env.registerVariable("selected", "bool", { description: "\u884C\u662F\u5426\u9009\u4E2D" });
|
|
271
277
|
env.registerVariable("pinned", "dyn", { description: "\u5217\u56FA\u5B9A\u72B6\u6001" });
|
|
@@ -19,7 +19,7 @@ export function buildSelectionEntries(roster) {
|
|
|
19
19
|
return roster.map((field) => ({
|
|
20
20
|
id: `selection:${field.id}`,
|
|
21
21
|
group: "selection",
|
|
22
|
-
insert: `${SELECTIONS_VAR}[
|
|
22
|
+
insert: `${SELECTIONS_VAR}[?${JSON.stringify(field.id)}]`,
|
|
23
23
|
display: field.name,
|
|
24
24
|
label: "\u9009\u4E2D\u9879",
|
|
25
25
|
type: "dyn"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SELECTIONS_VAR } from "../../../utils/cel-context.js";
|
|
2
2
|
const SELECTION_REF_RE = new RegExp(
|
|
3
|
-
`(?<![\\w$.])${SELECTIONS_VAR}\\[("(?:[^"\\\\]|\\\\.)*")\\]`,
|
|
3
|
+
`(?<![\\w$.])${SELECTIONS_VAR}\\[\\??("(?:[^"\\\\]|\\\\.)*")\\]`,
|
|
4
4
|
"g"
|
|
5
5
|
);
|
|
6
6
|
export function scanSelectionRefs(text) {
|
|
@@ -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-ByDPdF8R.js";import{bf as b,bg as r,bh as s}from"./index-ByDPdF8R.js";export{b as TableConfig,r as createTableConfig,e as default,s as getColumnTechnicalKey};
|