@3sc/common-component 0.0.455 → 0.0.457
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 +92 -61
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +55 -55
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -40272,19 +40272,19 @@ const g7 = ({ color: e }) => /* @__PURE__ */ m.jsx("svg", { width: "7", height:
|
|
|
40272
40272
|
return o === i ? 0 : o > i ? -1 : 1;
|
|
40273
40273
|
}).sort((n, r) => n.isRead === r.isRead ? 0 : r.isRead ? -1 : 1), cy = (e) => {
|
|
40274
40274
|
let t = 0;
|
|
40275
|
-
for (let n = 0; n < e.length; n++)
|
|
40275
|
+
for (let n = 0; n < (e == null ? void 0 : e.length); n++)
|
|
40276
40276
|
e[n].isRead || t++;
|
|
40277
40277
|
return t;
|
|
40278
40278
|
}, w7 = (e) => {
|
|
40279
40279
|
const t = [];
|
|
40280
|
-
return e.forEach((n) => {
|
|
40280
|
+
return e == null || e.forEach((n) => {
|
|
40281
40281
|
n.isRead || t.push(n.id);
|
|
40282
40282
|
}), t;
|
|
40283
|
-
}, C7 = (e, t, n) => e.filter((o) => t.some((i) => {
|
|
40283
|
+
}, C7 = (e, t, n) => e == null ? void 0 : e.filter((o) => t.some((i) => {
|
|
40284
40284
|
var a, l, c;
|
|
40285
40285
|
return (c = (a = o[i]) == null ? void 0 : a.toLowerCase()) == null ? void 0 : c.includes((l = n == null ? void 0 : n.trim()) == null ? void 0 : l.toLowerCase());
|
|
40286
|
-
})), S7 = (e, t, n) => e.sort((o, i) => n === "asc" ? o[t].toLowerCase().localeCompare(i[t].toLowerCase()) : i[t].toLowerCase().localeCompare(o[t].toLowerCase())), $u = (e, t, n) => e.slice((t - 1) * n, t * n), T7 = (e) => {
|
|
40287
|
-
const t = e.reduce((r, o) => {
|
|
40286
|
+
})), S7 = (e, t, n) => e == null ? void 0 : e.sort((o, i) => n === "asc" ? o[t].toLowerCase().localeCompare(i[t].toLowerCase()) : i[t].toLowerCase().localeCompare(o[t].toLowerCase())), $u = (e, t, n) => e == null ? void 0 : e.slice((t - 1) * n, t * n), T7 = (e) => {
|
|
40287
|
+
const t = e == null ? void 0 : e.reduce((r, o) => {
|
|
40288
40288
|
const i = new Date(o == null ? void 0 : o.createdAt), a = new Intl.DateTimeFormat("en-US", {
|
|
40289
40289
|
day: "numeric",
|
|
40290
40290
|
month: "long",
|
|
@@ -41407,7 +41407,7 @@ G(Rx)(({ theme: e }) => ({
|
|
|
41407
41407
|
padding: "0!important"
|
|
41408
41408
|
}
|
|
41409
41409
|
}));
|
|
41410
|
-
const
|
|
41410
|
+
const Tz = (e) => /* @__PURE__ */ m.jsx(Gn, { children: /* @__PURE__ */ m.jsx(D7, { ...e }) }), A7 = ({ iconUrl: e, ...t }) => {
|
|
41411
41411
|
const [n, r] = De(!1), [o, i] = De(!1), a = $t();
|
|
41412
41412
|
return /* @__PURE__ */ m.jsxs(
|
|
41413
41413
|
we,
|
|
@@ -41566,7 +41566,7 @@ const B7 = ({ progress: e = 0, status: t }) => {
|
|
|
41566
41566
|
showToast: () => {
|
|
41567
41567
|
throw new Error("ToastProvider is not mounted");
|
|
41568
41568
|
}
|
|
41569
|
-
},
|
|
41569
|
+
}, Oz = {
|
|
41570
41570
|
success: (e) => Ld.showToast(e, "SUCCESS"),
|
|
41571
41571
|
error: (e) => Ld.showToast(e, "FAILED")
|
|
41572
41572
|
}, V7 = G(ba)(({ theme: e }) => ({
|
|
@@ -41716,7 +41716,7 @@ const B7 = ({ progress: e = 0, status: t }) => {
|
|
|
41716
41716
|
)
|
|
41717
41717
|
}
|
|
41718
41718
|
);
|
|
41719
|
-
}, z7 = ({ message: e, status: t }) => /* @__PURE__ */ m.jsx(Gn, { children: /* @__PURE__ */ m.jsx(W7, { message: e, status: t }) }),
|
|
41719
|
+
}, z7 = ({ message: e, status: t }) => /* @__PURE__ */ m.jsx(Gn, { children: /* @__PURE__ */ m.jsx(W7, { message: e, status: t }) }), kz = ({ children: e }) => {
|
|
41720
41720
|
const [t, n] = De(null), r = qt((o, i) => {
|
|
41721
41721
|
n({ message: o, status: i, key: Date.now() });
|
|
41722
41722
|
}, []);
|
|
@@ -41804,7 +41804,7 @@ const G7 = Nr`
|
|
|
41804
41804
|
66% {background-position: 100% 0,100% 100%,0 100%,0 0 ; width:60px; height: 60px}
|
|
41805
41805
|
100% {background-position: 100% 0,100% 100%,0 100%,0 0 }
|
|
41806
41806
|
`;
|
|
41807
|
-
function
|
|
41807
|
+
function Ez() {
|
|
41808
41808
|
return /* @__PURE__ */ m.jsx(
|
|
41809
41809
|
hc,
|
|
41810
41810
|
{
|
|
@@ -43512,22 +43512,22 @@ kt.getAdapter = Sw.getAdapter;
|
|
|
43512
43512
|
kt.HttpStatusCode = Hd;
|
|
43513
43513
|
kt.default = kt;
|
|
43514
43514
|
const {
|
|
43515
|
-
Axios:
|
|
43516
|
-
AxiosError:
|
|
43517
|
-
CanceledError:
|
|
43518
|
-
isCancel:
|
|
43519
|
-
CancelToken:
|
|
43520
|
-
VERSION:
|
|
43521
|
-
all:
|
|
43522
|
-
Cancel:
|
|
43523
|
-
isAxiosError:
|
|
43524
|
-
spread:
|
|
43525
|
-
toFormData:
|
|
43526
|
-
AxiosHeaders:
|
|
43527
|
-
HttpStatusCode:
|
|
43528
|
-
formToJSON:
|
|
43529
|
-
getAdapter:
|
|
43530
|
-
mergeConfig:
|
|
43515
|
+
Axios: Mz,
|
|
43516
|
+
AxiosError: Dz,
|
|
43517
|
+
CanceledError: Az,
|
|
43518
|
+
isCancel: Iz,
|
|
43519
|
+
CancelToken: Nz,
|
|
43520
|
+
VERSION: jz,
|
|
43521
|
+
all: $z,
|
|
43522
|
+
Cancel: Fz,
|
|
43523
|
+
isAxiosError: _z,
|
|
43524
|
+
spread: Lz,
|
|
43525
|
+
toFormData: Bz,
|
|
43526
|
+
AxiosHeaders: Vz,
|
|
43527
|
+
HttpStatusCode: Wz,
|
|
43528
|
+
formToJSON: zz,
|
|
43529
|
+
getAdapter: Uz,
|
|
43530
|
+
mergeConfig: Hz
|
|
43531
43531
|
} = kt, th = {
|
|
43532
43532
|
BASE_URL: "https://qa.3sc.ai/api",
|
|
43533
43533
|
//VERSION: import.meta.env.VITE_APP_VERSION,
|
|
@@ -46092,7 +46092,38 @@ const sz = {
|
|
|
46092
46092
|
id: "b7ffa3ab-c1b8-4f44-97e4-d4bfbf0bb7bf",
|
|
46093
46093
|
type: "SAVE"
|
|
46094
46094
|
}
|
|
46095
|
-
],
|
|
46095
|
+
], cz = {
|
|
46096
|
+
id: "42160fff-31f6-4fc9-8e85-75d550e99b19",
|
|
46097
|
+
isRead: !0,
|
|
46098
|
+
isActive: !0,
|
|
46099
|
+
to: "userhd1m1@3scsolution.com",
|
|
46100
|
+
product: "DPAI",
|
|
46101
|
+
type: "RESET",
|
|
46102
|
+
message: "Operational forecast reset successfull!",
|
|
46103
|
+
isNotificationDetails: !0,
|
|
46104
|
+
createdAt: "2025-01-23T09:34:27.125",
|
|
46105
|
+
modifiedAt: "2025-01-23T09:34:27.125",
|
|
46106
|
+
snopId: "042c4d85-2218-4f17-b5d7-95e4169c3b84",
|
|
46107
|
+
primaryCTAURL: null,
|
|
46108
|
+
primaryCTALabel: null,
|
|
46109
|
+
isPrimaryCTARedirect: !1,
|
|
46110
|
+
isPrimaryCTAClicked: !1,
|
|
46111
|
+
secondaryCTAURL: null,
|
|
46112
|
+
secondaryCTALabel: null,
|
|
46113
|
+
isSecondaryCTARedirect: !1,
|
|
46114
|
+
isSecondaryCTAClicked: !1,
|
|
46115
|
+
notificationDetails: [
|
|
46116
|
+
{
|
|
46117
|
+
channel_id: "77c1b0f3-e6b3-4ff6-9c50-689f49794c28",
|
|
46118
|
+
channel_name: "TT",
|
|
46119
|
+
custom: null,
|
|
46120
|
+
node: "Node3",
|
|
46121
|
+
node_id: "594be303-161f-4f71-8c7b-a43c8e020952",
|
|
46122
|
+
sku_id: "bdfc4861-2fea-45ea-8b6d-8efabe129c41",
|
|
46123
|
+
sku_name: "SKU1"
|
|
46124
|
+
}
|
|
46125
|
+
]
|
|
46126
|
+
}, Ww = ({ baseUrl: e }) => {
|
|
46096
46127
|
const t = Ct(Vw), [n, r] = De(!1), [o, i] = De(!1), [a, l] = De(!1), [c, u] = De({}), [d, f] = De(null), [p, h] = De(1), [y, g] = De(!1), [v, x] = De(0), C = rt(!1), { loading: w, data: O, isMarkAllAsRead: b } = Ct(oh), [k, E] = De([]);
|
|
46097
46128
|
st(() => {
|
|
46098
46129
|
E(O);
|
|
@@ -46140,7 +46171,7 @@ const sz = {
|
|
|
46140
46171
|
} else
|
|
46141
46172
|
throw new Error();
|
|
46142
46173
|
} catch {
|
|
46143
|
-
t({ type: Xe.ERROR, error: Yr.SWR });
|
|
46174
|
+
u(cz || {}), l(!0), t({ type: Xe.ERROR, error: Yr.SWR });
|
|
46144
46175
|
} finally {
|
|
46145
46176
|
f(null);
|
|
46146
46177
|
}
|
|
@@ -46246,7 +46277,7 @@ function Yd() {
|
|
|
46246
46277
|
return e;
|
|
46247
46278
|
}, Yd.apply(null, arguments);
|
|
46248
46279
|
}
|
|
46249
|
-
var
|
|
46280
|
+
var uz = function(t) {
|
|
46250
46281
|
return /* @__PURE__ */ S.createElement("svg", Yd({
|
|
46251
46282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
46252
46283
|
width: 16,
|
|
@@ -46269,7 +46300,7 @@ var cz = function(t) {
|
|
|
46269
46300
|
d: "M10.013 12.957c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"
|
|
46270
46301
|
})));
|
|
46271
46302
|
};
|
|
46272
|
-
const
|
|
46303
|
+
const dz = ({ count: e }) => ($t(), /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
46273
46304
|
/* @__PURE__ */ m.jsx(
|
|
46274
46305
|
we,
|
|
46275
46306
|
{
|
|
@@ -46283,7 +46314,7 @@ const uz = ({ count: e }) => ($t(), /* @__PURE__ */ m.jsxs(m.Fragment, { childre
|
|
|
46283
46314
|
}
|
|
46284
46315
|
},
|
|
46285
46316
|
children: /* @__PURE__ */ m.jsx(
|
|
46286
|
-
|
|
46317
|
+
uz,
|
|
46287
46318
|
{
|
|
46288
46319
|
style: {
|
|
46289
46320
|
scale: 2
|
|
@@ -46344,7 +46375,7 @@ function Gd() {
|
|
|
46344
46375
|
return e;
|
|
46345
46376
|
}, Gd.apply(null, arguments);
|
|
46346
46377
|
}
|
|
46347
|
-
var
|
|
46378
|
+
var fz = function(t) {
|
|
46348
46379
|
return /* @__PURE__ */ S.createElement("svg", Gd({
|
|
46349
46380
|
xmlns: "http://www.w3.org/2000/svg",
|
|
46350
46381
|
width: 14,
|
|
@@ -46367,7 +46398,7 @@ function Kd() {
|
|
|
46367
46398
|
return e;
|
|
46368
46399
|
}, Kd.apply(null, arguments);
|
|
46369
46400
|
}
|
|
46370
|
-
var
|
|
46401
|
+
var pz = function(t) {
|
|
46371
46402
|
return /* @__PURE__ */ S.createElement("svg", Kd({
|
|
46372
46403
|
xmlns: "http://www.w3.org/2000/svg",
|
|
46373
46404
|
width: 12,
|
|
@@ -46394,7 +46425,7 @@ function Xd() {
|
|
|
46394
46425
|
return e;
|
|
46395
46426
|
}, Xd.apply(null, arguments);
|
|
46396
46427
|
}
|
|
46397
|
-
var
|
|
46428
|
+
var hz = function(t) {
|
|
46398
46429
|
return /* @__PURE__ */ S.createElement("svg", Xd({
|
|
46399
46430
|
xmlns: "http://www.w3.org/2000/svg",
|
|
46400
46431
|
width: 9,
|
|
@@ -46495,7 +46526,7 @@ const zw = ({
|
|
|
46495
46526
|
el,
|
|
46496
46527
|
{
|
|
46497
46528
|
icon: /* @__PURE__ */ m.jsx(
|
|
46498
|
-
|
|
46529
|
+
pz,
|
|
46499
46530
|
{
|
|
46500
46531
|
className: `${c === "light" ? "chip-icon-light" : "chip-icon-dark"}`
|
|
46501
46532
|
}
|
|
@@ -46517,7 +46548,7 @@ const zw = ({
|
|
|
46517
46548
|
el,
|
|
46518
46549
|
{
|
|
46519
46550
|
icon: /* @__PURE__ */ m.jsx(
|
|
46520
|
-
|
|
46551
|
+
hz,
|
|
46521
46552
|
{
|
|
46522
46553
|
className: `${c === "light" ? "chip-icon-light" : "chip-icon-dark"}`
|
|
46523
46554
|
}
|
|
@@ -46711,7 +46742,7 @@ Uw.propTypes = {
|
|
|
46711
46742
|
handleRead: s.func,
|
|
46712
46743
|
handleShowDetails: s.func
|
|
46713
46744
|
};
|
|
46714
|
-
const
|
|
46745
|
+
const mz = ({
|
|
46715
46746
|
onRefresh: e,
|
|
46716
46747
|
handleShowDetails: t,
|
|
46717
46748
|
clickId: n,
|
|
@@ -46914,7 +46945,7 @@ const hz = ({
|
|
|
46914
46945
|
variant: "outlined",
|
|
46915
46946
|
className: "view-all",
|
|
46916
46947
|
onClick: o,
|
|
46917
|
-
startIcon: /* @__PURE__ */ m.jsx(
|
|
46948
|
+
startIcon: /* @__PURE__ */ m.jsx(fz, {}),
|
|
46918
46949
|
disabled: !((C = c == null ? void 0 : c.filter((w) => !(w != null && w.isRead))) != null && C.length),
|
|
46919
46950
|
style: { backgroundColor: "transparent" },
|
|
46920
46951
|
sx: {
|
|
@@ -46945,26 +46976,26 @@ const hz = ({
|
|
|
46945
46976
|
}
|
|
46946
46977
|
)
|
|
46947
46978
|
] });
|
|
46948
|
-
},
|
|
46979
|
+
}, gz = ({ data: e, handleClose: t, t: n }) => {
|
|
46949
46980
|
var x;
|
|
46950
46981
|
const [r, o] = De(1), [i, a] = De(10), [l, c] = De(((x = e == null ? void 0 : e.notificationDetails) == null ? void 0 : x.length) || 0), [u, d] = De("sku_name"), [f, p] = De("asc"), [h, y] = De([]), [g, v] = De("");
|
|
46951
46982
|
return st(() => {
|
|
46952
|
-
var C;
|
|
46953
|
-
if (g || u) {
|
|
46954
|
-
const
|
|
46983
|
+
var C, w;
|
|
46984
|
+
if ((g || u) && !((C = e == null ? void 0 : e.notificationDetails) != null && C.length)) {
|
|
46985
|
+
const O = C7(e == null ? void 0 : e.notificationDetails, RW, g);
|
|
46955
46986
|
if (u) {
|
|
46956
|
-
const
|
|
46957
|
-
|
|
46987
|
+
const b = S7(
|
|
46988
|
+
O,
|
|
46958
46989
|
u,
|
|
46959
46990
|
f
|
|
46960
46991
|
);
|
|
46961
|
-
y($u(
|
|
46992
|
+
y($u(b, r, i)), c(b.length);
|
|
46962
46993
|
return;
|
|
46963
46994
|
}
|
|
46964
|
-
y($u(
|
|
46995
|
+
y($u(O, r, i)), c(O.length);
|
|
46965
46996
|
return;
|
|
46966
46997
|
}
|
|
46967
|
-
y($u(e == null ? void 0 : e.notificationDetails, r, i)), c((
|
|
46998
|
+
y($u(e == null ? void 0 : e.notificationDetails, r, i)), c((w = e == null ? void 0 : e.notificationDetails) == null ? void 0 : w.length);
|
|
46968
46999
|
}, [g, e == null ? void 0 : e.notificationDetails, r, i, f, u]), /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
46969
47000
|
/* @__PURE__ */ m.jsxs(
|
|
46970
47001
|
ft,
|
|
@@ -46985,7 +47016,7 @@ const hz = ({
|
|
|
46985
47016
|
fontSize: "1.4rem",
|
|
46986
47017
|
color: (C) => C.palette.primary.notifyActiveText
|
|
46987
47018
|
},
|
|
46988
|
-
children: n(e == null ? void 0 : e.message) ||
|
|
47019
|
+
children: n(e == null ? void 0 : e.message) || (e == null ? void 0 : e.message)
|
|
46989
47020
|
}
|
|
46990
47021
|
),
|
|
46991
47022
|
/* @__PURE__ */ m.jsx(
|
|
@@ -47057,7 +47088,7 @@ const hz = ({
|
|
|
47057
47088
|
}
|
|
47058
47089
|
)
|
|
47059
47090
|
] });
|
|
47060
|
-
},
|
|
47091
|
+
}, yz = ({ baseUrl: e, t }) => {
|
|
47061
47092
|
const {
|
|
47062
47093
|
alertDialogProps: n,
|
|
47063
47094
|
showDetailsProps: r,
|
|
@@ -47078,13 +47109,13 @@ const hz = ({
|
|
|
47078
47109
|
var a;
|
|
47079
47110
|
o(), (a = n == null ? void 0 : n.setOpen) == null || a.call(n, !0);
|
|
47080
47111
|
},
|
|
47081
|
-
children: /* @__PURE__ */ m.jsx(
|
|
47112
|
+
children: /* @__PURE__ */ m.jsx(dz, { count: i.count })
|
|
47082
47113
|
}
|
|
47083
47114
|
),
|
|
47084
|
-
/* @__PURE__ */ m.jsx(Ny, { ...n, children: /* @__PURE__ */ m.jsx(
|
|
47085
|
-
/* @__PURE__ */ m.jsx(Ny, { ...r, children: /* @__PURE__ */ m.jsx(
|
|
47115
|
+
/* @__PURE__ */ m.jsx(Ny, { ...n, children: /* @__PURE__ */ m.jsx(mz, { ...n, t }) }),
|
|
47116
|
+
/* @__PURE__ */ m.jsx(Ny, { ...r, children: /* @__PURE__ */ m.jsx(gz, { ...r, t }) })
|
|
47086
47117
|
] });
|
|
47087
|
-
},
|
|
47118
|
+
}, qz = ({ baseUrl: e, t }) => /* @__PURE__ */ m.jsx(Gn, { children: /* @__PURE__ */ m.jsx(rz, { children: /* @__PURE__ */ m.jsx(yz, { baseUrl: e, t }) }) }), bz = ({
|
|
47088
47119
|
rightChild: e,
|
|
47089
47120
|
leftChild: t,
|
|
47090
47121
|
isDrawerMerged: n,
|
|
@@ -47245,31 +47276,31 @@ const hz = ({
|
|
|
47245
47276
|
}
|
|
47246
47277
|
)
|
|
47247
47278
|
] }) });
|
|
47248
|
-
},
|
|
47249
|
-
|
|
47279
|
+
}, vz = ({ layoutChildren: e, layoutProps: t }) => /* @__PURE__ */ m.jsx(Gn, { children: /* @__PURE__ */ m.jsx(
|
|
47280
|
+
bz,
|
|
47250
47281
|
{
|
|
47251
47282
|
...e,
|
|
47252
47283
|
...t
|
|
47253
47284
|
}
|
|
47254
47285
|
) });
|
|
47255
|
-
|
|
47286
|
+
vz.propTypes = {
|
|
47256
47287
|
layoutChildren: s.object.isRequired,
|
|
47257
47288
|
layoutProps: s.object.isRequired
|
|
47258
47289
|
};
|
|
47259
47290
|
export {
|
|
47260
47291
|
qr as Button,
|
|
47261
47292
|
Ru as Checkbox,
|
|
47262
|
-
|
|
47293
|
+
Tz as DatePicker,
|
|
47263
47294
|
_w as Grid,
|
|
47264
47295
|
nz as Header,
|
|
47265
47296
|
I7 as InputField,
|
|
47266
|
-
|
|
47267
|
-
|
|
47297
|
+
Ez as Loader,
|
|
47298
|
+
qz as Notification,
|
|
47268
47299
|
N7 as Select,
|
|
47269
|
-
|
|
47300
|
+
vz as SliderLayout,
|
|
47270
47301
|
Y7 as Switch,
|
|
47271
47302
|
_d as TextField,
|
|
47272
|
-
|
|
47273
|
-
|
|
47303
|
+
kz as ToastProvider,
|
|
47304
|
+
Oz as toast
|
|
47274
47305
|
};
|
|
47275
47306
|
//# sourceMappingURL=index.es.js.map
|