@shwfed/config 2.10.3 → 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 +26 -2
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-sT5i_dnE.js → FieldGroup.vue_vue_type_script_setup_true_lang-DIjsktfi.js} +1 -1
- package/dist/preview/assets/{badge-ZFj45FMd.js → badge-Cr6_n00S.js} +1 -1
- package/dist/preview/assets/{config-BwDPPmtn.js → config-1VGYa1Zb.js} +1 -1
- package/dist/preview/assets/{config-3rP_f_3o.js → config-B2rtOFE1.js} +1 -1
- package/dist/preview/assets/{config-DZPLqFqt.js → config-BemROLz0.js} +1 -1
- package/dist/preview/assets/{config-BLesYihN.js → config-BjUIO7Ps.js} +1 -1
- package/dist/preview/assets/{config-BBvebIQw.js → config-Bu-ffrDi.js} +1 -1
- package/dist/preview/assets/{config-CSR1JNVB.js → config-CNY70agP.js} +1 -1
- package/dist/preview/assets/{config-D1uMzMiN.js → config-CSauYxAG.js} +1 -1
- package/dist/preview/assets/{config-Rz0II9u6.js → config-CrA5lAMB.js} +1 -1
- package/dist/preview/assets/{config-CEBzJOHo.js → config-CwbWyadd.js} +1 -1
- package/dist/preview/assets/{config-cD091sze.js → config-DF4u2WzQ.js} +1 -1
- package/dist/preview/assets/{config-CgM75jSO.js → config-DTDFg08z.js} +1 -1
- package/dist/preview/assets/{config-lskK7grq.js → config-DpcMlGoM.js} +1 -1
- package/dist/preview/assets/{config-DfVc2Iy9.js → config-Dx9AeOjb.js} +1 -1
- package/dist/preview/assets/{config-2iinn_1E.js → config-hXHOfKvD.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-Ce_NeQUa.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-_KA5_QIV.js → index-BzWZj-hV.js} +1 -1
- package/dist/preview/assets/{index-Zc4Mcm3J.js → index-E3_P6Fhz.js} +177 -177
- package/dist/preview/assets/{item-CBFJ6f6b.js → item-B_QcL62I.js} +1 -1
- package/dist/preview/assets/{runtime-Q_isegB9.js → runtime-BRg0jxiK.js} +1 -1
- package/dist/preview/assets/{runtime-DO9HS0Rb.js → runtime-BbiAwZZ9.js} +1 -1
- package/dist/preview/assets/{runtime-jWibKv1T.js → runtime-CKoLdM68.js} +1 -1
- package/dist/preview/assets/{runtime-DQXLscBz.js → runtime-CZ6uHCIE.js} +1 -1
- package/dist/preview/assets/{runtime-enspc5HG.js → runtime-Cd79TXff.js} +1 -1
- package/dist/preview/assets/{runtime-Cu0RJn8g.js → runtime-Cfup01hl.js} +1 -1
- package/dist/preview/assets/{runtime-BIGEoc5L.js → runtime-Cu_C4Joj.js} +1 -1
- package/dist/preview/assets/{runtime-CvMryNNx.js → runtime-D-MaRCSg.js} +1 -1
- package/dist/preview/assets/{runtime-BKqyqEeD.js → runtime-DUMSbsqb.js} +1 -1
- package/dist/preview/assets/{runtime-CIc3k_jd.js → runtime-hClBh8tp.js} +1 -1
- package/dist/preview/assets/{schema-meta-B5tln_XH.js → schema-meta-BACRMkVo.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/block-layout-editor/index.vue +8 -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-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 +134 -0
- 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 +134 -0
- 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-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/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- 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/index-pkoEF5dC.css +0 -1
- package/dist/preview/assets/index-snO3CfdE.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as B,G as M,H as k,I as y,o as q,c as T,J as V,b as E,K as x,L as i,M as J,N as L,O as s,P,Q as U,R as W,S as z,T as A,U as G,V as g,W as H,X as b,Y as K}from"./index-
|
|
1
|
+
import{d as B,G as M,H as k,I as y,o as q,c as T,J as V,b as E,K as x,L as i,M as J,N as L,O as s,P,Q as U,R as W,S as z,T as A,U as G,V as g,W as H,X as b,Y as K}from"./index-E3_P6Fhz.js";import Q from"./index-BzWZj-hV.js";const Y=B({name:"ShwfedBlockAnimatedNumberItem",__name:"item",props:{item:{}},setup(h){const n=h,j=H(),a=x(void 0),m=x(0);function u(){return G(j)}function S(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){const t=Number(e);return Number.isFinite(t)?t:0}return 0}const d=i(()=>a.value===void 0?g():K(a.value));function v(e){if(!e)return"";try{const t=b(s(e,{...u(),json:d.value}));return t==null?"":String(t)}catch{return""}}const w=i(()=>v(n.item.prefix)),I=i(()=>v(n.item.suffix));function N(e){if(e)try{const t=b(s(e,{...u(),json:d.value}));return t==null?void 0:typeof t=="string"||typeof t=="object"?t:String(t)}catch{return}}const _=i(()=>N(n.item.style));async function r(){const e=n.item.dataSource,t=u(),F=J(function*(){let o=g();e.request&&(o=yield*L(yield*s(e.request,t)));const O=yield*s(e.value,{...t,json:o});return{json:P(o),value:O}});try{const o=await U(W(F,z));a.value=o.json,m.value=S(o.value)}catch(o){console.warn("[shwfed-animated-number] fetch failed",o)}}const l=i(()=>(n.item.pollingInterval??0)>0),C=i(()=>Math.max(1,n.item.pollingInterval??1)*1e3),c=A(),{pause:p,resume:f}=M(()=>{r()},C,{immediate:!1});return k(()=>{r(),l.value&&c.value&&f()}),y(c,e=>{l.value&&(e?(r(),f()):p())}),y(()=>[n.item.dataSource.request??"",n.item.dataSource.value,n.item.pollingInterval??0].join("|"),()=>{r(),l.value&&c.value?f():p()}),(e,t)=>(q(),T(E(Q),{value:m.value,prefix:w.value,suffix:I.value,style:V(_.value)},null,8,["value","prefix","suffix","style"]))}});export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,a6 as i,c as l,b as p,L as m,o as d,h as f,a9 as _,aP as k,O as w,U as x,W as g}from"./index-
|
|
1
|
+
import{d as u,a6 as i,c as l,b as p,L as m,o as d,h as f,a9 as _,aP as k,O as w,U as x,W as g}from"./index-E3_P6Fhz.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(s){const o=s,{locale:a}=i(),t=g(),c=(e,n)=>w(e,{...x(t),...n}),r=m(()=>{const e=_(o.config.content,a.value)??"";return k(e,c)});return(e,n)=>(d(),l(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 f,a6 as g,M as l,aO as u,a9 as d,aP as p,aQ as m,aR as x,c as E,b as _,O as h,U as w,aS as C,W as b,o as k}from"./index-
|
|
1
|
+
import{d as f,a6 as g,M as l,aO as u,a9 as d,aP as p,aQ as m,aR as x,c as E,b as _,O as h,U as w,aS as C,W as b,o as k}from"./index-E3_P6Fhz.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js";const B=f({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(c){const n=c,{locale:i}=g(),a=b(),s=(e,o)=>h(e,{...w(a),...o}),t=C(),r=l(function*(){yield*u(t,n.config.before,s);const e=d(n.config.markdown,i.value)??"",o=p(e,s);(yield*m({content:o,icon:n.config.icon,color:n.config.color}))||(yield*x(n.config.expression,s,{messageExpression:n.config.messageExpression,resultExpression:n.config.resultExpression,channel:t,triggers:{success:n.config.onSuccess,warning:n.config.onWarning,error:n.config.onError,info:n.config.onInfo}}))});return(e,o)=>(k(),E(I,{"action-id":c.buttonId,effect:_(r)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,aT as u,aW as d,aX as l,aY as m,c as p,b as w,aZ as _,O as g,U as h,W as b,o as x}from"./index-
|
|
1
|
+
import{d as f,aT as u,aW as d,aX as l,aY as m,c as p,b as w,aZ as _,O as g,U as h,W as b,o as x}from"./index-E3_P6Fhz.js";import{_ as k}from"./definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js";const C=f({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const o=t,a=_(),i=b(),c=(n,e)=>g(n,{...h(i),...e});function s(n){try{return new URL(n,window.location.href).origin!==window.location.origin}catch{return!1}}const r=u(()=>d(c(o.config.url),n=>l(async()=>{const e=s(n);if(o.config.mode==="_blank"){window.open(e?n:a.resolve(n).href,"_blank");return}await m(n)})));return(n,e)=>(x(),p(k,{"action-id":t.buttonId,effect:w(r)},null,8,["action-id","effect"]))}});export{C 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-v2AaUd8i.js";import{d as n,c,b as a,o as f,aV as i}from"./index-E3_P6Fhz.js";const _=n({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),c(o,{"action-id":t.buttonId,effect:a(e)},null,8,["action-id","effect"]))}});export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,aT as f,aO as d,c as u,b as m,aS as p,o as l,O as g,U as h,W as _}from"./index-
|
|
1
|
+
import{d as r,aT as f,aO as d,c as u,b as m,aS as p,o as l,O as g,U as h,W as _}from"./index-E3_P6Fhz.js";import{_ as C}from"./definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js";const B=r({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const c=e,s=_(),a=(n,t)=>g(n,{...h(s),...t}),o=p(),i=f(()=>d(o,c.config.triggers,a));return(n,t)=>(l(),u(C,{"action-id":e.buttonId,effect:m(i)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as h,aT as S,M as _,b0 as r,aO as m,b5 as E,b6 as j,c as v,b as x,O as B,U as L,aS as k,W as C,o as O}from"./index-
|
|
1
|
+
import{d as h,aT as S,M as _,b0 as r,aO as m,b5 as E,b6 as j,c as v,b as x,O as B,U as L,aS as k,W as C,o as O}from"./index-E3_P6Fhz.js";import{_ as R}from"./definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js";const q=h({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>B(e,{...L(g),...n}),l=k(),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=S(()=>_(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,t)}const a={json:yield*u.json()},i=o===void 0?"success":yield*E(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 b=yield*(yield*t(e.download,a)).file();yield*r(()=>f(b))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i],t)}));return(e,n)=>(O(),v(R,{"action-id":d.buttonId,effect:x(y)},null,8,["action-id","effect"]))}});export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s,a6 as B,a_ as M,M as p,a9 as c,a$ as x,X as T,c as N,w as d,b as u,K as S,$ as k,aS as L,b0 as $,o as w,j as F,J as I,a as r,b1 as j,b2 as A,aF as H,W as K,b3 as f,a3 as m,b4 as V}from"./index-
|
|
1
|
+
import{d as s,a6 as B,a_ as M,M as p,a9 as c,a$ as x,X as T,c as N,w as d,b as u,K as S,$ as k,aS as L,b0 as $,o as w,j as F,J as I,a as r,b1 as j,b2 as A,aF as H,W as K,b3 as f,a3 as m,b4 as V}from"./index-E3_P6Fhz.js";import{_ as z}from"./definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js";const Y=s({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(n){const a=n,{locale:l}=B(),v=e=>{},h=K(),i=k(f,void 0),g=L(),o=S(null),C=M(a.buttonId,{close:()=>$(()=>{o.value?.()})},g),_=s({name:"ModalBoundaryBridge",setup(e,{slots:t}){return A(h),m(V,C),i&&m(f,i),()=>t.default?.()}}),b=(e,t)=>H()?.(e,t),E=p(function*(){const e=c(a.config.modalTitle,l.value)??c(a.buttonTitle,l.value)??"",{modal:t,close:y}=yield*x({title:e,width:a.config.modalWidth});o.value=()=>T(y()),yield*t,o.value=null});return(e,t)=>(w(),N(z,{"action-id":n.buttonId,effect:u(E)},{default:d(()=>[F("div",{style:I(n.config.modalMinHeight?`min-height: ${n.config.modalMinHeight}`:void 0)},[r(u(_),null,{default:d(()=>[r(j,{"slot-value":n.config.slot,configure:v,"find-entry":b},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,aT as f,aU as u,aO as g,aR as p,c as d,b as m,O as l,U as x,aS as h,W as E,o as _}from"./index-
|
|
1
|
+
import{d as r,aT as f,aU as u,aO as g,aR as p,c as d,b as m,O as l,U as x,aS as h,W as E,o as _}from"./index-E3_P6Fhz.js";import{_ as b}from"./definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js";const B=r({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(n){const e=n,i=E(),s=(t,c)=>l(t,{...x(i),...c}),o=h(),a=f(()=>u(g(o,e.config.before,s),()=>p(e.config.expression,s,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:o,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}})));return(t,c)=>(_(),d(b,{"action-id":n.buttonId,effect:m(a)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,b7 as g,aT as A,aW as y,aO as b,c as S,b as _,O as h,U as O,aS as j,b8 as k,W as C,o as B}from"./index-
|
|
1
|
+
import{d as l,b7 as g,aT as A,aW as y,aO as b,c as S,b as _,O as h,U as O,aS as j,b8 as k,W as C,o as B}from"./index-E3_P6Fhz.js";import{_ as W}from"./definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js";const F=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const a=s,f=C(),c=(e,t)=>h(e,{...O(f),...t}),n=g(),o=n.kind==="form"&&n.parent?n.parent:n,u=j(),m=k((e,t,r)=>{if(Array.isArray(e[t])&&Array.isArray(r))return e[t]=r,!0});function i(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return i(e)&&i(t)?m({...t},e):t}const d=A(()=>y(c(a.config.expression),e=>{for(const t of Object.keys(e)){const r=p(o.getAt(t),e[t]);o.setAt(t,r)}return b(u,a.config.onSuccess,c)}));return(e,t)=>(B(),S(W,{"action-id":s.buttonId,effect:_(d)},null,8,["action-id","effect"]))}});export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,a6 as u,aT as p,aU as d,aO as l,b9 as m,a9 as g,c as x,b as h,O as E,U as _,aS as b,o as B,W as k}from"./index-
|
|
1
|
+
import{d as f,a6 as u,aT as p,aU as d,aO as l,b9 as m,a9 as g,c as x,b as h,O as E,U as _,aS as b,o as B,W as k}from"./index-E3_P6Fhz.js";import{_ as C}from"./definition.vue_vue_type_script_setup_true_lang-v2AaUd8i.js";const w=f({name:"ShwfedHttpRequestBatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(n){const e=n,{locale:a}=u(),c=k(),s=(t,o)=>E(t,{..._(c),...o}),i=b(),r=p(()=>d(l(i,e.config.before,s),()=>m(e.config.expression,s,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,continueOnError:e.config.continueOnError,markdown:g(e.config.markdown,a.value)??""})));return(t,o)=>(B(),x(C,{"action-id":n.buttonId,effect:h(r)},null,8,["action-id","effect"]))}});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,D as l,E as d}from"./index-
|
|
1
|
+
import{C as o,D as l,E as d}from"./index-E3_P6Fhz.js";function i(n){switch(n._tag){case"TypeLiteral":return n;case"Transformation":return i(n.to);case"Refinement":return i(n.from);case"Suspend":return i(n.f());default:return null}}function p(n,t){const e=i(n.ast);return e?e.propertySignatures.find(r=>r.name===t)??null:null}function y(n){const t=n.type;if(t._tag==="Union"&&n.isOptional){const e=t.types.find(r=>r._tag!=="UndefinedKeyword");if(e)return e}return t}function c(n,t,e){const r=p(n,t);if(!r)return;const u=e(r);if(o(u))return u.value;const f=y(r),s=e(f);if(o(s))return s.value;if(f!==r.type){const a=e(r.type);if(o(a))return a.value}}function m(n,t){return c(n,t,l)}function v(n,t){return c(n,t,d)}export{v as a,m as g};
|
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-E3_P6Fhz.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-ButPJaOR.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="app"></div>
|
|
@@ -197,6 +197,12 @@ const { planeRef, coordinate, bgStyle, isDragging: isPanning } = useInfinitePlan
|
|
|
197
197
|
gap: CANVAS_STEP_PX,
|
|
198
198
|
enabled: isSpaceHeld
|
|
199
199
|
});
|
|
200
|
+
function onCanvasWheel(e) {
|
|
201
|
+
if (e.target?.closest(".inline-config-pane")) return;
|
|
202
|
+
e.preventDefault();
|
|
203
|
+
const [dx, dy] = e.shiftKey && e.deltaX === 0 ? [e.deltaY, 0] : [e.deltaX, e.deltaY];
|
|
204
|
+
coordinate.value = { x: coordinate.value.x - dx, y: coordinate.value.y - dy };
|
|
205
|
+
}
|
|
200
206
|
onMounted(() => recenterSoon());
|
|
201
207
|
function recenter() {
|
|
202
208
|
const el = planeRef.value;
|
|
@@ -919,6 +925,7 @@ function onCanvasKeydown(e) {
|
|
|
919
925
|
class="overflow-hidden border border-zinc-200 bg-zinc-50 select-none outline-none"
|
|
920
926
|
:class="isFullscreen ? 'fixed inset-0 z-40 h-screen w-screen' : 'relative h-full rounded'"
|
|
921
927
|
@keydown="onCanvasKeydown"
|
|
928
|
+
@wheel="onCanvasWheel"
|
|
922
929
|
>
|
|
923
930
|
<ContextMenu>
|
|
924
931
|
<ContextMenuTrigger as-child>
|
|
@@ -1447,6 +1454,7 @@ function onCanvasKeydown(e) {
|
|
|
1447
1454
|
v-for="entry in props.pickerEntries"
|
|
1448
1455
|
:key="`new:${entry.type}@${entry.compatibilityDate}`"
|
|
1449
1456
|
:value="`new:${entry.type}@${entry.compatibilityDate}`"
|
|
1457
|
+
:keywords="entry.type"
|
|
1450
1458
|
@select="emitAddNew(entry)"
|
|
1451
1459
|
>
|
|
1452
1460
|
<Icon
|
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>
|