@shwfed/config 3.0.10 → 3.0.11

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 (40) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
  3. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
  4. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
  5. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
  6. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
  7. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
  8. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
  9. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
  10. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
  11. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
  12. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
  13. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
  14. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
  15. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
  16. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/config.d.vue.ts +34 -0
  17. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/config.vue +109 -1
  18. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/config.vue.d.ts +34 -0
  19. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/prompt.md +7 -0
  20. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/runtime.vue +66 -22
  21. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.d.ts +23 -0
  22. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.js +26 -0
  23. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/config.d.vue.ts +10 -0
  24. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/config.vue +1004 -0
  25. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/config.vue.d.ts +10 -0
  26. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/prompt.md +19 -0
  27. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/runtime.d.vue.ts +9 -0
  28. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/runtime.vue +503 -0
  29. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/runtime.vue.d.ts +9 -0
  30. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.d.ts +138 -0
  31. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.js +181 -0
  32. package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
  33. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
  34. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
  35. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
  36. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
  37. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
  38. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
  39. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
  40. package/package.json +1 -1
@@ -0,0 +1,138 @@
1
+ import { Schema } from 'effect';
2
+ import type { ColumnDef } from '@tanstack/vue-table';
3
+ import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
4
+ import type { ColumnDefDeps } from '../../../utils/resolve.js';
5
+ export declare const type: "com.shwfed.table.column.upload";
6
+ export declare const compatibilityDate: "2026-07-16";
7
+ export declare const metadata: {
8
+ readonly name: "文件上传";
9
+ readonly icon: "fluent:cloud-arrow-up-20-regular";
10
+ readonly description: "可编辑的文件上传单元格,值为文件描述对象列表,写回行数据";
11
+ };
12
+ export declare const JSON_VAR: {
13
+ readonly type: "dyn";
14
+ readonly label: "HTTP 响应体";
15
+ readonly description: "第一步 `请求` 的响应体(已解析 JSON);用于构造第二步下载请求";
16
+ };
17
+ export declare const FILES_VAR: {
18
+ readonly type: "list<dyn>";
19
+ readonly label: "已选文件";
20
+ readonly description: "本次选择的文件列表(`File` 数组);通常通过 `form({...})` 构造 multipart 请求体";
21
+ };
22
+ export declare const UPLOAD_JSON_VAR: {
23
+ readonly type: "dyn";
24
+ readonly label: "上传响应";
25
+ readonly description: "上传 `请求` 的响应体(已解析 JSON);用于提取已上传文件项";
26
+ };
27
+ export declare const FILE_VAR: {
28
+ readonly type: "dyn";
29
+ readonly label: "文件项";
30
+ readonly description: "行数据中的单个文件项(服务端回填或上传响应映射所得);返回其展示文件名";
31
+ };
32
+ export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
33
+ placeholder: Schema.optional<Schema.suspend<readonly [{
34
+ readonly locale: "zh";
35
+ readonly message: string;
36
+ }, ...{
37
+ readonly locale: "en" | "ja" | "ko";
38
+ readonly message: string;
39
+ }[]], string | readonly [{
40
+ readonly locale: "zh";
41
+ readonly message: string;
42
+ }, ...{
43
+ readonly locale: "en" | "ja" | "ko";
44
+ readonly message: string;
45
+ }[]], never>>;
46
+ disabled: Schema.optional<Schema.Schema<string, string, never>>;
47
+ readonly: Schema.optional<Schema.Schema<string, string, never>>;
48
+ multiple: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
49
+ accept: Schema.optional<Schema.Array$<typeof Schema.String>>;
50
+ maxFileSize: Schema.optional<Schema.refine<number, typeof Schema.Number>>;
51
+ maxTotalSize: Schema.optional<Schema.refine<number, typeof Schema.Number>>;
52
+ maxFiles: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
53
+ upload: Schema.optional<Schema.Struct<{
54
+ request: Schema.Schema<string, string, never>;
55
+ handle: Schema.Schema<string, string, never>;
56
+ filename: Schema.optional<Schema.Schema<string, string, never>>;
57
+ }>>;
58
+ templates: Schema.optional<Schema.Array$<Schema.Struct<{
59
+ request: Schema.Schema<string, string, never>;
60
+ download: Schema.optional<Schema.Schema<string, string, never>>;
61
+ icon: Schema.optional<Schema.refine<string, typeof Schema.String>>;
62
+ label: Schema.optional<Schema.suspend<readonly [{
63
+ readonly locale: "zh";
64
+ readonly message: string;
65
+ }, ...{
66
+ readonly locale: "en" | "ja" | "ko";
67
+ readonly message: string;
68
+ }[]], string | readonly [{
69
+ readonly locale: "zh";
70
+ readonly message: string;
71
+ }, ...{
72
+ readonly locale: "en" | "ja" | "ko";
73
+ readonly message: string;
74
+ }[]], never>>;
75
+ }>>>;
76
+ download: Schema.optional<Schema.Struct<{
77
+ operations: Schema.Array$<Schema.Struct<{
78
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
79
+ target: Schema.refine<string, typeof Schema.String>;
80
+ operation: Schema.SchemaClass<string, string, never>;
81
+ compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
82
+ params: Schema.optional<Schema.SchemaClass<unknown, unknown, never>>;
83
+ }>>;
84
+ icon: Schema.optional<Schema.refine<string, typeof Schema.String>>;
85
+ label: Schema.optional<Schema.suspend<readonly [{
86
+ readonly locale: "zh";
87
+ readonly message: string;
88
+ }, ...{
89
+ readonly locale: "en" | "ja" | "ko";
90
+ readonly message: string;
91
+ }[]], string | readonly [{
92
+ readonly locale: "zh";
93
+ readonly message: string;
94
+ }, ...{
95
+ readonly locale: "en" | "ja" | "ko";
96
+ readonly message: string;
97
+ }[]], never>>;
98
+ }>>;
99
+ title: Schema.suspend<readonly [{
100
+ readonly locale: "zh";
101
+ readonly message: string;
102
+ }, ...{
103
+ readonly locale: "en" | "ja" | "ko";
104
+ readonly message: string;
105
+ }[]], string | readonly [{
106
+ readonly locale: "zh";
107
+ readonly message: string;
108
+ }, ...{
109
+ readonly locale: "en" | "ja" | "ko";
110
+ readonly message: string;
111
+ }[]], never>;
112
+ binding: Schema.refine<string, typeof Schema.String>;
113
+ enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
114
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
115
+ size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
116
+ grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
117
+ tooltip: Schema.optional<Schema.suspend<readonly [{
118
+ readonly locale: "zh";
119
+ readonly message: string;
120
+ }, ...{
121
+ readonly locale: "en" | "ja" | "ko";
122
+ readonly message: string;
123
+ }[]], string | readonly [{
124
+ readonly locale: "zh";
125
+ readonly message: string;
126
+ }, ...{
127
+ readonly locale: "en" | "ja" | "ko";
128
+ readonly message: string;
129
+ }[]], never>>;
130
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
131
+ id: Schema.refine<string, typeof Schema.String>;
132
+ groupId: Schema.optional<typeof Schema.UUID>;
133
+ type: Schema.Literal<["com.shwfed.table.column.upload"]>;
134
+ compatibilityDate: Schema.Literal<["2026-07-16"]>;
135
+ }>;
136
+ export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
137
+ export declare function defaults(): Partial<Value>;
138
+ export declare function toColumnDef(value: Value, { getLocaleText }: ColumnDefDeps): Partial<ColumnDef<unknown, unknown>>;
@@ -0,0 +1,181 @@
1
+ import { Schema } from "effect";
2
+ import { getProperty } from "dot-prop";
3
+ import { Expression } from "../../../../../share/expression.js";
4
+ import { Triggers } from "../../../../../share/event-bus.js";
5
+ import { Locale } from "../../../../../share/locale.js";
6
+ import {
7
+ CelRowAccess,
8
+ editableColumnFields,
9
+ editableHeader,
10
+ registerRowVariablesIfAbsent
11
+ } from "../../../utils/shared.js";
12
+ export const type = "com.shwfed.table.column.upload";
13
+ export const compatibilityDate = "2026-07-16";
14
+ export const metadata = {
15
+ name: "\u6587\u4EF6\u4E0A\u4F20",
16
+ icon: "fluent:cloud-arrow-up-20-regular",
17
+ description: "\u53EF\u7F16\u8F91\u7684\u6587\u4EF6\u4E0A\u4F20\u5355\u5143\u683C\uFF0C\u503C\u4E3A\u6587\u4EF6\u63CF\u8FF0\u5BF9\u8C61\u5217\u8868\uFF0C\u5199\u56DE\u884C\u6570\u636E"
18
+ };
19
+ export const JSON_VAR = {
20
+ type: "dyn",
21
+ label: "HTTP \u54CD\u5E94\u4F53",
22
+ description: "\u7B2C\u4E00\u6B65 `\u8BF7\u6C42` \u7684\u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u7528\u4E8E\u6784\u9020\u7B2C\u4E8C\u6B65\u4E0B\u8F7D\u8BF7\u6C42"
23
+ };
24
+ export const FILES_VAR = {
25
+ type: "list<dyn>",
26
+ label: "\u5DF2\u9009\u6587\u4EF6",
27
+ description: "\u672C\u6B21\u9009\u62E9\u7684\u6587\u4EF6\u5217\u8868\uFF08`File` \u6570\u7EC4\uFF09\uFF1B\u901A\u5E38\u901A\u8FC7 `form({...})` \u6784\u9020 multipart \u8BF7\u6C42\u4F53"
28
+ };
29
+ export const UPLOAD_JSON_VAR = {
30
+ type: "dyn",
31
+ label: "\u4E0A\u4F20\u54CD\u5E94",
32
+ description: "\u4E0A\u4F20 `\u8BF7\u6C42` \u7684\u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u7528\u4E8E\u63D0\u53D6\u5DF2\u4E0A\u4F20\u6587\u4EF6\u9879"
33
+ };
34
+ export const FILE_VAR = {
35
+ type: "dyn",
36
+ label: "\u6587\u4EF6\u9879",
37
+ description: "\u884C\u6570\u636E\u4E2D\u7684\u5355\u4E2A\u6587\u4EF6\u9879\uFF08\u670D\u52A1\u7AEF\u56DE\u586B\u6216\u4E0A\u4F20\u54CD\u5E94\u6620\u5C04\u6240\u5F97\uFF09\uFF1B\u8FD4\u56DE\u5176\u5C55\u793A\u6587\u4EF6\u540D"
38
+ };
39
+ function withRowAndVar(configure, name, spec) {
40
+ return (env) => {
41
+ configure(env);
42
+ registerRowVariablesIfAbsent(env);
43
+ env.registerVariable(name, spec.type, { description: spec.description });
44
+ };
45
+ }
46
+ export function schema(configure) {
47
+ const CelBool = CelRowAccess(configure, { resultType: "bool" });
48
+ const CelHttpRequest = CelRowAccess(configure, { resultType: "HttpRequest" });
49
+ const CelDownloadRequest = Expression({ configure: withRowAndVar(configure, "json", JSON_VAR), resultType: "HttpRequest" });
50
+ const CelUploadRequest = Expression({ configure: withRowAndVar(configure, "files", FILES_VAR), resultType: "HttpRequest" });
51
+ const CelUploadHandle = Expression({ configure: withRowAndVar(configure, "json", UPLOAD_JSON_VAR), resultType: "list" });
52
+ const CelItemName = Expression({ configure: withRowAndVar(configure, "file", FILE_VAR), resultType: "string" });
53
+ return Schema.Struct({
54
+ type: Schema.Literal(type),
55
+ compatibilityDate: Schema.Literal(compatibilityDate),
56
+ ...editableColumnFields(),
57
+ placeholder: Schema.optional(Locale.annotations({
58
+ title: "\u5360\u4F4D\u7B26",
59
+ description: "\u5355\u5143\u683C\u4E3A\u7A7A\u65F6\u4E0A\u4F20\u533A\u57DF\u7684\u63D0\u793A\u6587\u672C"
60
+ })),
61
+ disabled: Schema.optional(CelBool.annotations({
62
+ title: "\u7981\u7528\u6761\u4EF6",
63
+ description: "\u8FD4\u56DE `true` \u65F6\u4E0A\u4F20\u533A\u57DF\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u64CD\u4F5C"
64
+ })),
65
+ readonly: Schema.optional(CelBool.annotations({
66
+ title: "\u53EA\u8BFB\u6761\u4EF6",
67
+ description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u6587\u4EF6\u5217\u8868\u5C55\u793A\u5F53\u524D\u503C\uFF0C\u4E0D\u5141\u8BB8\u589E\u5220"
68
+ })),
69
+ multiple: Schema.optional(Schema.Boolean.annotations({
70
+ title: "\u5141\u8BB8\u591A\u6587\u4EF6",
71
+ description: "\u5F00\u542F\u540E\u53EF\u4E00\u6B21\u9009\u62E9/\u62D6\u5165\u591A\u4E2A\u6587\u4EF6\uFF1B\u5173\u95ED\u65F6\u65B0\u6587\u4EF6\u4F1A\u66FF\u6362\u5DF2\u9009\u6587\u4EF6"
72
+ })),
73
+ accept: Schema.optional(Schema.Array(Schema.String).annotations({
74
+ title: "\u5141\u8BB8\u7684\u6587\u4EF6\u7C7B\u578B",
75
+ description: "\u5141\u8BB8\u4E0A\u4F20\u7684 MIME \u7C7B\u578B\u5217\u8868\uFF1B\u7559\u7A7A\u8868\u793A\u4E0D\u9650\u5236"
76
+ })),
77
+ maxFileSize: Schema.optional(Schema.Number.pipe(Schema.positive()).annotations({
78
+ title: "\u5355\u6587\u4EF6\u5927\u5C0F\u9650\u5236",
79
+ description: "\u5355\u4E2A\u6587\u4EF6\u5141\u8BB8\u7684\u6700\u5927\u5B57\u8282\u6570\uFF1B\u8D85\u8FC7\u6B64\u9650\u5236\u7684\u6587\u4EF6\u4F1A\u88AB\u62D2\u7EDD"
80
+ })),
81
+ maxTotalSize: Schema.optional(Schema.Number.pipe(Schema.positive()).annotations({
82
+ title: "\u603B\u5927\u5C0F\u9650\u5236",
83
+ description: "\u6240\u6709\u5DF2\u9009\u6587\u4EF6\u7D2F\u8BA1\u7684\u6700\u5927\u5B57\u8282\u6570\uFF1B\u65B0\u589E\u5BFC\u81F4\u8D85\u51FA\u65F6\u4F1A\u88AB\u62D2\u7EDD"
84
+ })),
85
+ maxFiles: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.positive()).annotations({
86
+ title: "\u6587\u4EF6\u6570\u91CF\u9650\u5236",
87
+ description: "\u5141\u8BB8\u540C\u65F6\u4E0A\u4F20\u7684\u6700\u5927\u6587\u4EF6\u6570\uFF1B\u8FBE\u5230\u4E0A\u9650\u540E\u65B0\u589E\u6587\u4EF6\u4F1A\u88AB\u62D2\u7EDD"
88
+ })),
89
+ // Immediate upload. Its presence enables "upload on pick": each picked file
90
+ // is POSTed right away (`request`), the response is mapped into the stored
91
+ // items (`handle`), and each stored item's display name is resolved via
92
+ // `filename`. Absent → files are held as raw `File[]` at the binding and
93
+ // submitted with whatever consumes the row. Mirrors the form upload field.
94
+ upload: Schema.optional(Schema.Struct({
95
+ request: CelUploadRequest.annotations({
96
+ title: "\u4E0A\u4F20\u8BF7\u6C42",
97
+ description: '\u8FD4\u56DE `HttpRequest` \u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u53EF\u901A\u8FC7 `files` \u5F15\u7528\u672C\u6B21\u9009\u62E9\u7684\u6587\u4EF6\uFF0C\u4F8B\u5982 `http.post(url).body(form({"files": files}))`\u3002\u4EE5 `.json()` \u53D1\u8D77'
98
+ }),
99
+ handle: CelUploadHandle.annotations({
100
+ title: "\u5904\u7406\u54CD\u5E94",
101
+ description: '\u8FD4\u56DE**\u5217\u8868**\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u901A\u8FC7 `json` \u5F15\u7528\u4E0A\u4F20\u54CD\u5E94\uFF1B\u6620\u5C04\u4E3A\u5199\u5165\u7ED1\u5B9A\u503C\u7684\u6587\u4EF6\u9879\uFF0C\u4F8B\u5982 `json.data.map(d, {"cacheKey": d.key, "filename": d.fileOriginalName})`'
102
+ }),
103
+ filename: Schema.optional(CelItemName.annotations({
104
+ title: "\u6587\u4EF6\u540D",
105
+ description: "\u8FD4\u56DE `string` \u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u901A\u8FC7 `file` \u5F15\u7528\u5355\u4E2A\u6587\u4EF6\u9879\uFF1B\u7528\u4E8E\u5C55\u793A\u6587\u4EF6\u540D\uFF0C\u4F8B\u5982 `file.filename`\u3002\u7559\u7A7A\u65F6\u56DE\u9000\u5230 `filename` / `name` \u5B57\u6BB5"
106
+ }))
107
+ }).annotations({
108
+ title: "\u5373\u65F6\u4E0A\u4F20",
109
+ description: "\u914D\u7F6E\u540E\u6587\u4EF6\u5728\u9009\u62E9\u65F6\u7ACB\u5373\u4E0A\u4F20\uFF0C\u7ED1\u5B9A\u503C\u5B58\u50A8\u6620\u5C04\u540E\u7684\u6587\u4EF6\u9879\uFF08\u800C\u975E\u539F\u59CB `File`\uFF09\uFF1B\u4E0D\u914D\u7F6E\u5219\u4FDD\u7559\u6587\u4EF6\u7B49\u5F85\u6574\u884C\u63D0\u4EA4"
110
+ })),
111
+ // Download templates — each entry renders one button next to the upload
112
+ // zone. `request` is the (possibly only) step; `download` is an optional
113
+ // second step that may reference the first response via `json`.
114
+ templates: Schema.optional(Schema.Array(Schema.Struct({
115
+ request: CelHttpRequest.annotations({
116
+ title: "\u8BF7\u6C42",
117
+ description: "\u8FD4\u56DE `HttpRequest` \u7684 CEL \u8868\u8FBE\u5F0F\u3002\u672A\u914D\u7F6E\u300C\u4E0B\u8F7D\u8BF7\u6C42\u300D\u65F6\u76F4\u63A5\u53D1\u8D77\u5E76\u4E0B\u8F7D\u5176\u54CD\u5E94\uFF1B\u914D\u7F6E\u4E86\u300C\u4E0B\u8F7D\u8BF7\u6C42\u300D\u65F6\u4F5C\u4E3A\u83B7\u53D6\u4E0B\u8F7D\u51ED\u636E\u7684\u7B2C\u4E00\u6B65\u8BF7\u6C42"
118
+ }),
119
+ download: Schema.optional(CelDownloadRequest.annotations({
120
+ title: "\u4E0B\u8F7D\u8BF7\u6C42",
121
+ description: "\u53EF\u9009\u7684\u7B2C\u4E8C\u6B65\uFF1A\u8FD4\u56DE `HttpRequest` \u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u901A\u8FC7 `json` \u5F15\u7528\u7B2C\u4E00\u6B65\u7684\u54CD\u5E94\u4F53\uFF0C\u4F8B\u5982\u7528 `json.data.key` \u6784\u9020\u771F\u6B63\u7684\u4E0B\u8F7D\u8BF7\u6C42"
122
+ })),
123
+ icon: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
124
+ title: "\u6A21\u677F\u6309\u94AE\u56FE\u6807",
125
+ description: "Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u4F8B\u5982 `fluent:arrow-download-20-regular`\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u9ED8\u8BA4\u56FE\u6807"
126
+ })),
127
+ label: Schema.optional(Locale.annotations({
128
+ title: "\u6A21\u677F\u6309\u94AE\u6587\u672C",
129
+ description: "\u4E0B\u8F7D\u6A21\u677F\u6309\u94AE\u4E0A\u7684\u672C\u5730\u5316\u6587\u672C\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u300C\u4E0B\u8F7D\u6A21\u677F\u300D"
130
+ }))
131
+ })).annotations({
132
+ title: "\u4E0B\u8F7D\u6A21\u677F",
133
+ description: "\u4E0B\u8F7D\u6A21\u677F\u5217\u8868\uFF1B\u6BCF\u4E00\u9879\u5728\u4E0A\u4F20\u533A\u57DF\u65C1\u6E32\u67D3\u4E00\u4E2A\u4E0B\u8F7D\u6309\u94AE"
134
+ })),
135
+ // Per-file download — a 触发操作 (trigger-operation) list run when the user
136
+ // clicks a file item's 下载 button, with the clicked stored item in scope as
137
+ // `file` (the same `FILE_VAR` as `upload.filename`), on top of the row scope.
138
+ // Object entries download via these operations; a freshly-picked native
139
+ // `File` bypasses the list and downloads from its in-memory blob. Mirrors the
140
+ // form upload field.
141
+ download: Schema.optional(Schema.Struct({
142
+ operations: Triggers,
143
+ icon: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
144
+ title: "\u4E0B\u8F7D\u6309\u94AE\u56FE\u6807",
145
+ description: "Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u4F8B\u5982 `fluent:arrow-download-20-regular`\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u9ED8\u8BA4\u56FE\u6807"
146
+ })),
147
+ label: Schema.optional(Locale.annotations({
148
+ title: "\u4E0B\u8F7D\u6309\u94AE\u6587\u672C",
149
+ description: "\u6BCF\u4E2A\u6587\u4EF6\u9879\u4E0B\u8F7D\u6309\u94AE\u7684\u672C\u5730\u5316\u65E0\u969C\u788D\u6807\u7B7E\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u300C\u4E0B\u8F7D\u300D"
150
+ }))
151
+ }).annotations({
152
+ title: "\u6587\u4EF6\u4E0B\u8F7D",
153
+ description: "\u914D\u7F6E\u540E\u6BCF\u4E2A\u6587\u4EF6\u9879\u65C1\u6E32\u67D3\u4E0B\u8F7D\u6309\u94AE\uFF1A\u5DF2\u4E0A\u4F20/\u56DE\u586B\u7684\u5BF9\u8C61\u9879\u6309\u300C\u89E6\u53D1\u64CD\u4F5C\u300D\u5217\u8868\u4E0B\u8F7D\uFF08`file` \u4E3A\u8BE5\u6587\u4EF6\u9879\uFF09\uFF1B\u5C1A\u672A\u4E0A\u4F20\u7684\u672C\u5730\u6587\u4EF6\u76F4\u63A5\u4ECE\u5185\u5B58\u4E0B\u8F7D\uFF0C\u4E0D\u7ECF\u8FC7\u8BE5\u5217\u8868"
154
+ }))
155
+ }).annotations({ title: "UploadRenderer", description: "\u6587\u4EF6\u4E0A\u4F20\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\uFF09" });
156
+ }
157
+ export function defaults() {
158
+ return {
159
+ title: [{ locale: "zh", message: "" }],
160
+ binding: "",
161
+ size: 200
162
+ };
163
+ }
164
+ export function toColumnDef(value, { getLocaleText }) {
165
+ return {
166
+ header: editableHeader(getLocaleText(value.title)),
167
+ // `binding` is a dot-prop path (validated non-empty); the cell renderer
168
+ // reads through the same path it writes to. No CEL — accessor is literal.
169
+ accessorFn: (row) => {
170
+ if (!row || typeof row !== "object") return void 0;
171
+ return getProperty(row, value.binding);
172
+ },
173
+ enableSorting: value.enableSorting ?? false,
174
+ sortingFn: "alphanumeric",
175
+ size: value.size,
176
+ meta: {
177
+ grow: value.grow ?? false,
178
+ tooltip: getLocaleText(value.tooltip)
179
+ }
180
+ };
181
+ }
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
28
28
  "onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
29
29
  }>, {
30
30
  size: "sm" | "md" | "lg";
31
- clearable: boolean;
32
31
  clearIcon: string;
32
+ clearable: boolean;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
34
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
35
35
  declare const _default: typeof __VLS_export;
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
28
28
  "onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
29
29
  }>, {
30
30
  size: "sm" | "md" | "lg";
31
- clearable: boolean;
32
31
  clearIcon: string;
32
+ clearable: boolean;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
34
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
35
35
  declare const _default: typeof __VLS_export;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
22
22
  size: "sm" | "md" | "lg";
23
23
  granularity: "hour" | "minute" | "second";
24
24
  hourCycle: 12 | 24;
25
- clearable: boolean;
26
25
  clearIcon: string;
26
+ clearable: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
22
22
  size: "sm" | "md" | "lg";
23
23
  granularity: "hour" | "minute" | "second";
24
24
  hourCycle: 12 | 24;
25
- clearable: boolean;
26
25
  clearIcon: string;
26
+ clearable: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -29,8 +29,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
29
29
  "onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
30
30
  }>, {
31
31
  size: "sm" | "md" | "lg";
32
- clearable: boolean;
33
32
  clearIcon: string;
33
+ clearable: boolean;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
35
  declare const _default: typeof __VLS_export;
36
36
  export default _default;
@@ -29,8 +29,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
29
29
  "onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
30
30
  }>, {
31
31
  size: "sm" | "md" | "lg";
32
- clearable: boolean;
33
32
  clearIcon: string;
33
+ clearable: boolean;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
35
  declare const _default: typeof __VLS_export;
36
36
  export default _default;
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
26
26
  size: "sm" | "md" | "lg";
27
27
  granularity: "hour" | "minute" | "second";
28
28
  hourCycle: 12 | 24;
29
- clearable: boolean;
30
- clearIcon: string;
31
29
  rangeSeparatorIcon: string;
30
+ clearIcon: string;
31
+ clearable: boolean;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: typeof __VLS_export;
34
34
  export default _default;
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
26
26
  size: "sm" | "md" | "lg";
27
27
  granularity: "hour" | "minute" | "second";
28
28
  hourCycle: 12 | 24;
29
- clearable: boolean;
30
- clearIcon: string;
31
29
  rangeSeparatorIcon: string;
30
+ clearIcon: string;
31
+ clearable: boolean;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: typeof __VLS_export;
34
34
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {