@shwfed/config 2.3.26 → 2.3.27
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/module.json +1 -1
- package/dist/preview/assets/{config-DPFHMkHc.js → config-Bv_hUugV.js} +1 -1
- package/dist/preview/assets/{config-BkimX91E.js → config-C45AT0tt.js} +1 -1
- package/dist/preview/assets/{config-u1rl9w2L.js → config-CIcy6Jwg.js} +1 -1
- package/dist/preview/assets/{config-BATy87wV.js → config-CRqRJ0oF.js} +1 -1
- package/dist/preview/assets/{config-CO2iovZD.js → config-CXaH7a2G.js} +1 -1
- package/dist/preview/assets/{config-ypYLVfRE.js → config-D-i-AFgH.js} +1 -1
- package/dist/preview/assets/{config-Dzqe6v-x.js → config-D0YS2Bpj.js} +1 -1
- package/dist/preview/assets/{config-Cm9t0CvW.js → config-DrpESRR5.js} +1 -1
- package/dist/preview/assets/{config-DgZ4NYoA.js → config-l3KurfL5.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-CliXxe84.js → definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js} +1 -1
- package/dist/preview/assets/index-C3Ycah5_.js +643 -0
- package/dist/preview/assets/index-hWT4_I5k.js +1 -0
- package/dist/preview/assets/{runtime-Cj0kLSqP.js → runtime-BSASeqgI.js} +1 -1
- package/dist/preview/assets/{runtime-D1xLbTQ9.js → runtime-CmCvUWLV.js} +1 -1
- package/dist/preview/assets/{runtime-Dtc1ETUF.js → runtime-CvuGnDIa.js} +1 -1
- package/dist/preview/assets/{runtime-T_tUqLxO.js → runtime-D42ecZyC.js} +1 -1
- package/dist/preview/assets/{runtime-BR6-W3u_.js → runtime-D6twt5H_.js} +1 -1
- package/dist/preview/assets/{runtime-BTROwcw4.js → runtime-DUyUjFqF.js} +1 -1
- package/dist/preview/assets/{runtime-CTpsTb-X.js → runtime-Df715bRA.js} +1 -1
- package/dist/preview/assets/{runtime-B_FMZ5eD.js → runtime-tobnPKdV.js} +1 -1
- package/dist/preview/assets/{runtime-Dsx8Y56q.js → runtime-z_QPMN-R.js} +1 -1
- package/dist/preview/index.html +1 -1
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue +36 -13
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.vue +36 -12
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.vue +0 -1
- package/dist/runtime/components/ui/command/CommandItem.vue +12 -4
- package/package.json +1 -1
- package/dist/preview/assets/index-6rM4rqXR.js +0 -1
- package/dist/preview/assets/index-wBVA0mNO.js +0 -643
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aL as e}from"./index-C3Ycah5_.js";import{aM as r,aN as s,aO as t}from"./index-C3Ycah5_.js";export{r as TableConfig,s as createTableConfig,e as default,t as getColumnTechnicalKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,ae as l,e as i,u as p,$ as m,o as d,k as f,ag as _,ah as k,ak as g,al as w,am as x}from"./index-
|
|
1
|
+
import{d as u,ae as l,e as i,u as p,$ as m,o as d,k as f,ag as _,ah as k,ak as g,al as w,am as x}from"./index-C3Ycah5_.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(n){const s=n,{locale:o}=l(),t=x(),c=(e,a)=>g(e,{...w(t),...a}),r=m(()=>{const e=_(s.config.content,o.value)??"";return k(e,c)});return(e,a)=>(d(),i(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{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js";import{d as s,ao as c,aB as i,e as r,u as f,an as u,o as m}from"./index-C3Ycah5_.js";const g=s({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=c(()=>i(t,n.config.triggers));return(p,d)=>(m(),r(o,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g 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-Ck8Pbwem.js";import{d as n,e as a,u as c,o as f,ap as i}from"./index-C3Ycah5_.js";const p=n({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=i;return(r,s)=>(f(),a(o,{"action-id":e.buttonId,effect:c(t)},null,8,["action-id","effect"]))}});export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,ao as f,aj as u,e as p,u as g,ak as m,al as l,am as d,an as x,o as E}from"./index-
|
|
1
|
+
import{d as r,ao as f,aj as u,e as p,u as g,ak as m,al as l,am as d,an as x,o as E}from"./index-C3Ycah5_.js";import{_}from"./definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js";const k=r({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(n){const e=n,t=d(),c=(s,o)=>m(s,{...l(t),...o}),i=x(),a=f(()=>u(e.config.expression,c,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:i,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}));return(s,o)=>(E(),p(_,{"action-id":n.buttonId,effect:g(a)},null,8,["action-id","effect"]))}});export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as _,ao as B,af as E,ar as r,aB as m,aC as S,aD as j,e as k,u as v,ak as x,al as C,an as L,am as b,o as R}from"./index-
|
|
1
|
+
import{d as _,ao as B,af as E,ar as r,aB as m,aC as S,aD as j,e as k,u as v,ak as x,al as C,an as L,am as b,o as R}from"./index-C3Ycah5_.js";import{_ as T}from"./definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js";const q=_({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=b(),t=(e,n)=>x(e,{...C(g),...n}),l=L(),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=B(()=>E(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*S(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 h=yield*(yield*t(e.download,a)).file();yield*r(()=>f(h))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i])}));return(e,n)=>(R(),k(T,{"action-id":d.buttonId,effect:v(y)},null,8,["action-id","effect"]))}});export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,ae as u,af as l,ag as g,ah as m,ai as p,aj as d,e as x,u as E,ak as _,al as h,am as k,an as w,o as C}from"./index-
|
|
1
|
+
import{d as f,ae as u,af as l,ag as g,ah as m,ai as p,aj as d,e as x,u as E,ak as _,al as h,am as k,an as w,o as C}from"./index-C3Ycah5_.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js";const R=f({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const n=s,{locale:c}=u(),a=k(),t=(e,o)=>_(e,{...h(a),...o}),i=w(),r=l(function*(){const e=g(n.config.markdown,c.value)??"",o=m(e,t);(yield*p({content:o,icon:n.config.icon,color:n.config.color}))||(yield*d(n.config.expression,t,{messageExpression:n.config.messageExpression,resultExpression:n.config.resultExpression,channel:i,triggers:{success:n.config.onSuccess,warning:n.config.onWarning,error:n.config.onError,info:n.config.onInfo}}))});return(e,o)=>(C(),x(I,{"action-id":s.buttonId,effect:E(r)},null,8,["action-id","effect"]))}});export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,ae as x,as as p,af as M,ag as c,at as T,au as N,e as b,w as d,u,a0 as k,a1 as w,an as L,ar as S,o as A,f as I,av as z,g as r,aw as F,ax as H,a7 as V,am as $,ay as f,az as m,aA as j}from"./index-
|
|
1
|
+
import{d as i,ae as x,as as p,af as M,ag as c,at as T,au as N,e as b,w as d,u,a0 as k,a1 as w,an as L,ar as S,o as A,f as I,av as z,g as r,aw as F,ax as H,a7 as V,am as $,ay as f,az as m,aA as j}from"./index-C3Ycah5_.js";import{_ as K}from"./definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js";const O=i({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(a){const n=a,{locale:l}=x(),v=e=>{},g=$(),s=w(f,void 0),h=L(),o=k(null),C=p(n.buttonId,{close:()=>S(()=>{o.value?.()})},h),y=i({name:"ModalBoundaryBridge",setup(e,{slots:t}){return H(g),m(j,C),s&&m(f,s),()=>t.default?.()}}),E=(e,t)=>V()?.(e,t),_=M(function*(){const e=c(n.config.modalTitle,l.value)??c(n.buttonTitle,l.value)??"",{modal:t,close:B}=yield*T({title:e,width:n.config.modalWidth});o.value=()=>N(B()),yield*t,o.value=null});return(e,t)=>(A(),b(K,{"action-id":a.buttonId,effect:u(_)},{default:d(()=>[I("div",{style:z(a.config.modalMinHeight?`min-height: ${a.config.modalMinHeight}`:void 0)},[r(u(y),null,{default:d(()=>[r(F,{"slot-value":a.config.slot,configure:v,"find-entry":E},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,ao as f,aq as r,ar as d,e as m,u,ak as l,al as p,am as _,o as g}from"./index-
|
|
1
|
+
import{d as i,ao as f,aq as r,ar as d,e as m,u,ak as l,al as p,am as _,o as g}from"./index-C3Ycah5_.js";import{_ as h}from"./definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js";const x=i({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=e,o=_(),c=(n,a)=>l(n,{...p(o),...a}),s=f(()=>r(c(t.config.url),n=>d(()=>{window.open(n,t.config.mode)})));return(n,a)=>(g(),m(h,{"action-id":e.buttonId,effect:u(s)},null,8,["action-id","effect"]))}});export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,aE as g,ao as A,aq as y,aB as _,e as h,u as S,ak as b,al as k,an as j,aF as B,o as C,am as E}from"./index-
|
|
1
|
+
import{d as l,aE as g,ao as A,aq as y,aB as _,e as h,u as S,ak as b,al as k,an as j,aF as B,o as C,am as E}from"./index-C3Ycah5_.js";import{_ as F}from"./definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js";const I=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=E(),f=(e,t)=>b(e,{...k(i),...t}),n=g(),o=n.kind==="form"&&n.parent?n.parent:n,u=j(),m=B((e,t,a)=>{if(Array.isArray(e[t])&&Array.isArray(a))return e[t]=a,!0});function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return c(e)&&c(t)?m({...t},e):t}const d=A(()=>y(f(s.config.expression),e=>{for(const t of Object.keys(e)){const a=p(o.getAt(t),e[t]);o.setAt(t,a)}return _(u,s.config.onSuccess)}));return(e,t)=>(C(),h(F,{"action-id":r.buttonId,effect:S(d)},null,8,["action-id","effect"]))}});export{I 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-C3Ycah5_.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-BCE-G4Ha.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
@@ -110,27 +110,51 @@ const selectedEntries = computed(() => {
|
|
|
110
110
|
return list;
|
|
111
111
|
});
|
|
112
112
|
const selectedKeys = computed(() => selectedEntries.value.map((e) => e.key));
|
|
113
|
-
const
|
|
113
|
+
const pendingKeys = ref(null);
|
|
114
|
+
const open = ref(false);
|
|
115
|
+
watch(open, (next, prev) => {
|
|
116
|
+
if (!prev && next) {
|
|
117
|
+
pendingKeys.value = [...selectedKeys.value];
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (prev && !next && pendingKeys.value !== null) {
|
|
121
|
+
const mapped = [];
|
|
122
|
+
for (const key of pendingKeys.value) {
|
|
123
|
+
const entry = entries.value.find((e) => e.key === key);
|
|
124
|
+
if (entry) mapped.push(entry.value);
|
|
125
|
+
}
|
|
126
|
+
formState.setAt(props.column.binding, mapped);
|
|
127
|
+
pendingKeys.value = null;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
const displayKeys = computed(
|
|
131
|
+
() => pendingKeys.value ?? selectedKeys.value
|
|
132
|
+
);
|
|
133
|
+
const displayKeySet = computed(() => new Set(displayKeys.value));
|
|
134
|
+
const displayEntries = computed(() => {
|
|
135
|
+
if (pendingKeys.value === null) return selectedEntries.value;
|
|
136
|
+
const list = [];
|
|
137
|
+
for (const key of displayKeys.value) {
|
|
138
|
+
const entry = entries.value.find((e) => e.key === key);
|
|
139
|
+
if (entry) list.push(entry);
|
|
140
|
+
}
|
|
141
|
+
return list;
|
|
142
|
+
});
|
|
114
143
|
const triggerLabel = computed(() => {
|
|
115
|
-
const arr =
|
|
144
|
+
const arr = displayEntries.value;
|
|
116
145
|
if (arr.length === 0) return "";
|
|
117
146
|
if (arr.length === 1) return arr[0].label;
|
|
118
147
|
return `${arr[0].label} +${arr.length - 1}`;
|
|
119
148
|
});
|
|
120
|
-
const open = ref(false);
|
|
121
149
|
function handleSelect(next) {
|
|
122
150
|
const keys = Array.isArray(next) ? next.filter((k) => typeof k === "string") : [];
|
|
123
|
-
|
|
124
|
-
for (const key of keys) {
|
|
125
|
-
const entry = entries.value.find((e) => e.key === key);
|
|
126
|
-
if (entry) mapped.push(entry.value);
|
|
127
|
-
}
|
|
128
|
-
formState.setAt(props.column.binding, mapped);
|
|
151
|
+
pendingKeys.value = keys;
|
|
129
152
|
}
|
|
130
153
|
const showClear = computed(
|
|
131
|
-
() => !isDisabled.value &&
|
|
154
|
+
() => !isDisabled.value && displayEntries.value.length > 0
|
|
132
155
|
);
|
|
133
156
|
function handleClear() {
|
|
157
|
+
pendingKeys.value = null;
|
|
134
158
|
formState.setAt(props.column.binding, []);
|
|
135
159
|
open.value = false;
|
|
136
160
|
}
|
|
@@ -201,10 +225,9 @@ const anyHasTooltip = computed(
|
|
|
201
225
|
<PopoverContent
|
|
202
226
|
class="w-auto p-0 [&_[data-slot=command-input-wrapper]]:h-7 [&_[data-slot=command-input-wrapper]]:px-2 [&_[data-slot=command-input-wrapper]_svg]:size-3 [&_[data-slot=command-input]]:h-7 [&_[data-slot=command-input]]:py-0 [&_[data-slot=command-input]]:text-[0.75rem] [&_[data-slot=command-item]]:px-2 [&_[data-slot=command-item]]:py-1 [&_[data-slot=command-item]]:text-[0.75rem]"
|
|
203
227
|
:style="{ width: 'var(--reka-popover-trigger-width)' }"
|
|
204
|
-
@focus-outside="(e) => e.preventDefault()"
|
|
205
228
|
>
|
|
206
229
|
<Command
|
|
207
|
-
:model-value="
|
|
230
|
+
:model-value="displayKeys"
|
|
208
231
|
:multiple="true"
|
|
209
232
|
:disabled="isDisabled"
|
|
210
233
|
@update:model-value="handleSelect"
|
|
@@ -224,7 +247,7 @@ const anyHasTooltip = computed(
|
|
|
224
247
|
>
|
|
225
248
|
<span class="flex-1">{{ entry.label }}</span>
|
|
226
249
|
<Icon
|
|
227
|
-
v-if="
|
|
250
|
+
v-if="displayKeySet.has(entry.key)"
|
|
228
251
|
icon="fluent:checkmark-20-regular"
|
|
229
252
|
class="size-3 text-zinc-700"
|
|
230
253
|
/>
|
|
@@ -212,27 +212,51 @@ const selectedEntries = computed(() => {
|
|
|
212
212
|
return list;
|
|
213
213
|
});
|
|
214
214
|
const selectedKeys = computed(() => selectedEntries.value.map((e) => e.key));
|
|
215
|
-
const
|
|
215
|
+
const pendingKeys = ref(null);
|
|
216
|
+
const open = ref(false);
|
|
217
|
+
watch(open, (next, prev) => {
|
|
218
|
+
if (!prev && next) {
|
|
219
|
+
pendingKeys.value = [...selectedKeys.value];
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (prev && !next && pendingKeys.value !== null) {
|
|
223
|
+
const mapped = [];
|
|
224
|
+
for (const key of pendingKeys.value) {
|
|
225
|
+
const entry = entries.value.find((e) => e.key === key);
|
|
226
|
+
if (entry) mapped.push(entry.value);
|
|
227
|
+
}
|
|
228
|
+
formState.setAt(props.column.binding, mapped);
|
|
229
|
+
pendingKeys.value = null;
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
const displayKeys = computed(
|
|
233
|
+
() => pendingKeys.value ?? selectedKeys.value
|
|
234
|
+
);
|
|
235
|
+
const displayKeySet = computed(() => new Set(displayKeys.value));
|
|
236
|
+
const displayEntries = computed(() => {
|
|
237
|
+
if (pendingKeys.value === null) return selectedEntries.value;
|
|
238
|
+
const list = [];
|
|
239
|
+
for (const key of displayKeys.value) {
|
|
240
|
+
const entry = entries.value.find((e) => e.key === key);
|
|
241
|
+
if (entry) list.push(entry);
|
|
242
|
+
}
|
|
243
|
+
return list;
|
|
244
|
+
});
|
|
216
245
|
const triggerLabel = computed(() => {
|
|
217
|
-
const arr =
|
|
246
|
+
const arr = displayEntries.value;
|
|
218
247
|
if (arr.length === 0) return "";
|
|
219
248
|
if (arr.length === 1) return arr[0].label;
|
|
220
249
|
return `${arr[0].label} +${arr.length - 1}`;
|
|
221
250
|
});
|
|
222
|
-
const open = ref(false);
|
|
223
251
|
function handleSelect(next) {
|
|
224
252
|
const keys = Array.isArray(next) ? next.filter((k) => typeof k === "string") : [];
|
|
225
|
-
|
|
226
|
-
for (const key of keys) {
|
|
227
|
-
const entry = entries.value.find((e) => e.key === key);
|
|
228
|
-
if (entry) mapped.push(entry.value);
|
|
229
|
-
}
|
|
230
|
-
formState.setAt(props.column.binding, mapped);
|
|
253
|
+
pendingKeys.value = keys;
|
|
231
254
|
}
|
|
232
255
|
const showClear = computed(
|
|
233
|
-
() => !isDisabled.value &&
|
|
256
|
+
() => !isDisabled.value && displayEntries.value.length > 0
|
|
234
257
|
);
|
|
235
258
|
function handleClear() {
|
|
259
|
+
pendingKeys.value = null;
|
|
236
260
|
formState.setAt(props.column.binding, []);
|
|
237
261
|
open.value = false;
|
|
238
262
|
}
|
|
@@ -315,7 +339,7 @@ const anyHasTooltip = computed(
|
|
|
315
339
|
:style="{ width: 'var(--reka-popover-trigger-width)' }"
|
|
316
340
|
>
|
|
317
341
|
<Command
|
|
318
|
-
:model-value="
|
|
342
|
+
:model-value="displayKeys"
|
|
319
343
|
:multiple="true"
|
|
320
344
|
:disabled="isDisabled"
|
|
321
345
|
@update:model-value="handleSelect"
|
|
@@ -343,7 +367,7 @@ const anyHasTooltip = computed(
|
|
|
343
367
|
>
|
|
344
368
|
<span class="flex-1"><Markdown :source="entry.label" /></span>
|
|
345
369
|
<Icon
|
|
346
|
-
v-if="
|
|
370
|
+
v-if="displayKeySet.has(entry.key)"
|
|
347
371
|
icon="fluent:checkmark-20-regular"
|
|
348
372
|
class="size-3 text-zinc-700"
|
|
349
373
|
/>
|
|
@@ -379,7 +379,6 @@ const anyHasTooltip = computed(
|
|
|
379
379
|
<PopoverContent
|
|
380
380
|
class="w-auto p-0 [&_[data-slot=command-input-wrapper]]:h-7 [&_[data-slot=command-input-wrapper]]:px-2 [&_[data-slot=command-input-wrapper]_svg]:size-3 [&_[data-slot=command-input]]:h-7 [&_[data-slot=command-input]]:py-0 [&_[data-slot=command-input]]:text-[0.75rem] [&_[data-slot=command-item]]:px-2 [&_[data-slot=command-item]]:py-1 [&_[data-slot=command-item]]:text-[0.75rem]"
|
|
381
381
|
:style="{ width: 'var(--reka-popover-trigger-width)' }"
|
|
382
|
-
@focus-outside="(e) => e.preventDefault()"
|
|
383
382
|
>
|
|
384
383
|
<Command
|
|
385
384
|
:model-value="selectedKeys"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit, useCurrentElement } from "@vueuse/core";
|
|
3
|
-
import { ListboxItem, useForwardPropsEmits, useId } from "reka-ui";
|
|
3
|
+
import { injectListboxRootContext, ListboxItem, useForwardPropsEmits, useId } from "reka-ui";
|
|
4
4
|
import { computed, onMounted, onUnmounted, ref } from "vue";
|
|
5
5
|
import { cn } from "../../../utils/cn";
|
|
6
6
|
import { useCommand, useCommandGroup } from ".";
|
|
@@ -17,6 +17,16 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
17
17
|
const id = useId();
|
|
18
18
|
const { filterState, allItems, allGroups } = useCommand();
|
|
19
19
|
const groupContext = useCommandGroup();
|
|
20
|
+
const listboxRoot = injectListboxRootContext();
|
|
21
|
+
function handleSelect(event) {
|
|
22
|
+
filterState.search = "";
|
|
23
|
+
if (!listboxRoot.multiple.value) return;
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
listboxRoot.onValueChange(props.value);
|
|
26
|
+
if (currentElement.value instanceof HTMLElement) {
|
|
27
|
+
listboxRoot.changeHighlight(currentElement.value);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
20
30
|
const isRender = computed(() => {
|
|
21
31
|
if (!filterState.search) {
|
|
22
32
|
return true;
|
|
@@ -56,9 +66,7 @@ onUnmounted(() => {
|
|
|
56
66
|
ref="itemRef"
|
|
57
67
|
data-slot="command-item"
|
|
58
68
|
:class="cn('data-highlighted:bg-zinc-100 data-highlighted:text-zinc-700 hover:bg-zinc-50 [&_svg:not([class*=\'text-\'])]:text-zinc-700 cursor-pointer relative flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class)"
|
|
59
|
-
@select="
|
|
60
|
-
filterState.search = '';
|
|
61
|
-
}"
|
|
69
|
+
@select="handleSelect"
|
|
62
70
|
>
|
|
63
71
|
<slot />
|
|
64
72
|
</ListboxItem>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aL as e}from"./index-wBVA0mNO.js";import{aM as r,aN as s,aO as t}from"./index-wBVA0mNO.js";export{r as TableConfig,s as createTableConfig,e as default,t as getColumnTechnicalKey};
|