@shwfed/config 2.10.2 → 2.10.4
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 +143 -89
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-DX5M_WNF.js → FieldGroup.vue_vue_type_script_setup_true_lang-DIjsktfi.js} +1 -1
- package/dist/preview/assets/badge-Cr6_n00S.js +1 -0
- package/dist/preview/assets/config-1VGYa1Zb.js +1 -0
- package/dist/preview/assets/config-B2rtOFE1.js +1 -0
- package/dist/preview/assets/config-BemROLz0.js +1 -0
- package/dist/preview/assets/{config-DeDCNzY_.js → config-BjUIO7Ps.js} +1 -1
- package/dist/preview/assets/config-Bu-ffrDi.js +1 -0
- package/dist/preview/assets/config-CNY70agP.js +1 -0
- package/dist/preview/assets/{config-CSmHhOh2.js → config-CSauYxAG.js} +1 -1
- package/dist/preview/assets/{config-CTF5-TTQ.js → config-CrA5lAMB.js} +1 -1
- package/dist/preview/assets/{config-BiOW8fS2.js → config-CwbWyadd.js} +1 -1
- package/dist/preview/assets/{config-DBtEKoan.js → config-DF4u2WzQ.js} +1 -1
- package/dist/preview/assets/config-DTDFg08z.js +1 -0
- package/dist/preview/assets/config-DpcMlGoM.js +1 -0
- package/dist/preview/assets/config-Dx9AeOjb.js +1 -0
- package/dist/preview/assets/config-hXHOfKvD.js +1 -0
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-Cu0CEKYT.js → definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js} +1 -1
- package/dist/preview/assets/index-BDbNnENM.js +1 -0
- package/dist/preview/assets/index-ButPJaOR.css +1 -0
- package/dist/preview/assets/index-BzWZj-hV.js +1 -0
- package/dist/preview/assets/{index-DX9_iE4h.js → index-E3_P6Fhz.js} +207 -189
- package/dist/preview/assets/item-B_QcL62I.js +1 -0
- package/dist/preview/assets/runtime-BRg0jxiK.js +1 -0
- package/dist/preview/assets/runtime-BbiAwZZ9.js +1 -0
- package/dist/preview/assets/runtime-CKoLdM68.js +1 -0
- package/dist/preview/assets/{runtime-CFb1tHwr.js → runtime-CZ6uHCIE.js} +1 -1
- package/dist/preview/assets/runtime-Cd79TXff.js +1 -0
- package/dist/preview/assets/{runtime-BN-jMAt7.js → runtime-Cfup01hl.js} +1 -1
- package/dist/preview/assets/runtime-Cu_C4Joj.js +1 -0
- package/dist/preview/assets/{runtime-yfWYeUh4.js → runtime-D-MaRCSg.js} +1 -1
- package/dist/preview/assets/runtime-DUMSbsqb.js +1 -0
- package/dist/preview/assets/runtime-hClBh8tp.js +1 -0
- package/dist/preview/assets/{schema-meta-6ZPO8dHv.js → schema-meta-BACRMkVo.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +16 -10
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +68 -43
- package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.js +5 -1
- package/dist/runtime/components/block-layout-editor/index.vue +8 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +4 -4
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +4 -4
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +2 -2
- package/dist/runtime/components/config/index.vue +5 -1
- package/dist/runtime/components/config/schema.d.ts +10 -0
- package/dist/runtime/components/config/schema.js +23 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +134 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +78 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +134 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +132 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +14 -1
- 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-27/com.shwfed.form.field.daterange/config.d.vue.ts +4 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +4 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +140 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +77 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +140 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +132 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +14 -1
- 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-04-28/com.shwfed.form.field.switch/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +22 -22
- 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 +8 -8
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +4 -4
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +4 -4
- 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 +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/schema.d.ts +2 -2
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/config.d.vue.ts +31 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/config.vue +103 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/config.vue.d.ts +31 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/runtime.d.ts +2 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/runtime.js +63 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.d.ts +21 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.js +63 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/config.d.vue.ts +17 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/config.vue +85 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/config.vue.d.ts +17 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/runtime.d.ts +2 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/runtime.js +36 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/schema.d.ts +14 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/schema.js +38 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/schema.d.ts +3 -3
- package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
- package/package.json +1 -1
- package/dist/preview/assets/badge-DFZBH8N6.js +0 -1
- package/dist/preview/assets/config-BH2BmDoD.js +0 -1
- package/dist/preview/assets/config-Bg7a8Rid.js +0 -1
- package/dist/preview/assets/config-Bnp547Nm.js +0 -1
- package/dist/preview/assets/config-CqeWJt_H.js +0 -1
- package/dist/preview/assets/config-Dj3w2JkF.js +0 -1
- package/dist/preview/assets/config-XGJ9V32V.js +0 -1
- package/dist/preview/assets/config-uIHUHvNR.js +0 -1
- package/dist/preview/assets/index-CGChrBji.js +0 -1
- package/dist/preview/assets/index-CQA6q2ay.js +0 -1
- package/dist/preview/assets/index-pkoEF5dC.css +0 -1
- package/dist/preview/assets/item-C4VJfiq8.js +0 -1
- package/dist/preview/assets/runtime-6Zrje7Y1.js +0 -1
- package/dist/preview/assets/runtime-BQMnWueG.js +0 -1
- package/dist/preview/assets/runtime-CBz5XstF.js +0 -1
- package/dist/preview/assets/runtime-DQL6lCFp.js +0 -1
- package/dist/preview/assets/runtime-DcdmMgqL.js +0 -1
- package/dist/preview/assets/runtime-okYOTQd6.js +0 -1
- package/dist/preview/assets/runtime-qPyuMgsh.js +0 -1
|
@@ -54,7 +54,6 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
54
54
|
readonly displayName?: string | undefined;
|
|
55
55
|
readonly kind: "shwfed.component.form";
|
|
56
56
|
readonly fields: readonly any[];
|
|
57
|
-
readonly readonly?: string | undefined;
|
|
58
57
|
readonly layouts: readonly {
|
|
59
58
|
readonly name: string;
|
|
60
59
|
readonly layout: {
|
|
@@ -72,6 +71,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
72
71
|
};
|
|
73
72
|
readonly media?: string | undefined;
|
|
74
73
|
}[];
|
|
74
|
+
readonly readonly?: string | undefined;
|
|
75
75
|
} | undefined;
|
|
76
76
|
readonly dataSource?: {
|
|
77
77
|
readonly data: string;
|
|
@@ -557,7 +557,6 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
557
557
|
readonly displayName?: string | undefined;
|
|
558
558
|
readonly kind: "shwfed.component.form";
|
|
559
559
|
readonly fields: readonly any[];
|
|
560
|
-
readonly readonly?: string | undefined;
|
|
561
560
|
readonly layouts: readonly {
|
|
562
561
|
readonly name: string;
|
|
563
562
|
readonly layout: {
|
|
@@ -575,6 +574,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
575
574
|
};
|
|
576
575
|
readonly media?: string | undefined;
|
|
577
576
|
}[];
|
|
577
|
+
readonly readonly?: string | undefined;
|
|
578
578
|
}, Schema.Struct<{
|
|
579
579
|
fields: Schema.Array$<Schema.Schema<any, any, never>>;
|
|
580
580
|
layouts: Schema.refine<readonly {
|
|
@@ -15,7 +15,9 @@ import EditorFooter from "./footer.vue";
|
|
|
15
15
|
import { provideEventTarget } from "../../share/event-bus";
|
|
16
16
|
import { operationHandlers } from "../operations/utils/resolve";
|
|
17
17
|
import * as alertOperation from "../operations/2026-06-09/com.shwfed.operation.alert/schema";
|
|
18
|
+
import * as httpDownloadOperation from "../operations/2026-06-15/com.shwfed.operation.http.download/schema";
|
|
18
19
|
import * as httpRequestOperation from "../operations/2026-06-11/com.shwfed.operation.http.request.json/schema";
|
|
20
|
+
import * as navigationOperation from "../operations/2026-06-15/com.shwfed.operation.navigation/schema";
|
|
19
21
|
import { PAGE_TARGET_ID, createPageConfig } from "./schema";
|
|
20
22
|
import { useConfigEditor } from "./use-editor";
|
|
21
23
|
import { findBlock } from "./utils/resolve";
|
|
@@ -55,7 +57,9 @@ provideEventTarget(PAGE_TARGET_ID, {
|
|
|
55
57
|
...operationHandlers(
|
|
56
58
|
[
|
|
57
59
|
{ type: alertOperation.type, compatibilityDate: alertOperation.compatibilityDate },
|
|
58
|
-
{ type: httpRequestOperation.type, compatibilityDate: httpRequestOperation.compatibilityDate }
|
|
60
|
+
{ type: httpRequestOperation.type, compatibilityDate: httpRequestOperation.compatibilityDate },
|
|
61
|
+
{ type: navigationOperation.type, compatibilityDate: navigationOperation.compatibilityDate },
|
|
62
|
+
{ type: httpDownloadOperation.type, compatibilityDate: httpDownloadOperation.compatibilityDate }
|
|
59
63
|
],
|
|
60
64
|
{ cel: $cel, locale: () => locale.value }
|
|
61
65
|
)
|
|
@@ -27,6 +27,16 @@ export declare const metadata: {
|
|
|
27
27
|
readonly compatibilityDate: "2026-06-11";
|
|
28
28
|
readonly name: "发送请求";
|
|
29
29
|
readonly icon: "fluent:cloud-arrow-up-20-regular";
|
|
30
|
+
}, {
|
|
31
|
+
readonly id: "com.shwfed.operation.navigation";
|
|
32
|
+
readonly compatibilityDate: "2026-06-15";
|
|
33
|
+
readonly name: "导航";
|
|
34
|
+
readonly icon: "fluent:link-20-regular";
|
|
35
|
+
}, {
|
|
36
|
+
readonly id: "com.shwfed.operation.http.download";
|
|
37
|
+
readonly compatibilityDate: "2026-06-15";
|
|
38
|
+
readonly name: "下载文件";
|
|
39
|
+
readonly icon: "fluent:arrow-download-20-regular";
|
|
30
40
|
}];
|
|
31
41
|
};
|
|
32
42
|
export declare function PageConfig(configure: (env: Environment) => void): Schema.Struct<{
|
|
@@ -2,7 +2,9 @@ import { Schema } from "effect";
|
|
|
2
2
|
import { Expression, Slot, defaultSlot } from "../../share/layout.js";
|
|
3
3
|
import { Locale } from "../../share/locale.js";
|
|
4
4
|
import * as alertOperation from "../operations/2026-06-09/com.shwfed.operation.alert/schema.js";
|
|
5
|
+
import * as httpDownloadOperation from "../operations/2026-06-15/com.shwfed.operation.http.download/schema.js";
|
|
5
6
|
import * as httpRequestOperation from "../operations/2026-06-11/com.shwfed.operation.http.request.json/schema.js";
|
|
7
|
+
import * as navigationOperation from "../operations/2026-06-15/com.shwfed.operation.navigation/schema.js";
|
|
6
8
|
import { blockRef } from "./utils/resolve.js";
|
|
7
9
|
export { getStructFieldDescription, getStructFieldTitle } from "../table/utils/schema-meta.js";
|
|
8
10
|
const KIND = "shwfed.component.page";
|
|
@@ -29,6 +31,27 @@ export const metadata = {
|
|
|
29
31
|
compatibilityDate: httpRequestOperation.compatibilityDate,
|
|
30
32
|
name: httpRequestOperation.metadata.name,
|
|
31
33
|
icon: httpRequestOperation.metadata.icon
|
|
34
|
+
},
|
|
35
|
+
// Navigation as an op (replaces the standalone navigation *button*): its URL
|
|
36
|
+
// expression can reference `steps["<id>"]`, so a chain can navigate using an
|
|
37
|
+
// earlier request's response. The page hosts it for the same reason as the
|
|
38
|
+
// request op — navigation acts on nothing instance-specific.
|
|
39
|
+
{
|
|
40
|
+
id: navigationOperation.type,
|
|
41
|
+
compatibilityDate: navigationOperation.compatibilityDate,
|
|
42
|
+
name: navigationOperation.metadata.name,
|
|
43
|
+
icon: navigationOperation.metadata.icon
|
|
44
|
+
},
|
|
45
|
+
// Download as an op (replaces the standalone download *button*): its request
|
|
46
|
+
// expression can reference `steps["<id>"]`, so the old two-step「先取凭据再下载」
|
|
47
|
+
// becomes a 发送请求 row followed by this download row. The page hosts it for
|
|
48
|
+
// the same reason as the request op — the download acts on nothing
|
|
49
|
+
// instance-specific.
|
|
50
|
+
{
|
|
51
|
+
id: httpDownloadOperation.type,
|
|
52
|
+
compatibilityDate: httpDownloadOperation.compatibilityDate,
|
|
53
|
+
name: httpDownloadOperation.metadata.name,
|
|
54
|
+
icon: httpDownloadOperation.metadata.icon
|
|
32
55
|
}
|
|
33
56
|
]
|
|
34
57
|
};
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts
CHANGED
|
@@ -50,6 +50,73 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
50
50
|
readonly warning?: boolean | undefined;
|
|
51
51
|
readonly when: string;
|
|
52
52
|
}[] | undefined;
|
|
53
|
+
readonly addon?: {
|
|
54
|
+
readonly size: "default" | "sm" | "xs";
|
|
55
|
+
readonly style?: string | undefined;
|
|
56
|
+
readonly gap: number;
|
|
57
|
+
readonly items: readonly (import("../../../../actions/schema.js").RegistryItemValue | {
|
|
58
|
+
readonly disabled?: string | undefined;
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly title: readonly [{
|
|
61
|
+
readonly locale: "zh";
|
|
62
|
+
readonly message: string;
|
|
63
|
+
}, ...{
|
|
64
|
+
readonly locale: "en" | "ja" | "ko";
|
|
65
|
+
readonly message: string;
|
|
66
|
+
}[]];
|
|
67
|
+
readonly icon?: string | undefined;
|
|
68
|
+
readonly hidden?: string | undefined;
|
|
69
|
+
readonly tooltip?: readonly [{
|
|
70
|
+
readonly locale: "zh";
|
|
71
|
+
readonly message: string;
|
|
72
|
+
}, ...{
|
|
73
|
+
readonly locale: "en" | "ja" | "ko";
|
|
74
|
+
readonly message: string;
|
|
75
|
+
}[]] | undefined;
|
|
76
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
77
|
+
readonly action?: any;
|
|
78
|
+
readonly groupId: string;
|
|
79
|
+
readonly hideTitle?: boolean | undefined;
|
|
80
|
+
} | {
|
|
81
|
+
readonly id: string;
|
|
82
|
+
readonly title: readonly [{
|
|
83
|
+
readonly locale: "zh";
|
|
84
|
+
readonly message: string;
|
|
85
|
+
}, ...{
|
|
86
|
+
readonly locale: "en" | "ja" | "ko";
|
|
87
|
+
readonly message: string;
|
|
88
|
+
}[]];
|
|
89
|
+
readonly icon?: string | undefined;
|
|
90
|
+
readonly items: readonly (import("../../../../actions/schema.js").RegistrySubItemValue | {
|
|
91
|
+
readonly disabled?: string | undefined;
|
|
92
|
+
readonly id: string;
|
|
93
|
+
readonly title: readonly [{
|
|
94
|
+
readonly locale: "zh";
|
|
95
|
+
readonly message: string;
|
|
96
|
+
}, ...{
|
|
97
|
+
readonly locale: "en" | "ja" | "ko";
|
|
98
|
+
readonly message: string;
|
|
99
|
+
}[]];
|
|
100
|
+
readonly icon?: string | undefined;
|
|
101
|
+
readonly hidden?: string | undefined;
|
|
102
|
+
readonly tooltip?: readonly [{
|
|
103
|
+
readonly locale: "zh";
|
|
104
|
+
readonly message: string;
|
|
105
|
+
}, ...{
|
|
106
|
+
readonly locale: "en" | "ja" | "ko";
|
|
107
|
+
readonly message: string;
|
|
108
|
+
}[]] | undefined;
|
|
109
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
110
|
+
readonly action?: any;
|
|
111
|
+
})[];
|
|
112
|
+
readonly groupId: string;
|
|
113
|
+
readonly hideTitle?: boolean | undefined;
|
|
114
|
+
})[];
|
|
115
|
+
readonly groups: readonly {
|
|
116
|
+
readonly id: string;
|
|
117
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
118
|
+
}[];
|
|
119
|
+
} | undefined;
|
|
53
120
|
}) => any;
|
|
54
121
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
55
122
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -99,6 +166,73 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
99
166
|
readonly warning?: boolean | undefined;
|
|
100
167
|
readonly when: string;
|
|
101
168
|
}[] | undefined;
|
|
169
|
+
readonly addon?: {
|
|
170
|
+
readonly size: "default" | "sm" | "xs";
|
|
171
|
+
readonly style?: string | undefined;
|
|
172
|
+
readonly gap: number;
|
|
173
|
+
readonly items: readonly (import("../../../../actions/schema.js").RegistryItemValue | {
|
|
174
|
+
readonly disabled?: string | undefined;
|
|
175
|
+
readonly id: string;
|
|
176
|
+
readonly title: readonly [{
|
|
177
|
+
readonly locale: "zh";
|
|
178
|
+
readonly message: string;
|
|
179
|
+
}, ...{
|
|
180
|
+
readonly locale: "en" | "ja" | "ko";
|
|
181
|
+
readonly message: string;
|
|
182
|
+
}[]];
|
|
183
|
+
readonly icon?: string | undefined;
|
|
184
|
+
readonly hidden?: string | undefined;
|
|
185
|
+
readonly tooltip?: readonly [{
|
|
186
|
+
readonly locale: "zh";
|
|
187
|
+
readonly message: string;
|
|
188
|
+
}, ...{
|
|
189
|
+
readonly locale: "en" | "ja" | "ko";
|
|
190
|
+
readonly message: string;
|
|
191
|
+
}[]] | undefined;
|
|
192
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
193
|
+
readonly action?: any;
|
|
194
|
+
readonly groupId: string;
|
|
195
|
+
readonly hideTitle?: boolean | undefined;
|
|
196
|
+
} | {
|
|
197
|
+
readonly id: string;
|
|
198
|
+
readonly title: readonly [{
|
|
199
|
+
readonly locale: "zh";
|
|
200
|
+
readonly message: string;
|
|
201
|
+
}, ...{
|
|
202
|
+
readonly locale: "en" | "ja" | "ko";
|
|
203
|
+
readonly message: string;
|
|
204
|
+
}[]];
|
|
205
|
+
readonly icon?: string | undefined;
|
|
206
|
+
readonly items: readonly (import("../../../../actions/schema.js").RegistrySubItemValue | {
|
|
207
|
+
readonly disabled?: string | undefined;
|
|
208
|
+
readonly id: string;
|
|
209
|
+
readonly title: readonly [{
|
|
210
|
+
readonly locale: "zh";
|
|
211
|
+
readonly message: string;
|
|
212
|
+
}, ...{
|
|
213
|
+
readonly locale: "en" | "ja" | "ko";
|
|
214
|
+
readonly message: string;
|
|
215
|
+
}[]];
|
|
216
|
+
readonly icon?: string | undefined;
|
|
217
|
+
readonly hidden?: string | undefined;
|
|
218
|
+
readonly tooltip?: readonly [{
|
|
219
|
+
readonly locale: "zh";
|
|
220
|
+
readonly message: string;
|
|
221
|
+
}, ...{
|
|
222
|
+
readonly locale: "en" | "ja" | "ko";
|
|
223
|
+
readonly message: string;
|
|
224
|
+
}[]] | undefined;
|
|
225
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
226
|
+
readonly action?: any;
|
|
227
|
+
})[];
|
|
228
|
+
readonly groupId: string;
|
|
229
|
+
readonly hideTitle?: boolean | undefined;
|
|
230
|
+
})[];
|
|
231
|
+
readonly groups: readonly {
|
|
232
|
+
readonly id: string;
|
|
233
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
234
|
+
}[];
|
|
235
|
+
} | undefined;
|
|
102
236
|
}) => any) | undefined;
|
|
103
237
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
104
238
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed } from "vue";
|
|
2
|
+
import { computed, inject, onBeforeUnmount, ref, watch } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
3
4
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
5
|
+
import { Button } from "../../../../ui/button";
|
|
4
6
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
7
|
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
6
8
|
import ValidationRulesField from "../../../ValidationRulesField.vue";
|
|
7
9
|
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
8
10
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
9
11
|
import { Markdown } from "../../../../ui/markdown";
|
|
12
|
+
import ActionsConfigEditor from "../../../../actions/config.vue";
|
|
10
13
|
import {
|
|
11
14
|
Select,
|
|
12
15
|
SelectContent,
|
|
@@ -15,6 +18,8 @@ import {
|
|
|
15
18
|
SelectValue
|
|
16
19
|
} from "../../../../ui/select";
|
|
17
20
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
|
|
21
|
+
import { FORM_FIELD_LAYOUT_KEY } from "../../../field-layout";
|
|
22
|
+
import { BREADCRUMB_EXTENSION_KEY } from "../../../../config/breadcrumb-extension";
|
|
18
23
|
import { DEFAULT_FIELD_ORIENTATION, FIELD_ORIENTATION_OPTIONS } from "../../../utils/common";
|
|
19
24
|
import { schema } from "./schema";
|
|
20
25
|
defineOptions({ name: "ShwfedTextFieldConfig" });
|
|
@@ -23,6 +28,47 @@ const fieldSchema = schema(() => {
|
|
|
23
28
|
});
|
|
24
29
|
const fieldTitle = (f) => getStructFieldTitle(fieldSchema, f) ?? f;
|
|
25
30
|
const fieldDescription = (f) => getStructFieldDescription(fieldSchema, f);
|
|
31
|
+
const layout = inject(FORM_FIELD_LAYOUT_KEY, null);
|
|
32
|
+
const breadcrumbExt = inject(BREADCRUMB_EXTENSION_KEY, null);
|
|
33
|
+
const editingAddon = ref(false);
|
|
34
|
+
function closeAddon() {
|
|
35
|
+
editingAddon.value = false;
|
|
36
|
+
}
|
|
37
|
+
const addonCrumb = breadcrumbExt?.add();
|
|
38
|
+
watch(editingAddon, (on) => {
|
|
39
|
+
if (layout) layout.fullPane.value = on;
|
|
40
|
+
if (addonCrumb) {
|
|
41
|
+
addonCrumb.label.value = on ? "\u8F93\u5165\u6846\u5185\u6309\u94AE" : null;
|
|
42
|
+
addonCrumb.back.value = on ? closeAddon : null;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
onBeforeUnmount(() => {
|
|
46
|
+
if (layout) layout.fullPane.value = false;
|
|
47
|
+
addonCrumb?.dispose();
|
|
48
|
+
});
|
|
49
|
+
const addonItemCount = computed(() => value.value.addon?.items.length ?? 0);
|
|
50
|
+
const addonValue = computed({
|
|
51
|
+
get: () => ({
|
|
52
|
+
kind: "shwfed.component.action",
|
|
53
|
+
size: value.value.addon?.size ?? "xs",
|
|
54
|
+
gap: value.value.addon?.gap ?? 4,
|
|
55
|
+
style: value.value.addon?.style,
|
|
56
|
+
groups: value.value.addon?.groups ?? [],
|
|
57
|
+
items: value.value.addon?.items ?? []
|
|
58
|
+
}),
|
|
59
|
+
set: (next) => {
|
|
60
|
+
const { size, gap, style, groups, items } = next;
|
|
61
|
+
if (groups.length === 0 && items.length === 0) {
|
|
62
|
+
const { addon: _omit, ...rest } = value.value;
|
|
63
|
+
value.value = rest;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
value.value = {
|
|
67
|
+
...value.value,
|
|
68
|
+
addon: { size, gap, groups, items, ...style === void 0 ? {} : { style } }
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
26
72
|
const pathText = computed({
|
|
27
73
|
get: () => value.value.binding ?? "",
|
|
28
74
|
set: (next) => {
|
|
@@ -38,7 +84,16 @@ const pathText = computed({
|
|
|
38
84
|
</script>
|
|
39
85
|
|
|
40
86
|
<template>
|
|
41
|
-
<
|
|
87
|
+
<ActionsConfigEditor
|
|
88
|
+
v-if="editingAddon"
|
|
89
|
+
v-model="addonValue"
|
|
90
|
+
hide-size
|
|
91
|
+
/>
|
|
92
|
+
|
|
93
|
+
<div
|
|
94
|
+
v-else
|
|
95
|
+
class="flex flex-col gap-3"
|
|
96
|
+
>
|
|
42
97
|
<div class="grid grid-cols-2 gap-3">
|
|
43
98
|
<Field orientation="vertical">
|
|
44
99
|
<FieldLabel class="text-xs text-zinc-500">
|
|
@@ -302,5 +357,26 @@ const pathText = computed({
|
|
|
302
357
|
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
303
358
|
/>
|
|
304
359
|
</Field>
|
|
360
|
+
|
|
361
|
+
<Field orientation="vertical">
|
|
362
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
363
|
+
<template #tooltip>
|
|
364
|
+
<Markdown
|
|
365
|
+
:source="fieldDescription('addon')"
|
|
366
|
+
block
|
|
367
|
+
class="prose prose-sm prose-zinc"
|
|
368
|
+
/>
|
|
369
|
+
</template>
|
|
370
|
+
{{ fieldTitle("addon") }}
|
|
371
|
+
</FieldLabel>
|
|
372
|
+
<Button
|
|
373
|
+
type="button"
|
|
374
|
+
class="w-full justify-center"
|
|
375
|
+
@click="editingAddon = true"
|
|
376
|
+
>
|
|
377
|
+
<Icon icon="fluent:add-20-regular" />
|
|
378
|
+
<span>{{ addonItemCount > 0 ? "\u914D\u7F6E\u6309\u94AE" : "\u6DFB\u52A0\u6309\u94AE" }}</span>
|
|
379
|
+
</Button>
|
|
380
|
+
</Field>
|
|
305
381
|
</div>
|
|
306
382
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts
CHANGED
|
@@ -50,6 +50,73 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
50
50
|
readonly warning?: boolean | undefined;
|
|
51
51
|
readonly when: string;
|
|
52
52
|
}[] | undefined;
|
|
53
|
+
readonly addon?: {
|
|
54
|
+
readonly size: "default" | "sm" | "xs";
|
|
55
|
+
readonly style?: string | undefined;
|
|
56
|
+
readonly gap: number;
|
|
57
|
+
readonly items: readonly (import("../../../../actions/schema.js").RegistryItemValue | {
|
|
58
|
+
readonly disabled?: string | undefined;
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly title: readonly [{
|
|
61
|
+
readonly locale: "zh";
|
|
62
|
+
readonly message: string;
|
|
63
|
+
}, ...{
|
|
64
|
+
readonly locale: "en" | "ja" | "ko";
|
|
65
|
+
readonly message: string;
|
|
66
|
+
}[]];
|
|
67
|
+
readonly icon?: string | undefined;
|
|
68
|
+
readonly hidden?: string | undefined;
|
|
69
|
+
readonly tooltip?: readonly [{
|
|
70
|
+
readonly locale: "zh";
|
|
71
|
+
readonly message: string;
|
|
72
|
+
}, ...{
|
|
73
|
+
readonly locale: "en" | "ja" | "ko";
|
|
74
|
+
readonly message: string;
|
|
75
|
+
}[]] | undefined;
|
|
76
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
77
|
+
readonly action?: any;
|
|
78
|
+
readonly groupId: string;
|
|
79
|
+
readonly hideTitle?: boolean | undefined;
|
|
80
|
+
} | {
|
|
81
|
+
readonly id: string;
|
|
82
|
+
readonly title: readonly [{
|
|
83
|
+
readonly locale: "zh";
|
|
84
|
+
readonly message: string;
|
|
85
|
+
}, ...{
|
|
86
|
+
readonly locale: "en" | "ja" | "ko";
|
|
87
|
+
readonly message: string;
|
|
88
|
+
}[]];
|
|
89
|
+
readonly icon?: string | undefined;
|
|
90
|
+
readonly items: readonly (import("../../../../actions/schema.js").RegistrySubItemValue | {
|
|
91
|
+
readonly disabled?: string | undefined;
|
|
92
|
+
readonly id: string;
|
|
93
|
+
readonly title: readonly [{
|
|
94
|
+
readonly locale: "zh";
|
|
95
|
+
readonly message: string;
|
|
96
|
+
}, ...{
|
|
97
|
+
readonly locale: "en" | "ja" | "ko";
|
|
98
|
+
readonly message: string;
|
|
99
|
+
}[]];
|
|
100
|
+
readonly icon?: string | undefined;
|
|
101
|
+
readonly hidden?: string | undefined;
|
|
102
|
+
readonly tooltip?: readonly [{
|
|
103
|
+
readonly locale: "zh";
|
|
104
|
+
readonly message: string;
|
|
105
|
+
}, ...{
|
|
106
|
+
readonly locale: "en" | "ja" | "ko";
|
|
107
|
+
readonly message: string;
|
|
108
|
+
}[]] | undefined;
|
|
109
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
110
|
+
readonly action?: any;
|
|
111
|
+
})[];
|
|
112
|
+
readonly groupId: string;
|
|
113
|
+
readonly hideTitle?: boolean | undefined;
|
|
114
|
+
})[];
|
|
115
|
+
readonly groups: readonly {
|
|
116
|
+
readonly id: string;
|
|
117
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
118
|
+
}[];
|
|
119
|
+
} | undefined;
|
|
53
120
|
}) => any;
|
|
54
121
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
55
122
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -99,6 +166,73 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
99
166
|
readonly warning?: boolean | undefined;
|
|
100
167
|
readonly when: string;
|
|
101
168
|
}[] | undefined;
|
|
169
|
+
readonly addon?: {
|
|
170
|
+
readonly size: "default" | "sm" | "xs";
|
|
171
|
+
readonly style?: string | undefined;
|
|
172
|
+
readonly gap: number;
|
|
173
|
+
readonly items: readonly (import("../../../../actions/schema.js").RegistryItemValue | {
|
|
174
|
+
readonly disabled?: string | undefined;
|
|
175
|
+
readonly id: string;
|
|
176
|
+
readonly title: readonly [{
|
|
177
|
+
readonly locale: "zh";
|
|
178
|
+
readonly message: string;
|
|
179
|
+
}, ...{
|
|
180
|
+
readonly locale: "en" | "ja" | "ko";
|
|
181
|
+
readonly message: string;
|
|
182
|
+
}[]];
|
|
183
|
+
readonly icon?: string | undefined;
|
|
184
|
+
readonly hidden?: string | undefined;
|
|
185
|
+
readonly tooltip?: readonly [{
|
|
186
|
+
readonly locale: "zh";
|
|
187
|
+
readonly message: string;
|
|
188
|
+
}, ...{
|
|
189
|
+
readonly locale: "en" | "ja" | "ko";
|
|
190
|
+
readonly message: string;
|
|
191
|
+
}[]] | undefined;
|
|
192
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
193
|
+
readonly action?: any;
|
|
194
|
+
readonly groupId: string;
|
|
195
|
+
readonly hideTitle?: boolean | undefined;
|
|
196
|
+
} | {
|
|
197
|
+
readonly id: string;
|
|
198
|
+
readonly title: readonly [{
|
|
199
|
+
readonly locale: "zh";
|
|
200
|
+
readonly message: string;
|
|
201
|
+
}, ...{
|
|
202
|
+
readonly locale: "en" | "ja" | "ko";
|
|
203
|
+
readonly message: string;
|
|
204
|
+
}[]];
|
|
205
|
+
readonly icon?: string | undefined;
|
|
206
|
+
readonly items: readonly (import("../../../../actions/schema.js").RegistrySubItemValue | {
|
|
207
|
+
readonly disabled?: string | undefined;
|
|
208
|
+
readonly id: string;
|
|
209
|
+
readonly title: readonly [{
|
|
210
|
+
readonly locale: "zh";
|
|
211
|
+
readonly message: string;
|
|
212
|
+
}, ...{
|
|
213
|
+
readonly locale: "en" | "ja" | "ko";
|
|
214
|
+
readonly message: string;
|
|
215
|
+
}[]];
|
|
216
|
+
readonly icon?: string | undefined;
|
|
217
|
+
readonly hidden?: string | undefined;
|
|
218
|
+
readonly tooltip?: readonly [{
|
|
219
|
+
readonly locale: "zh";
|
|
220
|
+
readonly message: string;
|
|
221
|
+
}, ...{
|
|
222
|
+
readonly locale: "en" | "ja" | "ko";
|
|
223
|
+
readonly message: string;
|
|
224
|
+
}[]] | undefined;
|
|
225
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
226
|
+
readonly action?: any;
|
|
227
|
+
})[];
|
|
228
|
+
readonly groupId: string;
|
|
229
|
+
readonly hideTitle?: boolean | undefined;
|
|
230
|
+
})[];
|
|
231
|
+
readonly groups: readonly {
|
|
232
|
+
readonly id: string;
|
|
233
|
+
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
234
|
+
}[];
|
|
235
|
+
} | undefined;
|
|
102
236
|
}) => any) | undefined;
|
|
103
237
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
104
238
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue
CHANGED
|
@@ -9,6 +9,7 @@ import { getLocalizedText } from "../../../../../share/locale";
|
|
|
9
9
|
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
10
10
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
|
|
11
11
|
import { Markdown } from "../../../../ui/markdown";
|
|
12
|
+
import ShwfedActions from "../../../../actions/components/group.vue";
|
|
12
13
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
13
14
|
import { useFieldValue } from "../../../utils/field-value";
|
|
14
15
|
import { useFieldValidation } from "../../../utils/validation";
|
|
@@ -56,6 +57,18 @@ const { isRequired, errors, warnings, visible } = useFieldValidation({
|
|
|
56
57
|
$cel,
|
|
57
58
|
locale: () => locale.value
|
|
58
59
|
});
|
|
60
|
+
const addonConfig = computed(() => {
|
|
61
|
+
const addon = props.config.addon;
|
|
62
|
+
if (!addon || addon.items.length === 0) return null;
|
|
63
|
+
return {
|
|
64
|
+
kind: "shwfed.component.action",
|
|
65
|
+
size: addon.size ?? "xs",
|
|
66
|
+
gap: addon.gap,
|
|
67
|
+
style: addon.style,
|
|
68
|
+
groups: addon.groups.map((group) => ({ ...group, variant: group.variant ?? "ghost" })),
|
|
69
|
+
items: addon.items
|
|
70
|
+
};
|
|
71
|
+
});
|
|
59
72
|
const showClear = computed(() => !isDisabled.value && draft.value.length > 0);
|
|
60
73
|
function handleClear() {
|
|
61
74
|
draft.value = "";
|
|
@@ -123,6 +136,13 @@ function handleClear() {
|
|
|
123
136
|
<Icon icon="fluent:dismiss-20-regular" />
|
|
124
137
|
</InputGroupButton>
|
|
125
138
|
</InputGroupAddon>
|
|
139
|
+
<InputGroupAddon
|
|
140
|
+
v-if="addonConfig"
|
|
141
|
+
align="inline-end"
|
|
142
|
+
class="field-addon-actions"
|
|
143
|
+
>
|
|
144
|
+
<ShwfedActions :config="addonConfig" />
|
|
145
|
+
</InputGroupAddon>
|
|
126
146
|
</InputGroup>
|
|
127
147
|
<FieldMessages
|
|
128
148
|
v-if="visible"
|
|
@@ -131,3 +151,7 @@ function handleClear() {
|
|
|
131
151
|
/>
|
|
132
152
|
</Field>
|
|
133
153
|
</template>
|
|
154
|
+
|
|
155
|
+
<style scoped>
|
|
156
|
+
.field-addon-actions :deep([data-slot=buttons]){align-items:center;gap:.125rem}.field-addon-actions :deep([data-slot=buttons-dropdown-trigger]),.field-addon-actions :deep([data-slot=buttons-item]){border-radius:.125rem;color:#71717a;height:1.5rem;min-width:1.5rem;padding:0}.field-addon-actions :deep([data-slot=buttons-dropdown-trigger]:hover:not(:disabled)),.field-addon-actions :deep([data-slot=buttons-item]:hover:not(:disabled)){color:#3f3f46}
|
|
157
|
+
</style>
|