@smart-factor/gem-ui-components 0.0.66 → 0.0.67
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.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
1
|
import { GridApiPro, GridCallbackDetails, GridColDef, GridColumnPinningState, GridFilterModel, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
3
2
|
|
|
4
3
|
interface SortState {
|
|
@@ -44,7 +43,7 @@ export interface TableWithPaginationProps<T extends GridValidRowModel> {
|
|
|
44
43
|
offset?: number;
|
|
45
44
|
pinnedColumns?: GridColumnPinningState;
|
|
46
45
|
paginationAndSortState: PaginationAndSortState;
|
|
47
|
-
setPaginationAndSortState:
|
|
46
|
+
setPaginationAndSortState: (paginationAndSortState: PaginationAndSortState) => void;
|
|
48
47
|
filterModel?: GridFilterModel;
|
|
49
48
|
onFilterModelChange?: (model: GridFilterModel, details: GridCallbackDetails<'filter'>) => void;
|
|
50
49
|
exportDataAsExcel?: (gridApiRef: React.MutableRefObject<GridApiPro>) => void;
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import te, { jsx as l, jsxs as
|
|
1
|
+
import te, { jsx as l, jsxs as w, Fragment as it } from "react/jsx-runtime";
|
|
2
2
|
import { L as re, P as a, _ as x, Z as Gt, $ as Wt, a0 as qt, a1 as Zt, w as N, T as We, Y as Xt, a2 as Jt, l as Kt, a3 as Qt, q as ye, p as ve, r as R, v as Z, j as er, y as X, a as tr, a4 as rr, z as J, E as Ye, b as z, F as ze, J as or, a5 as nr, a6 as sr, M as q, U as ir, a7 as ar, x as Te, e as oe, K as H, a8 as lr, S as Ne, a9 as ne, aa as se, N as pe } from "./Stack-ThmeJzqr.js";
|
|
3
3
|
import { r as ie, e as at, P as lt, i as cr, C as dr } from "./Drawer-d8461jqd.js";
|
|
4
4
|
import { D as oi, L as ni } from "./Drawer-d8461jqd.js";
|
|
@@ -315,7 +315,7 @@ const ue = ye("MuiAccordion", ["root", "rounded", "expanded", "disabled", "gutte
|
|
|
315
315
|
disabled: c,
|
|
316
316
|
disableGutters: d,
|
|
317
317
|
expanded: g
|
|
318
|
-
}),
|
|
318
|
+
}), k = Lo(C), E = x({
|
|
319
319
|
transition: T
|
|
320
320
|
}, b), I = x({
|
|
321
321
|
transition: h
|
|
@@ -327,8 +327,8 @@ const ue = ye("MuiAccordion", ["root", "rounded", "expanded", "disabled", "gutte
|
|
|
327
327
|
},
|
|
328
328
|
ownerState: C
|
|
329
329
|
});
|
|
330
|
-
return /* @__PURE__ */
|
|
331
|
-
className: X(
|
|
330
|
+
return /* @__PURE__ */ w(wo, x({
|
|
331
|
+
className: X(k.root, s),
|
|
332
332
|
ref: n,
|
|
333
333
|
ownerState: C,
|
|
334
334
|
square: m
|
|
@@ -344,7 +344,7 @@ const ue = ye("MuiAccordion", ["root", "rounded", "expanded", "disabled", "gutte
|
|
|
344
344
|
"aria-labelledby": S.props.id,
|
|
345
345
|
id: S.props["aria-controls"],
|
|
346
346
|
role: "region",
|
|
347
|
-
className:
|
|
347
|
+
className: k.region,
|
|
348
348
|
children: O
|
|
349
349
|
})
|
|
350
350
|
}))]
|
|
@@ -710,7 +710,7 @@ const Ee = 4, No = Ye(Ke || (Ke = Q`
|
|
|
710
710
|
let h = (c || 0) - 100;
|
|
711
711
|
b && (h = -h), T.bar2.transform = `translateX(${h}%)`;
|
|
712
712
|
} else process.env.NODE_ENV !== "production" && console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");
|
|
713
|
-
return /* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ w(Ro, x({
|
|
714
714
|
className: X(m.root, o),
|
|
715
715
|
ownerState: f,
|
|
716
716
|
role: "progressbar"
|
|
@@ -848,7 +848,7 @@ const Uo = ["children", "className", "disableTypography", "inset", "primary", "p
|
|
|
848
848
|
display: "block"
|
|
849
849
|
}, m, {
|
|
850
850
|
children: h
|
|
851
|
-
}))), /* @__PURE__ */
|
|
851
|
+
}))), /* @__PURE__ */ w(Go, x({
|
|
852
852
|
className: X(g.root, s),
|
|
853
853
|
ownerState: p,
|
|
854
854
|
ref: n
|
|
@@ -980,9 +980,9 @@ const qo = ["active", "children", "className", "component", "completed", "disabl
|
|
|
980
980
|
disabled: O,
|
|
981
981
|
expanded: f,
|
|
982
982
|
component: c
|
|
983
|
-
}),
|
|
983
|
+
}), k = Zo(C), E = /* @__PURE__ */ w(Xo, x({
|
|
984
984
|
as: c,
|
|
985
|
-
className: X(
|
|
985
|
+
className: X(k.root, i),
|
|
986
986
|
ref: n,
|
|
987
987
|
ownerState: C
|
|
988
988
|
}, v, {
|
|
@@ -990,7 +990,7 @@ const qo = ["active", "children", "className", "component", "completed", "disabl
|
|
|
990
990
|
}));
|
|
991
991
|
return /* @__PURE__ */ l(mr.Provider, {
|
|
992
992
|
value: D,
|
|
993
|
-
children: h && !p && m !== 0 ? /* @__PURE__ */
|
|
993
|
+
children: h && !p && m !== 0 ? /* @__PURE__ */ w(L.Fragment, {
|
|
994
994
|
children: [h, E]
|
|
995
995
|
}) : E
|
|
996
996
|
});
|
|
@@ -1145,9 +1145,9 @@ const Ko = ["value"], Qo = ["children", "className", "color", "disabled", "disab
|
|
|
1145
1145
|
size: y
|
|
1146
1146
|
}), D = en(O), C = (E) => {
|
|
1147
1147
|
p && (p(E, M), E.defaultPrevented) || h && h(E, M);
|
|
1148
|
-
},
|
|
1148
|
+
}, k = i || "";
|
|
1149
1149
|
return /* @__PURE__ */ l(tn, x({
|
|
1150
|
-
className: X(s.className, D.root, f,
|
|
1150
|
+
className: X(s.className, D.root, f, k),
|
|
1151
1151
|
disabled: b,
|
|
1152
1152
|
focusRipple: !v,
|
|
1153
1153
|
ref: n,
|
|
@@ -1369,7 +1369,7 @@ function Ss({
|
|
|
1369
1369
|
disabled: b
|
|
1370
1370
|
}) {
|
|
1371
1371
|
return eo.createPortal(
|
|
1372
|
-
/* @__PURE__ */
|
|
1372
|
+
/* @__PURE__ */ w(Sr, { offset: m, children: [
|
|
1373
1373
|
f && /* @__PURE__ */ l(
|
|
1374
1374
|
ee,
|
|
1375
1375
|
{
|
|
@@ -1577,7 +1577,7 @@ function Pn({
|
|
|
1577
1577
|
}, t = me(r.filterOptions || ((o) => o), [
|
|
1578
1578
|
r.filterOptions
|
|
1579
1579
|
]);
|
|
1580
|
-
return /* @__PURE__ */
|
|
1580
|
+
return /* @__PURE__ */ w(Ne, { children: [
|
|
1581
1581
|
/* @__PURE__ */ l(
|
|
1582
1582
|
Dr,
|
|
1583
1583
|
{
|
|
@@ -1628,7 +1628,7 @@ function Pn({
|
|
|
1628
1628
|
r.errorMessage && /* @__PURE__ */ l(dt, { error: !0, children: r.errorMessage })
|
|
1629
1629
|
] });
|
|
1630
1630
|
}
|
|
1631
|
-
const Ln = (e) => /* @__PURE__ */
|
|
1631
|
+
const Ln = (e) => /* @__PURE__ */ w(lt, { children: [
|
|
1632
1632
|
e.children,
|
|
1633
1633
|
e.loading && /* @__PURE__ */ l(Dt, {}),
|
|
1634
1634
|
e.onAddNewEntry && /* @__PURE__ */ l(
|
|
@@ -1755,8 +1755,8 @@ var $t = { exports: {} };
|
|
|
1755
1755
|
return B || V.slice(1);
|
|
1756
1756
|
});
|
|
1757
1757
|
})).match(t), M = y.length, S = 0; S < M; S += 1) {
|
|
1758
|
-
var O = y[S], D = v[O], C = D && D[0],
|
|
1759
|
-
y[S] =
|
|
1758
|
+
var O = y[S], D = v[O], C = D && D[0], k = D && D[1];
|
|
1759
|
+
y[S] = k ? { regex: C, parser: k } : O.replace(/^\[|\]$/g, "");
|
|
1760
1760
|
}
|
|
1761
1761
|
return function(E) {
|
|
1762
1762
|
for (var I = {}, _ = 0, $ = 0; _ < M; _ += 1) {
|
|
@@ -1782,8 +1782,8 @@ var $t = { exports: {} };
|
|
|
1782
1782
|
y.parse = function(S) {
|
|
1783
1783
|
var O = S.date, D = S.utc, C = S.args;
|
|
1784
1784
|
this.$u = D;
|
|
1785
|
-
var
|
|
1786
|
-
if (typeof
|
|
1785
|
+
var k = C[1];
|
|
1786
|
+
if (typeof k == "string") {
|
|
1787
1787
|
var E = C[2] === !0, I = C[3] === !0, _ = E || I, $ = C[2];
|
|
1788
1788
|
I && ($ = C[2]), c = this.$locale(), !E && $ && (c = g.Ls[$]), this.$d = function(ae, G, U) {
|
|
1789
1789
|
try {
|
|
@@ -1795,9 +1795,9 @@ var $t = { exports: {} };
|
|
|
1795
1795
|
} catch {
|
|
1796
1796
|
return /* @__PURE__ */ new Date("");
|
|
1797
1797
|
}
|
|
1798
|
-
}(O,
|
|
1799
|
-
} else if (
|
|
1800
|
-
C[1] =
|
|
1798
|
+
}(O, k, D), this.init(), $ && $ !== !0 && (this.$L = this.locale($).$L), _ && O != this.format(k) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
|
|
1799
|
+
} else if (k instanceof Array) for (var j = k.length, B = 1; B <= j; B += 1) {
|
|
1800
|
+
C[1] = k[B - 1];
|
|
1801
1801
|
var V = g.apply(this, C);
|
|
1802
1802
|
if (V.isValid()) {
|
|
1803
1803
|
this.$d = V.$d, this.$L = V.$L, this.init();
|
|
@@ -2140,7 +2140,7 @@ const Ps = ({
|
|
|
2140
2140
|
name: e,
|
|
2141
2141
|
control: r,
|
|
2142
2142
|
defaultValue: t,
|
|
2143
|
-
render: ({ field: c, fieldState: d }) => /* @__PURE__ */
|
|
2143
|
+
render: ({ field: c, fieldState: d }) => /* @__PURE__ */ w(Ie, { dateAdapter: Fe, children: [
|
|
2144
2144
|
/* @__PURE__ */ l(
|
|
2145
2145
|
Lr,
|
|
2146
2146
|
{
|
|
@@ -2192,7 +2192,7 @@ const Ps = ({
|
|
|
2192
2192
|
defaultValue: t,
|
|
2193
2193
|
render: ({ field: c, fieldState: d }) => {
|
|
2194
2194
|
const u = () => /* @__PURE__ */ l($r, { sx: { ml: "14px" }, required: s, children: n });
|
|
2195
|
-
return /* @__PURE__ */
|
|
2195
|
+
return /* @__PURE__ */ w(Ie, { dateAdapter: Fe, children: [
|
|
2196
2196
|
/* @__PURE__ */ l(
|
|
2197
2197
|
kr,
|
|
2198
2198
|
{
|
|
@@ -2242,7 +2242,7 @@ const Ps = ({
|
|
|
2242
2242
|
render: ({ field: f, fieldState: m }) => {
|
|
2243
2243
|
var v;
|
|
2244
2244
|
const b = s || ((v = m.error) == null ? void 0 : v.message);
|
|
2245
|
-
return /* @__PURE__ */
|
|
2245
|
+
return /* @__PURE__ */ w(xe, { ...f, component: "fieldset", "data-testid": d, children: [
|
|
2246
2246
|
r && /* @__PURE__ */ l(_r, { required: i, children: r }),
|
|
2247
2247
|
/* @__PURE__ */ l(H, { mt: r ? "6px" : "0", children: o.map((T, h) => {
|
|
2248
2248
|
const p = f.value === T.value;
|
|
@@ -2337,10 +2337,10 @@ const Es = ({
|
|
|
2337
2337
|
defaultValue: t ?? (i ? [] : void 0),
|
|
2338
2338
|
render: ({ field: p, fieldState: g }) => {
|
|
2339
2339
|
var D;
|
|
2340
|
-
const y = s || ((D = g.error) == null ? void 0 : D.message), M = (C,
|
|
2341
|
-
p.onChange(C,
|
|
2340
|
+
const y = s || ((D = g.error) == null ? void 0 : D.message), M = (C, k) => {
|
|
2341
|
+
p.onChange(C, k), m == null || m(C, k);
|
|
2342
2342
|
}, S = i ? !!p.value.length : !!p.value, O = T && S;
|
|
2343
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ w(Nr, { variant: b, size: v, fullWidth: !0, children: [
|
|
2344
2344
|
/* @__PURE__ */ l(
|
|
2345
2345
|
ft,
|
|
2346
2346
|
{
|
|
@@ -2409,7 +2409,7 @@ const Es = ({
|
|
|
2409
2409
|
name: e,
|
|
2410
2410
|
control: r,
|
|
2411
2411
|
defaultValue: t,
|
|
2412
|
-
render: ({ field: c, fieldState: d }) => /* @__PURE__ */
|
|
2412
|
+
render: ({ field: c, fieldState: d }) => /* @__PURE__ */ w(Ie, { dateAdapter: Fe, children: [
|
|
2413
2413
|
/* @__PURE__ */ l(
|
|
2414
2414
|
Ir,
|
|
2415
2415
|
{
|
|
@@ -2475,7 +2475,7 @@ const qn = (e) => {
|
|
|
2475
2475
|
}, d = () => {
|
|
2476
2476
|
e.gridApiRef.current.exportDataAsCsv(), s();
|
|
2477
2477
|
}, u = Te();
|
|
2478
|
-
return /* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ w(H, { children: [
|
|
2479
2479
|
/* @__PURE__ */ l(
|
|
2480
2480
|
ut,
|
|
2481
2481
|
{
|
|
@@ -2493,7 +2493,7 @@ const qn = (e) => {
|
|
|
2493
2493
|
children: "Eksportuj"
|
|
2494
2494
|
}
|
|
2495
2495
|
),
|
|
2496
|
-
/* @__PURE__ */
|
|
2496
|
+
/* @__PURE__ */ w(
|
|
2497
2497
|
Ar,
|
|
2498
2498
|
{
|
|
2499
2499
|
id: "export-menu",
|
|
@@ -2511,7 +2511,7 @@ const qn = (e) => {
|
|
|
2511
2511
|
}
|
|
2512
2512
|
)
|
|
2513
2513
|
] });
|
|
2514
|
-
}, At = (e) => /* @__PURE__ */
|
|
2514
|
+
}, At = (e) => /* @__PURE__ */ w(ro, { children: [
|
|
2515
2515
|
/* @__PURE__ */ l(oo, {}),
|
|
2516
2516
|
e.isFilterActive && /* @__PURE__ */ l(no, {}),
|
|
2517
2517
|
/* @__PURE__ */ l(so, {}),
|
|
@@ -2675,7 +2675,7 @@ const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2675
2675
|
onChange: t,
|
|
2676
2676
|
menuItems: o,
|
|
2677
2677
|
disabled: s
|
|
2678
|
-
}) => /* @__PURE__ */
|
|
2678
|
+
}) => /* @__PURE__ */ w(xe, { variant: "standard", children: [
|
|
2679
2679
|
/* @__PURE__ */ l(ft, { id: e, children: n }),
|
|
2680
2680
|
/* @__PURE__ */ l(
|
|
2681
2681
|
pt,
|
|
@@ -2697,7 +2697,7 @@ const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2697
2697
|
noHeader: o
|
|
2698
2698
|
}) => {
|
|
2699
2699
|
const s = (i) => () => n(i);
|
|
2700
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ w(it, { children: [
|
|
2701
2701
|
/* @__PURE__ */ l(Ur, { noHeader: o, activeStep: r, children: e.map(({ label: i, value: c }) => /* @__PURE__ */ l(Lt, { children: /* @__PURE__ */ l(Hr, { disableRipple: !0, onClick: s(c), children: i }) }, i)) }),
|
|
2702
2702
|
t == null ? void 0 : t[r]
|
|
2703
2703
|
] });
|
|
@@ -2769,7 +2769,7 @@ var Rt = He.default = void 0, es = Qn(ie()), ts = te;
|
|
|
2769
2769
|
Rt = He.default = (0, es.default)(/* @__PURE__ */ (0, ts.jsx)("path", {
|
|
2770
2770
|
d: "M3 21h3.75L17.81 9.94l-3.75-3.75L3 17.25zm2-2.92 9.06-9.06.92.92L5.92 19H5zM18.37 3.29a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41z"
|
|
2771
2771
|
}), "ModeEditOutlineOutlined");
|
|
2772
|
-
const Vs = (e) => /* @__PURE__ */
|
|
2772
|
+
const Vs = (e) => /* @__PURE__ */ w(Ne, { direction: "row", display: "inline-flex", children: [
|
|
2773
2773
|
e.onEdit && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
2774
2774
|
pe,
|
|
2775
2775
|
{
|
|
@@ -2813,23 +2813,21 @@ const Vs = (e) => /* @__PURE__ */ k(Ne, { direction: "row", display: "inline-fle
|
|
|
2813
2813
|
sort: r.sort.direction || "asc"
|
|
2814
2814
|
}
|
|
2815
2815
|
], g = () => {
|
|
2816
|
+
var D, C;
|
|
2816
2817
|
const O = b.current.getSortModel();
|
|
2817
|
-
n(
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
direction: ((w = O[0]) == null ? void 0 : w.sort) || ""
|
|
2824
|
-
}
|
|
2825
|
-
};
|
|
2818
|
+
n({
|
|
2819
|
+
...r,
|
|
2820
|
+
sort: {
|
|
2821
|
+
field: ((D = O[0]) == null ? void 0 : D.field) || "",
|
|
2822
|
+
direction: ((C = O[0]) == null ? void 0 : C.sort) || ""
|
|
2823
|
+
}
|
|
2826
2824
|
});
|
|
2827
2825
|
}, y = (O) => {
|
|
2828
|
-
n(
|
|
2829
|
-
...
|
|
2826
|
+
n({
|
|
2827
|
+
...r,
|
|
2830
2828
|
page: O.page,
|
|
2831
2829
|
size: O.pageSize
|
|
2832
|
-
})
|
|
2830
|
+
}), h(O);
|
|
2833
2831
|
}, M = () => {
|
|
2834
2832
|
var O, D;
|
|
2835
2833
|
return {
|
|
@@ -2897,7 +2895,7 @@ const Vs = (e) => /* @__PURE__ */ k(Ne, { direction: "row", display: "inline-fle
|
|
|
2897
2895
|
) });
|
|
2898
2896
|
}, Gs = (e, r) => {
|
|
2899
2897
|
gt.custom(
|
|
2900
|
-
(n) => /* @__PURE__ */
|
|
2898
|
+
(n) => /* @__PURE__ */ w(bt, { type: "info", children: [
|
|
2901
2899
|
/* @__PURE__ */ l(ln, {}),
|
|
2902
2900
|
/* @__PURE__ */ l(yt, { message: e, id: n.id })
|
|
2903
2901
|
] }),
|
|
@@ -2905,7 +2903,7 @@ const Vs = (e) => /* @__PURE__ */ k(Ne, { direction: "row", display: "inline-fle
|
|
|
2905
2903
|
);
|
|
2906
2904
|
}, Ws = (e, r) => {
|
|
2907
2905
|
gt.custom(
|
|
2908
|
-
(n) => /* @__PURE__ */
|
|
2906
|
+
(n) => /* @__PURE__ */ w(bt, { type: "success", children: [
|
|
2909
2907
|
/* @__PURE__ */ l(sn, {}),
|
|
2910
2908
|
/* @__PURE__ */ l(yt, { message: e, id: n.id })
|
|
2911
2909
|
] }),
|
|
@@ -2997,7 +2995,7 @@ const ss = (e) => {
|
|
|
2997
2995
|
}
|
|
2998
2996
|
), ei = ({
|
|
2999
2997
|
children: e
|
|
3000
|
-
}) => /* @__PURE__ */
|
|
2998
|
+
}) => /* @__PURE__ */ w(it, { children: [
|
|
3001
2999
|
/* @__PURE__ */ l(as, {}),
|
|
3002
3000
|
e
|
|
3003
3001
|
] });
|