@3sc/common-component 0.0.47 → 0.0.48
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/index.es.js +76 -76
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -19087,7 +19087,7 @@ $e.default = $e;
|
|
|
19087
19087
|
const Ma = {
|
|
19088
19088
|
NOTIFICATION: "/notifications"
|
|
19089
19089
|
}, Ba = {
|
|
19090
|
-
BASE_URL: "https://
|
|
19090
|
+
BASE_URL: "https://qa.3sc.ai/api",
|
|
19091
19091
|
//VERSION: import.meta.env.VITE_APP_VERSION,
|
|
19092
19092
|
// BASE_URL: "https://scai-qa-api.3sc.ai",
|
|
19093
19093
|
VERSION: "/v1"
|
|
@@ -22419,75 +22419,7 @@ const MT = ({ option: e, value: t, handleSelectChange: n, ...r }) => /* @__PURE_
|
|
|
22419
22419
|
}
|
|
22420
22420
|
)
|
|
22421
22421
|
] });
|
|
22422
|
-
}, jT = (
|
|
22423
|
-
const o = et(() => {
|
|
22424
|
-
let s = {}, a = ["channel_id", "node_id", "sku_id"];
|
|
22425
|
-
return (e == null ? void 0 : e.length) > 0 && e.forEach((l) => {
|
|
22426
|
-
Object.keys(l).filter((c) => !a.includes(c)).forEach((c) => {
|
|
22427
|
-
c === "custom" ? l[c] && Object.keys(l[c]).forEach((u) => {
|
|
22428
|
-
typeof l[c][u] == "object" ? u in s ? Object.keys(l[c][u]).map((d) => {
|
|
22429
|
-
typeof l[c][u][d] != "object" && (s[u][d] = d);
|
|
22430
|
-
}) : Object.keys(l[c][u]).forEach((d) => {
|
|
22431
|
-
typeof l[c][u][d] != "object" ? (s[u] = {}, s[u][d] = d) : Array.isArray(l[c][u][d]) && (s[u] = [
|
|
22432
|
-
.../* @__PURE__ */ new Set([
|
|
22433
|
-
...s[u] ?? [],
|
|
22434
|
-
...l[c][u][d]
|
|
22435
|
-
])
|
|
22436
|
-
]);
|
|
22437
|
-
}) : u in s || (s[u] = u);
|
|
22438
|
-
}) : l[c] && !(c in s) && (s[c] = c);
|
|
22439
|
-
});
|
|
22440
|
-
}), /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
|
|
22441
|
-
/* @__PURE__ */ x.jsxs("thead", { children: [
|
|
22442
|
-
/* @__PURE__ */ x.jsxs("tr", { children: [
|
|
22443
|
-
Object.keys(s).map((l) => {
|
|
22444
|
-
if (typeof s[l] != "object")
|
|
22445
|
-
return /* @__PURE__ */ x.jsx("th", { rowSpan: 2, children: /* @__PURE__ */ x.jsxs("span", { onClick: () => t(l), children: [
|
|
22446
|
-
es(l),
|
|
22447
|
-
/* @__PURE__ */ x.jsx(
|
|
22448
|
-
jT,
|
|
22449
|
-
{
|
|
22450
|
-
column: l,
|
|
22451
|
-
sortKey: r,
|
|
22452
|
-
sortDir: n
|
|
22453
|
-
}
|
|
22454
|
-
)
|
|
22455
|
-
] }) });
|
|
22456
|
-
}),
|
|
22457
|
-
Object.keys(s).map((l) => {
|
|
22458
|
-
if (typeof s[l] == "object")
|
|
22459
|
-
return /* @__PURE__ */ x.jsx("th", { colSpan: Object.keys(s[l]).length, children: es(l) });
|
|
22460
|
-
})
|
|
22461
|
-
] }),
|
|
22462
|
-
/* @__PURE__ */ x.jsx("tr", { children: Object.keys(s).map((l) => {
|
|
22463
|
-
if (typeof s[l] == "object")
|
|
22464
|
-
return Object.keys(s[l]).map((c) => /* @__PURE__ */ x.jsx("th", { children: es(s[l][c]) }));
|
|
22465
|
-
}) })
|
|
22466
|
-
] }),
|
|
22467
|
-
/* @__PURE__ */ x.jsx("tbody", { children: /* @__PURE__ */ x.jsx(x.Fragment, { children: e.map((l, c) => /* @__PURE__ */ x.jsxs("tr", { children: [
|
|
22468
|
-
l.sku_name && /* @__PURE__ */ x.jsx("td", { children: l.sku_name }),
|
|
22469
|
-
l.node && /* @__PURE__ */ x.jsx("td", { children: l.node }),
|
|
22470
|
-
l.channel_name && /* @__PURE__ */ x.jsx("td", { children: l.channel_name }),
|
|
22471
|
-
(l == null ? void 0 : l.custom) && Object.keys(s).map((u) => {
|
|
22472
|
-
var d;
|
|
22473
|
-
if (!["sku_name", "node", "channel_name"].includes(u))
|
|
22474
|
-
return typeof s[u] == "object" ? u in (l == null ? void 0 : l.custom) ? Array.isArray(s[u]) ? s[u].map((p) => {
|
|
22475
|
-
var f, h, m, g, b;
|
|
22476
|
-
return /* @__PURE__ */ x.jsx(x.Fragment, { children: p in ((h = (f = l == null ? void 0 : l.custom) == null ? void 0 : f[u]) == null ? void 0 : h.data) ? /* @__PURE__ */ x.jsx("td", { children: (b = (g = (m = l == null ? void 0 : l.custom) == null ? void 0 : m[u]) == null ? void 0 : g.data) == null ? void 0 : b[p] }) : /* @__PURE__ */ x.jsx("td", { children: "—" }) });
|
|
22477
|
-
}) : Object.keys(s[u]).map(
|
|
22478
|
-
(p) => {
|
|
22479
|
-
var f, h, m;
|
|
22480
|
-
return /* @__PURE__ */ x.jsx(x.Fragment, { children: p in ((f = l == null ? void 0 : l.custom) == null ? void 0 : f[u]) ? /* @__PURE__ */ x.jsx("td", { children: (m = (h = l == null ? void 0 : l.custom) == null ? void 0 : h[u]) == null ? void 0 : m[p] }) : /* @__PURE__ */ x.jsx("td", { children: "—" }) });
|
|
22481
|
-
}
|
|
22482
|
-
) : Object.keys(s[u]).map(
|
|
22483
|
-
(p) => /* @__PURE__ */ x.jsx(x.Fragment, { children: /* @__PURE__ */ x.jsx("td", { children: "—" }) })
|
|
22484
|
-
) : /* @__PURE__ */ x.jsx(x.Fragment, { children: u in (l == null ? void 0 : l.custom) ? /* @__PURE__ */ x.jsx("td", { children: (d = l == null ? void 0 : l.custom) == null ? void 0 : d[u] }) : /* @__PURE__ */ x.jsx("td", { children: "—" }) });
|
|
22485
|
-
})
|
|
22486
|
-
] }, c)) }) })
|
|
22487
|
-
] });
|
|
22488
|
-
}, [e]);
|
|
22489
|
-
return /* @__PURE__ */ x.jsx("div", { className: "scai-common-component-table-container", children: /* @__PURE__ */ x.jsx("table", { className: "table-notification", children: o() }) });
|
|
22490
|
-
}, VT = (e) => ({
|
|
22422
|
+
}, jT = (e) => ({
|
|
22491
22423
|
...e,
|
|
22492
22424
|
borderRadius: 2,
|
|
22493
22425
|
colors: {
|
|
@@ -22542,7 +22474,7 @@ Ua.propTypes = {
|
|
|
22542
22474
|
isSearchable: i.bool
|
|
22543
22475
|
};
|
|
22544
22476
|
Ua.defaultProps = {
|
|
22545
|
-
theme:
|
|
22477
|
+
theme: jT,
|
|
22546
22478
|
id: "cusom-select-container",
|
|
22547
22479
|
name: "cusom-select-name",
|
|
22548
22480
|
placeholder: "Show 10 rows",
|
|
@@ -22553,7 +22485,7 @@ Ua.defaultProps = {
|
|
|
22553
22485
|
disabled: !1,
|
|
22554
22486
|
isSearchable: !1
|
|
22555
22487
|
};
|
|
22556
|
-
const
|
|
22488
|
+
const _T = ({
|
|
22557
22489
|
rowLength: e,
|
|
22558
22490
|
disabled: t,
|
|
22559
22491
|
setRowLength: n,
|
|
@@ -22578,8 +22510,76 @@ const LT = ({
|
|
|
22578
22510
|
disabled: t
|
|
22579
22511
|
}
|
|
22580
22512
|
) }) };
|
|
22513
|
+
}, VT = ({ sortKey: e, sortDir: t, column: n }) => /* @__PURE__ */ x.jsx(x.Fragment, { children: e === n ? t ? /* @__PURE__ */ x.jsx("i", { className: "fa fa-arrow-down", "aria-hidden": "true" }) : /* @__PURE__ */ x.jsx("i", { className: "fa fa-arrow-up", "aria-hidden": "true" }) : /* @__PURE__ */ x.jsx(x.Fragment, { children: /* @__PURE__ */ x.jsx("i", { className: "fa fa-sort", "aria-hidden": "true" }) }) }), LT = ({ data: e, handleSort: t, sortDir: n, sortKey: r }) => {
|
|
22514
|
+
const o = et(() => {
|
|
22515
|
+
let s = {}, a = ["channel_id", "node_id", "sku_id"];
|
|
22516
|
+
return (e == null ? void 0 : e.length) > 0 && e.forEach((l) => {
|
|
22517
|
+
Object.keys(l).filter((c) => !a.includes(c)).forEach((c) => {
|
|
22518
|
+
c === "custom" ? l[c] && Object.keys(l[c]).forEach((u) => {
|
|
22519
|
+
typeof l[c][u] == "object" ? u in s ? Object.keys(l[c][u]).map((d) => {
|
|
22520
|
+
typeof l[c][u][d] != "object" && (s[u][d] = d);
|
|
22521
|
+
}) : Object.keys(l[c][u]).forEach((d) => {
|
|
22522
|
+
typeof l[c][u][d] != "object" ? (s[u] = {}, s[u][d] = d) : Array.isArray(l[c][u][d]) && (s[u] = [
|
|
22523
|
+
.../* @__PURE__ */ new Set([
|
|
22524
|
+
...s[u] ?? [],
|
|
22525
|
+
...l[c][u][d]
|
|
22526
|
+
])
|
|
22527
|
+
]);
|
|
22528
|
+
}) : u in s || (s[u] = u);
|
|
22529
|
+
}) : l[c] && !(c in s) && (s[c] = c);
|
|
22530
|
+
});
|
|
22531
|
+
}), /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
|
|
22532
|
+
/* @__PURE__ */ x.jsxs("thead", { children: [
|
|
22533
|
+
/* @__PURE__ */ x.jsxs("tr", { children: [
|
|
22534
|
+
Object.keys(s).map((l) => {
|
|
22535
|
+
if (typeof s[l] != "object")
|
|
22536
|
+
return /* @__PURE__ */ x.jsx("th", { rowSpan: 2, children: /* @__PURE__ */ x.jsxs("span", { onClick: () => t(l), children: [
|
|
22537
|
+
es(l),
|
|
22538
|
+
/* @__PURE__ */ x.jsx(
|
|
22539
|
+
VT,
|
|
22540
|
+
{
|
|
22541
|
+
column: l,
|
|
22542
|
+
sortKey: r,
|
|
22543
|
+
sortDir: n
|
|
22544
|
+
}
|
|
22545
|
+
)
|
|
22546
|
+
] }) });
|
|
22547
|
+
}),
|
|
22548
|
+
Object.keys(s).map((l) => {
|
|
22549
|
+
if (typeof s[l] == "object")
|
|
22550
|
+
return /* @__PURE__ */ x.jsx("th", { colSpan: Object.keys(s[l]).length, children: es(l) });
|
|
22551
|
+
})
|
|
22552
|
+
] }),
|
|
22553
|
+
/* @__PURE__ */ x.jsx("tr", { children: Object.keys(s).map((l) => {
|
|
22554
|
+
if (typeof s[l] == "object")
|
|
22555
|
+
return Object.keys(s[l]).map((c) => /* @__PURE__ */ x.jsx("th", { children: es(s[l][c]) }));
|
|
22556
|
+
}) })
|
|
22557
|
+
] }),
|
|
22558
|
+
/* @__PURE__ */ x.jsx("tbody", { children: /* @__PURE__ */ x.jsx(x.Fragment, { children: e.map((l, c) => /* @__PURE__ */ x.jsxs("tr", { children: [
|
|
22559
|
+
l.sku_name && /* @__PURE__ */ x.jsx("td", { children: l.sku_name }),
|
|
22560
|
+
l.node && /* @__PURE__ */ x.jsx("td", { children: l.node }),
|
|
22561
|
+
l.channel_name && /* @__PURE__ */ x.jsx("td", { children: l.channel_name }),
|
|
22562
|
+
(l == null ? void 0 : l.custom) && Object.keys(s).map((u) => {
|
|
22563
|
+
var d;
|
|
22564
|
+
if (!["sku_name", "node", "channel_name"].includes(u))
|
|
22565
|
+
return typeof s[u] == "object" ? u in (l == null ? void 0 : l.custom) ? Array.isArray(s[u]) ? s[u].map((p) => {
|
|
22566
|
+
var f, h, m, g, b;
|
|
22567
|
+
return /* @__PURE__ */ x.jsx(x.Fragment, { children: p in ((h = (f = l == null ? void 0 : l.custom) == null ? void 0 : f[u]) == null ? void 0 : h.data) ? /* @__PURE__ */ x.jsx("td", { children: (b = (g = (m = l == null ? void 0 : l.custom) == null ? void 0 : m[u]) == null ? void 0 : g.data) == null ? void 0 : b[p] }) : /* @__PURE__ */ x.jsx("td", { children: "—" }) });
|
|
22568
|
+
}) : Object.keys(s[u]).map(
|
|
22569
|
+
(p) => {
|
|
22570
|
+
var f, h, m;
|
|
22571
|
+
return /* @__PURE__ */ x.jsx(x.Fragment, { children: p in ((f = l == null ? void 0 : l.custom) == null ? void 0 : f[u]) ? /* @__PURE__ */ x.jsx("td", { children: (m = (h = l == null ? void 0 : l.custom) == null ? void 0 : h[u]) == null ? void 0 : m[p] }) : /* @__PURE__ */ x.jsx("td", { children: "—" }) });
|
|
22572
|
+
}
|
|
22573
|
+
) : Object.keys(s[u]).map(
|
|
22574
|
+
(p) => /* @__PURE__ */ x.jsx(x.Fragment, { children: /* @__PURE__ */ x.jsx("td", { children: "—" }) })
|
|
22575
|
+
) : /* @__PURE__ */ x.jsx(x.Fragment, { children: u in (l == null ? void 0 : l.custom) ? /* @__PURE__ */ x.jsx("td", { children: (d = l == null ? void 0 : l.custom) == null ? void 0 : d[u] }) : /* @__PURE__ */ x.jsx("td", { children: "—" }) });
|
|
22576
|
+
})
|
|
22577
|
+
] }, c)) }) })
|
|
22578
|
+
] });
|
|
22579
|
+
}, [e]);
|
|
22580
|
+
return /* @__PURE__ */ x.jsx("div", { className: "scai-common-component-table-container", children: /* @__PURE__ */ x.jsx("table", { className: "table-notification", children: o() }) });
|
|
22581
22581
|
}, $T = ({ loading: e, isEmpty: t, data: n, subTitle: r }) => {
|
|
22582
|
-
const [o, s] = _e(""), [a, l] = _e(1), [c, u] = _e(10), [d, p] = _e(0), [f, h] = _e([]), [m, g] = _e(!1), [b, C] = _e(""), { showMoreRowsJSX: T } =
|
|
22582
|
+
const [o, s] = _e(""), [a, l] = _e(1), [c, u] = _e(10), [d, p] = _e(0), [f, h] = _e([]), [m, g] = _e(!1), [b, C] = _e(""), { showMoreRowsJSX: T } = _T({
|
|
22583
22583
|
rowLength: c,
|
|
22584
22584
|
disabled: !(n != null && n.length),
|
|
22585
22585
|
setRowLength: u,
|
|
@@ -22633,10 +22633,10 @@ const LT = ({
|
|
|
22633
22633
|
height: "4rem",
|
|
22634
22634
|
fontSize: "1.3rem",
|
|
22635
22635
|
fontWeight: "600",
|
|
22636
|
-
marginBottom: "1.5rem"
|
|
22636
|
+
marginBottom: "1.5rem",
|
|
22637
|
+
alignItems: "center"
|
|
22637
22638
|
},
|
|
22638
22639
|
display: "flex",
|
|
22639
|
-
alignItems: "start",
|
|
22640
22640
|
flexDirection: "row",
|
|
22641
22641
|
className: "upper-div",
|
|
22642
22642
|
children: [
|
|
@@ -22669,7 +22669,7 @@ const LT = ({
|
|
|
22669
22669
|
T
|
|
22670
22670
|
] }) }),
|
|
22671
22671
|
f.length === 0 ? /* @__PURE__ */ x.jsx(yt, { className: "no-record", children: Pt.NRF }) : /* @__PURE__ */ x.jsx(
|
|
22672
|
-
|
|
22672
|
+
LT,
|
|
22673
22673
|
{
|
|
22674
22674
|
data: f,
|
|
22675
22675
|
handleSort: v,
|