@databrainhq/plugin 0.17.9-beta.87 → 0.17.9-beta.88
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/{Accordion-BchG2sqH.mjs → Accordion-KS0wm76w.mjs} +1 -1
- package/dist/{CardChartSlot-BJI1-6Fi.mjs → CardChartSlot-f36Se2zp.mjs} +1037 -1136
- package/dist/{Chart-BPRIOdLy.mjs → Chart-Rc4bVXrP.mjs} +7 -7
- package/dist/{ChartTypePanel-C2dzGV9H.mjs → ChartTypePanel-DRtj1nYv.mjs} +8 -8
- package/dist/{CreateGlobalFilter-BW71NQ4I.mjs → CreateGlobalFilter-De08sbdM.mjs} +2 -2
- package/dist/{CreateMetricV2-zuJNx7dP.mjs → CreateMetricV2-JfzDCkrS.mjs} +114 -114
- package/dist/{HorizontalStackTable-KXmRc_vp.mjs → HorizontalStackTable-H35irNPp.mjs} +3 -3
- package/dist/{ManageMetricsV2-BFMvfYql.mjs → ManageMetricsV2-CW_ECoXq.mjs} +3 -3
- package/dist/{MetricCardV2-D3x8ndnd.mjs → MetricCardV2-Cc4BRMDI.mjs} +9 -9
- package/dist/{NoDataFound-CLh9t6Js.mjs → NoDataFound-ChRnPe__.mjs} +1 -1
- package/dist/{Panel-Boz3oznI.mjs → Panel-CPSFzQky.mjs} +1 -1
- package/dist/{PivotTableV2-Mv7SFrij.mjs → PivotTableV2-Dmju8J9j.mjs} +2 -2
- package/dist/{PivotTableV3-CKhiTUTm.mjs → PivotTableV3-BqxRB0lY.mjs} +4 -4
- package/dist/{Portal-BMZrD27q.mjs → Portal-CxaQIVhn.mjs} +16 -9
- package/dist/{RadioButton-BBuNPcbg.mjs → RadioButton-CEWeXTaM.mjs} +1 -1
- package/dist/{ScheduleEmail-BRQ_GGMS.mjs → ScheduleEmail-BUOR5Ndf.mjs} +6 -6
- package/dist/{SearchMetricData-Bp7RKjl3.mjs → SearchMetricData-QMT2fQYp.mjs} +13 -13
- package/dist/{SortPanel-DtAP__1J.mjs → SortPanel-g3-c65fe.mjs} +8 -8
- package/dist/{Table-Crhhoyf_.mjs → Table-Ug97LMpx.mjs} +508 -507
- package/dist/{TagInputField-SMeh_vdJ.mjs → TagInputField-dF1i5J37.mjs} +4 -4
- package/dist/{TextAreaField-osj4rqjy.mjs → TextAreaField-BGzFYxSp.mjs} +2 -2
- package/dist/{TimeSeriesSettings-B1vlydJ7.mjs → TimeSeriesSettings-C_aQh55Q.mjs} +2 -2
- package/dist/{clickActions-CYOdHxbd.mjs → clickActions-CXvfV7tl.mjs} +20 -20
- package/dist/{conditionalFormatting-9rsy1Jg2.mjs → conditionalFormatting-Di6YiWwV.mjs} +1 -1
- package/dist/{createGlobalFilter.module-5pE0s-Qa.mjs → createGlobalFilter.module-D0_y_Apc.mjs} +1 -1
- package/dist/{crossPointer-Ct4DXJEx.mjs → crossPointer-C8z2bN7w.mjs} +3 -3
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/{metric.mutation-ZNTU8Fds.mjs → metric.mutation-7Ng2k216.mjs} +1 -1
- package/dist/{pluginV3Request-B0e7_2OA.mjs → pluginV3Request-CobM2ThT.mjs} +1 -1
- package/dist/{renderer-CqawuMjq.mjs → renderer-BCjoR_9v.mjs} +1 -1
- package/dist/{timeseries-D7495x32.mjs → timeseries-DI-9AaNe.mjs} +1 -1
- package/dist/{useGuesTokenUsageLog-zvPUY22Q.mjs → useGuesTokenUsageLog-D2Uirt1W.mjs} +1 -1
- package/dist/{useLoadingDeadline-BZ90HIjy.mjs → useLoadingDeadline-CUtZ9eIH.mjs} +569 -458
- package/dist/{usePublishArchivedMetrics-CnxDtwAz.mjs → usePublishArchivedMetrics-DpS4nzrY.mjs} +2 -2
- package/dist/{useQuery-BCy3fWon.mjs → useQuery-BEqCyDgw.mjs} +1 -1
- package/dist/webcomponents-styles.es.js +1 -1
- package/dist/webcomponents.es.js +1592 -1578
- package/dist/webcomponents.umd.js +28 -28
- package/package.json +1 -1
|
@@ -2,20 +2,20 @@ import e, { useEffect as t, useMemo as n, useRef as r, useState as i } from "rea
|
|
|
2
2
|
import "react-dom";
|
|
3
3
|
import "react-dom/client";
|
|
4
4
|
import { r as a } from "./rolldown-runtime-zXSK1Ut9.mjs";
|
|
5
|
-
import { Ct as o, Di as s, L as c, On as l, Q as ee, Qr as u, Sr as d, St as te, X as ne, Z as re, a as f, cr as
|
|
6
|
-
import { m as
|
|
7
|
-
import { B as
|
|
8
|
-
import { n as
|
|
9
|
-
import { i as
|
|
10
|
-
import { t as
|
|
11
|
-
import { n as
|
|
12
|
-
import { a as
|
|
13
|
-
import { n as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { Fragment as
|
|
5
|
+
import { Ct as o, Di as s, L as c, On as l, Q as ee, Qr as u, Sr as d, St as te, X as ne, Z as re, a as f, cr as p, k as m, kn as ie, oo as h, po as g, qi as _ } from "./Portal-CxaQIVhn.mjs";
|
|
6
|
+
import { m as ae, o as v, p as oe } from "./timeseries-DI-9AaNe.mjs";
|
|
7
|
+
import { B as se, I as ce } from "./format-q49rlYCT.mjs";
|
|
8
|
+
import { n as y } from "./arrayToCsvString-CRmqd5Fp.mjs";
|
|
9
|
+
import { i as le, n as b } from "./transformData-CO9XMhAy.mjs";
|
|
10
|
+
import { t as x } from "./NoDataFound-ChRnPe__.mjs";
|
|
11
|
+
import { n as ue, r as S, t as de } from "./virtualRowScroll-D65ht4Df.mjs";
|
|
12
|
+
import { a as fe, i as C, n as pe, o as me, r as he, s as ge, t as _e } from "./dist-AOZRb92r.mjs";
|
|
13
|
+
import { n as ve, r as ye } from "./cardActions-KAyfWH7u.mjs";
|
|
14
|
+
import { t as be } from "./conditionalFormatting-Di6YiWwV.mjs";
|
|
15
|
+
import { t as xe } from "./tableAriaRowModel-CVEaIc2a.mjs";
|
|
16
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
17
17
|
// src/utils/embedStorage.ts
|
|
18
|
-
var
|
|
18
|
+
var D = "dbn:", Se = `${D}metric.fullscreen.settings`, O = `${D}embed.disableClick`, Ce = "isDisableClick", we = (e, t) => {
|
|
19
19
|
try {
|
|
20
20
|
let n = window.localStorage.getItem(e);
|
|
21
21
|
return n === null ? t ? window.localStorage.getItem(t) : null : n;
|
|
@@ -27,7 +27,7 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
27
27
|
window.localStorage.setItem(e, t);
|
|
28
28
|
} catch {}
|
|
29
29
|
}, k = (e) => {
|
|
30
|
-
let t = we(
|
|
30
|
+
let t = we(Se);
|
|
31
31
|
if (!t) return null;
|
|
32
32
|
let n;
|
|
33
33
|
try {
|
|
@@ -37,90 +37,90 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
37
37
|
}
|
|
38
38
|
return !n || typeof n != "object" || !n.metricId || n.metricId !== e ? null : n;
|
|
39
39
|
}, Ee = (e) => {
|
|
40
|
-
Te(
|
|
40
|
+
Te(Se, JSON.stringify(e));
|
|
41
41
|
}, A = () => !!we(O, Ce), De = (e) => {
|
|
42
42
|
let t = 10;
|
|
43
43
|
if (!e?.current) return "";
|
|
44
44
|
let n = e.current.clientHeight, r = e.current.querySelector("[data-testid=\"table-header-row\"]"), i = r ? r.offsetHeight : 0, a = e.current.querySelector("[data-testid^=\"table-row-\"]"), o = a ? a.offsetHeight : 41, s = n - i;
|
|
45
45
|
return s > 0 && o > 0 && (t = Math.floor(s / o)), t.toString() ?? "";
|
|
46
46
|
}, j = {
|
|
47
|
-
"table-loader-container": "_table-loader-
|
|
48
|
-
tableData: "
|
|
49
|
-
noBorder: "
|
|
50
|
-
tableScroll: "
|
|
51
|
-
tableHeadCol: "
|
|
52
|
-
title: "
|
|
53
|
-
resizer: "
|
|
54
|
-
resizing: "
|
|
55
|
-
tableRowCol: "
|
|
56
|
-
horizontalPadding: "
|
|
57
|
-
tableBorderRight: "
|
|
58
|
-
wrapCellText: "
|
|
59
|
-
tableBorderBottom: "
|
|
60
|
-
truncateText: "
|
|
61
|
-
wrapText: "
|
|
62
|
-
row: "
|
|
63
|
-
foot: "
|
|
64
|
-
container: "
|
|
65
|
-
table: "
|
|
66
|
-
previewTable: "
|
|
67
|
-
preview: "
|
|
68
|
-
searchButton: "
|
|
69
|
-
previewText: "
|
|
70
|
-
noData: "
|
|
71
|
-
error: "
|
|
72
|
-
errorMsg: "
|
|
73
|
-
tableIcon: "
|
|
74
|
-
stripedRow: "
|
|
75
|
-
rowHover: "
|
|
76
|
-
columnDrag: "
|
|
77
|
-
searchContainer: "
|
|
78
|
-
sortButton: "
|
|
79
|
-
searchTab: "
|
|
80
|
-
searchTabInput: "
|
|
81
|
-
errContainer: "
|
|
82
|
-
searchTabIcon: "
|
|
83
|
-
noDataHead: "
|
|
84
|
-
noDataBody: "
|
|
85
|
-
showSort: "
|
|
86
|
-
sortIcon: "
|
|
87
|
-
noSort: "
|
|
88
|
-
pagination: "
|
|
89
|
-
rowStyle: "
|
|
90
|
-
rowText: "
|
|
91
|
-
rowsDropdown: "
|
|
92
|
-
pageStyle: "
|
|
93
|
-
buttonContainer: "
|
|
94
|
-
pageBtns: "
|
|
95
|
-
pageInfo: "
|
|
96
|
-
button: "
|
|
97
|
-
fullScreenBtn: "
|
|
98
|
-
btnHover: "
|
|
99
|
-
paginationWrapper: "
|
|
100
|
-
current: "
|
|
101
|
-
textTruncate: "
|
|
102
|
-
badge: "
|
|
103
|
-
list: "
|
|
104
|
-
badgeDiv: "
|
|
105
|
-
listItem: "
|
|
106
|
-
listItemDiv: "
|
|
107
|
-
truncateIcon: "
|
|
108
|
-
loadMore: "
|
|
109
|
-
loadMoreIcon: "
|
|
110
|
-
listVal: "
|
|
111
|
-
isFullScreenEnabled: "
|
|
112
|
-
"container-primary": "_container-
|
|
113
|
-
viewTable: "
|
|
114
|
-
body: "
|
|
115
|
-
"headers-primary": "_headers-
|
|
116
|
-
headerCol: "
|
|
117
|
-
"row-view-primary": "_row-view-
|
|
118
|
-
colView: "
|
|
119
|
-
"col-view-primary-cell": "_col-view-primary-
|
|
120
|
-
link: "
|
|
121
|
-
customLink: "
|
|
122
|
-
emptyFilterData: "
|
|
123
|
-
textLineBreak: "
|
|
47
|
+
"table-loader-container": "_table-loader-container_i2ldy_8",
|
|
48
|
+
tableData: "_tableData_i2ldy_11",
|
|
49
|
+
noBorder: "_noBorder_i2ldy_18",
|
|
50
|
+
tableScroll: "_tableScroll_i2ldy_21",
|
|
51
|
+
tableHeadCol: "_tableHeadCol_i2ldy_24",
|
|
52
|
+
title: "_title_i2ldy_27",
|
|
53
|
+
resizer: "_resizer_i2ldy_32",
|
|
54
|
+
resizing: "_resizing_i2ldy_35",
|
|
55
|
+
tableRowCol: "_tableRowCol_i2ldy_38",
|
|
56
|
+
horizontalPadding: "_horizontalPadding_i2ldy_41",
|
|
57
|
+
tableBorderRight: "_tableBorderRight_i2ldy_47",
|
|
58
|
+
wrapCellText: "_wrapCellText_i2ldy_54",
|
|
59
|
+
tableBorderBottom: "_tableBorderBottom_i2ldy_61",
|
|
60
|
+
truncateText: "_truncateText_i2ldy_64",
|
|
61
|
+
wrapText: "_wrapText_i2ldy_68",
|
|
62
|
+
row: "_row_i2ldy_72",
|
|
63
|
+
foot: "_foot_i2ldy_75",
|
|
64
|
+
container: "_container_i2ldy_80",
|
|
65
|
+
table: "_table_i2ldy_8",
|
|
66
|
+
previewTable: "_previewTable_i2ldy_87",
|
|
67
|
+
preview: "_preview_i2ldy_87",
|
|
68
|
+
searchButton: "_searchButton_i2ldy_93",
|
|
69
|
+
previewText: "_previewText_i2ldy_96",
|
|
70
|
+
noData: "_noData_i2ldy_99",
|
|
71
|
+
error: "_error_i2ldy_102",
|
|
72
|
+
errorMsg: "_errorMsg_i2ldy_105",
|
|
73
|
+
tableIcon: "_tableIcon_i2ldy_108",
|
|
74
|
+
stripedRow: "_stripedRow_i2ldy_111",
|
|
75
|
+
rowHover: "_rowHover_i2ldy_115",
|
|
76
|
+
columnDrag: "_columnDrag_i2ldy_121",
|
|
77
|
+
searchContainer: "_searchContainer_i2ldy_124",
|
|
78
|
+
sortButton: "_sortButton_i2ldy_127",
|
|
79
|
+
searchTab: "_searchTab_i2ldy_130",
|
|
80
|
+
searchTabInput: "_searchTabInput_i2ldy_133",
|
|
81
|
+
errContainer: "_errContainer_i2ldy_136",
|
|
82
|
+
searchTabIcon: "_searchTabIcon_i2ldy_139",
|
|
83
|
+
noDataHead: "_noDataHead_i2ldy_142",
|
|
84
|
+
noDataBody: "_noDataBody_i2ldy_145",
|
|
85
|
+
showSort: "_showSort_i2ldy_148",
|
|
86
|
+
sortIcon: "_sortIcon_i2ldy_151",
|
|
87
|
+
noSort: "_noSort_i2ldy_154",
|
|
88
|
+
pagination: "_pagination_i2ldy_157",
|
|
89
|
+
rowStyle: "_rowStyle_i2ldy_165",
|
|
90
|
+
rowText: "_rowText_i2ldy_168",
|
|
91
|
+
rowsDropdown: "_rowsDropdown_i2ldy_171",
|
|
92
|
+
pageStyle: "_pageStyle_i2ldy_174",
|
|
93
|
+
buttonContainer: "_buttonContainer_i2ldy_177",
|
|
94
|
+
pageBtns: "_pageBtns_i2ldy_180",
|
|
95
|
+
pageInfo: "_pageInfo_i2ldy_183",
|
|
96
|
+
button: "_button_i2ldy_177",
|
|
97
|
+
fullScreenBtn: "_fullScreenBtn_i2ldy_191",
|
|
98
|
+
btnHover: "_btnHover_i2ldy_195",
|
|
99
|
+
paginationWrapper: "_paginationWrapper_i2ldy_222",
|
|
100
|
+
current: "_current_i2ldy_225",
|
|
101
|
+
textTruncate: "_textTruncate_i2ldy_228",
|
|
102
|
+
badge: "_badge_i2ldy_231",
|
|
103
|
+
list: "_list_i2ldy_234",
|
|
104
|
+
badgeDiv: "_badgeDiv_i2ldy_237",
|
|
105
|
+
listItem: "_listItem_i2ldy_240",
|
|
106
|
+
listItemDiv: "_listItemDiv_i2ldy_243",
|
|
107
|
+
truncateIcon: "_truncateIcon_i2ldy_246",
|
|
108
|
+
loadMore: "_loadMore_i2ldy_249",
|
|
109
|
+
loadMoreIcon: "_loadMoreIcon_i2ldy_252",
|
|
110
|
+
listVal: "_listVal_i2ldy_255",
|
|
111
|
+
isFullScreenEnabled: "_isFullScreenEnabled_i2ldy_259",
|
|
112
|
+
"container-primary": "_container-primary_i2ldy_265",
|
|
113
|
+
viewTable: "_viewTable_i2ldy_268",
|
|
114
|
+
body: "_body_i2ldy_271",
|
|
115
|
+
"headers-primary": "_headers-primary_i2ldy_274",
|
|
116
|
+
headerCol: "_headerCol_i2ldy_278",
|
|
117
|
+
"row-view-primary": "_row-view-primary_i2ldy_281",
|
|
118
|
+
colView: "_colView_i2ldy_288",
|
|
119
|
+
"col-view-primary-cell": "_col-view-primary-cell_i2ldy_292",
|
|
120
|
+
link: "_link_i2ldy_296",
|
|
121
|
+
customLink: "_customLink_i2ldy_300",
|
|
122
|
+
emptyFilterData: "_emptyFilterData_i2ldy_304",
|
|
123
|
+
textLineBreak: "_textLineBreak_i2ldy_308"
|
|
124
124
|
}, M = e.memo(({ value: e, onChange: n, debounce: r = 500, isDisabled: a, errorMsg: o, ...s }) => {
|
|
125
125
|
let [c, l] = i(e), [ee, u] = i(!0);
|
|
126
126
|
return t(() => {
|
|
@@ -131,15 +131,15 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
131
131
|
n(c);
|
|
132
132
|
}, r);
|
|
133
133
|
return () => clearTimeout(t);
|
|
134
|
-
}, [r, c]), /* @__PURE__ */
|
|
134
|
+
}, [r, c]), /* @__PURE__ */ E("div", {
|
|
135
135
|
className: `${j.searchTab} ${s.className || ""} ${o ? j.errContainer : ""}`,
|
|
136
136
|
style: s.style,
|
|
137
137
|
"aria-disabled": !!a,
|
|
138
|
-
children: [!c && ee ? /* @__PURE__ */
|
|
138
|
+
children: [!c && ee ? /* @__PURE__ */ T(d, {
|
|
139
139
|
name: "magnifying-glass",
|
|
140
140
|
color: "gray",
|
|
141
141
|
size: "xs"
|
|
142
|
-
}) : null, /* @__PURE__ */
|
|
142
|
+
}) : null, /* @__PURE__ */ T("input", {
|
|
143
143
|
...s,
|
|
144
144
|
value: c,
|
|
145
145
|
onChange: (e) => l(e.target.value),
|
|
@@ -163,7 +163,7 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
163
163
|
a,
|
|
164
164
|
l,
|
|
165
165
|
n?.id
|
|
166
|
-
]), o ? /* @__PURE__ */
|
|
166
|
+
]), o ? /* @__PURE__ */ T(m, {
|
|
167
167
|
options: c?.map((e) => ({
|
|
168
168
|
value: e,
|
|
169
169
|
label: e
|
|
@@ -178,9 +178,9 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
178
178
|
menuWidth: "100%",
|
|
179
179
|
isClearEnabled: !0,
|
|
180
180
|
isSelectAllEnabled: !0
|
|
181
|
-
}) : typeof s == "number" ? /* @__PURE__ */
|
|
181
|
+
}) : typeof s == "number" ? /* @__PURE__ */ E("div", {
|
|
182
182
|
className: "dbn:w-full dbn:flex dbn:gap-2 dbn:items-center",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ T(M, {
|
|
184
184
|
type: "number",
|
|
185
185
|
min: Number(n?.getFacetedMinMaxValues()?.[0] ?? ""),
|
|
186
186
|
max: Number(n?.getFacetedMinMaxValues()?.[1] ?? ""),
|
|
@@ -193,7 +193,7 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
193
193
|
},
|
|
194
194
|
placeholder: "Min",
|
|
195
195
|
className: "dbn:w-24 dbn:border dbn:shadow dbn:rounded"
|
|
196
|
-
}), /* @__PURE__ */
|
|
196
|
+
}), /* @__PURE__ */ T(M, {
|
|
197
197
|
type: "number",
|
|
198
198
|
min: Number(n?.getFacetedMinMaxValues()?.[0] ?? ""),
|
|
199
199
|
max: Number(n?.getFacetedMinMaxValues()?.[1] ?? ""),
|
|
@@ -207,7 +207,7 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
207
207
|
placeholder: "Max",
|
|
208
208
|
className: "dbn:w-24 dbn:border dbn:shadow dbn:rounded"
|
|
209
209
|
})]
|
|
210
|
-
}) : /* @__PURE__ */
|
|
210
|
+
}) : /* @__PURE__ */ T(M, {
|
|
211
211
|
type: "text",
|
|
212
212
|
value: l ?? "",
|
|
213
213
|
onChange: (e) => {
|
|
@@ -223,43 +223,43 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
223
223
|
let t = n(() => [{
|
|
224
224
|
name: "Column",
|
|
225
225
|
columnKey: "column",
|
|
226
|
-
columnCell: (e) => /* @__PURE__ */
|
|
226
|
+
columnCell: (e) => /* @__PURE__ */ T("div", {
|
|
227
227
|
className: "dbn:w-full dbn:flex dbn:justify-between dbn:items-center",
|
|
228
228
|
children: e?.column
|
|
229
229
|
})
|
|
230
230
|
}, {
|
|
231
231
|
name: "Value",
|
|
232
232
|
columnKey: "value",
|
|
233
|
-
columnCell: (e) => /* @__PURE__ */
|
|
233
|
+
columnCell: (e) => /* @__PURE__ */ T("div", {
|
|
234
234
|
className: "dbn:w-full dbn:flex dbn:justify-between dbn:items-center",
|
|
235
235
|
children: e?.value?.toString()
|
|
236
236
|
})
|
|
237
237
|
}], [e]);
|
|
238
|
-
return /* @__PURE__ */
|
|
238
|
+
return /* @__PURE__ */ T("div", {
|
|
239
239
|
className: j["container-primary"],
|
|
240
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ E("table", {
|
|
241
241
|
className: j.viewTable,
|
|
242
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ T("thead", {
|
|
243
243
|
className: `${j["headers-primary"]} dbn:z-50`,
|
|
244
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ T("tr", { children: t?.map((e) => /* @__PURE__ */ T("th", {
|
|
245
245
|
className: j.headerCol,
|
|
246
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ T(g, {
|
|
247
247
|
variant: "sec-heading-6",
|
|
248
248
|
color: "gray",
|
|
249
249
|
children: e.name
|
|
250
250
|
})
|
|
251
251
|
}, e.name)) })
|
|
252
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ T("tbody", {
|
|
253
253
|
className: j.body,
|
|
254
|
-
children: e?.map((e, n) => /* @__PURE__ */
|
|
254
|
+
children: e?.map((e, n) => /* @__PURE__ */ T("tr", {
|
|
255
255
|
"data-testid": `row-${e?.name ?? e?.metric?.name ?? e?.companyRole?.name ?? e?.email?.split("@")?.[0]}`,
|
|
256
256
|
className: j["row-view-primary"],
|
|
257
257
|
"data-test-title": "table-rows",
|
|
258
|
-
children: t?.map((t, n) => /* @__PURE__ */
|
|
258
|
+
children: t?.map((t, n) => /* @__PURE__ */ T("td", {
|
|
259
259
|
className: j.colView,
|
|
260
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ T("div", {
|
|
261
261
|
className: j["col-view-primary-cell"],
|
|
262
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ T("div", {
|
|
263
263
|
className: "dbn:w-full dbn:flex dbn:items-center dbn:justify-between",
|
|
264
264
|
children: t.columnCell(e) ?? (e[t.columnKey] || "-")
|
|
265
265
|
})
|
|
@@ -276,8 +276,8 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
276
276
|
}, je = /* @__PURE__ */ a({
|
|
277
277
|
Table: () => ze,
|
|
278
278
|
getVisibleTableRows: () => Fe
|
|
279
|
-
}), Me =
|
|
280
|
-
let i =
|
|
279
|
+
}), Me = C(), Ne = (e, t, n, r) => {
|
|
280
|
+
let i = S(e.getValue(t), n);
|
|
281
281
|
return r({ itemRank: i }), i.passed;
|
|
282
282
|
}, Pe = (e, t, n) => {
|
|
283
283
|
let r = e.getValue(t);
|
|
@@ -293,39 +293,39 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
293
293
|
}, Le = (e) => {
|
|
294
294
|
let t = !e?.textWrap?.isEnable && e?.lineGap ? Ie[e.lineGap] : void 0;
|
|
295
295
|
return t ? { "--dbn-runtime-table-row-h": t } : void 0;
|
|
296
|
-
}, Re = (e) => e?.textWrap?.isEnable ? 48 : e?.lineGap === "small" ? 36 : e?.lineGap === "large" ? 44 : 40, ze = ({ data: e, allTableRows: a, isLoading:
|
|
296
|
+
}, Re = (e) => e?.textWrap?.isEnable ? 48 : e?.lineGap === "small" ? 36 : e?.lineGap === "large" ? 44 : 40, ze = ({ data: e, allTableRows: a, isLoading: S, error: C, tableSettings: D, chartFieldFormats: Se, tableName: O, className: Ce = "", onColumnSizingChange: we, onChartReady: Te, onChangePage: k, isExternalChart: A, isFullScreenChart: je, isEnableNextBtn: Ie, isEnablePrevBtn: ze, dateColumns: Be, paginationInfo: N = {
|
|
297
297
|
limit: 100,
|
|
298
298
|
offset: 0,
|
|
299
299
|
totalRecords: 10
|
|
300
|
-
}, setChartSettings: Ve, externalGlobalFilter: P, setExternalGlobalFilter: He, isInfiniteScroll: Ue, onLoadMore: We, hasMoreData: Ge, isShowFullScreen: Ke, isShowFullScreenEnabled: qe = !1, metricId: Je, onMaximize: Ye, headerAlignment: Xe = "center", events: Ze, dropdownZindex: Qe, comboFormatter: $e, language: et, translationDictionary: tt,
|
|
301
|
-
let
|
|
302
|
-
let n =
|
|
300
|
+
}, setChartSettings: Ve, externalGlobalFilter: P, setExternalGlobalFilter: He, isInfiniteScroll: Ue, onLoadMore: We, hasMoreData: Ge, isShowFullScreen: Ke, isShowFullScreenEnabled: qe = !1, metricId: Je, onMaximize: Ye, headerAlignment: Xe = "center", events: Ze, dropdownZindex: Qe, comboFormatter: $e, language: et, translationDictionary: tt, columnHeaderLabels: nt, isMetricCard: rt, isDisableChartActions: it, isDownloading: at, setDownloading: ot, onDownloadData: st, isDownloadingWithFilters: ct, setDownloadingWithFilters: lt, isQueryResultContainer: ut, tableColumnFilters: dt, onChangePaginationColumnFilters: ft, yAxisList: pt, isUnderlyingDataTable: mt, isExploreData: ht }) => {
|
|
301
|
+
let gt = { chartFieldFormats: Se }, F = (e) => !!(se(gt, e) ?? Se?.["*"]), _t = (e, t) => {
|
|
302
|
+
let n = ce(e, t, gt);
|
|
303
303
|
return typeof n == "object" && n ? JSON.stringify(n) : n;
|
|
304
|
-
}, [I,
|
|
304
|
+
}, [I, vt] = i([]), [L, yt] = i([]), [bt, xt] = i(""), [St, Ct] = i({
|
|
305
305
|
isShow: !1,
|
|
306
306
|
data: []
|
|
307
|
-
}), [
|
|
307
|
+
}), [wt, Tt] = i(null), [Et, Dt] = i([]), [Ot, kt] = i(","), [At, jt] = i(","), Mt = (e) => {
|
|
308
308
|
let t = {};
|
|
309
309
|
return Object.keys(e).sort().forEach((n) => {
|
|
310
310
|
t[n] = e[n];
|
|
311
311
|
}), t;
|
|
312
|
-
}, R = n(() =>
|
|
312
|
+
}, R = n(() => D?.isSortAlphabetically ? e?.map((e) => Mt(e)) : e, [e, D?.isSortAlphabetically]);
|
|
313
313
|
t(() => {
|
|
314
|
-
|
|
315
|
-
}, [
|
|
316
|
-
|
|
317
|
-
}, [
|
|
318
|
-
let { badgeDivStyle:
|
|
314
|
+
D?.badgeSeparator ? kt(D.badgeSeparator) : kt(",");
|
|
315
|
+
}, [D?.badgeSeparator]), t(() => {
|
|
316
|
+
D?.listSeparator ? jt(D.listSeparator) : jt(",");
|
|
317
|
+
}, [D?.listSeparator]);
|
|
318
|
+
let { badgeDivStyle: Nt, listDivStyle: Pt, headerStyle: Ft } = n(() => {
|
|
319
319
|
let e = "2.5rem";
|
|
320
|
-
return
|
|
320
|
+
return D?.textWrap?.isEnable ? e = "auto" : D?.lineGap === "small" ? e = "36px" : D?.lineGap === "medium" ? e = "40px" : D?.lineGap === "large" && (e = "44px"), {
|
|
321
321
|
badgeDivStyle: {
|
|
322
322
|
width: "100%",
|
|
323
323
|
height: e,
|
|
324
|
-
minHeight:
|
|
324
|
+
minHeight: D?.textWrap?.isEnable ? "2.5rem" : "auto",
|
|
325
325
|
fontSize: "0.875rem",
|
|
326
326
|
display: "flex",
|
|
327
327
|
alignItems: "center",
|
|
328
|
-
justifyContent:
|
|
328
|
+
justifyContent: D?.contentAlignment ? `${D.contentAlignment}` : "",
|
|
329
329
|
gap: 1
|
|
330
330
|
},
|
|
331
331
|
listDivStyle: {
|
|
@@ -341,44 +341,44 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
341
341
|
headerStyle: {
|
|
342
342
|
width: "100%",
|
|
343
343
|
color: "#6B7280",
|
|
344
|
-
fontSize:
|
|
344
|
+
fontSize: D?.headerFontSize ? `${D?.headerFontSize}px` : "0.75rem",
|
|
345
345
|
fontSizeValue: "0.75rem",
|
|
346
346
|
height: "auto",
|
|
347
|
-
textAlign:
|
|
348
|
-
fontWeight:
|
|
347
|
+
textAlign: D?.headerAlignment || Xe,
|
|
348
|
+
fontWeight: D?.headerFontBold ? "700" : "500"
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
351
|
}, [
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
D?.lineGap,
|
|
353
|
+
D?.contentAlignment,
|
|
354
|
+
D?.headerFontBold,
|
|
355
|
+
D?.headerFontSize,
|
|
356
356
|
Xe,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
]),
|
|
357
|
+
D?.headerAlignment,
|
|
358
|
+
D?.textWrap?.isEnable
|
|
359
|
+
]), It = (e, t, n) => {
|
|
360
360
|
if (t && n && Object.keys(t).includes(e) && Object.keys(n).includes(e)) return {
|
|
361
361
|
backgroundColor: t[e],
|
|
362
362
|
color: n[e]
|
|
363
363
|
};
|
|
364
364
|
if (t && Object.keys(t).includes(e)) return { backgroundColor: t[e] };
|
|
365
365
|
if (n && Object.keys(n).includes(e)) return { color: n[e] };
|
|
366
|
-
}, [
|
|
367
|
-
label:
|
|
368
|
-
value:
|
|
369
|
-
}), [
|
|
366
|
+
}, [Lt, Rt] = i([]), [zt, Bt] = i([]), [Vt, Ht] = i({}), [z, Ut] = i({
|
|
367
|
+
label: D?.defaultRowSize || u.tableSettings?.defaultRowSize || "10",
|
|
368
|
+
value: D?.defaultRowSize || u.tableSettings?.defaultRowSize || "10"
|
|
369
|
+
}), [Wt, Gt] = i(50), [Kt, qt] = i(D?.columnSizing), [B, Jt] = i([]), [V, Yt] = i({
|
|
370
370
|
pageIndex: 0,
|
|
371
371
|
pageSize: 10
|
|
372
|
-
}), [
|
|
372
|
+
}), [Xt, Zt] = i(!1);
|
|
373
373
|
t(() => {
|
|
374
|
-
we?.(
|
|
375
|
-
}, [
|
|
374
|
+
we?.(Kt);
|
|
375
|
+
}, [Kt]);
|
|
376
376
|
let H = r(null);
|
|
377
377
|
t(() => {
|
|
378
|
-
if (!
|
|
378
|
+
if (!D?.isAutoPagination || H.current === null) return;
|
|
379
379
|
let e = () => {
|
|
380
380
|
let e = De(H);
|
|
381
|
-
e && (
|
|
381
|
+
e && (Ut((t) => t?.value === e ? t : {
|
|
382
382
|
label: "custom",
|
|
383
383
|
value: e
|
|
384
384
|
}), Ve?.((t) => t?.tableSettings?.defaultRowSize === e ? t : {
|
|
@@ -393,25 +393,25 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
393
393
|
let t = new ResizeObserver(e);
|
|
394
394
|
return t.observe(H.current), () => t.disconnect();
|
|
395
395
|
}, [
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
396
|
+
D?.isAutoPagination,
|
|
397
|
+
D?.lineGap,
|
|
398
|
+
D?.textWrap?.isEnable,
|
|
399
|
+
D?.contentFontSize,
|
|
400
400
|
H.current
|
|
401
401
|
]), t(() => {
|
|
402
|
-
if (!
|
|
403
|
-
let e =
|
|
404
|
-
if (e) Number(e.value) > 1e3 ?
|
|
402
|
+
if (!D?.defaultRowSize || D?.isAutoPagination) return;
|
|
403
|
+
let e = _.find((e) => e.value === D.defaultRowSize);
|
|
404
|
+
if (e) Number(e.value) > 1e3 ? Ut(_.at(-1)) : Ut(e);
|
|
405
405
|
else {
|
|
406
|
-
let e =
|
|
407
|
-
|
|
406
|
+
let e = _.find((e) => e.value === u.tableSettings?.defaultRowSize);
|
|
407
|
+
Ut(e);
|
|
408
408
|
}
|
|
409
|
-
}, [
|
|
410
|
-
let [
|
|
409
|
+
}, [D?.defaultRowSize, D?.isAutoPagination]);
|
|
410
|
+
let [Qt, $t] = i(!1), en = n(() => !e || !R || !Array.isArray(e) || !Array.isArray(R) ? [] : D?.isEnableTranspose ? ie(R, D?.isEnableTranspose) : R, [
|
|
411
411
|
e,
|
|
412
412
|
R,
|
|
413
|
-
|
|
414
|
-
]), U = n(() => e?.length ? !et || !tt ?
|
|
413
|
+
D?.isEnableTranspose
|
|
414
|
+
]), U = n(() => e?.length ? !et || !tt ? en : en?.map((e) => {
|
|
415
415
|
let t = {};
|
|
416
416
|
for (let n in e) {
|
|
417
417
|
let r = l({
|
|
@@ -427,7 +427,7 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
427
427
|
}
|
|
428
428
|
return t;
|
|
429
429
|
}) : [], [
|
|
430
|
-
|
|
430
|
+
en,
|
|
431
431
|
et,
|
|
432
432
|
tt,
|
|
433
433
|
e?.length
|
|
@@ -440,9 +440,9 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
440
440
|
B?.[0]
|
|
441
441
|
]), G = n(() => {
|
|
442
442
|
if (!e?.length) return [];
|
|
443
|
-
let t = Object.keys(U?.[0] || {}), n =
|
|
444
|
-
return
|
|
445
|
-
header: () => e,
|
|
443
|
+
let t = Object.keys(U?.[0] || {}), n = D?.outputColumnOrder ?? [], r = [...new Set(n)], i = new Set(r), a = r.length ? [...r, ...t.filter((e) => !i.has(e))] : t;
|
|
444
|
+
return D?.isEnableColumnFilter && !U?.length && (a = pt || []), D?.showColumnFilter && (a = ht && I?.some(p) ? Object.keys(U?.[0] || {}).filter((e) => !I?.includes(e)) : I), D?.isEnableViewDetails && (a = [...a, "View Details"]), D?.hiddenColumns?.length && (a = a?.filter((e) => !D?.hiddenColumns?.includes(e))), a?.map((e) => Me.accessor(e, {
|
|
445
|
+
header: () => nt?.[e] ?? e,
|
|
446
446
|
cell: (t) => {
|
|
447
447
|
let n = t.row.original[e];
|
|
448
448
|
return n == null ? "" : typeof n == "object" ? JSON.stringify(n) : typeof n == "boolean" ? n ? "true" : "false" : n;
|
|
@@ -450,112 +450,113 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
450
450
|
sortingFn: te(W.map((t) => t?.[e])),
|
|
451
451
|
enableResizing: !0,
|
|
452
452
|
enableColumnFilter: !0,
|
|
453
|
-
filterFn:
|
|
453
|
+
filterFn: D?.isEnableDropdownFilter && D?.dropdownFilterCols?.includes(e) ? "arrIncludesSome" : "auto"
|
|
454
454
|
}));
|
|
455
455
|
}, [
|
|
456
456
|
U?.[0],
|
|
457
457
|
e?.length,
|
|
458
458
|
I,
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
459
|
+
D?.isEnableColumnFilter,
|
|
460
|
+
D?.showColumnFilter,
|
|
461
|
+
D?.isEnableViewDetails,
|
|
462
|
+
D?.hiddenColumns,
|
|
463
|
+
D?.isEnableDropdownFilter,
|
|
464
|
+
D?.dropdownFilterCols,
|
|
465
|
+
D?.outputColumnOrder,
|
|
466
|
+
nt,
|
|
466
467
|
W
|
|
467
468
|
]);
|
|
468
469
|
t(() => {
|
|
469
|
-
e?.length ?
|
|
470
|
+
e?.length ? yt(G) : yt([]);
|
|
470
471
|
}, [G, e?.length]);
|
|
471
|
-
let
|
|
472
|
+
let tn = n(() => !e?.length && !W?.length ? [] : L?.length === Object.keys(e?.[0])?.length ? L : G, [
|
|
472
473
|
e?.length,
|
|
473
474
|
W?.length,
|
|
474
475
|
L,
|
|
475
476
|
G
|
|
476
|
-
]), K =
|
|
477
|
+
]), K = he({
|
|
477
478
|
data: W,
|
|
478
|
-
columns:
|
|
479
|
+
columns: ht ? tn : L,
|
|
479
480
|
state: {
|
|
480
|
-
sorting:
|
|
481
|
+
sorting: Lt,
|
|
481
482
|
pagination: V,
|
|
482
|
-
...
|
|
483
|
+
...Kt ? { columnSizing: Kt } : {}
|
|
483
484
|
},
|
|
484
485
|
sortingFns: { manualSorting: o },
|
|
485
486
|
filterFns: { fuzzy: Ne },
|
|
486
|
-
onRowSelectionChange:
|
|
487
|
-
onSortingChange:
|
|
487
|
+
onRowSelectionChange: Ht,
|
|
488
|
+
onSortingChange: Rt,
|
|
488
489
|
globalFilterFn: Pe,
|
|
489
|
-
getCoreRowModel:
|
|
490
|
-
getFilteredRowModel:
|
|
491
|
-
getSortedRowModel:
|
|
492
|
-
onGlobalFilterChange: He ||
|
|
493
|
-
onPaginationChange:
|
|
490
|
+
getCoreRowModel: fe(),
|
|
491
|
+
getFilteredRowModel: me(),
|
|
492
|
+
getSortedRowModel: ge(),
|
|
493
|
+
onGlobalFilterChange: He || Jt,
|
|
494
|
+
onPaginationChange: Yt,
|
|
494
495
|
manualPagination: !0,
|
|
495
496
|
debugTable: !1,
|
|
496
497
|
enableColumnResizing: !0,
|
|
497
498
|
columnResizeMode: "onChange",
|
|
498
|
-
onColumnSizingChange:
|
|
499
|
-
}),
|
|
500
|
-
infiniteScrollRecordCount:
|
|
499
|
+
onColumnSizingChange: qt
|
|
500
|
+
}), nn = K.getSortedRowModel().rows, rn = n(() => Fe({
|
|
501
|
+
infiniteScrollRecordCount: Wt,
|
|
501
502
|
isExternalChart: A,
|
|
502
503
|
isInfiniteScroll: Ue,
|
|
503
|
-
isServerSidePagination:
|
|
504
|
+
isServerSidePagination: D?.isServerSidePagination,
|
|
504
505
|
onLoadMore: We,
|
|
505
506
|
pageIndex: V.pageIndex,
|
|
506
507
|
pageSize: V.pageSize,
|
|
507
|
-
rows:
|
|
508
|
+
rows: nn
|
|
508
509
|
}), [
|
|
509
|
-
|
|
510
|
+
Wt,
|
|
510
511
|
A,
|
|
511
512
|
Ue,
|
|
512
|
-
|
|
513
|
+
D?.isServerSidePagination,
|
|
513
514
|
We,
|
|
514
515
|
V.pageIndex,
|
|
515
516
|
V.pageSize,
|
|
516
|
-
|
|
517
|
-
]),
|
|
518
|
-
count:
|
|
517
|
+
nn
|
|
518
|
+
]), an = ue({
|
|
519
|
+
count: rn.length,
|
|
519
520
|
getScrollElement: () => H.current?.querySelector(".simplebar-content-wrapper") ?? null,
|
|
520
|
-
estimateSize: () => Re(
|
|
521
|
+
estimateSize: () => Re(D),
|
|
521
522
|
overscan: 12
|
|
522
523
|
});
|
|
523
|
-
|
|
524
|
-
let q =
|
|
524
|
+
an.shouldAdjustScrollPositionOnItemSizeChange = de;
|
|
525
|
+
let q = an.getVirtualItems(), on = q.length ? q[0].start : 0, sn = q.length ? an.getTotalSize() - q[q.length - 1].end : 0, cn = K.getVisibleLeafColumns().length || 1;
|
|
525
526
|
t(() => {
|
|
526
|
-
let e =
|
|
527
|
-
|
|
528
|
-
}, [
|
|
529
|
-
let
|
|
530
|
-
|
|
527
|
+
let e = S && !C?.length;
|
|
528
|
+
$t(e);
|
|
529
|
+
}, [S, C?.length]);
|
|
530
|
+
let ln = () => {
|
|
531
|
+
ot?.(!0);
|
|
531
532
|
let e = L?.map((e) => typeof e?.header == "function" ? e?.header() : e?.header), t = K?.getFilteredRowModel()?.rows?.map((t) => {
|
|
532
533
|
let n = {};
|
|
533
534
|
return e?.forEach((e) => {
|
|
534
535
|
let r = t?.original?.[e];
|
|
535
536
|
r == null && F(e) ? n[e] = r : typeof r == "object" ? n[e] = JSON.stringify(r) : typeof r == "boolean" ? n[e] = r ? "true" : "false" : n[e] = r ?? "";
|
|
536
537
|
}), n;
|
|
537
|
-
}) || [], n =
|
|
538
|
-
chartFieldFormats:
|
|
538
|
+
}) || [], n = y(t, {
|
|
539
|
+
chartFieldFormats: Se,
|
|
539
540
|
columns: e,
|
|
540
541
|
includeRowNumbers: !1,
|
|
541
542
|
uppercaseHeaders: !1,
|
|
542
543
|
quoteAllValues: !0
|
|
543
544
|
}), r = new Blob([JSON.parse("\"\\ufeff\""), n], { type: "text/csv;charset=utf-8;" }), i = document.createElement("a"), a = URL.createObjectURL(r);
|
|
544
|
-
i.setAttribute("href", a), i.setAttribute("download", `${O || "export"}.csv`), i.style.visibility = "hidden", document.body.appendChild(i), i.click(), document.body.removeChild(i),
|
|
545
|
+
i.setAttribute("href", a), i.setAttribute("download", `${O || "export"}.csv`), i.style.visibility = "hidden", document.body.appendChild(i), i.click(), document.body.removeChild(i), ot?.(!1), lt?.(!1);
|
|
545
546
|
};
|
|
546
547
|
t(() => {
|
|
547
|
-
|
|
548
|
-
}, [
|
|
549
|
-
let
|
|
548
|
+
ct && ln();
|
|
549
|
+
}, [ct]);
|
|
550
|
+
let un = (e) => {
|
|
550
551
|
let t = Number(e.currentTarget.dataset.columnIndex);
|
|
551
|
-
|
|
552
|
-
}, [
|
|
552
|
+
Tt(t);
|
|
553
|
+
}, [dn, fn] = i({
|
|
553
554
|
isOpen: !1,
|
|
554
555
|
column: ""
|
|
555
|
-
}),
|
|
556
|
+
}), pn = (e) => {
|
|
556
557
|
e.preventDefault();
|
|
557
|
-
let t = Number(e.currentTarget.dataset.columnIndex), n = [...L], [r] = n.splice(
|
|
558
|
-
n.splice(t, 0, r),
|
|
558
|
+
let t = Number(e.currentTarget.dataset.columnIndex), n = [...L], [r] = n.splice(wt, 1);
|
|
559
|
+
n.splice(t, 0, r), yt(n), Tt(null);
|
|
559
560
|
};
|
|
560
561
|
t(() => {
|
|
561
562
|
let e = K.getState()?.sorting?.length > 0;
|
|
@@ -567,11 +568,11 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
567
568
|
]), t(() => {
|
|
568
569
|
K.setPageSize(Number(z.value));
|
|
569
570
|
}, [z, K]);
|
|
570
|
-
let { pageIndex: J, pageSize:
|
|
571
|
+
let { pageIndex: J, pageSize: mn } = K.getState().pagination, Y = n(() => {
|
|
571
572
|
let t = B || P ? K.getRowModel().rows.length : e?.length || 0;
|
|
572
573
|
return {
|
|
573
|
-
from: t === 0 ? 0 :
|
|
574
|
-
to: t <=
|
|
574
|
+
from: t === 0 ? 0 : mn * J + 1,
|
|
575
|
+
to: t <= mn * (J + 1) ? t : mn * (J + 1),
|
|
575
576
|
total: t
|
|
576
577
|
};
|
|
577
578
|
}, [
|
|
@@ -580,76 +581,76 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
580
581
|
P,
|
|
581
582
|
e?.length,
|
|
582
583
|
J,
|
|
583
|
-
|
|
584
|
+
mn
|
|
584
585
|
]), { pageCount: X, currentPage: Z } = n(() => N && A ? {
|
|
585
586
|
pageCount: Math.ceil(N.totalRecords / N.limit),
|
|
586
587
|
currentPage: Math.floor(N.offset / N.limit)
|
|
587
588
|
} : {
|
|
588
589
|
pageCount: 1,
|
|
589
590
|
currentPage: 0
|
|
590
|
-
}, [A, N]),
|
|
591
|
+
}, [A, N]), hn;
|
|
591
592
|
if (A) {
|
|
592
|
-
let e =
|
|
593
|
-
|
|
593
|
+
let e = b(N.totalRecords, !0)?.toString()?.split(".");
|
|
594
|
+
hn = e?.length > 1 && [...e[1]].some((e) => parseInt(e, 10) > 0) ? b(N.totalRecords, !0) : b(N.totalRecords, !1);
|
|
594
595
|
}
|
|
595
596
|
t(() => {
|
|
596
597
|
K.getIsSomeColumnsVisible() && Te?.();
|
|
597
598
|
}, [K.getIsSomeColumnsVisible()]);
|
|
598
|
-
let Q = (e, t) => t?.includes(e) ? j.badge : "",
|
|
599
|
+
let Q = (e, t) => t?.includes(e) ? j.badge : "", gn = (e, t) => t?.includes(e) ? j.list : "";
|
|
599
600
|
t(() => {
|
|
600
|
-
|
|
601
|
-
}, [K,
|
|
602
|
-
K.getState().columnFilters?.length && (
|
|
601
|
+
D?.isEnableColumnFilter || K.resetColumnFilters();
|
|
602
|
+
}, [K, D?.isEnableColumnFilter]), t(() => {
|
|
603
|
+
K.getState().columnFilters?.length && (Jt(K.getState().columnFilters), He?.(K.getState().columnFilters));
|
|
603
604
|
}, [K]);
|
|
604
|
-
let
|
|
605
|
+
let _n = r(O);
|
|
605
606
|
t(() => {
|
|
606
|
-
U?.length && (
|
|
607
|
+
U?.length && (_n.current === O && I.length || vt(Object.keys(U[0] || {})), _n.current = O);
|
|
607
608
|
}, [U?.[0], O]);
|
|
608
|
-
let [
|
|
609
|
+
let [vn, yn] = i(1);
|
|
609
610
|
t(() => {
|
|
610
|
-
|
|
611
|
+
yn(A ? Z + 1 : J + 1);
|
|
611
612
|
}, [Z, J]);
|
|
612
|
-
let $ = window.CSS && CSS.supports("width", "clamp(1px, 1px, 1px)"),
|
|
613
|
-
headerRowCount:
|
|
614
|
-
footerRowCount:
|
|
613
|
+
let $ = window.CSS && CSS.supports("width", "clamp(1px, 1px, 1px)"), bn = D?.hideTableHeader ? 0 : K.getHeaderGroups()?.length || 0, xn = D?.aggregateRow?.isEnable && D?.aggregateRow?.columns?.length ? 1 : 0, Sn = xe({
|
|
614
|
+
headerRowCount: bn,
|
|
615
|
+
footerRowCount: xn,
|
|
615
616
|
isExternalChart: A,
|
|
616
617
|
isInfiniteScroll: Ue,
|
|
617
|
-
isServerSidePagination:
|
|
618
|
+
isServerSidePagination: D?.isServerSidePagination,
|
|
618
619
|
pageIndex: V.pageIndex,
|
|
619
620
|
pageSize: V.pageSize,
|
|
620
621
|
serverOffset: N?.offset || 0,
|
|
621
622
|
serverTotalRecords: N?.totalRecords || 0,
|
|
622
623
|
totalDataRows: Y.total
|
|
623
624
|
});
|
|
624
|
-
return /* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ E("div", {
|
|
625
626
|
className: `${j.container} ${Ce}`,
|
|
626
|
-
children: [/* @__PURE__ */
|
|
627
|
+
children: [/* @__PURE__ */ E("div", {
|
|
627
628
|
className: j.previewTable,
|
|
628
629
|
children: [
|
|
629
|
-
|
|
630
|
+
D?.enableTableSearch && D?.searchPosition === "left" && !He ? /* @__PURE__ */ T("div", {
|
|
630
631
|
className: "dbn:w-full dbn:flex dbn:items-center dbn:justify-start",
|
|
631
632
|
style: { order: 0 },
|
|
632
|
-
children: /* @__PURE__ */
|
|
633
|
+
children: /* @__PURE__ */ T(M, {
|
|
633
634
|
value: typeof B?.[0] == "string" ? B?.[0] : "",
|
|
634
|
-
onChange: (e) =>
|
|
635
|
+
onChange: (e) => Jt(() => [String(e)]),
|
|
635
636
|
placeholder: "Search",
|
|
636
637
|
style: { maxWidth: "249px" }
|
|
637
638
|
})
|
|
638
639
|
}) : null,
|
|
639
|
-
|
|
640
|
-
className:
|
|
640
|
+
D?.enableTableSearch && !He && D?.searchPosition !== "left" || D?.showTableTitle && D.tableTitle ? /* @__PURE__ */ E("div", {
|
|
641
|
+
className: D.showTableTitle ? j.preview : j.searchButton,
|
|
641
642
|
style: { order: 1 },
|
|
642
|
-
children: [
|
|
643
|
+
children: [D.showTableTitle && /* @__PURE__ */ E("div", {
|
|
643
644
|
className: "dbn:flex dbn:items-center dbn:gap-2",
|
|
644
|
-
children: [
|
|
645
|
+
children: [D.showTableIcon && /* @__PURE__ */ T(d, { name: "table" }), /* @__PURE__ */ T("span", {
|
|
645
646
|
className: j.title,
|
|
646
|
-
style: { color:
|
|
647
|
-
children:
|
|
647
|
+
style: { color: D?.tableTitleColor },
|
|
648
|
+
children: D.tableTitle
|
|
648
649
|
})]
|
|
649
|
-
}), /* @__PURE__ */
|
|
650
|
-
className: `${
|
|
650
|
+
}), /* @__PURE__ */ E("div", {
|
|
651
|
+
className: `${D.showColumnFilter ? "" : "dbn:w-[30%]"} dbn:flex dbn:items-center dbn:gap-2`,
|
|
651
652
|
children: [
|
|
652
|
-
|
|
653
|
+
D.showColumnFilter && /* @__PURE__ */ T(m, {
|
|
653
654
|
options: Object.keys(U?.[0] || {})?.map((e) => ({
|
|
654
655
|
label: e,
|
|
655
656
|
value: e
|
|
@@ -659,7 +660,7 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
659
660
|
label: e
|
|
660
661
|
})) || [],
|
|
661
662
|
onChange: (e) => {
|
|
662
|
-
|
|
663
|
+
vt(e?.map((e) => e.value));
|
|
663
664
|
},
|
|
664
665
|
isSelectAllEnabled: !0,
|
|
665
666
|
isSelectAllOn: !0,
|
|
@@ -669,63 +670,63 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
669
670
|
buttonWidth: "250px",
|
|
670
671
|
menuWidth: "250px"
|
|
671
672
|
}),
|
|
672
|
-
|
|
673
|
+
D.showDownloadBtn && /* @__PURE__ */ T(h, {
|
|
673
674
|
variant: "popover",
|
|
674
675
|
onClick: () => {
|
|
675
|
-
|
|
676
|
+
st?.(L?.map((e) => typeof e.header == "function" ? e.header() : e.header));
|
|
676
677
|
},
|
|
677
|
-
isDisabled:
|
|
678
|
-
leftIcon:
|
|
678
|
+
isDisabled: at,
|
|
679
|
+
leftIcon: at ? /* @__PURE__ */ T("div", {
|
|
679
680
|
className: "dbn:animate-spin",
|
|
680
|
-
children: /* @__PURE__ */
|
|
681
|
+
children: /* @__PURE__ */ T(d, {
|
|
681
682
|
name: "table-downloading",
|
|
682
683
|
width: "20px",
|
|
683
684
|
height: "20px"
|
|
684
685
|
})
|
|
685
|
-
}) : /* @__PURE__ */
|
|
686
|
+
}) : /* @__PURE__ */ T(d, {
|
|
686
687
|
name: "download_table",
|
|
687
688
|
size: "sm"
|
|
688
689
|
}),
|
|
689
690
|
className: "dbn:p-2.5 dbn:border dbn:border-secondary dbn:rounded-md"
|
|
690
691
|
}),
|
|
691
|
-
|
|
692
|
+
D.enableTableSearch && D?.searchPosition !== "left" && !He && /* @__PURE__ */ T(M, {
|
|
692
693
|
value: typeof B?.[0] == "string" ? B?.[0] : "",
|
|
693
|
-
onChange: (e) =>
|
|
694
|
+
onChange: (e) => Jt(() => [String(e)]),
|
|
694
695
|
placeholder: "Search"
|
|
695
696
|
})
|
|
696
697
|
]
|
|
697
698
|
})]
|
|
698
699
|
}) : null,
|
|
699
|
-
/* @__PURE__ */
|
|
700
|
-
className: `${j.tableData} ${
|
|
701
|
-
"data-dbn-underlying-data-surface":
|
|
700
|
+
/* @__PURE__ */ E("div", {
|
|
701
|
+
className: `${j.tableData} ${D?.hideBorder ? j.noBorder : ""}`,
|
|
702
|
+
"data-dbn-underlying-data-surface": mt || void 0,
|
|
702
703
|
ref: H,
|
|
703
|
-
style: { order:
|
|
704
|
+
style: { order: D?.paginationPosition === "top" ? 3 : 2 },
|
|
704
705
|
children: [
|
|
705
|
-
|
|
706
|
+
S && !e?.length || Qt ? /* @__PURE__ */ T(f, {
|
|
706
707
|
variant: "table",
|
|
707
708
|
tableRows: 6
|
|
708
709
|
}) : null,
|
|
709
|
-
(!!R?.length ||
|
|
710
|
+
(!!R?.length || D?.isEnableColumnFilter) && !S && !Qt && /* @__PURE__ */ E(_e, {
|
|
710
711
|
style: { height: "100%" },
|
|
711
712
|
className: !R?.length || !W?.length ? j.emptyFilterData : "",
|
|
712
713
|
children: [
|
|
713
|
-
!(!
|
|
714
|
+
!(!ht && !W?.length && e?.length && (P?.[0] || B?.[0])) && /* @__PURE__ */ E("table", {
|
|
714
715
|
className: j.table,
|
|
715
|
-
style: Le(
|
|
716
|
-
"aria-rowcount":
|
|
716
|
+
style: Le(D),
|
|
717
|
+
"aria-rowcount": Sn.totalRows > 0 ? Sn.ariaRowCount : -1,
|
|
717
718
|
children: [
|
|
718
|
-
|
|
719
|
+
D?.hideTableHeader ? null : /* @__PURE__ */ T("thead", { children: K.getHeaderGroups()?.map((e, t) => /* @__PURE__ */ T("tr", {
|
|
719
720
|
className: j.row,
|
|
720
721
|
"data-testid": "table-header-row",
|
|
721
722
|
"aria-rowindex": t + 1,
|
|
722
723
|
children: e.headers?.map((e, t) => {
|
|
723
|
-
let n =
|
|
724
|
-
return
|
|
724
|
+
let n = D?.customHeaderColor?.color || "", r = D?.customHeaderColor?.isEnabled ? n.startsWith("var(") ? "var(--surface-hover, var(--dbn-color-snow))" : le(n) : "", i = "", a = D?.customHeaderColor?.textColor || "";
|
|
725
|
+
return bt !== e?.id && D?.customHeaderColor?.isEnabled && (a = D?.customHeaderColor?.textColor || "", i = D?.customHeaderColor?.color || ""), bt === e?.id && D?.customHeaderColor?.isEnabled && (i = D?.customHeaderColor?.textColor || "", a = D?.customHeaderColor?.color || ""), /* @__PURE__ */ E("th", {
|
|
725
726
|
"data-testid": `${e.id}-header`,
|
|
726
|
-
className: `${j.tableHeadCol} ${
|
|
727
|
+
className: `${j.tableHeadCol} ${D?.hideVerticalDivider ? "" : j.tableBorderRight} ${D?.hideHorizontalDivider ? "" : j.tableBorderBottom} hover:dbn-bg-[${r}]`,
|
|
727
728
|
onContextMenu: (t) => {
|
|
728
|
-
t.preventDefault(),
|
|
729
|
+
t.preventDefault(), D?.isSepAlign && !rt && !je && fn({
|
|
729
730
|
isOpen: !0,
|
|
730
731
|
column: e.id
|
|
731
732
|
});
|
|
@@ -737,13 +738,13 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
737
738
|
color: a || ""
|
|
738
739
|
},
|
|
739
740
|
draggable: !e.column.getIsResizing(),
|
|
740
|
-
onMouseOver: () =>
|
|
741
|
-
onMouseOut: () =>
|
|
741
|
+
onMouseOver: () => xt(e.id),
|
|
742
|
+
onMouseOut: () => xt(""),
|
|
742
743
|
"data-column-index": t,
|
|
743
|
-
onDragStart:
|
|
744
|
+
onDragStart: un,
|
|
744
745
|
onDragOver: (e) => e.preventDefault(),
|
|
745
|
-
onDrop:
|
|
746
|
-
children: [/* @__PURE__ */
|
|
746
|
+
onDrop: pn,
|
|
747
|
+
children: [/* @__PURE__ */ T(h, {
|
|
747
748
|
onMouseDown: e.getResizeHandler(),
|
|
748
749
|
variant: "popover",
|
|
749
750
|
onTouchStart: e.getResizeHandler(),
|
|
@@ -751,117 +752,117 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
751
752
|
className: `${j.resizer} ${e.column.getIsResizing() ? j.resizing : ""}`,
|
|
752
753
|
type: "button",
|
|
753
754
|
title: "Resize Column"
|
|
754
|
-
}),
|
|
755
|
+
}), D?.enableSorting ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("div", {
|
|
755
756
|
className: e.column.getCanSort() ? j.sortButton : "",
|
|
756
757
|
onClick: e.column.getToggleSortingHandler(),
|
|
757
|
-
children: [e.isPlaceholder ? null : /* @__PURE__ */
|
|
758
|
+
children: [e.isPlaceholder ? null : /* @__PURE__ */ T("span", {
|
|
758
759
|
style: {
|
|
759
|
-
...
|
|
760
|
+
...Ft,
|
|
760
761
|
color: a
|
|
761
762
|
},
|
|
762
|
-
className:
|
|
763
|
-
children:
|
|
764
|
-
}), /* @__PURE__ */
|
|
763
|
+
className: D?.textWrap?.headerWrap ? j.wrapCellText : j.truncateText,
|
|
764
|
+
children: pe(e.column.columnDef.header, e.getContext())
|
|
765
|
+
}), /* @__PURE__ */ E("div", {
|
|
765
766
|
className: `dbn-interactive-element ${j.sortIcon}`,
|
|
766
767
|
children: [{
|
|
767
|
-
asc: /* @__PURE__ */
|
|
768
|
+
asc: /* @__PURE__ */ T(d, {
|
|
768
769
|
name: "caret-up-fill",
|
|
769
770
|
customColor: a || ""
|
|
770
771
|
}),
|
|
771
|
-
desc: /* @__PURE__ */
|
|
772
|
+
desc: /* @__PURE__ */ T(d, {
|
|
772
773
|
name: "caret-down-fill",
|
|
773
774
|
customColor: a || ""
|
|
774
775
|
})
|
|
775
|
-
}[e.column.getIsSorted()] ?? /* @__PURE__ */
|
|
776
|
+
}[e.column.getIsSorted()] ?? /* @__PURE__ */ T(d, {
|
|
776
777
|
name: "caret-up-down",
|
|
777
778
|
customColor: a || ""
|
|
778
|
-
}), e.column.getCanFilter() &&
|
|
779
|
+
}), e.column.getCanFilter() && D?.isEnableColumnFilter ? /* @__PURE__ */ T("span", {
|
|
779
780
|
onClick: (e) => e.stopPropagation(),
|
|
780
|
-
children: /* @__PURE__ */
|
|
781
|
+
children: /* @__PURE__ */ T(h, {
|
|
781
782
|
variant: "popover",
|
|
782
|
-
leftIcon: /* @__PURE__ */
|
|
783
|
+
leftIcon: /* @__PURE__ */ T(d, {
|
|
783
784
|
name: "funnel",
|
|
784
785
|
customColor: a || ""
|
|
785
786
|
}),
|
|
786
787
|
onClick: () => {
|
|
787
|
-
|
|
788
|
+
Et?.includes(e.id) ? (Dt((t) => t.filter((t) => t !== e.id)), ft?.({
|
|
788
789
|
columnAlias: e.id,
|
|
789
790
|
value: "",
|
|
790
791
|
isClear: !0
|
|
791
|
-
})) :
|
|
792
|
+
})) : Dt((t) => [...t, e.id]);
|
|
792
793
|
}
|
|
793
794
|
})
|
|
794
795
|
}) : null]
|
|
795
796
|
})]
|
|
796
|
-
}), e.column.getCanFilter() &&
|
|
797
|
+
}), e.column.getCanFilter() && D?.isEnableColumnFilter && (Et?.includes(e.id) || D?.isServerSidePagination && dt?.find((t) => t?.columnAlias === e?.id)) ? /* @__PURE__ */ T("div", {
|
|
797
798
|
className: "dbn:w-full dbn:mt-2",
|
|
798
|
-
children: /* @__PURE__ */
|
|
799
|
+
children: /* @__PURE__ */ T(Oe, {
|
|
799
800
|
column: e.column,
|
|
800
801
|
table: K,
|
|
801
|
-
dropdownFilterVariant: !!(
|
|
802
|
-
onChangePaginationColumnFilters:
|
|
803
|
-
tableColumnFilters:
|
|
802
|
+
dropdownFilterVariant: !!(D?.isEnableDropdownFilter && D?.dropdownFilterCols?.includes(e.column.id)),
|
|
803
|
+
onChangePaginationColumnFilters: D?.isServerSidePagination ? ft : void 0,
|
|
804
|
+
tableColumnFilters: D?.isServerSidePagination ? dt : void 0
|
|
804
805
|
})
|
|
805
|
-
}) : null] }) : /* @__PURE__ */ w
|
|
806
|
+
}) : null] }) : /* @__PURE__ */ T(w, { children: e.isPlaceholder ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("div", {
|
|
806
807
|
className: j.sortButton,
|
|
807
|
-
children: [/* @__PURE__ */
|
|
808
|
+
children: [/* @__PURE__ */ T("span", {
|
|
808
809
|
style: {
|
|
809
|
-
...
|
|
810
|
+
...Ft,
|
|
810
811
|
color: a,
|
|
811
|
-
fontSize:
|
|
812
|
+
fontSize: D?.headerFontSize ? `${D?.headerFontSize}px` : $ ? "clamp(0.4rem, 5cqw, 0.75rem)" : "0.75rem"
|
|
812
813
|
},
|
|
813
|
-
className:
|
|
814
|
-
children:
|
|
815
|
-
}), e.column.getCanFilter() &&
|
|
814
|
+
className: D?.textWrap?.headerWrap ? j.wrapCellText : j.truncateText,
|
|
815
|
+
children: pe(e.column.columnDef.header, e.getContext())
|
|
816
|
+
}), e.column.getCanFilter() && D?.isEnableColumnFilter ? /* @__PURE__ */ T("span", {
|
|
816
817
|
onClick: (e) => e.stopPropagation(),
|
|
817
|
-
children: /* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ T(h, {
|
|
818
819
|
variant: "popover",
|
|
819
|
-
leftIcon: /* @__PURE__ */
|
|
820
|
+
leftIcon: /* @__PURE__ */ T(d, {
|
|
820
821
|
name: "funnel",
|
|
821
822
|
customColor: a || ""
|
|
822
823
|
}),
|
|
823
824
|
onClick: () => {
|
|
824
|
-
|
|
825
|
+
Et?.includes(e.id) ? (Dt((t) => t.filter((t) => t !== e.id)), ft?.({
|
|
825
826
|
columnAlias: e.id,
|
|
826
827
|
value: "",
|
|
827
828
|
isClear: !0
|
|
828
|
-
})) :
|
|
829
|
+
})) : Dt((t) => [...t, e.id]);
|
|
829
830
|
}
|
|
830
831
|
})
|
|
831
832
|
}) : null]
|
|
832
|
-
}), e.column.getCanFilter() &&
|
|
833
|
+
}), e.column.getCanFilter() && D?.isEnableColumnFilter && (Et?.includes(e.id) || D?.isServerSidePagination && dt?.find((t) => t?.columnAlias === e?.id)) ? /* @__PURE__ */ T("div", {
|
|
833
834
|
className: "dbn:w-full dbn:mt-2",
|
|
834
|
-
children: /* @__PURE__ */
|
|
835
|
+
children: /* @__PURE__ */ T(Oe, {
|
|
835
836
|
column: e.column,
|
|
836
837
|
table: K,
|
|
837
|
-
dropdownFilterVariant: !!(
|
|
838
|
-
onChangePaginationColumnFilters:
|
|
839
|
-
tableColumnFilters:
|
|
838
|
+
dropdownFilterVariant: !!(D?.isEnableDropdownFilter && D?.dropdownFilterCols?.includes(e.column.id)),
|
|
839
|
+
onChangePaginationColumnFilters: D?.isServerSidePagination ? ft : void 0,
|
|
840
|
+
tableColumnFilters: D?.isServerSidePagination ? dt : void 0
|
|
840
841
|
})
|
|
841
842
|
}) : null] }) })]
|
|
842
843
|
}, e.id);
|
|
843
844
|
})
|
|
844
845
|
}, e.id)) }),
|
|
845
|
-
R?.length ? /* @__PURE__ */ w
|
|
846
|
-
|
|
847
|
-
colSpan:
|
|
846
|
+
R?.length ? /* @__PURE__ */ T(w, { children: /* @__PURE__ */ E("tbody", { children: [
|
|
847
|
+
on > 0 ? /* @__PURE__ */ T("tr", { children: /* @__PURE__ */ T("td", {
|
|
848
|
+
colSpan: cn,
|
|
848
849
|
style: {
|
|
849
|
-
height: `${
|
|
850
|
+
height: `${on}px`,
|
|
850
851
|
padding: 0,
|
|
851
852
|
border: 0
|
|
852
853
|
}
|
|
853
854
|
}) }) : null,
|
|
854
855
|
q.map((e) => {
|
|
855
|
-
let t =
|
|
856
|
+
let t = rn[e.index];
|
|
856
857
|
if (!t) return null;
|
|
857
858
|
let n = e.index;
|
|
858
|
-
return /* @__PURE__ */
|
|
859
|
-
ref:
|
|
859
|
+
return /* @__PURE__ */ T("tr", {
|
|
860
|
+
ref: an.measureElement,
|
|
860
861
|
"data-index": n,
|
|
861
862
|
"data-testid": `table-row-${t.id}`,
|
|
862
|
-
"aria-rowindex":
|
|
863
|
+
"aria-rowindex": Sn.firstRowIndex + n,
|
|
863
864
|
style: Ze?.click ? { cursor: "pointer" } : void 0,
|
|
864
|
-
className: `${
|
|
865
|
+
className: `${D?.showRowHover ? j.rowHover : ""} ${D?.enableStripedRows && Number(n) % 2 != 0 ? j.stripedRow : ""}`,
|
|
865
866
|
onClick: () => {
|
|
866
867
|
Ze?.click({}, Object.keys(t.original ?? {})?.map((e) => ({
|
|
867
868
|
columnName: e,
|
|
@@ -869,57 +870,57 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
869
870
|
})));
|
|
870
871
|
},
|
|
871
872
|
children: t.getVisibleCells()?.map((e, t) => {
|
|
872
|
-
let n = [], r = "", i = !!(
|
|
873
|
-
Q(e.column.id,
|
|
874
|
-
let a =
|
|
875
|
-
if (!i && F(e.column.id)) return String(
|
|
876
|
-
if (
|
|
877
|
-
if (
|
|
873
|
+
let n = [], r = "", i = !!(D?.isEnableViewDetails && e.column?.id === "View Details");
|
|
874
|
+
Q(e.column.id, D?.badgeColumns) ? (r = typeof e.getValue() == "object" ? JSON.stringify(e.getValue()) : e.getValue(), n = r?.toString()?.includes(Ot) ? r?.toString()?.split(Ot) : [r]) : gn(e.column.id, D?.listColumns) && (r = typeof e.getValue() == "object" ? JSON.stringify(e.getValue()) : e.getValue(), n = r?.toString()?.includes(At) ? r?.toString()?.split(D?.listSeparator || ",") : [r]);
|
|
875
|
+
let a = zt?.find((t) => t.id === e.id)?.isShowMore, o = D?.tableNumberFormatter?.find((t) => t.columns?.includes(e.column.id)), s = D?.isEnableNumberFormatting && (!!o || D?.formattedColumns?.includes(e.column.id)), c = $e?.length ? $e?.find((t) => t?.measures?.includes(e.column.id)) : void 0, l = c?.numberFormatter || o?.formatter || D?.tableFormatter, ee = c?.prefix || o?.prefix || D?.tablePrefix || "", u = c?.suffix || o?.suffix || D?.tableSuffix || "", te = D?.isEnableNumberFormatting && D?.isEnableTimezoneFormatting && Be?.includes(e.column.id), ne = D?.textWrap?.isEnable && D?.textWrap?.columns?.includes(e?.column?.id), re = () => {
|
|
876
|
+
if (!i && F(e.column.id)) return String(_t(e.getValue(), e.column.id) ?? "");
|
|
877
|
+
if (D?.replaceNullValuesWithEmpty && (e?.getValue() === "null" || e?.getValue() === null)) return "";
|
|
878
|
+
if (D?.replaceNullValues && (e?.getValue() === "null" || e?.getValue() === null)) return "-";
|
|
878
879
|
if (i) {
|
|
879
880
|
let t = e?.row?.index, n = W[t] || [], r = Object?.keys(n)?.map((e) => ({
|
|
880
881
|
column: e,
|
|
881
882
|
value: n[e]
|
|
882
883
|
}));
|
|
883
|
-
return /* @__PURE__ */
|
|
884
|
+
return /* @__PURE__ */ T(h, {
|
|
884
885
|
variant: "popover",
|
|
885
886
|
size: "small",
|
|
886
887
|
className: "dbn:text-link-text dbn:hover:underline",
|
|
887
888
|
onClick: () => {
|
|
888
|
-
|
|
889
|
+
Ct({
|
|
889
890
|
isShow: !0,
|
|
890
891
|
data: r
|
|
891
892
|
});
|
|
892
893
|
},
|
|
893
|
-
children:
|
|
894
|
+
children: D?.customViewText || "View"
|
|
894
895
|
});
|
|
895
896
|
}
|
|
896
897
|
if (s) {
|
|
897
898
|
let t = e?.getValue(), n = Number(t);
|
|
898
|
-
return t == null || isNaN(n) ? `${t}` : `${ee}${
|
|
899
|
+
return t == null || isNaN(n) ? `${t}` : `${ee}${oe(n || 0, l)}${u}`;
|
|
899
900
|
}
|
|
900
|
-
return te ?
|
|
901
|
-
}, f =
|
|
902
|
-
if (
|
|
903
|
-
let t =
|
|
901
|
+
return te ? ae(e?.getValue()?.toString() || "", D?.timeFormatter || "") : pe(e.column.columnDef.cell, e.getContext());
|
|
902
|
+
}, f = rt && !it && D?.chartAction ? (() => {
|
|
903
|
+
if (D?.chartAction?.isEnableCustomRedirection) {
|
|
904
|
+
let t = D?.chartAction?.clickValues?.find((t) => t.text === e?.getValue()?.toString());
|
|
904
905
|
if (t) return t;
|
|
905
906
|
}
|
|
906
|
-
return
|
|
907
|
-
})() : null,
|
|
908
|
-
ne && (
|
|
909
|
-
let
|
|
910
|
-
rules:
|
|
907
|
+
return D?.chartAction?.isEnableCustomColumnRedirection ? D?.chartAction?.clickColumns?.find((t) => t.colName === e?.column?.id) : null;
|
|
908
|
+
})() : null, p = f?.link, m = f && "text" in f, ie = f && "colName" in f, g = f?.isOpenInNewTab, _ = j.truncateText;
|
|
909
|
+
ne && (_ = D?.hideTableHeader && D?.isHideHorizontalScroll ? j.wrapCellText : j.wrapText);
|
|
910
|
+
let v = be({
|
|
911
|
+
rules: D?.conditionalFormatting?.find(({ columnName: t }) => t === e?.column?.id)?.rules || [],
|
|
911
912
|
value: typeof e.getValue() == "object" ? JSON.stringify(e.getValue()) : e.getValue(),
|
|
912
913
|
formatter: l
|
|
913
|
-
}),
|
|
914
|
-
|
|
915
|
-
let
|
|
916
|
-
if (
|
|
917
|
-
let { backgroundColor: e, ...t } =
|
|
918
|
-
|
|
914
|
+
}), se = v?.prefix || "", ce = v?.suffix || "", y = !Object.keys(v)?.length && D?.badgeColumns?.includes(e.column.id) ? It(e.column.id, D?.badgeColors, D?.badgeTextColors) : v, le = "", b = (y?.isApplyBadgeColor || !(y?.isApplyBgColor || !y?.badgeColor)) && !!Object.keys(v)?.length;
|
|
915
|
+
b ? le = y?.badgeColor : D?.badgeColumns?.includes(e.column.id) && (le = It(e.column.id, D?.badgeColors, D?.badgeTextColors)?.backgroundColor);
|
|
916
|
+
let x = v;
|
|
917
|
+
if (v && "backgroundColor" in v && b) {
|
|
918
|
+
let { backgroundColor: e, ...t } = v;
|
|
919
|
+
x = t;
|
|
919
920
|
}
|
|
920
|
-
return /* @__PURE__ */
|
|
921
|
+
return /* @__PURE__ */ E("td", {
|
|
921
922
|
"data-testid": e.id,
|
|
922
|
-
className: `${j.tableRowCol} ${
|
|
923
|
+
className: `${j.tableRowCol} ${D?.hideVerticalDivider ? "" : j.tableBorderRight} ${D?.isRemovePadding ? "" : j.horizontalPadding} ${D?.hideHorizontalDivider ? "" : j.tableBorderBottom} ${wt === t ? j.columnDrag : ""}`,
|
|
923
924
|
title: typeof e.getValue() == "object" ? JSON.stringify(e.getValue()) : `${e.getValue()}`,
|
|
924
925
|
onContextMenu: (t) => {
|
|
925
926
|
typeof e.getValue() == "string" && Ze?.contextmenu({
|
|
@@ -927,66 +928,66 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
927
928
|
event: { event: t.nativeEvent }
|
|
928
929
|
});
|
|
929
930
|
},
|
|
930
|
-
style:
|
|
931
|
-
width:
|
|
931
|
+
style: D?.hideTableHeader ? {
|
|
932
|
+
width: D?.isHideHorizontalScroll ? `${e.column.getSize() / K.getTotalSize() * 100}%` : $ && G?.length < 6 ? `clamp(
|
|
932
933
|
50px,
|
|
933
934
|
5cqw,
|
|
934
935
|
${e.column.getSize()}px
|
|
935
936
|
)` : e.column.getSize(),
|
|
936
937
|
position: "relative",
|
|
937
|
-
...
|
|
938
|
-
paddingLeft: `${
|
|
939
|
-
paddingRight: `${
|
|
938
|
+
...D?.isRemovePadding && D?.horizontalCellPadding ? {
|
|
939
|
+
paddingLeft: `${D?.horizontalCellPadding}rem`,
|
|
940
|
+
paddingRight: `${D?.horizontalCellPadding}rem`
|
|
940
941
|
} : {}
|
|
941
942
|
} : {},
|
|
942
943
|
children: [
|
|
943
|
-
!!
|
|
944
|
-
style: Q(e.column.id,
|
|
945
|
-
...
|
|
946
|
-
...
|
|
944
|
+
!!D && !mt && /* @__PURE__ */ T("div", {
|
|
945
|
+
style: Q(e.column.id, D.listColumns) ? {
|
|
946
|
+
...Pt,
|
|
947
|
+
...x
|
|
947
948
|
} : {
|
|
948
|
-
...
|
|
949
|
-
...
|
|
950
|
-
...
|
|
949
|
+
...Nt,
|
|
950
|
+
...x,
|
|
951
|
+
...D?.isSepAlign && Object.keys(D?.colAlignments || []).includes(e.column.id) ? { justifyContent: D?.colAlignments?.[e.column.id] } : {}
|
|
951
952
|
},
|
|
952
|
-
children: r?.toString()?.includes(
|
|
953
|
-
className: `${
|
|
953
|
+
children: r?.toString()?.includes(Ot) || r?.toString()?.includes(At) ? /* @__PURE__ */ E(w, { children: [(D.listColumns && !a ? n?.slice(0, 3) : n)?.map((t) => /* @__PURE__ */ T(w, { children: Q(e.column.id, D.badgeColumns) ? /* @__PURE__ */ E("span", {
|
|
954
|
+
className: `${_} ${Q(e.column.id, D.badgeColumns)}`,
|
|
954
955
|
style: {
|
|
955
|
-
fontFamily:
|
|
956
|
-
color:
|
|
957
|
-
...
|
|
958
|
-
fontWeight:
|
|
959
|
-
backgroundColor:
|
|
960
|
-
fontSize:
|
|
956
|
+
fontFamily: D?.contentFont,
|
|
957
|
+
color: D?.contentColor || "var(--dbn-txt-primary, #252525)",
|
|
958
|
+
...y,
|
|
959
|
+
fontWeight: D?.contentWeight || 500,
|
|
960
|
+
backgroundColor: le || "",
|
|
961
|
+
fontSize: D?.contentFontSize ? `${D?.contentFontSize}px` : $ ? "clamp(0.4rem, 5cqw, 0.875rem)" : "0.875rem"
|
|
961
962
|
},
|
|
962
963
|
children: [
|
|
963
|
-
|
|
964
|
-
F(e.column.id) ? String(
|
|
965
|
-
|
|
964
|
+
se,
|
|
965
|
+
F(e.column.id) ? String(_t(t, e.column.id) ?? "") : s ? `${ee}${oe(Number(t) || 0, l)}${u}` : t,
|
|
966
|
+
ce
|
|
966
967
|
]
|
|
967
|
-
}, t) : /* @__PURE__ */
|
|
968
|
-
className: `${
|
|
969
|
-
children: [/* @__PURE__ */
|
|
968
|
+
}, t) : /* @__PURE__ */ E("div", {
|
|
969
|
+
className: `${_} ${j.listItemDiv}`,
|
|
970
|
+
children: [/* @__PURE__ */ T("div", {
|
|
970
971
|
className: j.listItem,
|
|
971
|
-
style: { backgroundColor:
|
|
972
|
-
}), /* @__PURE__ */
|
|
972
|
+
style: { backgroundColor: D?.contentColor || "#000000" }
|
|
973
|
+
}), /* @__PURE__ */ E("div", {
|
|
973
974
|
className: j.listVal,
|
|
974
975
|
style: {
|
|
975
|
-
fontWeight:
|
|
976
|
-
fontFamily:
|
|
977
|
-
color:
|
|
978
|
-
fontSize:
|
|
976
|
+
fontWeight: D?.contentWeight || 500,
|
|
977
|
+
fontFamily: D?.contentFont,
|
|
978
|
+
color: D?.contentColor || "#3A4555",
|
|
979
|
+
fontSize: D?.contentFontSize ? `${D?.contentFontSize}px` : $ ? "clamp(0.4rem, 5cqw, 0.875rem)" : "0.875rem"
|
|
979
980
|
},
|
|
980
981
|
children: [
|
|
981
|
-
|
|
982
|
-
F(e.column.id) ? String(
|
|
983
|
-
|
|
982
|
+
se,
|
|
983
|
+
F(e.column.id) ? String(_t(t, e.column.id) ?? "") : t,
|
|
984
|
+
ce
|
|
984
985
|
]
|
|
985
986
|
})]
|
|
986
|
-
}, t) })), Q(e.column.id,
|
|
987
|
+
}, t) })), Q(e.column.id, D.listColumns) && n.length > 3 && !a ? /* @__PURE__ */ E(h, {
|
|
987
988
|
variant: "popover",
|
|
988
989
|
className: `${j.truncateIcon} dbn:bg-gray`,
|
|
989
|
-
onClick: () =>
|
|
990
|
+
onClick: () => Bt((n) => {
|
|
990
991
|
let r = n.findIndex((t) => t.id === e.id);
|
|
991
992
|
return r === -1 ? [...n, {
|
|
992
993
|
id: e.id,
|
|
@@ -996,69 +997,69 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
996
997
|
isShowMore: !n[t]?.isShowMore
|
|
997
998
|
}, n);
|
|
998
999
|
}),
|
|
999
|
-
children: [/* @__PURE__ */
|
|
1000
|
+
children: [/* @__PURE__ */ T(d, {
|
|
1000
1001
|
name: "plus",
|
|
1001
1002
|
size: "xxs",
|
|
1002
1003
|
color: "secondary-dark"
|
|
1003
1004
|
}), n.length - 3]
|
|
1004
|
-
}) : null] }) : re() === "" ? /* @__PURE__ */ w
|
|
1005
|
+
}) : null] }) : re() === "" ? /* @__PURE__ */ T(w, {}) : /* @__PURE__ */ E("span", {
|
|
1005
1006
|
"data-testid": "cell-content",
|
|
1006
|
-
className: `${
|
|
1007
|
+
className: `${_} ${Q(e.column.id, D.badgeColumns) || b ? j.badge : ""} ${f && "text" in f && !m ? j.link : ""} ${j.customLink} ${ne && D?.textWrap?.enableLineBreaks ? j.textLineBreak : ""}`,
|
|
1007
1008
|
style: {
|
|
1008
|
-
fontFamily:
|
|
1009
|
-
color:
|
|
1010
|
-
...
|
|
1011
|
-
fontWeight:
|
|
1012
|
-
backgroundColor:
|
|
1013
|
-
fontSize:
|
|
1009
|
+
fontFamily: D?.contentFont,
|
|
1010
|
+
color: D?.contentColor || "var(--dbn-txt-primary, #252525)",
|
|
1011
|
+
...y,
|
|
1012
|
+
fontWeight: D?.contentWeight || 500,
|
|
1013
|
+
backgroundColor: le || "",
|
|
1014
|
+
fontSize: D?.contentFontSize ? `${D?.contentFontSize}px` : $ ? "clamp(0.4rem, 5cqw, 0.875rem)" : "0.875rem"
|
|
1014
1015
|
},
|
|
1015
|
-
children: [/* @__PURE__ */
|
|
1016
|
-
className: `${ne ? "" : "dbn:truncate"} ${
|
|
1016
|
+
children: [/* @__PURE__ */ E("span", {
|
|
1017
|
+
className: `${ne ? "" : "dbn:truncate"} ${m || ie ? "dbn:w-[90%]" : ""}`,
|
|
1017
1018
|
children: [
|
|
1018
|
-
|
|
1019
|
+
se,
|
|
1019
1020
|
re(),
|
|
1020
|
-
|
|
1021
|
+
ce
|
|
1021
1022
|
]
|
|
1022
|
-
}),
|
|
1023
|
+
}), m || ie ? /* @__PURE__ */ T(h, {
|
|
1023
1024
|
variant: "popover",
|
|
1024
1025
|
onClick: (t) => {
|
|
1025
|
-
Ze?.click && f && (t.preventDefault(), t.stopPropagation(),
|
|
1026
|
+
Ze?.click && f && (t.preventDefault(), t.stopPropagation(), ie ? ve({
|
|
1026
1027
|
isEnable: !0,
|
|
1027
|
-
route:
|
|
1028
|
-
isOpenInNewTab:
|
|
1029
|
-
}, e?.getValue()?.toString() ?? "") :
|
|
1028
|
+
route: p ?? "",
|
|
1029
|
+
isOpenInNewTab: g
|
|
1030
|
+
}, e?.getValue()?.toString() ?? "") : ye(p, g));
|
|
1030
1031
|
},
|
|
1031
1032
|
onContextMenu: (t) => {
|
|
1032
|
-
Ze?.click && f && (t.preventDefault(), t.stopPropagation(),
|
|
1033
|
+
Ze?.click && f && (t.preventDefault(), t.stopPropagation(), ie ? ve({
|
|
1033
1034
|
isEnable: !0,
|
|
1034
|
-
route:
|
|
1035
|
-
isOpenInNewTab:
|
|
1036
|
-
}, e?.getValue()?.toString() ?? "") :
|
|
1035
|
+
route: p ?? "",
|
|
1036
|
+
isOpenInNewTab: g
|
|
1037
|
+
}, e?.getValue()?.toString() ?? "") : ye(p, g));
|
|
1037
1038
|
},
|
|
1038
1039
|
containerClass: "dbn-interactive-element",
|
|
1039
|
-
className:
|
|
1040
|
-
leftIcon: /* @__PURE__ */
|
|
1041
|
-
name:
|
|
1040
|
+
className: m ? j.link : "",
|
|
1041
|
+
leftIcon: /* @__PURE__ */ T(d, {
|
|
1042
|
+
name: m ? "link" : "new-window",
|
|
1042
1043
|
size: "xs"
|
|
1043
1044
|
})
|
|
1044
1045
|
}) : null]
|
|
1045
1046
|
})
|
|
1046
1047
|
}),
|
|
1047
|
-
(!
|
|
1048
|
+
(!D || mt) && /* @__PURE__ */ T("div", {
|
|
1048
1049
|
style: {
|
|
1049
1050
|
textAlign: "center",
|
|
1050
1051
|
width: "100%",
|
|
1051
|
-
...
|
|
1052
|
-
color:
|
|
1053
|
-
height:
|
|
1054
|
-
fontWeight:
|
|
1055
|
-
fontSize:
|
|
1052
|
+
...mt ? {
|
|
1053
|
+
color: D?.contentColor || "var(--dbn-txt-primary, #252525)",
|
|
1054
|
+
height: Nt?.height || "24px",
|
|
1055
|
+
fontWeight: D?.contentWeight || 500,
|
|
1056
|
+
fontSize: D?.contentFontSize ? `${D?.contentFontSize}px` : $ ? "clamp(0.4rem, 5cqw, 0.875rem)" : "0.875rem"
|
|
1056
1057
|
} : {}
|
|
1057
1058
|
},
|
|
1058
1059
|
className: j.truncateText,
|
|
1059
|
-
children: F(e.column.id) ? String(
|
|
1060
|
+
children: F(e.column.id) ? String(_t(e.getValue(), e.column.id) ?? "") : pe(e.column.columnDef.cell, e.getContext())
|
|
1060
1061
|
}),
|
|
1061
|
-
e.column.getCanResize() &&
|
|
1062
|
+
e.column.getCanResize() && D?.hideTableHeader ? /* @__PURE__ */ T("div", {
|
|
1062
1063
|
className: "resizer",
|
|
1063
1064
|
style: {
|
|
1064
1065
|
position: "absolute",
|
|
@@ -1091,68 +1092,68 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1091
1092
|
})
|
|
1092
1093
|
}, t.id);
|
|
1093
1094
|
}),
|
|
1094
|
-
|
|
1095
|
-
colSpan:
|
|
1095
|
+
sn > 0 ? /* @__PURE__ */ T("tr", { children: /* @__PURE__ */ T("td", {
|
|
1096
|
+
colSpan: cn,
|
|
1096
1097
|
style: {
|
|
1097
|
-
height: `${
|
|
1098
|
+
height: `${sn}px`,
|
|
1098
1099
|
padding: 0,
|
|
1099
1100
|
border: 0
|
|
1100
1101
|
}
|
|
1101
1102
|
}) }) : null
|
|
1102
1103
|
] }) }) : null,
|
|
1103
|
-
|
|
1104
|
+
D?.aggregateRow?.isEnable && D?.aggregateRow?.columns?.length ? /* @__PURE__ */ T("tfoot", { children: /* @__PURE__ */ T("tr", {
|
|
1104
1105
|
"data-testid": "table-footer-row",
|
|
1105
|
-
"aria-rowindex":
|
|
1106
|
-
className: `${j.foot} ${
|
|
1106
|
+
"aria-rowindex": Sn.ariaRowCount,
|
|
1107
|
+
className: `${j.foot} ${D?.showRowHover ? j.rowHover : ""}`,
|
|
1107
1108
|
children: K.getHeaderGroups()[0]?.headers?.map((e, t) => {
|
|
1108
|
-
let n = e.id, r =
|
|
1109
|
-
if (t === 0) a =
|
|
1109
|
+
let n = e.id, r = D.aggregateRow?.columns?.includes(n), i = D?.textWrap?.isEnable && D?.textWrap?.columns?.includes(e?.id), a = "", o = j.truncateText;
|
|
1110
|
+
if (t === 0) a = D.aggregateRow?.label || "Total";
|
|
1110
1111
|
else if (r) {
|
|
1111
|
-
let e =
|
|
1112
|
+
let e = D.aggregateRow?.function || "SUM", t = rn?.map((e) => {
|
|
1112
1113
|
let t = e.original[n];
|
|
1113
1114
|
return typeof t == "number" ? t : parseFloat(t);
|
|
1114
1115
|
})?.filter((e) => !isNaN(e));
|
|
1115
|
-
a =
|
|
1116
|
-
let r =
|
|
1117
|
-
if (a !== "" && F(n)) a = String(
|
|
1118
|
-
else if (a !== "" &&
|
|
1119
|
-
let e = $e?.length ? $e?.find((e) => e?.measures?.includes(n)) : void 0, t = e?.numberFormatter || r?.formatter ||
|
|
1120
|
-
a = `${s}${
|
|
1116
|
+
a = v(t, e);
|
|
1117
|
+
let r = D?.tableNumberFormatter?.find((e) => e.columns?.includes(n));
|
|
1118
|
+
if (a !== "" && F(n)) a = String(_t(a, n) ?? "");
|
|
1119
|
+
else if (a !== "" && D?.isEnableNumberFormatting && (r || D?.formattedColumns?.includes(n))) {
|
|
1120
|
+
let e = $e?.length ? $e?.find((e) => e?.measures?.includes(n)) : void 0, t = e?.numberFormatter || r?.formatter || D?.tableFormatter, s = e?.prefix || r?.prefix || D?.tablePrefix || "", c = e?.suffix || r?.suffix || D?.tableSuffix || "";
|
|
1121
|
+
a = `${s}${oe(Number(a) || 0, t)}${c}`, i && (o = D?.hideTableHeader && D?.isHideHorizontalScroll ? j.wrapCellText : j.wrapText);
|
|
1121
1122
|
}
|
|
1122
1123
|
}
|
|
1123
|
-
return /* @__PURE__ */
|
|
1124
|
+
return /* @__PURE__ */ T("td", {
|
|
1124
1125
|
"data-testid": `${e.id}-footer`,
|
|
1125
|
-
className: `${
|
|
1126
|
+
className: `${D?.hideHorizontalDivider ? "" : j.tableBorderBottom} ${j.tableRowCol} ${D?.hideVerticalDivider ? "" : j.tableBorderRight} ${D?.isRemovePadding ? "" : j.horizontalPadding}`,
|
|
1126
1127
|
style: {
|
|
1127
1128
|
backgroundColor: "#fafbfc",
|
|
1128
|
-
...
|
|
1129
|
-
width:
|
|
1129
|
+
...D?.hideTableHeader ? {
|
|
1130
|
+
width: D?.isHideHorizontalScroll ? `${e.getSize() / K.getTotalSize() * 100}%` : $ && G?.length < 6 ? `clamp(
|
|
1130
1131
|
50px,
|
|
1131
1132
|
5cqw,
|
|
1132
1133
|
${e.getSize()}px
|
|
1133
1134
|
)` : e.getSize(),
|
|
1134
1135
|
position: "relative",
|
|
1135
|
-
...
|
|
1136
|
-
paddingLeft: `${
|
|
1137
|
-
paddingRight: `${
|
|
1136
|
+
...D?.isRemovePadding && D?.horizontalCellPadding ? {
|
|
1137
|
+
paddingLeft: `${D?.horizontalCellPadding}rem`,
|
|
1138
|
+
paddingRight: `${D?.horizontalCellPadding}rem`
|
|
1138
1139
|
} : {}
|
|
1139
1140
|
} : {}
|
|
1140
1141
|
},
|
|
1141
|
-
children: /* @__PURE__ */
|
|
1142
|
+
children: /* @__PURE__ */ T("div", {
|
|
1142
1143
|
style: {
|
|
1143
|
-
...
|
|
1144
|
-
...
|
|
1144
|
+
...Nt,
|
|
1145
|
+
...D?.isSepAlign && Object.keys(D?.colAlignments || []).includes(e.id) ? { justifyContent: D?.colAlignments?.[e.id] } : {}
|
|
1145
1146
|
},
|
|
1146
|
-
children: /* @__PURE__ */
|
|
1147
|
+
children: /* @__PURE__ */ T("span", {
|
|
1147
1148
|
"data-testid": "footer-content",
|
|
1148
|
-
className: `${o} ${i &&
|
|
1149
|
+
className: `${o} ${i && D?.textWrap?.enableLineBreaks ? j.textLineBreak : ""}`,
|
|
1149
1150
|
style: {
|
|
1150
|
-
fontFamily:
|
|
1151
|
-
color:
|
|
1152
|
-
fontWeight:
|
|
1153
|
-
fontSize:
|
|
1151
|
+
fontFamily: D?.contentFont,
|
|
1152
|
+
color: D?.contentColor || "var(--dbn-txt-primary, #252525)",
|
|
1153
|
+
fontWeight: D?.contentWeight || 500,
|
|
1154
|
+
fontSize: D?.contentFontSize ? `${D?.contentFontSize}px` : $ ? "clamp(0.4rem, 5cqw, 0.875rem)" : "0.875rem"
|
|
1154
1155
|
},
|
|
1155
|
-
children: /* @__PURE__ */
|
|
1156
|
+
children: /* @__PURE__ */ T("span", {
|
|
1156
1157
|
className: `${i ? "" : "dbn:truncate"}`,
|
|
1157
1158
|
children: a
|
|
1158
1159
|
})
|
|
@@ -1163,17 +1164,17 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1163
1164
|
}, "footer-row") }) : null
|
|
1164
1165
|
]
|
|
1165
1166
|
}),
|
|
1166
|
-
!R?.length &&
|
|
1167
|
+
!R?.length && D?.isEnableColumnFilter && !S && !C.length && !Qt && !W?.length && (P?.[0] || B?.[0]) ? /* @__PURE__ */ T("div", {
|
|
1167
1168
|
className: `${j.emptyFilterData} dbn:flex dbn:flex-col dbn:justify-center dbn:items-center dbn:w-full dbn:p-8`,
|
|
1168
|
-
children: /* @__PURE__ */
|
|
1169
|
+
children: /* @__PURE__ */ T(x, {
|
|
1169
1170
|
height: "80px",
|
|
1170
1171
|
message: "No data found.",
|
|
1171
1172
|
subText: "Try modifying the filter, sort or client."
|
|
1172
1173
|
})
|
|
1173
1174
|
}) : null,
|
|
1174
|
-
!W?.length && e?.length && (P?.[0] || B?.[0]) && !
|
|
1175
|
+
!W?.length && e?.length && (P?.[0] || B?.[0]) && !S && !C.length && !Qt ? /* @__PURE__ */ T("div", {
|
|
1175
1176
|
className: "dbn:flex dbn:flex-col dbn:justify-center dbn:items-center dbn:w-full dbn:p-8",
|
|
1176
|
-
children: /* @__PURE__ */
|
|
1177
|
+
children: /* @__PURE__ */ T(x, {
|
|
1177
1178
|
height: "80px",
|
|
1178
1179
|
message: "No data found.",
|
|
1179
1180
|
subText: "Try modifying your search query."
|
|
@@ -1181,46 +1182,46 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1181
1182
|
}) : null
|
|
1182
1183
|
]
|
|
1183
1184
|
}),
|
|
1184
|
-
!e?.length && !
|
|
1185
|
+
!e?.length && !D?.isEnableColumnFilter && !S && !C.length && !Qt && /* @__PURE__ */ T("div", {
|
|
1185
1186
|
className: "dbn:w-full dbn:h-full dbn:overflow-y-auto dbn:items-center dbn:justify-center dbn:p-6",
|
|
1186
|
-
children: /* @__PURE__ */
|
|
1187
|
+
children: /* @__PURE__ */ T(x, {
|
|
1187
1188
|
height: "80px",
|
|
1188
1189
|
message: "No data tables queried",
|
|
1189
1190
|
subText: "Type your query and input fields beside to generate results\n and explore data"
|
|
1190
1191
|
})
|
|
1191
1192
|
}),
|
|
1192
|
-
|
|
1193
|
+
C && /* @__PURE__ */ T("div", {
|
|
1193
1194
|
className: j.error,
|
|
1194
|
-
children: /* @__PURE__ */
|
|
1195
|
+
children: /* @__PURE__ */ T(g, { children: C })
|
|
1195
1196
|
})
|
|
1196
1197
|
]
|
|
1197
1198
|
}),
|
|
1198
|
-
e && !
|
|
1199
|
-
className: `${j.pagination} ${
|
|
1199
|
+
e && !D?.disablePagination && (!Ue || D?.isServerSidePagination) && /* @__PURE__ */ E("div", {
|
|
1200
|
+
className: `${j.pagination} ${D?.isAutoPagination ? "dbn:pl-2" : ""} ${D?.paginationPosition === "top" ? "dbn:py-0" : ""}`,
|
|
1200
1201
|
style: {
|
|
1201
|
-
marginRight: `${
|
|
1202
|
-
order:
|
|
1202
|
+
marginRight: `${ut ? "70px" : ""}`,
|
|
1203
|
+
order: D?.paginationPosition === "top" ? 2 : 3
|
|
1203
1204
|
},
|
|
1204
1205
|
children: [
|
|
1205
|
-
|
|
1206
|
+
D?.isAutoPagination ? null : /* @__PURE__ */ T("div", {
|
|
1206
1207
|
className: `dbn-interactive-element ${j.rowStyle}`,
|
|
1207
|
-
children: /* @__PURE__ */
|
|
1208
|
+
children: /* @__PURE__ */ T(c, {
|
|
1208
1209
|
id: "rows-per-page",
|
|
1209
1210
|
"aria-label": "Rows per page",
|
|
1210
|
-
customButton: /* @__PURE__ */
|
|
1211
|
+
customButton: /* @__PURE__ */ E("div", {
|
|
1211
1212
|
className: "dbn:flex dbn:gap-3",
|
|
1212
1213
|
title: z?.value,
|
|
1213
|
-
children: [/* @__PURE__ */
|
|
1214
|
+
children: [/* @__PURE__ */ T(g, {
|
|
1214
1215
|
variant: "body-text-3",
|
|
1215
1216
|
children: "Rows per page:"
|
|
1216
|
-
}), /* @__PURE__ */
|
|
1217
|
+
}), /* @__PURE__ */ T(g, {
|
|
1217
1218
|
variant: "body-text-3",
|
|
1218
1219
|
children: z?.value
|
|
1219
1220
|
})]
|
|
1220
1221
|
}),
|
|
1221
1222
|
className: "dbn:border-none",
|
|
1222
1223
|
onChange: (e) => {
|
|
1223
|
-
|
|
1224
|
+
Ut(e), k?.(!1, parseInt(e.value, 10)), Ve?.((t) => ({
|
|
1224
1225
|
...t,
|
|
1225
1226
|
tableSettings: {
|
|
1226
1227
|
...t.tableSettings,
|
|
@@ -1229,23 +1230,23 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1229
1230
|
}));
|
|
1230
1231
|
},
|
|
1231
1232
|
selectedOption: z,
|
|
1232
|
-
options:
|
|
1233
|
+
options: _,
|
|
1233
1234
|
labelVariant: "static",
|
|
1234
1235
|
menuWidth: "120px",
|
|
1235
1236
|
buttonWidth: z?.value === "1000" ? "165px" : "150px",
|
|
1236
1237
|
menuZIndex: Qe
|
|
1237
1238
|
})
|
|
1238
1239
|
}),
|
|
1239
|
-
|
|
1240
|
+
S ? null : A && e.length && hn ? /* @__PURE__ */ E("span", {
|
|
1240
1241
|
className: j.pageStyle,
|
|
1241
1242
|
children: [
|
|
1242
1243
|
N.offset + 1,
|
|
1243
1244
|
"-",
|
|
1244
1245
|
N.offset + e.length,
|
|
1245
1246
|
" of ",
|
|
1246
|
-
|
|
1247
|
+
hn
|
|
1247
1248
|
]
|
|
1248
|
-
}) : Y.from && Y.to && Y.total ? /* @__PURE__ */
|
|
1249
|
+
}) : Y.from && Y.to && Y.total ? /* @__PURE__ */ E("span", {
|
|
1249
1250
|
className: j.pageStyle,
|
|
1250
1251
|
children: [
|
|
1251
1252
|
Y.from,
|
|
@@ -1256,12 +1257,12 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1256
1257
|
Y.total
|
|
1257
1258
|
]
|
|
1258
1259
|
}) : null,
|
|
1259
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ E("div", {
|
|
1260
1261
|
className: "dbn-interactive-element dbn:flex dbn:gap-2 dbn:justify-center dbn:items-center",
|
|
1261
|
-
children: [/* @__PURE__ */
|
|
1262
|
+
children: [/* @__PURE__ */ E("div", {
|
|
1262
1263
|
className: j.buttonContainer,
|
|
1263
1264
|
children: [
|
|
1264
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ T(h, {
|
|
1265
1266
|
id: "jump-to-start",
|
|
1266
1267
|
"aria-label": s.start,
|
|
1267
1268
|
title: s.start,
|
|
@@ -1272,15 +1273,15 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1272
1273
|
A ? k?.(!0, void 0, 0) : K.setPageIndex(0);
|
|
1273
1274
|
},
|
|
1274
1275
|
isDisabled: A ? !ze || Z === 0 : Y.from <= 1,
|
|
1275
|
-
children: /* @__PURE__ */
|
|
1276
|
+
children: /* @__PURE__ */ T(d, {
|
|
1276
1277
|
size: "small",
|
|
1277
1278
|
name: "double-arrow-left"
|
|
1278
1279
|
})
|
|
1279
1280
|
}),
|
|
1280
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ E("div", {
|
|
1281
1282
|
className: j.pageBtns,
|
|
1282
1283
|
children: [
|
|
1283
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ T(h, {
|
|
1284
1285
|
id: "jump-to-prev",
|
|
1285
1286
|
"aria-label": s.prev,
|
|
1286
1287
|
title: s.prev,
|
|
@@ -1292,44 +1293,44 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1292
1293
|
},
|
|
1293
1294
|
isDisabled: A ? !ze || Z === 0 : Y.from <= 1,
|
|
1294
1295
|
style: { height: "calc(1.75rem - 1.6px)" },
|
|
1295
|
-
children: /* @__PURE__ */
|
|
1296
|
+
children: /* @__PURE__ */ T(d, {
|
|
1296
1297
|
size: "small",
|
|
1297
1298
|
name: "caret-left"
|
|
1298
1299
|
})
|
|
1299
1300
|
}),
|
|
1300
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ T("div", {
|
|
1301
1302
|
className: j.pageInfo,
|
|
1302
|
-
children:
|
|
1303
|
+
children: Xt ? /* @__PURE__ */ T(ee, {
|
|
1303
1304
|
type: "number",
|
|
1304
|
-
value:
|
|
1305
|
+
value: vn,
|
|
1305
1306
|
min: 1,
|
|
1306
1307
|
max: A ? X : K.getPageCount(),
|
|
1307
1308
|
onChange: (e) => {
|
|
1308
1309
|
let t = Math.min(Number(e.target.value), A ? X : K.getPageCount());
|
|
1309
|
-
t === 0 && (t = 1),
|
|
1310
|
+
t === 0 && (t = 1), yn(t);
|
|
1310
1311
|
},
|
|
1311
1312
|
onKeyDown: (e) => {
|
|
1312
|
-
e.key == "Enter" && (A ? k?.(!0, void 0, (
|
|
1313
|
+
e.key == "Enter" && (A ? k?.(!0, void 0, (vn - 1) * N.limit) : K.setPageIndex(vn - 1), Zt(!1));
|
|
1313
1314
|
},
|
|
1314
1315
|
style: { height: "calc(1.75rem - 1.6px)" },
|
|
1315
1316
|
className: "dbn:text-xs dbn:w-full dbn:rounded-none",
|
|
1316
1317
|
containerClassName: "dbn:border-none dbn:outline-hidden "
|
|
1317
|
-
}) : /* @__PURE__ */
|
|
1318
|
+
}) : /* @__PURE__ */ E("div", {
|
|
1318
1319
|
className: "dbn:flex dbn:gap-1 dbn:px-1 dbn:overflow-x-hidden",
|
|
1319
|
-
onClick: () =>
|
|
1320
|
+
onClick: () => Zt(!0),
|
|
1320
1321
|
title: `${A ? Z + 1 : J + 1} of ${A ? X : K.getPageCount()}`,
|
|
1321
1322
|
children: [
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ T(g, {
|
|
1323
1324
|
variant: "body-text-3",
|
|
1324
1325
|
className: "dbn:font-medium dbn:truncate",
|
|
1325
1326
|
children: A ? Z + 1 : J + 1
|
|
1326
1327
|
}),
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
+
/* @__PURE__ */ T(g, {
|
|
1328
1329
|
variant: "body-text-3",
|
|
1329
1330
|
className: "dbn:font-medium",
|
|
1330
1331
|
children: "of"
|
|
1331
1332
|
}),
|
|
1332
|
-
/* @__PURE__ */
|
|
1333
|
+
/* @__PURE__ */ T(g, {
|
|
1333
1334
|
variant: "body-text-3",
|
|
1334
1335
|
className: "dbn:font-medium dbn:truncate",
|
|
1335
1336
|
children: A ? X : K.getPageCount()
|
|
@@ -1337,7 +1338,7 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1337
1338
|
]
|
|
1338
1339
|
})
|
|
1339
1340
|
}),
|
|
1340
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ T(h, {
|
|
1341
1342
|
id: "jump-to-next",
|
|
1342
1343
|
"aria-label": s.next,
|
|
1343
1344
|
title: s.next,
|
|
@@ -1349,14 +1350,14 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1349
1350
|
},
|
|
1350
1351
|
isDisabled: A ? !Ie || Z === X - 1 : Y.to >= Y.total,
|
|
1351
1352
|
style: { height: "calc(1.75rem - 1.6px)" },
|
|
1352
|
-
children: /* @__PURE__ */
|
|
1353
|
+
children: /* @__PURE__ */ T(d, {
|
|
1353
1354
|
size: "small",
|
|
1354
1355
|
name: "caret-right"
|
|
1355
1356
|
})
|
|
1356
1357
|
})
|
|
1357
1358
|
]
|
|
1358
1359
|
}),
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ T(h, {
|
|
1360
1361
|
id: "jump-to-end",
|
|
1361
1362
|
"aria-label": s.end,
|
|
1362
1363
|
title: s.end,
|
|
@@ -1367,15 +1368,15 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1367
1368
|
A ? k?.(!1, void 0, (X - 1) * N.limit) : K.setPageIndex(K.getPageCount() - 1);
|
|
1368
1369
|
},
|
|
1369
1370
|
isDisabled: A ? !Ie || Z === X - 1 : Y.to >= Y.total,
|
|
1370
|
-
children: /* @__PURE__ */
|
|
1371
|
+
children: /* @__PURE__ */ T(d, {
|
|
1371
1372
|
size: "small",
|
|
1372
1373
|
name: "double-arrow-right"
|
|
1373
1374
|
})
|
|
1374
1375
|
})
|
|
1375
1376
|
]
|
|
1376
|
-
}), qe && /* @__PURE__ */
|
|
1377
|
+
}), qe && /* @__PURE__ */ T("div", {
|
|
1377
1378
|
className: j.isFullScreenEnabled,
|
|
1378
|
-
children: Ke && /* @__PURE__ */
|
|
1379
|
+
children: Ke && /* @__PURE__ */ T(h, {
|
|
1379
1380
|
type: "button",
|
|
1380
1381
|
variant: "popover",
|
|
1381
1382
|
className: Ae.cardControl,
|
|
@@ -1386,47 +1387,47 @@ var E = "dbn:", D = `${E}metric.fullscreen.settings`, O = `${E}embed.disableClic
|
|
|
1386
1387
|
defaultRowSize: `${z.value}`
|
|
1387
1388
|
}), Ye?.();
|
|
1388
1389
|
},
|
|
1389
|
-
leftIcon: /* @__PURE__ */
|
|
1390
|
+
leftIcon: /* @__PURE__ */ T("div", {
|
|
1390
1391
|
className: j.fullScreenBtn,
|
|
1391
|
-
children: /* @__PURE__ */
|
|
1392
|
+
children: /* @__PURE__ */ T(d, { name: "fullscreen" })
|
|
1392
1393
|
})
|
|
1393
1394
|
})
|
|
1394
1395
|
})]
|
|
1395
1396
|
})
|
|
1396
1397
|
]
|
|
1397
1398
|
}),
|
|
1398
|
-
Ue && !
|
|
1399
|
+
Ue && !D?.isServerSidePagination && e && (e.length > Wt || Ge && e.length) ? /* @__PURE__ */ T("div", {
|
|
1399
1400
|
className: "dbn:p-2.5 dbn:px-5 dbn:flex dbn:justify-end",
|
|
1400
1401
|
style: { order: 4 },
|
|
1401
|
-
children: /* @__PURE__ */
|
|
1402
|
+
children: /* @__PURE__ */ E(h, {
|
|
1402
1403
|
variant: "secondary",
|
|
1403
1404
|
type: "button",
|
|
1404
1405
|
onClick: () => {
|
|
1405
|
-
We ? We() :
|
|
1406
|
+
We ? We() : Gt((e) => e + 50);
|
|
1406
1407
|
},
|
|
1407
1408
|
className: j.loadMore,
|
|
1408
|
-
children: ["Load More", /* @__PURE__ */
|
|
1409
|
+
children: ["Load More", /* @__PURE__ */ T(d, { name: "double-arrow-right" })]
|
|
1409
1410
|
})
|
|
1410
1411
|
}) : null
|
|
1411
1412
|
]
|
|
1412
|
-
}), /* @__PURE__ */
|
|
1413
|
-
isOpen:
|
|
1413
|
+
}), /* @__PURE__ */ E(re, {
|
|
1414
|
+
isOpen: St?.isShow,
|
|
1414
1415
|
onClose: () => {
|
|
1415
|
-
|
|
1416
|
+
Ct({
|
|
1416
1417
|
isShow: !1,
|
|
1417
1418
|
data: []
|
|
1418
1419
|
});
|
|
1419
1420
|
},
|
|
1420
1421
|
headerTitle: "View Details",
|
|
1421
1422
|
zIndex: 9999999999,
|
|
1422
|
-
children: [/* @__PURE__ */
|
|
1423
|
+
children: [/* @__PURE__ */ T("div", {
|
|
1423
1424
|
className: "dbn:w-[600px] dbn:p-6 dbn:max-h-[400px] dbn:overflow-y-auto",
|
|
1424
|
-
children: /* @__PURE__ */
|
|
1425
|
-
}), /* @__PURE__ */
|
|
1425
|
+
children: /* @__PURE__ */ T(ke, { data: St?.data || [] })
|
|
1426
|
+
}), /* @__PURE__ */ T(ne, { children: /* @__PURE__ */ T(h, {
|
|
1426
1427
|
variant: "secondary",
|
|
1427
1428
|
className: "cta-secondary",
|
|
1428
1429
|
onClick: () => {
|
|
1429
|
-
|
|
1430
|
+
Ct({
|
|
1430
1431
|
isShow: !1,
|
|
1431
1432
|
data: []
|
|
1432
1433
|
});
|