@konstructio/ui 0.1.2-alpha.95 → 0.1.2-alpha.96

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,95 +1,98 @@
1
- import { t as s } from "../../utils-COaoD3PI.js";
2
- import { Actions as Y } from "./components/Actions/Actions.js";
3
- import { t as Z } from "../../table.provider-BBlJgEJf.js";
4
- import { sendCollapseRowEvent as _, sendExpandRowEvent as $, sendToggleRowEvent as D } from "./events/index.js";
5
- import { Body as L } from "./components/Body/Body.js";
6
- import { Filter as rr } from "./components/Filter/Filter.js";
7
- import { Header as er } from "./components/Header/Header.js";
8
- import { Pagination as ar } from "./components/Pagination/Pagination.js";
9
- import { TruncateText as or } from "./components/TruncateText/TruncateText.js";
10
- import { WrapperBody as tr } from "./components/WrapperBody/WrapperBody.js";
11
- import { useMemo as ir } from "react";
12
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
13
- var lr = ({ id: c, ariaLabel: p, columns: d, data: f, totalItems: u = -1 / 0, className: b, classNameHeaderActiveArrows: v, classNameHeaderArrows: T, classNameHeaderTable: x, classNameTable: E, classNameWrapperTable: N, isLoading: o, getRowId: w, fetchData: A, queryOptions: y, showPagination: h, showTotalItems: t, showDropdownPagination: i, showDotPagination: l, showFormPagination: m, pageSizes: z, showFilter: B = !1, showFilterInput: R, filterSearchPlaceholder: V = "", filters: g, multiSelectFilter: j, filterActions: k, showResetButton: P = !0, resetButtonClassName: C, closeOnApply: H = !0, enableHoverRow: I, classNameHoverRow: K, enableExpandedRow: M, expandedState: W, defaultExpanded: q, classNameExpandedRow: F, classNameExpandedCell: G, classNameExpandedContent: J, classNameExpandedHeader: O, classNameActiveExpandedRow: Q, onExpandedChange: S, renderExpandedRow: U, keepExpandColumnVisible: X }) => {
14
- const e = ir(() => h || [
15
- t,
16
- i,
1
+ import { t as n } from "../../utils-COaoD3PI.js";
2
+ import { Actions as Z } from "./components/Actions/Actions.js";
3
+ import { t as _ } from "../../table.provider-BPlFpIAe.js";
4
+ import { sendCollapseRowEvent as $, sendExpandRowEvent as D, sendResetFiltersEvent as L, sendToggleRowEvent as ee } from "./events/index.js";
5
+ import { Body as re } from "./components/Body/Body.js";
6
+ import { Filter as ae } from "./components/Filter/Filter.js";
7
+ import { Header as te } from "./components/Header/Header.js";
8
+ import { Pagination as oe } from "./components/Pagination/Pagination.js";
9
+ import { TruncateText as le } from "./components/TruncateText/TruncateText.js";
10
+ import { WrapperBody as ie } from "./components/WrapperBody/WrapperBody.js";
11
+ import { useMemo as se } from "react";
12
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
13
+ var me = ({ id: o, ariaLabel: p, columns: d, data: f, totalItems: u = -1 / 0, className: b, classNameHeaderActiveArrows: v, classNameHeaderArrows: T, classNameHeaderTable: E, classNameTable: x, classNameWrapperTable: N, isLoading: t, emptyState: w, getRowId: A, fetchData: y, queryOptions: R, showPagination: h, showTotalItems: l, showDropdownPagination: i, showDotPagination: s, showFormPagination: m, pageSizes: z, showFilter: B = !1, showFilterInput: V, filterSearchPlaceholder: g = "", filters: j, multiSelectFilter: k, filterActions: P, showResetButton: C = !0, resetButtonClassName: F, closeOnApply: H = !0, enableHoverRow: I, classNameHoverRow: K, enableExpandedRow: M, expandedState: W, defaultExpanded: q, classNameExpandedRow: G, classNameExpandedCell: J, classNameExpandedContent: O, classNameExpandedHeader: Q, classNameActiveExpandedRow: S, onExpandedChange: U, renderExpandedRow: X, keepExpandColumnVisible: Y }) => {
14
+ const r = se(() => h || [
17
15
  l,
16
+ i,
17
+ s,
18
18
  m
19
19
  ].some(Boolean), []);
20
- return /* @__PURE__ */ r(Z, {
21
- id: c,
20
+ return /* @__PURE__ */ e(_, {
21
+ id: o,
22
22
  columns: d,
23
23
  data: f,
24
- getRowId: w,
25
- fetchData: A,
24
+ getRowId: A,
25
+ fetchData: y,
26
26
  totalItems: u,
27
- queryOptions: y,
28
- isPaginationEnabled: e,
27
+ queryOptions: R,
28
+ isPaginationEnabled: r,
29
29
  enableExpandedRow: M,
30
30
  expandedState: W,
31
- onExpandedChange: S,
31
+ onExpandedChange: U,
32
32
  defaultExpanded: q,
33
- classNameExpandedRow: F,
34
- classNameExpandedCell: G,
35
- classNameExpandedContent: J,
36
- classNameExpandedHeader: O,
37
- classNameActiveExpandedRow: Q,
33
+ classNameExpandedRow: G,
34
+ classNameExpandedCell: J,
35
+ classNameExpandedContent: O,
36
+ classNameExpandedHeader: Q,
37
+ classNameActiveExpandedRow: S,
38
38
  enableHoverRow: I,
39
39
  classNameHoverRow: K,
40
- renderExpandedRow: U,
41
- keepExpandColumnVisible: X,
42
- children: /* @__PURE__ */ n("section", {
43
- className: s("w-full min-w-fit", b),
40
+ renderExpandedRow: X,
41
+ keepExpandColumnVisible: Y,
42
+ children: /* @__PURE__ */ c("section", {
43
+ className: n("w-full min-w-fit", b),
44
44
  children: [
45
- B && /* @__PURE__ */ r(rr, {
46
- actions: k,
47
- filters: g,
48
- multiSelectFilter: j,
49
- placeholder: V,
50
- showFilterInput: R,
51
- showResetButton: P,
52
- resetButtonClassName: C,
45
+ B && /* @__PURE__ */ e(ae, {
46
+ id: o,
47
+ actions: P,
48
+ filters: j,
49
+ multiSelectFilter: k,
50
+ placeholder: g,
51
+ showFilterInput: V,
52
+ showResetButton: C,
53
+ resetButtonClassName: F,
53
54
  closeOnApply: H
54
55
  }),
55
- /* @__PURE__ */ r(tr, {
56
- showPagination: e,
56
+ /* @__PURE__ */ e(ie, {
57
+ showPagination: r,
57
58
  classNameWrapperTable: N,
58
- isLoading: o,
59
- children: /* @__PURE__ */ n("table", {
60
- className: s("w-full border-collapse table-auto", "dark:border-separate dark:border-spacing-0", E),
59
+ isLoading: t,
60
+ children: /* @__PURE__ */ c("table", {
61
+ className: n("w-full border-collapse table-auto", "dark:border-separate dark:border-spacing-0", x),
61
62
  "aria-label": p,
62
- children: [/* @__PURE__ */ r(er, {
63
- className: x,
63
+ children: [/* @__PURE__ */ e(te, {
64
+ className: E,
64
65
  classNameArrows: T,
65
66
  classNameActiveArrows: v
66
- }), /* @__PURE__ */ r(L, {
67
- isLoading: o,
68
- showPagination: e
67
+ }), /* @__PURE__ */ e(re, {
68
+ isLoading: t,
69
+ showPagination: r,
70
+ emptyState: w
69
71
  })]
70
72
  })
71
73
  }),
72
- e && /* @__PURE__ */ r(ar, {
73
- showTotalItems: t,
74
+ r && /* @__PURE__ */ e(oe, {
75
+ showTotalItems: l,
74
76
  showDropdownPagination: i,
75
- showDotPagination: l,
77
+ showDotPagination: s,
76
78
  showFormPagination: m,
77
79
  pageSizes: z,
78
- isLoading: o
80
+ isLoading: t
79
81
  })
80
82
  ]
81
83
  })
82
84
  });
83
- }, a = lr;
85
+ }, a = me;
84
86
  a.displayName = "KonstructVirtualizedTable";
85
- a.TruncateText = or;
86
- a.Actions = Y;
87
+ a.TruncateText = le;
88
+ a.Actions = Z;
87
89
  a.Events = {
88
- sendExpandRowEvent: $,
89
- sendCollapseRowEvent: _,
90
- sendToggleRowEvent: D
90
+ sendExpandRowEvent: D,
91
+ sendCollapseRowEvent: $,
92
+ sendToggleRowEvent: ee,
93
+ sendResetFiltersEvent: L
91
94
  };
92
95
  export {
93
- or as TruncateText,
96
+ le as TruncateText,
94
97
  a as VirtualizedTable
95
98
  };
@@ -1,54 +1,72 @@
1
- import { t as l } from "../../../../utils-COaoD3PI.js";
2
- import { n as A } from "../../../../table.provider-BBlJgEJf.js";
1
+ import { t as r } from "../../../../utils-COaoD3PI.js";
2
+ import { n as A } from "../../../../table.provider-BPlFpIAe.js";
3
3
  import { useTableContext as B } from "../../contexts/table.hook.js";
4
4
  import { Skeleton as H } from "../Skeleton/Skeleton.js";
5
- import { ExpandableRow as M } from "../ExpandableRow/ExpandableRow.js";
6
- import { Fragment as O } from "react";
7
- import { jsx as a, jsxs as V } from "react/jsx-runtime";
8
- var U = ({ isLoading: g, showPagination: t }) => {
9
- const { table: i, pageSize: h, tableFetching: w, enableExpandedRow: N, classNameExpandedRow: R, classNameExpandedCell: k, classNameExpandedContent: E, enableHoverRow: p, classNameHoverRow: v, classNameActiveExpandedRow: C, renderExpandedRow: b, isBorderOnAdjacentCell: D, isExpandColumnVisible: y } = B();
10
- if (g || w) return /* @__PURE__ */ a(H, {
11
- numberOfRows: h,
12
- table: i
5
+ import { ExpandableRow as L } from "../ExpandableRow/ExpandableRow.js";
6
+ import { Fragment as M } from "react";
7
+ import { jsx as e, jsxs as O } from "react/jsx-runtime";
8
+ var W = ({ isLoading: h, showPagination: l, emptyState: p }) => {
9
+ const { table: m, pageSize: k, tableFetching: N, enableExpandedRow: w, classNameExpandedRow: R, classNameExpandedCell: E, classNameExpandedContent: v, enableHoverRow: g, classNameHoverRow: C, classNameActiveExpandedRow: y, renderExpandedRow: u, isBorderOnAdjacentCell: D, isExpandColumnVisible: j } = B();
10
+ if (h || N) return /* @__PURE__ */ e(H, {
11
+ numberOfRows: k,
12
+ table: m
13
13
  });
14
- const d = i.getRowModel().rows ?? [];
15
- return /* @__PURE__ */ a("tbody", {
16
- className: l("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
17
- children: d.map((x, s) => {
18
- const { id: m, original: c, getVisibleCells: j } = x, { meta: o = {} } = c, n = j(), e = N && x.getIsExpanded(), z = !!o.expandedRow || !!b, u = n[0]?.column.id !== "__expand" || y ? 0 : D ? 1 : null;
19
- return /* @__PURE__ */ V(O, { children: [/* @__PURE__ */ a("tr", {
20
- className: l({ "group/row": p }, "border-b", "border-b-gray-200", "dark:text-metal-50", "dark:border-b-metal-700", "bg-transparent", o.className),
21
- "data-row-id": m,
14
+ const a = m.getRowModel().rows ?? [];
15
+ if (a.length === 0 && p) {
16
+ const n = m.getVisibleLeafColumns().length;
17
+ return /* @__PURE__ */ e("tbody", {
18
+ className: r("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
19
+ children: /* @__PURE__ */ e("tr", {
20
+ className: r("border-b", "border-b-gray-200", "dark:border-b-metal-700", "bg-transparent"),
21
+ "data-empty-row": !0,
22
+ children: /* @__PURE__ */ e("td", {
23
+ colSpan: n,
24
+ className: r("p-0", "bg-white", "dark:bg-metal-900", "dark:border", "dark:border-metal-700", "rounded-b-lg"),
25
+ children: /* @__PURE__ */ e("div", {
26
+ className: "flex items-center justify-center",
27
+ children: p
28
+ })
29
+ })
30
+ })
31
+ });
32
+ }
33
+ return /* @__PURE__ */ e("tbody", {
34
+ className: r("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
35
+ children: a.map((n, c) => {
36
+ const { id: b, original: i, getVisibleCells: z } = n, { meta: o = {} } = i, s = z(), t = w && n.getIsExpanded(), F = !!o.expandedRow || !!u, x = s[0]?.column.id !== "__expand" || j ? 0 : D ? 1 : null;
37
+ return /* @__PURE__ */ O(M, { children: [/* @__PURE__ */ e("tr", {
38
+ className: r({ "group/row": g }, "border-b", "border-b-gray-200", "dark:text-metal-50", "dark:border-b-metal-700", "bg-transparent", o.className),
39
+ "data-row-id": b,
22
40
  ...o.attributes ?? {},
23
- children: n.map(({ id: F, column: r, getContext: S }, f) => {
24
- const _ = typeof r.columnDef.meta?.className == "function" ? r.columnDef.meta?.className(c) : r.columnDef.meta?.className;
25
- return /* @__PURE__ */ a("td", {
26
- className: l("px-4", "py-1", "text-sm", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", {
27
- "group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": p,
28
- [l("bg-zinc-100 dark:bg-metal-800", C)]: !!e
29
- }, v, _, {
30
- "rounded-bl-lg": s === d.length - 1 && u !== null && f === u && !t && !e,
31
- "rounded-br-lg": s === d.length - 1 && f === n.length - 1 && !t && !e,
32
- "dark:[tr:last-child_&]:border-b": !t
41
+ children: s.map(({ id: S, column: d, getContext: V }, f) => {
42
+ const _ = typeof d.columnDef.meta?.className == "function" ? d.columnDef.meta?.className(i) : d.columnDef.meta?.className;
43
+ return /* @__PURE__ */ e("td", {
44
+ className: r("px-4", "py-1", "text-sm", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", {
45
+ "group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": g,
46
+ [r("bg-zinc-100 dark:bg-metal-800", y)]: !!t
47
+ }, C, _, {
48
+ "rounded-bl-lg": c === a.length - 1 && x !== null && f === x && !l && !t,
49
+ "rounded-br-lg": c === a.length - 1 && f === s.length - 1 && !l && !t,
50
+ "dark:[tr:last-child_&]:border-b": !l
33
51
  }),
34
- "data-expanded": e ? !0 : void 0,
35
- ...r.columnDef.meta?.attributes ?? {},
36
- children: A(r.columnDef.cell, S())
37
- }, F);
52
+ "data-expanded": t ? !0 : void 0,
53
+ ...d.columnDef.meta?.attributes ?? {},
54
+ children: A(d.columnDef.cell, V())
55
+ }, S);
38
56
  })
39
- }), z && /* @__PURE__ */ a(M, {
40
- classNameExpandedCell: k,
41
- classNameExpandedContent: E,
57
+ }), F && /* @__PURE__ */ e(L, {
58
+ classNameExpandedCell: E,
59
+ classNameExpandedContent: v,
42
60
  classNameExpandedRow: R,
43
- colSpan: n.length,
44
- id: m,
45
- isExpanded: !!e,
46
- isLastRow: s === d.length - 1 && !t,
47
- children: o.expandedRow ?? b?.(c)
48
- })] }, m);
61
+ colSpan: s.length,
62
+ id: b,
63
+ isExpanded: !!t,
64
+ isLastRow: c === a.length - 1 && !l,
65
+ children: o.expandedRow ?? u?.(i)
66
+ })] }, b);
49
67
  })
50
68
  });
51
69
  };
52
70
  export {
53
- U as Body
71
+ W as Body
54
72
  };
@@ -1,65 +1,75 @@
1
- import { o as G } from "../../../../chunk-cI0lbGMq.js";
2
- import { t as H } from "../../../../Input-BZG7N8m1.js";
3
- import { t as J } from "../../../../utils-COaoD3PI.js";
4
- import { Button as K } from "../../../Button/Button.js";
5
- import { Filter as r } from "../../../Filter/Filter.js";
6
- import { t as L } from "../../../../debounce-B55BpO1u.js";
7
- import { useTableContext as Q } from "../../contexts/table.hook.js";
8
- import { useCallback as v, useMemo as m, useRef as U } from "react";
1
+ import { o as $ } from "../../../../chunk-cI0lbGMq.js";
2
+ import { t as G } from "../../../../Input-BZG7N8m1.js";
3
+ import { t as H } from "../../../../utils-COaoD3PI.js";
4
+ import { Button as J } from "../../../Button/Button.js";
5
+ import { resetEvent as K } from "../../../Filter/events/index.js";
6
+ import { Filter as n } from "../../../Filter/Filter.js";
7
+ import { t as Q } from "../../../../debounce-B55BpO1u.js";
8
+ import { useTableContext as U } from "../../contexts/table.hook.js";
9
+ import { VirtualizedTableEvent as W } from "../../events/index.js";
10
+ import { useCallback as w, useEffect as X, useMemo as u, useRef as Y } from "react";
9
11
  import { jsx as s, jsxs as p } from "react/jsx-runtime";
10
- var V = /* @__PURE__ */ G(L(), 1), re = ({ actions: u, filters: d, multiSelectFilter: i, placeholder: w, showFilterInput: T = !0, showResetButton: x = !0, resetButtonClassName: M, closeOnApply: j = !0 }) => {
11
- const l = U(null), { termOfSearch: h, multiselectSelected: y, dateFilters: F, dateRangeFilters: b, timeFilters: S, onChangeTermOfSearch: c, onSelectMultiselect: D, onSelectDateFilter: O, onSelectDateRangeFilter: A, onSelectTimeFilter: B } = Q(), k = m(() => {
12
- const e = d ?? i?.map((o) => ({
13
- ...o,
12
+ var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiSelectFilter: h, placeholder: D, showFilterInput: x = !0, showResetButton: A = !0, resetButtonClassName: M, closeOnApply: j = !0 }) => {
13
+ const c = Y(null), { termOfSearch: y, multiselectSelected: b, dateFilters: F, dateRangeFilters: S, timeFilters: v, onChangeTermOfSearch: l, onSelectMultiselect: R, onSelectDateFilter: E, onSelectDateRangeFilter: O, onSelectTimeFilter: B } = U(), I = u(() => {
14
+ const e = d ?? h?.map((a) => ({
15
+ ...a,
14
16
  type: "badgeMultiSelect"
15
- })) ?? [], t = u ?? [];
17
+ })) ?? [], t = i ?? [];
16
18
  return [...e, ...t];
17
19
  }, [
18
20
  d,
19
- i,
20
- u
21
- ]), R = v((e, t) => D(e, t.map((o) => o.id)), [D]), P = v(() => {
22
- c(""), l.current && (l.current.value = "");
23
- }, [c]), _ = m(() => (0, V.default)((e) => {
24
- c(e.target.value);
25
- }, 500), [c]), I = m(() => !!h || Object.values(y ?? {}).flat().length > 0 || Object.values(F ?? {}).some(Boolean) || Object.values(b ?? {}).some(Boolean) || Object.values(S ?? {}).some(Boolean), [
26
21
  h,
22
+ i
23
+ ]), T = w((e, t) => R(e, t.map((a) => a.id)), [R]), _ = w(() => {
24
+ l(""), c.current && (c.current.value = "");
25
+ }, [l]);
26
+ X(() => {
27
+ const e = Array.isArray(m) ? m.join(",") : String(m), t = new AbortController();
28
+ return document.addEventListener(W.RESET_FILTERS, (a) => {
29
+ const { detail: o } = a;
30
+ o.tableId === e && (l(""), c.current && (c.current.value = ""), K());
31
+ }, { signal: t.signal }), () => t.abort();
32
+ }, [m, l]);
33
+ const k = u(() => (0, Z.default)((e) => {
34
+ l(e.target.value);
35
+ }, 500), [l]), P = u(() => !!y || Object.values(b ?? {}).flat().length > 0 || Object.values(F ?? {}).some(Boolean) || Object.values(S ?? {}).some(Boolean) || Object.values(v ?? {}).some(Boolean), [
27
36
  y,
28
- F,
29
37
  b,
30
- S
31
- ]), N = (e) => {
38
+ F,
39
+ S,
40
+ v
41
+ ]), g = (e) => {
32
42
  if (e.type === "action") {
33
- const { label: a, appearance: g = "compact", variant: q = "secondary", leftIcon: E, rightIcon: $, type: W, ...z } = e;
34
- return /* @__PURE__ */ p(K, {
35
- appearance: g,
36
- variant: q,
37
- ...z,
43
+ const { label: r, appearance: N = "compact", variant: L = "secondary", leftIcon: q, rightIcon: z, type: f, ...V } = e;
44
+ return /* @__PURE__ */ p(J, {
45
+ appearance: N,
46
+ variant: L,
47
+ ...V,
38
48
  children: [
39
- E,
40
- a,
41
- $
49
+ q,
50
+ r,
51
+ z
42
52
  ]
43
- }, a);
53
+ }, r);
44
54
  }
45
- const { key: t, label: o, position: n = "right" } = e;
46
- return e.type === "textMultiSelect" ? /* @__PURE__ */ s(r.TextMultiSelect, {
47
- label: o,
48
- position: n,
55
+ const { key: t, label: a, position: o = "right" } = e;
56
+ return e.type === "textMultiSelect" ? /* @__PURE__ */ s(n.TextMultiSelect, {
57
+ label: a,
58
+ position: o,
49
59
  options: e.options,
50
- onApply: (a) => {
51
- R(t, a);
60
+ onApply: (r) => {
61
+ T(t, r);
52
62
  }
53
- }, t) : e.type === "date" ? /* @__PURE__ */ s(r.DateFilterDropdown, {
54
- label: o,
55
- position: n,
63
+ }, t) : e.type === "date" ? /* @__PURE__ */ s(n.DateFilterDropdown, {
64
+ label: a,
65
+ position: o,
56
66
  countryCode: e.countryCode,
57
- onApply: (a) => {
58
- O(t, a);
67
+ onApply: (r) => {
68
+ E(t, r);
59
69
  }
60
- }, t) : e.type === "dateRange" ? /* @__PURE__ */ s(r.DateRangeFilterDropdown, {
61
- label: o,
62
- position: n,
70
+ }, t) : e.type === "dateRange" ? /* @__PURE__ */ s(n.DateRangeFilterDropdown, {
71
+ label: a,
72
+ position: o,
63
73
  showTime: e.showTime,
64
74
  timeFormat: e.timeFormat,
65
75
  showPresets: e.showPresets,
@@ -67,48 +77,48 @@ var V = /* @__PURE__ */ G(L(), 1), re = ({ actions: u, filters: d, multiSelectFi
67
77
  minDate: e.minDate,
68
78
  maxDate: e.maxDate,
69
79
  countryCode: e.countryCode,
70
- onApply: (a) => {
71
- A(t, a);
80
+ onApply: (r) => {
81
+ O(t, r);
72
82
  },
73
83
  onRangeChange: e.onRangeChange
74
- }, t) : e.type === "time" ? /* @__PURE__ */ s(r.TimeFilterDropdown, {
75
- label: o,
76
- position: n,
84
+ }, t) : e.type === "time" ? /* @__PURE__ */ s(n.TimeFilterDropdown, {
85
+ label: a,
86
+ position: o,
77
87
  format: e.format,
78
88
  presets: e.presets,
79
89
  showTimePicker: e.showTimePicker,
80
- onApply: (a) => {
81
- B(t, a);
90
+ onApply: (r) => {
91
+ B(t, r);
82
92
  }
83
- }, t) : /* @__PURE__ */ s(r.BadgeMultiSelect, {
84
- label: o,
85
- position: n,
93
+ }, t) : /* @__PURE__ */ s(n.BadgeMultiSelect, {
94
+ label: a,
95
+ position: o,
86
96
  options: e.options,
87
- onApply: (a) => {
88
- R(t, a);
97
+ onApply: (r) => {
98
+ T(t, r);
89
99
  }
90
100
  }, t);
91
101
  };
92
102
  return /* @__PURE__ */ p("div", {
93
103
  className: "w-full flex items-center justify-end pb-6",
94
- children: [T && /* @__PURE__ */ s(H, {
95
- ref: l,
96
- placeholder: w,
104
+ children: [x && /* @__PURE__ */ s(G, {
105
+ ref: c,
106
+ placeholder: D,
97
107
  isSearch: !0,
98
108
  autoComplete: "false",
99
109
  className: "w-72",
100
110
  inputMode: "search",
101
- onChange: _
102
- }), /* @__PURE__ */ p(r, {
111
+ onChange: k
112
+ }), /* @__PURE__ */ p(n, {
103
113
  closeOnApply: j,
104
- children: [k.map(N), x && /* @__PURE__ */ s(r.ResetButton, {
105
- className: J("select-none", M),
106
- disabled: !I,
107
- onClick: P
114
+ children: [I.map(g), A && /* @__PURE__ */ s(n.ResetButton, {
115
+ className: H("select-none", M),
116
+ disabled: !P,
117
+ onClick: _
108
118
  })]
109
119
  })]
110
120
  });
111
121
  };
112
122
  export {
113
- re as Filter
123
+ ue as Filter
114
124
  };
@@ -1,5 +1,5 @@
1
1
  import { t as r } from "../../../../utils-COaoD3PI.js";
2
- import { n as b } from "../../../../table.provider-BBlJgEJf.js";
2
+ import { n as b } from "../../../../table.provider-BPlFpIAe.js";
3
3
  import { useTableContext as g } from "../../contexts/table.hook.js";
4
4
  import u from "../../assets/chevron-up.js";
5
5
  import k from "../../assets/chevron-down.js";
@@ -1,4 +1,4 @@
1
- import { t as r } from "../../../table.provider-BBlJgEJf.js";
1
+ import { t as r } from "../../../table.provider-BPlFpIAe.js";
2
2
  import { TableContext as e } from "./table.context.js";
3
3
  import { useTableContext as a } from "./table.hook.js";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { t as o } from "../../../table.provider-BBlJgEJf.js";
1
+ import { t as o } from "../../../table.provider-BPlFpIAe.js";
2
2
  export {
3
3
  o as TableProvider
4
4
  };
@@ -1,24 +1,27 @@
1
1
  var n = /* @__PURE__ */ (function(t) {
2
- return t.EXPAND_ROW = "@konstructio/VirtualizedTable/event-EXPAND_ROW", t.COLLAPSE_ROW = "@konstructio/VirtualizedTable/event-COLLAPSE_ROW", t.TOGGLE_ROW = "@konstructio/VirtualizedTable/event-TOGGLE_ROW", t;
3
- })({}), o = (t, e) => {
2
+ return t.EXPAND_ROW = "@konstructio/VirtualizedTable/event-EXPAND_ROW", t.COLLAPSE_ROW = "@konstructio/VirtualizedTable/event-COLLAPSE_ROW", t.TOGGLE_ROW = "@konstructio/VirtualizedTable/event-TOGGLE_ROW", t.RESET_FILTERS = "@konstructio/VirtualizedTable/event-RESET_FILTERS", t;
3
+ })({}), E = (t, e) => {
4
4
  document.dispatchEvent(new CustomEvent(n.EXPAND_ROW, { detail: {
5
5
  tableId: t,
6
6
  rowId: e
7
7
  } }));
8
- }, E = (t, e) => {
8
+ }, o = (t, e) => {
9
9
  document.dispatchEvent(new CustomEvent(n.COLLAPSE_ROW, { detail: {
10
10
  tableId: t,
11
11
  rowId: e
12
12
  } }));
13
- }, O = (t, e) => {
13
+ }, s = (t, e) => {
14
14
  document.dispatchEvent(new CustomEvent(n.TOGGLE_ROW, { detail: {
15
15
  tableId: t,
16
16
  rowId: e
17
17
  } }));
18
+ }, R = (t) => {
19
+ document.dispatchEvent(new CustomEvent(n.RESET_FILTERS, { detail: { tableId: t } }));
18
20
  };
19
21
  export {
20
22
  n as VirtualizedTableEvent,
21
- E as sendCollapseRowEvent,
22
- o as sendExpandRowEvent,
23
- O as sendToggleRowEvent
23
+ o as sendCollapseRowEvent,
24
+ E as sendExpandRowEvent,
25
+ R as sendResetFiltersEvent,
26
+ s as sendToggleRowEvent
24
27
  };