@shwfed/config 2.3.22 → 2.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.mjs +1073 -624
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-B3mv60t8.js → config-5rB9Rnmf.js} +1 -1
- package/dist/preview/assets/{config-DY7n8WvE.js → config-BLxl7ROb.js} +1 -1
- package/dist/preview/assets/{config-CpvkgqGg.js → config-BWMtPN22.js} +1 -1
- package/dist/preview/assets/{config-DX6QxjI7.js → config-C-EOrL-v.js} +1 -1
- package/dist/preview/assets/{config-Cb9lQXQG.js → config-CJADmi-_.js} +1 -1
- package/dist/preview/assets/{config-D4fS9GYw.js → config-DUNvg-mJ.js} +1 -1
- package/dist/preview/assets/{config-CLjwrQXG.js → config-EtlOM9yx.js} +1 -1
- package/dist/preview/assets/{config-BiFAbTJq.js → config-f66PEpZ5.js} +1 -1
- package/dist/preview/assets/{config-DhwLB2Ee.js → config-pVNUrcvS.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-Hx2iV358.js → definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js} +1 -1
- package/dist/preview/assets/index-B4xolIUJ.js +643 -0
- package/dist/preview/assets/{index-CDhwf1Dw.css → index-CJMxrUKZ.css} +1 -1
- package/dist/preview/assets/index-DFYLO8qf.js +1 -0
- package/dist/preview/assets/{runtime-CShAGyQk.js → runtime-B9GkQToM.js} +1 -1
- package/dist/preview/assets/{runtime-DIcMvC6H.js → runtime-C0v-S40R.js} +1 -1
- package/dist/preview/assets/{runtime-usxovPqT.js → runtime-CFPeFbAB.js} +1 -1
- package/dist/preview/assets/{runtime-ECoXJ0-J.js → runtime-CI38ypkY.js} +1 -1
- package/dist/preview/assets/{runtime-HQv4w652.js → runtime-CUBGWRtC.js} +1 -1
- package/dist/preview/assets/{runtime-Dl0d8KFj.js → runtime-DcqfhaaX.js} +1 -1
- package/dist/preview/assets/{runtime-BXZROm-z.js → runtime-DoLJtHV2.js} +1 -1
- package/dist/preview/assets/{runtime-BarNw942.js → runtime-P99-0gRD.js} +1 -1
- package/dist/preview/assets/{runtime-BazV3vOW.js → runtime-qQ5mJdRv.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +99 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue +329 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +99 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.vue +265 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +79 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.js +71 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +133 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue +533 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +133 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue +247 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +124 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.js +94 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +109 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue +426 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +109 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.vue +356 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +85 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.js +147 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +137 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue +586 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +137 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.vue +287 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +126 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.js +125 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-B2gp2q3H.js +0 -643
- package/dist/preview/assets/index-Jytc_ICm.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aL as e}from"./index-B4xolIUJ.js";import{aM as r,aN as s,aO as t}from"./index-B4xolIUJ.js";export{r as TableConfig,s as createTableConfig,e as default,t as getColumnTechnicalKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,ao as f,aj as u,e as p,u as g,ak as m,al as l,am as d,an as x,o as E}from"./index-
|
|
1
|
+
import{d as r,ao as f,aj as u,e as p,u as g,ak as m,al as l,am as d,an as x,o as E}from"./index-B4xolIUJ.js";import{_}from"./definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js";const k=r({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(n){const e=n,t=d(),c=(s,o)=>m(s,{...l(t),...o}),i=x(),a=f(()=>u(e.config.expression,c,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:i,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}));return(s,o)=>(E(),p(_,{"action-id":n.buttonId,effect:g(a)},null,8,["action-id","effect"]))}});export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js";import{d as n,e as a,u as c,o as f,ap as i}from"./index-B4xolIUJ.js";const p=n({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=i;return(r,s)=>(f(),a(o,{"action-id":e.buttonId,effect:c(t)},null,8,["action-id","effect"]))}});export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,ae as u,af as l,ag as g,ah as m,ai as p,aj as d,e as x,u as E,ak as _,al as h,am as k,an as w,o as C}from"./index-
|
|
1
|
+
import{d as f,ae as u,af as l,ag as g,ah as m,ai as p,aj as d,e as x,u as E,ak as _,al as h,am as k,an as w,o as C}from"./index-B4xolIUJ.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js";const R=f({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const n=s,{locale:c}=u(),a=k(),t=(e,o)=>_(e,{...h(a),...o}),i=w(),r=l(function*(){const e=g(n.config.markdown,c.value)??"",o=m(e,t);(yield*p({content:o,icon:n.config.icon,color:n.config.color}))||(yield*d(n.config.expression,t,{messageExpression:n.config.messageExpression,resultExpression:n.config.resultExpression,channel:i,triggers:{success:n.config.onSuccess,warning:n.config.onWarning,error:n.config.onError,info:n.config.onInfo}}))});return(e,o)=>(C(),x(I,{"action-id":s.buttonId,effect:E(r)},null,8,["action-id","effect"]))}});export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,aE as g,ao as A,aq as y,aB as _,e as h,u as S,ak as b,al as k,an as j,aF as B,o as C,am as E}from"./index-
|
|
1
|
+
import{d as l,aE as g,ao as A,aq as y,aB as _,e as h,u as S,ak as b,al as k,an as j,aF as B,o as C,am as E}from"./index-B4xolIUJ.js";import{_ as F}from"./definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js";const I=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=E(),f=(e,t)=>b(e,{...k(i),...t}),n=g(),o=n.kind==="form"&&n.parent?n.parent:n,u=j(),m=B((e,t,a)=>{if(Array.isArray(e[t])&&Array.isArray(a))return e[t]=a,!0});function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return c(e)&&c(t)?m({...t},e):t}const d=A(()=>y(f(s.config.expression),e=>{for(const t of Object.keys(e)){const a=p(o.getAt(t),e[t]);o.setAt(t,a)}return _(u,s.config.onSuccess)}));return(e,t)=>(C(),h(F,{"action-id":r.buttonId,effect:S(d)},null,8,["action-id","effect"]))}});export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js";import{d as s,ao as c,aB as i,e as r,u as f,an as u,o as m}from"./index-B4xolIUJ.js";const g=s({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=c(()=>i(t,n.config.triggers));return(p,d)=>(m(),r(o,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,ao as f,aq as r,ar as d,e as m,u,ak as l,al as p,am as _,o as g}from"./index-
|
|
1
|
+
import{d as i,ao as f,aq as r,ar as d,e as m,u,ak as l,al as p,am as _,o as g}from"./index-B4xolIUJ.js";import{_ as h}from"./definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js";const x=i({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=e,o=_(),c=(n,a)=>l(n,{...p(o),...a}),s=f(()=>r(c(t.config.url),n=>d(()=>{window.open(n,t.config.mode)})));return(n,a)=>(g(),m(h,{"action-id":e.buttonId,effect:u(s)},null,8,["action-id","effect"]))}});export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,ae as l,e as i,u as p,$ as m,o as d,k as f,ag as _,ah as k,ak as g,al as w,am as x}from"./index-
|
|
1
|
+
import{d as u,ae as l,e as i,u as p,$ as m,o as d,k as f,ag as _,ah as k,ak as g,al as w,am as x}from"./index-B4xolIUJ.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(n){const s=n,{locale:o}=l(),t=x(),c=(e,a)=>g(e,{...w(t),...a}),r=m(()=>{const e=_(s.config.content,o.value)??"";return k(e,c)});return(e,a)=>(d(),i(p(f),{"data-slot":"buttons-markdown",source:r.value,class:"prose prose-sm prose-zinc px-1"},null,8,["source"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,ae as x,as as p,af as M,ag as c,at as T,au as N,e as b,w as d,u,a0 as k,a1 as w,an as L,ar as S,o as A,f as I,av as z,g as r,aw as F,ax as H,a7 as V,am as $,ay as f,az as m,aA as j}from"./index-
|
|
1
|
+
import{d as i,ae as x,as as p,af as M,ag as c,at as T,au as N,e as b,w as d,u,a0 as k,a1 as w,an as L,ar as S,o as A,f as I,av as z,g as r,aw as F,ax as H,a7 as V,am as $,ay as f,az as m,aA as j}from"./index-B4xolIUJ.js";import{_ as K}from"./definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js";const O=i({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(a){const n=a,{locale:l}=x(),v=e=>{},g=$(),s=w(f,void 0),h=L(),o=k(null),C=p(n.buttonId,{close:()=>S(()=>{o.value?.()})},h),y=i({name:"ModalBoundaryBridge",setup(e,{slots:t}){return H(g),m(j,C),s&&m(f,s),()=>t.default?.()}}),E=(e,t)=>V()?.(e,t),_=M(function*(){const e=c(n.config.modalTitle,l.value)??c(n.buttonTitle,l.value)??"",{modal:t,close:B}=yield*T({title:e,width:n.config.modalWidth});o.value=()=>N(B()),yield*t,o.value=null});return(e,t)=>(A(),b(K,{"action-id":a.buttonId,effect:u(_)},{default:d(()=>[I("div",{style:z(a.config.modalMinHeight?`min-height: ${a.config.modalMinHeight}`:void 0)},[r(u(y),null,{default:d(()=>[r(F,{"slot-value":a.config.slot,configure:v,"find-entry":E},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as _,ao as B,af as E,ar as r,aB as m,aC as S,aD as j,e as k,u as v,ak as x,al as C,an as L,am as b,o as R}from"./index-
|
|
1
|
+
import{d as _,ao as B,af as E,ar as r,aB as m,aC as S,aD as j,e as k,u as v,ak as x,al as C,an as L,am as b,o as R}from"./index-B4xolIUJ.js";import{_ as T}from"./definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js";const q=_({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=b(),t=(e,n)=>x(e,{...C(g),...n}),l=L(),p=new Set(["success","error","warning","info"]);function f(e){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=e.name,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(n)}const y=B(()=>E(function*(){const{template:e,messageExpression:n,resultExpression:o}=c.config,u=yield*t(e.request);if(!e.download){const s=yield*u.file();return yield*r(()=>f(s)),yield*m(l,c.config.onSuccess)}const a={json:yield*u.json()},i=o===void 0?"success":yield*S(t(o,a),s=>p.has(s)?s:"success");if(n!==void 0){const s=yield*t(n,a);yield*r(()=>j[i](s))}if(i==="success"||i==="info"){const h=yield*(yield*t(e.download,a)).file();yield*r(()=>f(h))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i])}));return(e,n)=>(R(),k(T,{"action-id":d.buttonId,effect:v(y)},null,8,["action-id","effect"]))}});export{q as default};
|
package/dist/preview/index.html
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
`--primary`, the primary button variant renders as transparent. */
|
|
11
11
|
body { --primary: #009689; }
|
|
12
12
|
</style>
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-B4xolIUJ.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CJMxrUKZ.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="app"></div>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
modelValue: Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: {
|
|
7
|
+
readonly label?: readonly [{
|
|
8
|
+
readonly locale: "zh";
|
|
9
|
+
readonly message: string;
|
|
10
|
+
}, ...{
|
|
11
|
+
readonly locale: "en" | "ja" | "ko";
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}[]] | undefined;
|
|
14
|
+
readonly disabled?: string | undefined;
|
|
15
|
+
readonly type: "com.shwfed.form.field.combobox.multi";
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly hidden?: string | undefined;
|
|
18
|
+
readonly tooltip?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly displayName?: string | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-05-25";
|
|
27
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
28
|
+
readonly placeholder?: readonly [{
|
|
29
|
+
readonly locale: "zh";
|
|
30
|
+
readonly message: string;
|
|
31
|
+
}, ...{
|
|
32
|
+
readonly locale: "en" | "ja" | "ko";
|
|
33
|
+
readonly message: string;
|
|
34
|
+
}[]] | undefined;
|
|
35
|
+
readonly readonly?: string | undefined;
|
|
36
|
+
readonly binding?: string | undefined;
|
|
37
|
+
readonly derived?: {
|
|
38
|
+
readonly mode: "formula" | "prefill";
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
readonly options: string;
|
|
42
|
+
readonly optionValue: string;
|
|
43
|
+
readonly optionLabel: readonly [{
|
|
44
|
+
readonly locale: "zh";
|
|
45
|
+
readonly message: string;
|
|
46
|
+
}, ...{
|
|
47
|
+
readonly locale: "en" | "ja" | "ko";
|
|
48
|
+
readonly message: string;
|
|
49
|
+
}[]];
|
|
50
|
+
}) => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
52
|
+
"onUpdate:modelValue"?: ((value: {
|
|
53
|
+
readonly label?: readonly [{
|
|
54
|
+
readonly locale: "zh";
|
|
55
|
+
readonly message: string;
|
|
56
|
+
}, ...{
|
|
57
|
+
readonly locale: "en" | "ja" | "ko";
|
|
58
|
+
readonly message: string;
|
|
59
|
+
}[]] | undefined;
|
|
60
|
+
readonly disabled?: string | undefined;
|
|
61
|
+
readonly type: "com.shwfed.form.field.combobox.multi";
|
|
62
|
+
readonly id: string;
|
|
63
|
+
readonly hidden?: string | undefined;
|
|
64
|
+
readonly tooltip?: readonly [{
|
|
65
|
+
readonly locale: "zh";
|
|
66
|
+
readonly message: string;
|
|
67
|
+
}, ...{
|
|
68
|
+
readonly locale: "en" | "ja" | "ko";
|
|
69
|
+
readonly message: string;
|
|
70
|
+
}[]] | undefined;
|
|
71
|
+
readonly displayName?: string | undefined;
|
|
72
|
+
readonly compatibilityDate: "2026-05-25";
|
|
73
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
74
|
+
readonly placeholder?: readonly [{
|
|
75
|
+
readonly locale: "zh";
|
|
76
|
+
readonly message: string;
|
|
77
|
+
}, ...{
|
|
78
|
+
readonly locale: "en" | "ja" | "ko";
|
|
79
|
+
readonly message: string;
|
|
80
|
+
}[]] | undefined;
|
|
81
|
+
readonly readonly?: string | undefined;
|
|
82
|
+
readonly binding?: string | undefined;
|
|
83
|
+
readonly derived?: {
|
|
84
|
+
readonly mode: "formula" | "prefill";
|
|
85
|
+
readonly expression: string;
|
|
86
|
+
} | undefined;
|
|
87
|
+
readonly options: string;
|
|
88
|
+
readonly optionValue: string;
|
|
89
|
+
readonly optionLabel: readonly [{
|
|
90
|
+
readonly locale: "zh";
|
|
91
|
+
readonly message: string;
|
|
92
|
+
}, ...{
|
|
93
|
+
readonly locale: "en" | "ja" | "ko";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
}[]];
|
|
96
|
+
}) => any) | undefined;
|
|
97
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
98
|
+
declare const _default: typeof __VLS_export;
|
|
99
|
+
export default _default;
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
4
|
+
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
5
|
+
import { Field, FieldLabel } from "../../../../ui/field";
|
|
6
|
+
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
7
|
+
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
8
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
9
|
+
import {
|
|
10
|
+
Select,
|
|
11
|
+
SelectContent,
|
|
12
|
+
SelectItem,
|
|
13
|
+
SelectTrigger,
|
|
14
|
+
SelectValue
|
|
15
|
+
} from "../../../../ui/select";
|
|
16
|
+
import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
|
|
17
|
+
import { DEFAULT_FIELD_ORIENTATION, FIELD_ORIENTATION_OPTIONS } from "../../../utils/common";
|
|
18
|
+
import { schema } from "./schema";
|
|
19
|
+
defineOptions({ name: "ShwfedComboboxMultiFieldConfig" });
|
|
20
|
+
const value = defineModel({ type: null, ...{ required: true } });
|
|
21
|
+
const fieldSchema = schema(() => {
|
|
22
|
+
});
|
|
23
|
+
const fieldTitle = (f) => getStructFieldTitle(fieldSchema, f) ?? f;
|
|
24
|
+
const fieldDescription = (f) => getStructFieldDescription(fieldSchema, f);
|
|
25
|
+
const pathText = computed({
|
|
26
|
+
get: () => value.value.binding ?? "",
|
|
27
|
+
set: (next) => {
|
|
28
|
+
const trimmed = next.trim();
|
|
29
|
+
if (trimmed.length === 0) {
|
|
30
|
+
const { binding: _omit, ...rest } = value.value;
|
|
31
|
+
value.value = rest;
|
|
32
|
+
} else {
|
|
33
|
+
value.value = { ...value.value, binding: trimmed };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div class="flex flex-col gap-3">
|
|
41
|
+
<div class="grid grid-cols-2 gap-3">
|
|
42
|
+
<Field orientation="vertical">
|
|
43
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
44
|
+
<template
|
|
45
|
+
v-if="fieldDescription('displayName')"
|
|
46
|
+
#tooltip
|
|
47
|
+
>
|
|
48
|
+
<Markdown
|
|
49
|
+
:source="fieldDescription('displayName')"
|
|
50
|
+
block
|
|
51
|
+
class="prose prose-sm prose-zinc"
|
|
52
|
+
/>
|
|
53
|
+
</template>
|
|
54
|
+
{{ fieldTitle("displayName") }}
|
|
55
|
+
</FieldLabel>
|
|
56
|
+
<InputGroup>
|
|
57
|
+
<InputGroupInput
|
|
58
|
+
:model-value="value.displayName ?? ''"
|
|
59
|
+
placeholder="例:用户角色"
|
|
60
|
+
@update:model-value="(v) => {
|
|
61
|
+
const s = String(v ?? '');
|
|
62
|
+
value = { ...value, displayName: s.length > 0 ? s : void 0 };
|
|
63
|
+
}"
|
|
64
|
+
/>
|
|
65
|
+
</InputGroup>
|
|
66
|
+
</Field>
|
|
67
|
+
|
|
68
|
+
<Field orientation="vertical">
|
|
69
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
70
|
+
<template #tooltip>
|
|
71
|
+
<Markdown
|
|
72
|
+
source="写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.roles`;写入值为已选项 `value` 组成的数组"
|
|
73
|
+
block
|
|
74
|
+
class="prose prose-sm prose-zinc"
|
|
75
|
+
/>
|
|
76
|
+
</template>
|
|
77
|
+
{{ fieldTitle("binding") }}
|
|
78
|
+
</FieldLabel>
|
|
79
|
+
<InputGroup>
|
|
80
|
+
<InputGroupInput
|
|
81
|
+
v-model="pathText"
|
|
82
|
+
placeholder="例:user.roles"
|
|
83
|
+
class="font-mono"
|
|
84
|
+
/>
|
|
85
|
+
</InputGroup>
|
|
86
|
+
</Field>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div class="grid grid-cols-3 gap-3">
|
|
90
|
+
<Field orientation="vertical">
|
|
91
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
92
|
+
<template
|
|
93
|
+
v-if="fieldDescription('label')"
|
|
94
|
+
#tooltip
|
|
95
|
+
>
|
|
96
|
+
<Markdown
|
|
97
|
+
:source="fieldDescription('label')"
|
|
98
|
+
block
|
|
99
|
+
class="prose prose-sm prose-zinc"
|
|
100
|
+
/>
|
|
101
|
+
</template>
|
|
102
|
+
{{ fieldTitle("label") }}
|
|
103
|
+
</FieldLabel>
|
|
104
|
+
<LocaleField
|
|
105
|
+
:model-value="value.label"
|
|
106
|
+
@update:model-value="(v) => value = { ...value, label: v }"
|
|
107
|
+
/>
|
|
108
|
+
</Field>
|
|
109
|
+
|
|
110
|
+
<Field orientation="vertical">
|
|
111
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
112
|
+
<template
|
|
113
|
+
v-if="fieldDescription('placeholder')"
|
|
114
|
+
#tooltip
|
|
115
|
+
>
|
|
116
|
+
<Markdown
|
|
117
|
+
:source="fieldDescription('placeholder')"
|
|
118
|
+
block
|
|
119
|
+
class="prose prose-sm prose-zinc"
|
|
120
|
+
/>
|
|
121
|
+
</template>
|
|
122
|
+
{{ fieldTitle("placeholder") }}
|
|
123
|
+
</FieldLabel>
|
|
124
|
+
<LocaleField
|
|
125
|
+
:model-value="value.placeholder"
|
|
126
|
+
@update:model-value="(v) => value = { ...value, placeholder: v }"
|
|
127
|
+
/>
|
|
128
|
+
</Field>
|
|
129
|
+
|
|
130
|
+
<Field orientation="vertical">
|
|
131
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
132
|
+
<template
|
|
133
|
+
v-if="fieldDescription('tooltip')"
|
|
134
|
+
#tooltip
|
|
135
|
+
>
|
|
136
|
+
<Markdown
|
|
137
|
+
:source="fieldDescription('tooltip')"
|
|
138
|
+
block
|
|
139
|
+
class="prose prose-sm prose-zinc"
|
|
140
|
+
/>
|
|
141
|
+
</template>
|
|
142
|
+
{{ fieldTitle("tooltip") }}
|
|
143
|
+
</FieldLabel>
|
|
144
|
+
<LocaleField
|
|
145
|
+
markdown
|
|
146
|
+
:model-value="value.tooltip"
|
|
147
|
+
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
148
|
+
/>
|
|
149
|
+
</Field>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div class="grid grid-cols-3 gap-3">
|
|
153
|
+
<Field orientation="vertical">
|
|
154
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
155
|
+
<template
|
|
156
|
+
v-if="fieldDescription('orientation')"
|
|
157
|
+
#tooltip
|
|
158
|
+
>
|
|
159
|
+
<Markdown
|
|
160
|
+
:source="fieldDescription('orientation')"
|
|
161
|
+
block
|
|
162
|
+
class="prose prose-sm prose-zinc"
|
|
163
|
+
/>
|
|
164
|
+
</template>
|
|
165
|
+
{{ fieldTitle("orientation") }}
|
|
166
|
+
</FieldLabel>
|
|
167
|
+
<Select
|
|
168
|
+
:model-value="value.orientation ?? DEFAULT_FIELD_ORIENTATION"
|
|
169
|
+
@update:model-value="(v) => value = { ...value, orientation: v }"
|
|
170
|
+
>
|
|
171
|
+
<SelectTrigger class="w-full">
|
|
172
|
+
<SelectValue />
|
|
173
|
+
</SelectTrigger>
|
|
174
|
+
<SelectContent>
|
|
175
|
+
<SelectItem
|
|
176
|
+
v-for="opt in FIELD_ORIENTATION_OPTIONS"
|
|
177
|
+
:key="opt.value"
|
|
178
|
+
:value="opt.value"
|
|
179
|
+
>
|
|
180
|
+
{{ opt.label }}
|
|
181
|
+
</SelectItem>
|
|
182
|
+
</SelectContent>
|
|
183
|
+
</Select>
|
|
184
|
+
</Field>
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
<div class="grid grid-cols-1 gap-3">
|
|
188
|
+
<Field orientation="vertical">
|
|
189
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
190
|
+
<template #tooltip>
|
|
191
|
+
<Markdown
|
|
192
|
+
:source="fieldDescription('options') ?? '\u8FD4\u56DE\u9009\u9879\u6570\u7EC4\u7684 CEL \u8868\u8FBE\u5F0F'"
|
|
193
|
+
block
|
|
194
|
+
class="prose prose-sm prose-zinc"
|
|
195
|
+
/>
|
|
196
|
+
</template>
|
|
197
|
+
{{ fieldTitle("options") }}
|
|
198
|
+
</FieldLabel>
|
|
199
|
+
<ExpressionEditor
|
|
200
|
+
:model-value="value.options"
|
|
201
|
+
placeholder="例:[{"value": "a", "label": "A"}]"
|
|
202
|
+
result-type="list"
|
|
203
|
+
class="min-h-10"
|
|
204
|
+
@update:model-value="(v) => value = { ...value, options: v }"
|
|
205
|
+
/>
|
|
206
|
+
</Field>
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<div class="grid grid-cols-2 gap-3">
|
|
210
|
+
<Field orientation="vertical">
|
|
211
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
212
|
+
<template #tooltip>
|
|
213
|
+
<Markdown
|
|
214
|
+
:source="fieldDescription('optionValue') ?? '\u4ECE\u5F53\u524D `option` \u63D0\u53D6\u5199\u5165\u7ED1\u5B9A\u7684\u503C'"
|
|
215
|
+
block
|
|
216
|
+
class="prose prose-sm prose-zinc"
|
|
217
|
+
/>
|
|
218
|
+
</template>
|
|
219
|
+
{{ fieldTitle("optionValue") }}
|
|
220
|
+
</FieldLabel>
|
|
221
|
+
<ExpressionEditor
|
|
222
|
+
:model-value="value.optionValue"
|
|
223
|
+
placeholder="例:option["value"]"
|
|
224
|
+
result-type="dyn"
|
|
225
|
+
class="min-h-10"
|
|
226
|
+
@update:model-value="(v) => value = { ...value, optionValue: v }"
|
|
227
|
+
/>
|
|
228
|
+
</Field>
|
|
229
|
+
|
|
230
|
+
<Field orientation="vertical">
|
|
231
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
232
|
+
<template #tooltip>
|
|
233
|
+
<Markdown
|
|
234
|
+
:source="fieldDescription('optionLabel') ?? '\u6BCF\u4E2A\u9009\u9879\u5C55\u793A\u7684\u672C\u5730\u5316\u6587\u672C\uFF0C\u652F\u6301 `{{ string(option.foo) }}` \u63D2\u503C'"
|
|
235
|
+
block
|
|
236
|
+
class="prose prose-sm prose-zinc"
|
|
237
|
+
/>
|
|
238
|
+
</template>
|
|
239
|
+
{{ fieldTitle("optionLabel") }}
|
|
240
|
+
</FieldLabel>
|
|
241
|
+
<LocaleField
|
|
242
|
+
:model-value="value.optionLabel"
|
|
243
|
+
@update:model-value="(v) => value = { ...value, optionLabel: v }"
|
|
244
|
+
/>
|
|
245
|
+
</Field>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
<div class="grid grid-cols-3 gap-3">
|
|
249
|
+
<Field orientation="vertical">
|
|
250
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
251
|
+
<template #tooltip>
|
|
252
|
+
<Markdown
|
|
253
|
+
:source="fieldDescription('hidden') ?? '\u8FD4\u56DE `true` \u65F6\u5B57\u6BB5\u5728\u6240\u6709\u5E03\u5C40\u4E2D\u90FD\u4E0D\u6E32\u67D3'"
|
|
254
|
+
block
|
|
255
|
+
class="prose prose-sm prose-zinc"
|
|
256
|
+
/>
|
|
257
|
+
</template>
|
|
258
|
+
{{ fieldTitle("hidden") }}
|
|
259
|
+
</FieldLabel>
|
|
260
|
+
<ExpressionEditor
|
|
261
|
+
:model-value="value.hidden ?? ''"
|
|
262
|
+
placeholder="例:form.role == 'guest'"
|
|
263
|
+
result-type="bool"
|
|
264
|
+
class="min-h-10"
|
|
265
|
+
@update:model-value="(v) => value = { ...value, hidden: v.length > 0 ? v : void 0 }"
|
|
266
|
+
/>
|
|
267
|
+
</Field>
|
|
268
|
+
|
|
269
|
+
<Field orientation="vertical">
|
|
270
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
271
|
+
<template #tooltip>
|
|
272
|
+
<Markdown
|
|
273
|
+
:source="fieldDescription('disabled') ?? '\u8FD4\u56DE `true` \u65F6\u4E0B\u62C9\u6846\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u9009\u62E9'"
|
|
274
|
+
block
|
|
275
|
+
class="prose prose-sm prose-zinc"
|
|
276
|
+
/>
|
|
277
|
+
</template>
|
|
278
|
+
{{ fieldTitle("disabled") }}
|
|
279
|
+
</FieldLabel>
|
|
280
|
+
<ExpressionEditor
|
|
281
|
+
:model-value="value.disabled ?? ''"
|
|
282
|
+
placeholder="例:form.status == 'locked'"
|
|
283
|
+
result-type="bool"
|
|
284
|
+
class="min-h-10"
|
|
285
|
+
@update:model-value="(v) => value = { ...value, disabled: v.length > 0 ? v : void 0 }"
|
|
286
|
+
/>
|
|
287
|
+
</Field>
|
|
288
|
+
|
|
289
|
+
<Field orientation="vertical">
|
|
290
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
291
|
+
<template #tooltip>
|
|
292
|
+
<Markdown
|
|
293
|
+
:source="fieldDescription('readonly') ?? '\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u5DF2\u9009\u9879\u7684\u6807\u7B7E'"
|
|
294
|
+
block
|
|
295
|
+
class="prose prose-sm prose-zinc"
|
|
296
|
+
/>
|
|
297
|
+
</template>
|
|
298
|
+
{{ fieldTitle("readonly") }}
|
|
299
|
+
</FieldLabel>
|
|
300
|
+
<ExpressionEditor
|
|
301
|
+
:model-value="value.readonly ?? ''"
|
|
302
|
+
placeholder="例:form.id != null"
|
|
303
|
+
result-type="bool"
|
|
304
|
+
class="min-h-10"
|
|
305
|
+
@update:model-value="(v) => value = { ...value, readonly: v.length > 0 ? v : void 0 }"
|
|
306
|
+
/>
|
|
307
|
+
</Field>
|
|
308
|
+
</div>
|
|
309
|
+
|
|
310
|
+
<Field orientation="vertical">
|
|
311
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
312
|
+
<template #tooltip>
|
|
313
|
+
<Markdown
|
|
314
|
+
:source="fieldDescription('derived')"
|
|
315
|
+
block
|
|
316
|
+
class="prose prose-sm prose-zinc"
|
|
317
|
+
/>
|
|
318
|
+
</template>
|
|
319
|
+
{{ fieldTitle("derived") }}
|
|
320
|
+
</FieldLabel>
|
|
321
|
+
<DerivedValueEditor
|
|
322
|
+
:model-value="value.derived"
|
|
323
|
+
result-type="dyn"
|
|
324
|
+
placeholder="例:form.category"
|
|
325
|
+
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
326
|
+
/>
|
|
327
|
+
</Field>
|
|
328
|
+
</div>
|
|
329
|
+
</template>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
modelValue: Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: {
|
|
7
|
+
readonly label?: readonly [{
|
|
8
|
+
readonly locale: "zh";
|
|
9
|
+
readonly message: string;
|
|
10
|
+
}, ...{
|
|
11
|
+
readonly locale: "en" | "ja" | "ko";
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}[]] | undefined;
|
|
14
|
+
readonly disabled?: string | undefined;
|
|
15
|
+
readonly type: "com.shwfed.form.field.combobox.multi";
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly hidden?: string | undefined;
|
|
18
|
+
readonly tooltip?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly displayName?: string | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-05-25";
|
|
27
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
28
|
+
readonly placeholder?: readonly [{
|
|
29
|
+
readonly locale: "zh";
|
|
30
|
+
readonly message: string;
|
|
31
|
+
}, ...{
|
|
32
|
+
readonly locale: "en" | "ja" | "ko";
|
|
33
|
+
readonly message: string;
|
|
34
|
+
}[]] | undefined;
|
|
35
|
+
readonly readonly?: string | undefined;
|
|
36
|
+
readonly binding?: string | undefined;
|
|
37
|
+
readonly derived?: {
|
|
38
|
+
readonly mode: "formula" | "prefill";
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
readonly options: string;
|
|
42
|
+
readonly optionValue: string;
|
|
43
|
+
readonly optionLabel: readonly [{
|
|
44
|
+
readonly locale: "zh";
|
|
45
|
+
readonly message: string;
|
|
46
|
+
}, ...{
|
|
47
|
+
readonly locale: "en" | "ja" | "ko";
|
|
48
|
+
readonly message: string;
|
|
49
|
+
}[]];
|
|
50
|
+
}) => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
52
|
+
"onUpdate:modelValue"?: ((value: {
|
|
53
|
+
readonly label?: readonly [{
|
|
54
|
+
readonly locale: "zh";
|
|
55
|
+
readonly message: string;
|
|
56
|
+
}, ...{
|
|
57
|
+
readonly locale: "en" | "ja" | "ko";
|
|
58
|
+
readonly message: string;
|
|
59
|
+
}[]] | undefined;
|
|
60
|
+
readonly disabled?: string | undefined;
|
|
61
|
+
readonly type: "com.shwfed.form.field.combobox.multi";
|
|
62
|
+
readonly id: string;
|
|
63
|
+
readonly hidden?: string | undefined;
|
|
64
|
+
readonly tooltip?: readonly [{
|
|
65
|
+
readonly locale: "zh";
|
|
66
|
+
readonly message: string;
|
|
67
|
+
}, ...{
|
|
68
|
+
readonly locale: "en" | "ja" | "ko";
|
|
69
|
+
readonly message: string;
|
|
70
|
+
}[]] | undefined;
|
|
71
|
+
readonly displayName?: string | undefined;
|
|
72
|
+
readonly compatibilityDate: "2026-05-25";
|
|
73
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
74
|
+
readonly placeholder?: readonly [{
|
|
75
|
+
readonly locale: "zh";
|
|
76
|
+
readonly message: string;
|
|
77
|
+
}, ...{
|
|
78
|
+
readonly locale: "en" | "ja" | "ko";
|
|
79
|
+
readonly message: string;
|
|
80
|
+
}[]] | undefined;
|
|
81
|
+
readonly readonly?: string | undefined;
|
|
82
|
+
readonly binding?: string | undefined;
|
|
83
|
+
readonly derived?: {
|
|
84
|
+
readonly mode: "formula" | "prefill";
|
|
85
|
+
readonly expression: string;
|
|
86
|
+
} | undefined;
|
|
87
|
+
readonly options: string;
|
|
88
|
+
readonly optionValue: string;
|
|
89
|
+
readonly optionLabel: readonly [{
|
|
90
|
+
readonly locale: "zh";
|
|
91
|
+
readonly message: string;
|
|
92
|
+
}, ...{
|
|
93
|
+
readonly locale: "en" | "ja" | "ko";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
}[]];
|
|
96
|
+
}) => any) | undefined;
|
|
97
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
98
|
+
declare const _default: typeof __VLS_export;
|
|
99
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Value } from './schema.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
fieldId: string;
|
|
4
|
+
config: Value;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|