rayyy-vue-table-components 1.2.23 → 1.2.25
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/README.md +139 -0
- package/dist/index.es.js +36 -33
- package/dist/index.umd.js +1 -1
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/layout/MainPanel.vue.d.ts +2 -0
- package/dist/src/types/components.d.ts +2 -0
- package/package.json +1 -2
- package/src/components/items/FilterBtn.vue +2 -10
- package/src/components/layout/MainPanel.vue +3 -3
- package/src/components/layout/SearchableListPanel.vue +1 -1
- package/src/types/components.d.ts +2 -0
package/README.md
CHANGED
|
@@ -350,6 +350,116 @@ const handleCancel = () => {
|
|
|
350
350
|
```
|
|
351
351
|
</details>
|
|
352
352
|
|
|
353
|
+
### MainPanel - 主面板組件
|
|
354
|
+
|
|
355
|
+
靈活的主面板組件,提供標題、返回按鈕和可自定義高度的滾動區域。
|
|
356
|
+
|
|
357
|
+
<details>
|
|
358
|
+
<summary>基本用法</summary>
|
|
359
|
+
|
|
360
|
+
```vue
|
|
361
|
+
<template>
|
|
362
|
+
<MainPanel
|
|
363
|
+
title="用戶管理"
|
|
364
|
+
:show-back="true"
|
|
365
|
+
max-height="calc(100vh-200px)"
|
|
366
|
+
>
|
|
367
|
+
<template #searchBar>
|
|
368
|
+
<SearchBar @search="handleSearch" />
|
|
369
|
+
</template>
|
|
370
|
+
|
|
371
|
+
<template #main>
|
|
372
|
+
<BaseTable
|
|
373
|
+
:data="tableData"
|
|
374
|
+
:columns="columns"
|
|
375
|
+
:loading="loading"
|
|
376
|
+
/>
|
|
377
|
+
</template>
|
|
378
|
+
|
|
379
|
+
<template #footer>
|
|
380
|
+
<el-pagination
|
|
381
|
+
v-model:current-page="currentPage"
|
|
382
|
+
v-model:page-size="pageSize"
|
|
383
|
+
:total="total"
|
|
384
|
+
layout="total, sizes, prev, pager, next, jumper"
|
|
385
|
+
/>
|
|
386
|
+
</template>
|
|
387
|
+
</MainPanel>
|
|
388
|
+
</template>
|
|
389
|
+
|
|
390
|
+
<script setup lang="ts">
|
|
391
|
+
import { ref } from 'vue'
|
|
392
|
+
import { MainPanel, SearchBar, BaseTable } from 'rayyy-vue-table-components'
|
|
393
|
+
import type { TableColumn } from 'rayyy-vue-table-components'
|
|
394
|
+
|
|
395
|
+
interface User {
|
|
396
|
+
id: number
|
|
397
|
+
name: string
|
|
398
|
+
email: string
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
const loading = ref(false)
|
|
402
|
+
const currentPage = ref(1)
|
|
403
|
+
const pageSize = ref(10)
|
|
404
|
+
const total = ref(100)
|
|
405
|
+
|
|
406
|
+
const tableData = ref<User[]>([
|
|
407
|
+
{ id: 1, name: '張三', email: 'zhangsan@example.com' },
|
|
408
|
+
{ id: 2, name: '李四', email: 'lisi@example.com' }
|
|
409
|
+
])
|
|
410
|
+
|
|
411
|
+
const columns: TableColumn<User>[] = [
|
|
412
|
+
{ prop: 'id', label: 'ID', width: 80 },
|
|
413
|
+
{ prop: 'name', label: '姓名' },
|
|
414
|
+
{ prop: 'email', label: '郵箱' }
|
|
415
|
+
]
|
|
416
|
+
|
|
417
|
+
const handleSearch = (keyword: string) => {
|
|
418
|
+
console.log('搜尋關鍵字:', keyword)
|
|
419
|
+
}
|
|
420
|
+
</script>
|
|
421
|
+
```
|
|
422
|
+
</details>
|
|
423
|
+
|
|
424
|
+
<details>
|
|
425
|
+
<summary>自定義高度</summary>
|
|
426
|
+
|
|
427
|
+
```vue
|
|
428
|
+
<template>
|
|
429
|
+
<!-- 使用預設高度 -->
|
|
430
|
+
<MainPanel title="預設高度">
|
|
431
|
+
<template #main>
|
|
432
|
+
<div>內容區域</div>
|
|
433
|
+
</template>
|
|
434
|
+
</MainPanel>
|
|
435
|
+
|
|
436
|
+
<!-- 自定義高度 -->
|
|
437
|
+
<MainPanel
|
|
438
|
+
title="自定義高度"
|
|
439
|
+
max-height="500px"
|
|
440
|
+
>
|
|
441
|
+
<template #main>
|
|
442
|
+
<div>固定高度 500px 的內容區域</div>
|
|
443
|
+
</template>
|
|
444
|
+
</MainPanel>
|
|
445
|
+
|
|
446
|
+
<!-- 響應式高度 -->
|
|
447
|
+
<MainPanel
|
|
448
|
+
title="響應式高度"
|
|
449
|
+
max-height="calc(100vh-300px)"
|
|
450
|
+
>
|
|
451
|
+
<template #main>
|
|
452
|
+
<div>根據視窗高度動態調整的內容區域</div>
|
|
453
|
+
</template>
|
|
454
|
+
</MainPanel>
|
|
455
|
+
</template>
|
|
456
|
+
|
|
457
|
+
<script setup lang="ts">
|
|
458
|
+
import { MainPanel } from 'rayyy-vue-table-components'
|
|
459
|
+
</script>
|
|
460
|
+
```
|
|
461
|
+
</details>
|
|
462
|
+
|
|
353
463
|
### TransferDialog - 穿梭框對話框
|
|
354
464
|
|
|
355
465
|
用於表格列配置的穿梭框組件,支援拖拽排序。
|
|
@@ -584,6 +694,35 @@ interface ListContainerSlotProps<T = any> {
|
|
|
584
694
|
|
|
585
695
|
---
|
|
586
696
|
|
|
697
|
+
### MainPanel
|
|
698
|
+
|
|
699
|
+
主面板組件,提供標題、返回按鈕和可自定義高度的滾動區域。
|
|
700
|
+
|
|
701
|
+
#### Props
|
|
702
|
+
|
|
703
|
+
| 屬性 | 類型 | 默認值 | 說明 |
|
|
704
|
+
|------|------|--------|------|
|
|
705
|
+
| `title` | `string` | `''` | 面板標題 |
|
|
706
|
+
| `showBack` | `boolean \| string \| object` | `false` | 是否顯示返回按鈕 |
|
|
707
|
+
| `depth` | `number` | `1` | 返回深度 |
|
|
708
|
+
| `maxHeight` | `string` | `'calc(100vh-120px)'` | 滾動區域最大高度 |
|
|
709
|
+
|
|
710
|
+
#### Events
|
|
711
|
+
|
|
712
|
+
| 事件名 | 參數 | 說明 |
|
|
713
|
+
|--------|------|------|
|
|
714
|
+
| `back` | `payload: { path?: string; [key: string]: unknown }` | 返回按鈕點擊時觸發 |
|
|
715
|
+
|
|
716
|
+
#### Slots
|
|
717
|
+
|
|
718
|
+
| 插槽名 | 參數 | 說明 |
|
|
719
|
+
|--------|------|------|
|
|
720
|
+
| `searchBar` | - | 搜尋欄區域 |
|
|
721
|
+
| `main` | - | 主要內容區域 |
|
|
722
|
+
| `footer` | - | 底部區域(如分頁器) |
|
|
723
|
+
|
|
724
|
+
---
|
|
725
|
+
|
|
587
726
|
### 通用類型定義
|
|
588
727
|
|
|
589
728
|
#### TableColumn
|
package/dist/index.es.js
CHANGED
|
@@ -18787,7 +18787,8 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18787
18787
|
props: {
|
|
18788
18788
|
title: { default: "" },
|
|
18789
18789
|
showBack: { type: [Boolean, String, Object], default: !1 },
|
|
18790
|
-
depth: { default: 1 }
|
|
18790
|
+
depth: { default: 1 },
|
|
18791
|
+
maxHeight: { default: "calc(100vh-120px)" }
|
|
18791
18792
|
},
|
|
18792
18793
|
setup(e) {
|
|
18793
18794
|
const t = e;
|
|
@@ -18799,7 +18800,9 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18799
18800
|
showBack: t.showBack,
|
|
18800
18801
|
depth: t.depth
|
|
18801
18802
|
}, null, 8, ["title", "showBack", "depth"]),
|
|
18802
|
-
pe(l, {
|
|
18803
|
+
pe(l, {
|
|
18804
|
+
class: H(`max-h-[${t.maxHeight}] max-w-screen overflow-auto`)
|
|
18805
|
+
}, {
|
|
18803
18806
|
default: ne(() => [
|
|
18804
18807
|
n.$slots.searchBar ? (F(), G("div", tM, [
|
|
18805
18808
|
ie(n.$slots, "searchBar")
|
|
@@ -18809,7 +18812,7 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18809
18812
|
])) : ce("", !0)
|
|
18810
18813
|
]),
|
|
18811
18814
|
_: 3
|
|
18812
|
-
}),
|
|
18815
|
+
}, 8, ["class"]),
|
|
18813
18816
|
n.$slots.footer ? (F(), G("div", rM, [
|
|
18814
18817
|
ie(n.$slots, "footer")
|
|
18815
18818
|
])) : ce("", !0)
|
|
@@ -18851,7 +18854,7 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18851
18854
|
"show-filter": s.value || p.showFilter,
|
|
18852
18855
|
"show-search": s.value || p.showSearch,
|
|
18853
18856
|
"badge-value": p.badgeValue,
|
|
18854
|
-
|
|
18857
|
+
"filter-drawer-size": p.filterDrawerSize,
|
|
18855
18858
|
"onKeydown:enter": i,
|
|
18856
18859
|
"onUpdate:clear": c
|
|
18857
18860
|
}, {
|
|
@@ -18864,7 +18867,7 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18864
18867
|
ie(p.$slots, "filterDrawBody")
|
|
18865
18868
|
]),
|
|
18866
18869
|
_: 3
|
|
18867
|
-
}, 8, ["show-filter", "show-search", "badge-value", "
|
|
18870
|
+
}, 8, ["show-filter", "show-search", "badge-value", "filter-drawer-size"])
|
|
18868
18871
|
]),
|
|
18869
18872
|
main: ne(() => [
|
|
18870
18873
|
ie(p.$slots, "main")
|
|
@@ -18893,33 +18896,33 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18893
18896
|
},
|
|
18894
18897
|
emits: ["update:reset", "update:submit"],
|
|
18895
18898
|
setup(e, { emit: t }) {
|
|
18896
|
-
const n =
|
|
18897
|
-
function
|
|
18898
|
-
|
|
18899
|
+
const n = jo(), a = N(!1);
|
|
18900
|
+
function l() {
|
|
18901
|
+
a.value = !a.value;
|
|
18899
18902
|
}
|
|
18900
|
-
const
|
|
18901
|
-
|
|
18902
|
-
},
|
|
18903
|
-
|
|
18903
|
+
const s = t, i = () => {
|
|
18904
|
+
s("update:reset");
|
|
18905
|
+
}, c = () => {
|
|
18906
|
+
a.value = !1;
|
|
18904
18907
|
};
|
|
18905
|
-
return (
|
|
18906
|
-
const
|
|
18908
|
+
return (d, f) => {
|
|
18909
|
+
const p = Bt, h = A8, w = iR;
|
|
18907
18910
|
return F(), G(Ct, null, [
|
|
18908
|
-
pe(m(Jn), kt(m(
|
|
18911
|
+
pe(m(Jn), kt(m(n), {
|
|
18909
18912
|
type: "primary",
|
|
18910
18913
|
class: "filter-btn",
|
|
18911
|
-
onClick:
|
|
18914
|
+
onClick: l
|
|
18912
18915
|
}), {
|
|
18913
18916
|
default: ne(() => [
|
|
18914
|
-
|
|
18917
|
+
d.badgeValue && d.badgeValue > 0 ? (F(), fe(h, {
|
|
18915
18918
|
key: 0,
|
|
18916
|
-
value:
|
|
18919
|
+
value: d.badgeValue,
|
|
18917
18920
|
class: "!flex justify-center items-center",
|
|
18918
18921
|
type: "primary"
|
|
18919
18922
|
}, {
|
|
18920
18923
|
default: ne(() => [
|
|
18921
|
-
ie(
|
|
18922
|
-
pe(
|
|
18924
|
+
ie(d.$slots, "fill-filter", {}, () => [
|
|
18925
|
+
pe(p, { class: "filter-icon fill-icon" }, {
|
|
18923
18926
|
default: ne(() => [
|
|
18924
18927
|
pe(m(fh))
|
|
18925
18928
|
]),
|
|
@@ -18928,8 +18931,8 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18928
18931
|
])
|
|
18929
18932
|
]),
|
|
18930
18933
|
_: 3
|
|
18931
|
-
}, 8, ["value"])) : ie(
|
|
18932
|
-
pe(
|
|
18934
|
+
}, 8, ["value"])) : ie(d.$slots, "filter-icon", { key: 1 }, () => [
|
|
18935
|
+
pe(p, { class: "filter-icon" }, {
|
|
18933
18936
|
default: ne(() => [
|
|
18934
18937
|
pe(m(fh))
|
|
18935
18938
|
]),
|
|
@@ -18939,13 +18942,13 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18939
18942
|
]),
|
|
18940
18943
|
_: 3
|
|
18941
18944
|
}, 16),
|
|
18942
|
-
pe(
|
|
18943
|
-
modelValue:
|
|
18944
|
-
"onUpdate:modelValue":
|
|
18945
|
+
pe(w, {
|
|
18946
|
+
modelValue: a.value,
|
|
18947
|
+
"onUpdate:modelValue": f[0] || (f[0] = (b) => a.value = b),
|
|
18945
18948
|
"append-to-body": "",
|
|
18946
|
-
size: d.
|
|
18949
|
+
size: d.drawerSize
|
|
18947
18950
|
}, {
|
|
18948
|
-
header: ne(() =>
|
|
18951
|
+
header: ne(() => f[1] || (f[1] = [
|
|
18949
18952
|
le("div", { class: "flex justify-center text-base text-black font-semibold" }, [
|
|
18950
18953
|
le("span", null, "查詢條件")
|
|
18951
18954
|
], -1)
|
|
@@ -18954,16 +18957,16 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18954
18957
|
pe(m(Jn), {
|
|
18955
18958
|
type: "primary",
|
|
18956
18959
|
class: "filter-btn",
|
|
18957
|
-
onClick:
|
|
18960
|
+
onClick: c
|
|
18958
18961
|
}, {
|
|
18959
18962
|
default: ne(() => [
|
|
18960
|
-
pe(
|
|
18963
|
+
pe(p, null, {
|
|
18961
18964
|
default: ne(() => [
|
|
18962
18965
|
pe(m(rm))
|
|
18963
18966
|
]),
|
|
18964
18967
|
_: 1
|
|
18965
18968
|
}),
|
|
18966
|
-
|
|
18969
|
+
f[3] || (f[3] = le("p", null, "查詢", -1))
|
|
18967
18970
|
]),
|
|
18968
18971
|
_: 1,
|
|
18969
18972
|
__: [3]
|
|
@@ -18971,13 +18974,13 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
|
|
|
18971
18974
|
]),
|
|
18972
18975
|
default: ne(() => [
|
|
18973
18976
|
le("div", { class: "flex justify-between items-center pb-5 font-semibold" }, [
|
|
18974
|
-
|
|
18977
|
+
f[2] || (f[2] = le("div", { class: "text-base text-black/70" }, "篩選條件", -1)),
|
|
18975
18978
|
le("div", {
|
|
18976
18979
|
class: "text-base text-primary cursor-pointer",
|
|
18977
|
-
onClick:
|
|
18980
|
+
onClick: i
|
|
18978
18981
|
}, "重置")
|
|
18979
18982
|
]),
|
|
18980
|
-
ie(
|
|
18983
|
+
ie(d.$slots, "default")
|
|
18981
18984
|
]),
|
|
18982
18985
|
_: 3
|
|
18983
18986
|
}, 8, ["modelValue", "size"])
|
package/dist/index.umd.js
CHANGED
|
@@ -52,4 +52,4 @@ __p += '`),Fe&&(Z+=`' +
|
|
|
52
52
|
function print() { __p += __j.call(arguments, '') }
|
|
53
53
|
`:`;
|
|
54
54
|
`)+Z+`return __p
|
|
55
|
-
}`;var Oe=k0(function(){return Ke(T,ce+"return "+Z).apply(r,R)});if(Oe.source=Z,$u(Oe))throw Oe;return Oe}function XR(o){return qe(o).toLowerCase()}function ZR(o){return qe(o).toUpperCase()}function JR(o,l,u){if(o=qe(o),o&&(u||l===r))return Lm(o);if(!o||!(l=fn(l)))return o;var m=zn(o),_=zn(l),T=$m(m,_),R=Mm(m,_)+1;return $r(m,T,R).join("")}function QR(o,l,u){if(o=qe(o),o&&(u||l===r))return o.slice(0,Fm(o)+1);if(!o||!(l=fn(l)))return o;var m=zn(o),_=Mm(m,zn(l))+1;return $r(m,0,_).join("")}function eI(o,l,u){if(o=qe(o),o&&(u||l===r))return o.replace(Wo,"");if(!o||!(l=fn(l)))return o;var m=zn(o),_=$m(m,zn(l));return $r(m,_).join("")}function tI(o,l){var u=W,m=V;if(at(l)){var _="separator"in l?l.separator:_;u="length"in l?Be(l.length):u,m="omission"in l?fn(l.omission):m}o=qe(o);var T=o.length;if(qo(o)){var R=zn(o);T=R.length}if(u>=T)return o;var I=u-Go(m);if(I<1)return m;var M=R?$r(R,0,I).join(""):o.slice(0,I);if(_===r)return M+m;if(R&&(I+=M.length-I),Mu(_)){if(o.slice(I).search(_)){var j,K=M;for(_.global||(_=Qc(_.source,qe(st.exec(_))+"g")),_.lastIndex=0;j=_.exec(K);)var Z=j.index;M=M.slice(0,Z===r?I:Z)}}else if(o.indexOf(fn(_),I)!=I){var ne=M.lastIndexOf(_);ne>-1&&(M=M.slice(0,ne))}return M+m}function nI(o){return o=qe(o),o&&xc.test(o)?o.replace(sr,AN):o}var rI=tl(function(o,l,u){return o+(u?" ":"")+l.toUpperCase()}),Vu=Bg("toUpperCase");function x0(o,l,u){return o=qe(o),l=u?r:l,l===r?kN(o)?IN(o):bN(o):o.match(l)||[]}var k0=Ae(function(o,l){try{return cn(o,r,l)}catch(u){return $u(u)?u:new we(u)}}),oI=pr(function(o,l){return _n(l,function(u){u=Qn(u),fr(o,u,Iu(o[u],o))}),o});function lI(o){var l=o==null?0:o.length,u=de();return o=l?lt(o,function(m){if(typeof m[1]!="function")throw new Sn(s);return[u(m[0]),m[1]]}):[],Ae(function(m){for(var _=-1;++_<l;){var T=o[_];if(cn(T[0],this,m))return cn(T[1],this,m)}})}function aI(o){return A3(xn(o,g))}function Du(o){return function(){return o}}function iI(o,l){return o==null||o!==o?l:o}var sI=Og(),cI=Og(!0);function Qt(o){return o}function Wu(o){return lg(typeof o=="function"?o:xn(o,g))}function uI(o){return ig(xn(o,g))}function fI(o,l){return sg(o,xn(l,g))}var dI=Ae(function(o,l){return function(u){return Gl(u,o,l)}}),pI=Ae(function(o,l){return function(u){return Gl(o,u,l)}});function Hu(o,l,u){var m=Ct(l),_=yi(l,m);u==null&&!(at(l)&&(_.length||!m.length))&&(u=l,l=o,o=this,_=yi(l,Ct(l)));var T=!(at(u)&&"chain"in u)||!!u.chain,R=mr(o);return _n(_,function(I){var M=l[I];o[I]=M,R&&(o.prototype[I]=function(){var j=this.__chain__;if(T||j){var K=o(this.__wrapped__),Z=K.__actions__=Xt(this.__actions__);return Z.push({func:M,args:arguments,thisArg:o}),K.__chain__=j,K}return M.apply(o,Nr([this.value()],arguments))})}),o}function hI(){return xt._===this&&(xt._=VN),this}function Uu(){}function mI(o){return o=Be(o),Ae(function(l){return cg(l,o)})}var gI=vu(lt),bI=vu(Nm),yI=vu(Kc);function B0(o){return Tu(o)?qc(Qn(o)):G3(o)}function wI(o){return function(l){return o==null?r:fo(o,l)}}var CI=Ag(),vI=Ag(!0);function ju(){return[]}function Ku(){return!1}function _I(){return{}}function SI(){return""}function EI(){return!0}function xI(o,l){if(o=Be(o),o<1||o>H)return[];var u=ee,m=Nt(o,ee);l=de(l),o-=ee;for(var _=Xc(m,l);++u<o;)l(u);return _}function kI(o){return ve(o)?lt(o,Qn):dn(o)?[o]:Xt(qg(qe(o)))}function BI(o){var l=++zN;return qe(o)+l}var TI=Ei(function(o,l){return o+l},0),OI=_u("ceil"),NI=Ei(function(o,l){return o/l},1),AI=_u("floor");function PI(o){return o&&o.length?bi(o,Qt,iu):r}function RI(o,l){return o&&o.length?bi(o,de(l,2),iu):r}function II(o){return Rm(o,Qt)}function LI(o,l){return Rm(o,de(l,2))}function $I(o){return o&&o.length?bi(o,Qt,fu):r}function MI(o,l){return o&&o.length?bi(o,de(l,2),fu):r}var zI=Ei(function(o,l){return o*l},1),FI=_u("round"),VI=Ei(function(o,l){return o-l},0);function DI(o){return o&&o.length?Yc(o,Qt):0}function WI(o,l){return o&&o.length?Yc(o,de(l,2)):0}return k.after=uP,k.ary=o0,k.assign=ZP,k.assignIn=y0,k.assignInWith=Mi,k.assignWith=JP,k.at=QP,k.before=l0,k.bind=Iu,k.bindAll=oI,k.bindKey=a0,k.castArray=_P,k.chain=t0,k.chunk=A4,k.compact=P4,k.concat=R4,k.cond=lI,k.conforms=aI,k.constant=Du,k.countBy=DA,k.create=eR,k.curry=i0,k.curryRight=s0,k.debounce=c0,k.defaults=tR,k.defaultsDeep=nR,k.defer=fP,k.delay=dP,k.difference=I4,k.differenceBy=L4,k.differenceWith=$4,k.drop=M4,k.dropRight=z4,k.dropRightWhile=F4,k.dropWhile=V4,k.fill=D4,k.filter=HA,k.flatMap=KA,k.flatMapDeep=qA,k.flatMapDepth=GA,k.flatten=Zg,k.flattenDeep=W4,k.flattenDepth=H4,k.flip=pP,k.flow=sI,k.flowRight=cI,k.fromPairs=U4,k.functions=cR,k.functionsIn=uR,k.groupBy=YA,k.initial=K4,k.intersection=q4,k.intersectionBy=G4,k.intersectionWith=Y4,k.invert=dR,k.invertBy=pR,k.invokeMap=ZA,k.iteratee=Wu,k.keyBy=JA,k.keys=Ct,k.keysIn=Jt,k.map=Ai,k.mapKeys=mR,k.mapValues=gR,k.matches=uI,k.matchesProperty=fI,k.memoize=Ri,k.merge=bR,k.mergeWith=w0,k.method=dI,k.methodOf=pI,k.mixin=Hu,k.negate=Ii,k.nthArg=mI,k.omit=yR,k.omitBy=wR,k.once=hP,k.orderBy=QA,k.over=gI,k.overArgs=mP,k.overEvery=bI,k.overSome=yI,k.partial=Lu,k.partialRight=u0,k.partition=eP,k.pick=CR,k.pickBy=C0,k.property=B0,k.propertyOf=wI,k.pull=Q4,k.pullAll=Qg,k.pullAllBy=eA,k.pullAllWith=tA,k.pullAt=nA,k.range=CI,k.rangeRight=vI,k.rearg=gP,k.reject=rP,k.remove=rA,k.rest=bP,k.reverse=Pu,k.sampleSize=lP,k.set=_R,k.setWith=SR,k.shuffle=aP,k.slice=oA,k.sortBy=cP,k.sortedUniq=fA,k.sortedUniqBy=dA,k.split=KR,k.spread=yP,k.tail=pA,k.take=hA,k.takeRight=mA,k.takeRightWhile=gA,k.takeWhile=bA,k.tap=PA,k.throttle=wP,k.thru=Ni,k.toArray=m0,k.toPairs=v0,k.toPairsIn=_0,k.toPath=kI,k.toPlainObject=b0,k.transform=ER,k.unary=CP,k.union=yA,k.unionBy=wA,k.unionWith=CA,k.uniq=vA,k.uniqBy=_A,k.uniqWith=SA,k.unset=xR,k.unzip=Ru,k.unzipWith=e0,k.update=kR,k.updateWith=BR,k.values=ol,k.valuesIn=TR,k.without=EA,k.words=x0,k.wrap=vP,k.xor=xA,k.xorBy=kA,k.xorWith=BA,k.zip=TA,k.zipObject=OA,k.zipObjectDeep=NA,k.zipWith=AA,k.entries=v0,k.entriesIn=_0,k.extend=y0,k.extendWith=Mi,Hu(k,k),k.add=TI,k.attempt=k0,k.camelCase=PR,k.capitalize=S0,k.ceil=OI,k.clamp=OR,k.clone=SP,k.cloneDeep=xP,k.cloneDeepWith=kP,k.cloneWith=EP,k.conformsTo=BP,k.deburr=E0,k.defaultTo=iI,k.divide=NI,k.endsWith=RR,k.eq=Vn,k.escape=IR,k.escapeRegExp=LR,k.every=WA,k.find=UA,k.findIndex=Yg,k.findKey=rR,k.findLast=jA,k.findLastIndex=Xg,k.findLastKey=oR,k.floor=AI,k.forEach=n0,k.forEachRight=r0,k.forIn=lR,k.forInRight=aR,k.forOwn=iR,k.forOwnRight=sR,k.get=zu,k.gt=TP,k.gte=OP,k.has=fR,k.hasIn=Fu,k.head=Jg,k.identity=Qt,k.includes=XA,k.indexOf=j4,k.inRange=NR,k.invoke=hR,k.isArguments=mo,k.isArray=ve,k.isArrayBuffer=NP,k.isArrayLike=Zt,k.isArrayLikeObject=dt,k.isBoolean=AP,k.isBuffer=Mr,k.isDate=PP,k.isElement=RP,k.isEmpty=IP,k.isEqual=LP,k.isEqualWith=$P,k.isError=$u,k.isFinite=MP,k.isFunction=mr,k.isInteger=f0,k.isLength=Li,k.isMap=d0,k.isMatch=zP,k.isMatchWith=FP,k.isNaN=VP,k.isNative=DP,k.isNil=HP,k.isNull=WP,k.isNumber=p0,k.isObject=at,k.isObjectLike=ct,k.isPlainObject=ea,k.isRegExp=Mu,k.isSafeInteger=UP,k.isSet=h0,k.isString=$i,k.isSymbol=dn,k.isTypedArray=rl,k.isUndefined=jP,k.isWeakMap=KP,k.isWeakSet=qP,k.join=X4,k.kebabCase=$R,k.last=Bn,k.lastIndexOf=Z4,k.lowerCase=MR,k.lowerFirst=zR,k.lt=GP,k.lte=YP,k.max=PI,k.maxBy=RI,k.mean=II,k.meanBy=LI,k.min=$I,k.minBy=MI,k.stubArray=ju,k.stubFalse=Ku,k.stubObject=_I,k.stubString=SI,k.stubTrue=EI,k.multiply=zI,k.nth=J4,k.noConflict=hI,k.noop=Uu,k.now=Pi,k.pad=FR,k.padEnd=VR,k.padStart=DR,k.parseInt=WR,k.random=AR,k.reduce=tP,k.reduceRight=nP,k.repeat=HR,k.replace=UR,k.result=vR,k.round=FI,k.runInContext=$,k.sample=oP,k.size=iP,k.snakeCase=jR,k.some=sP,k.sortedIndex=lA,k.sortedIndexBy=aA,k.sortedIndexOf=iA,k.sortedLastIndex=sA,k.sortedLastIndexBy=cA,k.sortedLastIndexOf=uA,k.startCase=qR,k.startsWith=GR,k.subtract=VI,k.sum=DI,k.sumBy=WI,k.template=YR,k.times=xI,k.toFinite=gr,k.toInteger=Be,k.toLength=g0,k.toLower=XR,k.toNumber=Tn,k.toSafeInteger=XP,k.toString=qe,k.toUpper=ZR,k.trim=JR,k.trimEnd=QR,k.trimStart=eI,k.truncate=tI,k.unescape=nI,k.uniqueId=BI,k.upperCase=rI,k.upperFirst=Vu,k.each=n0,k.eachRight=r0,k.first=Jg,Hu(k,(function(){var o={};return Zn(k,function(l,u){Ge.call(k.prototype,u)||(o[u]=l)}),o})(),{chain:!1}),k.VERSION=a,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){k[o].placeholder=k}),_n(["drop","take"],function(o,l){Me.prototype[o]=function(u){u=u===r?1:yt(Be(u),0);var m=this.__filtered__&&!l?new Me(this):this.clone();return m.__filtered__?m.__takeCount__=Nt(u,m.__takeCount__):m.__views__.push({size:Nt(u,ee),type:o+(m.__dir__<0?"Right":"")}),m},Me.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),_n(["filter","map","takeWhile"],function(o,l){var u=l+1,m=u==re||u==J;Me.prototype[o]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:de(_,3),type:u}),T.__filtered__=T.__filtered__||m,T}}),_n(["head","last"],function(o,l){var u="take"+(l?"Right":"");Me.prototype[o]=function(){return this[u](1).value()[0]}}),_n(["initial","tail"],function(o,l){var u="drop"+(l?"":"Right");Me.prototype[o]=function(){return this.__filtered__?new Me(this):this[u](1)}}),Me.prototype.compact=function(){return this.filter(Qt)},Me.prototype.find=function(o){return this.filter(o).head()},Me.prototype.findLast=function(o){return this.reverse().find(o)},Me.prototype.invokeMap=Ae(function(o,l){return typeof o=="function"?new Me(this):this.map(function(u){return Gl(u,o,l)})}),Me.prototype.reject=function(o){return this.filter(Ii(de(o)))},Me.prototype.slice=function(o,l){o=Be(o);var u=this;return u.__filtered__&&(o>0||l<0)?new Me(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),l!==r&&(l=Be(l),u=l<0?u.dropRight(-l):u.take(l-o)),u)},Me.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Me.prototype.toArray=function(){return this.take(ee)},Zn(Me.prototype,function(o,l){var u=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),_=k[m?"take"+(l=="last"?"Right":""):l],T=m||/^find/.test(l);_&&(k.prototype[l]=function(){var R=this.__wrapped__,I=m?[1]:arguments,M=R instanceof Me,j=I[0],K=M||ve(R),Z=function(Le){var Fe=_.apply(k,Nr([Le],I));return m&&ne?Fe[0]:Fe};K&&u&&typeof j=="function"&&j.length!=1&&(M=K=!1);var ne=this.__chain__,ce=!!this.__actions__.length,pe=T&&!ne,Oe=M&&!ce;if(!T&&K){R=Oe?R:new Me(this);var he=o.apply(R,I);return he.__actions__.push({func:Ni,args:[Z],thisArg:r}),new En(he,ne)}return pe&&Oe?o.apply(this,I):(he=this.thru(Z),pe?m?he.value()[0]:he.value():he)})}),_n(["pop","push","shift","sort","splice","unshift"],function(o){var l=ni[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",m=/^(?:pop|shift)$/.test(o);k.prototype[o]=function(){var _=arguments;if(m&&!this.__chain__){var T=this.value();return l.apply(ve(T)?T:[],_)}return this[u](function(R){return l.apply(ve(R)?R:[],_)})}}),Zn(Me.prototype,function(o,l){var u=k[l];if(u){var m=u.name+"";Ge.call(Jo,m)||(Jo[m]=[]),Jo[m].push({name:l,func:u})}}),Jo[Si(r,S).name]=[{name:"wrapper",func:r}],Me.prototype.clone=n3,Me.prototype.reverse=r3,Me.prototype.value=o3,k.prototype.at=RA,k.prototype.chain=IA,k.prototype.commit=LA,k.prototype.next=$A,k.prototype.plant=zA,k.prototype.reverse=FA,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=VA,k.prototype.first=k.prototype.head,Dl&&(k.prototype[Dl]=MA),k}),Yo=LN();ao?((ao.exports=Yo)._=Yo,Wc._=Yo):xt._=Yo}).call(hO)})(Ml,Ml.exports)),Ml.exports}var gO=mO();const Ya=OE(gO),Qh=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e){const n=e,r=t.reactive({itemOnHover:!1,itemOnClick:!1}),a=()=>{r.itemOnClick=!0,r.itemOnHover=!1},i=()=>{r.itemOnClick=!1,r.itemOnHover=!0};return t.watch(()=>n.dialogModalVisible,c=>{c||(r.itemOnClick=!1,r.itemOnHover=!1)}),(c,s)=>{const f=xr,p=ex,d=kB;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":r.itemOnHover,"cursor-grabbing":r.itemOnClick}]),onMouseenter:s[4]||(s[4]=h=>r.itemOnHover=!0),onMouseleave:s[5]||(s[5]=h=>r.itemOnHover=!1),onMousedown:a,onMouseup:i},[(t.openBlock(),t.createBlock(f,{label:c.columnsValue.label,value:c.columnsValue.prop,key:c.columnsValue.prop},null,8,["label","value"])),c.columnsValue.checkActive?(t.openBlock(),t.createBlock(d,{key:0,class:"transfer-arrow-wrapper"},{default:t.withCtx(()=>[t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(m_),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:s[0]||(s[0]=h=>c.$emit("update:toTop"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(ps),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:s[1]||(s[1]=h=>c.$emit("update:toPre"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(wa),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:s[2]||(s[2]=h=>c.$emit("update:toNext"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(Z1),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:s[3]||(s[3]=h=>c.$emit("update:toBottom"))},null,8,["icon","disabled"])]),_:1})]),_:1})):t.createCommentVNode("",!0)],34)}}}),bO={class:"search-bar"},yO={class:"transfer-sort-wrapper"},wO={class:"max-h-96 overflow-y-auto"},CO=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit"],setup(e,{emit:n}){const r=e,a=n,i=t.computed({get:()=>r.modelValue,set:w=>a("update:modelValue",w)}),c=t.reactive({localColumns:Ya.cloneDeep(r.columnsValue),clickItemProp:"",checkList:r.columnsValue.map(w=>w.prop)}),s={toTop:w=>{if(w<=0)return;const E=c.localColumns.splice(w,1)[0];c.localColumns.unshift(E)},toBottom:w=>{if(w>=c.localColumns.length-1)return;const E=c.localColumns.splice(w,1)[0];c.localColumns.push(E)},toPre:w=>{if(w>0){const E=c.localColumns[w];c.localColumns[w]=c.localColumns[w-1],c.localColumns[w-1]=E}},toNext:w=>{if(w<c.localColumns.length-1){const E=c.localColumns[w];c.localColumns[w]=c.localColumns[w+1],c.localColumns[w+1]=E}}},f=()=>{c.localColumns=Ya.cloneDeep(r.columnsValue),c.checkList=r.columnsValue.filter(w=>w.checkActive).map(w=>w.prop||"")};t.watch(()=>i.value,w=>{w?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const p=()=>{a("update:submit",c.localColumns)},d=w=>{const E=r.columnsValue.map(S=>S.prop);c.checkList=w?E:[],h(c.checkList)},h=w=>{const E=w.map(S=>String(S));c.localColumns.forEach(S=>{S.checkActive=E.includes(S.prop)})},g=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),C=t.computed({get:()=>g.value,set:w=>d(w)}),y=()=>{c.localColumns=Ya.cloneDeep(r.columnsValue)},b=w=>{if(w.length>0){const E=Ya.cloneDeep(c.localColumns);c.localColumns=E.filter(S=>S.label.includes(w))}else y()};return(w,E)=>{const S=xr,N=jE;return t.openBlock(),t.createBlock(Fo,{modelValue:i.value,"onUpdate:modelValue":E[2]||(E[2]=x=>i.value=x),title:w.transferTitle,"onClick:submit":p},{default:t.withCtx(()=>[t.createElementVNode("div",bO,[t.createVNode(no,{"show-filter":!1,"show-search":!0,"full-input":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",yO,[t.createVNode(S,{modelValue:C.value,"onUpdate:modelValue":E[0]||(E[0]=x=>C.value=x),class:"px-4",onChange:d},{default:t.withCtx(()=>[t.createTextVNode(" 欄 ("+t.toDisplayString(c.checkList.length)+"/"+t.toDisplayString(c.localColumns.length)+") ",1)]),_:1},8,["modelValue"]),t.createVNode(N,{modelValue:c.checkList,"onUpdate:modelValue":E[1]||(E[1]=x=>c.checkList=x),onChange:h},{default:t.withCtx(()=>[t.renderSlot(w.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:s,handleMousedown:x=>c.clickItemProp=x},()=>[t.createElementVNode("div",wO,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(x,v)=>(t.openBlock(),t.createBlock(Qh,{key:x.prop,"dialog-modal-visible":i.value,"columns-value":x,"columns-index":v,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":x.checkActive,"transfer-active-border":c.clickItemProp==x.prop}),onMousedown:B=>c.clickItemProp=x.prop||"","onUpdate:toTop":B=>s.toTop(v),"onUpdate:toBottom":B=>s.toBottom(v),"onUpdate:toPre":B=>s.toPre(v),"onUpdate:toNext":B=>s.toNext(v)},null,8,["dialog-modal-visible","columns-value","columns-index","columns-len","class","onMousedown","onUpdate:toTop","onUpdate:toBottom","onUpdate:toPre","onUpdate:toNext"]))),128))])])]),_:3},8,["modelValue"])])]),_:3},8,["modelValue","title"])}}}),vO={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},_O={class:"flex items-center gap-2"},SO={key:0,class:"flex items-center text-black"},EO={class:"font-bold text-text text-xl md:text-2xl;"},xO={class:"flex items-center gap-3"},em=t.defineComponent({__name:"FunctionHeader",props:{title:{type:String,required:!1,default:""},showBack:{type:[Boolean,String,Object],required:!1,default:!1},depth:{type:Number,required:!1,default:1}},emits:["back"],setup(e,{emit:n}){const r=e,a=n,i=()=>{const c={};switch(typeof r.showBack){case"string":c.path=r.showBack;break;case"object":Object.assign(c,r.showBack);break;default:c.path=""}a("back",c)};return(c,s)=>{const f=ut;return t.openBlock(),t.createElementBlock("div",vO,[t.createElementVNode("div",_O,[e.showBack?(t.openBlock(),t.createElementBlock("div",SO,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(K1))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",EO,t.toDisplayString(r.title),1)]),t.createElementVNode("div",xO,[t.renderSlot(c.$slots,"default")])])}}}),kO={key:0,class:"px-4 pt-1.5"},BO={key:1,class:"py-1.5 px-4"},TO={key:0,class:"flex justify-start pl-1.5 pt-0"},tm=t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1}},setup(e){const n=e;return(r,a)=>{const i=xa;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(em),{title:n.title,showBack:n.showBack,depth:n.depth},null,8,["title","showBack","depth"]),t.createVNode(i,{class:"max-h-[calc(100vh-120px)] max-w-[100vw] overflow-auto"},{default:t.withCtx(()=>[r.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",kO,[t.renderSlot(r.$slots,"searchBar")])):t.createCommentVNode("",!0),r.$slots.main?(t.openBlock(),t.createElementBlock("div",BO,[t.renderSlot(r.$slots,"main")])):t.createCommentVNode("",!0)]),_:3}),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",TO,[t.renderSlot(r.$slots,"footer")])):t.createCommentVNode("",!0)],64)}}}),OO=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},showEdit:{type:Boolean},showFilter:{type:Boolean},showDefaultSearch:{type:Boolean},badgeValue:{},filterDrawerSize:{}},emits:["search","updatePage","updatePageSize"],setup(e,{emit:n}){const r=e,{pagination:a}=t.toRefs(r),i=n,c=t.computed(()=>r.showDefaultSearch||r.showSearch&&r.showEdit&&r.showFilter),s=h=>{i("search",h)},f=()=>{i("search",null)},p=h=>{i("updatePage",h)},d=h=>{i("updatePageSize",h)};return(h,g)=>{const C=vB;return t.openBlock(),t.createBlock(t.unref(tm),{title:r.title,"show-back":h.showBack},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(no),{"show-filter":c.value||h.showFilter,"show-search":c.value||h.showSearch,"badge-value":h.badgeValue,filterDrawerSize:h.filterDrawerSize,"onKeydown:enter":s,"onUpdate:clear":f},{button:t.withCtx(()=>[t.renderSlot(h.$slots,"firstButton"),c.value||h.showEdit?t.renderSlot(h.$slots,"customButton",{key:0}):t.createCommentVNode("",!0),t.renderSlot(h.$slots,"lastButton")]),filterBody:t.withCtx(()=>[t.renderSlot(h.$slots,"filterDrawBody")]),_:3},8,["show-filter","show-search","badge-value","filterDrawerSize"])]),main:t.withCtx(()=>[t.renderSlot(h.$slots,"main")]),footer:t.withCtx(()=>[t.unref(a).totalCount>0?(t.openBlock(),t.createBlock(C,{key:0,layout:"jumper, prev, pager, next, total, sizes","page-sizes":[10,20,30,40,50],"current-page":t.unref(a).page,"page-size":t.unref(a).limit,total:t.unref(a).totalCount,onCurrentChange:p,onSizeChange:d},null,8,["current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),Vo=t.defineComponent({__name:"FilterBtn",props:{badgeValue:{},drawerSize:{}},emits:["update:reset","update:submit"],setup(e,{emit:n}){const r=e,a=t.useAttrs(),i=t.ref(!1);function c(){i.value=!i.value}const s=n,f=()=>{s("update:reset")},p=t.computed(()=>r.drawerSize?r.drawerSize:"50%"),d=()=>{i.value=!1};return(h,g)=>{const C=ut,y=lE,b=$x;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(on),t.mergeProps(t.unref(a),{type:"primary",class:"filter-btn",onClick:c}),{default:t.withCtx(()=>[h.badgeValue&&h.badgeValue>0?(t.openBlock(),t.createBlock(y,{key:0,value:h.badgeValue,class:"!flex justify-center items-center",type:"primary"},{default:t.withCtx(()=>[t.renderSlot(h.$slots,"fill-filter",{},()=>[t.createVNode(C,{class:"filter-icon fill-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Md))]),_:1})])]),_:3},8,["value"])):t.renderSlot(h.$slots,"filter-icon",{key:1},()=>[t.createVNode(C,{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Md))]),_:1})])]),_:3},16),t.createVNode(b,{modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=w=>i.value=w),"append-to-body":"",size:p.value},{header:t.withCtx(()=>g[1]||(g[1]=[t.createElementVNode("div",{class:"flex justify-center text-base text-black font-semibold"},[t.createElementVNode("span",null,"查詢條件")],-1)])),footer:t.withCtx(()=>[t.createVNode(t.unref(on),{type:"primary",class:"filter-btn",onClick:d},{default:t.withCtx(()=>[t.createVNode(C,null,{default:t.withCtx(()=>[t.createVNode(t.unref(Fd))]),_:1}),g[3]||(g[3]=t.createElementVNode("p",null,"查詢",-1))]),_:1,__:[3]})]),default:t.withCtx(()=>[t.createElementVNode("div",{class:"flex justify-between items-center pb-5 font-semibold"},[g[2]||(g[2]=t.createElementVNode("div",{class:"text-base text-black/70"},"篩選條件",-1)),t.createElementVNode("div",{class:"text-base text-primary cursor-pointer",onClick:f},"重置")]),t.renderSlot(h.$slots,"default")]),_:3},8,["modelValue","size"])],64)}}});function NO(e){return e.map(n=>({...n,checkActive:!0}))}const AO=e=>{const n=["p-0 h-10"];return e!=null&&e.isDismissed&&n.push("bg-blue-20"),e!=null&&e.isHeader&&n.push("bg-primary-15 font-bold text-text text-sm leading-4"),n.join(" ")},PO=(e="normal")=>{switch(e){case"blue":return"text-blue-10";case"red":return"text-redText";default:return""}},RO={tableCell:"table-cell",tableHeader:"table-header",tableCellContent:"table-cell-content",dismissedRow:"dismissed-row",tableFooter:"table-footer",blueText:"blue-text",redText:"red-text",sortTableContainer:"sort-table-container",sortTableFunctionBar:"sort-table-function-bar",sortTableSettingsBtn:"sort-table-settings-btn",filterBtn:"filter-btn",filterBtnText:"filter-btn-text",filterBtnIcon:"filter-btn-icon",transferSortWrapper:"transfer-sort-wrapper",transferActiveBg:"transfer-active-bg",transferActiveBorder:"transfer-active-border",transferItemWrapper:"transfer-item-wrapper",transferArrowWrapper:"transfer-arrow-wrapper",baseDialogTitle:"base-dialog-title",cursorGrab:"cursor-grab",cursorGrabbing:"cursor-grabbing",dataTableConfig:"data-table-config",componentStyles:"component-styles"},nm=[Mo,on,zo,Vo,Fo,$l,no];function rm(e){nm.forEach(n=>{e.component(n.name||"VueTableComponent",n)})}const IO={install:rm,...nm};Mo.install=e=>{e.component(Mo.name||"BaseTable",Mo)},on.install=e=>{e.component(on.name||"BaseBtn",on)},zo.install=e=>{e.component(zo.name||"BaseInput",zo)},Vo.install=e=>{e.component(Vo.name||"FilterBtn",Vo)},Fo.install=e=>{e.component(Fo.name||"BaseDialog",Fo)},$l.install=e=>{e.component($l.name||"SortTable",$l)},no.install=e=>{e.component(no.name||"SearchBar",no)},Pe.BaseBtn=on,Pe.BaseDialog=Fo,Pe.BaseForm=lO,Pe.BaseInput=zo,Pe.BaseMultipleInput=aO,Pe.BaseTable=Mo,Pe.FilterBtn=Vo,Pe.FunctionHeader=em,Pe.MainPanel=tm,Pe.STYLE_CLASSES=RO,Pe.SearchBar=no,Pe.SearchableListPanel=OO,Pe.SortTable=$l,Pe.TransferDialog=CO,Pe.TransferItem=Qh,Pe.createTableCellClass=AO,Pe.createTextClass=PO,Pe.default=IO,Pe.install=rm,Pe.setActiveColumn=NO,Object.defineProperties(Pe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
55
|
+
}`;var Oe=k0(function(){return Ke(T,ce+"return "+Z).apply(r,R)});if(Oe.source=Z,$u(Oe))throw Oe;return Oe}function XR(o){return qe(o).toLowerCase()}function ZR(o){return qe(o).toUpperCase()}function JR(o,l,u){if(o=qe(o),o&&(u||l===r))return Lm(o);if(!o||!(l=fn(l)))return o;var m=zn(o),_=zn(l),T=$m(m,_),R=Mm(m,_)+1;return $r(m,T,R).join("")}function QR(o,l,u){if(o=qe(o),o&&(u||l===r))return o.slice(0,Fm(o)+1);if(!o||!(l=fn(l)))return o;var m=zn(o),_=Mm(m,zn(l))+1;return $r(m,0,_).join("")}function eI(o,l,u){if(o=qe(o),o&&(u||l===r))return o.replace(Wo,"");if(!o||!(l=fn(l)))return o;var m=zn(o),_=$m(m,zn(l));return $r(m,_).join("")}function tI(o,l){var u=W,m=V;if(at(l)){var _="separator"in l?l.separator:_;u="length"in l?Be(l.length):u,m="omission"in l?fn(l.omission):m}o=qe(o);var T=o.length;if(qo(o)){var R=zn(o);T=R.length}if(u>=T)return o;var I=u-Go(m);if(I<1)return m;var M=R?$r(R,0,I).join(""):o.slice(0,I);if(_===r)return M+m;if(R&&(I+=M.length-I),Mu(_)){if(o.slice(I).search(_)){var j,K=M;for(_.global||(_=Qc(_.source,qe(st.exec(_))+"g")),_.lastIndex=0;j=_.exec(K);)var Z=j.index;M=M.slice(0,Z===r?I:Z)}}else if(o.indexOf(fn(_),I)!=I){var ne=M.lastIndexOf(_);ne>-1&&(M=M.slice(0,ne))}return M+m}function nI(o){return o=qe(o),o&&xc.test(o)?o.replace(sr,AN):o}var rI=tl(function(o,l,u){return o+(u?" ":"")+l.toUpperCase()}),Vu=Bg("toUpperCase");function x0(o,l,u){return o=qe(o),l=u?r:l,l===r?kN(o)?IN(o):bN(o):o.match(l)||[]}var k0=Ae(function(o,l){try{return cn(o,r,l)}catch(u){return $u(u)?u:new we(u)}}),oI=pr(function(o,l){return _n(l,function(u){u=Qn(u),fr(o,u,Iu(o[u],o))}),o});function lI(o){var l=o==null?0:o.length,u=de();return o=l?lt(o,function(m){if(typeof m[1]!="function")throw new Sn(s);return[u(m[0]),m[1]]}):[],Ae(function(m){for(var _=-1;++_<l;){var T=o[_];if(cn(T[0],this,m))return cn(T[1],this,m)}})}function aI(o){return A3(xn(o,g))}function Du(o){return function(){return o}}function iI(o,l){return o==null||o!==o?l:o}var sI=Og(),cI=Og(!0);function Qt(o){return o}function Wu(o){return lg(typeof o=="function"?o:xn(o,g))}function uI(o){return ig(xn(o,g))}function fI(o,l){return sg(o,xn(l,g))}var dI=Ae(function(o,l){return function(u){return Gl(u,o,l)}}),pI=Ae(function(o,l){return function(u){return Gl(o,u,l)}});function Hu(o,l,u){var m=Ct(l),_=yi(l,m);u==null&&!(at(l)&&(_.length||!m.length))&&(u=l,l=o,o=this,_=yi(l,Ct(l)));var T=!(at(u)&&"chain"in u)||!!u.chain,R=mr(o);return _n(_,function(I){var M=l[I];o[I]=M,R&&(o.prototype[I]=function(){var j=this.__chain__;if(T||j){var K=o(this.__wrapped__),Z=K.__actions__=Xt(this.__actions__);return Z.push({func:M,args:arguments,thisArg:o}),K.__chain__=j,K}return M.apply(o,Nr([this.value()],arguments))})}),o}function hI(){return xt._===this&&(xt._=VN),this}function Uu(){}function mI(o){return o=Be(o),Ae(function(l){return cg(l,o)})}var gI=vu(lt),bI=vu(Nm),yI=vu(Kc);function B0(o){return Tu(o)?qc(Qn(o)):G3(o)}function wI(o){return function(l){return o==null?r:fo(o,l)}}var CI=Ag(),vI=Ag(!0);function ju(){return[]}function Ku(){return!1}function _I(){return{}}function SI(){return""}function EI(){return!0}function xI(o,l){if(o=Be(o),o<1||o>H)return[];var u=ee,m=Nt(o,ee);l=de(l),o-=ee;for(var _=Xc(m,l);++u<o;)l(u);return _}function kI(o){return ve(o)?lt(o,Qn):dn(o)?[o]:Xt(qg(qe(o)))}function BI(o){var l=++zN;return qe(o)+l}var TI=Ei(function(o,l){return o+l},0),OI=_u("ceil"),NI=Ei(function(o,l){return o/l},1),AI=_u("floor");function PI(o){return o&&o.length?bi(o,Qt,iu):r}function RI(o,l){return o&&o.length?bi(o,de(l,2),iu):r}function II(o){return Rm(o,Qt)}function LI(o,l){return Rm(o,de(l,2))}function $I(o){return o&&o.length?bi(o,Qt,fu):r}function MI(o,l){return o&&o.length?bi(o,de(l,2),fu):r}var zI=Ei(function(o,l){return o*l},1),FI=_u("round"),VI=Ei(function(o,l){return o-l},0);function DI(o){return o&&o.length?Yc(o,Qt):0}function WI(o,l){return o&&o.length?Yc(o,de(l,2)):0}return k.after=uP,k.ary=o0,k.assign=ZP,k.assignIn=y0,k.assignInWith=Mi,k.assignWith=JP,k.at=QP,k.before=l0,k.bind=Iu,k.bindAll=oI,k.bindKey=a0,k.castArray=_P,k.chain=t0,k.chunk=A4,k.compact=P4,k.concat=R4,k.cond=lI,k.conforms=aI,k.constant=Du,k.countBy=DA,k.create=eR,k.curry=i0,k.curryRight=s0,k.debounce=c0,k.defaults=tR,k.defaultsDeep=nR,k.defer=fP,k.delay=dP,k.difference=I4,k.differenceBy=L4,k.differenceWith=$4,k.drop=M4,k.dropRight=z4,k.dropRightWhile=F4,k.dropWhile=V4,k.fill=D4,k.filter=HA,k.flatMap=KA,k.flatMapDeep=qA,k.flatMapDepth=GA,k.flatten=Zg,k.flattenDeep=W4,k.flattenDepth=H4,k.flip=pP,k.flow=sI,k.flowRight=cI,k.fromPairs=U4,k.functions=cR,k.functionsIn=uR,k.groupBy=YA,k.initial=K4,k.intersection=q4,k.intersectionBy=G4,k.intersectionWith=Y4,k.invert=dR,k.invertBy=pR,k.invokeMap=ZA,k.iteratee=Wu,k.keyBy=JA,k.keys=Ct,k.keysIn=Jt,k.map=Ai,k.mapKeys=mR,k.mapValues=gR,k.matches=uI,k.matchesProperty=fI,k.memoize=Ri,k.merge=bR,k.mergeWith=w0,k.method=dI,k.methodOf=pI,k.mixin=Hu,k.negate=Ii,k.nthArg=mI,k.omit=yR,k.omitBy=wR,k.once=hP,k.orderBy=QA,k.over=gI,k.overArgs=mP,k.overEvery=bI,k.overSome=yI,k.partial=Lu,k.partialRight=u0,k.partition=eP,k.pick=CR,k.pickBy=C0,k.property=B0,k.propertyOf=wI,k.pull=Q4,k.pullAll=Qg,k.pullAllBy=eA,k.pullAllWith=tA,k.pullAt=nA,k.range=CI,k.rangeRight=vI,k.rearg=gP,k.reject=rP,k.remove=rA,k.rest=bP,k.reverse=Pu,k.sampleSize=lP,k.set=_R,k.setWith=SR,k.shuffle=aP,k.slice=oA,k.sortBy=cP,k.sortedUniq=fA,k.sortedUniqBy=dA,k.split=KR,k.spread=yP,k.tail=pA,k.take=hA,k.takeRight=mA,k.takeRightWhile=gA,k.takeWhile=bA,k.tap=PA,k.throttle=wP,k.thru=Ni,k.toArray=m0,k.toPairs=v0,k.toPairsIn=_0,k.toPath=kI,k.toPlainObject=b0,k.transform=ER,k.unary=CP,k.union=yA,k.unionBy=wA,k.unionWith=CA,k.uniq=vA,k.uniqBy=_A,k.uniqWith=SA,k.unset=xR,k.unzip=Ru,k.unzipWith=e0,k.update=kR,k.updateWith=BR,k.values=ol,k.valuesIn=TR,k.without=EA,k.words=x0,k.wrap=vP,k.xor=xA,k.xorBy=kA,k.xorWith=BA,k.zip=TA,k.zipObject=OA,k.zipObjectDeep=NA,k.zipWith=AA,k.entries=v0,k.entriesIn=_0,k.extend=y0,k.extendWith=Mi,Hu(k,k),k.add=TI,k.attempt=k0,k.camelCase=PR,k.capitalize=S0,k.ceil=OI,k.clamp=OR,k.clone=SP,k.cloneDeep=xP,k.cloneDeepWith=kP,k.cloneWith=EP,k.conformsTo=BP,k.deburr=E0,k.defaultTo=iI,k.divide=NI,k.endsWith=RR,k.eq=Vn,k.escape=IR,k.escapeRegExp=LR,k.every=WA,k.find=UA,k.findIndex=Yg,k.findKey=rR,k.findLast=jA,k.findLastIndex=Xg,k.findLastKey=oR,k.floor=AI,k.forEach=n0,k.forEachRight=r0,k.forIn=lR,k.forInRight=aR,k.forOwn=iR,k.forOwnRight=sR,k.get=zu,k.gt=TP,k.gte=OP,k.has=fR,k.hasIn=Fu,k.head=Jg,k.identity=Qt,k.includes=XA,k.indexOf=j4,k.inRange=NR,k.invoke=hR,k.isArguments=mo,k.isArray=ve,k.isArrayBuffer=NP,k.isArrayLike=Zt,k.isArrayLikeObject=dt,k.isBoolean=AP,k.isBuffer=Mr,k.isDate=PP,k.isElement=RP,k.isEmpty=IP,k.isEqual=LP,k.isEqualWith=$P,k.isError=$u,k.isFinite=MP,k.isFunction=mr,k.isInteger=f0,k.isLength=Li,k.isMap=d0,k.isMatch=zP,k.isMatchWith=FP,k.isNaN=VP,k.isNative=DP,k.isNil=HP,k.isNull=WP,k.isNumber=p0,k.isObject=at,k.isObjectLike=ct,k.isPlainObject=ea,k.isRegExp=Mu,k.isSafeInteger=UP,k.isSet=h0,k.isString=$i,k.isSymbol=dn,k.isTypedArray=rl,k.isUndefined=jP,k.isWeakMap=KP,k.isWeakSet=qP,k.join=X4,k.kebabCase=$R,k.last=Bn,k.lastIndexOf=Z4,k.lowerCase=MR,k.lowerFirst=zR,k.lt=GP,k.lte=YP,k.max=PI,k.maxBy=RI,k.mean=II,k.meanBy=LI,k.min=$I,k.minBy=MI,k.stubArray=ju,k.stubFalse=Ku,k.stubObject=_I,k.stubString=SI,k.stubTrue=EI,k.multiply=zI,k.nth=J4,k.noConflict=hI,k.noop=Uu,k.now=Pi,k.pad=FR,k.padEnd=VR,k.padStart=DR,k.parseInt=WR,k.random=AR,k.reduce=tP,k.reduceRight=nP,k.repeat=HR,k.replace=UR,k.result=vR,k.round=FI,k.runInContext=$,k.sample=oP,k.size=iP,k.snakeCase=jR,k.some=sP,k.sortedIndex=lA,k.sortedIndexBy=aA,k.sortedIndexOf=iA,k.sortedLastIndex=sA,k.sortedLastIndexBy=cA,k.sortedLastIndexOf=uA,k.startCase=qR,k.startsWith=GR,k.subtract=VI,k.sum=DI,k.sumBy=WI,k.template=YR,k.times=xI,k.toFinite=gr,k.toInteger=Be,k.toLength=g0,k.toLower=XR,k.toNumber=Tn,k.toSafeInteger=XP,k.toString=qe,k.toUpper=ZR,k.trim=JR,k.trimEnd=QR,k.trimStart=eI,k.truncate=tI,k.unescape=nI,k.uniqueId=BI,k.upperCase=rI,k.upperFirst=Vu,k.each=n0,k.eachRight=r0,k.first=Jg,Hu(k,(function(){var o={};return Zn(k,function(l,u){Ge.call(k.prototype,u)||(o[u]=l)}),o})(),{chain:!1}),k.VERSION=a,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){k[o].placeholder=k}),_n(["drop","take"],function(o,l){Me.prototype[o]=function(u){u=u===r?1:yt(Be(u),0);var m=this.__filtered__&&!l?new Me(this):this.clone();return m.__filtered__?m.__takeCount__=Nt(u,m.__takeCount__):m.__views__.push({size:Nt(u,ee),type:o+(m.__dir__<0?"Right":"")}),m},Me.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),_n(["filter","map","takeWhile"],function(o,l){var u=l+1,m=u==re||u==J;Me.prototype[o]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:de(_,3),type:u}),T.__filtered__=T.__filtered__||m,T}}),_n(["head","last"],function(o,l){var u="take"+(l?"Right":"");Me.prototype[o]=function(){return this[u](1).value()[0]}}),_n(["initial","tail"],function(o,l){var u="drop"+(l?"":"Right");Me.prototype[o]=function(){return this.__filtered__?new Me(this):this[u](1)}}),Me.prototype.compact=function(){return this.filter(Qt)},Me.prototype.find=function(o){return this.filter(o).head()},Me.prototype.findLast=function(o){return this.reverse().find(o)},Me.prototype.invokeMap=Ae(function(o,l){return typeof o=="function"?new Me(this):this.map(function(u){return Gl(u,o,l)})}),Me.prototype.reject=function(o){return this.filter(Ii(de(o)))},Me.prototype.slice=function(o,l){o=Be(o);var u=this;return u.__filtered__&&(o>0||l<0)?new Me(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),l!==r&&(l=Be(l),u=l<0?u.dropRight(-l):u.take(l-o)),u)},Me.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Me.prototype.toArray=function(){return this.take(ee)},Zn(Me.prototype,function(o,l){var u=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),_=k[m?"take"+(l=="last"?"Right":""):l],T=m||/^find/.test(l);_&&(k.prototype[l]=function(){var R=this.__wrapped__,I=m?[1]:arguments,M=R instanceof Me,j=I[0],K=M||ve(R),Z=function(Le){var Fe=_.apply(k,Nr([Le],I));return m&&ne?Fe[0]:Fe};K&&u&&typeof j=="function"&&j.length!=1&&(M=K=!1);var ne=this.__chain__,ce=!!this.__actions__.length,pe=T&&!ne,Oe=M&&!ce;if(!T&&K){R=Oe?R:new Me(this);var he=o.apply(R,I);return he.__actions__.push({func:Ni,args:[Z],thisArg:r}),new En(he,ne)}return pe&&Oe?o.apply(this,I):(he=this.thru(Z),pe?m?he.value()[0]:he.value():he)})}),_n(["pop","push","shift","sort","splice","unshift"],function(o){var l=ni[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",m=/^(?:pop|shift)$/.test(o);k.prototype[o]=function(){var _=arguments;if(m&&!this.__chain__){var T=this.value();return l.apply(ve(T)?T:[],_)}return this[u](function(R){return l.apply(ve(R)?R:[],_)})}}),Zn(Me.prototype,function(o,l){var u=k[l];if(u){var m=u.name+"";Ge.call(Jo,m)||(Jo[m]=[]),Jo[m].push({name:l,func:u})}}),Jo[Si(r,S).name]=[{name:"wrapper",func:r}],Me.prototype.clone=n3,Me.prototype.reverse=r3,Me.prototype.value=o3,k.prototype.at=RA,k.prototype.chain=IA,k.prototype.commit=LA,k.prototype.next=$A,k.prototype.plant=zA,k.prototype.reverse=FA,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=VA,k.prototype.first=k.prototype.head,Dl&&(k.prototype[Dl]=MA),k}),Yo=LN();ao?((ao.exports=Yo)._=Yo,Wc._=Yo):xt._=Yo}).call(hO)})(Ml,Ml.exports)),Ml.exports}var gO=mO();const Ya=OE(gO),Qh=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e){const n=e,r=t.reactive({itemOnHover:!1,itemOnClick:!1}),a=()=>{r.itemOnClick=!0,r.itemOnHover=!1},i=()=>{r.itemOnClick=!1,r.itemOnHover=!0};return t.watch(()=>n.dialogModalVisible,c=>{c||(r.itemOnClick=!1,r.itemOnHover=!1)}),(c,s)=>{const f=xr,p=ex,d=kB;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":r.itemOnHover,"cursor-grabbing":r.itemOnClick}]),onMouseenter:s[4]||(s[4]=h=>r.itemOnHover=!0),onMouseleave:s[5]||(s[5]=h=>r.itemOnHover=!1),onMousedown:a,onMouseup:i},[(t.openBlock(),t.createBlock(f,{label:c.columnsValue.label,value:c.columnsValue.prop,key:c.columnsValue.prop},null,8,["label","value"])),c.columnsValue.checkActive?(t.openBlock(),t.createBlock(d,{key:0,class:"transfer-arrow-wrapper"},{default:t.withCtx(()=>[t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(m_),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:s[0]||(s[0]=h=>c.$emit("update:toTop"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(ps),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:s[1]||(s[1]=h=>c.$emit("update:toPre"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(wa),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:s[2]||(s[2]=h=>c.$emit("update:toNext"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(Z1),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:s[3]||(s[3]=h=>c.$emit("update:toBottom"))},null,8,["icon","disabled"])]),_:1})]),_:1})):t.createCommentVNode("",!0)],34)}}}),bO={class:"search-bar"},yO={class:"transfer-sort-wrapper"},wO={class:"max-h-96 overflow-y-auto"},CO=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit"],setup(e,{emit:n}){const r=e,a=n,i=t.computed({get:()=>r.modelValue,set:w=>a("update:modelValue",w)}),c=t.reactive({localColumns:Ya.cloneDeep(r.columnsValue),clickItemProp:"",checkList:r.columnsValue.map(w=>w.prop)}),s={toTop:w=>{if(w<=0)return;const E=c.localColumns.splice(w,1)[0];c.localColumns.unshift(E)},toBottom:w=>{if(w>=c.localColumns.length-1)return;const E=c.localColumns.splice(w,1)[0];c.localColumns.push(E)},toPre:w=>{if(w>0){const E=c.localColumns[w];c.localColumns[w]=c.localColumns[w-1],c.localColumns[w-1]=E}},toNext:w=>{if(w<c.localColumns.length-1){const E=c.localColumns[w];c.localColumns[w]=c.localColumns[w+1],c.localColumns[w+1]=E}}},f=()=>{c.localColumns=Ya.cloneDeep(r.columnsValue),c.checkList=r.columnsValue.filter(w=>w.checkActive).map(w=>w.prop||"")};t.watch(()=>i.value,w=>{w?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const p=()=>{a("update:submit",c.localColumns)},d=w=>{const E=r.columnsValue.map(S=>S.prop);c.checkList=w?E:[],h(c.checkList)},h=w=>{const E=w.map(S=>String(S));c.localColumns.forEach(S=>{S.checkActive=E.includes(S.prop)})},g=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),C=t.computed({get:()=>g.value,set:w=>d(w)}),y=()=>{c.localColumns=Ya.cloneDeep(r.columnsValue)},b=w=>{if(w.length>0){const E=Ya.cloneDeep(c.localColumns);c.localColumns=E.filter(S=>S.label.includes(w))}else y()};return(w,E)=>{const S=xr,N=jE;return t.openBlock(),t.createBlock(Fo,{modelValue:i.value,"onUpdate:modelValue":E[2]||(E[2]=x=>i.value=x),title:w.transferTitle,"onClick:submit":p},{default:t.withCtx(()=>[t.createElementVNode("div",bO,[t.createVNode(no,{"show-filter":!1,"show-search":!0,"full-input":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",yO,[t.createVNode(S,{modelValue:C.value,"onUpdate:modelValue":E[0]||(E[0]=x=>C.value=x),class:"px-4",onChange:d},{default:t.withCtx(()=>[t.createTextVNode(" 欄 ("+t.toDisplayString(c.checkList.length)+"/"+t.toDisplayString(c.localColumns.length)+") ",1)]),_:1},8,["modelValue"]),t.createVNode(N,{modelValue:c.checkList,"onUpdate:modelValue":E[1]||(E[1]=x=>c.checkList=x),onChange:h},{default:t.withCtx(()=>[t.renderSlot(w.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:s,handleMousedown:x=>c.clickItemProp=x},()=>[t.createElementVNode("div",wO,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(x,v)=>(t.openBlock(),t.createBlock(Qh,{key:x.prop,"dialog-modal-visible":i.value,"columns-value":x,"columns-index":v,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":x.checkActive,"transfer-active-border":c.clickItemProp==x.prop}),onMousedown:B=>c.clickItemProp=x.prop||"","onUpdate:toTop":B=>s.toTop(v),"onUpdate:toBottom":B=>s.toBottom(v),"onUpdate:toPre":B=>s.toPre(v),"onUpdate:toNext":B=>s.toNext(v)},null,8,["dialog-modal-visible","columns-value","columns-index","columns-len","class","onMousedown","onUpdate:toTop","onUpdate:toBottom","onUpdate:toPre","onUpdate:toNext"]))),128))])])]),_:3},8,["modelValue"])])]),_:3},8,["modelValue","title"])}}}),vO={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},_O={class:"flex items-center gap-2"},SO={key:0,class:"flex items-center text-black"},EO={class:"font-bold text-text text-xl md:text-2xl;"},xO={class:"flex items-center gap-3"},em=t.defineComponent({__name:"FunctionHeader",props:{title:{type:String,required:!1,default:""},showBack:{type:[Boolean,String,Object],required:!1,default:!1},depth:{type:Number,required:!1,default:1}},emits:["back"],setup(e,{emit:n}){const r=e,a=n,i=()=>{const c={};switch(typeof r.showBack){case"string":c.path=r.showBack;break;case"object":Object.assign(c,r.showBack);break;default:c.path=""}a("back",c)};return(c,s)=>{const f=ut;return t.openBlock(),t.createElementBlock("div",vO,[t.createElementVNode("div",_O,[e.showBack?(t.openBlock(),t.createElementBlock("div",SO,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(K1))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",EO,t.toDisplayString(r.title),1)]),t.createElementVNode("div",xO,[t.renderSlot(c.$slots,"default")])])}}}),kO={key:0,class:"px-4 pt-1.5"},BO={key:1,class:"py-1.5 px-4"},TO={key:0,class:"flex justify-start pl-1.5 pt-0"},tm=t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1},maxHeight:{default:"calc(100vh-120px)"}},setup(e){const n=e;return(r,a)=>{const i=xa;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(em),{title:n.title,showBack:n.showBack,depth:n.depth},null,8,["title","showBack","depth"]),t.createVNode(i,{class:t.normalizeClass(`max-h-[${n.maxHeight}] max-w-screen overflow-auto`)},{default:t.withCtx(()=>[r.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",kO,[t.renderSlot(r.$slots,"searchBar")])):t.createCommentVNode("",!0),r.$slots.main?(t.openBlock(),t.createElementBlock("div",BO,[t.renderSlot(r.$slots,"main")])):t.createCommentVNode("",!0)]),_:3},8,["class"]),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",TO,[t.renderSlot(r.$slots,"footer")])):t.createCommentVNode("",!0)],64)}}}),OO=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},showEdit:{type:Boolean},showFilter:{type:Boolean},showDefaultSearch:{type:Boolean},badgeValue:{},filterDrawerSize:{}},emits:["search","updatePage","updatePageSize"],setup(e,{emit:n}){const r=e,{pagination:a}=t.toRefs(r),i=n,c=t.computed(()=>r.showDefaultSearch||r.showSearch&&r.showEdit&&r.showFilter),s=h=>{i("search",h)},f=()=>{i("search",null)},p=h=>{i("updatePage",h)},d=h=>{i("updatePageSize",h)};return(h,g)=>{const C=vB;return t.openBlock(),t.createBlock(t.unref(tm),{title:r.title,"show-back":h.showBack},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(no),{"show-filter":c.value||h.showFilter,"show-search":c.value||h.showSearch,"badge-value":h.badgeValue,"filter-drawer-size":h.filterDrawerSize,"onKeydown:enter":s,"onUpdate:clear":f},{button:t.withCtx(()=>[t.renderSlot(h.$slots,"firstButton"),c.value||h.showEdit?t.renderSlot(h.$slots,"customButton",{key:0}):t.createCommentVNode("",!0),t.renderSlot(h.$slots,"lastButton")]),filterBody:t.withCtx(()=>[t.renderSlot(h.$slots,"filterDrawBody")]),_:3},8,["show-filter","show-search","badge-value","filter-drawer-size"])]),main:t.withCtx(()=>[t.renderSlot(h.$slots,"main")]),footer:t.withCtx(()=>[t.unref(a).totalCount>0?(t.openBlock(),t.createBlock(C,{key:0,layout:"jumper, prev, pager, next, total, sizes","page-sizes":[10,20,30,40,50],"current-page":t.unref(a).page,"page-size":t.unref(a).limit,total:t.unref(a).totalCount,onCurrentChange:p,onSizeChange:d},null,8,["current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),Vo=t.defineComponent({__name:"FilterBtn",props:{badgeValue:{},drawerSize:{}},emits:["update:reset","update:submit"],setup(e,{emit:n}){const r=t.useAttrs(),a=t.ref(!1);function i(){a.value=!a.value}const c=n,s=()=>{c("update:reset")},f=()=>{a.value=!1};return(p,d)=>{const h=ut,g=lE,C=$x;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(on),t.mergeProps(t.unref(r),{type:"primary",class:"filter-btn",onClick:i}),{default:t.withCtx(()=>[p.badgeValue&&p.badgeValue>0?(t.openBlock(),t.createBlock(g,{key:0,value:p.badgeValue,class:"!flex justify-center items-center",type:"primary"},{default:t.withCtx(()=>[t.renderSlot(p.$slots,"fill-filter",{},()=>[t.createVNode(h,{class:"filter-icon fill-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Md))]),_:1})])]),_:3},8,["value"])):t.renderSlot(p.$slots,"filter-icon",{key:1},()=>[t.createVNode(h,{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Md))]),_:1})])]),_:3},16),t.createVNode(C,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=y=>a.value=y),"append-to-body":"",size:p.drawerSize},{header:t.withCtx(()=>d[1]||(d[1]=[t.createElementVNode("div",{class:"flex justify-center text-base text-black font-semibold"},[t.createElementVNode("span",null,"查詢條件")],-1)])),footer:t.withCtx(()=>[t.createVNode(t.unref(on),{type:"primary",class:"filter-btn",onClick:f},{default:t.withCtx(()=>[t.createVNode(h,null,{default:t.withCtx(()=>[t.createVNode(t.unref(Fd))]),_:1}),d[3]||(d[3]=t.createElementVNode("p",null,"查詢",-1))]),_:1,__:[3]})]),default:t.withCtx(()=>[t.createElementVNode("div",{class:"flex justify-between items-center pb-5 font-semibold"},[d[2]||(d[2]=t.createElementVNode("div",{class:"text-base text-black/70"},"篩選條件",-1)),t.createElementVNode("div",{class:"text-base text-primary cursor-pointer",onClick:s},"重置")]),t.renderSlot(p.$slots,"default")]),_:3},8,["modelValue","size"])],64)}}});function NO(e){return e.map(n=>({...n,checkActive:!0}))}const AO=e=>{const n=["p-0 h-10"];return e!=null&&e.isDismissed&&n.push("bg-blue-20"),e!=null&&e.isHeader&&n.push("bg-primary-15 font-bold text-text text-sm leading-4"),n.join(" ")},PO=(e="normal")=>{switch(e){case"blue":return"text-blue-10";case"red":return"text-redText";default:return""}},RO={tableCell:"table-cell",tableHeader:"table-header",tableCellContent:"table-cell-content",dismissedRow:"dismissed-row",tableFooter:"table-footer",blueText:"blue-text",redText:"red-text",sortTableContainer:"sort-table-container",sortTableFunctionBar:"sort-table-function-bar",sortTableSettingsBtn:"sort-table-settings-btn",filterBtn:"filter-btn",filterBtnText:"filter-btn-text",filterBtnIcon:"filter-btn-icon",transferSortWrapper:"transfer-sort-wrapper",transferActiveBg:"transfer-active-bg",transferActiveBorder:"transfer-active-border",transferItemWrapper:"transfer-item-wrapper",transferArrowWrapper:"transfer-arrow-wrapper",baseDialogTitle:"base-dialog-title",cursorGrab:"cursor-grab",cursorGrabbing:"cursor-grabbing",dataTableConfig:"data-table-config",componentStyles:"component-styles"},nm=[Mo,on,zo,Vo,Fo,$l,no];function rm(e){nm.forEach(n=>{e.component(n.name||"VueTableComponent",n)})}const IO={install:rm,...nm};Mo.install=e=>{e.component(Mo.name||"BaseTable",Mo)},on.install=e=>{e.component(on.name||"BaseBtn",on)},zo.install=e=>{e.component(zo.name||"BaseInput",zo)},Vo.install=e=>{e.component(Vo.name||"FilterBtn",Vo)},Fo.install=e=>{e.component(Fo.name||"BaseDialog",Fo)},$l.install=e=>{e.component($l.name||"SortTable",$l)},no.install=e=>{e.component(no.name||"SearchBar",no)},Pe.BaseBtn=on,Pe.BaseDialog=Fo,Pe.BaseForm=lO,Pe.BaseInput=zo,Pe.BaseMultipleInput=aO,Pe.BaseTable=Mo,Pe.FilterBtn=Vo,Pe.FunctionHeader=em,Pe.MainPanel=tm,Pe.STYLE_CLASSES=RO,Pe.SearchBar=no,Pe.SearchableListPanel=OO,Pe.SortTable=$l,Pe.TransferDialog=CO,Pe.TransferItem=Qh,Pe.createTableCellClass=AO,Pe.createTextClass=PO,Pe.default=IO,Pe.install=rm,Pe.setActiveColumn=NO,Object.defineProperties(Pe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|