@shwfed/config 2.9.0 → 2.9.2
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 +5 -3
- package/dist/module.json +1 -1
- package/dist/preview/assets/{badge-Ddz0ExD-.js → badge-BfeJsmpt.js} +1 -1
- package/dist/preview/assets/{config-CUeBTyLb.js → config-0PaXoAiK.js} +1 -1
- package/dist/preview/assets/{config-5qIYVWZh.js → config-3Dav11rw.js} +1 -1
- package/dist/preview/assets/{config-DN_3WauN.js → config-BlpdrD6d.js} +1 -1
- package/dist/preview/assets/{config-vePqHFvZ.js → config-CHRzxGVx.js} +1 -1
- package/dist/preview/assets/{config-B8zbFg3y.js → config-CS-NMWcV.js} +1 -1
- package/dist/preview/assets/{config-q5VV9rp7.js → config-CTA1p6um.js} +1 -1
- package/dist/preview/assets/{config-Bn619USg.js → config-Cb6kwkJ7.js} +1 -1
- package/dist/preview/assets/{config---5_lEKG.js → config-CtENh936.js} +1 -1
- package/dist/preview/assets/{config-U-3fWb-2.js → config-zybwxOyV.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-fQa65UMX.js → definition.vue_vue_type_script_setup_true_lang-ClY17iVd.js} +1 -1
- package/dist/preview/assets/{index-CzWhSvDG.js → index-BZ2cMq0s.js} +1 -1
- package/dist/preview/assets/{index-BKaqQGb-.js → index-Bjjy6l1m.js} +9 -11
- package/dist/preview/assets/index-Cw2peSCr.js +1 -0
- package/dist/preview/assets/{item-DHarupON.js → item-BTENoFeS.js} +1 -1
- package/dist/preview/assets/{runtime-C2rQ3L3-.js → runtime-B3kAucV_.js} +1 -1
- package/dist/preview/assets/{runtime-DQHb9t0r.js → runtime-BWeksK7X.js} +1 -1
- package/dist/preview/assets/{runtime-CMsaNery.js → runtime-ByvaY-sA.js} +1 -1
- package/dist/preview/assets/{runtime-aLgWVLET.js → runtime-D8qWgTCC.js} +1 -1
- package/dist/preview/assets/{runtime-DOM_La4X.js → runtime-D9EdrQs6.js} +1 -1
- package/dist/preview/assets/{runtime-CKghL8I_.js → runtime-DCftiZTY.js} +1 -1
- package/dist/preview/assets/{runtime-Dgl3wVfD.js → runtime-DNEDM9BZ.js} +1 -1
- package/dist/preview/assets/{runtime-CMuCGJZm.js → runtime-Dpy_UDRy.js} +1 -1
- package/dist/preview/assets/{runtime-560tuaHv.js → runtime-yP47ki_o.js} +1 -1
- package/dist/preview/index.html +1 -1
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.vue +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +4 -4
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +4 -4
- package/dist/runtime/components/form/utils/common.js +1 -3
- package/dist/runtime/components/form/utils/derived.js +2 -1
- 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/vendor/cel-js/CLAUDE.md +2 -0
- package/dist/runtime/vendor/cel-js/PROMPT.md +8 -0
- package/dist/runtime/vendor/cel-js/lib/functions.js +4 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-Bj8xIK5h.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b1 as e}from"./index-Bjjy6l1m.js";import{b2 as f,b3 as r,b4 as s}from"./index-Bjjy6l1m.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-Bjjy6l1m.js";import K from"./index-BZ2cMq0s.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 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 I,y as N,aI as k,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 I,y as N,aI as k,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-Bjjy6l1m.js";import{_ as z}from"./definition.vue_vue_type_script_setup_true_lang-ClY17iVd.js";const Y=i({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(n){const a=n,{locale:l}=x(),v=e=>{},g=$(),s=N(f,void 0),h=k(),o=I(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{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-Bjjy6l1m.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 f,G as g,g as l,aE as u,M as d,aF as p,aG as m,aH as x,c as E,b as h,h as _,m as w,aI as C,s as I,a as b}from"./index-
|
|
1
|
+
import{d as f,G as g,g as l,aE as u,M as d,aF as p,aG as m,aH as x,c as E,b as h,h as _,m as w,aI as C,s as I,a as b}from"./index-Bjjy6l1m.js";import{_ as k}from"./definition.vue_vue_type_script_setup_true_lang-ClY17iVd.js";const H=f({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const n=s,{locale:i}=g(),a=I(),c=(e,o)=>_(e,{...w(a),...o}),t=C(),r=l(function*(){yield*u(t,n.config.before);const e=d(n.config.markdown,i.value)??"",o=p(e,c);(yield*m({content:o,icon:n.config.icon,color:n.config.color}))||(yield*x(n.config.expression,c,{messageExpression:n.config.messageExpression,resultExpression:n.config.resultExpression,channel:t,triggers:{success:n.config.onSuccess,warning:n.config.onWarning,error:n.config.onError,info:n.config.onInfo}}))});return(e,o)=>(b(),E(k,{"action-id":s.buttonId,effect:h(r)},null,8,["action-id","effect"]))}});export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,aX as g,aJ as A,aM as y,aE as h,c as _,b,h as S,m as j,aI as k,aY as C,a as B,s as E}from"./index-
|
|
1
|
+
import{d as l,aX as g,aJ as A,aM as y,aE as h,c as _,b,h as S,m as j,aI as k,aY as C,a as B,s as E}from"./index-Bjjy6l1m.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-ClY17iVd.js";const F=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=E(),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(),_(I,{"action-id":r.buttonId,effect:b(d)},null,8,["action-id","effect"]))}});export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,aJ as u,aM as l,aN 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,aJ as u,aM as l,aN as d,c as m,b as w,h as p,m as h,s as _,a as g}from"./index-Bjjy6l1m.js";import{_ as b}from"./definition.vue_vue_type_script_setup_true_lang-ClY17iVd.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};
|
|
@@ -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-ClY17iVd.js";import{d as o,c as a,b as c,a as f,aL as i}from"./index-Bjjy6l1m.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-ClY17iVd.js";import{d as s,aJ as o,aE as i,c as r,b as f,aI as u,a as m}from"./index-Bjjy6l1m.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 r,aJ as f,aK as u,aE as g,aH as p,c as m,b as d,h as l,m as x,aI as h,s as E,a as _}from"./index-
|
|
1
|
+
import{d as r,aJ as f,aK as u,aE as g,aH as p,c as m,b as d,h as l,m as x,aI as h,s as E,a as _}from"./index-Bjjy6l1m.js";import{_ as b}from"./definition.vue_vue_type_script_setup_true_lang-ClY17iVd.js";const B=r({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(n){const e=n,c=E(),a=(o,t)=>l(o,{...x(c),...t}),s=h(),i=f(()=>u(g(s,e.config.before),()=>p(e.config.expression,a,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:s,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}})));return(o,t)=>(_(),m(b,{"action-id":n.buttonId,effect:d(i)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as E,aJ as _,g as S,aQ as r,aE as m,aV as b,aW as j,c as v,b as x,h as B,m as L,aI as k,s as C,a as R}from"./index-
|
|
1
|
+
import{d as E,aJ as _,g as S,aQ as r,aE as m,aV as b,aW as j,c as v,b as x,h as B,m as L,aI as k,s as C,a as R}from"./index-Bjjy6l1m.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-ClY17iVd.js";const q=E({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>B(e,{...L(g),...n}),l=k(),p=new Set(["success","error","warning","info"]);function f(e){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=e.name,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(n)}const y=_(()=>S(function*(){const{template:e,messageExpression:n,resultExpression:o}=c.config,u=yield*t(e.request);if(!e.download){const s=yield*u.file();return yield*r(()=>f(s)),yield*m(l,c.config.onSuccess)}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(I,{"action-id":d.buttonId,effect:x(y)},null,8,["action-id","effect"]))}});export{q as default};
|
package/dist/preview/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
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-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-Bjjy6l1m.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-BlHAyQdm.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
@@ -424,17 +424,17 @@ const hoveredTooltip = computed(() => {
|
|
|
424
424
|
>
|
|
425
425
|
<div
|
|
426
426
|
data-slot="tree-combobox-multi-search"
|
|
427
|
-
class="flex h-
|
|
427
|
+
class="flex h-10 items-center gap-2 border-b border-zinc-200 px-3"
|
|
428
428
|
>
|
|
429
429
|
<Icon
|
|
430
430
|
icon="fluent:search-20-filled"
|
|
431
|
-
class="size-
|
|
431
|
+
class="size-4 shrink-0 opacity-50"
|
|
432
432
|
/>
|
|
433
433
|
<input
|
|
434
434
|
v-model="filterQuery"
|
|
435
435
|
:disabled="isDisabled"
|
|
436
436
|
:placeholder="t('tree-combobox-multi-search-placeholder')"
|
|
437
|
-
class="flex h-
|
|
437
|
+
class="flex h-10 w-full bg-transparent py-3 text-sm outline-hidden placeholder:text-zinc-700 disabled:cursor-not-allowed disabled:opacity-50"
|
|
438
438
|
>
|
|
439
439
|
</div>
|
|
440
440
|
<div class="flex flex-col p-1">
|
|
@@ -490,7 +490,7 @@ const hoveredTooltip = computed(() => {
|
|
|
490
490
|
</template>
|
|
491
491
|
|
|
492
492
|
<template #empty>
|
|
493
|
-
<div class="
|
|
493
|
+
<div class="py-6 text-center text-sm text-zinc-500">
|
|
494
494
|
{{ t("tree-combobox-multi-empty") }}
|
|
495
495
|
</div>
|
|
496
496
|
</template>
|
|
@@ -412,17 +412,17 @@ const hoveredTooltip = computed(() => {
|
|
|
412
412
|
>
|
|
413
413
|
<div
|
|
414
414
|
data-slot="tree-combobox-single-search"
|
|
415
|
-
class="flex h-
|
|
415
|
+
class="flex h-10 items-center gap-2 border-b border-zinc-200 px-3"
|
|
416
416
|
>
|
|
417
417
|
<Icon
|
|
418
418
|
icon="fluent:search-20-filled"
|
|
419
|
-
class="size-
|
|
419
|
+
class="size-4 shrink-0 opacity-50"
|
|
420
420
|
/>
|
|
421
421
|
<input
|
|
422
422
|
v-model="filterQuery"
|
|
423
423
|
:disabled="isDisabled"
|
|
424
424
|
:placeholder="t('tree-combobox-single-search-placeholder')"
|
|
425
|
-
class="flex h-
|
|
425
|
+
class="flex h-10 w-full bg-transparent py-3 text-sm outline-hidden placeholder:text-zinc-700 disabled:cursor-not-allowed disabled:opacity-50"
|
|
426
426
|
>
|
|
427
427
|
</div>
|
|
428
428
|
<div class="flex flex-col p-1">
|
|
@@ -477,7 +477,7 @@ const hoveredTooltip = computed(() => {
|
|
|
477
477
|
</template>
|
|
478
478
|
|
|
479
479
|
<template #empty>
|
|
480
|
-
<div class="
|
|
480
|
+
<div class="py-6 text-center text-sm text-zinc-500">
|
|
481
481
|
{{ t("tree-combobox-single-empty") }}
|
|
482
482
|
</div>
|
|
483
483
|
</template>
|
|
@@ -82,13 +82,11 @@ export function derivedField(configure, resultType) {
|
|
|
82
82
|
}).annotations({
|
|
83
83
|
title: "\u6D3E\u751F\u503C",
|
|
84
84
|
description: md`
|
|
85
|
-
|
|
85
|
+
该字段值的**派生来源**:
|
|
86
86
|
|
|
87
87
|
- **计算值**:字段变为只读,其值始终由表达式计算得出,依赖字段提交时重算。
|
|
88
88
|
|
|
89
89
|
- **智能填充**:字段保持可编辑。用户未手动修改前由表达式持续计算并填入;一旦用户手动修改(含清空),即以用户输入为准,表达式不再覆盖。
|
|
90
|
-
|
|
91
|
-
两种方式都支持异步调用(如 \`http.get(...)\`)。
|
|
92
90
|
`
|
|
93
91
|
})
|
|
94
92
|
);
|
|
@@ -76,7 +76,8 @@ export function useDerived(options) {
|
|
|
76
76
|
(result) => {
|
|
77
77
|
if (gen !== generation) return;
|
|
78
78
|
if (field.mode === "prefill" && isDirty(field.binding)) return;
|
|
79
|
-
|
|
79
|
+
const normalized = result === void 0 ? null : result;
|
|
80
|
+
if (!deepEqual(getAt(field.binding), normalized)) setAtSilent(field.binding, normalized);
|
|
80
81
|
},
|
|
81
82
|
() => {
|
|
82
83
|
}
|
|
@@ -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;
|
|
54
53
|
readonly accessor: string;
|
|
55
54
|
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;
|
|
106
105
|
readonly accessor: string;
|
|
107
106
|
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;
|
|
@@ -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;
|
|
54
53
|
readonly accessor: string;
|
|
55
54
|
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;
|
|
106
105
|
readonly accessor: string;
|
|
107
106
|
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;
|
|
@@ -64,9 +64,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
64
64
|
readonly readonly?: string | undefined;
|
|
65
65
|
readonly grow?: boolean | undefined;
|
|
66
66
|
readonly enableSorting?: boolean | undefined;
|
|
67
|
-
readonly successMessage?: string | undefined;
|
|
68
67
|
readonly accessor: string;
|
|
69
68
|
readonly sortKey?: string | undefined;
|
|
69
|
+
readonly successMessage?: string | undefined;
|
|
70
70
|
}) => any;
|
|
71
71
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
72
72
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -130,9 +130,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
130
130
|
readonly readonly?: string | undefined;
|
|
131
131
|
readonly grow?: boolean | undefined;
|
|
132
132
|
readonly enableSorting?: boolean | undefined;
|
|
133
|
-
readonly successMessage?: string | undefined;
|
|
134
133
|
readonly accessor: string;
|
|
135
134
|
readonly sortKey?: string | undefined;
|
|
135
|
+
readonly successMessage?: string | undefined;
|
|
136
136
|
}) => any) | undefined;
|
|
137
137
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
138
138
|
declare const _default: typeof __VLS_export;
|
|
@@ -64,9 +64,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
64
64
|
readonly readonly?: string | undefined;
|
|
65
65
|
readonly grow?: boolean | undefined;
|
|
66
66
|
readonly enableSorting?: boolean | undefined;
|
|
67
|
-
readonly successMessage?: string | undefined;
|
|
68
67
|
readonly accessor: string;
|
|
69
68
|
readonly sortKey?: string | undefined;
|
|
69
|
+
readonly successMessage?: string | undefined;
|
|
70
70
|
}) => any;
|
|
71
71
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
72
72
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -130,9 +130,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
130
130
|
readonly readonly?: string | undefined;
|
|
131
131
|
readonly grow?: boolean | undefined;
|
|
132
132
|
readonly enableSorting?: boolean | undefined;
|
|
133
|
-
readonly successMessage?: string | undefined;
|
|
134
133
|
readonly accessor: string;
|
|
135
134
|
readonly sortKey?: string | undefined;
|
|
135
|
+
readonly successMessage?: string | undefined;
|
|
136
136
|
}) => any) | undefined;
|
|
137
137
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
138
138
|
declare const _default: typeof __VLS_export;
|
|
@@ -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;
|
|
54
53
|
readonly accessor: string;
|
|
55
54
|
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;
|
|
106
105
|
readonly accessor: string;
|
|
107
106
|
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;
|
|
@@ -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;
|
|
54
53
|
readonly accessor: string;
|
|
55
54
|
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;
|
|
106
105
|
readonly accessor: string;
|
|
107
106
|
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;
|
|
@@ -64,9 +64,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
64
64
|
readonly readonly?: string | undefined;
|
|
65
65
|
readonly grow?: boolean | undefined;
|
|
66
66
|
readonly enableSorting?: boolean | undefined;
|
|
67
|
-
readonly successMessage?: string | undefined;
|
|
68
67
|
readonly accessor: string;
|
|
69
68
|
readonly sortKey?: string | undefined;
|
|
69
|
+
readonly successMessage?: string | undefined;
|
|
70
70
|
}) => any;
|
|
71
71
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
72
72
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -130,9 +130,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
130
130
|
readonly readonly?: string | undefined;
|
|
131
131
|
readonly grow?: boolean | undefined;
|
|
132
132
|
readonly enableSorting?: boolean | undefined;
|
|
133
|
-
readonly successMessage?: string | undefined;
|
|
134
133
|
readonly accessor: string;
|
|
135
134
|
readonly sortKey?: string | undefined;
|
|
135
|
+
readonly successMessage?: string | undefined;
|
|
136
136
|
}) => any) | undefined;
|
|
137
137
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
138
138
|
declare const _default: typeof __VLS_export;
|
|
@@ -64,9 +64,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
64
64
|
readonly readonly?: string | undefined;
|
|
65
65
|
readonly grow?: boolean | undefined;
|
|
66
66
|
readonly enableSorting?: boolean | undefined;
|
|
67
|
-
readonly successMessage?: string | undefined;
|
|
68
67
|
readonly accessor: string;
|
|
69
68
|
readonly sortKey?: string | undefined;
|
|
69
|
+
readonly successMessage?: string | undefined;
|
|
70
70
|
}) => any;
|
|
71
71
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
72
72
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -130,9 +130,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
130
130
|
readonly readonly?: string | undefined;
|
|
131
131
|
readonly grow?: boolean | undefined;
|
|
132
132
|
readonly enableSorting?: boolean | undefined;
|
|
133
|
-
readonly successMessage?: string | undefined;
|
|
134
133
|
readonly accessor: string;
|
|
135
134
|
readonly sortKey?: string | undefined;
|
|
135
|
+
readonly successMessage?: string | undefined;
|
|
136
136
|
}) => any) | undefined;
|
|
137
137
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
138
138
|
declare const _default: typeof __VLS_export;
|
|
@@ -79,9 +79,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
79
79
|
};
|
|
80
80
|
}[];
|
|
81
81
|
};
|
|
82
|
-
readonly successMessage?: string | undefined;
|
|
83
82
|
readonly accessor: string;
|
|
84
83
|
readonly sortKey?: string | undefined;
|
|
84
|
+
readonly successMessage?: string | undefined;
|
|
85
85
|
}) => any;
|
|
86
86
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
87
87
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -160,9 +160,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
160
160
|
};
|
|
161
161
|
}[];
|
|
162
162
|
};
|
|
163
|
-
readonly successMessage?: string | undefined;
|
|
164
163
|
readonly accessor: string;
|
|
165
164
|
readonly sortKey?: string | undefined;
|
|
165
|
+
readonly successMessage?: string | undefined;
|
|
166
166
|
}) => any) | undefined;
|
|
167
167
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
168
168
|
declare const _default: typeof __VLS_export;
|
|
@@ -79,9 +79,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
79
79
|
};
|
|
80
80
|
}[];
|
|
81
81
|
};
|
|
82
|
-
readonly successMessage?: string | undefined;
|
|
83
82
|
readonly accessor: string;
|
|
84
83
|
readonly sortKey?: string | undefined;
|
|
84
|
+
readonly successMessage?: string | undefined;
|
|
85
85
|
}) => any;
|
|
86
86
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
87
87
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -160,9 +160,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
160
160
|
};
|
|
161
161
|
}[];
|
|
162
162
|
};
|
|
163
|
-
readonly successMessage?: string | undefined;
|
|
164
163
|
readonly accessor: string;
|
|
165
164
|
readonly sortKey?: string | undefined;
|
|
165
|
+
readonly successMessage?: string | undefined;
|
|
166
166
|
}) => any) | undefined;
|
|
167
167
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
168
168
|
declare const _default: typeof __VLS_export;
|
|
@@ -79,9 +79,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
79
79
|
};
|
|
80
80
|
}[];
|
|
81
81
|
};
|
|
82
|
-
readonly successMessage?: string | undefined;
|
|
83
82
|
readonly accessor: string;
|
|
84
83
|
readonly sortKey?: string | undefined;
|
|
84
|
+
readonly successMessage?: string | undefined;
|
|
85
85
|
}) => any;
|
|
86
86
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
87
87
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -160,9 +160,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
160
160
|
};
|
|
161
161
|
}[];
|
|
162
162
|
};
|
|
163
|
-
readonly successMessage?: string | undefined;
|
|
164
163
|
readonly accessor: string;
|
|
165
164
|
readonly sortKey?: string | undefined;
|
|
165
|
+
readonly successMessage?: string | undefined;
|
|
166
166
|
}) => any) | undefined;
|
|
167
167
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
168
168
|
declare const _default: typeof __VLS_export;
|
|
@@ -79,9 +79,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
79
79
|
};
|
|
80
80
|
}[];
|
|
81
81
|
};
|
|
82
|
-
readonly successMessage?: string | undefined;
|
|
83
82
|
readonly accessor: string;
|
|
84
83
|
readonly sortKey?: string | undefined;
|
|
84
|
+
readonly successMessage?: string | undefined;
|
|
85
85
|
}) => any;
|
|
86
86
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
87
87
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -160,9 +160,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
160
160
|
};
|
|
161
161
|
}[];
|
|
162
162
|
};
|
|
163
|
-
readonly successMessage?: string | undefined;
|
|
164
163
|
readonly accessor: string;
|
|
165
164
|
readonly sortKey?: string | undefined;
|
|
165
|
+
readonly successMessage?: string | undefined;
|
|
166
166
|
}) => any) | undefined;
|
|
167
167
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
168
168
|
declare const _default: typeof __VLS_export;
|
|
@@ -87,8 +87,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
87
87
|
readonly target: string;
|
|
88
88
|
readonly operation: string;
|
|
89
89
|
}[] | undefined;
|
|
90
|
-
readonly successMessage?: string | undefined;
|
|
91
90
|
readonly accessor: string;
|
|
91
|
+
readonly successMessage?: string | undefined;
|
|
92
92
|
};
|
|
93
93
|
}) => any;
|
|
94
94
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
@@ -176,8 +176,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
176
176
|
readonly target: string;
|
|
177
177
|
readonly operation: string;
|
|
178
178
|
}[] | undefined;
|
|
179
|
-
readonly successMessage?: string | undefined;
|
|
180
179
|
readonly accessor: string;
|
|
180
|
+
readonly successMessage?: string | undefined;
|
|
181
181
|
};
|
|
182
182
|
}) => any) | undefined;
|
|
183
183
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -87,8 +87,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
87
87
|
readonly target: string;
|
|
88
88
|
readonly operation: string;
|
|
89
89
|
}[] | undefined;
|
|
90
|
-
readonly successMessage?: string | undefined;
|
|
91
90
|
readonly accessor: string;
|
|
91
|
+
readonly successMessage?: string | undefined;
|
|
92
92
|
};
|
|
93
93
|
}) => any;
|
|
94
94
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
@@ -176,8 +176,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
176
176
|
readonly target: string;
|
|
177
177
|
readonly operation: string;
|
|
178
178
|
}[] | undefined;
|
|
179
|
-
readonly successMessage?: string | undefined;
|
|
180
179
|
readonly accessor: string;
|
|
180
|
+
readonly successMessage?: string | undefined;
|
|
181
181
|
};
|
|
182
182
|
}) => any) | undefined;
|
|
183
183
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -87,8 +87,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
87
87
|
readonly target: string;
|
|
88
88
|
readonly operation: string;
|
|
89
89
|
}[] | undefined;
|
|
90
|
-
readonly successMessage?: string | undefined;
|
|
91
90
|
readonly accessor: string;
|
|
91
|
+
readonly successMessage?: string | undefined;
|
|
92
92
|
};
|
|
93
93
|
}) => any;
|
|
94
94
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
@@ -176,8 +176,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
176
176
|
readonly target: string;
|
|
177
177
|
readonly operation: string;
|
|
178
178
|
}[] | undefined;
|
|
179
|
-
readonly successMessage?: string | undefined;
|
|
180
179
|
readonly accessor: string;
|
|
180
|
+
readonly successMessage?: string | undefined;
|
|
181
181
|
};
|
|
182
182
|
}) => any) | undefined;
|
|
183
183
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -87,8 +87,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
87
87
|
readonly target: string;
|
|
88
88
|
readonly operation: string;
|
|
89
89
|
}[] | undefined;
|
|
90
|
-
readonly successMessage?: string | undefined;
|
|
91
90
|
readonly accessor: string;
|
|
91
|
+
readonly successMessage?: string | undefined;
|
|
92
92
|
};
|
|
93
93
|
}) => any;
|
|
94
94
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
@@ -176,8 +176,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
176
176
|
readonly target: string;
|
|
177
177
|
readonly operation: string;
|
|
178
178
|
}[] | undefined;
|
|
179
|
-
readonly successMessage?: string | undefined;
|
|
180
179
|
readonly accessor: string;
|
|
180
|
+
readonly successMessage?: string | undefined;
|
|
181
181
|
};
|
|
182
182
|
}) => any) | undefined;
|
|
183
183
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -14,6 +14,8 @@ When modifying this library, keep both `CLAUDE.md` and `PROMPT.md` in sync with
|
|
|
14
14
|
|
|
15
15
|
A `range()` built-in has been added (not from upstream) — `range(number, number)`, `range(number, number, number)` and `range(Date, Date, string)`. It builds an end-exclusive list; the direction follows the operands (counts down when `start > end`); `step` is a positive magnitude; the date unit is `year` / `month` / `day` / `hour` / `minute`. Output length is capped at 100000.
|
|
16
16
|
|
|
17
|
+
A `list.enumerate(): list<map<string, dyn>>` receiver method has been added (not from upstream, in `functions.ts` beside `list.size()`) — pairs each element with its 0-based index as a plain `{index, value}` record (CEL has no tuple type). It is a plain function, not a macro (no variable binding); the index is a `Decimal` so it stays a CEL `number` for downstream arithmetic. Receiver `list` resolves to `list<dyn>`, so it matches any list.
|
|
18
|
+
|
|
17
19
|
`evaluate` now returns `Effect<T, ParseError | EvaluationError | TypeError>` instead of a plain value. The entire evaluation pipeline is Effect-based — every AST node's `evaluate` function returns an Effect, and sub-expressions are composed via `Effect.gen` / `yield*`. Promise-based async handling has been removed. User-registered functions may return `Effect` values, which are automatically flatMapped into the evaluation pipeline. Import `Effect` from `effect` and use `Effect.runSync` or `Effect.runPromise` to execute the returned Effect.
|
|
18
20
|
|
|
19
21
|
The `homogeneousAggregateLiterals` and `enableOptionalTypes` environment options have been removed. Aggregate data structures (lists, maps) are always heterogeneous — mixed-type literals are inferred as `list<dyn>` or `map<dyn, dyn>`. Optional types (`.?`, `[?]`, `optional.*` helpers) are always enabled.
|
|
@@ -131,6 +131,14 @@ items.map(i, i.price).sum() // total of mapped prices
|
|
|
131
131
|
```
|
|
132
132
|
Receiver must be statically typed `list<number>`. Works on number literals and `.map(...)` results; an unlisted variable typed as `dyn` will not match — wrap or type it first.
|
|
133
133
|
|
|
134
|
+
### List enumerate
|
|
135
|
+
```cel
|
|
136
|
+
[10, 20, 30].enumerate() // [{index: 0, value: 10}, {index: 1, value: 20}, {index: 2, value: 30}]
|
|
137
|
+
items.enumerate().map(e, e.index) // [0, 1, 2, ...]
|
|
138
|
+
items.enumerate().map(e, string(e.index) + ": " + e.value)
|
|
139
|
+
```
|
|
140
|
+
Pairs each element with its 0-based index as `{index, value}` records (CEL has no tuple type). Works on any `list`. Returns `list<map<string, dyn>>`.
|
|
141
|
+
|
|
134
142
|
### String methods
|
|
135
143
|
```cel
|
|
136
144
|
"hello".contains("ell") // true
|
|
@@ -50,6 +50,10 @@ export function registerFunctions(registry) {
|
|
|
50
50
|
functionOverload("bytes.size(): number", (v) => Decimal.from(v.length));
|
|
51
51
|
functionOverload("list.size(): number", (v) => Decimal.from(v.length ?? v.size));
|
|
52
52
|
functionOverload("map.size(): number", (v) => Decimal.from(v instanceof Map ? v.size : objKeys(v).length));
|
|
53
|
+
functionOverload(
|
|
54
|
+
"list.enumerate(): list<map<string, dyn>>",
|
|
55
|
+
(v) => v.map((value, i) => ({ index: Decimal.from(i), value }))
|
|
56
|
+
);
|
|
53
57
|
functionOverload("bytes(string): bytes", (v) => ByteOpts.fromString(v));
|
|
54
58
|
functionOverload("bytes(bytes): bytes", identity);
|
|
55
59
|
functionOverload("number(number): number", (v) => Decimal.from(v));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b1 as e}from"./index-BKaqQGb-.js";import{b2 as f,b3 as r,b4 as s}from"./index-BKaqQGb-.js";export{f as TableConfig,r as createTableConfig,e as default,s as getColumnTechnicalKey};
|