@ryuzaki13/react-foundation-ui 1.1.7 → 1.1.8
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/advanced-search/index.js +136 -136
- package/dist/base-table/index.js +2 -2
- package/dist/chunks/{CalendarView-C0gJvre1.js → CalendarView-KCkhCtK-.js} +101 -101
- package/dist/chunks/{CalendarView-C0gJvre1.js.map → CalendarView-KCkhCtK-.js.map} +1 -1
- package/dist/chunks/SelectOptionContent-CI7wq9Oi.js +27 -0
- package/dist/chunks/SelectOptionContent-CI7wq9Oi.js.map +1 -0
- package/dist/chunks/{TextEditorLexicalClient-DYZ32dnX.js → TextEditorLexicalClient-DeBA6fQX.js} +157 -157
- package/dist/chunks/{TextEditorLexicalClient-DYZ32dnX.js.map → TextEditorLexicalClient-DeBA6fQX.js.map} +1 -1
- package/dist/chunks/{base-table-BXKFSgIk.js → base-table-Dv9i3CAT.js} +73 -73
- package/dist/chunks/{base-table-BXKFSgIk.js.map → base-table-Dv9i3CAT.js.map} +1 -1
- package/dist/chunks/{date-input-DKkW7_uw.js → date-input-DT9E8dhk.js} +44 -44
- package/dist/chunks/{date-input-DKkW7_uw.js.map → date-input-DT9E8dhk.js.map} +1 -1
- package/dist/chunks/{date-range-preset-select-UgsfaOeM.js → date-range-preset-select-BLnY47cv.js} +20 -20
- package/dist/chunks/{date-range-preset-select-UgsfaOeM.js.map → date-range-preset-select-BLnY47cv.js.map} +1 -1
- package/dist/chunks/{input-CZLUUggm.js → input-BCJfUdK_.js} +43 -43
- package/dist/chunks/{input-CZLUUggm.js.map → input-BCJfUdK_.js.map} +1 -1
- package/dist/chunks/{input-files-aB8iaqGk.js → input-files-Dcc5K-_1.js} +2 -2
- package/dist/chunks/{input-files-aB8iaqGk.js.map → input-files-Dcc5K-_1.js.map} +1 -1
- package/dist/chunks/{input-search-eMvnvgV0.js → input-search-B7HmrAM7.js} +2 -2
- package/dist/chunks/{input-search-eMvnvgV0.js.map → input-search-B7HmrAM7.js.map} +1 -1
- package/dist/chunks/{multi-select-DaOKgHKE.js → multi-select-BCpRct-k.js} +105 -104
- package/dist/chunks/{multi-select-DaOKgHKE.js.map → multi-select-BCpRct-k.js.map} +1 -1
- package/dist/chunks/{picker-BZ05h_ZJ.js → picker-DTZk09Ag.js} +27 -27
- package/dist/chunks/{picker-BZ05h_ZJ.js.map → picker-DTZk09Ag.js.map} +1 -1
- package/dist/chunks/select-Bd48kVI3.js +328 -0
- package/dist/chunks/{select-Dj3FfpS0.js.map → select-Bd48kVI3.js.map} +1 -1
- package/dist/chunks/{table-BdpMzhLH.js → table-BtXVqa2I.js} +10 -10
- package/dist/chunks/{table-BdpMzhLH.js.map → table-BtXVqa2I.js.map} +1 -1
- package/dist/chunks/{table-column-interactions-6RGjmiI5.js → table-column-interactions-BGd5Lwy9.js} +19 -19
- package/dist/chunks/{table-column-interactions-6RGjmiI5.js.map → table-column-interactions-BGd5Lwy9.js.map} +1 -1
- package/dist/chunks/{useODataSelectBase-BxAvhDww.js → useODataSelectBase-wZ07hQFv.js} +10 -10
- package/dist/chunks/{useODataSelectBase-BxAvhDww.js.map → useODataSelectBase-wZ07hQFv.js.map} +1 -1
- package/dist/date-input/index.js +2 -2
- package/dist/date-range-preset-select/index.js +1 -1
- package/dist/date-time-input/index.js +41 -41
- package/dist/drop-zone/index.js +1 -1
- package/dist/errors/index.js +39 -39
- package/dist/image/index.js +2 -2
- package/dist/input/index.js +1 -1
- package/dist/input-date-time/index.js +1 -1
- package/dist/input-file/index.js +1 -1
- package/dist/input-files/index.js +1 -1
- package/dist/input-image/index.js +1 -1
- package/dist/input-search/index.js +1 -1
- package/dist/layout-picker/index.js +1 -1
- package/dist/multi-select/index.js +1 -1
- package/dist/notifications/index.js +26 -26
- package/dist/period-select/index.js +19 -19
- package/dist/picker/index.js +1 -1
- package/dist/preset-range-date-input/index.js +2 -2
- package/dist/preset-select/index.js +1 -1
- package/dist/select/index.js +1 -1
- package/dist/simple-table/index.js +1 -1
- package/dist/slider/index.js +312 -312
- package/dist/slider/index.js.map +1 -1
- package/dist/state-select/index.js +14 -14
- package/dist/styles.css +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table-column-interactions/index.js +1 -1
- package/dist/tag-input/index.js +1 -1
- package/dist/text/index.js +10 -10
- package/dist/text-editor/index.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/tree-select/index.js +240 -239
- package/dist/tree-select/index.js.map +1 -1
- package/dist/tree-table/index.js +15 -15
- package/package.json +2 -1
- package/storybook-static/project.json +1 -1
- package/dist/chunks/SelectOptionContent-lfEtHXfO.js +0 -1132
- package/dist/chunks/SelectOptionContent-lfEtHXfO.js.map +0 -1
- package/dist/chunks/select-Dj3FfpS0.js +0 -327
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { r as e } from "./grid-dI94AAbi.js";
|
|
2
2
|
import { c as t, d as n, h as r, i } from "./misc-DIF5h9ba.js";
|
|
3
|
-
import { t as a } from "./table-column-interactions-
|
|
3
|
+
import { t as a } from "./table-column-interactions-BGd5Lwy9.js";
|
|
4
4
|
import { n as o } from "./context-menu-DQeR3y7M.js";
|
|
5
5
|
import { s, t as c } from "./sortable-DcTIAbjD.js";
|
|
6
6
|
import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
7
7
|
import { cn as m, handleKeyboardActivation as ee } from "@ryuzaki13/react-foundation-lib/utils";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { flexRender as
|
|
13
|
-
import { filterAndDeduplicateIds as
|
|
8
|
+
import { Fragment as te, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
|
+
import { compileFormattersPipelineRuntimeFields as _, resolveValueStateClassName as v } from "@ryuzaki13/react-foundation-lib/formatters";
|
|
10
|
+
import { useDndSortableSensors as ne } from "@ryuzaki13/react-foundation-lib/hooks";
|
|
11
|
+
import { buildTableColumnLayout as y, getTableColumnFormattingMeta as re, getTableColumnMeta as b, isTableInteractiveElement as x, normalizeTableColumnOrder as S, normalizeTableColumnSizing as C, patchTableColumnWidth as ie, removeTableColumnWidth as ae, resolveReorderedTableHeaderColumns as oe, resolveTableColumnOrder as w, resolveTableLength as T } from "@ryuzaki13/react-foundation-lib/table";
|
|
12
|
+
import { flexRender as se, functionalUpdate as E } from "@tanstack/react-table";
|
|
13
|
+
import { filterAndDeduplicateIds as D, pickExistingMapValues as O } from "@ryuzaki13/react-foundation-lib/array";
|
|
14
14
|
import { restrictToHorizontalAxis as ce } from "@dnd-kit/modifiers";
|
|
15
15
|
//#region src/base-table/lib/columnPinning.ts
|
|
16
16
|
function k(e) {
|
|
@@ -22,17 +22,17 @@ function k(e) {
|
|
|
22
22
|
function A(e, t) {
|
|
23
23
|
let n = t?.[e.id];
|
|
24
24
|
if (typeof n == "number" && Number.isFinite(n) && n > 0) return `${Math.floor(n)}px`;
|
|
25
|
-
let r =
|
|
26
|
-
return typeof r == "number" && (r = Math.max(r, 4)),
|
|
25
|
+
let r = b(e.columnDef)?.width ?? 4;
|
|
26
|
+
return typeof r == "number" && (r = Math.max(r, 4)), T(r);
|
|
27
27
|
}
|
|
28
28
|
function j(e, t) {
|
|
29
|
-
let n = e.getAllLeafColumns().filter((e) => e.getIsVisible()), r = new Map(n.map((e) => [e.id, e])), i = n.map((e) => e.id), a =
|
|
29
|
+
let n = e.getAllLeafColumns().filter((e) => e.getIsVisible()), r = new Map(n.map((e) => [e.id, e])), i = n.map((e) => e.id), a = D(t.columnPinning.left, i), o = D(t.columnPinning.right, i), s = /* @__PURE__ */ new Set([...a, ...o]), c = [];
|
|
30
30
|
for (let e of n) s.has(e.id) || c.push(e.id);
|
|
31
|
-
let l =
|
|
31
|
+
let l = w({
|
|
32
32
|
ids: c,
|
|
33
33
|
order: t.columnOrder
|
|
34
34
|
});
|
|
35
|
-
return
|
|
35
|
+
return O([
|
|
36
36
|
...a,
|
|
37
37
|
...l,
|
|
38
38
|
...o
|
|
@@ -40,7 +40,7 @@ function j(e, t) {
|
|
|
40
40
|
}
|
|
41
41
|
function M(e, t) {
|
|
42
42
|
let n = j(e, t), r = new Map(n.map((e) => [e.id, e]));
|
|
43
|
-
return
|
|
43
|
+
return y({
|
|
44
44
|
ids: n.map((e) => e.id),
|
|
45
45
|
getWidth: (e) => {
|
|
46
46
|
let n = r.get(e);
|
|
@@ -86,7 +86,7 @@ function L(e) {
|
|
|
86
86
|
let r = P(e);
|
|
87
87
|
if (!r) return;
|
|
88
88
|
F(e) && n.add(r);
|
|
89
|
-
let i =
|
|
89
|
+
let i = re(e);
|
|
90
90
|
i && (t[r] = {
|
|
91
91
|
...i,
|
|
92
92
|
id: i.id ?? r,
|
|
@@ -94,7 +94,7 @@ function L(e) {
|
|
|
94
94
|
type: i.type ?? "string"
|
|
95
95
|
});
|
|
96
96
|
}), {
|
|
97
|
-
runtimeByColumnId:
|
|
97
|
+
runtimeByColumnId: _(t),
|
|
98
98
|
customCellColumnIds: n
|
|
99
99
|
};
|
|
100
100
|
}
|
|
@@ -114,7 +114,7 @@ function B(e, t) {
|
|
|
114
114
|
}));
|
|
115
115
|
}
|
|
116
116
|
function V({ rows: e, columns: t, resolveRowBoundaryKey: n = () => "__all_rows__", excludeColumnIds: r }) {
|
|
117
|
-
let i = t.filter((e) => r?.has(e.id) ? !1 :
|
|
117
|
+
let i = t.filter((e) => r?.has(e.id) ? !1 : b(e.columnDef)?.mergeDuplicates === !0);
|
|
118
118
|
if (e.length === 0 || i.length === 0) return /* @__PURE__ */ new Map();
|
|
119
119
|
let a = B(e, n), o = /* @__PURE__ */ new Map();
|
|
120
120
|
for (let e of i) {
|
|
@@ -153,7 +153,7 @@ function V({ rows: e, columns: t, resolveRowBoundaryKey: n = () => "__all_rows__
|
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/base-table/model/useTableColumnOrder.ts
|
|
155
155
|
function H({ columnOrder: e, defaultColumnOrder: t, onColumnOrderChange: n }) {
|
|
156
|
-
let [r, i] = p(void 0), a = d(() =>
|
|
156
|
+
let [r, i] = p(void 0), a = d(() => S(e ?? r ?? t), [
|
|
157
157
|
e,
|
|
158
158
|
t,
|
|
159
159
|
r
|
|
@@ -161,7 +161,7 @@ function H({ columnOrder: e, defaultColumnOrder: t, onColumnOrderChange: n }) {
|
|
|
161
161
|
return {
|
|
162
162
|
columnOrder: a,
|
|
163
163
|
onColumnOrderChange: l((t) => {
|
|
164
|
-
let r =
|
|
164
|
+
let r = S(E(t, a));
|
|
165
165
|
e === void 0 && i(r), n?.(r);
|
|
166
166
|
}, [
|
|
167
167
|
e,
|
|
@@ -181,7 +181,7 @@ function U({ columnPinning: e, defaultColumnPinning: t, onColumnPinningChange: n
|
|
|
181
181
|
return {
|
|
182
182
|
columnPinning: a,
|
|
183
183
|
onColumnPinningChange: l((t) => {
|
|
184
|
-
let r = { left: k(
|
|
184
|
+
let r = { left: k(E(t, a)).left };
|
|
185
185
|
e === void 0 && i(r), n?.(r);
|
|
186
186
|
}, [
|
|
187
187
|
e,
|
|
@@ -193,7 +193,7 @@ function U({ columnPinning: e, defaultColumnPinning: t, onColumnPinningChange: n
|
|
|
193
193
|
//#endregion
|
|
194
194
|
//#region src/base-table/model/useTableColumnSizing.ts
|
|
195
195
|
function W({ columnSizing: e, defaultColumnSizing: t, columnResizeMinWidth: n, onColumnSizingChange: r }) {
|
|
196
|
-
let [i, a] = p(void 0), o = d(() =>
|
|
196
|
+
let [i, a] = p(void 0), o = d(() => C(e ?? i ?? t, n), [
|
|
197
197
|
n,
|
|
198
198
|
e,
|
|
199
199
|
t,
|
|
@@ -202,7 +202,7 @@ function W({ columnSizing: e, defaultColumnSizing: t, columnResizeMinWidth: n, o
|
|
|
202
202
|
return {
|
|
203
203
|
columnSizing: o,
|
|
204
204
|
onColumnSizingChange: l((t) => {
|
|
205
|
-
let i =
|
|
205
|
+
let i = C(E(t, o), n);
|
|
206
206
|
e === void 0 && a(i), r?.(i);
|
|
207
207
|
}, [
|
|
208
208
|
n,
|
|
@@ -223,7 +223,7 @@ function G({ columnVisibility: e, defaultColumnVisibility: t, onColumnVisibility
|
|
|
223
223
|
return {
|
|
224
224
|
columnVisibility: a,
|
|
225
225
|
onColumnVisibilityChange: l((t) => {
|
|
226
|
-
let r =
|
|
226
|
+
let r = E(t, a);
|
|
227
227
|
e === void 0 && i(r), n?.(r);
|
|
228
228
|
}, [
|
|
229
229
|
e,
|
|
@@ -257,7 +257,7 @@ var K = {
|
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region src/base-table/ui/BaseTableHeaderCell.tsx
|
|
259
259
|
function q({ header: e, isPinnedLeft: t, left: n, isPinnedBoundary: r, isDragDisabled: i, enableColumnResizing: o, enableColumnReordering: s, columnResizeMinWidth: c, renderHeaderContent: l, onResizeColumn: u, onResetColumnWidth: d }) {
|
|
260
|
-
return /* @__PURE__ */
|
|
260
|
+
return /* @__PURE__ */ h(a, {
|
|
261
261
|
columnId: e.column.id,
|
|
262
262
|
dragDisabled: !s || i,
|
|
263
263
|
draggingClassName: K.headerCellDragging,
|
|
@@ -269,7 +269,7 @@ function q({ header: e, isPinnedLeft: t, left: n, isPinnedBoundary: r, isDragDis
|
|
|
269
269
|
onResize: u,
|
|
270
270
|
onReset: d
|
|
271
271
|
} : void 0,
|
|
272
|
-
children: ({ listeners: t, setActivatorElement: n }) => /* @__PURE__ */
|
|
272
|
+
children: ({ listeners: t, setActivatorElement: n }) => /* @__PURE__ */ h("div", {
|
|
273
273
|
ref: s && !i ? n : void 0,
|
|
274
274
|
className: m(K.headerCellContent, s && !i && K.headerCellDraggable),
|
|
275
275
|
...s && !i ? t ?? {} : {},
|
|
@@ -303,23 +303,23 @@ function Y(e, t, n) {
|
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
function de(e, t) {
|
|
306
|
-
return
|
|
306
|
+
return w({
|
|
307
307
|
ids: e.getAllLeafColumns().map((e) => e.id),
|
|
308
308
|
order: t.columnOrder
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
|
-
function X({ table: i, columnState: a, title: u, isLoading: f, isFetching: p, className:
|
|
312
|
-
let L = M(i, a), R = d(() => L.map((e) => e.column), [L]), z = d(() => L.map((e) => e.id), [L]), B = d(() => new Map(z.map((e, t) => [e, t])), [z]), V = d(() => new Set(z), [z]), H =
|
|
313
|
-
i.setColumnSizing((n) =>
|
|
311
|
+
function X({ table: i, columnState: a, title: u, isLoading: f, isFetching: p, className: _, minHeight: v = "15em", tableClassName: y, selectionMode: re = "none", scrollableRef: S, interactiveElementSelector: C, onActivateRow: w, isRowInteractive: T, getRowClassName: E, getCellClassName: D, getCellStyle: O, getCellLayout: k, renderCellContent: A, renderHeaderContextMenu: j, enableColumnResizing: N = !1, enableColumnReordering: P = !1, columnResizeMinWidth: F, afterTableContent: I }) {
|
|
312
|
+
let L = M(i, a), R = d(() => L.map((e) => e.column), [L]), z = d(() => L.map((e) => e.id), [L]), B = d(() => new Map(z.map((e, t) => [e, t])), [z]), V = d(() => new Set(z), [z]), H = ne({ activationDistance: 8 }), U = ue(i, B), W = le(i, a), G = R.filter((e) => e.getIsPinned() === "left").at(-1)?.id, J = d(() => a.columnPinning.left ?? [], [a.columnPinning.left]), X = d(() => new Set(J), [J]), Z = i.getRowModel(), Q = !!u, $ = Z.rows.length > 0, fe = l((e) => [...e].sort((e, t) => (B.get(e.column.id) ?? 2 ** 53 - 1) - (B.get(t.column.id) ?? 2 ** 53 - 1)), [B]), pe = l((e, t) => {
|
|
313
|
+
i.setColumnSizing((n) => ie(n, e, t, F));
|
|
314
314
|
}, [F, i]), me = l((e) => {
|
|
315
|
-
i.setColumnSizing((t) =>
|
|
315
|
+
i.setColumnSizing((t) => ae(t, e));
|
|
316
316
|
}, [i]), he = l((e) => {
|
|
317
317
|
let t = s({
|
|
318
318
|
event: e,
|
|
319
319
|
items: z
|
|
320
320
|
});
|
|
321
321
|
if (!t) return;
|
|
322
|
-
let n =
|
|
322
|
+
let n = oe({
|
|
323
323
|
order: de(i, a),
|
|
324
324
|
headerIds: z,
|
|
325
325
|
pinnedIds: J,
|
|
@@ -334,48 +334,48 @@ function X({ table: i, columnState: a, title: u, isLoading: f, isFetching: p, cl
|
|
|
334
334
|
z
|
|
335
335
|
]), ge = (e) => {
|
|
336
336
|
if (e.isPlaceholder) return null;
|
|
337
|
-
let t =
|
|
338
|
-
return n ? /* @__PURE__ */
|
|
337
|
+
let t = se(e.column.columnDef.header, e.getContext()), n = j?.(e);
|
|
338
|
+
return n ? /* @__PURE__ */ g(o, { children: [/* @__PURE__ */ h(o.Trigger, { children: /* @__PURE__ */ h("div", {
|
|
339
339
|
className: K.headerContextMenuTrigger,
|
|
340
340
|
tabIndex: 0,
|
|
341
341
|
children: t
|
|
342
|
-
}) }), /* @__PURE__ */
|
|
342
|
+
}) }), /* @__PURE__ */ h(o.Content, { children: n })] }) : t;
|
|
343
343
|
}, _e = (e, t) => {
|
|
344
|
-
!(
|
|
344
|
+
!(T?.(t) ?? !!w) || !w || x(e.target, C) || w(t);
|
|
345
345
|
}, ve = (e, t) => {
|
|
346
|
-
!(
|
|
346
|
+
!(T?.(t) ?? !!w) || !w || x(e.target, C) || ee(e, () => w(t));
|
|
347
347
|
};
|
|
348
|
-
return /* @__PURE__ */
|
|
348
|
+
return /* @__PURE__ */ g(e, {
|
|
349
349
|
templateRows: Q ? "auto 1fr" : "1fr",
|
|
350
|
-
className: m("overflowHidden w100 h100", K.root,
|
|
351
|
-
style: { minHeight:
|
|
352
|
-
children: [Q && /* @__PURE__ */
|
|
350
|
+
className: m("overflowHidden w100 h100", K.root, _),
|
|
351
|
+
style: { minHeight: v },
|
|
352
|
+
children: [Q && /* @__PURE__ */ h("h3", {
|
|
353
353
|
className: "marginBottomXs",
|
|
354
354
|
children: u
|
|
355
|
-
}), /* @__PURE__ */
|
|
355
|
+
}), /* @__PURE__ */ g("div", {
|
|
356
356
|
className: "surface0 overflowHidden relative w100 h100",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
358
|
-
ref:
|
|
357
|
+
children: [/* @__PURE__ */ h(t, {
|
|
358
|
+
ref: S,
|
|
359
359
|
className: "w100 h100",
|
|
360
|
-
children: /* @__PURE__ */
|
|
361
|
-
className: m(K.table,
|
|
360
|
+
children: /* @__PURE__ */ g(te, { children: [/* @__PURE__ */ g("table", {
|
|
361
|
+
className: m(K.table, y),
|
|
362
362
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ h("colgroup", { children: L.map((e) => /* @__PURE__ */ h("col", { style: e.width ? { width: e.width } : void 0 }, e.id)) }),
|
|
364
|
+
/* @__PURE__ */ h("thead", {
|
|
365
365
|
className: m("stickyTop", K.head),
|
|
366
|
-
children: P ? /* @__PURE__ */
|
|
366
|
+
children: P ? /* @__PURE__ */ h(c.Root, {
|
|
367
367
|
sensors: H,
|
|
368
368
|
modifiers: [ce],
|
|
369
369
|
onDragEnd: he,
|
|
370
|
-
children: /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ h(c.Container, {
|
|
371
371
|
containerId: "base-table-header",
|
|
372
372
|
items: z,
|
|
373
373
|
layout: "horizontal",
|
|
374
|
-
children: U.map((e, t) => /* @__PURE__ */
|
|
374
|
+
children: U.map((e, t) => /* @__PURE__ */ h("tr", {
|
|
375
375
|
className: K.headerRow,
|
|
376
376
|
children: e.map((e) => {
|
|
377
377
|
let { isPinnedLeft: t, left: n, isPinnedBoundary: r } = Y(e, W, G);
|
|
378
|
-
return /* @__PURE__ */
|
|
378
|
+
return /* @__PURE__ */ h(q, {
|
|
379
379
|
header: e,
|
|
380
380
|
isPinnedLeft: t,
|
|
381
381
|
left: n,
|
|
@@ -391,11 +391,11 @@ function X({ table: i, columnState: a, title: u, isLoading: f, isFetching: p, cl
|
|
|
391
391
|
})
|
|
392
392
|
}, `header-group-${t}`))
|
|
393
393
|
})
|
|
394
|
-
}) : U.map((e, t) => /* @__PURE__ */
|
|
394
|
+
}) : U.map((e, t) => /* @__PURE__ */ h("tr", {
|
|
395
395
|
className: K.headerRow,
|
|
396
396
|
children: e.map((e) => {
|
|
397
397
|
let { isPinnedLeft: t, left: n, isPinnedBoundary: r } = Y(e, W, G);
|
|
398
|
-
return /* @__PURE__ */
|
|
398
|
+
return /* @__PURE__ */ h(q, {
|
|
399
399
|
header: e,
|
|
400
400
|
isPinnedLeft: t,
|
|
401
401
|
left: n,
|
|
@@ -411,11 +411,11 @@ function X({ table: i, columnState: a, title: u, isLoading: f, isFetching: p, cl
|
|
|
411
411
|
})
|
|
412
412
|
}, `header-group-${t}`))
|
|
413
413
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
let t =
|
|
416
|
-
return /* @__PURE__ */
|
|
417
|
-
className: m(K.bodyRow, t && K.bodyRowInteractive, e.getIsSelected() && K.bodyRowSelected,
|
|
418
|
-
"aria-selected":
|
|
414
|
+
/* @__PURE__ */ g("tbody", { children: [Z.rows.map((e) => {
|
|
415
|
+
let t = T?.(e) ?? !!w;
|
|
416
|
+
return /* @__PURE__ */ h("tr", {
|
|
417
|
+
className: m(K.bodyRow, t && K.bodyRowInteractive, e.getIsSelected() && K.bodyRowSelected, E?.(e)),
|
|
418
|
+
"aria-selected": re === "none" ? void 0 : e.getIsSelected(),
|
|
419
419
|
tabIndex: t ? 0 : void 0,
|
|
420
420
|
onClick: (t) => _e(t, e),
|
|
421
421
|
onKeyDown: (t) => ve(t, e),
|
|
@@ -424,7 +424,7 @@ function X({ table: i, columnState: a, title: u, isLoading: f, isFetching: p, cl
|
|
|
424
424
|
...e.getCenterVisibleCells(),
|
|
425
425
|
...e.getRightVisibleCells()
|
|
426
426
|
]).map((t) => {
|
|
427
|
-
let n =
|
|
427
|
+
let n = b(t.column.columnDef), r = se(t.column.columnDef.cell, t.getContext()), i = {
|
|
428
428
|
row: e,
|
|
429
429
|
cell: t,
|
|
430
430
|
defaultContent: r,
|
|
@@ -432,32 +432,32 @@ function X({ table: i, columnState: a, title: u, isLoading: f, isFetching: p, cl
|
|
|
432
432
|
}, a = k?.(i), o = t.column.getIsPinned() === "left", s = t.column.id === G, c = {
|
|
433
433
|
...n?.align ? { textAlign: n.align } : {},
|
|
434
434
|
...o ? { left: W[t.column.id] ?? "0px" } : {},
|
|
435
|
-
...
|
|
435
|
+
...O?.(i) ?? {}
|
|
436
436
|
};
|
|
437
|
-
return /* @__PURE__ */
|
|
438
|
-
className: m(K.bodyCell, o && K.bodyCellPinnedLeft, s && K.pinnedLeftBoundary, a?.mergeWithNext && K.bodyCellMergedWithNext,
|
|
437
|
+
return /* @__PURE__ */ h("td", {
|
|
438
|
+
className: m(K.bodyCell, o && K.bodyCellPinnedLeft, s && K.pinnedLeftBoundary, a?.mergeWithNext && K.bodyCellMergedWithNext, D?.(i)),
|
|
439
439
|
style: c,
|
|
440
440
|
children: a?.hideContent ? null : A ? A(i) : r
|
|
441
441
|
}, t.id);
|
|
442
442
|
})
|
|
443
443
|
}, e.id);
|
|
444
|
-
}), p && $ && /* @__PURE__ */
|
|
444
|
+
}), p && $ && /* @__PURE__ */ h("tr", {
|
|
445
445
|
className: K.fetchingRow,
|
|
446
|
-
children: /* @__PURE__ */
|
|
446
|
+
children: /* @__PURE__ */ h("td", {
|
|
447
447
|
colSpan: Math.max(R.length, 1),
|
|
448
448
|
className: K.feedbackCell,
|
|
449
|
-
children: /* @__PURE__ */
|
|
449
|
+
children: /* @__PURE__ */ h(r, {})
|
|
450
450
|
})
|
|
451
451
|
})] })
|
|
452
452
|
]
|
|
453
453
|
}), I] })
|
|
454
|
-
}), /* @__PURE__ */
|
|
454
|
+
}), /* @__PURE__ */ g("div", {
|
|
455
455
|
className: "absolute inset0 border radiusSm",
|
|
456
456
|
style: {
|
|
457
457
|
pointerEvents: "none",
|
|
458
458
|
zIndex: 20
|
|
459
459
|
},
|
|
460
|
-
children: [!f && !p && !$ && /* @__PURE__ */
|
|
460
|
+
children: [!f && !p && !$ && /* @__PURE__ */ h(n, { className: K.noData }), f && !$ && /* @__PURE__ */ h(r, { className: "h100 w100" })]
|
|
461
461
|
})]
|
|
462
462
|
})]
|
|
463
463
|
});
|
|
@@ -470,7 +470,7 @@ var Z = {
|
|
|
470
470
|
//#endregion
|
|
471
471
|
//#region src/base-table/ui/FormattedTableCell.tsx
|
|
472
472
|
function Q({ displayValue: e, align: t = "left" }) {
|
|
473
|
-
let n = f(null), r = e.showValue, a = e.showIcon ? e.icon : void 0, o = r && e.value != null ? String(e.value) : "", s =
|
|
473
|
+
let n = f(null), r = e.showValue, a = e.showIcon ? e.icon : void 0, o = r && e.value != null ? String(e.value) : "", s = v(e.state), c = t === "right" ? "flex-end" : t === "center" ? "center" : "flex-start", l = t === "center" ? "center" : t === "right" ? "right" : "left";
|
|
474
474
|
return u(() => {
|
|
475
475
|
let t = n.current;
|
|
476
476
|
if (!t) return;
|
|
@@ -490,20 +490,20 @@ function Q({ displayValue: e, align: t = "left" }) {
|
|
|
490
490
|
return i.observe(t), () => {
|
|
491
491
|
i.disconnect();
|
|
492
492
|
};
|
|
493
|
-
}, [e.overflowTooltip, o]), /* @__PURE__ */
|
|
493
|
+
}, [e.overflowTooltip, o]), /* @__PURE__ */ h("div", {
|
|
494
494
|
className: m(Z.formattedCell, s),
|
|
495
|
-
children: /* @__PURE__ */
|
|
495
|
+
children: /* @__PURE__ */ g("div", {
|
|
496
496
|
className: Z.formattedCellInner,
|
|
497
497
|
style: { justifyContent: c },
|
|
498
498
|
children: [
|
|
499
|
-
e.iconPosition === "left" ? /* @__PURE__ */
|
|
500
|
-
r ? /* @__PURE__ */
|
|
499
|
+
e.iconPosition === "left" ? /* @__PURE__ */ h(i, { state: a }) : null,
|
|
500
|
+
r ? /* @__PURE__ */ h("span", {
|
|
501
501
|
ref: n,
|
|
502
502
|
className: m("textOverflow", Z.formattedCellValue),
|
|
503
503
|
style: { textAlign: l },
|
|
504
504
|
children: o
|
|
505
505
|
}) : null,
|
|
506
|
-
e.iconPosition === "right" ? /* @__PURE__ */
|
|
506
|
+
e.iconPosition === "right" ? /* @__PURE__ */ h(i, { state: a }) : null
|
|
507
507
|
]
|
|
508
508
|
})
|
|
509
509
|
});
|
|
@@ -511,4 +511,4 @@ function Q({ displayValue: e, align: t = "left" }) {
|
|
|
511
511
|
//#endregion
|
|
512
512
|
export { U as a, L as c, R as d, M as f, A as g, k as h, W as i, F as l, j as m, X as n, H as o, le as p, G as r, V as s, Q as t, P as u };
|
|
513
513
|
|
|
514
|
-
//# sourceMappingURL=base-table-
|
|
514
|
+
//# sourceMappingURL=base-table-Dv9i3CAT.js.map
|