ia-table 0.15.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pivot.d.ts CHANGED
@@ -934,6 +934,7 @@ declare type SmartGridCellRendererParams = {
934
934
  rightLabel?: string;
935
935
  splits?: SmartGridColumnDefinition[];
936
936
  isEnableResetButton?: boolean;
937
+ placeholder?: string;
937
938
  } & Record<string, unknown>;
938
939
 
939
940
  declare interface SmartGridCellValueChangedParams {
package/dist/pivot.js CHANGED
@@ -3,7 +3,7 @@ import { jsxs as t, jsx as e, Fragment as Y } from "react/jsx-runtime";
3
3
  import * as j from "react";
4
4
  import q, { useState as D, useCallback as c, useMemo as V, useRef as Q, useEffect as J } from "react";
5
5
  import { S as X, g as E, b as ve, T as pe, B as G, C as U, R as oe, M as He, I as de, c as ee } from "./RadioGroup-Cv9QL-Yd.js";
6
- import { S as Ze, d as K, c as qe, a as ue, e as Ue, b as We } from "./right-arrow-5CR5OWUs.js";
6
+ import { S as Ze, d as K, c as qe, a as ue, e as Ue, b as We } from "./right-arrow-C7mpExx-.js";
7
7
  import { createPortal as Qe } from "react-dom";
8
8
  const Je = ({
9
9
  title: l,
@@ -2,16 +2,16 @@
2
2
  import * as m from "react";
3
3
  import { useEffect as L, memo as ae, useRef as Y, useState as Z, useCallback as B, useMemo as ne } from "react";
4
4
  import { jsxs as M, jsx as f } from "react/jsx-runtime";
5
- import { createPortal as re } from "react-dom";
6
- import { S as oe, N as le, O as se } from "./RadioGroup-Cv9QL-Yd.js";
7
- const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 8 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M1.99902 8.66675C2.45611 8.66675 2.83283 9.04271 2.83301 9.49976C2.83301 9.95695 2.45621 10.3337 1.99902 10.3337C1.54198 10.3336 1.16602 9.95684 1.16602 9.49976C1.16619 9.04282 1.54209 8.66693 1.99902 8.66675ZM5.99902 8.66675C6.45611 8.66675 6.83283 9.04271 6.83301 9.49976C6.83301 9.95695 6.45621 10.3337 5.99902 10.3337C5.54198 10.3336 5.16602 9.95684 5.16602 9.49976C5.16619 9.04282 5.54209 8.66693 5.99902 8.66675ZM1.99902 4.66675C2.45611 4.66675 2.83283 5.04271 2.83301 5.49976C2.83301 5.95695 2.45621 6.33374 1.99902 6.33374C1.54198 6.33356 1.16602 5.95684 1.16602 5.49976C1.16619 5.04282 1.54209 4.66693 1.99902 4.66675ZM5.99902 4.66675C6.45611 4.66675 6.83283 5.04271 6.83301 5.49976C6.83301 5.95695 6.45621 6.33374 5.99902 6.33374C5.54198 6.33356 5.16602 5.95684 5.16602 5.49976C5.16619 5.04282 5.54209 4.66693 5.99902 4.66675ZM1.99902 0.666748C2.45611 0.666748 2.83283 1.04271 2.83301 1.49976C2.83301 1.95695 2.45621 2.33374 1.99902 2.33374C1.54198 2.33356 1.16602 1.95684 1.16602 1.49976C1.16619 1.04282 1.54209 0.666926 1.99902 0.666748ZM5.99902 0.666748C6.45611 0.666748 6.83283 1.04271 6.83301 1.49976C6.83301 1.95695 6.45621 2.33374 5.99902 2.33374C5.54198 2.33356 5.16602 1.95684 5.16602 1.49976C5.16619 1.04282 5.54209 0.666926 5.99902 0.666748Z", fill: "currentColor", stroke: "currentColor" })), ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M7.15604 14.8024C7.0149 14.6706 6.94434 14.5146 6.94434 14.3344C6.94434 14.1545 7.0149 13.9987 7.15604 13.8669L11.2913 10.0066L7.14192 6.13307C7.0102 6.0101 6.94434 5.85639 6.94434 5.67194C6.94434 5.48748 7.0149 5.32938 7.15604 5.19763C7.29717 5.06588 7.46427 5 7.65735 5C7.85004 5 8.01696 5.06588 8.15809 5.19763L12.9002 9.63768C12.9567 9.69038 12.9967 9.74747 13.0204 9.80896C13.0438 9.87044 13.0554 9.93632 13.0554 10.0066C13.0554 10.0769 13.0438 10.1427 13.0204 10.2042C12.9967 10.2657 12.9567 10.3228 12.9002 10.3755L8.14398 14.8155C8.01225 14.9385 7.85004 15 7.65735 15C7.46427 15 7.29717 14.9341 7.15604 14.8024Z", fill: "#60697D" })), ie = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M5.35163 10.7033C3.85592 10.7033 2.59005 10.1852 1.55403 9.14923C0.51801 8.11321 0 6.84734 0 5.35163C0 3.85592 0.51801 2.59005 1.55403 1.55403C2.59005 0.51801 3.85592 0 5.35163 0C6.84734 0 8.11321 0.51801 9.14923 1.55403C10.1852 2.59005 10.7033 3.85592 10.7033 5.35163C10.7033 5.9554 10.6072 6.52487 10.4151 7.06003C10.223 7.5952 9.96226 8.06861 9.63293 8.48027L13.7736 12.6209C13.9245 12.7719 14 12.964 14 13.1973C14 13.4305 13.9245 13.6226 13.7736 13.7736C13.6226 13.9245 13.4305 14 13.1973 14C12.964 14 12.7719 13.9245 12.6209 13.7736L8.48027 9.63293C8.06861 9.96226 7.5952 10.223 7.06003 10.4151C6.52487 10.6072 5.9554 10.7033 5.35163 10.7033ZM5.35163 9.0566C6.38079 9.0566 7.25557 8.6964 7.97599 7.97599C8.6964 7.25557 9.0566 6.38079 9.0566 5.35163C9.0566 4.32247 8.6964 3.44768 7.97599 2.72727C7.25557 2.00686 6.38079 1.64666 5.35163 1.64666C4.32247 1.64666 3.44768 2.00686 2.72727 2.72727C2.00686 3.44768 1.64666 4.32247 1.64666 5.35163C1.64666 6.38079 2.00686 7.25557 2.72727 7.97599C3.44768 8.6964 4.32247 9.0566 5.35163 9.0566Z", fill: "#60697D" })), fe = ({ inputRef: c, onChange: p, type: a, placeholder: u, value: v }) => /* @__PURE__ */ M("div", { className: "ia-table-select-search d-flex align-items-center", children: [
5
+ import { createPortal as oe } from "react-dom";
6
+ import { S as re, N as le, O as se } from "./RadioGroup-Cv9QL-Yd.js";
7
+ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 8 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M1.99902 8.66675C2.45611 8.66675 2.83283 9.04271 2.83301 9.49976C2.83301 9.95695 2.45621 10.3337 1.99902 10.3337C1.54198 10.3336 1.16602 9.95684 1.16602 9.49976C1.16619 9.04282 1.54209 8.66693 1.99902 8.66675ZM5.99902 8.66675C6.45611 8.66675 6.83283 9.04271 6.83301 9.49976C6.83301 9.95695 6.45621 10.3337 5.99902 10.3337C5.54198 10.3336 5.16602 9.95684 5.16602 9.49976C5.16619 9.04282 5.54209 8.66693 5.99902 8.66675ZM1.99902 4.66675C2.45611 4.66675 2.83283 5.04271 2.83301 5.49976C2.83301 5.95695 2.45621 6.33374 1.99902 6.33374C1.54198 6.33356 1.16602 5.95684 1.16602 5.49976C1.16619 5.04282 1.54209 4.66693 1.99902 4.66675ZM5.99902 4.66675C6.45611 4.66675 6.83283 5.04271 6.83301 5.49976C6.83301 5.95695 6.45621 6.33374 5.99902 6.33374C5.54198 6.33356 5.16602 5.95684 5.16602 5.49976C5.16619 5.04282 5.54209 4.66693 5.99902 4.66675ZM1.99902 0.666748C2.45611 0.666748 2.83283 1.04271 2.83301 1.49976C2.83301 1.95695 2.45621 2.33374 1.99902 2.33374C1.54198 2.33356 1.16602 1.95684 1.16602 1.49976C1.16619 1.04282 1.54209 0.666926 1.99902 0.666748ZM5.99902 0.666748C6.45611 0.666748 6.83283 1.04271 6.83301 1.49976C6.83301 1.95695 6.45621 2.33374 5.99902 2.33374C5.54198 2.33356 5.16602 1.95684 5.16602 1.49976C5.16619 1.04282 5.54209 0.666926 5.99902 0.666748Z", fill: "currentColor", stroke: "currentColor" })), ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M7.15604 14.8024C7.0149 14.6706 6.94434 14.5146 6.94434 14.3344C6.94434 14.1545 7.0149 13.9987 7.15604 13.8669L11.2913 10.0066L7.14192 6.13307C7.0102 6.0101 6.94434 5.85639 6.94434 5.67194C6.94434 5.48748 7.0149 5.32938 7.15604 5.19763C7.29717 5.06588 7.46427 5 7.65735 5C7.85004 5 8.01696 5.06588 8.15809 5.19763L12.9002 9.63768C12.9567 9.69038 12.9967 9.74747 13.0204 9.80896C13.0438 9.87044 13.0554 9.93632 13.0554 10.0066C13.0554 10.0769 13.0438 10.1427 13.0204 10.2042C12.9967 10.2657 12.9567 10.3228 12.9002 10.3755L8.14398 14.8155C8.01225 14.9385 7.85004 15 7.65735 15C7.46427 15 7.29717 14.9341 7.15604 14.8024Z", fill: "#60697D" })), ie = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M5.35163 10.7033C3.85592 10.7033 2.59005 10.1852 1.55403 9.14923C0.51801 8.11321 0 6.84734 0 5.35163C0 3.85592 0.51801 2.59005 1.55403 1.55403C2.59005 0.51801 3.85592 0 5.35163 0C6.84734 0 8.11321 0.51801 9.14923 1.55403C10.1852 2.59005 10.7033 3.85592 10.7033 5.35163C10.7033 5.9554 10.6072 6.52487 10.4151 7.06003C10.223 7.5952 9.96226 8.06861 9.63293 8.48027L13.7736 12.6209C13.9245 12.7719 14 12.964 14 13.1973C14 13.4305 13.9245 13.6226 13.7736 13.7736C13.6226 13.9245 13.4305 14 13.1973 14C12.964 14 12.7719 13.9245 12.6209 13.7736L8.48027 9.63293C8.06861 9.96226 7.5952 10.223 7.06003 10.4151C6.52487 10.6072 5.9554 10.7033 5.35163 10.7033ZM5.35163 9.0566C6.38079 9.0566 7.25557 8.6964 7.97599 7.97599C8.6964 7.25557 9.0566 6.38079 9.0566 5.35163C9.0566 4.32247 8.6964 3.44768 7.97599 2.72727C7.25557 2.00686 6.38079 1.64666 5.35163 1.64666C4.32247 1.64666 3.44768 2.00686 2.72727 2.72727C2.00686 3.44768 1.64666 4.32247 1.64666 5.35163C1.64666 6.38079 2.00686 7.25557 2.72727 7.97599C3.44768 8.6964 4.32247 9.0566 5.35163 9.0566Z", fill: "#60697D" })), fe = ({ inputRef: c, onChange: p, type: a, placeholder: u, value: w }) => /* @__PURE__ */ M("div", { className: "ia-table-select-search d-flex align-items-center", children: [
8
8
  /* @__PURE__ */ f(ie, { className: "icon-10" }),
9
9
  /* @__PURE__ */ f(
10
10
  "input",
11
11
  {
12
12
  ref: c,
13
13
  type: a,
14
- value: v,
14
+ value: w,
15
15
  placeholder: u,
16
16
  className: "ia-table-select-search-input",
17
17
  onChange: p,
@@ -20,22 +20,23 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
20
20
  )
21
21
  ] }), de = (c, p, a) => {
22
22
  L(() => {
23
- var v;
24
- const u = (v = a == null ? void 0 : a.getTableInstance) == null ? void 0 : v.call(a);
23
+ var w;
24
+ const u = (w = a == null ? void 0 : a.getTableInstance) == null ? void 0 : w.call(a);
25
25
  if (c && p && (u != null && u.current)) {
26
26
  const k = u.current.querySelectorAll(
27
- ".ia-table-frozen-scroll-container, .ia-table-right-pinned-scroll-container, .ia-table-normal-scroll-container"
27
+ ".ia-table-frozen-scroll-container, .ia-table-right-pinned-scroll-container, .ia-table-normal-scroll-container, .ia-table-normal-columns-section"
28
28
  ), j = Array.from(
29
29
  k
30
- ).map((s) => ({
31
- element: s,
32
- overflow: s.style.overflow
30
+ ).map((r) => ({
31
+ element: r,
32
+ overflow: r.style.overflow,
33
+ "overflow-y": r.style.overflowY
33
34
  }));
34
- return k.forEach((s) => {
35
- s.style.overflow = "hidden";
35
+ return k.forEach((r) => {
36
+ r.style.overflow = "hidden";
36
37
  }), () => {
37
- j.forEach((s) => {
38
- s.element.style.overflow = s.overflow;
38
+ j.forEach((r) => {
39
+ r.element.style.overflow = r.overflow, r.element.style.overflowY = r["overflow-y"];
39
40
  });
40
41
  };
41
42
  }
@@ -45,29 +46,29 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
45
46
  width: p = "100%",
46
47
  selectedOptions: a,
47
48
  setSelectedOptions: u,
48
- isDisabled: v = !1,
49
+ isDisabled: w = !1,
49
50
  isOpen: k = void 0,
50
51
  setIsOpen: j = void 0,
51
- initialOptions: s = [],
52
+ initialOptions: r = [],
52
53
  withPortal: d = !1,
53
54
  className: z = "",
54
55
  isMulti: b = !1,
55
56
  currentOptions: $,
56
57
  setCurrentOptions: N,
57
- onBlur: x,
58
+ onBlur: y,
58
59
  isCellRenderer: g = !1,
59
60
  tableApi: i = null,
60
61
  lazyLoadCellRenderer: q = !1,
61
62
  isEnableResetButton: W = !0
62
63
  }) => {
63
- const y = Y(null), V = Y(null), A = Y(null), [X, F] = Z(!1), [G, J] = Z(""), [C, P] = Z(null), [T, D] = Z(-1), [Q, K] = Z(s), H = $ || Q || s, l = k !== void 0 ? k : X, h = j || F;
64
- de(l, g, i);
64
+ const x = Y(null), V = Y(null), A = Y(null), [F, G] = Z(!1), [J, Q] = Z(""), [C, P] = Z(null), [T, D] = Z(-1), [R, K] = Z(r), H = $ || R || r, s = k !== void 0 ? k : F, h = j || G;
65
+ de(s, g, i);
65
66
  const S = B(() => {
66
- if (y.current) {
67
- const t = y.current.getBoundingClientRect(), n = 250, r = window.innerHeight - t.bottom, o = t.top, e = r < n && o > r;
67
+ if (x.current) {
68
+ const t = x.current.getBoundingClientRect(), n = 250, o = window.innerHeight - t.bottom, l = t.top, e = o < n && l > o;
68
69
  return {
69
- top: e ? t.top + window.scrollY - n : t.bottom + window.scrollY,
70
- left: t.left + window.scrollX,
70
+ top: e ? t.top - n : t.bottom,
71
+ left: t.left,
71
72
  width: t.width,
72
73
  openAbove: e
73
74
  };
@@ -83,66 +84,66 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
83
84
  h(q);
84
85
  }
85
86
  }, [q, d, S]), L(() => {
86
- if (l && d) {
87
+ if (s && d) {
87
88
  const t = S();
88
89
  t && P(t);
89
90
  }
90
- }, [l, d, S]), L(() => {
91
- const t = (r) => {
92
- y.current && !y.current.contains(r.target) && V.current && !V.current.contains(r.target) && (h(!1), x && x(), g && (i != null && i.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[i.tableId] = !1));
91
+ }, [s, d, S]), L(() => {
92
+ const t = (o) => {
93
+ x.current && !x.current.contains(o.target) && V.current && !V.current.contains(o.target) && (h(!1), y && y(), g && (i != null && i.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[i.tableId] = !1));
93
94
  }, n = () => {
94
- if (l && d) {
95
- const r = S();
96
- r && P(r);
95
+ if (s && d) {
96
+ const o = S();
97
+ o && P(o);
97
98
  }
98
99
  };
99
- return l && (document.addEventListener("mousedown", t), d && (window.addEventListener("scroll", n, !0), window.addEventListener("resize", n))), () => {
100
+ return s && (document.addEventListener("mousedown", t), d && (window.addEventListener("scroll", n, !0), window.addEventListener("resize", n))), () => {
100
101
  document.removeEventListener("mousedown", t), d && (window.removeEventListener("scroll", n, !0), window.removeEventListener("resize", n));
101
102
  };
102
103
  }, [
103
- l,
104
+ s,
104
105
  h,
105
106
  d,
106
107
  g,
107
- x,
108
+ y,
108
109
  i,
109
110
  S
110
111
  ]), L(() => {
111
- l && A.current && (A.current.focus(), D(-1));
112
- }, [l]), L(() => {
113
- $ || s && s.length > 0 && K(s);
114
- }, [s, $, N]);
115
- const R = B(
112
+ s && A.current && (A.current.focus(), D(-1));
113
+ }, [s]), L(() => {
114
+ $ || r && r.length > 0 && K(r);
115
+ }, [r, $, N]);
116
+ const X = B(
116
117
  (t) => {
117
- if (t.stopPropagation(), !v) {
118
- if (!l && d) {
119
- const r = S();
120
- r && P(r);
118
+ if (t.stopPropagation(), !w) {
119
+ if (!s && d) {
120
+ const o = S();
121
+ o && P(o);
121
122
  }
122
123
  const n = t.currentTarget.dataset.keyboardshortcut;
123
- h(n ? !1 : !l), (l && x || n && x) && x();
124
+ h(n ? !1 : !s), (s && y || n && y) && y();
124
125
  }
125
126
  },
126
127
  [
127
- v,
128
- l,
128
+ w,
129
+ s,
129
130
  h,
130
131
  d,
131
132
  S,
132
- x
133
+ y
133
134
  ]
134
135
  ), U = B(
135
136
  (t) => {
136
137
  if (b)
137
- if (Array.isArray(a) && a.some((r) => r.value === t.value))
138
+ if (Array.isArray(a) && a.some((o) => o.value === t.value))
138
139
  u(
139
140
  a.filter(
140
- (r) => r.value !== t.value
141
+ (o) => o.value !== t.value
141
142
  )
142
143
  );
143
144
  else {
144
- const r = Array.isArray(a) ? a : [];
145
- u([...r, t]);
145
+ const o = Array.isArray(a) ? a : [];
146
+ u([...o, t]);
146
147
  }
147
148
  else
148
149
  u(t), h(!1), g && (i != null && i.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[i.tableId] = !1);
@@ -151,49 +152,49 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
151
152
  ), _ = B(
152
153
  (t) => {
153
154
  const n = t.target.value.toLowerCase();
154
- J(n), D(-1);
155
- const r = $ || s;
155
+ Q(n), D(-1);
156
+ const o = $ || r;
156
157
  if (n) {
157
- const o = r.filter((e) => e.label && typeof e.label == "string" ? e.label.toLowerCase().includes(n) : e.value && typeof e.value == "string" ? e.value.toLowerCase().includes(n) : e.label && typeof e.label == "number" ? e.label == Number(n) : e.value && typeof e.value == "number" ? e.value == Number(n) : !1);
158
- N ? N(o) : K(o);
158
+ const l = o.filter((e) => e.label && typeof e.label == "string" ? e.label.toLowerCase().includes(n) : e.value && typeof e.value == "string" ? e.value.toLowerCase().includes(n) : e.label && typeof e.label == "number" ? e.label == Number(n) : e.value && typeof e.value == "number" ? e.value == Number(n) : !1);
159
+ N ? N(l) : K(l);
159
160
  } else
160
- N ? N(s) : K(s);
161
+ N ? N(r) : K(r);
161
162
  },
162
- [s, $, N]
163
+ [r, $, N]
163
164
  );
164
165
  L(() => {
165
- if (!l) return;
166
+ if (!s) return;
166
167
  const t = (n) => {
167
- const r = H.filter((o) => !o.isDisabled);
168
+ const o = H.filter((l) => !l.isDisabled);
168
169
  switch (n.key) {
169
170
  case "ArrowDown":
170
- n.preventDefault(), n.stopPropagation(), D((o) => {
171
- const e = o < r.length - 1 ? o + 1 : 0;
171
+ n.preventDefault(), n.stopPropagation(), D((l) => {
172
+ const e = l < o.length - 1 ? l + 1 : 0;
172
173
  return setTimeout(() => {
173
174
  var E;
174
- const w = (E = V.current) == null ? void 0 : E.querySelector(
175
+ const v = (E = V.current) == null ? void 0 : E.querySelector(
175
176
  `[data-option-index="${e}"]`
176
177
  );
177
- w == null || w.scrollIntoView({ block: "nearest" });
178
+ v == null || v.scrollIntoView({ block: "nearest" });
178
179
  }, 0), e;
179
180
  });
180
181
  break;
181
182
  case "ArrowUp":
182
- n.preventDefault(), n.stopPropagation(), D((o) => {
183
- const e = o > 0 ? o - 1 : r.length - 1;
183
+ n.preventDefault(), n.stopPropagation(), D((l) => {
184
+ const e = l > 0 ? l - 1 : o.length - 1;
184
185
  return setTimeout(() => {
185
186
  var E;
186
- const w = (E = V.current) == null ? void 0 : E.querySelector(
187
+ const v = (E = V.current) == null ? void 0 : E.querySelector(
187
188
  `[data-option-index="${e}"]`
188
189
  );
189
- w == null || w.scrollIntoView({ block: "nearest" });
190
+ v == null || v.scrollIntoView({ block: "nearest" });
190
191
  }, 0), e;
191
192
  });
192
193
  break;
193
194
  case "Enter":
194
- if (n.preventDefault(), n.stopPropagation(), T >= 0 && T < r.length) {
195
- const o = r[T];
196
- o && !o.isDisabled && U(o);
195
+ if (n.preventDefault(), n.stopPropagation(), T >= 0 && T < o.length) {
196
+ const l = o[T];
197
+ l && !l.isDisabled && U(l);
197
198
  }
198
199
  break;
199
200
  case "Escape":
@@ -205,7 +206,7 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
205
206
  document.removeEventListener("keydown", t);
206
207
  };
207
208
  }, [
208
- l,
209
+ s,
209
210
  H,
210
211
  T,
211
212
  U,
@@ -214,12 +215,12 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
214
215
  i
215
216
  ]);
216
217
  const O = ne(() => {
217
- if (!l || !y.current) return !1;
218
- const t = y.current.getBoundingClientRect(), n = 250, r = window.innerHeight - t.bottom, o = t.top;
219
- return r < n && o > r;
220
- }, [l]), ee = `ia-table-select-container d-flex justify-content-between align-items-center ${v ? "ia-table-select-disabled" : ""} ${l ? "ia-table-select-open" : ""} ${g ? "ia-table-selectrenderer" : ""} ${z}`, te = () => {
221
- var o;
222
- const t = H.filter((e) => !e.isDisabled), n = d ? C == null ? void 0 : C.openAbove : O, r = /* @__PURE__ */ M(
218
+ if (!s || !x.current) return !1;
219
+ const t = x.current.getBoundingClientRect(), n = 250, o = window.innerHeight - t.bottom, l = t.top;
220
+ return o < n && l > o;
221
+ }, [s]), ee = `ia-table-select-container d-flex justify-content-between align-items-center ${w ? "ia-table-select-disabled" : ""} ${s ? "ia-table-select-open" : ""} ${g ? "ia-table-selectrenderer" : ""} ${z}`, te = () => {
222
+ var l;
223
+ const t = H.filter((e) => !e.isDisabled), n = d ? C == null ? void 0 : C.openAbove : O, o = /* @__PURE__ */ M(
223
224
  "div",
224
225
  {
225
226
  ref: V,
@@ -227,9 +228,9 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
227
228
  onClick: (e) => e.stopPropagation(),
228
229
  style: {
229
230
  ...d && C ? {
230
- position: "absolute",
231
+ position: "fixed",
231
232
  top: C.openAbove ? "auto" : `${C.top}px`,
232
- bottom: C.openAbove ? `${window.innerHeight - (((o = y.current) == null ? void 0 : o.getBoundingClientRect().top) || 0)}px` : "auto",
233
+ bottom: C.openAbove ? `${window.innerHeight - (((l = x.current) == null ? void 0 : l.getBoundingClientRect().top) || 0)}px` : "auto",
233
234
  left: `${C.left}px`,
234
235
  width: `${C.width}px`
235
236
  } : { width: p }
@@ -240,19 +241,19 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
240
241
  {
241
242
  inputRef: A,
242
243
  type: "text",
243
- value: G,
244
+ value: J,
244
245
  onChange: _,
245
246
  placeholder: "Search here..."
246
247
  }
247
248
  ),
248
249
  /* @__PURE__ */ f("div", { className: "ia-table-select-options d-flex flex-column gap-2", children: H && H.length > 0 ? H.map((e) => {
249
- const w = t.findIndex(
250
+ const v = t.findIndex(
250
251
  (I) => I.value === e.value
251
- ), E = w === T;
252
+ ), E = v === T;
252
253
  return /* @__PURE__ */ M(
253
254
  "div",
254
255
  {
255
- "data-option-index": w,
256
+ "data-option-index": v,
256
257
  className: `ia-table-select-option cursor-pointer d-flex align-items-center gap-6 ${b ? Array.isArray(a) && a.some(
257
258
  (I) => I.value === e.value
258
259
  ) ? "ia-table-select-option-selected" : "" : a && !Array.isArray(a) && a.value === e.value ? "ia-table-select-option-selected" : ""} ${e.isDisabled ? "ia-table-option-disabled" : ""} ${E ? "ia-table-select-option-highlighted" : ""}`,
@@ -260,7 +261,7 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
260
261
  I.stopPropagation(), e.isDisabled || U(e);
261
262
  },
262
263
  onMouseEnter: () => {
263
- e.isDisabled || D(w);
264
+ e.isDisabled || D(v);
264
265
  },
265
266
  onMouseLeave: () => {
266
267
  e.isDisabled || D(-1);
@@ -278,21 +279,21 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
278
279
  ]
279
280
  }
280
281
  );
281
- return d ? re(r, document.body) : r;
282
+ return d ? oe(o, document.body) : o;
282
283
  };
283
284
  return /* @__PURE__ */ M(
284
285
  "div",
285
286
  {
286
- className: `ia-table-selectbox-container ${g && v ? "ia-table-cell-render-select-disabled" : ""}`,
287
+ className: `ia-table-selectbox-container ${g && w ? "ia-table-cell-render-select-disabled" : ""}`,
287
288
  style: { width: p },
288
289
  children: [
289
290
  c && /* @__PURE__ */ f("label", { className: "ia-table-select-label", children: c }),
290
291
  /* @__PURE__ */ M(
291
292
  "div",
292
293
  {
293
- ref: y,
294
+ ref: x,
294
295
  className: ee,
295
- onClick: R,
296
+ onClick: X,
296
297
  children: [
297
298
  /* @__PURE__ */ f("div", { className: "ia-table-select-value", children: a ? b ? Array.isArray(a) && a.length > 0 ? a.length === 1 ? a[0].label : `${a.length} items selected` : "Select" : Array.isArray(a) ? "Select" : a.label : b ? "Select" : "Select an option" }),
298
299
  (b ? Array.isArray(a) && a.length > 0 : a) && W && /* @__PURE__ */ f(
@@ -302,7 +303,7 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
302
303
  onClick: (t) => {
303
304
  t.stopPropagation(), u([]);
304
305
  },
305
- children: /* @__PURE__ */ f(oe, { className: "icon-10" })
306
+ children: /* @__PURE__ */ f(re, { className: "icon-10" })
306
307
  }
307
308
  ),
308
309
  /* @__PURE__ */ f(
@@ -315,7 +316,7 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
315
316
  children: /* @__PURE__ */ f(
316
317
  ce,
317
318
  {
318
- className: `icon-16 ${l ? "ia-table-rotate-270" : "ia-table-rotate-90"}`
319
+ className: `icon-16 ${s ? "ia-table-rotate-270" : "ia-table-rotate-90"}`
319
320
  }
320
321
  )
321
322
  }
@@ -323,18 +324,18 @@ const Ce = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height:
323
324
  ]
324
325
  }
325
326
  ),
326
- l && te()
327
+ s && te()
327
328
  ]
328
329
  }
329
330
  );
330
- }, he = ae(ue), be = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M3.62057 16C3.15514 16 2.75754 15.8327 2.42777 15.498C2.09814 15.1632 1.93333 14.7595 1.93333 14.287V2.25959H1V0.838165H5.2V0H10.8V0.838165H15V2.25959H14.0667V14.287C14.0667 14.7657 13.9033 15.1708 13.5767 15.5025C13.25 15.8342 12.8509 16 12.3794 16H3.62057ZM12.6667 2.25959H3.33333V14.287C3.33333 14.3721 3.36024 14.442 3.41407 14.4966C3.46789 14.5513 3.53672 14.5786 3.62057 14.5786H12.3794C12.4513 14.5786 12.5171 14.5482 12.5768 14.4874C12.6367 14.4267 12.6667 14.3599 12.6667 14.287V2.25959ZM5.57707 12.6833H6.97683V4.15482H5.57707V12.6833ZM9.02317 12.6833H10.4229V4.15482H9.02317V12.6833Z", fill: "#B4BAC7" })), xe = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 6 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M0.725024 8.3419C0.612116 8.23649 0.555663 8.1117 0.555663 7.96751C0.555663 7.8236 0.612116 7.69894 0.725024 7.59354L4.03321 4.50527L0.713734 1.40646C0.608354 1.30808 0.555664 1.18511 0.555664 1.03755C0.555664 0.889987 0.612118 0.763505 0.725025 0.658103C0.837932 0.552701 0.971615 0.5 1.12607 0.5C1.28023 0.5 1.41376 0.552701 1.52667 0.658103L5.32035 4.21015C5.36552 4.25231 5.39758 4.29798 5.41655 4.34717C5.43522 4.39635 5.44455 4.44906 5.44455 4.50527C5.44455 4.56148 5.43522 4.61419 5.41655 4.66337C5.39758 4.71256 5.36552 4.75823 5.32035 4.80039L1.51537 8.35244C1.40999 8.45081 1.28023 8.5 1.12607 8.5C0.971613 8.5 0.837931 8.4473 0.725024 8.3419Z", fill: "#60697D" }));
331
+ }, he = ae(ue), be = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M3.62057 16C3.15514 16 2.75754 15.8327 2.42777 15.498C2.09814 15.1632 1.93333 14.7595 1.93333 14.287V2.25959H1V0.838165H5.2V0H10.8V0.838165H15V2.25959H14.0667V14.287C14.0667 14.7657 13.9033 15.1708 13.5767 15.5025C13.25 15.8342 12.8509 16 12.3794 16H3.62057ZM12.6667 2.25959H3.33333V14.287C3.33333 14.3721 3.36024 14.442 3.41407 14.4966C3.46789 14.5513 3.53672 14.5786 3.62057 14.5786H12.3794C12.4513 14.5786 12.5171 14.5482 12.5768 14.4874C12.6367 14.4267 12.6667 14.3599 12.6667 14.287V2.25959ZM5.57707 12.6833H6.97683V4.15482H5.57707V12.6833ZM9.02317 12.6833H10.4229V4.15482H9.02317V12.6833Z", fill: "#B4BAC7" })), ye = (c) => /* @__PURE__ */ m.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 6 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ m.createElement("path", { d: "M0.725024 8.3419C0.612116 8.23649 0.555663 8.1117 0.555663 7.96751C0.555663 7.8236 0.612116 7.69894 0.725024 7.59354L4.03321 4.50527L0.713734 1.40646C0.608354 1.30808 0.555664 1.18511 0.555664 1.03755C0.555664 0.889987 0.612118 0.763505 0.725025 0.658103C0.837932 0.552701 0.971615 0.5 1.12607 0.5C1.28023 0.5 1.41376 0.552701 1.52667 0.658103L5.32035 4.21015C5.36552 4.25231 5.39758 4.29798 5.41655 4.34717C5.43522 4.39635 5.44455 4.44906 5.44455 4.50527C5.44455 4.56148 5.43522 4.61419 5.41655 4.66337C5.39758 4.71256 5.36552 4.75823 5.32035 4.80039L1.51537 8.35244C1.40999 8.45081 1.28023 8.5 1.12607 8.5C0.971613 8.5 0.837931 8.4473 0.725024 8.3419Z", fill: "#60697D" }));
331
332
  export {
332
333
  Ce as S,
333
334
  he as a,
334
335
  fe as b,
335
336
  be as c,
336
337
  ce as d,
337
- xe as e,
338
+ ye as e,
338
339
  ie as f,
339
340
  de as u
340
341
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ia-table",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "moment": "^2.0.0",