@pathscale/ui 0.0.89 → 0.0.91
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Accessor, type JSX } from "solid-js";
|
|
2
2
|
import { type ColumnDef, type SortingState, type ColumnFiltersState, type PaginationState, type OnChangeFn } from "@tanstack/solid-table";
|
|
3
3
|
import { type TableProps } from "./Table";
|
|
4
4
|
export type EnhancedTableProps<TData> = Omit<TableProps, "children"> & {
|
|
@@ -10,6 +10,8 @@ export type EnhancedTableProps<TData> = Omit<TableProps, "children"> & {
|
|
|
10
10
|
setColumnFilters?: OnChangeFn<ColumnFiltersState>;
|
|
11
11
|
pagination?: Accessor<PaginationState>;
|
|
12
12
|
setPagination?: OnChangeFn<PaginationState>;
|
|
13
|
+
globalFilter?: Accessor<string>;
|
|
14
|
+
setGlobalFilter?: OnChangeFn<string>;
|
|
13
15
|
enableSorting?: boolean;
|
|
14
16
|
enableFilters?: boolean;
|
|
15
17
|
enablePagination?: boolean;
|
|
@@ -17,6 +19,13 @@ export type EnhancedTableProps<TData> = Omit<TableProps, "children"> & {
|
|
|
17
19
|
row: any;
|
|
18
20
|
}) => JSX.Element;
|
|
19
21
|
renderEmpty?: () => JSX.Element;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
renderLoading?: () => JSX.Element;
|
|
24
|
+
filterIcon: JSX.Element;
|
|
25
|
+
sortAscIcon: JSX.Element;
|
|
26
|
+
sortDescIcon: JSX.Element;
|
|
27
|
+
sortNeutralIcon?: JSX.Element;
|
|
28
|
+
filterPanelClass?: string;
|
|
20
29
|
};
|
|
21
30
|
declare function EnhancedTable<TData>(props: EnhancedTableProps<TData>): JSX.Element;
|
|
22
31
|
export default EnhancedTable;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Component, type JSX } from "solid-js";
|
|
2
2
|
import type { IComponentBaseProps, ComponentSize } from "../types";
|
|
3
|
-
import EnhancedTable from "./EnhancedTable";
|
|
4
3
|
export type TableProps = JSX.HTMLAttributes<HTMLTableElement> & IComponentBaseProps & {
|
|
5
4
|
size?: ComponentSize;
|
|
6
5
|
zebra?: boolean;
|
|
@@ -15,6 +14,5 @@ declare const _default: Component<TableProps> & {
|
|
|
15
14
|
Footer: Component<import("./TableFooter").TableFooterProps>;
|
|
16
15
|
Cell: Component<import("./TableCell").TableCellProps>;
|
|
17
16
|
HeadCell: Component<import("./TableHeadCell").TableHeadCellProps>;
|
|
18
|
-
Enhanced: typeof EnhancedTable;
|
|
19
17
|
};
|
|
20
18
|
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export type { StatusProps } from "./components/status";
|
|
|
72
72
|
export { default as Steps } from "./components/steps";
|
|
73
73
|
export { SvgBackground, type SvgBackgroundProps, } from "./components/svgbackground";
|
|
74
74
|
export { default as Swap } from "./components/swap";
|
|
75
|
-
export { default as Table } from "./components/table";
|
|
75
|
+
export { default as Table, EnhancedTable } from "./components/table";
|
|
76
76
|
export type { TableProps } from "./components/table";
|
|
77
77
|
export type { EnhancedTableProps } from "./components/table/EnhancedTable";
|
|
78
78
|
export { default as Tabs } from "./components/tabs";
|
package/dist/index.js
CHANGED
|
@@ -4997,11 +4997,11 @@ const Re = Ht("host", {
|
|
|
4997
4997
|
} : t.key = n, Ht(e, t)), I = p, Wt = H`*,*:before,*:after{box-sizing:border-box}button{padding:0;touch-action:manipulation;cursor:pointer;user-select:none}`, Jt = H`.vh{position:absolute;transform:scale(0)}`;
|
|
4998
4998
|
function lt() {
|
|
4999
4999
|
const e = /* @__PURE__ */ new Date();
|
|
5000
|
-
return new
|
|
5000
|
+
return new cally_v(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
5001
5001
|
}
|
|
5002
5002
|
function ut(e, t = 0) {
|
|
5003
5003
|
const n = w(e), s = n.getUTCDay(), r = (s < t ? 7 : 0) + s - t;
|
|
5004
|
-
return n.setUTCDate(n.getUTCDate() - r),
|
|
5004
|
+
return n.setUTCDate(n.getUTCDate() - r), cally_v.from(n);
|
|
5005
5005
|
}
|
|
5006
5006
|
function Zt(e, t = 0) {
|
|
5007
5007
|
return ut(e, t).add({
|
|
@@ -5009,10 +5009,10 @@ function Zt(e, t = 0) {
|
|
|
5009
5009
|
});
|
|
5010
5010
|
}
|
|
5011
5011
|
function Xt(e) {
|
|
5012
|
-
return
|
|
5012
|
+
return cally_v.from(new Date(Date.UTC(e.year, e.month, 0)));
|
|
5013
5013
|
}
|
|
5014
5014
|
function K(e, t, n) {
|
|
5015
|
-
return t &&
|
|
5015
|
+
return t && cally_v.compare(e, t) < 0 ? t : n && cally_v.compare(e, n) > 0 ? n : e;
|
|
5016
5016
|
}
|
|
5017
5017
|
const _e = {
|
|
5018
5018
|
days: 1
|
|
@@ -5020,7 +5020,7 @@ const _e = {
|
|
|
5020
5020
|
function je(e, t = 0) {
|
|
5021
5021
|
let n = ut(e.toPlainDate(), t);
|
|
5022
5022
|
const s = Zt(Xt(e), t), r = [];
|
|
5023
|
-
for(;
|
|
5023
|
+
for(; cally_v.compare(n, s) < 0;){
|
|
5024
5024
|
const o = [];
|
|
5025
5025
|
for(let a = 0; a < 7; a++)o.push(n), n = n.add(_e);
|
|
5026
5026
|
r.push(o);
|
|
@@ -5031,21 +5031,21 @@ function w(e) {
|
|
|
5031
5031
|
return new Date(Date.UTC(e.year, e.month - 1, e.day ?? 1));
|
|
5032
5032
|
}
|
|
5033
5033
|
const Ye = /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[0-1])$/, Q = (e, t)=>e.toString().padStart(t, "0");
|
|
5034
|
-
class
|
|
5034
|
+
class cally_v {
|
|
5035
5035
|
constructor(t, n, s){
|
|
5036
5036
|
this.year = t, this.month = n, this.day = s;
|
|
5037
5037
|
}
|
|
5038
5038
|
add(t) {
|
|
5039
5039
|
const n = w(this);
|
|
5040
|
-
if ("days" in t) return n.setUTCDate(this.day + t.days),
|
|
5040
|
+
if ("days" in t) return n.setUTCDate(this.day + t.days), cally_v.from(n);
|
|
5041
5041
|
let { year: s, month: r } = this;
|
|
5042
5042
|
"months" in t ? (r = this.month + t.months, n.setUTCMonth(r - 1)) : (s = this.year + t.years, n.setUTCFullYear(s));
|
|
5043
|
-
const o =
|
|
5043
|
+
const o = cally_v.from(w({
|
|
5044
5044
|
year: s,
|
|
5045
5045
|
month: r,
|
|
5046
5046
|
day: 1
|
|
5047
5047
|
}));
|
|
5048
|
-
return K(
|
|
5048
|
+
return K(cally_v.from(n), o, Xt(o));
|
|
5049
5049
|
}
|
|
5050
5050
|
toString() {
|
|
5051
5051
|
return `${Q(this.year, 4)}-${Q(this.month, 2)}-${Q(this.day, 2)}`;
|
|
@@ -5054,7 +5054,7 @@ class v {
|
|
|
5054
5054
|
return new W(this.year, this.month);
|
|
5055
5055
|
}
|
|
5056
5056
|
equals(t) {
|
|
5057
|
-
return 0 ===
|
|
5057
|
+
return 0 === cally_v.compare(this, t);
|
|
5058
5058
|
}
|
|
5059
5059
|
static compare(t, n) {
|
|
5060
5060
|
return t.year < n.year ? -1 : t.year > n.year ? 1 : t.month < n.month ? -1 : t.month > n.month ? 1 : t.day < n.day ? -1 : t.day > n.day ? 1 : 0;
|
|
@@ -5064,9 +5064,9 @@ class v {
|
|
|
5064
5064
|
const n = t.match(Ye);
|
|
5065
5065
|
if (!n) throw new TypeError(t);
|
|
5066
5066
|
const [, s, r, o] = n;
|
|
5067
|
-
return new
|
|
5067
|
+
return new cally_v(parseInt(s, 10), parseInt(r, 10), parseInt(o, 10));
|
|
5068
5068
|
}
|
|
5069
|
-
return new
|
|
5069
|
+
return new cally_v(t.getUTCFullYear(), t.getUTCMonth() + 1, t.getUTCDate());
|
|
5070
5070
|
}
|
|
5071
5071
|
}
|
|
5072
5072
|
class W {
|
|
@@ -5081,7 +5081,7 @@ class W {
|
|
|
5081
5081
|
return this.year === t.year && this.month === t.month;
|
|
5082
5082
|
}
|
|
5083
5083
|
toPlainDate() {
|
|
5084
|
-
return new
|
|
5084
|
+
return new cally_v(this.year, this.month, 1);
|
|
5085
5085
|
}
|
|
5086
5086
|
}
|
|
5087
5087
|
function z(e, t) {
|
|
@@ -5092,7 +5092,7 @@ function z(e, t) {
|
|
|
5092
5092
|
function N(e) {
|
|
5093
5093
|
const [t, n] = it(e);
|
|
5094
5094
|
return [
|
|
5095
|
-
C(()=>z(
|
|
5095
|
+
C(()=>z(cally_v, t), [
|
|
5096
5096
|
t
|
|
5097
5097
|
]),
|
|
5098
5098
|
(o)=>n(o?.toString())
|
|
@@ -5102,7 +5102,7 @@ function Be(e) {
|
|
|
5102
5102
|
const [t = "", n] = it(e);
|
|
5103
5103
|
return [
|
|
5104
5104
|
C(()=>{
|
|
5105
|
-
const [o, a] = t.split("/"), u = z(
|
|
5105
|
+
const [o, a] = t.split("/"), u = z(cally_v, o), i = z(cally_v, a);
|
|
5106
5106
|
return u && i ? [
|
|
5107
5107
|
u,
|
|
5108
5108
|
i
|
|
@@ -5119,7 +5119,7 @@ function qe(e) {
|
|
|
5119
5119
|
C(()=>{
|
|
5120
5120
|
const o = [];
|
|
5121
5121
|
for (const a of t.trim().split(/\s+/)){
|
|
5122
|
-
const u = z(
|
|
5122
|
+
const u = z(cally_v, a);
|
|
5123
5123
|
u && o.push(u);
|
|
5124
5124
|
}
|
|
5125
5125
|
return o;
|
|
@@ -5569,7 +5569,7 @@ const Qe = cally_j((e)=>{
|
|
|
5569
5569
|
styles: mt
|
|
5570
5570
|
});
|
|
5571
5571
|
customElements.define("calendar-date", Qe);
|
|
5572
|
-
const Mt = (e, t)=>
|
|
5572
|
+
const Mt = (e, t)=>cally_v.compare(e, t) < 0 ? [
|
|
5573
5573
|
e,
|
|
5574
5574
|
t
|
|
5575
5575
|
] : [
|
|
@@ -11048,7 +11048,7 @@ function Swap(props) {
|
|
|
11048
11048
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
11049
11049
|
"click"
|
|
11050
11050
|
]);
|
|
11051
|
-
var TableHead_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<thead
|
|
11051
|
+
var TableHead_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<thead>"), TableHead_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<tr>");
|
|
11052
11052
|
const TableHead_TableHead = (props)=>{
|
|
11053
11053
|
const [local, rest] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
11054
11054
|
"children",
|
|
@@ -11060,7 +11060,7 @@ const TableHead_TableHead = (props)=>{
|
|
|
11060
11060
|
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge(dist_clsx(local.class, local.className)));
|
|
11061
11061
|
const resolved = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
11062
11062
|
return (()=>{
|
|
11063
|
-
var _el$ = TableHead_tmpl$()
|
|
11063
|
+
var _el$ = TableHead_tmpl$();
|
|
11064
11064
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
11065
11065
|
get ["class"] () {
|
|
11066
11066
|
return classes();
|
|
@@ -11069,7 +11069,21 @@ const TableHead_TableHead = (props)=>{
|
|
|
11069
11069
|
return local.dataTheme;
|
|
11070
11070
|
}
|
|
11071
11071
|
}, rest), false, true);
|
|
11072
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el
|
|
11072
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11073
|
+
get when () {
|
|
11074
|
+
return local.noCell;
|
|
11075
|
+
},
|
|
11076
|
+
get fallback () {
|
|
11077
|
+
return (()=>{
|
|
11078
|
+
var _el$2 = TableHead_tmpl$2();
|
|
11079
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, resolved);
|
|
11080
|
+
return _el$2;
|
|
11081
|
+
})();
|
|
11082
|
+
},
|
|
11083
|
+
get children () {
|
|
11084
|
+
return resolved();
|
|
11085
|
+
}
|
|
11086
|
+
}));
|
|
11073
11087
|
return _el$;
|
|
11074
11088
|
})();
|
|
11075
11089
|
};
|
|
@@ -11231,7 +11245,52 @@ const TableFooter = (props)=>{
|
|
|
11231
11245
|
})();
|
|
11232
11246
|
};
|
|
11233
11247
|
const table_TableFooter = TableFooter;
|
|
11234
|
-
var
|
|
11248
|
+
var Table_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<table>");
|
|
11249
|
+
const Table = (props)=>{
|
|
11250
|
+
const [local, rest] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
11251
|
+
"children",
|
|
11252
|
+
"size",
|
|
11253
|
+
"zebra",
|
|
11254
|
+
"pinRows",
|
|
11255
|
+
"pinCols",
|
|
11256
|
+
"hover",
|
|
11257
|
+
"dataTheme",
|
|
11258
|
+
"class"
|
|
11259
|
+
]);
|
|
11260
|
+
const classes = ()=>twMerge("table", local.class, dist_clsx({
|
|
11261
|
+
"table-zebra": local.zebra,
|
|
11262
|
+
"table-hover": local.hover,
|
|
11263
|
+
"table-xl": "xl" === local.size,
|
|
11264
|
+
"table-lg": "lg" === local.size,
|
|
11265
|
+
"table-md": "md" === local.size,
|
|
11266
|
+
"table-sm": "sm" === local.size,
|
|
11267
|
+
"table-xs": "xs" === local.size,
|
|
11268
|
+
"table-pin-rows": local.pinRows,
|
|
11269
|
+
"table-pin-cols": local.pinCols
|
|
11270
|
+
}));
|
|
11271
|
+
return (()=>{
|
|
11272
|
+
var _el$ = Table_tmpl$();
|
|
11273
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
11274
|
+
get ["data-theme"] () {
|
|
11275
|
+
return local.dataTheme;
|
|
11276
|
+
},
|
|
11277
|
+
get ["class"] () {
|
|
11278
|
+
return classes();
|
|
11279
|
+
}
|
|
11280
|
+
}, rest), false, true);
|
|
11281
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
|
|
11282
|
+
return _el$;
|
|
11283
|
+
})();
|
|
11284
|
+
};
|
|
11285
|
+
const table_Table = Object.assign(Table, {
|
|
11286
|
+
Head: TableHead,
|
|
11287
|
+
Body: table_TableBody,
|
|
11288
|
+
Row: table_TableRow,
|
|
11289
|
+
Footer: table_TableFooter,
|
|
11290
|
+
Cell: TableCell,
|
|
11291
|
+
HeadCell: table_TableHeadCell
|
|
11292
|
+
});
|
|
11293
|
+
var EnhancedTable_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div class=mb-2></div><div class="flex gap-2 justify-end">'), EnhancedTable_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<caption class="mb-3 text-left"><div class="flex items-center gap-2"><div class=join>'), EnhancedTable_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<option value=10>10"), EnhancedTable_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<option value=25>25"), EnhancedTable_tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<option value=50>50"), EnhancedTable_tmpl$6 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<option value=100>100"), EnhancedTable_tmpl$7 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="flex items-center justify-between w-full"><div class="flex items-center gap-2"><span class=opacity-70>Rows per page</span></div><div class="flex items-center gap-3"><span class=opacity-70>Page <!> of </span><div class=join>'), EnhancedTable_tmpl$8 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="flex items-center gap-2"><div class=truncate></div><div class=grow>'), EnhancedTable_tmpl$9 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="flex gap-2">'), EnhancedTable_tmpl$0 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<option value>All"), EnhancedTable_tmpl$1 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<option>");
|
|
11235
11294
|
function EnhancedTable_EnhancedTable(props) {
|
|
11236
11295
|
const [local, tableProps] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
11237
11296
|
"data",
|
|
@@ -11242,12 +11301,23 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11242
11301
|
"setColumnFilters",
|
|
11243
11302
|
"pagination",
|
|
11244
11303
|
"setPagination",
|
|
11304
|
+
"globalFilter",
|
|
11305
|
+
"setGlobalFilter",
|
|
11245
11306
|
"enableSorting",
|
|
11246
11307
|
"enableFilters",
|
|
11247
11308
|
"enablePagination",
|
|
11248
11309
|
"renderRowSubComponent",
|
|
11249
|
-
"renderEmpty"
|
|
11310
|
+
"renderEmpty",
|
|
11311
|
+
"loading",
|
|
11312
|
+
"renderLoading",
|
|
11313
|
+
"filterIcon",
|
|
11314
|
+
"sortAscIcon",
|
|
11315
|
+
"sortDescIcon",
|
|
11316
|
+
"sortNeutralIcon",
|
|
11317
|
+
"filterPanelClass"
|
|
11250
11318
|
]);
|
|
11319
|
+
const [openFilterFor, setOpenFilterFor] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(null);
|
|
11320
|
+
const toggleFilterFor = (colId)=>setOpenFilterFor((curr)=>curr === colId ? null : colId);
|
|
11251
11321
|
const table = (0, __WEBPACK_EXTERNAL_MODULE__tanstack_solid_table_1239d047__.createSolidTable)({
|
|
11252
11322
|
get data () {
|
|
11253
11323
|
return local.data;
|
|
@@ -11267,11 +11337,15 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11267
11337
|
pageIndex: 0,
|
|
11268
11338
|
pageSize: 10
|
|
11269
11339
|
};
|
|
11340
|
+
},
|
|
11341
|
+
get globalFilter () {
|
|
11342
|
+
return local.globalFilter?.() || "";
|
|
11270
11343
|
}
|
|
11271
11344
|
},
|
|
11272
11345
|
onSortingChange: local.setSorting,
|
|
11273
11346
|
onColumnFiltersChange: local.setColumnFilters,
|
|
11274
11347
|
onPaginationChange: local.setPagination,
|
|
11348
|
+
onGlobalFilterChange: local.setGlobalFilter,
|
|
11275
11349
|
getCoreRowModel: (0, __WEBPACK_EXTERNAL_MODULE__tanstack_solid_table_1239d047__.getCoreRowModel)(),
|
|
11276
11350
|
getSortedRowModel: (0, __WEBPACK_EXTERNAL_MODULE__tanstack_solid_table_1239d047__.getSortedRowModel)(),
|
|
11277
11351
|
getFilteredRowModel: (0, __WEBPACK_EXTERNAL_MODULE__tanstack_solid_table_1239d047__.getFilteredRowModel)(),
|
|
@@ -11281,51 +11355,201 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11281
11355
|
manualPagination: !local.enablePagination
|
|
11282
11356
|
});
|
|
11283
11357
|
const tableRows = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
11358
|
+
if (local.loading) return [];
|
|
11284
11359
|
const rows = table.getRowModel().rows;
|
|
11285
11360
|
if (0 === rows.length && local.renderEmpty) return [];
|
|
11286
11361
|
return rows;
|
|
11287
11362
|
});
|
|
11363
|
+
const headerGroups = ()=>table.getHeaderGroups();
|
|
11364
|
+
const anyFilterActive = ()=>table.getState().columnFilters.length > 0;
|
|
11365
|
+
const FilterButton = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11366
|
+
size: "xs",
|
|
11367
|
+
variant: "ghost",
|
|
11368
|
+
shape: "square",
|
|
11369
|
+
"aria-label": "Open column filter",
|
|
11370
|
+
class: "ml-auto",
|
|
11371
|
+
get active () {
|
|
11372
|
+
return openFilterFor() === props.colId;
|
|
11373
|
+
},
|
|
11374
|
+
get disabled () {
|
|
11375
|
+
return props.disabled;
|
|
11376
|
+
},
|
|
11377
|
+
onClick: (e)=>{
|
|
11378
|
+
e.stopPropagation();
|
|
11379
|
+
toggleFilterFor(props.colId);
|
|
11380
|
+
},
|
|
11381
|
+
get children () {
|
|
11382
|
+
return local.filterIcon;
|
|
11383
|
+
}
|
|
11384
|
+
});
|
|
11385
|
+
const FilterPanel = (props)=>{
|
|
11386
|
+
const col = props.column;
|
|
11387
|
+
const colId = col.id;
|
|
11388
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11389
|
+
get when () {
|
|
11390
|
+
return openFilterFor() === colId;
|
|
11391
|
+
},
|
|
11392
|
+
get children () {
|
|
11393
|
+
var _el$ = EnhancedTable_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
11394
|
+
_el$.$$click = (e)=>e.stopPropagation();
|
|
11395
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(ColumnFilter, {
|
|
11396
|
+
column: col
|
|
11397
|
+
}));
|
|
11398
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11399
|
+
size: "xs",
|
|
11400
|
+
color: "neutral",
|
|
11401
|
+
variant: "outline",
|
|
11402
|
+
onClick: ()=>{
|
|
11403
|
+
col.setFilterValue(void 0);
|
|
11404
|
+
setOpenFilterFor(null);
|
|
11405
|
+
},
|
|
11406
|
+
children: "Clear"
|
|
11407
|
+
}), null);
|
|
11408
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11409
|
+
size: "xs",
|
|
11410
|
+
color: "primary",
|
|
11411
|
+
onClick: ()=>setOpenFilterFor(null),
|
|
11412
|
+
children: "Apply"
|
|
11413
|
+
}), null);
|
|
11414
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, local.filterPanelClass ?? "absolute right-0 top-full mt-1 z-20 bg-base-100 border border-base-300 shadow rounded-box p-2 w-56"));
|
|
11415
|
+
return _el$;
|
|
11416
|
+
}
|
|
11417
|
+
});
|
|
11418
|
+
};
|
|
11288
11419
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(tableProps, {
|
|
11289
11420
|
get children () {
|
|
11290
11421
|
return [
|
|
11422
|
+
(()=>{
|
|
11423
|
+
var _el$4 = EnhancedTable_tmpl$2(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild;
|
|
11424
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(input_Input, {
|
|
11425
|
+
size: "sm",
|
|
11426
|
+
placeholder: "Search\u2026",
|
|
11427
|
+
get value () {
|
|
11428
|
+
return table.getState().globalFilter ?? "";
|
|
11429
|
+
},
|
|
11430
|
+
onInput: (e)=>{
|
|
11431
|
+
const val = e.currentTarget.value;
|
|
11432
|
+
clearTimeout(window.__t);
|
|
11433
|
+
window.__t = setTimeout(()=>table.setGlobalFilter(val), 300);
|
|
11434
|
+
}
|
|
11435
|
+
}), null);
|
|
11436
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11437
|
+
size: "sm",
|
|
11438
|
+
color: "neutral",
|
|
11439
|
+
onClick: ()=>table.setGlobalFilter(""),
|
|
11440
|
+
children: "Clear search"
|
|
11441
|
+
}), null);
|
|
11442
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$5, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11443
|
+
size: "sm",
|
|
11444
|
+
variant: "outline",
|
|
11445
|
+
color: "neutral",
|
|
11446
|
+
get disabled () {
|
|
11447
|
+
return !anyFilterActive();
|
|
11448
|
+
},
|
|
11449
|
+
onClick: ()=>{
|
|
11450
|
+
table.resetColumnFilters();
|
|
11451
|
+
setOpenFilterFor(null);
|
|
11452
|
+
},
|
|
11453
|
+
children: "Clear filters"
|
|
11454
|
+
}), null);
|
|
11455
|
+
return _el$4;
|
|
11456
|
+
})(),
|
|
11291
11457
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Head, {
|
|
11458
|
+
noCell: true,
|
|
11292
11459
|
get children () {
|
|
11293
11460
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
|
|
11294
11461
|
get each () {
|
|
11295
|
-
return
|
|
11462
|
+
return headerGroups();
|
|
11296
11463
|
},
|
|
11297
|
-
children: (
|
|
11464
|
+
children: (hg)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
|
|
11298
11465
|
get each () {
|
|
11299
|
-
return
|
|
11466
|
+
return hg.headers;
|
|
11300
11467
|
},
|
|
11301
|
-
children: (header)=>
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11468
|
+
children: (header)=>{
|
|
11469
|
+
const canSort = header.column.getCanSort();
|
|
11470
|
+
const canFilter = local.enableFilters && header.column.getCanFilter();
|
|
11471
|
+
const colId = header.column.id;
|
|
11472
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.HeadCell, {
|
|
11473
|
+
class: canSort ? "relative cursor-pointer select-none" : "relative",
|
|
11305
11474
|
get onClick () {
|
|
11306
|
-
return
|
|
11475
|
+
return canSort ? header.column.getToggleSortingHandler() : void 0;
|
|
11307
11476
|
},
|
|
11308
11477
|
get children () {
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11478
|
+
return [
|
|
11479
|
+
(()=>{
|
|
11480
|
+
var _el$19 = EnhancedTable_tmpl$8(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
|
|
11481
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$20, ()=>(0, __WEBPACK_EXTERNAL_MODULE__tanstack_solid_table_1239d047__.flexRender)(header.column.columnDef.header, header.getContext()));
|
|
11482
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$19, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11483
|
+
get when () {
|
|
11484
|
+
return "asc" === header.column.getIsSorted();
|
|
11485
|
+
},
|
|
11486
|
+
get children () {
|
|
11487
|
+
return local.sortAscIcon;
|
|
11488
|
+
}
|
|
11489
|
+
}), _el$21);
|
|
11490
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$19, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11491
|
+
get when () {
|
|
11492
|
+
return "desc" === header.column.getIsSorted();
|
|
11493
|
+
},
|
|
11494
|
+
get children () {
|
|
11495
|
+
return local.sortDescIcon;
|
|
11496
|
+
}
|
|
11497
|
+
}), _el$21);
|
|
11498
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$19, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11499
|
+
get when () {
|
|
11500
|
+
return false === header.column.getIsSorted() && local.sortNeutralIcon;
|
|
11501
|
+
},
|
|
11502
|
+
get children () {
|
|
11503
|
+
return local.sortNeutralIcon;
|
|
11504
|
+
}
|
|
11505
|
+
}), _el$21);
|
|
11506
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$19, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11507
|
+
when: canFilter,
|
|
11508
|
+
get children () {
|
|
11509
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(FilterButton, {
|
|
11510
|
+
colId: colId
|
|
11511
|
+
});
|
|
11512
|
+
}
|
|
11513
|
+
}), null);
|
|
11514
|
+
return _el$19;
|
|
11515
|
+
})(),
|
|
11516
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11517
|
+
when: canFilter,
|
|
11518
|
+
get children () {
|
|
11519
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(FilterPanel, {
|
|
11520
|
+
get column () {
|
|
11521
|
+
return header.column;
|
|
11522
|
+
}
|
|
11523
|
+
});
|
|
11524
|
+
}
|
|
11525
|
+
})
|
|
11526
|
+
];
|
|
11320
11527
|
}
|
|
11321
|
-
})
|
|
11528
|
+
});
|
|
11529
|
+
}
|
|
11322
11530
|
})
|
|
11323
11531
|
});
|
|
11324
11532
|
}
|
|
11325
11533
|
}),
|
|
11326
11534
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Body, {
|
|
11327
11535
|
get children () {
|
|
11328
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!
|
|
11536
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!local.loading)() ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
|
|
11537
|
+
get children () {
|
|
11538
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11539
|
+
get colSpan () {
|
|
11540
|
+
return table.getAllColumns().length;
|
|
11541
|
+
},
|
|
11542
|
+
class: "text-center py-6",
|
|
11543
|
+
get children () {
|
|
11544
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!local.renderLoading)() ? local.renderLoading() : (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(loading_Loading, {
|
|
11545
|
+
variant: "spinner",
|
|
11546
|
+
size: "lg",
|
|
11547
|
+
color: "primary"
|
|
11548
|
+
});
|
|
11549
|
+
}
|
|
11550
|
+
});
|
|
11551
|
+
}
|
|
11552
|
+
}) : (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!(0 === tableRows().length && local.renderEmpty))() ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
|
|
11329
11553
|
get children () {
|
|
11330
11554
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11331
11555
|
get colSpan () {
|
|
@@ -11341,93 +11565,160 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11341
11565
|
get each () {
|
|
11342
11566
|
return tableRows();
|
|
11343
11567
|
},
|
|
11344
|
-
children: (row)=>
|
|
11345
|
-
(
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
get each () {
|
|
11352
|
-
return row.getVisibleCells();
|
|
11353
|
-
},
|
|
11354
|
-
children: (cell)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11355
|
-
get children () {
|
|
11356
|
-
return (0, __WEBPACK_EXTERNAL_MODULE__tanstack_solid_table_1239d047__.flexRender)(cell.column.columnDef.cell, cell.getContext());
|
|
11357
|
-
}
|
|
11358
|
-
})
|
|
11359
|
-
});
|
|
11360
|
-
}
|
|
11361
|
-
}),
|
|
11362
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!(row.getIsExpanded() && local.renderRowSubComponent))() && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
|
|
11363
|
-
get children () {
|
|
11364
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11365
|
-
get colSpan () {
|
|
11366
|
-
return row.getVisibleCells().length;
|
|
11367
|
-
},
|
|
11568
|
+
children: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
|
|
11569
|
+
get children () {
|
|
11570
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
|
|
11571
|
+
get each () {
|
|
11572
|
+
return row.getVisibleCells();
|
|
11573
|
+
},
|
|
11574
|
+
children: (cell)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11368
11575
|
get children () {
|
|
11369
|
-
return
|
|
11370
|
-
row
|
|
11371
|
-
});
|
|
11576
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__tanstack_solid_table_1239d047__.flexRender)(cell.column.columnDef.cell, cell.getContext());
|
|
11372
11577
|
}
|
|
11373
|
-
})
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11578
|
+
})
|
|
11579
|
+
});
|
|
11580
|
+
}
|
|
11581
|
+
})
|
|
11377
11582
|
});
|
|
11378
11583
|
}
|
|
11584
|
+
}),
|
|
11585
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Footer, {
|
|
11586
|
+
noCell: true,
|
|
11587
|
+
get children () {
|
|
11588
|
+
var _el$7 = EnhancedTable_tmpl$7(), _el$8 = _el$7.firstChild, _el$12 = (_el$8.firstChild, _el$8.nextSibling), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$17 = _el$14.nextSibling, _el$18 = (_el$17.nextSibling, _el$13.nextSibling);
|
|
11589
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$8, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(select_Select, {
|
|
11590
|
+
size: "sm",
|
|
11591
|
+
get value () {
|
|
11592
|
+
return String(table.getState().pagination.pageSize);
|
|
11593
|
+
},
|
|
11594
|
+
onChange: (e)=>table.setPageSize(Number(e.currentTarget.value)),
|
|
11595
|
+
get children () {
|
|
11596
|
+
return [
|
|
11597
|
+
EnhancedTable_tmpl$3(),
|
|
11598
|
+
EnhancedTable_tmpl$4(),
|
|
11599
|
+
EnhancedTable_tmpl$5(),
|
|
11600
|
+
EnhancedTable_tmpl$6()
|
|
11601
|
+
];
|
|
11602
|
+
}
|
|
11603
|
+
}), null);
|
|
11604
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$13, ()=>table.getState().pagination.pageIndex + 1, _el$17);
|
|
11605
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$13, ()=>table.getPageCount() || 1, null);
|
|
11606
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$18, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11607
|
+
size: "sm",
|
|
11608
|
+
get disabled () {
|
|
11609
|
+
return !table.getCanPreviousPage();
|
|
11610
|
+
},
|
|
11611
|
+
onClick: ()=>table.setPageIndex(0),
|
|
11612
|
+
children: "|\u27EA"
|
|
11613
|
+
}), null);
|
|
11614
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$18, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11615
|
+
size: "sm",
|
|
11616
|
+
get disabled () {
|
|
11617
|
+
return !table.getCanPreviousPage();
|
|
11618
|
+
},
|
|
11619
|
+
onClick: ()=>table.previousPage(),
|
|
11620
|
+
children: "Prev"
|
|
11621
|
+
}), null);
|
|
11622
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$18, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11623
|
+
size: "sm",
|
|
11624
|
+
get disabled () {
|
|
11625
|
+
return !table.getCanNextPage();
|
|
11626
|
+
},
|
|
11627
|
+
onClick: ()=>table.nextPage(),
|
|
11628
|
+
children: "Next"
|
|
11629
|
+
}), null);
|
|
11630
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$18, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11631
|
+
size: "sm",
|
|
11632
|
+
get disabled () {
|
|
11633
|
+
return !table.getCanNextPage();
|
|
11634
|
+
},
|
|
11635
|
+
onClick: ()=>table.setPageIndex(table.getPageCount() - 1),
|
|
11636
|
+
children: "\u27EB|"
|
|
11637
|
+
}), null);
|
|
11638
|
+
return _el$7;
|
|
11639
|
+
}
|
|
11379
11640
|
})
|
|
11380
11641
|
];
|
|
11381
11642
|
}
|
|
11382
11643
|
}));
|
|
11383
11644
|
}
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
const
|
|
11387
|
-
const
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
"
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
}
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11645
|
+
function ColumnFilter(props) {
|
|
11646
|
+
const col = props.column;
|
|
11647
|
+
const value = ()=>col.getFilterValue();
|
|
11648
|
+
const type = col.columnDef.meta?.filterType ?? "text";
|
|
11649
|
+
if ("text" === type) return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(input_Input, {
|
|
11650
|
+
size: "sm",
|
|
11651
|
+
placeholder: "Filter\u2026",
|
|
11652
|
+
get value () {
|
|
11653
|
+
return value() ?? "";
|
|
11654
|
+
},
|
|
11655
|
+
onInput: (e)=>col.setFilterValue(e.currentTarget.value || void 0)
|
|
11656
|
+
});
|
|
11657
|
+
if ("numberRange" === type) {
|
|
11658
|
+
const v = value() ?? [
|
|
11659
|
+
void 0,
|
|
11660
|
+
void 0
|
|
11661
|
+
];
|
|
11662
|
+
const setRange = (min, max)=>{
|
|
11663
|
+
if (!min && !max) return col.setFilterValue(void 0);
|
|
11664
|
+
col.setFilterValue([
|
|
11665
|
+
min || void 0,
|
|
11666
|
+
max || void 0
|
|
11667
|
+
]);
|
|
11668
|
+
};
|
|
11669
|
+
return (()=>{
|
|
11670
|
+
var _el$22 = EnhancedTable_tmpl$9();
|
|
11671
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$22, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(input_Input, {
|
|
11672
|
+
size: "sm",
|
|
11673
|
+
type: "number",
|
|
11674
|
+
placeholder: "Min",
|
|
11675
|
+
get value () {
|
|
11676
|
+
return v[0] ?? "";
|
|
11677
|
+
},
|
|
11678
|
+
onInput: (e)=>setRange(e.currentTarget.value, v[1])
|
|
11679
|
+
}), null);
|
|
11680
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$22, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(input_Input, {
|
|
11681
|
+
size: "sm",
|
|
11682
|
+
type: "number",
|
|
11683
|
+
placeholder: "Max",
|
|
11684
|
+
get value () {
|
|
11685
|
+
return v[1] ?? "";
|
|
11686
|
+
},
|
|
11687
|
+
onInput: (e)=>setRange(v[0], e.currentTarget.value)
|
|
11688
|
+
}), null);
|
|
11689
|
+
return _el$22;
|
|
11690
|
+
})();
|
|
11691
|
+
}
|
|
11692
|
+
if ("select" === type) {
|
|
11693
|
+
const options = col.columnDef.meta?.options ?? [];
|
|
11694
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(select_Select, {
|
|
11695
|
+
size: "sm",
|
|
11696
|
+
get value () {
|
|
11697
|
+
return value() ?? "";
|
|
11413
11698
|
},
|
|
11414
|
-
|
|
11415
|
-
|
|
11699
|
+
onChange: (e)=>col.setFilterValue(e.currentTarget.value || void 0),
|
|
11700
|
+
get children () {
|
|
11701
|
+
return [
|
|
11702
|
+
EnhancedTable_tmpl$0(),
|
|
11703
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
|
|
11704
|
+
each: options,
|
|
11705
|
+
children: (o)=>(()=>{
|
|
11706
|
+
var _el$24 = EnhancedTable_tmpl$1();
|
|
11707
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$24, ()=>o.label);
|
|
11708
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>_el$24.value = o.value);
|
|
11709
|
+
return _el$24;
|
|
11710
|
+
})()
|
|
11711
|
+
})
|
|
11712
|
+
];
|
|
11416
11713
|
}
|
|
11417
|
-
}
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
Row: table_TableRow,
|
|
11426
|
-
Footer: table_TableFooter,
|
|
11427
|
-
Cell: TableCell,
|
|
11428
|
-
HeadCell: table_TableHeadCell,
|
|
11429
|
-
Enhanced: EnhancedTable
|
|
11430
|
-
});
|
|
11714
|
+
});
|
|
11715
|
+
}
|
|
11716
|
+
return null;
|
|
11717
|
+
}
|
|
11718
|
+
const EnhancedTable = EnhancedTable_EnhancedTable;
|
|
11719
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
11720
|
+
"click"
|
|
11721
|
+
]);
|
|
11431
11722
|
var Tab_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<a role=tab>");
|
|
11432
11723
|
const Tab = (props)=>{
|
|
11433
11724
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -12020,4 +12311,4 @@ const WindowMockup = (props)=>{
|
|
|
12020
12311
|
})();
|
|
12021
12312
|
};
|
|
12022
12313
|
const windowmockup_WindowMockup = WindowMockup;
|
|
12023
|
-
export { accordion_Accordion as Accordion, alert_Alert as Alert, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, bottom_sheet_BottomSheet as BottomSheet, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, Calendar, card_Card as Card, carousel_Carousel as Carousel, chatbubble_ChatBubble as ChatBubble, checkbox_Checkbox as Checkbox, codemockup_CodeMockup as CodeMockup, CodeMockupLine, collapse_Collapse as Collapse, CollapseContent, CollapseDetails, CollapseTitle, connectionstatus_ConnectionStatus as ConnectionStatus, CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, Grid, hero_Hero as Hero, icon_Icon as Icon, indicator_Indicator as Indicator, input as Input, join_Join as Join, kbd_Kbd as Kbd, link_Link as Link, loading_Loading as Loading, mask as Mask, menu_Menu as Menu, modal_Modal as Modal, navbar_Navbar as Navbar, pagination_Pagination as Pagination, phonemockup_PhoneMockup as PhoneMockup, Progress, props_table_PropsTable as PropsTable, radialprogress_RadialProgress as RadialProgress, radio_Radio as Radio, range_Range as Range, Rating, select_Select as Select, showcase_ShowcaseBlock as ShowcaseBlock, showcase_section_ShowcaseSection as ShowcaseSection, sidenav_Sidenav as Sidenav, sidenav_SidenavButton as SidenavButton, sidenav_SidenavGroup as SidenavGroup, sidenav_SidenavItem as SidenavItem, sidenav_SidenavLink as SidenavLink, sidenav_SidenavMenu as SidenavMenu, skeleton_Skeleton as Skeleton, Stack, stat_card_StatCard as StatCard, stats_Stats as Stats, status_Status as Status, steps as Steps, Summary, SvgBackground, Swap, table_Table as Table, tabs_Tabs as Tabs, textarea_Textarea as Textarea, Timeline, timeline_TimelineEnd as TimelineEnd, timeline_TimelineItem as TimelineItem, timeline_TimelineMiddle as TimelineMiddle, timeline_TimelineStart as TimelineStart, toast_Toast as Toast, ToastContainer, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup, connectionstatus_ConnectionStatus as default, toastStore, useDesktop, useFormValidation };
|
|
12314
|
+
export { accordion_Accordion as Accordion, alert_Alert as Alert, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, bottom_sheet_BottomSheet as BottomSheet, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, Calendar, card_Card as Card, carousel_Carousel as Carousel, chatbubble_ChatBubble as ChatBubble, checkbox_Checkbox as Checkbox, codemockup_CodeMockup as CodeMockup, CodeMockupLine, collapse_Collapse as Collapse, CollapseContent, CollapseDetails, CollapseTitle, connectionstatus_ConnectionStatus as ConnectionStatus, CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, EnhancedTable, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, Grid, hero_Hero as Hero, icon_Icon as Icon, indicator_Indicator as Indicator, input as Input, join_Join as Join, kbd_Kbd as Kbd, link_Link as Link, loading_Loading as Loading, mask as Mask, menu_Menu as Menu, modal_Modal as Modal, navbar_Navbar as Navbar, pagination_Pagination as Pagination, phonemockup_PhoneMockup as PhoneMockup, Progress, props_table_PropsTable as PropsTable, radialprogress_RadialProgress as RadialProgress, radio_Radio as Radio, range_Range as Range, Rating, select_Select as Select, showcase_ShowcaseBlock as ShowcaseBlock, showcase_section_ShowcaseSection as ShowcaseSection, sidenav_Sidenav as Sidenav, sidenav_SidenavButton as SidenavButton, sidenav_SidenavGroup as SidenavGroup, sidenav_SidenavItem as SidenavItem, sidenav_SidenavLink as SidenavLink, sidenav_SidenavMenu as SidenavMenu, skeleton_Skeleton as Skeleton, Stack, stat_card_StatCard as StatCard, stats_Stats as Stats, status_Status as Status, steps as Steps, Summary, SvgBackground, Swap, table_Table as Table, tabs_Tabs as Tabs, textarea_Textarea as Textarea, Timeline, timeline_TimelineEnd as TimelineEnd, timeline_TimelineItem as TimelineItem, timeline_TimelineMiddle as TimelineMiddle, timeline_TimelineStart as TimelineStart, toast_Toast as Toast, ToastContainer, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup, connectionstatus_ConnectionStatus as default, toastStore, useDesktop, useFormValidation };
|