@shwfed/config 2.10.12 → 2.11.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 +46 -49
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-BeqytPDr.js → FieldGroup.vue_vue_type_script_setup_true_lang-UfhMyymD.js} +1 -1
- package/dist/preview/assets/{badge-DkHwLDps.js → badge-CJ9IQ3Jx.js} +1 -1
- package/dist/preview/assets/{config-Cft-srKd.js → config--Vx4fL61.js} +1 -1
- package/dist/preview/assets/{config-DJQ2LOWo.js → config-5PPug5mk.js} +1 -1
- package/dist/preview/assets/{config-Dx1SXsSf.js → config-7V1qHjUk.js} +1 -1
- package/dist/preview/assets/{config-Cedm-E2H.js → config-BYktCefJ.js} +1 -1
- package/dist/preview/assets/{config-DAZ2Uj6B.js → config-BeRYF_cz.js} +1 -1
- package/dist/preview/assets/{config-DCANpbtq.js → config-BldsYfGM.js} +1 -1
- package/dist/preview/assets/{config-Uw4cvZGX.js → config-CQrDCzYN.js} +1 -1
- package/dist/preview/assets/{config-7KeAl8UU.js → config-C_g-FYCR.js} +1 -1
- package/dist/preview/assets/{config-CZ1e9utV.js → config-DIsAIc7H.js} +1 -1
- package/dist/preview/assets/{config-OPQWANCx.js → config-DPX7vGqV.js} +1 -1
- package/dist/preview/assets/{config-DQVKd54J.js → config-DpLMetys.js} +1 -1
- package/dist/preview/assets/{config-CVPVYMuh.js → config-IMd4FZi8.js} +1 -1
- package/dist/preview/assets/{config-Cy6Eix27.js → config-N-FdgfwK.js} +1 -1
- package/dist/preview/assets/{config-DbV3RlZz.js → config-uUF-UHPt.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-D4Gh9PzS.js → definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js} +1 -1
- package/dist/preview/assets/index-8Ph-sFDI.css +1 -0
- package/dist/preview/assets/index-BCl1NN6k.js +763 -0
- package/dist/preview/assets/index-Core7vRW.js +1 -0
- package/dist/preview/assets/{index-Cum0oK9u.js → index-DKWp47QP.js} +1 -1
- package/dist/preview/assets/{item-H4QeOpnC.js → item-XsW7swFt.js} +1 -1
- package/dist/preview/assets/{runtime-CTnwTJlw.js → runtime-B-ABO0r0.js} +1 -1
- package/dist/preview/assets/{runtime-C3532B0Y.js → runtime-BeHohaOZ.js} +1 -1
- package/dist/preview/assets/{runtime-CNMjRr9Y.js → runtime-BiFFwOIl.js} +1 -1
- package/dist/preview/assets/{runtime-ibuFFD1K.js → runtime-ByArW-jJ.js} +1 -1
- package/dist/preview/assets/{runtime-DvCHNIPq.js → runtime-CpVTGNFZ.js} +1 -1
- package/dist/preview/assets/{runtime-sPGVp7yA.js → runtime-DQ1TnQ7n.js} +1 -1
- package/dist/preview/assets/{runtime-CwgX0PuH.js → runtime-DY7hr7v1.js} +1 -1
- package/dist/preview/assets/{runtime-BotFX6qJ.js → runtime-Dn172S7t.js} +1 -1
- package/dist/preview/assets/{runtime-D5HcLLLR.js → runtime-JxBzvGnw.js} +1 -1
- package/dist/preview/assets/{runtime-cKOD2A6u.js → runtime-bq0hmEXY.js} +1 -1
- package/dist/preview/assets/{schema-meta-DtZNwp3h.js → schema-meta-CZ9yXnsa.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/runtime.vue +23 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.js +7 -4
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +60 -32
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +7 -9
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +2 -5
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +67 -32
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.js +2 -5
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +66 -31
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +7 -9
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +2 -5
- 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-remote/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.js +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 -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-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.js +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 -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-remote/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.js +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 -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-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.js +1 -0
- 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-multi.remote/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.js +1 -0
- 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-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue +61 -22
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.js +3 -4
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue +61 -22
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.js +3 -4
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue +67 -23
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.js +2 -4
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue +67 -23
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.js +2 -4
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/config.vue +67 -32
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/runtime.vue +7 -9
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.js +2 -5
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue +66 -31
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue +5 -8
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +2 -5
- package/dist/runtime/components/table/index.vue +46 -7
- package/dist/runtime/components/table/utils/runtime.d.ts +1 -0
- package/dist/runtime/components/table/utils/runtime.js +5 -0
- package/dist/runtime/components/table/utils/shared.d.ts +3 -1
- package/dist/runtime/components/table/utils/shared.js +17 -5
- package/package.json +1 -1
- package/dist/preview/assets/index-B3HnlKis.js +0 -763
- package/dist/preview/assets/index-BAY6NLoo.css +0 -1
- package/dist/preview/assets/index-CxUuhfsO.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{be as e}from"./index-BCl1NN6k.js";import{bf as b,bg as r,bh as s}from"./index-BCl1NN6k.js";export{b as TableConfig,r as createTableConfig,e as default,s as getColumnTechnicalKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as H,Z as et,$ as it,o as nt,z as st,a0 as at,b as D,K as P,L as j,H as rt,a1 as ot,a2 as z,a3 as lt,I as ct,a4 as I,a5 as ht}from"./index-B3HnlKis.js";const dt=String.raw,pt=(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})(),ut=typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),k=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,C="--_number-flow-d-opacity",B="--_number-flow-d-width",S="--_number-flow-dx",V="--_number-flow-d",mt=(()=>{try{return CSS.registerProperty({name:C,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:S,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:B,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:V,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})(),U="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",v=`calc(${U} * 2)`,M="var(--number-flow-mask-width, 0.5em)",y=`calc(${M} / var(--scale-x))`,$="#000 0, transparent 71%",ft=dt`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${B}) / var(--width));transform:translateX(var(${S})) scaleX(var(--scale-x));margin:0 calc(-1 * ${M});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${y},#000 calc(100% - ${y}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${v},#000 calc(100% - ${v}),transparent 100% ),radial-gradient(at bottom right,${$}),radial-gradient(at bottom left,${$}),radial-gradient(at top left,${$}),radial-gradient(at top right,${$});-webkit-mask-size:100% calc(100% - ${v} * 2),calc(100% - ${y} * 2) 100%,${y} ${v},${y} ${v},${y} ${v},${y} ${v};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${U} ${M};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${S})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${V})}.digit__num,.number .section::after{padding:${U} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${C}))}`,gt=HTMLElement,vt=(s,t)=>s==null?t:t==null?s:Math.max(s,t),A=new WeakMap,jt={onUpdate(s,t,e){if(A.set(e,void 0),!e.computedTrend)return;const i=t.integer.concat(t.fraction).filter(o=>o.type==="integer"||o.type==="fraction"),n=s.integer.concat(s.fraction).filter(o=>o.type==="integer"||o.type==="fraction"),r=i.find(o=>!n.find(c=>c.pos===o.pos&&c.value===o.value)),a=n.find(o=>!i.find(c=>o.pos===c.pos&&o.value===c.value));A.set(e,vt(r?.pos,a?.pos))},getDelta(s,t,e){const i=s-t,n=A.get(e.flow);if(!i&&n!=null&&n>=e.pos)return e.length*e.flow.computedTrend}},g=(s,t,e)=>{const i=document.createElement(s),[n,r]=Array.isArray(t)?[void 0,t]:[t,e];return n&&Object.assign(i,n),r?.forEach(a=>i.appendChild(a)),i},yt=(s,t)=>{var e;return t==="left"?s.offsetLeft:(((e=s.offsetParent instanceof HTMLElement?s.offsetParent:null)==null?void 0:e.offsetWidth)??0)-s.offsetWidth-s.offsetLeft},wt=s=>s.offsetWidth>0&&s.offsetHeight>0,_t=(s,t)=>{!customElements.get(s)&&customElements.define(s,t)};function bt(s,t,{reverse:e=!1}={}){const i=s.length;for(let n=e?i-1:0;e?n>=0:n<i;e?n--:n++)t(s[n],n)}function $t(s,t,e,i){const n=t.formatToParts(s);e&&n.unshift({type:"prefix",value:e}),i&&n.push({type:"suffix",value:i});const r=[],a=[],o=[],c=[],l={},d=p=>`${p}:${l[p]=(l[p]??-1)+1}`;let m="",_=!1,b=!1;for(const p of n){m+=p.value;const h=p.type==="minusSign"||p.type==="plusSign"?"sign":p.type;h==="integer"?(_=!0,a.push(...p.value.split("").map(T=>({type:h,value:parseInt(T)})))):h==="group"?a.push({type:h,value:p.value}):h==="decimal"?(b=!0,o.push({type:h,value:p.value,key:d(h)})):h==="fraction"?o.push(...p.value.split("").map(T=>({type:h,value:parseInt(T),key:d(h),pos:-1-l[h]}))):(_||b?c:r).push({type:h,value:p.value,key:d(h)})}const F=[];for(let p=a.length-1;p>=0;p--){const h=a[p];F.unshift(h.type==="integer"?{...h,key:d(h.type),pos:l[h.type]}:{...h,key:d(h.type)})}return{pre:r,integer:F,fraction:o,post:c,valueAsString:m,value:typeof s=="string"?parseFloat(s):s}}const Y=ut&&pt&&mt;let u=class extends gt{constructor(){super(),this.created=!1,this.batched=!1;const{animated:t,...e}=this.constructor.defaultProps;this._animated=this.computedAnimated=t,Object.assign(this,e)}get animated(){return this._animated}set animated(t){var e;this.animated!==t&&(this._animated=t,(e=this.shadowRoot)==null||e.getAnimations().forEach(i=>i.finish()))}set data(t){var e,i;if(t==null)return;const{pre:n,integer:r,fraction:a,post:o,value:c}=t;if(this.created){const l=this._data;this._data=t,this.computedTrend=typeof this.trend=="function"?this.trend(l.value,c):this.trend,this.computedAnimated=Y&&this._animated&&(!this.respectMotionPreference||!((e=k)!=null&&e.matches))&&wt(this)&&this.ownerDocument.visibilityState==="visible",(i=this.plugins)==null||i.forEach(d=>{var m;return(m=d.onUpdate)==null?void 0:m.call(d,t,l,this)}),this.batched||this.willUpdate(),this._pre.update(n),this._num.update({integer:r,fraction:a}),this._post.update(o),this.batched||this.didUpdate()}else{this._data=t,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}const l=document.createElement("style");this.nonce&&(l.nonce=this.nonce),l.textContent=ft,this.shadowRoot.appendChild(l),this._pre=new O(this,n,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new xt(this,r,a),this.shadowRoot.appendChild(this._num.el),this._post=new O(this,o,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=!0}try{this._internals.ariaLabel=t.valueAsString}catch{}}willUpdate(){this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate()}didUpdate(){if(!this.computedAnimated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();const t=new AbortController;Promise.all(this.shadowRoot.getAnimations().map(e=>e.finished)).then(()=>{t.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)}),this._abortAnimationsFinish=t}};u.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:!0,trend:(s,t)=>Math.sign(t-s),respectMotionPreference:!0,plugins:void 0,digits:void 0};class xt{constructor(t,e,i,{className:n,...r}={}){this.flow=t,this._integer=new W(t,e,{justify:"right",part:"integer"}),this._fraction=new W(t,i,{justify:"left",part:"fraction"}),this._inner=g("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=g("span",{...r,part:"number",className:`number ${n??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:t,fraction:e}){this._integer.update(t),this._fraction.update(e)}didUpdate(){const t=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();const e=this._prevLeft-t.left,i=this.el.offsetWidth,n=this._prevWidth-i;this.el.style.setProperty("--width",String(i)),this.el.animate({[S]:[`${e}px`,"0px"],[B]:[n,0]},{...this.flow.transformTiming,composite:"accumulate"})}}let Z=class{constructor(t,e,{justify:i,className:n,...r},a){this.flow=t,this.children=new Map,this.onCharRemove=c=>()=>{this.children.delete(c)},this.justify=i;const o=e.map(c=>this.addChar(c).el);this.el=g("span",{...r,className:`section section--justify-${i} ${n??""}`},a?a(o):o)}addChar(t,{startDigitsAtZero:e=!1,...i}={}){const n=t.type==="integer"||t.type==="fraction"?new q(this,t.type,e?0:t.value,t.pos,{...i,onRemove:this.onCharRemove(t.key)}):new kt(this,t.type,t.value,{...i,onRemove:this.onCharRemove(t.key)});return this.children.set(t.key,n),n}unpop(t){t.el.removeAttribute("inert"),t.el.style.top="",t.el.style[this.justify]=""}pop(t){t.forEach(e=>{e.el.style.top=`${e.el.offsetTop}px`,e.el.style[this.justify]=`${yt(e.el,this.justify)}px`}),t.forEach(e=>{e.el.setAttribute("inert",""),e.present=!1})}addNewAndUpdateExisting(t){const e=new Map,i=new Map,n=this.justify==="left",r=n?"prepend":"append";if(bt(t,a=>{let o;this.children.has(a.key)?(o=this.children.get(a.key),i.set(a,o),this.unpop(o),o.present=!0):(o=this.addChar(a,{startDigitsAtZero:!0,animateIn:!0}),e.set(a,o)),this.el[r](o.el)},{reverse:n}),this.flow.computedAnimated){const a=this.el.getBoundingClientRect();e.forEach(o=>{o.willUpdate(a)})}e.forEach((a,o)=>{a.update(o.value)}),i.forEach((a,o)=>{a.update(o.value)})}willUpdate(){const t=this.el.getBoundingClientRect();this._prevOffset=t[this.justify],this.children.forEach(e=>e.willUpdate(t))}didUpdate(){const t=this.el.getBoundingClientRect();this.children.forEach(n=>n.didUpdate(t));const e=t[this.justify],i=this._prevOffset-e;i&&this.children.size&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}};class W extends Z{update(t){const e=new Map;this.children.forEach((i,n)=>{t.find(r=>r.key===n)||e.set(n,i),this.unpop(i)}),this.addNewAndUpdateExisting(t),e.forEach(i=>{i instanceof q&&i.update(0)}),this.pop(e)}}class O extends Z{update(t){const e=new Map;this.children.forEach((i,n)=>{t.find(r=>r.key===n)||e.set(n,i)}),this.pop(e),this.addNewAndUpdateExisting(t)}}class R{constructor(t,e,{onRemove:i,animateIn:n=!1}={}){this.flow=t,this.el=e,this._present=!0,this._remove=()=>{var r;this.el.remove(),(r=this._onRemove)==null||r.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&n&&this.el.animate({[C]:[-.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=i}get present(){return this._present}set present(t){if(this._present!==t){if(this._present=t,t?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){t||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",t?"0":"-.999"),this.el.animate({[C]:t?[-.9999,0]:[.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),t?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:!0})}}}class G extends R{constructor(t,e,i,n){super(t.flow,i,n),this.section=t,this.value=e,this.el=i}}class q extends G{constructor(t,e,i,n,r){var a,o;const c=(((o=(a=t.flow.digits)==null?void 0:a[n])==null?void 0:o.max)??9)+1,l=Array.from({length:c}).map((m,_)=>{const b=g("span",{className:"digit__num"},[document.createTextNode(String(_))]);return _!==i&&b.setAttribute("inert",""),b.style.setProperty("--n",String(_)),b}),d=g("span",{part:`digit ${e}-digit`,className:"digit"},l);d.style.setProperty("--current",String(i)),d.style.setProperty("--length",String(c)),super(t,i,d,r),this.pos=n,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=l,this.length=c}willUpdate(t){const e=this.el.getBoundingClientRect();this._prevValue=this.value;const i=e[this.section.justify]-t[this.section.justify],n=e.width/2;this._prevCenter=this.section.justify==="left"?i+n:i-n}update(t){this.el.style.setProperty("--current",String(t)),this._numbers.forEach((e,i)=>i===t?e.removeAttribute("inert"):e.setAttribute("inert","")),this.value=t}didUpdate(t){const e=this.el.getBoundingClientRect(),i=e[this.section.justify]-t[this.section.justify],n=e.width/2,r=this.section.justify==="left"?i+n:i-n,a=this._prevCenter-r;a&&this.el.animate({transform:[`translateX(${a}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});const o=this.getDelta();o&&(this.el.classList.add("is-spinning"),this.el.animate({[V]:[-o,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:!0}))}getDelta(){var t;if(this.flow.plugins)for(const n of this.flow.plugins){const r=(t=n.getDelta)==null?void 0:t.call(n,this.value,this._prevValue,this);if(r!=null)return r}const e=this.value-this._prevValue,i=this.flow.computedTrend||Math.sign(e);return i<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:i>0&&this.value<this._prevValue?this.length-this._prevValue+this.value:e}}class kt extends G{constructor(t,e,i,n){const r=g("span",{className:"symbol__value",textContent:i});super(t,i,g("span",{part:`symbol ${e}`,className:"symbol"},[r]),n),this.type=e,this._children=new Map,this._onChildRemove=a=>()=>{this._children.delete(a)},this._children.set(i,new R(this.flow,r,{onRemove:this._onChildRemove(i)}))}willUpdate(t){if(this.type==="decimal")return;const e=this.el.getBoundingClientRect();this._prevOffset=e[this.section.justify]-t[this.section.justify]}update(t){if(this.value!==t){const e=this._children.get(this.value);e&&(e.present=!1);const i=this._children.get(t);if(i)i.present=!0;else{const n=g("span",{className:"symbol__value",textContent:t});this.el.appendChild(n),this._children.set(t,new R(this.flow,n,{animateIn:!0,onRemove:this._onChildRemove(t)}))}}this.value=t}didUpdate(t){if(this.type==="decimal")return;const e=this.el.getBoundingClientRect()[this.section.justify]-t[this.section.justify],i=this._prevOffset-e;i&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}const X=String.raw;(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})();typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)");typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)");const J="--_number-flow-d-opacity",K="--_number-flow-d-width",N="--_number-flow-dx",Q="--_number-flow-d";(()=>{try{return CSS.registerProperty({name:J,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:N,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:K,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:Q,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})();const E="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",f=`calc(${E} * 2)`,L="var(--number-flow-mask-width, 0.5em)",w=`calc(${L} / var(--scale-x))`,x="#000 0, transparent 71%",Ct=X`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${K}) / var(--width));transform:translateX(var(${N})) scaleX(var(--scale-x));margin:0 calc(-1 * ${L});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${w},#000 calc(100% - ${w}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${f},#000 calc(100% - ${f}),transparent 100% ),radial-gradient(at bottom right,${x}),radial-gradient(at bottom left,${x}),radial-gradient(at top left,${x}),radial-gradient(at top right,${x});-webkit-mask-size:100% calc(100% - ${f} * 2),calc(100% - ${w} * 2) 100%,${w} ${f},${w} ${f},${w} ${f},${w} ${f};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${E} ${L};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${N})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${Q})}.digit__num,.number .section::after{padding:${E} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${J}))}`,St=X`:host{display:inline-block;direction:ltr;white-space:nowrap;line-height:1}span{display:inline-block}:host([data-will-change]) span{will-change:transform}.number,.digit{padding:${E} 0}.symbol{white-space:pre}`,Et=(s="")=>X`:where(number-flow${s}){line-height:1}number-flow${s} > span{font-kerning:none;display:inline-block;padding:${f} 0}`,Tt=s=>[St,Et(s),Ct],tt=Symbol(),Rt=H({__name:"NumberFlowGroup",setup(s){const t=new Set;let e=!1;return lt(tt,(i,n)=>{t.add(i),ct(n,async()=>{e||(e=!0,t.forEach(async r=>{var a;!r.value||!r.value.created||(r.value.willUpdate(),await I(),(a=r.value)==null||a.didUpdate())}),await I(),e=!1)}),ht(()=>{t.delete(i)})}),(i,n)=>et(i.$slots,"default")}}),At=["batched","trend","plugins","animated","transformTiming","spinTiming","opacityTiming","respectMotionPreference","nonce","data-will-change","digits","innerHTML","data"],Nt=H({inheritAttrs:!1,__name:"index",props:{transformTiming:{default:()=>u.defaultProps.transformTiming},spinTiming:{default:()=>u.defaultProps.spinTiming},opacityTiming:{default:()=>u.defaultProps.opacityTiming},animated:{type:Boolean,default:()=>u.defaultProps.animated},respectMotionPreference:{type:Boolean,default:()=>u.defaultProps.respectMotionPreference},trend:{type:[Number,Function],default:()=>u.defaultProps.trend},plugins:{default:()=>u.defaultProps.plugins},digits:{default:()=>u.defaultProps.digits},locales:{},format:{},value:{},prefix:{},suffix:{},nonce:{},willChange:{type:Boolean,default:!1}},emits:["animationsstart","animationsfinish"],setup(s,{expose:t,emit:e}){const i=P();t({el:i});const n=e,r=j(()=>new Intl.NumberFormat(s.locales,s.format)),a=j(()=>$t(s.value,r.value,s.prefix,s.suffix)),o=void 0,c=it(tt,void 0);return c?.(i,a),(l,d)=>(nt(),st("number-flow-vue",at({ref_key:"el",ref:i},l.$attrs,{batched:!!D(c),trend:l.trend,plugins:l.plugins,animated:l.animated,transformTiming:l.transformTiming,spinTiming:l.spinTiming,opacityTiming:l.opacityTiming,respectMotionPreference:l.respectMotionPreference,nonce:l.nonce,"data-will-change":l.willChange?"":void 0,digits:l.digits,innerHTML:D(o),"data-allow-mismatch":"",onAnimationsstart:d[0]||(d[0]=m=>n("animationsstart")),onAnimationsfinish:d[1]||(d[1]=m=>n("animationsfinish")),data:a.value}),null,16,At))}}),Lt=Tt("-vue");_t("number-flow-vue",u);function Bt({respectMotionPreference:s=!0}={}){const t=P(!1),e=P(!1);return rt(()=>{var i;t.value=Y,e.value=((i=k)==null?void 0:i.matches)??!1}),ot(i=>{var n;if(!z(s))return;const r=({matches:a})=>{e.value=a};(n=k)==null||n.addEventListener("change",r),i(()=>{var a;(a=k)==null||a.removeEventListener("change",r)})}),j(()=>t.value&&(!z(s)||!e.value))}export{u as NumberFlowElement,Rt as NumberFlowGroup,jt as continuous,Nt as default,Lt as styles,Bt as useCanAnimate};
|
|
1
|
+
import{d as H,Z as et,$ as it,o as nt,z as st,a0 as at,b as D,K as P,L as j,H as rt,a1 as ot,a2 as z,a3 as lt,I as ct,a4 as I,a5 as ht}from"./index-BCl1NN6k.js";const dt=String.raw,pt=(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})(),ut=typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),k=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,C="--_number-flow-d-opacity",B="--_number-flow-d-width",S="--_number-flow-dx",V="--_number-flow-d",mt=(()=>{try{return CSS.registerProperty({name:C,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:S,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:B,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:V,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})(),U="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",v=`calc(${U} * 2)`,M="var(--number-flow-mask-width, 0.5em)",y=`calc(${M} / var(--scale-x))`,$="#000 0, transparent 71%",ft=dt`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${B}) / var(--width));transform:translateX(var(${S})) scaleX(var(--scale-x));margin:0 calc(-1 * ${M});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${y},#000 calc(100% - ${y}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${v},#000 calc(100% - ${v}),transparent 100% ),radial-gradient(at bottom right,${$}),radial-gradient(at bottom left,${$}),radial-gradient(at top left,${$}),radial-gradient(at top right,${$});-webkit-mask-size:100% calc(100% - ${v} * 2),calc(100% - ${y} * 2) 100%,${y} ${v},${y} ${v},${y} ${v},${y} ${v};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${U} ${M};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${S})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${V})}.digit__num,.number .section::after{padding:${U} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${C}))}`,gt=HTMLElement,vt=(s,t)=>s==null?t:t==null?s:Math.max(s,t),A=new WeakMap,jt={onUpdate(s,t,e){if(A.set(e,void 0),!e.computedTrend)return;const i=t.integer.concat(t.fraction).filter(o=>o.type==="integer"||o.type==="fraction"),n=s.integer.concat(s.fraction).filter(o=>o.type==="integer"||o.type==="fraction"),r=i.find(o=>!n.find(c=>c.pos===o.pos&&c.value===o.value)),a=n.find(o=>!i.find(c=>o.pos===c.pos&&o.value===c.value));A.set(e,vt(r?.pos,a?.pos))},getDelta(s,t,e){const i=s-t,n=A.get(e.flow);if(!i&&n!=null&&n>=e.pos)return e.length*e.flow.computedTrend}},g=(s,t,e)=>{const i=document.createElement(s),[n,r]=Array.isArray(t)?[void 0,t]:[t,e];return n&&Object.assign(i,n),r?.forEach(a=>i.appendChild(a)),i},yt=(s,t)=>{var e;return t==="left"?s.offsetLeft:(((e=s.offsetParent instanceof HTMLElement?s.offsetParent:null)==null?void 0:e.offsetWidth)??0)-s.offsetWidth-s.offsetLeft},wt=s=>s.offsetWidth>0&&s.offsetHeight>0,_t=(s,t)=>{!customElements.get(s)&&customElements.define(s,t)};function bt(s,t,{reverse:e=!1}={}){const i=s.length;for(let n=e?i-1:0;e?n>=0:n<i;e?n--:n++)t(s[n],n)}function $t(s,t,e,i){const n=t.formatToParts(s);e&&n.unshift({type:"prefix",value:e}),i&&n.push({type:"suffix",value:i});const r=[],a=[],o=[],c=[],l={},d=p=>`${p}:${l[p]=(l[p]??-1)+1}`;let m="",_=!1,b=!1;for(const p of n){m+=p.value;const h=p.type==="minusSign"||p.type==="plusSign"?"sign":p.type;h==="integer"?(_=!0,a.push(...p.value.split("").map(T=>({type:h,value:parseInt(T)})))):h==="group"?a.push({type:h,value:p.value}):h==="decimal"?(b=!0,o.push({type:h,value:p.value,key:d(h)})):h==="fraction"?o.push(...p.value.split("").map(T=>({type:h,value:parseInt(T),key:d(h),pos:-1-l[h]}))):(_||b?c:r).push({type:h,value:p.value,key:d(h)})}const F=[];for(let p=a.length-1;p>=0;p--){const h=a[p];F.unshift(h.type==="integer"?{...h,key:d(h.type),pos:l[h.type]}:{...h,key:d(h.type)})}return{pre:r,integer:F,fraction:o,post:c,valueAsString:m,value:typeof s=="string"?parseFloat(s):s}}const Y=ut&&pt&&mt;let u=class extends gt{constructor(){super(),this.created=!1,this.batched=!1;const{animated:t,...e}=this.constructor.defaultProps;this._animated=this.computedAnimated=t,Object.assign(this,e)}get animated(){return this._animated}set animated(t){var e;this.animated!==t&&(this._animated=t,(e=this.shadowRoot)==null||e.getAnimations().forEach(i=>i.finish()))}set data(t){var e,i;if(t==null)return;const{pre:n,integer:r,fraction:a,post:o,value:c}=t;if(this.created){const l=this._data;this._data=t,this.computedTrend=typeof this.trend=="function"?this.trend(l.value,c):this.trend,this.computedAnimated=Y&&this._animated&&(!this.respectMotionPreference||!((e=k)!=null&&e.matches))&&wt(this)&&this.ownerDocument.visibilityState==="visible",(i=this.plugins)==null||i.forEach(d=>{var m;return(m=d.onUpdate)==null?void 0:m.call(d,t,l,this)}),this.batched||this.willUpdate(),this._pre.update(n),this._num.update({integer:r,fraction:a}),this._post.update(o),this.batched||this.didUpdate()}else{this._data=t,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}const l=document.createElement("style");this.nonce&&(l.nonce=this.nonce),l.textContent=ft,this.shadowRoot.appendChild(l),this._pre=new O(this,n,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new xt(this,r,a),this.shadowRoot.appendChild(this._num.el),this._post=new O(this,o,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=!0}try{this._internals.ariaLabel=t.valueAsString}catch{}}willUpdate(){this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate()}didUpdate(){if(!this.computedAnimated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();const t=new AbortController;Promise.all(this.shadowRoot.getAnimations().map(e=>e.finished)).then(()=>{t.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)}),this._abortAnimationsFinish=t}};u.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:!0,trend:(s,t)=>Math.sign(t-s),respectMotionPreference:!0,plugins:void 0,digits:void 0};class xt{constructor(t,e,i,{className:n,...r}={}){this.flow=t,this._integer=new W(t,e,{justify:"right",part:"integer"}),this._fraction=new W(t,i,{justify:"left",part:"fraction"}),this._inner=g("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=g("span",{...r,part:"number",className:`number ${n??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:t,fraction:e}){this._integer.update(t),this._fraction.update(e)}didUpdate(){const t=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();const e=this._prevLeft-t.left,i=this.el.offsetWidth,n=this._prevWidth-i;this.el.style.setProperty("--width",String(i)),this.el.animate({[S]:[`${e}px`,"0px"],[B]:[n,0]},{...this.flow.transformTiming,composite:"accumulate"})}}let Z=class{constructor(t,e,{justify:i,className:n,...r},a){this.flow=t,this.children=new Map,this.onCharRemove=c=>()=>{this.children.delete(c)},this.justify=i;const o=e.map(c=>this.addChar(c).el);this.el=g("span",{...r,className:`section section--justify-${i} ${n??""}`},a?a(o):o)}addChar(t,{startDigitsAtZero:e=!1,...i}={}){const n=t.type==="integer"||t.type==="fraction"?new q(this,t.type,e?0:t.value,t.pos,{...i,onRemove:this.onCharRemove(t.key)}):new kt(this,t.type,t.value,{...i,onRemove:this.onCharRemove(t.key)});return this.children.set(t.key,n),n}unpop(t){t.el.removeAttribute("inert"),t.el.style.top="",t.el.style[this.justify]=""}pop(t){t.forEach(e=>{e.el.style.top=`${e.el.offsetTop}px`,e.el.style[this.justify]=`${yt(e.el,this.justify)}px`}),t.forEach(e=>{e.el.setAttribute("inert",""),e.present=!1})}addNewAndUpdateExisting(t){const e=new Map,i=new Map,n=this.justify==="left",r=n?"prepend":"append";if(bt(t,a=>{let o;this.children.has(a.key)?(o=this.children.get(a.key),i.set(a,o),this.unpop(o),o.present=!0):(o=this.addChar(a,{startDigitsAtZero:!0,animateIn:!0}),e.set(a,o)),this.el[r](o.el)},{reverse:n}),this.flow.computedAnimated){const a=this.el.getBoundingClientRect();e.forEach(o=>{o.willUpdate(a)})}e.forEach((a,o)=>{a.update(o.value)}),i.forEach((a,o)=>{a.update(o.value)})}willUpdate(){const t=this.el.getBoundingClientRect();this._prevOffset=t[this.justify],this.children.forEach(e=>e.willUpdate(t))}didUpdate(){const t=this.el.getBoundingClientRect();this.children.forEach(n=>n.didUpdate(t));const e=t[this.justify],i=this._prevOffset-e;i&&this.children.size&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}};class W extends Z{update(t){const e=new Map;this.children.forEach((i,n)=>{t.find(r=>r.key===n)||e.set(n,i),this.unpop(i)}),this.addNewAndUpdateExisting(t),e.forEach(i=>{i instanceof q&&i.update(0)}),this.pop(e)}}class O extends Z{update(t){const e=new Map;this.children.forEach((i,n)=>{t.find(r=>r.key===n)||e.set(n,i)}),this.pop(e),this.addNewAndUpdateExisting(t)}}class R{constructor(t,e,{onRemove:i,animateIn:n=!1}={}){this.flow=t,this.el=e,this._present=!0,this._remove=()=>{var r;this.el.remove(),(r=this._onRemove)==null||r.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&n&&this.el.animate({[C]:[-.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=i}get present(){return this._present}set present(t){if(this._present!==t){if(this._present=t,t?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){t||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",t?"0":"-.999"),this.el.animate({[C]:t?[-.9999,0]:[.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),t?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:!0})}}}class G extends R{constructor(t,e,i,n){super(t.flow,i,n),this.section=t,this.value=e,this.el=i}}class q extends G{constructor(t,e,i,n,r){var a,o;const c=(((o=(a=t.flow.digits)==null?void 0:a[n])==null?void 0:o.max)??9)+1,l=Array.from({length:c}).map((m,_)=>{const b=g("span",{className:"digit__num"},[document.createTextNode(String(_))]);return _!==i&&b.setAttribute("inert",""),b.style.setProperty("--n",String(_)),b}),d=g("span",{part:`digit ${e}-digit`,className:"digit"},l);d.style.setProperty("--current",String(i)),d.style.setProperty("--length",String(c)),super(t,i,d,r),this.pos=n,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=l,this.length=c}willUpdate(t){const e=this.el.getBoundingClientRect();this._prevValue=this.value;const i=e[this.section.justify]-t[this.section.justify],n=e.width/2;this._prevCenter=this.section.justify==="left"?i+n:i-n}update(t){this.el.style.setProperty("--current",String(t)),this._numbers.forEach((e,i)=>i===t?e.removeAttribute("inert"):e.setAttribute("inert","")),this.value=t}didUpdate(t){const e=this.el.getBoundingClientRect(),i=e[this.section.justify]-t[this.section.justify],n=e.width/2,r=this.section.justify==="left"?i+n:i-n,a=this._prevCenter-r;a&&this.el.animate({transform:[`translateX(${a}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});const o=this.getDelta();o&&(this.el.classList.add("is-spinning"),this.el.animate({[V]:[-o,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:!0}))}getDelta(){var t;if(this.flow.plugins)for(const n of this.flow.plugins){const r=(t=n.getDelta)==null?void 0:t.call(n,this.value,this._prevValue,this);if(r!=null)return r}const e=this.value-this._prevValue,i=this.flow.computedTrend||Math.sign(e);return i<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:i>0&&this.value<this._prevValue?this.length-this._prevValue+this.value:e}}class kt extends G{constructor(t,e,i,n){const r=g("span",{className:"symbol__value",textContent:i});super(t,i,g("span",{part:`symbol ${e}`,className:"symbol"},[r]),n),this.type=e,this._children=new Map,this._onChildRemove=a=>()=>{this._children.delete(a)},this._children.set(i,new R(this.flow,r,{onRemove:this._onChildRemove(i)}))}willUpdate(t){if(this.type==="decimal")return;const e=this.el.getBoundingClientRect();this._prevOffset=e[this.section.justify]-t[this.section.justify]}update(t){if(this.value!==t){const e=this._children.get(this.value);e&&(e.present=!1);const i=this._children.get(t);if(i)i.present=!0;else{const n=g("span",{className:"symbol__value",textContent:t});this.el.appendChild(n),this._children.set(t,new R(this.flow,n,{animateIn:!0,onRemove:this._onChildRemove(t)}))}}this.value=t}didUpdate(t){if(this.type==="decimal")return;const e=this.el.getBoundingClientRect()[this.section.justify]-t[this.section.justify],i=this._prevOffset-e;i&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}const X=String.raw;(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})();typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)");typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)");const J="--_number-flow-d-opacity",K="--_number-flow-d-width",N="--_number-flow-dx",Q="--_number-flow-d";(()=>{try{return CSS.registerProperty({name:J,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:N,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:K,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:Q,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})();const E="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",f=`calc(${E} * 2)`,L="var(--number-flow-mask-width, 0.5em)",w=`calc(${L} / var(--scale-x))`,x="#000 0, transparent 71%",Ct=X`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${K}) / var(--width));transform:translateX(var(${N})) scaleX(var(--scale-x));margin:0 calc(-1 * ${L});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${w},#000 calc(100% - ${w}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${f},#000 calc(100% - ${f}),transparent 100% ),radial-gradient(at bottom right,${x}),radial-gradient(at bottom left,${x}),radial-gradient(at top left,${x}),radial-gradient(at top right,${x});-webkit-mask-size:100% calc(100% - ${f} * 2),calc(100% - ${w} * 2) 100%,${w} ${f},${w} ${f},${w} ${f},${w} ${f};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${E} ${L};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${N})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${Q})}.digit__num,.number .section::after{padding:${E} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${J}))}`,St=X`:host{display:inline-block;direction:ltr;white-space:nowrap;line-height:1}span{display:inline-block}:host([data-will-change]) span{will-change:transform}.number,.digit{padding:${E} 0}.symbol{white-space:pre}`,Et=(s="")=>X`:where(number-flow${s}){line-height:1}number-flow${s} > span{font-kerning:none;display:inline-block;padding:${f} 0}`,Tt=s=>[St,Et(s),Ct],tt=Symbol(),Rt=H({__name:"NumberFlowGroup",setup(s){const t=new Set;let e=!1;return lt(tt,(i,n)=>{t.add(i),ct(n,async()=>{e||(e=!0,t.forEach(async r=>{var a;!r.value||!r.value.created||(r.value.willUpdate(),await I(),(a=r.value)==null||a.didUpdate())}),await I(),e=!1)}),ht(()=>{t.delete(i)})}),(i,n)=>et(i.$slots,"default")}}),At=["batched","trend","plugins","animated","transformTiming","spinTiming","opacityTiming","respectMotionPreference","nonce","data-will-change","digits","innerHTML","data"],Nt=H({inheritAttrs:!1,__name:"index",props:{transformTiming:{default:()=>u.defaultProps.transformTiming},spinTiming:{default:()=>u.defaultProps.spinTiming},opacityTiming:{default:()=>u.defaultProps.opacityTiming},animated:{type:Boolean,default:()=>u.defaultProps.animated},respectMotionPreference:{type:Boolean,default:()=>u.defaultProps.respectMotionPreference},trend:{type:[Number,Function],default:()=>u.defaultProps.trend},plugins:{default:()=>u.defaultProps.plugins},digits:{default:()=>u.defaultProps.digits},locales:{},format:{},value:{},prefix:{},suffix:{},nonce:{},willChange:{type:Boolean,default:!1}},emits:["animationsstart","animationsfinish"],setup(s,{expose:t,emit:e}){const i=P();t({el:i});const n=e,r=j(()=>new Intl.NumberFormat(s.locales,s.format)),a=j(()=>$t(s.value,r.value,s.prefix,s.suffix)),o=void 0,c=it(tt,void 0);return c?.(i,a),(l,d)=>(nt(),st("number-flow-vue",at({ref_key:"el",ref:i},l.$attrs,{batched:!!D(c),trend:l.trend,plugins:l.plugins,animated:l.animated,transformTiming:l.transformTiming,spinTiming:l.spinTiming,opacityTiming:l.opacityTiming,respectMotionPreference:l.respectMotionPreference,nonce:l.nonce,"data-will-change":l.willChange?"":void 0,digits:l.digits,innerHTML:D(o),"data-allow-mismatch":"",onAnimationsstart:d[0]||(d[0]=m=>n("animationsstart")),onAnimationsfinish:d[1]||(d[1]=m=>n("animationsfinish")),data:a.value}),null,16,At))}}),Lt=Tt("-vue");_t("number-flow-vue",u);function Bt({respectMotionPreference:s=!0}={}){const t=P(!1),e=P(!1);return rt(()=>{var i;t.value=Y,e.value=((i=k)==null?void 0:i.matches)??!1}),ot(i=>{var n;if(!z(s))return;const r=({matches:a})=>{e.value=a};(n=k)==null||n.addEventListener("change",r),i(()=>{var a;(a=k)==null||a.removeEventListener("change",r)})}),j(()=>t.value&&(!z(s)||!e.value))}export{u as NumberFlowElement,Rt as NumberFlowGroup,jt as continuous,Nt as default,Lt as styles,Bt as useCanAnimate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as B,G as M,H as k,I as y,o as q,c as T,J as V,b as E,K as x,L as i,M as J,N as L,O as s,P,Q as U,R as W,S as z,T as A,U as G,V as g,W as H,X as b,Y as K}from"./index-
|
|
1
|
+
import{d as B,G as M,H as k,I as y,o as q,c as T,J as V,b as E,K as x,L as i,M as J,N as L,O as s,P,Q as U,R as W,S as z,T as A,U as G,V as g,W as H,X as b,Y as K}from"./index-BCl1NN6k.js";import Q from"./index-DKWp47QP.js";const Y=B({name:"ShwfedBlockAnimatedNumberItem",__name:"item",props:{item:{}},setup(h){const n=h,j=H(),a=x(void 0),m=x(0);function u(){return G(j)}function S(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){const t=Number(e);return Number.isFinite(t)?t:0}return 0}const d=i(()=>a.value===void 0?g():K(a.value));function v(e){if(!e)return"";try{const t=b(s(e,{...u(),json:d.value}));return t==null?"":String(t)}catch{return""}}const w=i(()=>v(n.item.prefix)),I=i(()=>v(n.item.suffix));function N(e){if(e)try{const t=b(s(e,{...u(),json:d.value}));return t==null?void 0:typeof t=="string"||typeof t=="object"?t:String(t)}catch{return}}const _=i(()=>N(n.item.style));async function r(){const e=n.item.dataSource,t=u(),F=J(function*(){let o=g();e.request&&(o=yield*L(yield*s(e.request,t)));const O=yield*s(e.value,{...t,json:o});return{json:P(o),value:O}});try{const o=await U(W(F,z));a.value=o.json,m.value=S(o.value)}catch(o){console.warn("[shwfed-animated-number] fetch failed",o)}}const l=i(()=>(n.item.pollingInterval??0)>0),C=i(()=>Math.max(1,n.item.pollingInterval??1)*1e3),c=A(),{pause:p,resume:f}=M(()=>{r()},C,{immediate:!1});return k(()=>{r(),l.value&&c.value&&f()}),y(c,e=>{l.value&&(e?(r(),f()):p())}),y(()=>[n.item.dataSource.request??"",n.item.dataSource.value,n.item.pollingInterval??0].join("|"),()=>{r(),l.value&&c.value?f():p()}),(e,t)=>(q(),T(E(Q),{value:m.value,prefix:w.value,suffix:I.value,style:V(_.value)},null,8,["value","prefix","suffix","style"]))}});export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,aT as u,aW as d,aX as l,aY as m,c as p,b as w,aZ as _,O as g,U as h,W as b,o as x}from"./index-
|
|
1
|
+
import{d as f,aT as u,aW as d,aX as l,aY as m,c as p,b as w,aZ as _,O as g,U as h,W as b,o as x}from"./index-BCl1NN6k.js";import{_ as k}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";const C=f({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const o=t,a=_(),i=b(),c=(n,e)=>g(n,{...h(i),...e});function s(n){try{return new URL(n,window.location.href).origin!==window.location.origin}catch{return!1}}const r=u(()=>d(c(o.config.url),n=>l(async()=>{const e=s(n);if(o.config.mode==="_blank"){window.open(e?n:a.resolve(n).href,"_blank");return}await m(n)})));return(n,e)=>(x(),p(k,{"action-id":t.buttonId,effect:w(r)},null,8,["action-id","effect"]))}});export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,a6 as i,c as l,b as p,L as m,o as d,h as f,a9 as _,aP as k,O as w,U as x,W as g}from"./index-
|
|
1
|
+
import{d as u,a6 as i,c as l,b as p,L as m,o as d,h as f,a9 as _,aP as k,O as w,U as x,W as g}from"./index-BCl1NN6k.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(s){const o=s,{locale:a}=i(),t=g(),c=(e,n)=>w(e,{...x(t),...n}),r=m(()=>{const e=_(o.config.content,a.value)??"";return k(e,c)});return(e,n)=>(d(),l(p(f),{"data-slot":"buttons-markdown",source:r.value,class:"prose prose-sm prose-zinc px-1"},null,8,["source"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,aT as f,aO as d,c as u,b as m,aS as p,o as l,O as g,U as h,W as _}from"./index-
|
|
1
|
+
import{d as r,aT as f,aO as d,c as u,b as m,aS as p,o as l,O as g,U as h,W as _}from"./index-BCl1NN6k.js";import{_ as C}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";const B=r({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const c=e,s=_(),a=(n,t)=>g(n,{...h(s),...t}),o=p(),i=f(()=>d(o,c.config.triggers,a));return(n,t)=>(l(),u(C,{"action-id":e.buttonId,effect:m(i)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";import{d as n,c,b as a,o as f,aV as i}from"./index-BCl1NN6k.js";const _=n({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),c(o,{"action-id":t.buttonId,effect:a(e)},null,8,["action-id","effect"]))}});export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,a6 as u,aT as p,aU as d,aO as l,b9 as m,a9 as g,c as x,b as h,O as E,U as _,aS as b,o as B,W as k}from"./index-
|
|
1
|
+
import{d as f,a6 as u,aT as p,aU as d,aO as l,b9 as m,a9 as g,c as x,b as h,O as E,U as _,aS as b,o as B,W as k}from"./index-BCl1NN6k.js";import{_ as C}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";const w=f({name:"ShwfedHttpRequestBatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(n){const e=n,{locale:a}=u(),c=k(),s=(t,o)=>E(t,{..._(c),...o}),i=b(),r=p(()=>d(l(i,e.config.before,s),()=>m(e.config.expression,s,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,continueOnError:e.config.continueOnError,markdown:g(e.config.markdown,a.value)??""})));return(t,o)=>(B(),x(C,{"action-id":n.buttonId,effect:h(r)},null,8,["action-id","effect"]))}});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s,a6 as B,a_ as M,M as p,a9 as c,a$ as x,X as T,c as N,w as d,b as u,K as S,$ as k,aS as L,b0 as $,o as w,j as F,J as I,a as r,b1 as j,b2 as A,aF as H,W as K,b3 as f,a3 as m,b4 as V}from"./index-
|
|
1
|
+
import{d as s,a6 as B,a_ as M,M as p,a9 as c,a$ as x,X as T,c as N,w as d,b as u,K as S,$ as k,aS as L,b0 as $,o as w,j as F,J as I,a as r,b1 as j,b2 as A,aF as H,W as K,b3 as f,a3 as m,b4 as V}from"./index-BCl1NN6k.js";import{_ as z}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";const Y=s({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(n){const a=n,{locale:l}=B(),v=e=>{},h=K(),i=k(f,void 0),g=L(),o=S(null),C=M(a.buttonId,{close:()=>$(()=>{o.value?.()})},g),_=s({name:"ModalBoundaryBridge",setup(e,{slots:t}){return A(h),m(V,C),i&&m(f,i),()=>t.default?.()}}),b=(e,t)=>H()?.(e,t),E=p(function*(){const e=c(a.config.modalTitle,l.value)??c(a.buttonTitle,l.value)??"",{modal:t,close:y}=yield*x({title:e,width:a.config.modalWidth});o.value=()=>T(y()),yield*t,o.value=null});return(e,t)=>(w(),N(z,{"action-id":n.buttonId,effect:u(E)},{default:d(()=>[F("div",{style:I(n.config.modalMinHeight?`min-height: ${n.config.modalMinHeight}`:void 0)},[r(u(_),null,{default:d(()=>[r(j,{"slot-value":n.config.slot,configure:v,"find-entry":b},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,b7 as g,aT as A,aW as y,aO as b,c as S,b as _,O as h,U as O,aS as j,b8 as k,W as C,o as B}from"./index-
|
|
1
|
+
import{d as l,b7 as g,aT as A,aW as y,aO as b,c as S,b as _,O as h,U as O,aS as j,b8 as k,W as C,o as B}from"./index-BCl1NN6k.js";import{_ as W}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";const F=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const a=s,f=C(),c=(e,t)=>h(e,{...O(f),...t}),n=g(),o=n.kind==="form"&&n.parent?n.parent:n,u=j(),m=k((e,t,r)=>{if(Array.isArray(e[t])&&Array.isArray(r))return e[t]=r,!0});function i(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return i(e)&&i(t)?m({...t},e):t}const d=A(()=>y(c(a.config.expression),e=>{for(const t of Object.keys(e)){const r=p(o.getAt(t),e[t]);o.setAt(t,r)}return b(u,a.config.onSuccess,c)}));return(e,t)=>(B(),S(W,{"action-id":s.buttonId,effect:_(d)},null,8,["action-id","effect"]))}});export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,a6 as g,M as l,aO as u,a9 as d,aP as p,aQ as m,aR as x,c as E,b as _,O as h,U as w,aS as C,W as b,o as k}from"./index-
|
|
1
|
+
import{d as f,a6 as g,M as l,aO as u,a9 as d,aP as p,aQ as m,aR as x,c as E,b as _,O as h,U as w,aS as C,W as b,o as k}from"./index-BCl1NN6k.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";const B=f({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(c){const n=c,{locale:i}=g(),a=b(),s=(e,o)=>h(e,{...w(a),...o}),t=C(),r=l(function*(){yield*u(t,n.config.before,s);const e=d(n.config.markdown,i.value)??"",o=p(e,s);(yield*m({content:o,icon:n.config.icon,color:n.config.color}))||(yield*x(n.config.expression,s,{messageExpression:n.config.messageExpression,resultExpression:n.config.resultExpression,channel:t,triggers:{success:n.config.onSuccess,warning:n.config.onWarning,error:n.config.onError,info:n.config.onInfo}}))});return(e,o)=>(k(),E(I,{"action-id":c.buttonId,effect:_(r)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,aT as f,aU as u,aO as g,aR as p,c as d,b as m,O as l,U as x,aS as h,W as E,o as _}from"./index-
|
|
1
|
+
import{d as r,aT as f,aU as u,aO as g,aR as p,c as d,b as m,O as l,U as x,aS as h,W as E,o as _}from"./index-BCl1NN6k.js";import{_ as b}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";const B=r({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(n){const e=n,i=E(),s=(t,c)=>l(t,{...x(i),...c}),o=h(),a=f(()=>u(g(o,e.config.before,s),()=>p(e.config.expression,s,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:o,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}})));return(t,c)=>(_(),d(b,{"action-id":n.buttonId,effect:m(a)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as h,aT as S,M as _,b0 as r,aO as m,b5 as E,b6 as j,c as v,b as x,O as B,U as L,aS as k,W as C,o as O}from"./index-
|
|
1
|
+
import{d as h,aT as S,M as _,b0 as r,aO as m,b5 as E,b6 as j,c as v,b as x,O as B,U as L,aS as k,W as C,o as O}from"./index-BCl1NN6k.js";import{_ as R}from"./definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js";const q=h({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>B(e,{...L(g),...n}),l=k(),p=new Set(["success","error","warning","info"]);function f(e){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=e.name,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(n)}const y=S(()=>_(function*(){const{template:e,messageExpression:n,resultExpression:o}=c.config,u=yield*t(e.request);if(!e.download){const s=yield*u.file();return yield*r(()=>f(s)),yield*m(l,c.config.onSuccess,t)}const a={json:yield*u.json()},i=o===void 0?"success":yield*E(t(o,a),s=>p.has(s)?s:"success");if(n!==void 0){const s=yield*t(n,a);yield*r(()=>j[i](s))}if(i==="success"||i==="info"){const b=yield*(yield*t(e.download,a)).file();yield*r(()=>f(b))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i],t)}));return(e,n)=>(O(),v(R,{"action-id":d.buttonId,effect:x(y)},null,8,["action-id","effect"]))}});export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,D as l,E as d}from"./index-
|
|
1
|
+
import{C as o,D as l,E as d}from"./index-BCl1NN6k.js";function i(n){switch(n._tag){case"TypeLiteral":return n;case"Transformation":return i(n.to);case"Refinement":return i(n.from);case"Suspend":return i(n.f());default:return null}}function p(n,t){const e=i(n.ast);return e?e.propertySignatures.find(r=>r.name===t)??null:null}function y(n){const t=n.type;if(t._tag==="Union"&&n.isOptional){const e=t.types.find(r=>r._tag!=="UndefinedKeyword");if(e)return e}return t}function c(n,t,e){const r=p(n,t);if(!r)return;const u=e(r);if(o(u))return u.value;const f=y(r),s=e(f);if(o(s))return s.value;if(f!==r.type){const a=e(r.type);if(o(a))return a.value}}function m(n,t){return c(n,t,l)}function v(n,t){return c(n,t,d)}export{v as a,m as g};
|
package/dist/preview/index.html
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
`--primary`, the primary button variant renders as transparent. */
|
|
11
11
|
body { --primary: #009689; }
|
|
12
12
|
</style>
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-BCl1NN6k.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-8Ph-sFDI.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="app"></div>
|
package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/runtime.vue
CHANGED
|
@@ -33,6 +33,24 @@ const ICONS = {
|
|
|
33
33
|
"application/msword": "vscode-icons:file-type-word",
|
|
34
34
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "vscode-icons:file-type-word"
|
|
35
35
|
};
|
|
36
|
+
const EXTENSIONS = {
|
|
37
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
|
38
|
+
"application/vnd.ms-excel": [".xls"],
|
|
39
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": [".pptx"],
|
|
40
|
+
"application/vnd.ms-powerpoint": [".ppt"],
|
|
41
|
+
"application/zip": [".zip"],
|
|
42
|
+
"application/x-zip-compressed": [".zip"],
|
|
43
|
+
"application/vnd.rar": [".rar"],
|
|
44
|
+
"application/x-rar-compressed": [".rar"],
|
|
45
|
+
"application/pdf": [".pdf"],
|
|
46
|
+
"application/ofd": [".ofd"],
|
|
47
|
+
"application/xml": [".xml"],
|
|
48
|
+
"image/png": [".png"],
|
|
49
|
+
"image/jpg": [".jpg"],
|
|
50
|
+
"image/jpeg": [".jpeg", ".jpg"],
|
|
51
|
+
"application/msword": [".doc"],
|
|
52
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": [".docx"]
|
|
53
|
+
};
|
|
36
54
|
const SHORT_NAMES = {
|
|
37
55
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
38
56
|
"application/vnd.ms-excel": "XLS",
|
|
@@ -181,7 +199,11 @@ const canAdd = computed(() => !isDisabled.value && !isReadonly.value && !isFull.
|
|
|
181
199
|
function isMimeAllowed(file) {
|
|
182
200
|
const list = props.config.accept;
|
|
183
201
|
if (!list || list.length === 0) return true;
|
|
184
|
-
|
|
202
|
+
if (file.type && list.includes(file.type)) return true;
|
|
203
|
+
const dot = file.name.lastIndexOf(".");
|
|
204
|
+
if (dot < 0) return false;
|
|
205
|
+
const ext = file.name.slice(dot).toLowerCase();
|
|
206
|
+
return list.some((mime) => EXTENSIONS[mime]?.includes(ext));
|
|
185
207
|
}
|
|
186
208
|
function partition(incoming) {
|
|
187
209
|
const accepted = [];
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue
CHANGED
|
@@ -4,6 +4,7 @@ import { Icon } from "@iconify/vue";
|
|
|
4
4
|
import { format as formatDate } from "date-fns";
|
|
5
5
|
import { Input } from "../../../../ui/input";
|
|
6
6
|
import { Separator } from "../../../../ui/separator";
|
|
7
|
+
import { Switch } from "../../../../ui/switch";
|
|
7
8
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
9
|
import { Locale } from "../../../../ui/locale";
|
|
9
10
|
import {
|
|
@@ -37,6 +38,14 @@ const ALIGN_OPTIONS = [
|
|
|
37
38
|
const currentAlignIcon = computed(
|
|
38
39
|
() => (ALIGN_OPTIONS.find((o) => o.value === (value.value.align ?? "left")) ?? ALIGN_OPTIONS[0]).icon
|
|
39
40
|
);
|
|
41
|
+
function onHiddenChange(v) {
|
|
42
|
+
if (v) {
|
|
43
|
+
value.value = { ...value.value, hidden: true };
|
|
44
|
+
} else {
|
|
45
|
+
const { hidden: _drop, ...rest } = value.value;
|
|
46
|
+
value.value = rest;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
40
49
|
const dateFormatExample = computed(() => {
|
|
41
50
|
const fmt = value.value?.format;
|
|
42
51
|
if (!fmt) return "";
|
|
@@ -238,6 +247,27 @@ const dateFormatExample = computed(() => {
|
|
|
238
247
|
</InputGroupAddon>
|
|
239
248
|
</InputGroup>
|
|
240
249
|
</Field>
|
|
250
|
+
<Field orientation="vertical">
|
|
251
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
252
|
+
<template
|
|
253
|
+
v-if="fieldDescription('hidden')"
|
|
254
|
+
#tooltip
|
|
255
|
+
>
|
|
256
|
+
<Markdown
|
|
257
|
+
:source="fieldDescription('hidden')"
|
|
258
|
+
block
|
|
259
|
+
class="prose prose-sm prose-zinc"
|
|
260
|
+
/>
|
|
261
|
+
</template>
|
|
262
|
+
{{ fieldTitle("hidden") }}
|
|
263
|
+
</FieldLabel>
|
|
264
|
+
<div>
|
|
265
|
+
<Switch
|
|
266
|
+
:model-value="value.hidden ?? false"
|
|
267
|
+
@update:model-value="onHiddenChange"
|
|
268
|
+
/>
|
|
269
|
+
</div>
|
|
270
|
+
</Field>
|
|
241
271
|
</div>
|
|
242
272
|
</div>
|
|
243
273
|
</template>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
20
20
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
21
21
|
message: Schema.SchemaClass<string, string, never>;
|
|
22
22
|
}>]>;
|
|
23
|
-
accessor: Schema.Schema<string, string, never
|
|
23
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
24
24
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
25
25
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
26
26
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -32,6 +32,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
32
32
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
33
33
|
message: Schema.SchemaClass<string, string, never>;
|
|
34
34
|
}>]>>;
|
|
35
|
+
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
35
36
|
id: Schema.refine<string, typeof Schema.String>;
|
|
36
37
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
37
38
|
type: Schema.Literal<["com.shwfed.table.column.date"]>;
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.js
CHANGED
|
@@ -24,7 +24,6 @@ export function schema(configure) {
|
|
|
24
24
|
export function defaults() {
|
|
25
25
|
return {
|
|
26
26
|
title: [{ locale: "zh", message: "" }],
|
|
27
|
-
accessor: "",
|
|
28
27
|
format: "yyyy-MM-dd",
|
|
29
28
|
size: 120
|
|
30
29
|
};
|
|
@@ -33,6 +32,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
33
32
|
return {
|
|
34
33
|
header: getLocaleText(value.title),
|
|
35
34
|
accessorFn: (row, index) => {
|
|
35
|
+
if (!value.accessor) return void 0;
|
|
36
36
|
try {
|
|
37
37
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
38
38
|
} catch (e) {
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue
CHANGED
|
@@ -3,6 +3,7 @@ import { computed } from "vue";
|
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
5
|
import { Separator } from "../../../../ui/separator";
|
|
6
|
+
import { Switch } from "../../../../ui/switch";
|
|
6
7
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
7
8
|
import { Locale } from "../../../../ui/locale";
|
|
8
9
|
import {
|
|
@@ -50,6 +51,14 @@ const ROW_VARS = {
|
|
|
50
51
|
row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
|
|
51
52
|
index: { type: "number", label: "\u884C\u7D22\u5F15" }
|
|
52
53
|
};
|
|
54
|
+
function onHiddenChange(v) {
|
|
55
|
+
if (v) {
|
|
56
|
+
value.value = { ...value.value, hidden: true };
|
|
57
|
+
} else {
|
|
58
|
+
const { hidden: _drop, ...rest } = value.value;
|
|
59
|
+
value.value = rest;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
53
62
|
</script>
|
|
54
63
|
|
|
55
64
|
<template>
|
|
@@ -232,6 +241,27 @@ const ROW_VARS = {
|
|
|
232
241
|
</InputGroupAddon>
|
|
233
242
|
</InputGroup>
|
|
234
243
|
</Field>
|
|
244
|
+
<Field orientation="vertical">
|
|
245
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
246
|
+
<template
|
|
247
|
+
v-if="fieldDescription('hidden')"
|
|
248
|
+
#tooltip
|
|
249
|
+
>
|
|
250
|
+
<Markdown
|
|
251
|
+
:source="fieldDescription('hidden')"
|
|
252
|
+
block
|
|
253
|
+
class="prose prose-sm prose-zinc"
|
|
254
|
+
/>
|
|
255
|
+
</template>
|
|
256
|
+
{{ fieldTitle("hidden") }}
|
|
257
|
+
</FieldLabel>
|
|
258
|
+
<div>
|
|
259
|
+
<Switch
|
|
260
|
+
:model-value="value.hidden ?? false"
|
|
261
|
+
@update:model-value="onHiddenChange"
|
|
262
|
+
/>
|
|
263
|
+
</div>
|
|
264
|
+
</Field>
|
|
235
265
|
</div>
|
|
236
266
|
</div>
|
|
237
267
|
</template>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const metadata: {
|
|
|
9
9
|
readonly icon: "fluent:shapes-20-regular";
|
|
10
10
|
};
|
|
11
11
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
12
|
-
accessor: Schema.Schema<string, string, never
|
|
12
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
13
13
|
color: Schema.optional<Schema.Schema<string, string, never>>;
|
|
14
14
|
align: Schema.optionalWith<Schema.Literal<["left", "center", "right"]>, {
|
|
15
15
|
default: () => "center";
|
|
@@ -32,6 +32,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
32
32
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
33
33
|
message: Schema.SchemaClass<string, string, never>;
|
|
34
34
|
}>]>>;
|
|
35
|
+
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
35
36
|
id: Schema.refine<string, typeof Schema.String>;
|
|
36
37
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
37
38
|
type: Schema.Literal<["com.shwfed.table.column.icon"]>;
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.js
CHANGED
|
@@ -11,10 +11,13 @@ export function schema(configure) {
|
|
|
11
11
|
type: Schema.Literal(type),
|
|
12
12
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
13
13
|
...columnFields(configure),
|
|
14
|
-
|
|
14
|
+
// Optional like every non-editable column's path: an icon column may carry
|
|
15
|
+
// no data binding (a fixed decorative cell), letting designers build the
|
|
16
|
+
// visual layer before any API contract exists.
|
|
17
|
+
accessor: Schema.optional(CelRowAccess(configure).annotations({
|
|
15
18
|
title: "\u56FE\u6807",
|
|
16
|
-
description: "\u56FE\u6807\u540D\u79F0 CEL \u8868\u8FBE\u5F0F\uFF08Iconify \u6807\u8BC6\u7B26\uFF09\uFF0C\u4F8B\u5982 `row.iconName
|
|
17
|
-
}),
|
|
19
|
+
description: "\u56FE\u6807\u540D\u79F0 CEL \u8868\u8FBE\u5F0F\uFF08Iconify \u6807\u8BC6\u7B26\uFF09\uFF0C\u4F8B\u5982 `row.iconName`\uFF1B\u53EF\u7559\u7A7A\uFF0C\u7559\u7A7A\u65F6\u4E0D\u6E32\u67D3\u56FE\u6807"
|
|
20
|
+
})),
|
|
18
21
|
color: Schema.optional(
|
|
19
22
|
CelRowAccess(configure, { resultType: "string" }).annotations({
|
|
20
23
|
title: "\u989C\u8272",
|
|
@@ -27,7 +30,6 @@ export function schema(configure) {
|
|
|
27
30
|
export function defaults() {
|
|
28
31
|
return {
|
|
29
32
|
title: [{ locale: "zh", message: "" }],
|
|
30
|
-
accessor: "",
|
|
31
33
|
size: 120
|
|
32
34
|
};
|
|
33
35
|
}
|
|
@@ -35,6 +37,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
35
37
|
return {
|
|
36
38
|
header: getLocaleText(value.title),
|
|
37
39
|
accessorFn: (row, index) => {
|
|
40
|
+
if (!value.accessor) return void 0;
|
|
38
41
|
try {
|
|
39
42
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
40
43
|
} catch (e) {
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue
CHANGED
|
@@ -3,6 +3,7 @@ import { computed } from "vue";
|
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { Input } from "../../../../ui/input";
|
|
5
5
|
import { Separator } from "../../../../ui/separator";
|
|
6
|
+
import { Switch } from "../../../../ui/switch";
|
|
6
7
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
7
8
|
import { Locale } from "../../../../ui/locale";
|
|
8
9
|
import {
|
|
@@ -55,6 +56,14 @@ const DISPLAY_MODE_OPTIONS = [
|
|
|
55
56
|
const currentPreserveModeLabel = computed(
|
|
56
57
|
() => PRESERVE_MODE_OPTIONS.find((o) => o.value === (value.value.preserveMode ?? "round"))?.label
|
|
57
58
|
);
|
|
59
|
+
function onHiddenChange(v) {
|
|
60
|
+
if (v) {
|
|
61
|
+
value.value = { ...value.value, hidden: true };
|
|
62
|
+
} else {
|
|
63
|
+
const { hidden: _drop, ...rest } = value.value;
|
|
64
|
+
value.value = rest;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
58
67
|
function onPreserveDigitsChange(v) {
|
|
59
68
|
const next = { ...value.value, preserveDigits: v };
|
|
60
69
|
if (v === void 0) {
|
|
@@ -307,6 +316,27 @@ function onPreserveDigitsChange(v) {
|
|
|
307
316
|
</InputGroupAddon>
|
|
308
317
|
</InputGroup>
|
|
309
318
|
</Field>
|
|
319
|
+
<Field orientation="vertical">
|
|
320
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
321
|
+
<template
|
|
322
|
+
v-if="fieldDescription('hidden')"
|
|
323
|
+
#tooltip
|
|
324
|
+
>
|
|
325
|
+
<Markdown
|
|
326
|
+
:source="fieldDescription('hidden')"
|
|
327
|
+
block
|
|
328
|
+
class="prose prose-sm prose-zinc"
|
|
329
|
+
/>
|
|
330
|
+
</template>
|
|
331
|
+
{{ fieldTitle("hidden") }}
|
|
332
|
+
</FieldLabel>
|
|
333
|
+
<div>
|
|
334
|
+
<Switch
|
|
335
|
+
:model-value="value.hidden ?? false"
|
|
336
|
+
@update:model-value="onHiddenChange"
|
|
337
|
+
/>
|
|
338
|
+
</div>
|
|
339
|
+
</Field>
|
|
310
340
|
</div>
|
|
311
341
|
</div>
|
|
312
342
|
</template>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
24
24
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
25
25
|
message: Schema.SchemaClass<string, string, never>;
|
|
26
26
|
}>]>;
|
|
27
|
-
accessor: Schema.Schema<string, string, never
|
|
27
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
28
28
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
29
29
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
30
30
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -36,6 +36,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
36
36
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
37
37
|
message: Schema.SchemaClass<string, string, never>;
|
|
38
38
|
}>]>>;
|
|
39
|
+
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
39
40
|
id: Schema.refine<string, typeof Schema.String>;
|
|
40
41
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
41
42
|
type: Schema.Literal<["com.shwfed.table.column.number"]>;
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.js
CHANGED
|
@@ -32,7 +32,6 @@ export function schema(configure) {
|
|
|
32
32
|
export function defaults() {
|
|
33
33
|
return {
|
|
34
34
|
title: [{ locale: "zh", message: "" }],
|
|
35
|
-
accessor: "",
|
|
36
35
|
size: 120,
|
|
37
36
|
align: "right"
|
|
38
37
|
};
|
|
@@ -41,6 +40,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
41
40
|
return {
|
|
42
41
|
header: getLocaleText(value.title),
|
|
43
42
|
accessorFn: (row, index) => {
|
|
43
|
+
if (!value.accessor) return void 0;
|
|
44
44
|
try {
|
|
45
45
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
46
46
|
} catch (e) {
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue
CHANGED
|
@@ -4,6 +4,7 @@ import { Icon } from "@iconify/vue";
|
|
|
4
4
|
import { Input } from "../../../../ui/input";
|
|
5
5
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
6
6
|
import { Separator } from "../../../../ui/separator";
|
|
7
|
+
import { Switch } from "../../../../ui/switch";
|
|
7
8
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
9
|
import { Locale } from "../../../../ui/locale";
|
|
9
10
|
import {
|
|
@@ -47,6 +48,14 @@ const DISPLAY_MODE_OPTIONS = [
|
|
|
47
48
|
{ value: "plain", label: "\u6587\u672C" },
|
|
48
49
|
{ value: "mono", label: "\u7B49\u5BBD" }
|
|
49
50
|
];
|
|
51
|
+
function onHiddenChange(v) {
|
|
52
|
+
if (v) {
|
|
53
|
+
value.value = { ...value.value, hidden: true };
|
|
54
|
+
} else {
|
|
55
|
+
const { hidden: _drop, ...rest } = value.value;
|
|
56
|
+
value.value = rest;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
50
59
|
const copyExpressionModel = computed({
|
|
51
60
|
get: () => value.value.copyExpression ?? "",
|
|
52
61
|
set: (v) => {
|
|
@@ -272,6 +281,27 @@ const copyExpressionModel = computed({
|
|
|
272
281
|
</InputGroupAddon>
|
|
273
282
|
</InputGroup>
|
|
274
283
|
</Field>
|
|
284
|
+
<Field orientation="vertical">
|
|
285
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
286
|
+
<template
|
|
287
|
+
v-if="fieldDescription('hidden')"
|
|
288
|
+
#tooltip
|
|
289
|
+
>
|
|
290
|
+
<Markdown
|
|
291
|
+
:source="fieldDescription('hidden')"
|
|
292
|
+
block
|
|
293
|
+
class="prose prose-sm prose-zinc"
|
|
294
|
+
/>
|
|
295
|
+
</template>
|
|
296
|
+
{{ fieldTitle("hidden") }}
|
|
297
|
+
</FieldLabel>
|
|
298
|
+
<div>
|
|
299
|
+
<Switch
|
|
300
|
+
:model-value="value.hidden ?? false"
|
|
301
|
+
@update:model-value="onHiddenChange"
|
|
302
|
+
/>
|
|
303
|
+
</div>
|
|
304
|
+
</Field>
|
|
275
305
|
</div>
|
|
276
306
|
</div>
|
|
277
307
|
</template>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
23
23
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
24
24
|
message: Schema.SchemaClass<string, string, never>;
|
|
25
25
|
}>]>;
|
|
26
|
-
accessor: Schema.Schema<string, string, never
|
|
26
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
27
27
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
28
28
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
29
29
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -35,6 +35,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
35
35
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
36
36
|
message: Schema.SchemaClass<string, string, never>;
|
|
37
37
|
}>]>>;
|
|
38
|
+
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
38
39
|
id: Schema.refine<string, typeof Schema.String>;
|
|
39
40
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
40
41
|
type: Schema.Literal<["com.shwfed.table.column.text"]>;
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.js
CHANGED
|
@@ -30,7 +30,6 @@ export function schema(configure) {
|
|
|
30
30
|
export function defaults() {
|
|
31
31
|
return {
|
|
32
32
|
title: [{ locale: "zh", message: "" }],
|
|
33
|
-
accessor: "",
|
|
34
33
|
size: 120
|
|
35
34
|
};
|
|
36
35
|
}
|
|
@@ -38,6 +37,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
38
37
|
return {
|
|
39
38
|
header: getLocaleText(value.title),
|
|
40
39
|
accessorFn: (row, index) => {
|
|
40
|
+
if (!value.accessor) return void 0;
|
|
41
41
|
try {
|
|
42
42
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
43
43
|
} catch (e) {
|