@shwfed/config 2.3.22 → 2.3.23

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 (60) hide show
  1. package/dist/mcp.mjs +1073 -624
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-B3mv60t8.js → config-5rB9Rnmf.js} +1 -1
  4. package/dist/preview/assets/{config-DY7n8WvE.js → config-BLxl7ROb.js} +1 -1
  5. package/dist/preview/assets/{config-CpvkgqGg.js → config-BWMtPN22.js} +1 -1
  6. package/dist/preview/assets/{config-DX6QxjI7.js → config-C-EOrL-v.js} +1 -1
  7. package/dist/preview/assets/{config-Cb9lQXQG.js → config-CJADmi-_.js} +1 -1
  8. package/dist/preview/assets/{config-D4fS9GYw.js → config-DUNvg-mJ.js} +1 -1
  9. package/dist/preview/assets/{config-CLjwrQXG.js → config-EtlOM9yx.js} +1 -1
  10. package/dist/preview/assets/{config-BiFAbTJq.js → config-f66PEpZ5.js} +1 -1
  11. package/dist/preview/assets/{config-DhwLB2Ee.js → config-pVNUrcvS.js} +1 -1
  12. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-Hx2iV358.js → definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js} +1 -1
  13. package/dist/preview/assets/index-B4xolIUJ.js +643 -0
  14. package/dist/preview/assets/{index-CDhwf1Dw.css → index-CJMxrUKZ.css} +1 -1
  15. package/dist/preview/assets/index-DFYLO8qf.js +1 -0
  16. package/dist/preview/assets/{runtime-CShAGyQk.js → runtime-B9GkQToM.js} +1 -1
  17. package/dist/preview/assets/{runtime-DIcMvC6H.js → runtime-C0v-S40R.js} +1 -1
  18. package/dist/preview/assets/{runtime-usxovPqT.js → runtime-CFPeFbAB.js} +1 -1
  19. package/dist/preview/assets/{runtime-ECoXJ0-J.js → runtime-CI38ypkY.js} +1 -1
  20. package/dist/preview/assets/{runtime-HQv4w652.js → runtime-CUBGWRtC.js} +1 -1
  21. package/dist/preview/assets/{runtime-Dl0d8KFj.js → runtime-DcqfhaaX.js} +1 -1
  22. package/dist/preview/assets/{runtime-BXZROm-z.js → runtime-DoLJtHV2.js} +1 -1
  23. package/dist/preview/assets/{runtime-BarNw942.js → runtime-P99-0gRD.js} +1 -1
  24. package/dist/preview/assets/{runtime-BazV3vOW.js → runtime-qQ5mJdRv.js} +1 -1
  25. package/dist/preview/index.html +2 -2
  26. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +99 -0
  27. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue +329 -0
  28. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +99 -0
  29. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.d.vue.ts +8 -0
  30. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.vue +265 -0
  31. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.vue.d.ts +8 -0
  32. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +79 -0
  33. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.js +71 -0
  34. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +133 -0
  35. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue +533 -0
  36. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +133 -0
  37. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
  38. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue +247 -0
  39. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
  40. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +124 -0
  41. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.js +94 -0
  42. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +109 -0
  43. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue +426 -0
  44. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +109 -0
  45. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.d.vue.ts +9 -0
  46. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.vue +356 -0
  47. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.vue.d.ts +9 -0
  48. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +85 -0
  49. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.js +147 -0
  50. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +137 -0
  51. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue +586 -0
  52. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +137 -0
  53. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.d.vue.ts +9 -0
  54. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.vue +287 -0
  55. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.vue.d.ts +9 -0
  56. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +126 -0
  57. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.js +125 -0
  58. package/package.json +1 -1
  59. package/dist/preview/assets/index-B2gp2q3H.js +0 -643
  60. package/dist/preview/assets/index-Jytc_ICm.js +0 -1
@@ -0,0 +1,125 @@
1
+ import { Effect, Schema } from "effect";
2
+ import { Locale } from "../../../../../share/locale.js";
3
+ import { Expression } from "../../../../../share/expression.js";
4
+ import { Triggers } from "../../../../../share/event-bus.js";
5
+ import {
6
+ CelRowAccess,
7
+ columnFields,
8
+ editableHeader,
9
+ LocaleMarkdownWithRow,
10
+ registerRowVariablesIfAbsent
11
+ } from "../../../utils/shared.js";
12
+ export const type = "com.shwfed.table.column.combobox-multi.remote.options-static";
13
+ export const compatibilityDate = "2026-05-25";
14
+ export const metadata = {
15
+ name: "\u4E0B\u62C9\u591A\u9009",
16
+ icon: "fluent:chevron-down-20-regular"
17
+ };
18
+ export function itemSchema(configure) {
19
+ const LocaleMd = LocaleMarkdownWithRow(configure);
20
+ const TextValue = Schema.Struct({
21
+ kind: Schema.Literal("text"),
22
+ value: Schema.String
23
+ });
24
+ const NumberValue = Schema.Struct({
25
+ kind: Schema.Literal("number"),
26
+ value: Schema.Number
27
+ });
28
+ const ItemValue = Schema.Union(TextValue, NumberValue).annotations({
29
+ title: "\u503C",
30
+ description: "\u9009\u9879\u7ED1\u5B9A\u7684\u503C\uFF0C\u53EF\u4EE5\u662F\u6587\u672C\u6216\u6570\u5B57"
31
+ });
32
+ return Schema.Struct({
33
+ id: Schema.UUID.annotations({ description: "\u9009\u9879\u552F\u4E00\u6807\u8BC6\uFF0C\u7528\u4E8E\u7A33\u5B9A\u7684 v-for key" }),
34
+ label: LocaleMd.annotations({
35
+ title: "\u6807\u7B7E",
36
+ description: "\u9009\u9879\u5C55\u793A\u7684\u672C\u5730\u5316\u6587\u672C\uFF0C\u652F\u6301 Markdown \u4E0E `{{ row.foo }}` / `{{ form.bar }}` \u63D2\u503C"
37
+ }),
38
+ value: ItemValue,
39
+ tooltip: Schema.optional(LocaleMd.annotations({
40
+ title: "\u63D0\u793A",
41
+ description: "\u9F20\u6807\u60AC\u505C\u5728\u9009\u9879\u4E0A\u65F6\u5C55\u793A\u7684\u672C\u5730\u5316\u63D0\u793A\uFF0C\u652F\u6301 Markdown"
42
+ }))
43
+ }).annotations({
44
+ title: "ComboboxMultiRemoteOptionsStaticItem"
45
+ });
46
+ }
47
+ export function schema(configure) {
48
+ const CelBool = CelRowAccess(configure, { resultType: "bool" });
49
+ const Item = itemSchema(configure);
50
+ const CelOnChange = Expression({
51
+ configure: (env) => {
52
+ configure(env);
53
+ registerRowVariablesIfAbsent(env);
54
+ env.registerVariable("value", "dyn", { description: "\u7528\u6237\u5F53\u524D\u9009\u4E2D\u9879 `value` \u7EC4\u6210\u7684\u6570\u7EC4\uFF1B\u6E05\u7A7A\u65F6\u4E3A\u7A7A\u6570\u7EC4 `[]`" });
55
+ },
56
+ resultType: "HttpRequest"
57
+ });
58
+ const CelMessage = Expression({
59
+ configure: (env) => {
60
+ configure(env);
61
+ env.registerVariable("json", "dyn", { description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09" });
62
+ },
63
+ resultType: "string"
64
+ });
65
+ return Schema.Struct({
66
+ type: Schema.Literal(type),
67
+ compatibilityDate: Schema.Literal(compatibilityDate),
68
+ ...columnFields(configure),
69
+ placeholder: Schema.optional(Locale.annotations({
70
+ title: "\u5360\u4F4D\u7B26",
71
+ description: "\u672A\u9009\u4E2D\u4EFB\u4F55\u9009\u9879\u65F6\u8F93\u5165\u6846\u4E2D\u7684\u5360\u4F4D\u6587\u672C"
72
+ })),
73
+ hidden: Schema.optional(CelBool.annotations({
74
+ title: "\u9690\u85CF\u6761\u4EF6",
75
+ description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u884C\u7684\u4E0B\u62C9\u6846\u4E0D\u6E32\u67D3\uFF08\u5176\u4F59\u884C\u4E0D\u53D7\u5F71\u54CD\uFF09"
76
+ })),
77
+ disabled: Schema.optional(CelBool.annotations({
78
+ title: "\u7981\u7528\u6761\u4EF6",
79
+ description: "\u8FD4\u56DE `true` \u65F6\u4E0B\u62C9\u6846\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u9009\u62E9"
80
+ })),
81
+ readonly: Schema.optional(CelBool.annotations({
82
+ title: "\u53EA\u8BFB\u6761\u4EF6",
83
+ description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u5DF2\u9009\u9879\u7684\u6807\u7B7E"
84
+ })),
85
+ items: Schema.optionalWith(Schema.Array(Item).annotations({
86
+ title: "\u9009\u9879",
87
+ description: "\u4E0B\u62C9\u6846\u53EF\u9009\u9879\u5217\u8868"
88
+ }), { default: () => [] }),
89
+ onChange: Schema.optional(CelOnChange.annotations({
90
+ title: "\u5207\u6362\u8BF7\u6C42",
91
+ description: "\u7528\u6237\u9009\u62E9\u540E\u7ACB\u5373\u6C42\u503C\u5E76\u53D1\u8D77\u7684 HTTP \u8BF7\u6C42\uFF1B`value` \u4E3A\u65B0\u6570\u7EC4\u3002\u672A\u914D\u7F6E\u65F6\u4E0B\u62C9\u6846\u53EA\u8BFB"
92
+ })),
93
+ successMessage: Schema.optional(CelMessage.annotations({
94
+ title: "\u6210\u529F\u6D88\u606F",
95
+ description: "\u8BF7\u6C42\u6210\u529F\u540E\u5F39\u51FA\u7684 toast \u5185\u5BB9\uFF1B\u672A\u914D\u7F6E\u5219\u9759\u9ED8"
96
+ })),
97
+ triggers: Schema.optional(Triggers.annotations({
98
+ title: "\u6210\u529F\u540E\u89E6\u53D1",
99
+ description: "\u8BF7\u6C42\u6210\u529F\u540E\u6309\u5217\u8868\u987A\u5E8F\u5192\u6CE1\u7684\u64CD\u4F5C\u8BF7\u6C42\uFF1B\u672A\u914D\u7F6E\u5219\u4EC0\u4E48\u90FD\u4E0D\u505A"
100
+ }))
101
+ }).annotations({
102
+ title: "ComboboxMultiRemoteOptionsStaticRenderer",
103
+ description: "\u4E0B\u62C9\u591A\u9009\u6E32\u67D3\u5668\uFF08\u8FDC\u7A0B\u5199\u5165\xB7\u9759\u6001\u9009\u9879\uFF09"
104
+ });
105
+ }
106
+ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
107
+ return {
108
+ header: editableHeader(getLocaleText(value.title)),
109
+ accessorFn: (row, index) => {
110
+ try {
111
+ return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
112
+ } catch (e) {
113
+ console.error("[shwfed-table] combobox-multi.remote.options-static accessor failed", e);
114
+ return void 0;
115
+ }
116
+ },
117
+ enableSorting: value.enableSorting ?? false,
118
+ sortingFn: "basic",
119
+ size: value.size,
120
+ meta: {
121
+ grow: value.grow ?? false,
122
+ tooltip: getLocaleText(value.tooltip)
123
+ }
124
+ };
125
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "2.3.22",
3
+ "version": "2.3.23",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {