@shwfed/config 2.10.6 → 2.10.7

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.
Files changed (56) hide show
  1. package/dist/mcp.mjs +24 -13
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-DoTYH4r0.js → FieldGroup.vue_vue_type_script_setup_true_lang-CV3u1wuG.js} +1 -1
  4. package/dist/preview/assets/{badge-DigodVby.js → badge-De7TI8Ef.js} +1 -1
  5. package/dist/preview/assets/{config-WRBBSsbf.js → config-A0pwpJhu.js} +1 -1
  6. package/dist/preview/assets/{config-D3BYzFT7.js → config-BF4I0Pko.js} +1 -1
  7. package/dist/preview/assets/{config-Bjb63ooF.js → config-BJL5R6TO.js} +1 -1
  8. package/dist/preview/assets/{config-BiRUzXVx.js → config-Bei-4M8U.js} +1 -1
  9. package/dist/preview/assets/{config-C1-hX0FZ.js → config-C6AzmvwL.js} +1 -1
  10. package/dist/preview/assets/{config-BFLui9zF.js → config-Cc-RiKc0.js} +1 -1
  11. package/dist/preview/assets/{config-Cn5zWISv.js → config-Ckn8NixF.js} +1 -1
  12. package/dist/preview/assets/{config-DOqjxDka.js → config-CnPPWHxs.js} +1 -1
  13. package/dist/preview/assets/{config-CNjSJQmf.js → config-CtW_DgDv.js} +1 -1
  14. package/dist/preview/assets/{config-dwZBY29w.js → config-DBrYVSus.js} +1 -1
  15. package/dist/preview/assets/{config-Yzim7dYM.js → config-DGj2Xh1R.js} +1 -1
  16. package/dist/preview/assets/{config-fj68oKtH.js → config-DccYHX13.js} +1 -1
  17. package/dist/preview/assets/{config-ia-gXiHl.js → config-DqHlKqr-.js} +1 -1
  18. package/dist/preview/assets/{config-GquBxa0k.js → config-RuqJAgHJ.js} +1 -1
  19. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-DLRdfLnh.js → definition.vue_vue_type_script_setup_true_lang-Ceh2rttd.js} +1 -1
  20. package/dist/preview/assets/{index-ByDPdF8R.js → index-BQIP6UfB.js} +201 -201
  21. package/dist/preview/assets/{index-DyMqqPo8.css → index-Cj7bRG7B.css} +1 -1
  22. package/dist/preview/assets/{index-DjPejdGe.js → index-DAjdcrqQ.js} +1 -1
  23. package/dist/preview/assets/index-DpLMRp28.js +1 -0
  24. package/dist/preview/assets/{item-D1eyfO0S.js → item-BNOUeB-e.js} +1 -1
  25. package/dist/preview/assets/{runtime-CersyeE4.js → runtime-B-m0fZl0.js} +1 -1
  26. package/dist/preview/assets/{runtime-DlviPSYa.js → runtime-Bb0APo4d.js} +1 -1
  27. package/dist/preview/assets/{runtime-CeWW9OWp.js → runtime-BtDC6qh0.js} +1 -1
  28. package/dist/preview/assets/{runtime-uMgaWxns.js → runtime-CXSBPV7c.js} +1 -1
  29. package/dist/preview/assets/{runtime-BnmMh817.js → runtime-CdrOV1KF.js} +1 -1
  30. package/dist/preview/assets/{runtime-D2v11Q9f.js → runtime-CtG2gR_k.js} +1 -1
  31. package/dist/preview/assets/{runtime-BDsoGLTr.js → runtime-D2Qtb13C.js} +1 -1
  32. package/dist/preview/assets/{runtime-PGalcWzI.js → runtime-DCyGTrMp.js} +1 -1
  33. package/dist/preview/assets/{runtime-DVt270HE.js → runtime-DDz8U0kg.js} +1 -1
  34. package/dist/preview/assets/{runtime-DDLzkTJO.js → runtime-DzDI7B5M.js} +1 -1
  35. package/dist/preview/assets/{schema-meta-DudoTEwn.js → schema-meta-DmDYh6aL.js} +1 -1
  36. package/dist/preview/index.html +2 -2
  37. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/runtime.vue +6 -1
  38. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.js +1 -1
  39. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -0
  40. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.js +4 -0
  41. package/dist/runtime/components/config/config.vue +42 -3
  42. package/dist/runtime/components/config/use-editor.js +3 -1
  43. package/dist/runtime/components/config/utils/resolve.d.ts +12 -0
  44. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +22 -22
  45. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +22 -22
  46. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +28 -28
  47. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +28 -28
  48. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +6 -6
  49. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +6 -6
  50. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +23 -1
  51. package/dist/runtime/components/table/config.vue +1 -1
  52. package/dist/runtime/components/table/schema.js +19 -12
  53. package/dist/runtime/components/ui/expression-editor/picker-entries.js +1 -1
  54. package/dist/runtime/components/ui/expression-editor/selection-refs.js +1 -1
  55. package/package.json +1 -1
  56. package/dist/preview/assets/index-5uVTbNBd.js +0 -1
@@ -42,9 +42,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
42
42
  readonly mode: "formula" | "prefill";
43
43
  readonly expression: string;
44
44
  } | undefined;
45
- readonly precision?: number | undefined;
46
- readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
47
- readonly valueAsString?: boolean | undefined;
45
+ readonly validations?: readonly {
46
+ readonly message: readonly [{
47
+ readonly locale: "zh";
48
+ readonly message: string;
49
+ }, ...{
50
+ readonly locale: "en" | "ja" | "ko";
51
+ readonly message: string;
52
+ }[]];
53
+ readonly warning?: boolean | undefined;
54
+ readonly when: string;
55
+ }[] | undefined;
48
56
  readonly addon?: {
49
57
  readonly size: "default" | "sm" | "xs";
50
58
  readonly style?: string | undefined;
@@ -112,17 +120,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
112
120
  readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
113
121
  }[];
114
122
  } | undefined;
115
- readonly validations?: readonly {
116
- readonly message: readonly [{
117
- readonly locale: "zh";
118
- readonly message: string;
119
- }, ...{
120
- readonly locale: "en" | "ja" | "ko";
121
- readonly message: string;
122
- }[]];
123
- readonly warning?: boolean | undefined;
124
- readonly when: string;
125
- }[] | undefined;
123
+ readonly precision?: number | undefined;
124
+ readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
125
+ readonly valueAsString?: boolean | undefined;
126
126
  }) => any;
127
127
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
128
128
  "onUpdate:modelValue"?: ((value: {
@@ -164,9 +164,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
164
164
  readonly mode: "formula" | "prefill";
165
165
  readonly expression: string;
166
166
  } | undefined;
167
- readonly precision?: number | undefined;
168
- readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
169
- readonly valueAsString?: boolean | undefined;
167
+ readonly validations?: readonly {
168
+ readonly message: readonly [{
169
+ readonly locale: "zh";
170
+ readonly message: string;
171
+ }, ...{
172
+ readonly locale: "en" | "ja" | "ko";
173
+ readonly message: string;
174
+ }[]];
175
+ readonly warning?: boolean | undefined;
176
+ readonly when: string;
177
+ }[] | undefined;
170
178
  readonly addon?: {
171
179
  readonly size: "default" | "sm" | "xs";
172
180
  readonly style?: string | undefined;
@@ -234,17 +242,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
234
242
  readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
235
243
  }[];
236
244
  } | undefined;
237
- readonly validations?: readonly {
238
- readonly message: readonly [{
239
- readonly locale: "zh";
240
- readonly message: string;
241
- }, ...{
242
- readonly locale: "en" | "ja" | "ko";
243
- readonly message: string;
244
- }[]];
245
- readonly warning?: boolean | undefined;
246
- readonly when: string;
247
- }[] | undefined;
245
+ readonly precision?: number | undefined;
246
+ readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
247
+ readonly valueAsString?: boolean | undefined;
248
248
  }) => any) | undefined;
249
249
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
250
250
  declare const _default: typeof __VLS_export;
@@ -50,9 +50,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
50
50
  readonly locale: "en" | "ja" | "ko";
51
51
  readonly message: string;
52
52
  }[]] | undefined;
53
- readonly precision?: number | undefined;
54
- readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
55
- readonly valueAsString?: boolean | undefined;
56
53
  readonly validations?: readonly {
57
54
  readonly message: readonly [{
58
55
  readonly locale: "zh";
@@ -64,6 +61,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
64
61
  readonly warning?: boolean | undefined;
65
62
  readonly when: string;
66
63
  }[] | undefined;
64
+ readonly precision?: number | undefined;
65
+ readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
66
+ readonly valueAsString?: boolean | undefined;
67
67
  }) => any;
68
68
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
69
69
  "onUpdate:modelValue"?: ((value: {
@@ -113,9 +113,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
113
113
  readonly locale: "en" | "ja" | "ko";
114
114
  readonly message: string;
115
115
  }[]] | undefined;
116
- readonly precision?: number | undefined;
117
- readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
118
- readonly valueAsString?: boolean | undefined;
119
116
  readonly validations?: readonly {
120
117
  readonly message: readonly [{
121
118
  readonly locale: "zh";
@@ -127,6 +124,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
127
124
  readonly warning?: boolean | undefined;
128
125
  readonly when: string;
129
126
  }[] | undefined;
127
+ readonly precision?: number | undefined;
128
+ readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
129
+ readonly valueAsString?: boolean | undefined;
130
130
  }) => any) | undefined;
131
131
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
132
132
  declare const _default: typeof __VLS_export;
@@ -50,9 +50,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
50
50
  readonly locale: "en" | "ja" | "ko";
51
51
  readonly message: string;
52
52
  }[]] | undefined;
53
- readonly precision?: number | undefined;
54
- readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
55
- readonly valueAsString?: boolean | undefined;
56
53
  readonly validations?: readonly {
57
54
  readonly message: readonly [{
58
55
  readonly locale: "zh";
@@ -64,6 +61,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
64
61
  readonly warning?: boolean | undefined;
65
62
  readonly when: string;
66
63
  }[] | undefined;
64
+ readonly precision?: number | undefined;
65
+ readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
66
+ readonly valueAsString?: boolean | undefined;
67
67
  }) => any;
68
68
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
69
69
  "onUpdate:modelValue"?: ((value: {
@@ -113,9 +113,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
113
113
  readonly locale: "en" | "ja" | "ko";
114
114
  readonly message: string;
115
115
  }[]] | undefined;
116
- readonly precision?: number | undefined;
117
- readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
118
- readonly valueAsString?: boolean | undefined;
119
116
  readonly validations?: readonly {
120
117
  readonly message: readonly [{
121
118
  readonly locale: "zh";
@@ -127,6 +124,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
127
124
  readonly warning?: boolean | undefined;
128
125
  readonly when: string;
129
126
  }[] | undefined;
127
+ readonly precision?: number | undefined;
128
+ readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
129
+ readonly valueAsString?: boolean | undefined;
130
130
  }) => any) | undefined;
131
131
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
132
132
  declare const _default: typeof __VLS_export;
@@ -33,6 +33,24 @@ const ICONS = {
33
33
  "application/msword": "vscode-icons:file-type-word",
34
34
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "vscode-icons:file-type-word"
35
35
  };
36
+ const EXTENSIONS = {
37
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
38
+ "application/vnd.ms-excel": [".xls"],
39
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": [".pptx"],
40
+ "application/vnd.ms-powerpoint": [".ppt"],
41
+ "application/zip": [".zip"],
42
+ "application/x-zip-compressed": [".zip"],
43
+ "application/vnd.rar": [".rar"],
44
+ "application/x-rar-compressed": [".rar"],
45
+ "application/pdf": [".pdf"],
46
+ "application/ofd": [".ofd"],
47
+ "application/xml": [".xml"],
48
+ "image/png": [".png"],
49
+ "image/jpg": [".jpg"],
50
+ "image/jpeg": [".jpeg", ".jpg"],
51
+ "application/msword": [".doc"],
52
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": [".docx"]
53
+ };
36
54
  const SHORT_NAMES = {
37
55
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
38
56
  "application/vnd.ms-excel": "XLS",
@@ -156,7 +174,11 @@ const canAdd = computed(() => !isDisabled.value && !isReadonly.value && !isFull.
156
174
  function isMimeAllowed(file) {
157
175
  const list = props.config.accept;
158
176
  if (!list || list.length === 0) return true;
159
- return list.includes(file.type);
177
+ if (file.type && list.includes(file.type)) return true;
178
+ const dot = file.name.lastIndexOf(".");
179
+ if (dot < 0) return false;
180
+ const ext = file.name.slice(dot).toLowerCase();
181
+ return list.some((mime) => EXTENSIONS[mime]?.includes(ext));
160
182
  }
161
183
  function partition(incoming) {
162
184
  const accepted = [];
@@ -121,6 +121,7 @@ const ColumnCELContext = defineComponent({
121
121
  configure(env);
122
122
  registerRowVariablesIfAbsent(env);
123
123
  }));
124
+ provideSelectionRoster(selectionRoster);
124
125
  return () => slots.default?.();
125
126
  }
126
127
  });
@@ -334,7 +335,6 @@ const selectedColumnEntry = computed(() => {
334
335
  const selectionRoster = computed(
335
336
  () => editingColumns.value.filter((c) => findColumnEntry(c.type, c.compatibilityDate)?.metadata?.selection).map((c) => ({ id: c.id, name: columnLabel(c) }))
336
337
  );
337
- provideSelectionRoster(selectionRoster);
338
338
  const pinnedLeftIds = computed(() => {
339
339
  const ids = editingGeneralConfig.value.initialState?.columnPinning?.left;
340
340
  return new Set(Array.isArray(ids) ? ids : []);
@@ -139,18 +139,25 @@ const SORTS_VAR_DESCRIPTION = md`
139
139
  `;
140
140
  export function configureTableActionsScope(env, configure) {
141
141
  configure(env);
142
- env.registerVariable("selected", "list<dyn>", {
143
- label: "\u5DF2\u9009\u884C",
144
- description: "\u5F53\u524D\u5DF2\u52FE\u9009\u7684\u6240\u6709\u884C\uFF08`row` \u7684\u6570\u7EC4\uFF09"
145
- });
146
- env.registerVariable("query", "dyn", {
147
- label: "\u641C\u7D22\u6761\u4EF6",
148
- description: QUERY_VAR_DESCRIPTION
149
- });
150
- env.registerVariable("sorts", "list<map<string, string>>", {
151
- label: "\u6392\u5E8F\u72B6\u6001",
152
- description: SORTS_VAR_DESCRIPTION
153
- });
142
+ const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
143
+ if (!declared.has("selected")) {
144
+ env.registerVariable("selected", "list<dyn>", {
145
+ label: "\u5DF2\u9009\u884C",
146
+ description: "\u5F53\u524D\u5DF2\u52FE\u9009\u7684\u6240\u6709\u884C\uFF08`row` \u7684\u6570\u7EC4\uFF09"
147
+ });
148
+ }
149
+ if (!declared.has("query")) {
150
+ env.registerVariable("query", "dyn", {
151
+ label: "\u641C\u7D22\u6761\u4EF6",
152
+ description: QUERY_VAR_DESCRIPTION
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
+ }
154
161
  }
155
162
  export function registerDataSourceRequestVars(env) {
156
163
  env.registerVariable("pageIndex", "number", {
@@ -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}[${JSON.stringify(field.id)}]`,
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "2.10.6",
3
+ "version": "2.10.7",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -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};