@shwfed/config 2.2.5 → 2.3.0
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/module.json +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +9 -15
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +32 -52
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +19 -8
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.js +4 -3
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue +25 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue +2 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +4 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.js +5 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +133 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue +533 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +133 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.vue +237 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +124 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.js +96 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.d.vue.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +475 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue.d.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +156 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +56 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +81 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.d.vue.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +292 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue.d.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +140 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +50 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +53 -0
- package/dist/runtime/components/table/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/config.vue +136 -109
- package/dist/runtime/components/table/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/index.d.vue.ts +2 -2
- package/dist/runtime/components/table/index.vue +46 -53
- package/dist/runtime/components/table/index.vue.d.ts +2 -2
- package/dist/runtime/components/table/row-provider.d.vue.ts +23 -0
- package/dist/runtime/components/table/row-provider.vue +55 -0
- package/dist/runtime/components/table/row-provider.vue.d.ts +23 -0
- package/dist/runtime/components/table/schema.d.ts +17 -29
- package/dist/runtime/components/table/schema.js +22 -18
- package/dist/runtime/components/table/utils/shared.d.ts +28 -0
- package/dist/runtime/components/table/utils/shared.js +40 -0
- package/dist/runtime/components/ui/field/index.js +6 -1
- package/dist/runtime/components/ui/input/Input.vue +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts
CHANGED
|
@@ -34,11 +34,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
34
34
|
readonly message: string;
|
|
35
35
|
}[]] | undefined;
|
|
36
36
|
}[];
|
|
37
|
-
readonly dataSource
|
|
37
|
+
readonly dataSource?: {
|
|
38
38
|
readonly data: string;
|
|
39
39
|
readonly request?: string | undefined;
|
|
40
40
|
readonly total?: string | undefined;
|
|
41
|
-
};
|
|
41
|
+
} | undefined;
|
|
42
42
|
readonly actions?: {
|
|
43
43
|
readonly size: "default" | "sm" | "xs";
|
|
44
44
|
readonly style?: string | undefined;
|
|
@@ -147,9 +147,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
147
147
|
readonly locale: "en" | "ja" | "ko";
|
|
148
148
|
readonly message: string;
|
|
149
149
|
}[]] | undefined;
|
|
150
|
-
readonly pageSizes: readonly number[];
|
|
151
|
-
readonly pageIndex: number;
|
|
152
150
|
readonly pageSize: number;
|
|
151
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
152
|
+
readonly pageIndex?: number | undefined;
|
|
153
153
|
} | undefined;
|
|
154
154
|
readonly initialState?: {
|
|
155
155
|
readonly expanded?: boolean | {
|
|
@@ -209,11 +209,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
209
209
|
readonly message: string;
|
|
210
210
|
}[]] | undefined;
|
|
211
211
|
}[];
|
|
212
|
-
readonly dataSource
|
|
212
|
+
readonly dataSource?: {
|
|
213
213
|
readonly data: string;
|
|
214
214
|
readonly request?: string | undefined;
|
|
215
215
|
readonly total?: string | undefined;
|
|
216
|
-
};
|
|
216
|
+
} | undefined;
|
|
217
217
|
readonly actions?: {
|
|
218
218
|
readonly size: "default" | "sm" | "xs";
|
|
219
219
|
readonly style?: string | undefined;
|
|
@@ -322,9 +322,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
322
322
|
readonly locale: "en" | "ja" | "ko";
|
|
323
323
|
readonly message: string;
|
|
324
324
|
}[]] | undefined;
|
|
325
|
-
readonly pageSizes: readonly number[];
|
|
326
|
-
readonly pageIndex: number;
|
|
327
325
|
readonly pageSize: number;
|
|
326
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
327
|
+
readonly pageIndex?: number | undefined;
|
|
328
328
|
} | undefined;
|
|
329
329
|
readonly initialState?: {
|
|
330
330
|
readonly expanded?: boolean | {
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts
CHANGED
|
@@ -34,11 +34,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
34
34
|
readonly message: string;
|
|
35
35
|
}[]] | undefined;
|
|
36
36
|
}[];
|
|
37
|
-
readonly dataSource
|
|
37
|
+
readonly dataSource?: {
|
|
38
38
|
readonly data: string;
|
|
39
39
|
readonly request?: string | undefined;
|
|
40
40
|
readonly total?: string | undefined;
|
|
41
|
-
};
|
|
41
|
+
} | undefined;
|
|
42
42
|
readonly actions?: {
|
|
43
43
|
readonly size: "default" | "sm" | "xs";
|
|
44
44
|
readonly style?: string | undefined;
|
|
@@ -147,9 +147,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
147
147
|
readonly locale: "en" | "ja" | "ko";
|
|
148
148
|
readonly message: string;
|
|
149
149
|
}[]] | undefined;
|
|
150
|
-
readonly pageSizes: readonly number[];
|
|
151
|
-
readonly pageIndex: number;
|
|
152
150
|
readonly pageSize: number;
|
|
151
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
152
|
+
readonly pageIndex?: number | undefined;
|
|
153
153
|
} | undefined;
|
|
154
154
|
readonly initialState?: {
|
|
155
155
|
readonly expanded?: boolean | {
|
|
@@ -209,11 +209,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
209
209
|
readonly message: string;
|
|
210
210
|
}[]] | undefined;
|
|
211
211
|
}[];
|
|
212
|
-
readonly dataSource
|
|
212
|
+
readonly dataSource?: {
|
|
213
213
|
readonly data: string;
|
|
214
214
|
readonly request?: string | undefined;
|
|
215
215
|
readonly total?: string | undefined;
|
|
216
|
-
};
|
|
216
|
+
} | undefined;
|
|
217
217
|
readonly actions?: {
|
|
218
218
|
readonly size: "default" | "sm" | "xs";
|
|
219
219
|
readonly style?: string | undefined;
|
|
@@ -322,9 +322,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
322
322
|
readonly locale: "en" | "ja" | "ko";
|
|
323
323
|
readonly message: string;
|
|
324
324
|
}[]] | undefined;
|
|
325
|
-
readonly pageSizes: readonly number[];
|
|
326
|
-
readonly pageIndex: number;
|
|
327
325
|
readonly pageSize: number;
|
|
326
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
327
|
+
readonly pageIndex?: number | undefined;
|
|
328
328
|
} | undefined;
|
|
329
329
|
readonly initialState?: {
|
|
330
330
|
readonly expanded?: boolean | {
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts
CHANGED
|
@@ -29,11 +29,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
29
29
|
readonly message: string;
|
|
30
30
|
}[]] | undefined;
|
|
31
31
|
}[];
|
|
32
|
-
readonly dataSource
|
|
32
|
+
readonly dataSource?: {
|
|
33
33
|
readonly data: string;
|
|
34
34
|
readonly request?: string | undefined;
|
|
35
35
|
readonly total?: string | undefined;
|
|
36
|
-
};
|
|
36
|
+
} | undefined;
|
|
37
37
|
readonly actions?: {
|
|
38
38
|
readonly size: "default" | "sm" | "xs";
|
|
39
39
|
readonly style?: string | undefined;
|
|
@@ -142,9 +142,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
142
142
|
readonly locale: "en" | "ja" | "ko";
|
|
143
143
|
readonly message: string;
|
|
144
144
|
}[]] | undefined;
|
|
145
|
-
readonly pageSizes: readonly number[];
|
|
146
|
-
readonly pageIndex: number;
|
|
147
145
|
readonly pageSize: number;
|
|
146
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
147
|
+
readonly pageIndex?: number | undefined;
|
|
148
148
|
} | undefined;
|
|
149
149
|
readonly initialState?: {
|
|
150
150
|
readonly expanded?: boolean | {
|
|
@@ -204,11 +204,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
204
204
|
readonly message: string;
|
|
205
205
|
}[]] | undefined;
|
|
206
206
|
}[];
|
|
207
|
-
readonly dataSource
|
|
207
|
+
readonly dataSource?: {
|
|
208
208
|
readonly data: string;
|
|
209
209
|
readonly request?: string | undefined;
|
|
210
210
|
readonly total?: string | undefined;
|
|
211
|
-
};
|
|
211
|
+
} | undefined;
|
|
212
212
|
readonly actions?: {
|
|
213
213
|
readonly size: "default" | "sm" | "xs";
|
|
214
214
|
readonly style?: string | undefined;
|
|
@@ -317,9 +317,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
317
317
|
readonly locale: "en" | "ja" | "ko";
|
|
318
318
|
readonly message: string;
|
|
319
319
|
}[]] | undefined;
|
|
320
|
-
readonly pageSizes: readonly number[];
|
|
321
|
-
readonly pageIndex: number;
|
|
322
320
|
readonly pageSize: number;
|
|
321
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
322
|
+
readonly pageIndex?: number | undefined;
|
|
323
323
|
} | undefined;
|
|
324
324
|
readonly initialState?: {
|
|
325
325
|
readonly expanded?: boolean | {
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts
CHANGED
|
@@ -29,11 +29,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
29
29
|
readonly message: string;
|
|
30
30
|
}[]] | undefined;
|
|
31
31
|
}[];
|
|
32
|
-
readonly dataSource
|
|
32
|
+
readonly dataSource?: {
|
|
33
33
|
readonly data: string;
|
|
34
34
|
readonly request?: string | undefined;
|
|
35
35
|
readonly total?: string | undefined;
|
|
36
|
-
};
|
|
36
|
+
} | undefined;
|
|
37
37
|
readonly actions?: {
|
|
38
38
|
readonly size: "default" | "sm" | "xs";
|
|
39
39
|
readonly style?: string | undefined;
|
|
@@ -142,9 +142,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
142
142
|
readonly locale: "en" | "ja" | "ko";
|
|
143
143
|
readonly message: string;
|
|
144
144
|
}[]] | undefined;
|
|
145
|
-
readonly pageSizes: readonly number[];
|
|
146
|
-
readonly pageIndex: number;
|
|
147
145
|
readonly pageSize: number;
|
|
146
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
147
|
+
readonly pageIndex?: number | undefined;
|
|
148
148
|
} | undefined;
|
|
149
149
|
readonly initialState?: {
|
|
150
150
|
readonly expanded?: boolean | {
|
|
@@ -204,11 +204,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
204
204
|
readonly message: string;
|
|
205
205
|
}[]] | undefined;
|
|
206
206
|
}[];
|
|
207
|
-
readonly dataSource
|
|
207
|
+
readonly dataSource?: {
|
|
208
208
|
readonly data: string;
|
|
209
209
|
readonly request?: string | undefined;
|
|
210
210
|
readonly total?: string | undefined;
|
|
211
|
-
};
|
|
211
|
+
} | undefined;
|
|
212
212
|
readonly actions?: {
|
|
213
213
|
readonly size: "default" | "sm" | "xs";
|
|
214
214
|
readonly style?: string | undefined;
|
|
@@ -317,9 +317,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
317
317
|
readonly locale: "en" | "ja" | "ko";
|
|
318
318
|
readonly message: string;
|
|
319
319
|
}[]] | undefined;
|
|
320
|
-
readonly pageSizes: readonly number[];
|
|
321
|
-
readonly pageIndex: number;
|
|
322
320
|
readonly pageSize: number;
|
|
321
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
322
|
+
readonly pageIndex?: number | undefined;
|
|
323
323
|
} | undefined;
|
|
324
324
|
readonly initialState?: {
|
|
325
325
|
readonly expanded?: boolean | {
|
|
@@ -44,11 +44,11 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
44
44
|
readonly message: string;
|
|
45
45
|
}[]] | undefined;
|
|
46
46
|
}[];
|
|
47
|
-
readonly dataSource
|
|
47
|
+
readonly dataSource?: {
|
|
48
48
|
readonly data: string;
|
|
49
49
|
readonly request?: string | undefined;
|
|
50
50
|
readonly total?: string | undefined;
|
|
51
|
-
};
|
|
51
|
+
} | undefined;
|
|
52
52
|
readonly actions?: {
|
|
53
53
|
readonly size: "default" | "sm" | "xs";
|
|
54
54
|
readonly style?: string | undefined;
|
|
@@ -157,9 +157,9 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
157
157
|
readonly locale: "en" | "ja" | "ko";
|
|
158
158
|
readonly message: string;
|
|
159
159
|
}[]] | undefined;
|
|
160
|
-
readonly pageSizes: readonly number[];
|
|
161
|
-
readonly pageIndex: number;
|
|
162
160
|
readonly pageSize: number;
|
|
161
|
+
readonly pageSizes?: readonly number[] | undefined;
|
|
162
|
+
readonly pageIndex?: number | undefined;
|
|
163
163
|
} | undefined;
|
|
164
164
|
readonly initialState?: {
|
|
165
165
|
readonly expanded?: boolean | {
|
|
@@ -213,11 +213,11 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
213
213
|
}>>, {
|
|
214
214
|
default: () => never[];
|
|
215
215
|
}>;
|
|
216
|
-
dataSource: Schema.Struct<{
|
|
216
|
+
dataSource: Schema.optional<Schema.Struct<{
|
|
217
217
|
request: Schema.optional<Schema.Schema<string, string, never>>;
|
|
218
218
|
data: Schema.Schema<string, string, never>;
|
|
219
219
|
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
220
|
-
}
|
|
220
|
+
}>>;
|
|
221
221
|
actions: Schema.optional<Schema.Struct<{
|
|
222
222
|
size: Schema.optionalWith<Schema.Literal<["default", "sm", "xs"]>, {
|
|
223
223
|
default: () => "default";
|
|
@@ -359,15 +359,9 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
359
359
|
cellStyle: Schema.optional<Schema.Schema<string, string, never>>;
|
|
360
360
|
style: Schema.optional<typeof Schema.String>;
|
|
361
361
|
pagination: Schema.optional<Schema.Struct<{
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
pageIndex: Schema.optionalWith<Schema.filter<Schema.filter<typeof Schema.Number>>, {
|
|
366
|
-
default: () => number;
|
|
367
|
-
}>;
|
|
368
|
-
pageSize: Schema.optionalWith<Schema.filter<Schema.filter<typeof Schema.Number>>, {
|
|
369
|
-
default: () => number;
|
|
370
|
-
}>;
|
|
362
|
+
pageSize: Schema.refine<number, Schema.filter<typeof Schema.Number>>;
|
|
363
|
+
pageSizes: Schema.optional<Schema.Array$<Schema.filter<Schema.filter<typeof Schema.Number>>>>;
|
|
364
|
+
pageIndex: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
371
365
|
left: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
372
366
|
locale: Schema.Literal<["zh"]>;
|
|
373
367
|
message: Schema.SchemaClass<string, string, never>;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
19
19
|
displayName?: string;
|
|
20
20
|
columns: ReadonlyArray<import("../../../../table/schema.js").ColumnValue>;
|
|
21
21
|
groups: ReadonlyArray<import("../../../../table/schema.js").ColumnGroupValue>;
|
|
22
|
-
dataSource
|
|
22
|
+
dataSource?: Readonly<{
|
|
23
23
|
request?: string;
|
|
24
24
|
data: string;
|
|
25
25
|
total?: string;
|
|
@@ -81,7 +81,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
81
81
|
displayName?: string;
|
|
82
82
|
columns: ReadonlyArray<import("../../../../table/schema.js").ColumnValue>;
|
|
83
83
|
groups: ReadonlyArray<import("../../../../table/schema.js").ColumnGroupValue>;
|
|
84
|
-
dataSource
|
|
84
|
+
dataSource?: Readonly<{
|
|
85
85
|
request?: string;
|
|
86
86
|
data: string;
|
|
87
87
|
total?: string;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue
CHANGED
|
@@ -26,9 +26,16 @@ function configureEmbeddedTable(env) {
|
|
|
26
26
|
registerFormVariablesIfAbsent(env);
|
|
27
27
|
}
|
|
28
28
|
const tableModel = computed({
|
|
29
|
-
get: () =>
|
|
29
|
+
get: () => {
|
|
30
|
+
const { dataSource: _omit, ...rest } = value.value.table;
|
|
31
|
+
return rest;
|
|
32
|
+
},
|
|
30
33
|
set: (next) => {
|
|
31
|
-
|
|
34
|
+
const { dataSource: _omit, ...rest } = next;
|
|
35
|
+
value.value = {
|
|
36
|
+
...value.value,
|
|
37
|
+
table: rest
|
|
38
|
+
};
|
|
32
39
|
}
|
|
33
40
|
});
|
|
34
41
|
const bindingText = computed({
|
|
@@ -43,65 +50,38 @@ const bindingText = computed({
|
|
|
43
50
|
}
|
|
44
51
|
}
|
|
45
52
|
});
|
|
46
|
-
function setDisplayName(v) {
|
|
47
|
-
const s = String(v ?? "");
|
|
48
|
-
value.value = { ...value.value, displayName: s.length > 0 ? s : void 0 };
|
|
49
|
-
}
|
|
50
53
|
</script>
|
|
51
54
|
|
|
52
55
|
<template>
|
|
53
56
|
<TableConfigEditor
|
|
54
57
|
v-model="tableModel"
|
|
55
58
|
:configure="configureEmbeddedTable"
|
|
59
|
+
hide-display-name
|
|
60
|
+
hide-data-source
|
|
56
61
|
>
|
|
57
62
|
<template #general-extra>
|
|
58
|
-
<
|
|
59
|
-
<
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class="prose prose-sm prose-zinc"
|
|
69
|
-
/>
|
|
70
|
-
</template>
|
|
71
|
-
{{ fieldTitle("displayName") }}
|
|
72
|
-
</FieldLabel>
|
|
73
|
-
<InputGroup>
|
|
74
|
-
<InputGroupInput
|
|
75
|
-
:model-value="value.displayName ?? ''"
|
|
76
|
-
placeholder="例:成员表格"
|
|
77
|
-
@update:model-value="setDisplayName"
|
|
78
|
-
/>
|
|
79
|
-
</InputGroup>
|
|
80
|
-
</Field>
|
|
81
|
-
|
|
82
|
-
<Field orientation="vertical">
|
|
83
|
-
<FieldLabel class="text-xs text-zinc-500">
|
|
84
|
-
<template
|
|
85
|
-
v-if="fieldDescription('binding')"
|
|
86
|
-
#tooltip
|
|
87
|
-
>
|
|
88
|
-
<Markdown
|
|
89
|
-
:source="fieldDescription('binding')"
|
|
90
|
-
block
|
|
91
|
-
class="prose prose-sm prose-zinc"
|
|
92
|
-
/>
|
|
93
|
-
</template>
|
|
94
|
-
{{ fieldTitle("binding") }}
|
|
95
|
-
</FieldLabel>
|
|
96
|
-
<InputGroup>
|
|
97
|
-
<InputGroupInput
|
|
98
|
-
v-model="bindingText"
|
|
99
|
-
placeholder="例:rows"
|
|
100
|
-
class="font-mono"
|
|
63
|
+
<Field orientation="vertical">
|
|
64
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
65
|
+
<template
|
|
66
|
+
v-if="fieldDescription('binding')"
|
|
67
|
+
#tooltip
|
|
68
|
+
>
|
|
69
|
+
<Markdown
|
|
70
|
+
:source="fieldDescription('binding')"
|
|
71
|
+
block
|
|
72
|
+
class="prose prose-sm prose-zinc"
|
|
101
73
|
/>
|
|
102
|
-
</
|
|
103
|
-
|
|
104
|
-
|
|
74
|
+
</template>
|
|
75
|
+
{{ fieldTitle("binding") }}
|
|
76
|
+
</FieldLabel>
|
|
77
|
+
<InputGroup>
|
|
78
|
+
<InputGroupInput
|
|
79
|
+
v-model="bindingText"
|
|
80
|
+
placeholder="例:rows"
|
|
81
|
+
class="font-mono"
|
|
82
|
+
/>
|
|
83
|
+
</InputGroup>
|
|
84
|
+
</Field>
|
|
105
85
|
|
|
106
86
|
<div class="grid grid-cols-2 gap-3">
|
|
107
87
|
<Field orientation="vertical">
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
19
19
|
displayName?: string;
|
|
20
20
|
columns: ReadonlyArray<import("../../../../table/schema.js").ColumnValue>;
|
|
21
21
|
groups: ReadonlyArray<import("../../../../table/schema.js").ColumnGroupValue>;
|
|
22
|
-
dataSource
|
|
22
|
+
dataSource?: Readonly<{
|
|
23
23
|
request?: string;
|
|
24
24
|
data: string;
|
|
25
25
|
total?: string;
|
|
@@ -81,7 +81,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
81
81
|
displayName?: string;
|
|
82
82
|
columns: ReadonlyArray<import("../../../../table/schema.js").ColumnValue>;
|
|
83
83
|
groups: ReadonlyArray<import("../../../../table/schema.js").ColumnGroupValue>;
|
|
84
|
-
dataSource
|
|
84
|
+
dataSource?: Readonly<{
|
|
85
85
|
request?: string;
|
|
86
86
|
data: string;
|
|
87
87
|
total?: string;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue
CHANGED
|
@@ -12,17 +12,28 @@ const props = defineProps({
|
|
|
12
12
|
config: { type: null, required: true }
|
|
13
13
|
});
|
|
14
14
|
const { locale } = useI18n();
|
|
15
|
-
const
|
|
15
|
+
const formState = useFormState();
|
|
16
16
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
17
17
|
const tooltipText = computed(
|
|
18
18
|
() => props.config.tooltip ? getLocalizedText(props.config.tooltip, locale.value) : void 0
|
|
19
19
|
);
|
|
20
|
-
const tableConfig = computed(() =>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
const tableConfig = computed(() => {
|
|
21
|
+
const { dataSource: _omit, ...rest } = props.config.table;
|
|
22
|
+
return rest;
|
|
23
|
+
});
|
|
24
|
+
const rowsModel = computed({
|
|
25
|
+
get: () => {
|
|
26
|
+
const binding = props.config.binding?.trim();
|
|
27
|
+
if (!binding) return [];
|
|
28
|
+
const v = formState.getAt(binding);
|
|
29
|
+
return Array.isArray(v) ? v : [];
|
|
30
|
+
},
|
|
31
|
+
set: (next) => {
|
|
32
|
+
const binding = props.config.binding?.trim();
|
|
33
|
+
if (!binding) return;
|
|
34
|
+
formState.setAtSilent(binding, next);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
26
37
|
</script>
|
|
27
38
|
|
|
28
39
|
<template>
|
|
@@ -45,8 +56,8 @@ function onRows(rows) {
|
|
|
45
56
|
</FieldLabel>
|
|
46
57
|
|
|
47
58
|
<ShwfedTable
|
|
59
|
+
v-model:rows="rowsModel"
|
|
48
60
|
:config="tableConfig"
|
|
49
|
-
@update:rows="onRows"
|
|
50
61
|
/>
|
|
51
62
|
</Field>
|
|
52
63
|
</template>
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
39
39
|
displayName?: string;
|
|
40
40
|
columns: ReadonlyArray<import("../../../../table/schema.js").ColumnValue>;
|
|
41
41
|
groups: ReadonlyArray<import("../../../../table/schema.js").ColumnGroupValue>;
|
|
42
|
-
dataSource
|
|
42
|
+
dataSource?: import("../../../../table/schema.js").DataSourceValue;
|
|
43
43
|
actions?: import("../../../../table/schema.js").TableActionsValue;
|
|
44
44
|
query?: import("../../../schema.js").FormConfigValue;
|
|
45
45
|
cellStyle?: string;
|
|
@@ -73,7 +73,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
73
73
|
displayName?: string;
|
|
74
74
|
columns: ReadonlyArray<import("../../../../table/schema.js").ColumnValue>;
|
|
75
75
|
groups: ReadonlyArray<import("../../../../table/schema.js").ColumnGroupValue>;
|
|
76
|
-
dataSource
|
|
76
|
+
dataSource?: import("../../../../table/schema.js").DataSourceValue;
|
|
77
77
|
actions?: import("../../../../table/schema.js").TableActionsValue;
|
|
78
78
|
query?: import("../../../schema.js").FormConfigValue;
|
|
79
79
|
cellStyle?: string;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.js
CHANGED
|
@@ -28,11 +28,11 @@ export function schema(configure) {
|
|
|
28
28
|
})),
|
|
29
29
|
binding: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
30
30
|
title: "\u7ED1\u5B9A\u8DEF\u5F84",
|
|
31
|
-
description: "\u8868\u683C\
|
|
31
|
+
description: "\u8868\u683C\u6570\u636E\u5728\u8868\u5355\u72B6\u6001\u4E2D\u7684 `dot-prop` \u8DEF\u5F84\uFF0C\u4F8B\u5982 `rows`\uFF1B\u8868\u683C\u4ECE `form.<binding>` \u8BFB\u53D6\u884C\u6570\u636E\uFF0C\u672C\u5730\u589E\u5220\u6539\u5B9E\u65F6\u5199\u56DE\u540C\u4E00\u8DEF\u5F84\uFF1B\u7559\u7A7A\u65F6\u8868\u683C\u65E0\u6570\u636E\uFF0C\u884C\u7F16\u8F91\u4E0D\u6301\u4E45\u5316"
|
|
32
32
|
})),
|
|
33
33
|
table: Table.annotations({
|
|
34
34
|
title: "\u8868\u683C\u914D\u7F6E",
|
|
35
|
-
description: "\u5185\u5D4C\u8868\u683C\u7684\u5B8C\u6574\u914D\u7F6E\uFF1B\u6570\u636E\
|
|
35
|
+
description: "\u5185\u5D4C\u8868\u683C\u7684\u5B8C\u6574\u914D\u7F6E\uFF1B\u6570\u636E\u6E90\u81EA\u52A8\u7ED1\u5B9A\u5230 `form.<binding>`\uFF0C\u65E0\u9700\u5355\u72EC\u914D\u7F6E"
|
|
36
36
|
})
|
|
37
37
|
}).annotations({
|
|
38
38
|
title: "TableField",
|
|
@@ -40,5 +40,6 @@ export function schema(configure) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
export function defaults() {
|
|
43
|
-
|
|
43
|
+
const { dataSource: _omit, ...rest } = defaultTableConfig();
|
|
44
|
+
return { table: rest };
|
|
44
45
|
}
|
package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "../../../../ui/dropdown-menu";
|
|
21
21
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../utils/schema-meta";
|
|
22
22
|
import { Markdown } from "../../../../ui/markdown";
|
|
23
|
+
import TriggersField from "../../../../actions/components/triggers-field.vue";
|
|
23
24
|
import { schema } from "./schema";
|
|
24
25
|
defineOptions({ name: "ShwfedTableSwitchRendererConfig" });
|
|
25
26
|
const value = defineModel({ type: Object, ...{ required: true } });
|
|
@@ -67,6 +68,11 @@ const successMessageModel = computed({
|
|
|
67
68
|
else value.value.successMessage = v;
|
|
68
69
|
}
|
|
69
70
|
});
|
|
71
|
+
const triggers = computed(() => value.value.triggers ?? []);
|
|
72
|
+
function updateTriggers(next) {
|
|
73
|
+
if (next.length === 0) delete value.value.triggers;
|
|
74
|
+
else value.value.triggers = next;
|
|
75
|
+
}
|
|
70
76
|
</script>
|
|
71
77
|
|
|
72
78
|
<template>
|
|
@@ -250,6 +256,25 @@ const successMessageModel = computed({
|
|
|
250
256
|
:extra-vars="JSON_VARS"
|
|
251
257
|
/>
|
|
252
258
|
</Field>
|
|
259
|
+
<Field orientation="vertical">
|
|
260
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
261
|
+
<template
|
|
262
|
+
v-if="fieldDescription('triggers')"
|
|
263
|
+
#tooltip
|
|
264
|
+
>
|
|
265
|
+
<Markdown
|
|
266
|
+
:source="fieldDescription('triggers')"
|
|
267
|
+
block
|
|
268
|
+
class="prose prose-sm prose-zinc"
|
|
269
|
+
/>
|
|
270
|
+
</template>
|
|
271
|
+
{{ fieldTitle("triggers") }}
|
|
272
|
+
</FieldLabel>
|
|
273
|
+
<TriggersField
|
|
274
|
+
:triggers="triggers"
|
|
275
|
+
@update:triggers="updateTriggers"
|
|
276
|
+
/>
|
|
277
|
+
</Field>
|
|
253
278
|
</div>
|
|
254
279
|
<Separator />
|
|
255
280
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue
CHANGED
|
@@ -7,8 +7,7 @@ import { cel as $cel } from "../../../../../utils/cel";
|
|
|
7
7
|
import { Switch } from "../../../../ui/switch";
|
|
8
8
|
import { JUSTIFY_CLASS } from "../../../utils/runtime";
|
|
9
9
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
10
|
-
import { useEventChannel } from "../../../../../share/event-bus";
|
|
11
|
-
import { useTableInstanceId } from "../../../utils/instance";
|
|
10
|
+
import { dispatchTriggers, useEventChannel } from "../../../../../share/event-bus";
|
|
12
11
|
defineOptions({ name: "ShwfedTableSwitchRendererRuntime" });
|
|
13
12
|
const props = defineProps({
|
|
14
13
|
column: { type: null, required: true },
|
|
@@ -16,7 +15,6 @@ const props = defineProps({
|
|
|
16
15
|
});
|
|
17
16
|
const celContext = injectCELContext();
|
|
18
17
|
const eventChannel = useEventChannel();
|
|
19
|
-
const tableInstanceId = useTableInstanceId();
|
|
20
18
|
const rawValue = computed(() => props.ctx.cell.getValue());
|
|
21
19
|
const isMissing = computed(() => rawValue.value === void 0 || rawValue.value === null);
|
|
22
20
|
const checked = computed(() => rawValue.value === true);
|
|
@@ -56,11 +54,7 @@ async function onUpdate(next) {
|
|
|
56
54
|
console.error("[shwfed-table] switch successMessage failed", e);
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
|
-
|
|
60
|
-
await Effect.runPromise(
|
|
61
|
-
eventChannel.dispatch({ target: tableInstanceId, operation: "search" })
|
|
62
|
-
);
|
|
63
|
-
}
|
|
57
|
+
await Effect.runPromise(dispatchTriggers(eventChannel, props.column.triggers));
|
|
64
58
|
} catch (e) {
|
|
65
59
|
console.error("[shwfed-table] switch onChange failed", e);
|
|
66
60
|
toast.error("\u8BF7\u6C42\u5931\u8D25");
|
package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
15
15
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
16
16
|
onChange: Schema.optional<Schema.Schema<string, string, never>>;
|
|
17
17
|
successMessage: Schema.optional<Schema.Schema<string, string, never>>;
|
|
18
|
+
triggers: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
19
|
+
target: Schema.refine<string, typeof Schema.String>;
|
|
20
|
+
operation: Schema.SchemaClass<string, string, never>;
|
|
21
|
+
}>>>;
|
|
18
22
|
title: Schema.TupleType<readonly [Schema.Struct<{
|
|
19
23
|
locale: Schema.Literal<["zh"]>;
|
|
20
24
|
message: Schema.SchemaClass<string, string, never>;
|
package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
2
|
import { Expression } from "../../../../../share/expression.js";
|
|
3
|
+
import { Triggers } from "../../../../../share/event-bus.js";
|
|
3
4
|
import { Align, CelRowAccess, columnFields, registerRowVariablesIfAbsent } from "../../../utils/shared.js";
|
|
4
5
|
export const type = "com.shwfed.table.column.switch";
|
|
5
6
|
export const compatibilityDate = "2026-05-13";
|
|
@@ -40,6 +41,10 @@ export function schema(configure) {
|
|
|
40
41
|
successMessage: Schema.optional(CelMessage.annotations({
|
|
41
42
|
title: "\u6210\u529F\u6D88\u606F",
|
|
42
43
|
description: "\u8BF7\u6C42\u6210\u529F\u540E\u5F39\u51FA\u7684 toast \u5185\u5BB9\uFF1B\u672A\u914D\u7F6E\u5219\u9759\u9ED8"
|
|
44
|
+
})),
|
|
45
|
+
triggers: Schema.optional(Triggers.annotations({
|
|
46
|
+
title: "\u6210\u529F\u540E\u89E6\u53D1",
|
|
47
|
+
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"
|
|
43
48
|
}))
|
|
44
49
|
}).annotations({ title: "SwitchRenderer", description: "\u5F00\u5173\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\uFF09" });
|
|
45
50
|
}
|