ia-table 0.14.7 → 0.15.0
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/RadioGroup-Cv9QL-Yd.js +1027 -0
- package/dist/chat.d.ts +3373 -0
- package/dist/chat.js +51341 -0
- package/dist/chat.type-_co7njq2.js +5086 -0
- package/dist/index.d.ts +1478 -15
- package/dist/index.js +9639 -14437
- package/dist/pivot.d.ts +97 -1
- package/dist/pivot.js +278 -261
- package/dist/right-arrow-5CR5OWUs.js +340 -0
- package/package.json +21 -8
- package/dist/right-arrow-u0DuaXma.js +0 -1339
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.ia-table-select-search{padding:9.5px 12px}.ia-table-select-search svg path{fill:#a0a8b1}.ia-table-select-search .ia-table-select-search-input{width:100%;border:none;border-radius:8px;padding:0 10px;font-size:14px;outline:none;background-color:inherit;color:#1f2b4d;line-height:16px}.ia-table-select-search .ia-table-select-search-input:focus{border-color:#4259ee}.ia-table-select-search .ia-table-select-search-input::placeholder{color:#b4bac7}.ia-table-select-dropdown{position:absolute;margin-top:6px;border-radius:12px;box-shadow:0 1px 6px #1a277c24;border:none;padding:8px 6px;background-color:#fff;font-family:Manrope,sans-serif;z-index:1050;min-height:135px;max-height:262px}.ia-table-select-dropdown.ia-table-select-dropdown-above{margin-top:0;margin-bottom:6px;bottom:100%;top:auto}.ia-table-select-reset{width:20px;height:20px;background:transparent;border:none;margin-left:8px}.ia-table-select-reset svg path{fill:#60697d}.ia-table-select-options{max-height:240px;overflow-y:auto;margin-top:2px}.ia-table-select-options::-webkit-scrollbar{width:6px}.ia-table-select-options::-webkit-scrollbar-track{background:transparent}.ia-table-select-options::-webkit-scrollbar-thumb{background-color:#c3c8d4;border-radius:3px}.ia-table-select-options .ia-table-select-option{padding:7.5px 12px;font-size:14px;color:#1f2b4d;line-height:20px;font-weight:500;transition:background-color .2s ease;border-radius:8px}.ia-table-select-options .ia-table-select-option:hover{background-color:#f5f6fa}.ia-table-select-options .ia-table-select-option.ia-table-select-option-selected,.ia-table-select-options .ia-table-select-option.ia-table-select-option-highlighted{background-color:#eef0ff}.ia-table-select-options .ia-table-select-option.ia-table-option-disabled{cursor:not-allowed;-webkit-user-select:none;user-select:none;color:#b4bac7}.ia-table-select-options .ia-table-select-no-options{padding:12px;text-align:center;color:#a0a8b1;font-style:italic}.ia-table-selectbox-container{width:100%;font-family:Manrope,sans-serif;position:relative;margin:0;padding:0}.ia-table-selectbox-container .ia-table-select-label{font-size:12px;font-weight:500;color:#60697d;line-height:16px;margin-bottom:6px;display:block}.ia-table-selectbox-container .ia-table-select-container{width:100%;height:32px;border:1px solid #d9dde7;border-radius:8px;background-color:#fff;padding:0 12px;cursor:pointer;transition:all .2s ease-in-out;position:relative;margin:0}.ia-table-selectbox-container .ia-table-select-container:hover:not(.ia-table-select-disabled,.ia-table-selectrenderer){border-color:#4259ee}.ia-table-selectbox-container .ia-table-select-container.ia-table-select-disabled{background-color:#f2f4fb;border-color:#e2e8f0;cursor:not-allowed;opacity:.7}.ia-table-selectbox-container .ia-table-select-container.ia-table-selectrenderer{border:none}.ia-table-selectbox-container .ia-table-select-container .ia-table-select-value{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:400;color:#1f2b4d;line-height:19px}.ia-table-selectbox-container .ia-table-select-container .ia-table-select-value:empty:before{content:"Select an option";color:#b4bac7}.ia-table-selectbox-container .ia-table-select-container .ia-table-select-arrow{width:16px;height:16px;transition:transform .2s ease}.ia-table-selectbox-container .ia-table-select-container .ia-table-select-arrow svg{transition:transform .2s ease;fill:#404b62}.ia-table-cell-render-select-disabled .ia-table-select-disabled .ia-table-select-value{color:#b4bac7!important;font-weight:400!important}.ia-table-cell-render-select-disabled .ia-table-select-disabled{border:none!important;background-color:inherit!important;cursor:not-allowed!important}.ia-table-cell-render-select-disabled .ia-table-select-disabled svg path{fill:#d9dde7}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { useEffect as L, memo as ae, useRef as Y, useState as Z, useCallback as B, useMemo as ne } from "react";
|
|
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: [
|
|
8
|
+
/* @__PURE__ */ f(ie, { className: "icon-10" }),
|
|
9
|
+
/* @__PURE__ */ f(
|
|
10
|
+
"input",
|
|
11
|
+
{
|
|
12
|
+
ref: c,
|
|
13
|
+
type: a,
|
|
14
|
+
value: v,
|
|
15
|
+
placeholder: u,
|
|
16
|
+
className: "ia-table-select-search-input",
|
|
17
|
+
onChange: p,
|
|
18
|
+
onClick: (k) => k.stopPropagation()
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
] }), de = (c, p, a) => {
|
|
22
|
+
L(() => {
|
|
23
|
+
var v;
|
|
24
|
+
const u = (v = a == null ? void 0 : a.getTableInstance) == null ? void 0 : v.call(a);
|
|
25
|
+
if (c && p && (u != null && u.current)) {
|
|
26
|
+
const k = u.current.querySelectorAll(
|
|
27
|
+
".ia-table-frozen-scroll-container, .ia-table-right-pinned-scroll-container, .ia-table-normal-scroll-container"
|
|
28
|
+
), j = Array.from(
|
|
29
|
+
k
|
|
30
|
+
).map((s) => ({
|
|
31
|
+
element: s,
|
|
32
|
+
overflow: s.style.overflow
|
|
33
|
+
}));
|
|
34
|
+
return k.forEach((s) => {
|
|
35
|
+
s.style.overflow = "hidden";
|
|
36
|
+
}), () => {
|
|
37
|
+
j.forEach((s) => {
|
|
38
|
+
s.element.style.overflow = s.overflow;
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}, [c, p, a]);
|
|
43
|
+
}, ue = ({
|
|
44
|
+
label: c = "",
|
|
45
|
+
width: p = "100%",
|
|
46
|
+
selectedOptions: a,
|
|
47
|
+
setSelectedOptions: u,
|
|
48
|
+
isDisabled: v = !1,
|
|
49
|
+
isOpen: k = void 0,
|
|
50
|
+
setIsOpen: j = void 0,
|
|
51
|
+
initialOptions: s = [],
|
|
52
|
+
withPortal: d = !1,
|
|
53
|
+
className: z = "",
|
|
54
|
+
isMulti: b = !1,
|
|
55
|
+
currentOptions: $,
|
|
56
|
+
setCurrentOptions: N,
|
|
57
|
+
onBlur: x,
|
|
58
|
+
isCellRenderer: g = !1,
|
|
59
|
+
tableApi: i = null,
|
|
60
|
+
lazyLoadCellRenderer: q = !1,
|
|
61
|
+
isEnableResetButton: W = !0
|
|
62
|
+
}) => {
|
|
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);
|
|
65
|
+
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;
|
|
68
|
+
return {
|
|
69
|
+
top: e ? t.top + window.scrollY - n : t.bottom + window.scrollY,
|
|
70
|
+
left: t.left + window.scrollX,
|
|
71
|
+
width: t.width,
|
|
72
|
+
openAbove: e
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}, []);
|
|
77
|
+
L(() => {
|
|
78
|
+
if (q) {
|
|
79
|
+
if (d) {
|
|
80
|
+
const t = S();
|
|
81
|
+
t && P(t);
|
|
82
|
+
}
|
|
83
|
+
h(q);
|
|
84
|
+
}
|
|
85
|
+
}, [q, d, S]), L(() => {
|
|
86
|
+
if (l && d) {
|
|
87
|
+
const t = S();
|
|
88
|
+
t && P(t);
|
|
89
|
+
}
|
|
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));
|
|
93
|
+
}, n = () => {
|
|
94
|
+
if (l && d) {
|
|
95
|
+
const r = S();
|
|
96
|
+
r && P(r);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return l && (document.addEventListener("mousedown", t), d && (window.addEventListener("scroll", n, !0), window.addEventListener("resize", n))), () => {
|
|
100
|
+
document.removeEventListener("mousedown", t), d && (window.removeEventListener("scroll", n, !0), window.removeEventListener("resize", n));
|
|
101
|
+
};
|
|
102
|
+
}, [
|
|
103
|
+
l,
|
|
104
|
+
h,
|
|
105
|
+
d,
|
|
106
|
+
g,
|
|
107
|
+
x,
|
|
108
|
+
i,
|
|
109
|
+
S
|
|
110
|
+
]), 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(
|
|
116
|
+
(t) => {
|
|
117
|
+
if (t.stopPropagation(), !v) {
|
|
118
|
+
if (!l && d) {
|
|
119
|
+
const r = S();
|
|
120
|
+
r && P(r);
|
|
121
|
+
}
|
|
122
|
+
const n = t.currentTarget.dataset.keyboardshortcut;
|
|
123
|
+
h(n ? !1 : !l), (l && x || n && x) && x();
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
[
|
|
127
|
+
v,
|
|
128
|
+
l,
|
|
129
|
+
h,
|
|
130
|
+
d,
|
|
131
|
+
S,
|
|
132
|
+
x
|
|
133
|
+
]
|
|
134
|
+
), U = B(
|
|
135
|
+
(t) => {
|
|
136
|
+
if (b)
|
|
137
|
+
if (Array.isArray(a) && a.some((r) => r.value === t.value))
|
|
138
|
+
u(
|
|
139
|
+
a.filter(
|
|
140
|
+
(r) => r.value !== t.value
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
else {
|
|
144
|
+
const r = Array.isArray(a) ? a : [];
|
|
145
|
+
u([...r, t]);
|
|
146
|
+
}
|
|
147
|
+
else
|
|
148
|
+
u(t), h(!1), g && (i != null && i.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[i.tableId] = !1);
|
|
149
|
+
},
|
|
150
|
+
[b, a, u, h, g]
|
|
151
|
+
), _ = B(
|
|
152
|
+
(t) => {
|
|
153
|
+
const n = t.target.value.toLowerCase();
|
|
154
|
+
J(n), D(-1);
|
|
155
|
+
const r = $ || s;
|
|
156
|
+
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);
|
|
159
|
+
} else
|
|
160
|
+
N ? N(s) : K(s);
|
|
161
|
+
},
|
|
162
|
+
[s, $, N]
|
|
163
|
+
);
|
|
164
|
+
L(() => {
|
|
165
|
+
if (!l) return;
|
|
166
|
+
const t = (n) => {
|
|
167
|
+
const r = H.filter((o) => !o.isDisabled);
|
|
168
|
+
switch (n.key) {
|
|
169
|
+
case "ArrowDown":
|
|
170
|
+
n.preventDefault(), n.stopPropagation(), D((o) => {
|
|
171
|
+
const e = o < r.length - 1 ? o + 1 : 0;
|
|
172
|
+
return setTimeout(() => {
|
|
173
|
+
var E;
|
|
174
|
+
const w = (E = V.current) == null ? void 0 : E.querySelector(
|
|
175
|
+
`[data-option-index="${e}"]`
|
|
176
|
+
);
|
|
177
|
+
w == null || w.scrollIntoView({ block: "nearest" });
|
|
178
|
+
}, 0), e;
|
|
179
|
+
});
|
|
180
|
+
break;
|
|
181
|
+
case "ArrowUp":
|
|
182
|
+
n.preventDefault(), n.stopPropagation(), D((o) => {
|
|
183
|
+
const e = o > 0 ? o - 1 : r.length - 1;
|
|
184
|
+
return setTimeout(() => {
|
|
185
|
+
var E;
|
|
186
|
+
const w = (E = V.current) == null ? void 0 : E.querySelector(
|
|
187
|
+
`[data-option-index="${e}"]`
|
|
188
|
+
);
|
|
189
|
+
w == null || w.scrollIntoView({ block: "nearest" });
|
|
190
|
+
}, 0), e;
|
|
191
|
+
});
|
|
192
|
+
break;
|
|
193
|
+
case "Enter":
|
|
194
|
+
if (n.preventDefault(), n.stopPropagation(), T >= 0 && T < r.length) {
|
|
195
|
+
const o = r[T];
|
|
196
|
+
o && !o.isDisabled && U(o);
|
|
197
|
+
}
|
|
198
|
+
break;
|
|
199
|
+
case "Escape":
|
|
200
|
+
n.preventDefault(), n.stopPropagation(), h(!1), g && (i != null && i.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[i.tableId] = !1);
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
return document.addEventListener("keydown", t), () => {
|
|
205
|
+
document.removeEventListener("keydown", t);
|
|
206
|
+
};
|
|
207
|
+
}, [
|
|
208
|
+
l,
|
|
209
|
+
H,
|
|
210
|
+
T,
|
|
211
|
+
U,
|
|
212
|
+
h,
|
|
213
|
+
g,
|
|
214
|
+
i
|
|
215
|
+
]);
|
|
216
|
+
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(
|
|
223
|
+
"div",
|
|
224
|
+
{
|
|
225
|
+
ref: V,
|
|
226
|
+
className: `ia-table-select-dropdown d-flex flex-column ${n ? "ia-table-select-dropdown-above" : ""}`,
|
|
227
|
+
onClick: (e) => e.stopPropagation(),
|
|
228
|
+
style: {
|
|
229
|
+
...d && C ? {
|
|
230
|
+
position: "absolute",
|
|
231
|
+
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
|
+
left: `${C.left}px`,
|
|
234
|
+
width: `${C.width}px`
|
|
235
|
+
} : { width: p }
|
|
236
|
+
},
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ f(
|
|
239
|
+
fe,
|
|
240
|
+
{
|
|
241
|
+
inputRef: A,
|
|
242
|
+
type: "text",
|
|
243
|
+
value: G,
|
|
244
|
+
onChange: _,
|
|
245
|
+
placeholder: "Search here..."
|
|
246
|
+
}
|
|
247
|
+
),
|
|
248
|
+
/* @__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
|
+
(I) => I.value === e.value
|
|
251
|
+
), E = w === T;
|
|
252
|
+
return /* @__PURE__ */ M(
|
|
253
|
+
"div",
|
|
254
|
+
{
|
|
255
|
+
"data-option-index": w,
|
|
256
|
+
className: `ia-table-select-option cursor-pointer d-flex align-items-center gap-6 ${b ? Array.isArray(a) && a.some(
|
|
257
|
+
(I) => I.value === e.value
|
|
258
|
+
) ? "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" : ""}`,
|
|
259
|
+
onClick: (I) => {
|
|
260
|
+
I.stopPropagation(), e.isDisabled || U(e);
|
|
261
|
+
},
|
|
262
|
+
onMouseEnter: () => {
|
|
263
|
+
e.isDisabled || D(w);
|
|
264
|
+
},
|
|
265
|
+
onMouseLeave: () => {
|
|
266
|
+
e.isDisabled || D(-1);
|
|
267
|
+
},
|
|
268
|
+
children: [
|
|
269
|
+
b && Array.isArray(a) && a.some(
|
|
270
|
+
(I) => I.value === e.value
|
|
271
|
+
) ? /* @__PURE__ */ f(le, { className: "icon-16" }) : b ? /* @__PURE__ */ f(se, { className: "icon-16" }) : null,
|
|
272
|
+
/* @__PURE__ */ f("span", { children: e.label })
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
e.value
|
|
276
|
+
);
|
|
277
|
+
}) : /* @__PURE__ */ f("div", { className: "ia-table-select-no-options", children: "No options available" }) })
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
return d ? re(r, document.body) : r;
|
|
282
|
+
};
|
|
283
|
+
return /* @__PURE__ */ M(
|
|
284
|
+
"div",
|
|
285
|
+
{
|
|
286
|
+
className: `ia-table-selectbox-container ${g && v ? "ia-table-cell-render-select-disabled" : ""}`,
|
|
287
|
+
style: { width: p },
|
|
288
|
+
children: [
|
|
289
|
+
c && /* @__PURE__ */ f("label", { className: "ia-table-select-label", children: c }),
|
|
290
|
+
/* @__PURE__ */ M(
|
|
291
|
+
"div",
|
|
292
|
+
{
|
|
293
|
+
ref: y,
|
|
294
|
+
className: ee,
|
|
295
|
+
onClick: R,
|
|
296
|
+
children: [
|
|
297
|
+
/* @__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
|
+
(b ? Array.isArray(a) && a.length > 0 : a) && W && /* @__PURE__ */ f(
|
|
299
|
+
"button",
|
|
300
|
+
{
|
|
301
|
+
className: "ia-table-select-reset cursor-pointer flex-shrink-0 d-flex align-items-center justify-content-center",
|
|
302
|
+
onClick: (t) => {
|
|
303
|
+
t.stopPropagation(), u([]);
|
|
304
|
+
},
|
|
305
|
+
children: /* @__PURE__ */ f(oe, { className: "icon-10" })
|
|
306
|
+
}
|
|
307
|
+
),
|
|
308
|
+
/* @__PURE__ */ f(
|
|
309
|
+
"div",
|
|
310
|
+
{
|
|
311
|
+
className: "ia-table-select-arrow d-flex align-items-center icon-16 justify-content-center",
|
|
312
|
+
style: {
|
|
313
|
+
marginLeft: a ? "0" : "8px"
|
|
314
|
+
},
|
|
315
|
+
children: /* @__PURE__ */ f(
|
|
316
|
+
ce,
|
|
317
|
+
{
|
|
318
|
+
className: `icon-16 ${l ? "ia-table-rotate-270" : "ia-table-rotate-90"}`
|
|
319
|
+
}
|
|
320
|
+
)
|
|
321
|
+
}
|
|
322
|
+
)
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
),
|
|
326
|
+
l && te()
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
);
|
|
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
|
+
export {
|
|
332
|
+
Ce as S,
|
|
333
|
+
he as a,
|
|
334
|
+
fe as b,
|
|
335
|
+
be as c,
|
|
336
|
+
ce as d,
|
|
337
|
+
xe as e,
|
|
338
|
+
ie as f,
|
|
339
|
+
de as u
|
|
340
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ia-table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"moment": "^2.0.0",
|
|
7
7
|
"xlsx": "^0.18.0",
|
|
8
|
-
"zustand": "^4.0.0"
|
|
8
|
+
"zustand": "^4.0.0",
|
|
9
|
+
"dompurify": "^3.2.7",
|
|
10
|
+
"react-hook-form": "^7.54.2",
|
|
11
|
+
"emoji-picker-react": "^4.14.0"
|
|
9
12
|
},
|
|
10
13
|
"main": "dist/index.js",
|
|
11
14
|
"module": "dist/index.js",
|
|
@@ -16,6 +19,11 @@
|
|
|
16
19
|
"import": "./dist/index.js",
|
|
17
20
|
"default": "./dist/index.js"
|
|
18
21
|
},
|
|
22
|
+
"./chat": {
|
|
23
|
+
"types": "./dist/chat.d.ts",
|
|
24
|
+
"import": "./dist/chat.js",
|
|
25
|
+
"default": "./dist/chat.js"
|
|
26
|
+
},
|
|
19
27
|
"./pivot": {
|
|
20
28
|
"types": "./dist/pivot.d.ts",
|
|
21
29
|
"import": "./dist/pivot.js",
|
|
@@ -43,10 +51,7 @@
|
|
|
43
51
|
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\""
|
|
44
52
|
},
|
|
45
53
|
"eslintConfig": {
|
|
46
|
-
"extends": [
|
|
47
|
-
"react-app",
|
|
48
|
-
"react-app/jest"
|
|
49
|
-
]
|
|
54
|
+
"extends": []
|
|
50
55
|
},
|
|
51
56
|
"browserslist": {
|
|
52
57
|
"production": [
|
|
@@ -82,6 +87,15 @@
|
|
|
82
87
|
"eslint-plugin-react-hooks": "^5.1.0-rc-fb9a90fa48-20240614",
|
|
83
88
|
"eslint-plugin-react-refresh": "^0.4.26",
|
|
84
89
|
"eslint-plugin-storybook": "^0.6.15",
|
|
90
|
+
"@tiptap/extension-highlight": "^2.26.1",
|
|
91
|
+
"@tiptap/extension-image": "^2.26.1",
|
|
92
|
+
"@tiptap/extension-link": "^2.26.1",
|
|
93
|
+
"@tiptap/extension-mention": "^2.26.1",
|
|
94
|
+
"@tiptap/extension-placeholder": "^2.26.1",
|
|
95
|
+
"@tiptap/extension-strike": "^2.26.1",
|
|
96
|
+
"@tiptap/react": "^2.26.1",
|
|
97
|
+
"@tiptap/starter-kit": "^2.26.1",
|
|
98
|
+
"@tiptap/suggestion": "^2.26.1",
|
|
85
99
|
"globals": "^17.0.0",
|
|
86
100
|
"jsdom": "^26.1.0",
|
|
87
101
|
"moment": "^2.30.1",
|
|
@@ -89,12 +103,11 @@
|
|
|
89
103
|
"react": "^18.0.0",
|
|
90
104
|
"react-dom": "^18.0.0",
|
|
91
105
|
"react-router-dom": "^6.3.0",
|
|
92
|
-
"react-scripts": "5.0.1",
|
|
93
106
|
"rollup-plugin-visualizer": "^6.0.3",
|
|
94
107
|
"sass": "^1.89.2",
|
|
95
108
|
"storybook": "^9.0.18",
|
|
96
109
|
"tsx": "^4.19.0",
|
|
97
|
-
"typescript": "^
|
|
110
|
+
"typescript": "^5.0.0",
|
|
98
111
|
"typescript-eslint": "^8.51.0",
|
|
99
112
|
"vite": "^6.3.5",
|
|
100
113
|
"vite-plugin-css-injected-by-js": "^3.3.0",
|