@shwfed/config 2.4.1 → 2.5.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 +87 -24
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-Q86AhjHq.js → config-BkytEQN5.js} +1 -1
- package/dist/preview/assets/{config-EKVeWrbS.js → config-CK011_jJ.js} +1 -1
- package/dist/preview/assets/{config-ByTxMBcK.js → config-C_bBX0wD.js} +1 -1
- package/dist/preview/assets/{config-DiwVK32V.js → config-Cbn8o9BY.js} +1 -1
- package/dist/preview/assets/{config-BovRv7Mw.js → config-DYL6kHr3.js} +1 -1
- package/dist/preview/assets/{config-C7xYpB3N.js → config-Dx0zHfGt.js} +1 -1
- package/dist/preview/assets/{config-D50Rl2n_.js → config-E-DM6b5t.js} +1 -1
- package/dist/preview/assets/{config-Ch5dL5lp.js → config-PjseWUbC.js} +1 -1
- package/dist/preview/assets/{config-CH9wsYX8.js → config-dwcdYHd4.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js → definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js} +1 -1
- package/dist/preview/assets/{index-65eB1l4r.css → index-7MVXgV5n.css} +1 -1
- package/dist/preview/assets/index-CmPiZG_4.js +1 -0
- package/dist/preview/assets/index-x-77enex.js +668 -0
- package/dist/preview/assets/{runtime-Ch3JIgUQ.js → runtime-BRMGkqSr.js} +1 -1
- package/dist/preview/assets/{runtime-BwR_BbTu.js → runtime-CHLboM_z.js} +1 -1
- package/dist/preview/assets/{runtime-BQSwNpLC.js → runtime-CeHdesjP.js} +1 -1
- package/dist/preview/assets/{runtime-D34aQN00.js → runtime-D4_9FCLy.js} +1 -1
- package/dist/preview/assets/{runtime-aPt-bW3F.js → runtime-DHBTDws7.js} +1 -1
- package/dist/preview/assets/{runtime-a9TOQRwD.js → runtime-DJHpCLnr.js} +1 -1
- package/dist/preview/assets/{runtime-Cunk4vOs.js → runtime-DKq86fZU.js} +1 -1
- package/dist/preview/assets/{runtime-CjvZcU7X.js → runtime-DjpjaNec.js} +1 -1
- package/dist/preview/assets/{runtime-BP7zXnyG.js → runtime-ZQryOEKm.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -1
- package/dist/runtime/components/form/index.vue +5 -18
- package/dist/runtime/components/form/schema.d.ts +2 -10
- package/dist/runtime/components/form/schema.js +2 -5
- package/dist/runtime/components/form/utils/cel-scope.d.ts +12 -3
- package/dist/runtime/components/form/utils/cel-scope.js +17 -18
- package/dist/runtime/components/form/utils/form-vars.d.ts +19 -0
- package/dist/runtime/components/form/utils/form-vars.js +5 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/config.vue +20 -45
- package/dist/runtime/components/table/index.vue +22 -2
- package/dist/runtime/components/table/schema.d.ts +4 -2
- package/dist/runtime/components/table/schema.js +69 -13
- package/dist/runtime/components/table/utils/shared.d.ts +2 -0
- package/dist/runtime/components/table/utils/shared.js +10 -2
- package/package.json +1 -1
- package/dist/preview/assets/index-CIrlYN0M.js +0 -1
- package/dist/preview/assets/index-DUDlWaQI.js +0 -661
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as s}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";import{d as c,aq as o,aE as i,e as r,u as f,ap as u,o as p}from"./index-x-77enex.js";const g=c({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=o(()=>i(t,n.config.triggers));return(m,d)=>(p(),r(s,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,aq as f,as as r,au as u,e as d,u as m,al as l,am as p,ao as _,o as g}from"./index-
|
|
1
|
+
import{d as i,aq as f,as as r,au as u,e as d,u as m,al as l,am as p,ao as _,o as g}from"./index-x-77enex.js";import{_ as h}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const B=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=>u(()=>{window.open(n,t.config.mode)})));return(n,a)=>(g(),d(h,{"action-id":e.buttonId,effect:m(s)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,ae as i,e as l,u as p,$ as m,o as d,k as f,ah as _,ai as k,al as w,am as x,ao as g}from"./index-
|
|
1
|
+
import{d as u,ae as i,e as l,u as p,$ as m,o as d,k as f,ah as _,ai as k,al as w,am as x,ao as g}from"./index-x-77enex.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(n){const o=n,{locale:s}=i(),t=g(),c=(e,a)=>w(e,{...x(t),...a}),r=m(()=>{const e=_(o.config.content,s.value)??"";return k(e,c)});return(e,a)=>(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 s,ae as p,av as x,af as M,ah as c,aw as T,ax as N,e as b,w as d,u,a0 as k,a1 as w,ap as L,au as S,o as A,f as I,ay as z,g as f,az as F,aA as H,a7 as V,ao as $,aB as r,aC as m,aD as j}from"./index-
|
|
1
|
+
import{d as s,ae as p,av as x,af as M,ah as c,aw as T,ax as N,e as b,w as d,u,a0 as k,a1 as w,ap as L,au as S,o as A,f as I,ay as z,g as f,az as F,aA as H,a7 as V,ao as $,aB as r,aC as m,aD as j}from"./index-x-77enex.js";import{_ as K}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const D=s({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(t){const n=t,{locale:l}=p(),v=e=>{},h=$(),i=w(r,void 0),g=L(),o=k(null),C=x(n.buttonId,{close:()=>S(()=>{o.value?.()})},g),y=s({name:"ModalBoundaryBridge",setup(e,{slots:a}){return H(h),m(j,C),i&&m(r,i),()=>a.default?.()}}),E=(e,a)=>V()?.(e,a),_=M(function*(){const e=c(n.config.modalTitle,l.value)??c(n.buttonTitle,l.value)??"",{modal:a,close:B}=yield*T({title:e,width:n.config.modalWidth});o.value=()=>N(B()),yield*a,o.value=null});return(e,a)=>(A(),b(K,{"action-id":t.buttonId,effect:u(_)},{default:d(()=>[I("div",{style:z(t.config.modalMinHeight?`min-height: ${t.config.modalMinHeight}`:void 0)},[f(u(y),null,{default:d(()=>[f(F,{"slot-value":t.config.slot,configure:v,"find-entry":E},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,ae as u,af as g,ag as m,ah as d,ai as p,aj as x,ak as k,e as E,u as _,al as h,am as w,an as C,ao as I,ap as j,o as v}from"./index-
|
|
1
|
+
import{d as l,ae as u,af as g,ag as m,ah as d,ai as p,aj as x,ak as k,e as E,u as _,al as h,am as w,an as C,ao as I,ap as j,o as v}from"./index-x-77enex.js";import{_ as y}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const q=l({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const e=s,{locale:c}=u(),i=I(),t=(n,o)=>h(n,{...w(i),...o}),r=j(),a=C(),f=g(function*(){if(a&&!(yield*m(()=>a())))return;const n=d(e.config.markdown,c.value)??"",o=p(n,t);(yield*x({content:o,icon:e.config.icon,color:e.config.color}))||(yield*k(e.config.expression,t,{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}}))});return(n,o)=>(v(),E(y,{"action-id":s.buttonId,effect:_(f)},null,8,["action-id","effect"]))}});export{q 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-uJFJXxli.js";import{d as n,e as a,u as c,o as f,at as i}from"./index-x-77enex.js";const _=n({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),a(o,{"action-id":t.buttonId,effect:c(e)},null,8,["action-id","effect"]))}});export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,aH as g,aq as A,as as y,aE as _,e as h,u as S,al as b,am as j,ap as k,aI as C,o as B,ao as E}from"./index-
|
|
1
|
+
import{d as l,aH as g,aq as A,as as y,aE as _,e as h,u as S,al as b,am as j,ap as k,aI as C,o as B,ao as E}from"./index-x-77enex.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const F=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=E(),f=(e,t)=>b(e,{...j(i),...t}),n=g(),o=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 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)=>(B(),h(I,{"action-id":r.buttonId,effect:S(d)},null,8,["action-id","effect"]))}});export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as E,aq as _,af as S,au as r,aE as m,aF as j,aG as v,e as x,u as B,al as L,am as b,ap as k,ao as C,o as R}from"./index-
|
|
1
|
+
import{d as E,aq as _,af as S,au as r,aE as m,aF as j,aG as v,e as x,u as B,al as L,am as b,ap as k,ao as C,o as R}from"./index-x-77enex.js";import{_ as T}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const O=E({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>L(e,{...b(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)}const a={json:yield*u.json()},i=o===void 0?"success":yield*j(t(o,a),s=>p.has(s)?s:"success");if(n!==void 0){const s=yield*t(n,a);yield*r(()=>v[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(),x(T,{"action-id":d.buttonId,effect:B(y)},null,8,["action-id","effect"]))}});export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,aq as p,ag as g,ar as a,as as m,ak as l,e as d,u as x,al as E,am as _,an as h,ao as C,ap as k,o as q}from"./index-
|
|
1
|
+
import{d as u,aq as p,ag as g,ar as a,as as m,ak as l,e as d,u as x,al as E,am as _,an as h,ao as C,ap as k,o as q}from"./index-x-77enex.js";import{_ as v}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const R=u({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(o){const e=o,c=C(),i=(n,s)=>E(n,{..._(c),...s}),r=k(),t=h(),f=p(()=>{const n=t?g(()=>t()):a(!0);return m(n,s=>s?l(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)=>(q(),d(v,{"action-id":o.buttonId,effect:x(f)},null,8,["action-id","effect"]))}});export{R 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-x-77enex.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-7MVXgV5n.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="app"></div>
|
|
@@ -217,9 +217,9 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
217
217
|
default: () => never[];
|
|
218
218
|
}>;
|
|
219
219
|
dataSource: Schema.optional<Schema.Struct<{
|
|
220
|
-
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
221
220
|
request: Schema.optional<Schema.Schema<string, string, never>>;
|
|
222
221
|
data: Schema.Schema<string, string, never>;
|
|
222
|
+
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
223
223
|
}>>;
|
|
224
224
|
actions: Schema.optional<Schema.Struct<{
|
|
225
225
|
size: Schema.optionalWith<Schema.Literal<["default", "sm", "xs"]>, {
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
provideCELContext
|
|
11
11
|
} from "../../utils/cel-context";
|
|
12
12
|
import FormUnitRenderer from "./FormUnitRenderer.vue";
|
|
13
|
+
import { buildFormRuntimeScope } from "./utils/cel-scope";
|
|
13
14
|
import { provideCommitBus } from "./utils/commit-bus";
|
|
14
15
|
import { provideDerivedQuiescence, useDerived } from "./utils/derived";
|
|
15
16
|
import { useFormHistory } from "./utils/history";
|
|
@@ -27,24 +28,10 @@ const props = defineProps({
|
|
|
27
28
|
const configure = props.configure ?? (() => {
|
|
28
29
|
});
|
|
29
30
|
void configure;
|
|
30
|
-
provideCELContext({
|
|
31
|
-
form: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
description: "\u5F53\u524D\u8868\u5355\u72B6\u6001",
|
|
35
|
-
value: () => state.value ?? {}
|
|
36
|
-
},
|
|
37
|
-
// Same thunk pattern: `now` stays live (fresh Date at click time, not at
|
|
38
|
-
// provide time). Must be a `TZDate`: CEL's type registry maps the `Date`
|
|
39
|
-
// type to the `TZDate` constructor exactly, so a plain `new Date()` fails
|
|
40
|
-
// the constructor lookup.
|
|
41
|
-
now: {
|
|
42
|
-
type: "Date",
|
|
43
|
-
label: "now",
|
|
44
|
-
description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4",
|
|
45
|
-
value: () => new TZDate()
|
|
46
|
-
}
|
|
47
|
-
});
|
|
31
|
+
provideCELContext(buildFormRuntimeScope({
|
|
32
|
+
form: () => state.value ?? {},
|
|
33
|
+
now: () => new TZDate()
|
|
34
|
+
}));
|
|
48
35
|
const inherited = injectCELContext();
|
|
49
36
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
50
37
|
const formState = provideFormState(state);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
2
|
import type { Environment } from '../../vendor/cel-js/lib/index.js';
|
|
3
3
|
import type { InitialSource } from './utils/initial.js';
|
|
4
|
+
import { registerFormVariablesIfAbsent } from './utils/form-vars.js';
|
|
4
5
|
import { type LayoutSetValue } from '../../share/layout.js';
|
|
5
6
|
export { commonFieldFields } from './utils/common.js';
|
|
6
7
|
export { getStructFieldTitle, getStructFieldDescription } from './utils/schema-meta.js';
|
|
@@ -69,16 +70,7 @@ export declare function FormUnit(configure: (env: Environment) => void): Schema.
|
|
|
69
70
|
}>;
|
|
70
71
|
}>>>;
|
|
71
72
|
}>>;
|
|
72
|
-
|
|
73
|
-
* Register the form-wide `now` / `form` live variables on `env`, skipping any
|
|
74
|
-
* already declared. Idempotent so it composes safely from either side: a
|
|
75
|
-
* `FormConfig` nested inside another (the `table` form field embeds a table
|
|
76
|
-
* whose `query` is its own sub-form, and the embedding `configure` advertises
|
|
77
|
-
* the same pair) would otherwise register `form` twice on one env and the CEL
|
|
78
|
-
* registry throws `'form' is already registered`. Mirrors
|
|
79
|
-
* `registerRowVariablesIfAbsent`.
|
|
80
|
-
*/
|
|
81
|
-
export declare function registerFormVariablesIfAbsent(env: Environment): void;
|
|
73
|
+
export { registerFormVariablesIfAbsent };
|
|
82
74
|
export declare function FormConfig(configure: (env: Environment) => void): Schema.refine<{
|
|
83
75
|
readonly style?: string | undefined;
|
|
84
76
|
readonly initial?: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Expression } from "../../share/expression.js";
|
|
3
3
|
import { allFieldSchemas } from "./utils/resolve.js";
|
|
4
|
+
import { registerFormVariablesIfAbsent } from "./utils/form-vars.js";
|
|
4
5
|
import { md } from "../../share/markdown.js";
|
|
5
6
|
import {
|
|
6
7
|
LayoutSet,
|
|
@@ -37,11 +38,7 @@ export function FormUnit(configure) {
|
|
|
37
38
|
description: "\u4E00\u7EC4\u8868\u5355\u5B57\u6BB5\u53CA\u5176\u5E03\u5C40"
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
export
|
|
41
|
-
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
42
|
-
if (!declared.has("now")) env.registerVariable("now", "Date", { label: "\u5F53\u524D\u65F6\u95F4", description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4" });
|
|
43
|
-
if (!declared.has("form")) env.registerVariable("form", "dyn", { label: "\u8868\u5355\u503C", description: "\u5F53\u524D\u8868\u5355\u72B6\u6001" });
|
|
44
|
-
}
|
|
41
|
+
export { registerFormVariablesIfAbsent };
|
|
45
42
|
export function FormConfig(configure) {
|
|
46
43
|
const formConfigure = (env) => {
|
|
47
44
|
registerFormVariablesIfAbsent(env);
|
|
@@ -2,12 +2,21 @@ import { Environment } from '../../../vendor/cel-js/lib/index.js';
|
|
|
2
2
|
import type { CELContext } from '../../../utils/cel-context.js';
|
|
3
3
|
/**
|
|
4
4
|
* Builds the CEL variable scope advertised to a form's expression editors and
|
|
5
|
-
* AI assists.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* AI assists. Probes the form-wide `form` / `now` registrar
|
|
6
|
+
* (`registerFormVariablesIfAbsent` — the single source of truth, also feeding
|
|
7
|
+
* every field's expression validator) plus the host's `configure` to surface
|
|
8
|
+
* host-registered variables.
|
|
8
9
|
*
|
|
9
10
|
* Values are left `undefined` — this scope is for designer-time advertising
|
|
10
11
|
* and prompt rendering, never evaluation. Extracted from `form/config.vue` so
|
|
11
12
|
* the field-list AI button can reuse the exact same scope.
|
|
12
13
|
*/
|
|
13
14
|
export declare function buildFormCelScope(configure: (env: Environment) => void): CELContext;
|
|
15
|
+
/**
|
|
16
|
+
* Builds the runtime form-wide scope provided by `form/index.vue`. The `form` /
|
|
17
|
+
* `now` metadata (type/label/description) is probed from the same
|
|
18
|
+
* `registerFormVariablesIfAbsent` registrar as the designer scope above, so the
|
|
19
|
+
* two can't drift; `values` overlays the live evaluation thunks the designer
|
|
20
|
+
* scope leaves `undefined`, keyed by variable name.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildFormRuntimeScope(values: Record<string, () => unknown>): CELContext;
|
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
import { Environment } from "../../../vendor/cel-js/lib/index.js";
|
|
2
|
-
|
|
2
|
+
import { registerFormVariablesIfAbsent } from "./form-vars.js";
|
|
3
|
+
function probeCELContext(register) {
|
|
3
4
|
const probe = new Environment({ unlistedVariablesAreDyn: false });
|
|
4
5
|
const baseline = new Set(probe.getDefinitions().variables.map((v) => v.name));
|
|
5
|
-
|
|
6
|
-
const out = {
|
|
7
|
-
form: {
|
|
8
|
-
type: "dyn",
|
|
9
|
-
label: "\u8868\u5355\u503C",
|
|
10
|
-
description: "\u5F53\u524D\u8868\u5355\u72B6\u6001",
|
|
11
|
-
value: void 0
|
|
12
|
-
},
|
|
13
|
-
// Mirrors the runtime `now` binding in `form/index.vue`. Editors and
|
|
14
|
-
// prompts never evaluate, so we leave `value` undefined.
|
|
15
|
-
now: {
|
|
16
|
-
type: "Date",
|
|
17
|
-
label: "now",
|
|
18
|
-
description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4",
|
|
19
|
-
value: void 0
|
|
20
|
-
}
|
|
21
|
-
};
|
|
6
|
+
register(probe);
|
|
7
|
+
const out = {};
|
|
22
8
|
for (const v of probe.getDefinitions().variables) {
|
|
23
9
|
if (baseline.has(v.name)) continue;
|
|
24
10
|
out[v.name] = {
|
|
@@ -30,3 +16,16 @@ export function buildFormCelScope(configure) {
|
|
|
30
16
|
}
|
|
31
17
|
return out;
|
|
32
18
|
}
|
|
19
|
+
export function buildFormCelScope(configure) {
|
|
20
|
+
return probeCELContext((env) => {
|
|
21
|
+
registerFormVariablesIfAbsent(env);
|
|
22
|
+
configure(env);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export function buildFormRuntimeScope(values) {
|
|
26
|
+
const out = probeCELContext(registerFormVariablesIfAbsent);
|
|
27
|
+
for (const [name, value] of Object.entries(values)) {
|
|
28
|
+
if (out[name]) out[name].value = value;
|
|
29
|
+
}
|
|
30
|
+
return out;
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Environment } from '../../../vendor/cel-js/lib/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Register the form-wide `now` / `form` live variables on `env`, skipping any
|
|
4
|
+
* already declared. Idempotent so it composes safely from either side: a
|
|
5
|
+
* `FormConfig` nested inside another (the `table` form field embeds a table
|
|
6
|
+
* whose `query` is its own sub-form, and the embedding `configure` advertises
|
|
7
|
+
* the same pair) would otherwise register `form` twice on one env and the CEL
|
|
8
|
+
* registry throws `'form' is already registered`. Mirrors
|
|
9
|
+
* `registerRowVariablesIfAbsent`.
|
|
10
|
+
*
|
|
11
|
+
* This is the single source of truth for the `form` / `now` metadata: the
|
|
12
|
+
* schema's expression validators register it here, the designer-time picker
|
|
13
|
+
* probes it (`buildFormCelScope`), and the runtime scope derives its
|
|
14
|
+
* type/label/description from it too (`buildFormRuntimeScope`). Lives in this
|
|
15
|
+
* dependency-light module — not `schema.ts` — so the scope helpers can import it
|
|
16
|
+
* without pulling `utils/resolve` (and its `import.meta.glob`) into per-folder
|
|
17
|
+
* unit tests. `schema.ts` re-exports it for existing call sites.
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerFormVariablesIfAbsent(env: Environment): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function registerFormVariablesIfAbsent(env) {
|
|
2
|
+
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
3
|
+
if (!declared.has("now")) env.registerVariable("now", "Date", { label: "\u5F53\u524D\u65F6\u95F4", description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4" });
|
|
4
|
+
if (!declared.has("form")) env.registerVariable("form", "dyn", { label: "\u8868\u5355\u503C", description: "\u5F53\u524D\u8868\u5355\u72B6\u6001" });
|
|
5
|
+
}
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue
CHANGED
|
@@ -3,7 +3,6 @@ import { computed } from "vue";
|
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { format as formatDate } from "date-fns";
|
|
5
5
|
import { Input } from "../../../../ui/input";
|
|
6
|
-
import { Switch } from "../../../../ui/switch";
|
|
7
6
|
import { Separator } from "../../../../ui/separator";
|
|
8
7
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
9
8
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -199,14 +198,10 @@ const dateFormatExample = computed(() => {
|
|
|
199
198
|
<Separator />
|
|
200
199
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
201
200
|
<Field
|
|
202
|
-
orientation="
|
|
203
|
-
class="w-
|
|
201
|
+
orientation="vertical"
|
|
202
|
+
class="w-full max-w-xs"
|
|
204
203
|
>
|
|
205
|
-
<
|
|
206
|
-
:model-value="value.enableSorting ?? false"
|
|
207
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
208
|
-
/>
|
|
209
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
204
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
210
205
|
<template
|
|
211
206
|
v-if="fieldDescription('enableSorting')"
|
|
212
207
|
#tooltip
|
|
@@ -219,6 +214,23 @@ const dateFormatExample = computed(() => {
|
|
|
219
214
|
</template>
|
|
220
215
|
{{ fieldTitle("enableSorting") }}
|
|
221
216
|
</FieldLabel>
|
|
217
|
+
<InputGroup>
|
|
218
|
+
<InputGroupInput
|
|
219
|
+
:model-value="value.sortKey"
|
|
220
|
+
placeholder="例:created_at"
|
|
221
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
222
|
+
/>
|
|
223
|
+
<InputGroupAddon align="inline-end">
|
|
224
|
+
<InputGroupButton
|
|
225
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
226
|
+
size="xs"
|
|
227
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
228
|
+
>
|
|
229
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
230
|
+
{{ fieldTitle("enableSorting") }}
|
|
231
|
+
</InputGroupButton>
|
|
232
|
+
</InputGroupAddon>
|
|
233
|
+
</InputGroup>
|
|
222
234
|
</Field>
|
|
223
235
|
</div>
|
|
224
236
|
</div>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
22
22
|
}>]>;
|
|
23
23
|
accessor: Schema.Schema<string, string, never>;
|
|
24
24
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
25
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
25
26
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
26
27
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
27
28
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -189,14 +188,10 @@ const ROW_VARS = {
|
|
|
189
188
|
<Separator />
|
|
190
189
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
191
190
|
<Field
|
|
192
|
-
orientation="
|
|
193
|
-
class="w-
|
|
191
|
+
orientation="vertical"
|
|
192
|
+
class="w-full max-w-xs"
|
|
194
193
|
>
|
|
195
|
-
<
|
|
196
|
-
:model-value="value.enableSorting ?? false"
|
|
197
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
198
|
-
/>
|
|
199
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
194
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
200
195
|
<template
|
|
201
196
|
v-if="fieldDescription('enableSorting')"
|
|
202
197
|
#tooltip
|
|
@@ -209,6 +204,23 @@ const ROW_VARS = {
|
|
|
209
204
|
</template>
|
|
210
205
|
{{ fieldTitle("enableSorting") }}
|
|
211
206
|
</FieldLabel>
|
|
207
|
+
<InputGroup>
|
|
208
|
+
<InputGroupInput
|
|
209
|
+
:model-value="value.sortKey"
|
|
210
|
+
placeholder="例:created_at"
|
|
211
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
212
|
+
/>
|
|
213
|
+
<InputGroupAddon align="inline-end">
|
|
214
|
+
<InputGroupButton
|
|
215
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
216
|
+
size="xs"
|
|
217
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
218
|
+
>
|
|
219
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
220
|
+
{{ fieldTitle("enableSorting") }}
|
|
221
|
+
</InputGroupButton>
|
|
222
|
+
</InputGroupAddon>
|
|
223
|
+
</InputGroup>
|
|
212
224
|
</Field>
|
|
213
225
|
</div>
|
|
214
226
|
</div>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
22
22
|
message: Schema.SchemaClass<string, string, never>;
|
|
23
23
|
}>]>;
|
|
24
24
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
25
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
25
26
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
26
27
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
27
28
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { Input } from "../../../../ui/input";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -267,14 +266,10 @@ function onPreserveDigitsChange(v) {
|
|
|
267
266
|
<Separator />
|
|
268
267
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
269
268
|
<Field
|
|
270
|
-
orientation="
|
|
271
|
-
class="w-
|
|
269
|
+
orientation="vertical"
|
|
270
|
+
class="w-full max-w-xs"
|
|
272
271
|
>
|
|
273
|
-
<
|
|
274
|
-
:model-value="value.enableSorting ?? false"
|
|
275
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
276
|
-
/>
|
|
277
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
272
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
278
273
|
<template
|
|
279
274
|
v-if="fieldDescription('enableSorting')"
|
|
280
275
|
#tooltip
|
|
@@ -287,6 +282,23 @@ function onPreserveDigitsChange(v) {
|
|
|
287
282
|
</template>
|
|
288
283
|
{{ fieldTitle("enableSorting") }}
|
|
289
284
|
</FieldLabel>
|
|
285
|
+
<InputGroup>
|
|
286
|
+
<InputGroupInput
|
|
287
|
+
:model-value="value.sortKey"
|
|
288
|
+
placeholder="例:created_at"
|
|
289
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
290
|
+
/>
|
|
291
|
+
<InputGroupAddon align="inline-end">
|
|
292
|
+
<InputGroupButton
|
|
293
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
294
|
+
size="xs"
|
|
295
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
296
|
+
>
|
|
297
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
298
|
+
{{ fieldTitle("enableSorting") }}
|
|
299
|
+
</InputGroupButton>
|
|
300
|
+
</InputGroupAddon>
|
|
301
|
+
</InputGroup>
|
|
290
302
|
</Field>
|
|
291
303
|
</div>
|
|
292
304
|
</div>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
26
26
|
}>]>;
|
|
27
27
|
accessor: Schema.Schema<string, string, never>;
|
|
28
28
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
29
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
29
30
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
30
31
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
31
32
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue
CHANGED
|
@@ -3,7 +3,6 @@ import { computed } from "vue";
|
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { Input } from "../../../../ui/input";
|
|
5
5
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
6
|
-
import { Switch } from "../../../../ui/switch";
|
|
7
6
|
import { Separator } from "../../../../ui/separator";
|
|
8
7
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
9
8
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -229,14 +228,10 @@ const copyExpressionModel = computed({
|
|
|
229
228
|
<Separator />
|
|
230
229
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
231
230
|
<Field
|
|
232
|
-
orientation="
|
|
233
|
-
class="w-
|
|
231
|
+
orientation="vertical"
|
|
232
|
+
class="w-full max-w-xs"
|
|
234
233
|
>
|
|
235
|
-
<
|
|
236
|
-
:model-value="value.enableSorting ?? false"
|
|
237
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
238
|
-
/>
|
|
239
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
234
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
240
235
|
<template
|
|
241
236
|
v-if="fieldDescription('enableSorting')"
|
|
242
237
|
#tooltip
|
|
@@ -249,6 +244,23 @@ const copyExpressionModel = computed({
|
|
|
249
244
|
</template>
|
|
250
245
|
{{ fieldTitle("enableSorting") }}
|
|
251
246
|
</FieldLabel>
|
|
247
|
+
<InputGroup>
|
|
248
|
+
<InputGroupInput
|
|
249
|
+
:model-value="value.sortKey"
|
|
250
|
+
placeholder="例:created_at"
|
|
251
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
252
|
+
/>
|
|
253
|
+
<InputGroupAddon align="inline-end">
|
|
254
|
+
<InputGroupButton
|
|
255
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
256
|
+
size="xs"
|
|
257
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
258
|
+
>
|
|
259
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
260
|
+
{{ fieldTitle("enableSorting") }}
|
|
261
|
+
</InputGroupButton>
|
|
262
|
+
</InputGroupAddon>
|
|
263
|
+
</InputGroup>
|
|
252
264
|
</Field>
|
|
253
265
|
</div>
|
|
254
266
|
</div>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
25
25
|
}>]>;
|
|
26
26
|
accessor: Schema.Schema<string, string, never>;
|
|
27
27
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
28
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
28
29
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
29
30
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
30
31
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -279,14 +278,10 @@ function updateTriggers(next) {
|
|
|
279
278
|
<Separator />
|
|
280
279
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
281
280
|
<Field
|
|
282
|
-
orientation="
|
|
283
|
-
class="w-
|
|
281
|
+
orientation="vertical"
|
|
282
|
+
class="w-full max-w-xs"
|
|
284
283
|
>
|
|
285
|
-
<
|
|
286
|
-
:model-value="value.enableSorting ?? false"
|
|
287
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
288
|
-
/>
|
|
289
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
284
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
290
285
|
<template
|
|
291
286
|
v-if="fieldDescription('enableSorting')"
|
|
292
287
|
#tooltip
|
|
@@ -299,6 +294,23 @@ function updateTriggers(next) {
|
|
|
299
294
|
</template>
|
|
300
295
|
{{ fieldTitle("enableSorting") }}
|
|
301
296
|
</FieldLabel>
|
|
297
|
+
<InputGroup>
|
|
298
|
+
<InputGroupInput
|
|
299
|
+
:model-value="value.sortKey"
|
|
300
|
+
placeholder="例:created_at"
|
|
301
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
302
|
+
/>
|
|
303
|
+
<InputGroupAddon align="inline-end">
|
|
304
|
+
<InputGroupButton
|
|
305
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
306
|
+
size="xs"
|
|
307
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
308
|
+
>
|
|
309
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
310
|
+
{{ fieldTitle("enableSorting") }}
|
|
311
|
+
</InputGroupButton>
|
|
312
|
+
</InputGroupAddon>
|
|
313
|
+
</InputGroup>
|
|
302
314
|
</Field>
|
|
303
315
|
</div>
|
|
304
316
|
</div>
|
package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
28
28
|
}>]>;
|
|
29
29
|
accessor: Schema.Schema<string, string, never>;
|
|
30
30
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
31
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
31
32
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
32
33
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
33
34
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -279,14 +278,10 @@ function updateTriggers(next) {
|
|
|
279
278
|
<Separator />
|
|
280
279
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
281
280
|
<Field
|
|
282
|
-
orientation="
|
|
283
|
-
class="w-
|
|
281
|
+
orientation="vertical"
|
|
282
|
+
class="w-full max-w-xs"
|
|
284
283
|
>
|
|
285
|
-
<
|
|
286
|
-
:model-value="value.enableSorting ?? false"
|
|
287
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
288
|
-
/>
|
|
289
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
284
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
290
285
|
<template
|
|
291
286
|
v-if="fieldDescription('enableSorting')"
|
|
292
287
|
#tooltip
|
|
@@ -299,6 +294,23 @@ function updateTriggers(next) {
|
|
|
299
294
|
</template>
|
|
300
295
|
{{ fieldTitle("enableSorting") }}
|
|
301
296
|
</FieldLabel>
|
|
297
|
+
<InputGroup>
|
|
298
|
+
<InputGroupInput
|
|
299
|
+
:model-value="value.sortKey"
|
|
300
|
+
placeholder="例:created_at"
|
|
301
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
302
|
+
/>
|
|
303
|
+
<InputGroupAddon align="inline-end">
|
|
304
|
+
<InputGroupButton
|
|
305
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
306
|
+
size="xs"
|
|
307
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
308
|
+
>
|
|
309
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
310
|
+
{{ fieldTitle("enableSorting") }}
|
|
311
|
+
</InputGroupButton>
|
|
312
|
+
</InputGroupAddon>
|
|
313
|
+
</InputGroup>
|
|
302
314
|
</Field>
|
|
303
315
|
</div>
|
|
304
316
|
</div>
|