@shwfed/config 2.7.8 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.mjs +36 -24
- package/dist/module.json +1 -1
- package/dist/preview/assets/{badge-KAEXz3VO.js → badge-BI1mdo92.js} +1 -1
- package/dist/preview/assets/{config-Bb9Yeh33.js → config-BNF2r9jW.js} +1 -1
- package/dist/preview/assets/{config-BXx5syNf.js → config-BxuGYvER.js} +1 -1
- package/dist/preview/assets/{config-DPlbFBRi.js → config-Cy5w3JWQ.js} +1 -1
- package/dist/preview/assets/{config-DbfJWa8K.js → config-DqUnpWZk.js} +1 -1
- package/dist/preview/assets/{config-CtbYlZCL.js → config-Du5SuNSb.js} +1 -1
- package/dist/preview/assets/{config-C-QRPeN1.js → config-DuzQXHvg.js} +1 -1
- package/dist/preview/assets/{config-ZczGik30.js → config-OrJljNWU.js} +1 -1
- package/dist/preview/assets/{config-DbirfZyy.js → config-XgVqueyq.js} +1 -1
- package/dist/preview/assets/{config-CkKx7sVR.js → config-ggyCcWNZ.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-CQ6MUPKO.js → definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js} +1 -1
- package/dist/preview/assets/{index-Bv_aA34a.js → index-BvLLQuQr.js} +1 -1
- package/dist/preview/assets/{index-C9P-6gZd.css → index-DsMR5NfK.css} +1 -1
- package/dist/preview/assets/{index-DUOkekYu.js → index-Yv78vz4W.js} +168 -168
- package/dist/preview/assets/index-yrBKwEfk.js +1 -0
- package/dist/preview/assets/{item-SC0WQMVu.js → item-DMtXi_cx.js} +1 -1
- package/dist/preview/assets/{runtime-CLaRFZzt.js → runtime-2S3Yr051.js} +1 -1
- package/dist/preview/assets/{runtime-EVgYW6_7.js → runtime-BUPuX-Gq.js} +1 -1
- package/dist/preview/assets/{runtime-CC2caFS9.js → runtime-C4jFTZ4Z.js} +1 -1
- package/dist/preview/assets/{runtime-DcStOiOi.js → runtime-CA58Mif7.js} +1 -1
- package/dist/preview/assets/{runtime-i32sR7d3.js → runtime-CWqQzWuc.js} +1 -1
- package/dist/preview/assets/{runtime-Ckuz5Kxm.js → runtime-CjJBU_e1.js} +1 -1
- package/dist/preview/assets/{runtime-BPOf7Yqz.js → runtime-DeUmGsM_.js} +1 -1
- package/dist/preview/assets/{runtime-CnKlH0mi.js → runtime-DnXoWy2A.js} +1 -1
- package/dist/preview/assets/{runtime-DO0anKbw.js → runtime-wVZ1xP8L.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/config.vue +2 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.d.ts +5 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.js +8 -3
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/runtime.vue +12 -1
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.js +3 -3
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +15 -25
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +11 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +4 -4
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +2 -0
- package/dist/runtime/components/form/index.vue +5 -1
- package/dist/runtime/components/form/utils/form-vars.js +2 -0
- 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/config.vue +30 -0
- package/dist/runtime/components/table/index.d.vue.ts +2 -0
- package/dist/runtime/components/table/index.vue +8 -0
- package/dist/runtime/components/table/index.vue.d.ts +2 -0
- package/dist/runtime/components/table/schema.d.ts +4 -0
- package/dist/runtime/components/table/schema.js +4 -0
- package/dist/runtime/share/use-persisted-query.d.ts +21 -0
- package/dist/runtime/share/use-persisted-query.js +33 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-CJFU9znN.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b2 as e}from"./index-Yv78vz4W.js";import{b3 as f,b4 as r,b5 as s}from"./index-Yv78vz4W.js";export{f as TableConfig,r as createTableConfig,e as default,s as getColumnTechnicalKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as q,u as B,o as O,w as y,a as M,c as E,n as T,b as V,r as x,e as o,g as z,f as A,h as s,i as J,j as L,p as P,l as U,k as W,m as D,q as g,s as G,t as h,v as H}from"./index-
|
|
1
|
+
import{d as q,u as B,o as O,w as y,a as M,c as E,n as T,b as V,r as x,e as o,g as z,f as A,h as s,i as J,j as L,p as P,l as U,k as W,m as D,q as g,s as G,t as h,v as H}from"./index-Yv78vz4W.js";import K from"./index-BvLLQuQr.js";const X=q({name:"ShwfedBlockAnimatedNumberItem",__name:"item",props:{item:{}},setup(b){const n=b,j=G(),a=x(void 0),m=x(0);function u(){return D(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=o(()=>a.value===void 0?g():H(a.value));function v(e){if(!e)return"";try{const t=h(s(e,{...u(),json:d.value}));return t==null?"":String(t)}catch{return""}}const w=o(()=>v(n.item.prefix)),_=o(()=>v(n.item.suffix));function C(e){if(e)try{const t=h(s(e,{...u(),json:d.value}));return t==null?void 0:typeof t=="string"||typeof t=="object"?t:String(t)}catch{return}}const F=o(()=>C(n.item.style));async function r(){const e=n.item.dataSource,t=u(),N=z(function*(){let i=g();e.request&&(i=yield*A(yield*s(e.request,t)));const k=yield*s(e.value,{...t,json:i});return{json:J(i),value:k}});try{const i=await L(P(N,U));a.value=i.json,m.value=S(i.value)}catch(i){console.warn("[shwfed-animated-number] fetch failed",i)}}const l=o(()=>(n.item.pollingInterval??0)>0),I=o(()=>Math.max(1,n.item.pollingInterval??1)*1e3),c=W(),{pause:p,resume:f}=B(()=>{r()},I,{immediate:!1});return O(()=>{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)=>(M(),E(V(K),{value:m.value,prefix:w.value,suffix:_.value,style:T(F.value)},null,8,["value","prefix","suffix","style"]))}});export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,G as u,g,aE as m,M as d,aF as p,aG as x,aH as E,c as _,b as h,h as k,m as w,aI as C,s as I,aJ as b,a as v}from"./index-
|
|
1
|
+
import{d as l,G as u,g,aE as m,M as d,aF as p,aG as x,aH as E,c as _,b as h,h as k,m as w,aI as C,s as I,aJ as b,a as v}from"./index-Yv78vz4W.js";import{_ as y}from"./definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js";const R=l({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const n=s,{locale:i}=u(),a=I(),t=(e,o)=>k(e,{...w(a),...o}),r=b(),c=C(),f=g(function*(){if(c&&!(yield*m(()=>c())))return;const e=d(n.config.markdown,i.value)??"",o=p(e,t);(yield*x({content:o,icon:n.config.icon,color:n.config.color}))||(yield*E(n.config.expression,t,{messageExpression:n.config.messageExpression,resultExpression:n.config.resultExpression,channel:r,triggers:{success:n.config.onSuccess,warning:n.config.onWarning,error:n.config.onError,info:n.config.onInfo}}))});return(e,o)=>(v(),_(y,{"action-id":s.buttonId,effect:h(f)},null,8,["action-id","effect"]))}});export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,G as i,c as l,b as p,e as m,a as d,J as f,M as _,aF as k,h as w,m as x,s as g}from"./index-
|
|
1
|
+
import{d as u,G as i,c as l,b as p,e as m,a as d,J as f,M as _,aF as k,h as w,m as x,s as g}from"./index-Yv78vz4W.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(n){const o=n,{locale:t}=i(),a=g(),c=(e,s)=>w(e,{...x(a),...s}),r=m(()=>{const e=_(o.config.content,t.value)??"";return k(e,c)});return(e,s)=>(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 u,aK as p,aE as m,aL as a,aM as g,aH as d,c as l,b as x,h as E,m as _,aI as h,s as C,aJ as I,a as b}from"./index-
|
|
1
|
+
import{d as u,aK as p,aE as m,aL as a,aM as g,aH as d,c as l,b as x,h as E,m as _,aI as h,s as C,aJ as I,a as b}from"./index-Yv78vz4W.js";import{_ as v}from"./definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js";const R=u({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=t,c=C(),i=(n,s)=>E(n,{..._(c),...s}),r=I(),o=h(),f=p(()=>{const n=o?m(()=>o()):a(!0);return g(n,s=>s?d(e.config.expression,i,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}):a(void 0))});return(n,s)=>(b(),l(v,{"action-id":t.buttonId,effect:x(f)},null,8,["action-id","effect"]))}});export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as _,aK as E,g as S,aQ as r,aV as m,aW as b,aX as j,c as v,b as x,h as B,m as L,aJ as k,s as C,a as R}from"./index-
|
|
1
|
+
import{d as _,aK as E,g as S,aQ as r,aV as m,aW as b,aX as j,c as v,b as x,h as B,m as L,aJ as k,s as C,a as R}from"./index-Yv78vz4W.js";import{_ as T}from"./definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js";const q=_({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=E(()=>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)}const a={json:yield*u.json()},i=o===void 0?"success":yield*b(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 w=yield*(yield*t(e.download,a)).file();yield*r(()=>f(w))}const h={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,h[i])}));return(e,n)=>(R(),v(T,{"action-id":d.buttonId,effect:x(y)},null,8,["action-id","effect"]))}});export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,aY as g,aK as A,aM as y,aV as h,c as _,b,h as S,m as j,aJ as k,aZ as C,a as B,s as O}from"./index-
|
|
1
|
+
import{d as l,aY as g,aK as A,aM as y,aV as h,c as _,b,h as S,m as j,aJ as k,aZ as C,a as B,s as O}from"./index-Yv78vz4W.js";import{_ as x}from"./definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js";const I=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=O(),f=(e,t)=>S(e,{...j(i),...t}),n=g(),c=n.kind==="form"&&n.parent?n.parent:n,u=k(),m=C((e,t,a)=>{if(Array.isArray(e[t])&&Array.isArray(a))return e[t]=a,!0});function o(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return o(e)&&o(t)?m({...t},e):t}const d=A(()=>y(f(s.config.expression),e=>{for(const t of Object.keys(e)){const a=p(c.getAt(t),e[t]);c.setAt(t,a)}return h(u,s.config.onSuccess)}));return(e,t)=>(B(),_(x,{"action-id":r.buttonId,effect:b(d)},null,8,["action-id","effect"]))}});export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,G as x,aO as M,g as T,M as c,aP as p,t as S,c as b,H as d,b as u,r as N,y as k,aJ as I,aQ as L,a as H,S as w,n as A,I as r,aR as F,aS as R,ax as V,s as $,aT as f,D as m,aU as j}from"./index-
|
|
1
|
+
import{d as i,G as x,aO as M,g as T,M as c,aP as p,t as S,c as b,H as d,b as u,r as N,y as k,aJ as I,aQ as L,a as H,S as w,n as A,I as r,aR as F,aS as R,ax as V,s as $,aT as f,D as m,aU as j}from"./index-Yv78vz4W.js";import{_ as z}from"./definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js";const Y=i({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(n){const a=n,{locale:l}=x(),v=e=>{},g=$(),s=k(f,void 0),h=I(),o=N(null),C=M(a.buttonId,{close:()=>L(()=>{o.value?.()})},h),y=i({name:"ModalBoundaryBridge",setup(e,{slots:t}){return R(g),m(j,C),s&&m(f,s),()=>t.default?.()}}),E=(e,t)=>V()?.(e,t),_=T(function*(){const e=c(a.config.modalTitle,l.value)??c(a.buttonTitle,l.value)??"",{modal:t,close:B}=yield*p({title:e,width:a.config.modalWidth});o.value=()=>S(B()),yield*t,o.value=null});return(e,t)=>(H(),b(z,{"action-id":n.buttonId,effect:u(_)},{default:d(()=>[w("div",{style:A(n.config.modalMinHeight?`min-height: ${n.config.modalMinHeight}`:void 0)},[r(u(y),null,{default:d(()=>[r(F,{"slot-value":n.config.slot,configure:v,"find-entry":E},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as n}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as n}from"./definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js";import{d as o,c as a,b as c,a as f,aN as i}from"./index-Yv78vz4W.js";const _=o({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),a(n,{"action-id":t.buttonId,effect:c(e)},null,8,["action-id","effect"]))}});export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as c}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as c}from"./definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js";import{d as s,aK as o,aV as i,c as r,b as f,aJ as u,a as m}from"./index-Yv78vz4W.js";const g=s({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=o(()=>i(t,n.config.triggers));return(p,d)=>(m(),r(c,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,aK as u,aM as l,aE as d,c as m,b as w,h as p,m as h,s as _,a as g}from"./index-
|
|
1
|
+
import{d as f,aK as u,aM as l,aE as d,c as m,b as w,h as p,m as h,s as _,a as g}from"./index-Yv78vz4W.js";import{_ as b}from"./definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js";function v(){return{resolve:e=>({href:new URL(e,window.location.href).href})}}function x(e,t){return window.location.assign(e),Promise.resolve()}const B=f({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=e,i=v(),a=_(),r=(n,o)=>p(n,{...h(a),...o});function c(n){try{return new URL(n,window.location.href).origin!==window.location.origin}catch{return!1}}const s=u(()=>l(r(t.config.url),n=>d(async()=>{const o=c(n);if(t.config.mode==="_blank"){window.open(o?n:i.resolve(n).href,"_blank");return}await x(n)})));return(n,o)=>(g(),m(b,{"action-id":e.buttonId,effect:w(s)},null,8,["action-id","effect"]))}});export{B 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-Yv78vz4W.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DsMR5NfK.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="app"></div>
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts
CHANGED
|
@@ -156,6 +156,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
156
156
|
readonly pageSizes?: readonly number[] | undefined;
|
|
157
157
|
readonly pageIndex?: number | undefined;
|
|
158
158
|
} | undefined;
|
|
159
|
+
readonly persistQuery?: boolean | undefined;
|
|
159
160
|
readonly initialState?: {
|
|
160
161
|
readonly expanded?: boolean | {
|
|
161
162
|
readonly [x: string]: boolean;
|
|
@@ -336,6 +337,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
336
337
|
readonly pageSizes?: readonly number[] | undefined;
|
|
337
338
|
readonly pageIndex?: number | undefined;
|
|
338
339
|
} | undefined;
|
|
340
|
+
readonly persistQuery?: boolean | undefined;
|
|
339
341
|
readonly initialState?: {
|
|
340
342
|
readonly expanded?: boolean | {
|
|
341
343
|
readonly [x: string]: boolean;
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts
CHANGED
|
@@ -156,6 +156,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
156
156
|
readonly pageSizes?: readonly number[] | undefined;
|
|
157
157
|
readonly pageIndex?: number | undefined;
|
|
158
158
|
} | undefined;
|
|
159
|
+
readonly persistQuery?: boolean | undefined;
|
|
159
160
|
readonly initialState?: {
|
|
160
161
|
readonly expanded?: boolean | {
|
|
161
162
|
readonly [x: string]: boolean;
|
|
@@ -336,6 +337,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
336
337
|
readonly pageSizes?: readonly number[] | undefined;
|
|
337
338
|
readonly pageIndex?: number | undefined;
|
|
338
339
|
} | undefined;
|
|
340
|
+
readonly persistQuery?: boolean | undefined;
|
|
339
341
|
readonly initialState?: {
|
|
340
342
|
readonly expanded?: boolean | {
|
|
341
343
|
readonly [x: string]: boolean;
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts
CHANGED
|
@@ -151,6 +151,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
151
151
|
readonly pageSizes?: readonly number[] | undefined;
|
|
152
152
|
readonly pageIndex?: number | undefined;
|
|
153
153
|
} | undefined;
|
|
154
|
+
readonly persistQuery?: boolean | undefined;
|
|
154
155
|
readonly initialState?: {
|
|
155
156
|
readonly expanded?: boolean | {
|
|
156
157
|
readonly [x: string]: boolean;
|
|
@@ -331,6 +332,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
331
332
|
readonly pageSizes?: readonly number[] | undefined;
|
|
332
333
|
readonly pageIndex?: number | undefined;
|
|
333
334
|
} | undefined;
|
|
335
|
+
readonly persistQuery?: boolean | undefined;
|
|
334
336
|
readonly initialState?: {
|
|
335
337
|
readonly expanded?: boolean | {
|
|
336
338
|
readonly [x: string]: boolean;
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts
CHANGED
|
@@ -151,6 +151,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
151
151
|
readonly pageSizes?: readonly number[] | undefined;
|
|
152
152
|
readonly pageIndex?: number | undefined;
|
|
153
153
|
} | undefined;
|
|
154
|
+
readonly persistQuery?: boolean | undefined;
|
|
154
155
|
readonly initialState?: {
|
|
155
156
|
readonly expanded?: boolean | {
|
|
156
157
|
readonly [x: string]: boolean;
|
|
@@ -331,6 +332,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
331
332
|
readonly pageSizes?: readonly number[] | undefined;
|
|
332
333
|
readonly pageIndex?: number | undefined;
|
|
333
334
|
} | undefined;
|
|
335
|
+
readonly persistQuery?: boolean | undefined;
|
|
334
336
|
readonly initialState?: {
|
|
335
337
|
readonly expanded?: boolean | {
|
|
336
338
|
readonly [x: string]: boolean;
|
|
@@ -166,6 +166,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
166
166
|
readonly pageSizes?: readonly number[] | undefined;
|
|
167
167
|
readonly pageIndex?: number | undefined;
|
|
168
168
|
} | undefined;
|
|
169
|
+
readonly persistQuery?: boolean | undefined;
|
|
169
170
|
readonly initialState?: {
|
|
170
171
|
readonly expanded?: boolean | {
|
|
171
172
|
readonly [x: string]: boolean;
|
|
@@ -447,6 +448,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
447
448
|
message: Schema.SchemaClass<string, string, never>;
|
|
448
449
|
}>]>>;
|
|
449
450
|
}>>;
|
|
451
|
+
persistQuery: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
450
452
|
initialState: Schema.optional<Schema.Struct<{
|
|
451
453
|
columnVisibility: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Boolean>>;
|
|
452
454
|
columnOrder: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
badgeSchema,
|
|
30
30
|
getStructFieldDescription,
|
|
31
31
|
getStructFieldTitle,
|
|
32
|
+
JSON_VAR,
|
|
32
33
|
schema
|
|
33
34
|
} from "./schema";
|
|
34
35
|
defineOptions({ name: "ShwfedBlockCardConfig" });
|
|
@@ -419,6 +420,7 @@ if (breadcrumbExt) {
|
|
|
419
420
|
:model-value="badge.show ?? ''"
|
|
420
421
|
placeholder="例:json.?data.?total.orValue(0) != 0"
|
|
421
422
|
result-type="bool"
|
|
423
|
+
:extra-vars="{ json: JSON_VAR }"
|
|
422
424
|
multiline
|
|
423
425
|
class="min-h-12"
|
|
424
426
|
@update:model-value="(v) => setBadgeShow(v)"
|
|
@@ -19,6 +19,11 @@ export declare const metadata: {
|
|
|
19
19
|
readonly max: number;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
export declare const JSON_VAR: {
|
|
23
|
+
readonly type: "optional<dyn>";
|
|
24
|
+
readonly label: "HTTP 响应体";
|
|
25
|
+
readonly description: "HTTP 响应体(配置了请求时为已解析 JSON,否则为 none)";
|
|
26
|
+
};
|
|
22
27
|
export declare const BADGE_VARIANTS: readonly ["default", "secondary", "destructive", "outline"];
|
|
23
28
|
/**
|
|
24
29
|
* The card's top-right badge: an optional HTTP datasource whose response feeds
|
|
@@ -10,10 +10,15 @@ export const metadata = {
|
|
|
10
10
|
w: { initial: 12, min: 4, max: Infinity },
|
|
11
11
|
h: { initial: 6, min: 4, max: Infinity }
|
|
12
12
|
};
|
|
13
|
+
export const JSON_VAR = {
|
|
14
|
+
type: "optional<dyn>",
|
|
15
|
+
label: "HTTP \u54CD\u5E94\u4F53",
|
|
16
|
+
description: "HTTP \u54CD\u5E94\u4F53\uFF08\u914D\u7F6E\u4E86\u8BF7\u6C42\u65F6\u4E3A\u5DF2\u89E3\u6790 JSON\uFF0C\u5426\u5219\u4E3A none\uFF09"
|
|
17
|
+
};
|
|
13
18
|
function registerJson(env) {
|
|
14
|
-
env.registerVariable("json",
|
|
15
|
-
label:
|
|
16
|
-
description:
|
|
19
|
+
env.registerVariable("json", JSON_VAR.type, {
|
|
20
|
+
label: JSON_VAR.label,
|
|
21
|
+
description: JSON_VAR.description
|
|
17
22
|
});
|
|
18
23
|
}
|
|
19
24
|
export const BADGE_VARIANTS = ["default", "secondary", "destructive", "outline"];
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/runtime.vue
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
5
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
4
6
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
5
7
|
import { Markdown } from "../../../../ui/markdown";
|
|
8
|
+
import { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
9
|
+
import { useFormState } from "../../../utils/state";
|
|
6
10
|
defineOptions({ name: "ShwfedMarkdownFieldRuntime" });
|
|
7
11
|
const props = defineProps({
|
|
8
12
|
fieldId: { type: String, required: true },
|
|
9
13
|
config: { type: null, required: true }
|
|
10
14
|
});
|
|
11
15
|
const { locale } = useI18n();
|
|
12
|
-
const
|
|
16
|
+
const { state } = useFormState();
|
|
17
|
+
const inherited = injectCELContext();
|
|
18
|
+
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
19
|
+
const source = computed(() => {
|
|
20
|
+
const template = getLocalizedText(props.config.content, locale.value) ?? "";
|
|
21
|
+
if (!template) return "";
|
|
22
|
+
return interpolateMarkdown(template, $cel, { form: state.value ?? {} });
|
|
23
|
+
});
|
|
13
24
|
</script>
|
|
14
25
|
|
|
15
26
|
<template>
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts
CHANGED
|
@@ -17,13 +17,19 @@ export declare const metadata: {
|
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
20
|
-
content: Schema.
|
|
20
|
+
content: Schema.refine<readonly [{
|
|
21
|
+
readonly locale: "zh";
|
|
22
|
+
readonly message: string;
|
|
23
|
+
}, ...{
|
|
24
|
+
readonly locale: "en" | "ja" | "ko";
|
|
25
|
+
readonly message: string;
|
|
26
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
21
27
|
locale: Schema.Literal<["zh"]>;
|
|
22
28
|
message: Schema.SchemaClass<string, string, never>;
|
|
23
29
|
}>], [Schema.Struct<{
|
|
24
30
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
25
31
|
message: Schema.SchemaClass<string, string, never>;
|
|
26
|
-
}>]
|
|
32
|
+
}>]>>;
|
|
27
33
|
id: Schema.refine<string, typeof Schema.String>;
|
|
28
34
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
29
35
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import { LocaleMarkdown } from "../../../../../share/expression.js";
|
|
3
3
|
import { commonFieldFields } from "../../../utils/common.js";
|
|
4
4
|
export const type = "com.shwfed.form.field.markdown";
|
|
5
5
|
export const compatibilityDate = "2026-04-22";
|
|
@@ -14,9 +14,9 @@ export function schema(configure) {
|
|
|
14
14
|
type: Schema.Literal(type),
|
|
15
15
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
16
16
|
...commonFieldFields(configure),
|
|
17
|
-
content:
|
|
17
|
+
content: LocaleMarkdown({ configure }).annotations({
|
|
18
18
|
title: "\u5185\u5BB9",
|
|
19
|
-
description: "\u6E32\u67D3\u4E3A Markdown \u7684\u591A\u8BED\u8A00\u6587\u672C"
|
|
19
|
+
description: "\u6E32\u67D3\u4E3A Markdown \u7684\u591A\u8BED\u8A00\u6587\u672C\uFF0C\u652F\u6301 `{{ \u8868\u8FBE\u5F0F }}` \u63D2\u503C"
|
|
20
20
|
})
|
|
21
21
|
}).annotations({
|
|
22
22
|
title: "MarkdownField",
|
|
@@ -24,7 +24,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
24
24
|
}[]] | undefined;
|
|
25
25
|
readonly required?: string | undefined;
|
|
26
26
|
readonly displayName?: string | undefined;
|
|
27
|
-
readonly rows?: number | undefined;
|
|
28
27
|
readonly compatibilityDate: "2026-04-22";
|
|
29
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
30
29
|
readonly placeholder?: readonly [{
|
|
@@ -51,6 +50,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
51
50
|
readonly warning?: boolean | undefined;
|
|
52
51
|
readonly when: string;
|
|
53
52
|
}[] | undefined;
|
|
53
|
+
readonly maxLength?: number | undefined;
|
|
54
54
|
}) => any;
|
|
55
55
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
56
56
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -74,7 +74,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
74
74
|
}[]] | undefined;
|
|
75
75
|
readonly required?: string | undefined;
|
|
76
76
|
readonly displayName?: string | undefined;
|
|
77
|
-
readonly rows?: number | undefined;
|
|
78
77
|
readonly compatibilityDate: "2026-04-22";
|
|
79
78
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
80
79
|
readonly placeholder?: readonly [{
|
|
@@ -101,6 +100,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
101
100
|
readonly warning?: boolean | undefined;
|
|
102
101
|
readonly when: string;
|
|
103
102
|
}[] | undefined;
|
|
103
|
+
readonly maxLength?: number | undefined;
|
|
104
104
|
}) => any) | undefined;
|
|
105
105
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
106
106
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue
CHANGED
|
@@ -4,7 +4,7 @@ import { Field, FieldLabel } from "../../../../ui/field";
|
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
5
|
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
6
6
|
import ValidationRulesField from "../../../ValidationRulesField.vue";
|
|
7
|
-
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
7
|
+
import { InputGroup, InputGroupInput, InputGroupNumberField } from "../../../../ui/input-group";
|
|
8
8
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
9
9
|
import { Markdown } from "../../../../ui/markdown";
|
|
10
10
|
import {
|
|
@@ -35,22 +35,14 @@ const pathText = computed({
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const n = Number(trimmed);
|
|
47
|
-
if (!Number.isFinite(n) || !Number.isInteger(n) || n <= 0) {
|
|
48
|
-
value.value = { ...value.value, rows: void 0 };
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
value.value = { ...value.value, rows: n };
|
|
38
|
+
function setMaxLength(v) {
|
|
39
|
+
if (v === void 0 || !(v > 0)) {
|
|
40
|
+
const { maxLength: _omit, ...rest } = value.value;
|
|
41
|
+
value.value = rest;
|
|
42
|
+
} else {
|
|
43
|
+
value.value = { ...value.value, maxLength: Math.round(v) };
|
|
52
44
|
}
|
|
53
|
-
}
|
|
45
|
+
}
|
|
54
46
|
</script>
|
|
55
47
|
|
|
56
48
|
<template>
|
|
@@ -203,24 +195,22 @@ const rowsText = computed({
|
|
|
203
195
|
<Field orientation="vertical">
|
|
204
196
|
<FieldLabel class="text-xs text-zinc-500">
|
|
205
197
|
<template
|
|
206
|
-
v-if="fieldDescription('
|
|
198
|
+
v-if="fieldDescription('maxLength')"
|
|
207
199
|
#tooltip
|
|
208
200
|
>
|
|
209
201
|
<Markdown
|
|
210
|
-
:source="fieldDescription('
|
|
202
|
+
:source="fieldDescription('maxLength')"
|
|
211
203
|
block
|
|
212
204
|
class="prose prose-sm prose-zinc"
|
|
213
205
|
/>
|
|
214
206
|
</template>
|
|
215
|
-
{{ fieldTitle("
|
|
207
|
+
{{ fieldTitle("maxLength") }}
|
|
216
208
|
</FieldLabel>
|
|
217
209
|
<InputGroup>
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
step="1"
|
|
223
|
-
placeholder="例:4"
|
|
210
|
+
<InputGroupNumberField
|
|
211
|
+
:model-value="value.maxLength"
|
|
212
|
+
:min="1"
|
|
213
|
+
@update:model-value="setMaxLength"
|
|
224
214
|
/>
|
|
225
215
|
</InputGroup>
|
|
226
216
|
</Field>
|
|
@@ -24,7 +24,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
24
24
|
}[]] | undefined;
|
|
25
25
|
readonly required?: string | undefined;
|
|
26
26
|
readonly displayName?: string | undefined;
|
|
27
|
-
readonly rows?: number | undefined;
|
|
28
27
|
readonly compatibilityDate: "2026-04-22";
|
|
29
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
30
29
|
readonly placeholder?: readonly [{
|
|
@@ -51,6 +50,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
51
50
|
readonly warning?: boolean | undefined;
|
|
52
51
|
readonly when: string;
|
|
53
52
|
}[] | undefined;
|
|
53
|
+
readonly maxLength?: number | undefined;
|
|
54
54
|
}) => any;
|
|
55
55
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
56
56
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -74,7 +74,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
74
74
|
}[]] | undefined;
|
|
75
75
|
readonly required?: string | undefined;
|
|
76
76
|
readonly displayName?: string | undefined;
|
|
77
|
-
readonly rows?: number | undefined;
|
|
78
77
|
readonly compatibilityDate: "2026-04-22";
|
|
79
78
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
80
79
|
readonly placeholder?: readonly [{
|
|
@@ -101,6 +100,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
101
100
|
readonly warning?: boolean | undefined;
|
|
102
101
|
readonly when: string;
|
|
103
102
|
}[] | undefined;
|
|
103
|
+
readonly maxLength?: number | undefined;
|
|
104
104
|
}) => any) | undefined;
|
|
105
105
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
106
106
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue
CHANGED
|
@@ -6,7 +6,7 @@ import { cel as _rawCel } from "../../../../../utils/cel";
|
|
|
6
6
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
7
7
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
8
8
|
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
9
|
-
import { InputGroup, InputGroupTextarea } from "../../../../ui/input-group";
|
|
9
|
+
import { InputGroup, InputGroupAddon, InputGroupText, InputGroupTextarea } from "../../../../ui/input-group";
|
|
10
10
|
import { Markdown } from "../../../../ui/markdown";
|
|
11
11
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
12
12
|
import { useFieldValue } from "../../../utils/field-value";
|
|
@@ -29,6 +29,7 @@ const placeholderText = computed(
|
|
|
29
29
|
const tooltipText = computed(
|
|
30
30
|
() => props.config.tooltip ? getLocalizedText(props.config.tooltip, locale.value) : void 0
|
|
31
31
|
);
|
|
32
|
+
const maxLength = computed(() => props.config.maxLength);
|
|
32
33
|
function evalBool(expression, label) {
|
|
33
34
|
if (!expression) return false;
|
|
34
35
|
try {
|
|
@@ -94,9 +95,17 @@ const { isRequired, errors, warnings, visible } = useFieldValidation({
|
|
|
94
95
|
v-model="draft"
|
|
95
96
|
:placeholder="placeholderText"
|
|
96
97
|
:disabled="isDisabled"
|
|
97
|
-
:
|
|
98
|
+
:maxlength="maxLength"
|
|
98
99
|
@blur="commit"
|
|
99
100
|
/>
|
|
101
|
+
<InputGroupAddon
|
|
102
|
+
v-if="maxLength != null"
|
|
103
|
+
align="block-end"
|
|
104
|
+
>
|
|
105
|
+
<InputGroupText class="tabular-nums">
|
|
106
|
+
{{ draft.length }} / {{ maxLength }}
|
|
107
|
+
</InputGroupText>
|
|
108
|
+
</InputGroupAddon>
|
|
100
109
|
</InputGroup>
|
|
101
110
|
<FieldMessages
|
|
102
111
|
v-if="visible"
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts
CHANGED
|
@@ -40,10 +40,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
40
40
|
message: Schema.SchemaClass<string, string, never>;
|
|
41
41
|
}>]>>;
|
|
42
42
|
orientation: Schema.optional<Schema.Literal<["vertical", "floating"]>>;
|
|
43
|
-
rows: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
44
43
|
binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
45
44
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
46
45
|
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
46
|
+
maxLength: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
47
47
|
derived: Schema.optional<Schema.Struct<{
|
|
48
48
|
mode: Schema.Literal<["formula", "prefill"]>;
|
|
49
49
|
expression: Schema.Schema<string, string, never>;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js
CHANGED
|
@@ -29,10 +29,6 @@ export function schema(configure) {
|
|
|
29
29
|
description: "\u9F20\u6807\u60AC\u505C\u5728\u6807\u7B7E\u4E0A\u65F6\u5C55\u793A\u7684\u8BF4\u660E"
|
|
30
30
|
})),
|
|
31
31
|
orientation: Schema.optional(FieldOrientationSchema),
|
|
32
|
-
rows: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.positive()).annotations({
|
|
33
|
-
title: "\u884C\u6570",
|
|
34
|
-
description: "\u8F93\u5165\u6846\u7684\u521D\u59CB\u53EF\u89C1\u884C\u6570\uFF1B\u7559\u7A7A\u4F7F\u7528\u9ED8\u8BA4\u9AD8\u5EA6"
|
|
35
|
-
})),
|
|
36
32
|
binding: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
37
33
|
title: "\u7ED1\u5B9A\u8DEF\u5F84",
|
|
38
34
|
description: "\u5199\u5165\u8868\u5355\u72B6\u6001\u7684 `dot-prop` \u8DEF\u5F84\uFF0C\u4F8B\u5982 `user.bio`\uFF1B\u7559\u7A7A\u5219\u4E3A\u975E\u53D7\u63A7\u5B57\u6BB5\uFF0C\u4E0D\u5199\u5165\u8868\u5355\u72B6\u6001"
|
|
@@ -45,6 +41,10 @@ export function schema(configure) {
|
|
|
45
41
|
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
46
42
|
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
|
|
47
43
|
})),
|
|
44
|
+
maxLength: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.positive()).annotations({
|
|
45
|
+
title: "\u5B57\u6570\u9650\u5236",
|
|
46
|
+
description: "\u5141\u8BB8\u8F93\u5165\u7684\u6700\u5927\u5B57\u7B26\u6570\uFF1B\u8FBE\u5230\u4E0A\u9650\u540E\u65E0\u6CD5\u7EE7\u7EED\u8F93\u5165\uFF0C\u5E76\u5728\u53F3\u4E0B\u89D2\u5C55\u793A\u5B57\u6570\u8BA1\u6570"
|
|
47
|
+
})),
|
|
48
48
|
derived: derivedField(configure, "string")
|
|
49
49
|
}).annotations({
|
|
50
50
|
title: "TextareaField",
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
30
30
|
cellStyle?: string;
|
|
31
31
|
style?: string;
|
|
32
32
|
pagination?: import("effect/Schema").Schema.Type<typeof import("../../../../table/schema.js").Pagination>;
|
|
33
|
+
persistQuery?: boolean;
|
|
33
34
|
initialState?: import("effect/Schema").Schema.Type<import("effect/Schema").Struct<{
|
|
34
35
|
columnVisibility: import("effect/Schema").optional<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Boolean>>;
|
|
35
36
|
columnOrder: import("effect/Schema").optional<import("effect/Schema").Array$<typeof import("effect/Schema").String>>;
|
|
@@ -105,6 +106,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
105
106
|
cellStyle?: string;
|
|
106
107
|
style?: string;
|
|
107
108
|
pagination?: import("effect/Schema").Schema.Type<typeof import("../../../../table/schema.js").Pagination>;
|
|
109
|
+
persistQuery?: boolean;
|
|
108
110
|
initialState?: import("effect/Schema").Schema.Type<import("effect/Schema").Struct<{
|
|
109
111
|
columnVisibility: import("effect/Schema").optional<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Boolean>>;
|
|
110
112
|
columnOrder: import("effect/Schema").optional<import("effect/Schema").Array$<typeof import("effect/Schema").String>>;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
30
30
|
cellStyle?: string;
|
|
31
31
|
style?: string;
|
|
32
32
|
pagination?: import("effect/Schema").Schema.Type<typeof import("../../../../table/schema.js").Pagination>;
|
|
33
|
+
persistQuery?: boolean;
|
|
33
34
|
initialState?: import("effect/Schema").Schema.Type<import("effect/Schema").Struct<{
|
|
34
35
|
columnVisibility: import("effect/Schema").optional<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Boolean>>;
|
|
35
36
|
columnOrder: import("effect/Schema").optional<import("effect/Schema").Array$<typeof import("effect/Schema").String>>;
|
|
@@ -105,6 +106,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
105
106
|
cellStyle?: string;
|
|
106
107
|
style?: string;
|
|
107
108
|
pagination?: import("effect/Schema").Schema.Type<typeof import("../../../../table/schema.js").Pagination>;
|
|
109
|
+
persistQuery?: boolean;
|
|
108
110
|
initialState?: import("effect/Schema").Schema.Type<import("effect/Schema").Struct<{
|
|
109
111
|
columnVisibility: import("effect/Schema").optional<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Boolean>>;
|
|
110
112
|
columnOrder: import("effect/Schema").optional<import("effect/Schema").Array$<typeof import("effect/Schema").String>>;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
47
47
|
cellStyle?: string;
|
|
48
48
|
style?: string;
|
|
49
49
|
pagination?: Schema.Schema.Type<typeof import("../../../../table/schema.js").Pagination>;
|
|
50
|
+
persistQuery?: boolean;
|
|
50
51
|
initialState?: Schema.Schema.Type<Schema.Struct<{
|
|
51
52
|
columnVisibility: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Boolean>>;
|
|
52
53
|
columnOrder: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
@@ -82,6 +83,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
82
83
|
cellStyle?: string;
|
|
83
84
|
style?: string;
|
|
84
85
|
pagination?: Schema.Schema.Type<typeof import("../../../../table/schema.js").Pagination>;
|
|
86
|
+
persistQuery?: boolean;
|
|
85
87
|
initialState?: Schema.Schema.Type<Schema.Struct<{
|
|
86
88
|
columnVisibility: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Boolean>>;
|
|
87
89
|
columnOrder: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
@@ -31,7 +31,11 @@ const configure = props.configure ?? (() => {
|
|
|
31
31
|
void configure;
|
|
32
32
|
provideCELContext(buildFormRuntimeScope({
|
|
33
33
|
form: () => state.value ?? {},
|
|
34
|
-
now: () => new TZDate()
|
|
34
|
+
now: () => new TZDate(),
|
|
35
|
+
// `formHistory` is created further down; these thunks are stored now and
|
|
36
|
+
// only called at eval time (long after setup), so reading it here is safe.
|
|
37
|
+
undoable: () => formHistory.canUndo.value,
|
|
38
|
+
redoable: () => formHistory.canRedo.value
|
|
35
39
|
}));
|
|
36
40
|
const inherited = injectCELContext();
|
|
37
41
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
@@ -2,4 +2,6 @@ export function registerFormVariablesIfAbsent(env) {
|
|
|
2
2
|
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
3
3
|
if (!declared.has("now")) env.registerVariable("now", "Date", { label: "\u5F53\u524D\u65F6\u95F4", description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4" });
|
|
4
4
|
if (!declared.has("form")) env.registerVariable("form", "dyn", { label: "\u8868\u5355\u503C", description: "\u5F53\u524D\u8868\u5355\u72B6\u6001" });
|
|
5
|
+
if (!declared.has("undoable")) env.registerVariable("undoable", "bool", { label: "\u53EF\u64A4\u9500", description: "\u5F53\u524D\u662F\u5426\u6709\u53EF\u64A4\u9500\u7684\u4FEE\u6539" });
|
|
6
|
+
if (!declared.has("redoable")) env.registerVariable("redoable", "bool", { label: "\u53EF\u91CD\u505A", description: "\u5F53\u524D\u662F\u5426\u6709\u53EF\u91CD\u505A\u7684\u4FEE\u6539" });
|
|
5
7
|
}
|
|
@@ -50,9 +50,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
50
50
|
readonly locale: "en" | "ja" | "ko";
|
|
51
51
|
readonly message: string;
|
|
52
52
|
}[]];
|
|
53
|
+
readonly successMessage?: string | undefined;
|
|
53
54
|
readonly accessor: string;
|
|
54
55
|
readonly sortKey?: string | undefined;
|
|
55
|
-
readonly successMessage?: string | undefined;
|
|
56
56
|
}) => any;
|
|
57
57
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
58
58
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -102,9 +102,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
102
102
|
readonly locale: "en" | "ja" | "ko";
|
|
103
103
|
readonly message: string;
|
|
104
104
|
}[]];
|
|
105
|
+
readonly successMessage?: string | undefined;
|
|
105
106
|
readonly accessor: string;
|
|
106
107
|
readonly sortKey?: string | undefined;
|
|
107
|
-
readonly successMessage?: string | undefined;
|
|
108
108
|
}) => any) | undefined;
|
|
109
109
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
110
110
|
declare const _default: typeof __VLS_export;
|