@nice2dev/ui-erp 1.1.9 → 1.1.10
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.cjs +148 -148
- package/dist/index.mjs +80 -80
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const
|
|
4
|
+
const be = require("react");
|
|
5
5
|
const se = {
|
|
6
6
|
radius: "md",
|
|
7
7
|
shadow: "md",
|
|
@@ -19,7 +19,7 @@ const se = {
|
|
|
19
19
|
animation: "normal",
|
|
20
20
|
density: "normal"
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
be.createContext({
|
|
23
23
|
displayStyle: "default",
|
|
24
24
|
variantConfig: se,
|
|
25
25
|
setDisplayStyle: () => {
|
|
@@ -228,7 +228,7 @@ const er = {
|
|
|
228
228
|
md: 20,
|
|
229
229
|
lg: 24,
|
|
230
230
|
xl: 32
|
|
231
|
-
}, gt =
|
|
231
|
+
}, gt = be.createContext({});
|
|
232
232
|
function la({
|
|
233
233
|
path: e,
|
|
234
234
|
size: t,
|
|
@@ -272,7 +272,7 @@ const Ae = ({
|
|
|
272
272
|
title: o,
|
|
273
273
|
onClick: i
|
|
274
274
|
}) => {
|
|
275
|
-
const { resolver: s } =
|
|
275
|
+
const { resolver: s } = be.useContext(gt), c = typeof t == "number" ? t : ca[t];
|
|
276
276
|
if (s) {
|
|
277
277
|
const d = s(e, c);
|
|
278
278
|
if (d)
|
|
@@ -292,18 +292,18 @@ const Ae = ({
|
|
|
292
292
|
}
|
|
293
293
|
) : null;
|
|
294
294
|
};
|
|
295
|
-
|
|
295
|
+
be.createContext({
|
|
296
296
|
direction: "ltr",
|
|
297
297
|
isRTL: false,
|
|
298
298
|
flip: (e) => e,
|
|
299
299
|
flipStyle: (e, t) => ({ [e]: t })
|
|
300
300
|
});
|
|
301
|
-
|
|
301
|
+
be.createContext({
|
|
302
302
|
permissions: {},
|
|
303
303
|
getAccessMode: () => "full"
|
|
304
304
|
});
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
be.createContext(null);
|
|
306
|
+
be.createContext(null);
|
|
307
307
|
const Ce = {
|
|
308
308
|
space1: "4px",
|
|
309
309
|
space2: "8px",
|
|
@@ -342,7 +342,7 @@ const Ce = {
|
|
|
342
342
|
lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
|
|
343
343
|
xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
|
|
344
344
|
};
|
|
345
|
-
function
|
|
345
|
+
function $(e, t, r, a, n) {
|
|
346
346
|
return {
|
|
347
347
|
name: e,
|
|
348
348
|
darkMode: "light",
|
|
@@ -388,7 +388,7 @@ function j(e, t, r, a, n) {
|
|
|
388
388
|
transitions: Ne
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
|
|
391
|
+
$(
|
|
392
392
|
"Slate",
|
|
393
393
|
{
|
|
394
394
|
primary: "#64748b",
|
|
@@ -402,7 +402,7 @@ F(
|
|
|
402
402
|
{ primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
|
|
403
403
|
"#cbd5e1"
|
|
404
404
|
);
|
|
405
|
-
|
|
405
|
+
$(
|
|
406
406
|
"Zinc",
|
|
407
407
|
{
|
|
408
408
|
primary: "#71717a",
|
|
@@ -416,7 +416,7 @@ F(
|
|
|
416
416
|
{ primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
|
|
417
417
|
"#d4d4d8"
|
|
418
418
|
);
|
|
419
|
-
|
|
419
|
+
$(
|
|
420
420
|
"Stone",
|
|
421
421
|
{
|
|
422
422
|
primary: "#78716c",
|
|
@@ -430,7 +430,7 @@ F(
|
|
|
430
430
|
{ primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
|
|
431
431
|
"#d6d3d1"
|
|
432
432
|
);
|
|
433
|
-
|
|
433
|
+
$(
|
|
434
434
|
"Cool Gray",
|
|
435
435
|
{
|
|
436
436
|
primary: "#6b7280",
|
|
@@ -444,7 +444,7 @@ F(
|
|
|
444
444
|
{ primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
|
|
445
445
|
"#d1d5db"
|
|
446
446
|
);
|
|
447
|
-
|
|
447
|
+
$(
|
|
448
448
|
"Warm Gray",
|
|
449
449
|
{
|
|
450
450
|
primary: "#7c7568",
|
|
@@ -458,7 +458,7 @@ F(
|
|
|
458
458
|
{ primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
|
|
459
459
|
"#d4d0c8"
|
|
460
460
|
);
|
|
461
|
-
|
|
461
|
+
$(
|
|
462
462
|
"Silver",
|
|
463
463
|
{
|
|
464
464
|
primary: "#94a3b8",
|
|
@@ -472,7 +472,7 @@ F(
|
|
|
472
472
|
{ primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
|
|
473
473
|
"#cbd5e1"
|
|
474
474
|
);
|
|
475
|
-
|
|
475
|
+
$(
|
|
476
476
|
"Charcoal",
|
|
477
477
|
{
|
|
478
478
|
primary: "#374151",
|
|
@@ -486,7 +486,7 @@ F(
|
|
|
486
486
|
{ primary: "#111827", secondary: "#374151", muted: "#6b7280" },
|
|
487
487
|
"#d1d5db"
|
|
488
488
|
);
|
|
489
|
-
|
|
489
|
+
$(
|
|
490
490
|
"Ivory",
|
|
491
491
|
{
|
|
492
492
|
primary: "#92876d",
|
|
@@ -500,7 +500,7 @@ F(
|
|
|
500
500
|
{ primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
|
|
501
501
|
"#ddd8c4"
|
|
502
502
|
);
|
|
503
|
-
|
|
503
|
+
$(
|
|
504
504
|
"Rose",
|
|
505
505
|
{
|
|
506
506
|
primary: "#e11d48",
|
|
@@ -514,7 +514,7 @@ F(
|
|
|
514
514
|
{ primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
|
|
515
515
|
"#fda4af"
|
|
516
516
|
);
|
|
517
|
-
|
|
517
|
+
$(
|
|
518
518
|
"Emerald",
|
|
519
519
|
{
|
|
520
520
|
primary: "#059669",
|
|
@@ -528,7 +528,7 @@ F(
|
|
|
528
528
|
{ primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
|
|
529
529
|
"#6ee7b7"
|
|
530
530
|
);
|
|
531
|
-
|
|
531
|
+
$(
|
|
532
532
|
"Amber",
|
|
533
533
|
{
|
|
534
534
|
primary: "#d97706",
|
|
@@ -542,7 +542,7 @@ F(
|
|
|
542
542
|
{ primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
|
|
543
543
|
"#fcd34d"
|
|
544
544
|
);
|
|
545
|
-
|
|
545
|
+
$(
|
|
546
546
|
"Violet",
|
|
547
547
|
{
|
|
548
548
|
primary: "#7c3aed",
|
|
@@ -556,7 +556,7 @@ F(
|
|
|
556
556
|
{ primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
|
|
557
557
|
"#c4b5fd"
|
|
558
558
|
);
|
|
559
|
-
|
|
559
|
+
$(
|
|
560
560
|
"Teal",
|
|
561
561
|
{
|
|
562
562
|
primary: "#0d9488",
|
|
@@ -570,7 +570,7 @@ F(
|
|
|
570
570
|
{ primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
|
|
571
571
|
"#5eead4"
|
|
572
572
|
);
|
|
573
|
-
|
|
573
|
+
$(
|
|
574
574
|
"Indigo",
|
|
575
575
|
{
|
|
576
576
|
primary: "#4f46e5",
|
|
@@ -584,7 +584,7 @@ F(
|
|
|
584
584
|
{ primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
|
|
585
585
|
"#a5b4fc"
|
|
586
586
|
);
|
|
587
|
-
|
|
587
|
+
$(
|
|
588
588
|
"Cyan",
|
|
589
589
|
{
|
|
590
590
|
primary: "#0891b2",
|
|
@@ -598,7 +598,7 @@ F(
|
|
|
598
598
|
{ primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
|
|
599
599
|
"#67e8f9"
|
|
600
600
|
);
|
|
601
|
-
|
|
601
|
+
$(
|
|
602
602
|
"Lime",
|
|
603
603
|
{
|
|
604
604
|
primary: "#65a30d",
|
|
@@ -612,7 +612,7 @@ F(
|
|
|
612
612
|
{ primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
|
|
613
613
|
"#bef264"
|
|
614
614
|
);
|
|
615
|
-
|
|
615
|
+
$(
|
|
616
616
|
"Pink",
|
|
617
617
|
{
|
|
618
618
|
primary: "#db2777",
|
|
@@ -626,7 +626,7 @@ F(
|
|
|
626
626
|
{ primary: "#500724", secondary: "#831843", muted: "#f472b6" },
|
|
627
627
|
"#f9a8d4"
|
|
628
628
|
);
|
|
629
|
-
|
|
629
|
+
$(
|
|
630
630
|
"Orange",
|
|
631
631
|
{
|
|
632
632
|
primary: "#ea580c",
|
|
@@ -640,7 +640,7 @@ F(
|
|
|
640
640
|
{ primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
|
|
641
641
|
"#fdba74"
|
|
642
642
|
);
|
|
643
|
-
|
|
643
|
+
$(
|
|
644
644
|
"Fuchsia",
|
|
645
645
|
{
|
|
646
646
|
primary: "#c026d3",
|
|
@@ -654,7 +654,7 @@ F(
|
|
|
654
654
|
{ primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
|
|
655
655
|
"#e879f9"
|
|
656
656
|
);
|
|
657
|
-
|
|
657
|
+
$(
|
|
658
658
|
"Sky",
|
|
659
659
|
{
|
|
660
660
|
primary: "#0284c7",
|
|
@@ -668,7 +668,7 @@ F(
|
|
|
668
668
|
{ primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
|
|
669
669
|
"#7dd3fc"
|
|
670
670
|
);
|
|
671
|
-
|
|
671
|
+
$(
|
|
672
672
|
"Ruby",
|
|
673
673
|
{
|
|
674
674
|
primary: "#be123c",
|
|
@@ -682,7 +682,7 @@ F(
|
|
|
682
682
|
{ primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
|
|
683
683
|
"#fda4af"
|
|
684
684
|
);
|
|
685
|
-
|
|
685
|
+
$(
|
|
686
686
|
"Coral",
|
|
687
687
|
{
|
|
688
688
|
primary: "#f97316",
|
|
@@ -836,7 +836,7 @@ j(
|
|
|
836
836
|
{ primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
|
|
837
837
|
"#047857"
|
|
838
838
|
);
|
|
839
|
-
|
|
839
|
+
$(
|
|
840
840
|
"Forest",
|
|
841
841
|
{
|
|
842
842
|
primary: "#166534",
|
|
@@ -850,7 +850,7 @@ F(
|
|
|
850
850
|
{ primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
|
|
851
851
|
"#86efac"
|
|
852
852
|
);
|
|
853
|
-
|
|
853
|
+
$(
|
|
854
854
|
"Ocean",
|
|
855
855
|
{
|
|
856
856
|
primary: "#0369a1",
|
|
@@ -864,7 +864,7 @@ F(
|
|
|
864
864
|
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
|
|
865
865
|
"#7dd3fc"
|
|
866
866
|
);
|
|
867
|
-
|
|
867
|
+
$(
|
|
868
868
|
"Desert",
|
|
869
869
|
{
|
|
870
870
|
primary: "#b45309",
|
|
@@ -878,7 +878,7 @@ F(
|
|
|
878
878
|
{ primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
|
|
879
879
|
"#fde047"
|
|
880
880
|
);
|
|
881
|
-
|
|
881
|
+
$(
|
|
882
882
|
"Sunset",
|
|
883
883
|
{
|
|
884
884
|
primary: "#ea580c",
|
|
@@ -892,7 +892,7 @@ F(
|
|
|
892
892
|
{ primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
|
|
893
893
|
"#fdba74"
|
|
894
894
|
);
|
|
895
|
-
|
|
895
|
+
$(
|
|
896
896
|
"Aurora",
|
|
897
897
|
{
|
|
898
898
|
primary: "#0d9488",
|
|
@@ -906,7 +906,7 @@ F(
|
|
|
906
906
|
{ primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
|
|
907
907
|
"#5eead4"
|
|
908
908
|
);
|
|
909
|
-
|
|
909
|
+
$(
|
|
910
910
|
"Lavender",
|
|
911
911
|
{
|
|
912
912
|
primary: "#7e22ce",
|
|
@@ -920,7 +920,7 @@ F(
|
|
|
920
920
|
{ primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
|
|
921
921
|
"#d8b4fe"
|
|
922
922
|
);
|
|
923
|
-
|
|
923
|
+
$(
|
|
924
924
|
"Autumn",
|
|
925
925
|
{
|
|
926
926
|
primary: "#c2410c",
|
|
@@ -934,7 +934,7 @@ F(
|
|
|
934
934
|
{ primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
|
|
935
935
|
"#fca5a5"
|
|
936
936
|
);
|
|
937
|
-
|
|
937
|
+
$(
|
|
938
938
|
"Spring",
|
|
939
939
|
{
|
|
940
940
|
primary: "#16a34a",
|
|
@@ -948,7 +948,7 @@ F(
|
|
|
948
948
|
{ primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
|
|
949
949
|
"#86efac"
|
|
950
950
|
);
|
|
951
|
-
|
|
951
|
+
$(
|
|
952
952
|
"Arctic",
|
|
953
953
|
{
|
|
954
954
|
primary: "#0ea5e9",
|
|
@@ -962,7 +962,7 @@ F(
|
|
|
962
962
|
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
963
963
|
"#bae6fd"
|
|
964
964
|
);
|
|
965
|
-
|
|
965
|
+
$(
|
|
966
966
|
"Tropical",
|
|
967
967
|
{
|
|
968
968
|
primary: "#0d9488",
|
|
@@ -976,7 +976,7 @@ F(
|
|
|
976
976
|
{ primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
|
|
977
977
|
"#a7f3d0"
|
|
978
978
|
);
|
|
979
|
-
|
|
979
|
+
$(
|
|
980
980
|
"Pastel Rose",
|
|
981
981
|
{
|
|
982
982
|
primary: "#f472b6",
|
|
@@ -990,7 +990,7 @@ F(
|
|
|
990
990
|
{ primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
|
|
991
991
|
"#f9a8d4"
|
|
992
992
|
);
|
|
993
|
-
|
|
993
|
+
$(
|
|
994
994
|
"Pastel Sky",
|
|
995
995
|
{
|
|
996
996
|
primary: "#38bdf8",
|
|
@@ -1004,7 +1004,7 @@ F(
|
|
|
1004
1004
|
{ primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
1005
1005
|
"#bae6fd"
|
|
1006
1006
|
);
|
|
1007
|
-
|
|
1007
|
+
$(
|
|
1008
1008
|
"Pastel Mint",
|
|
1009
1009
|
{
|
|
1010
1010
|
primary: "#34d399",
|
|
@@ -1018,7 +1018,7 @@ F(
|
|
|
1018
1018
|
{ primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
|
|
1019
1019
|
"#a7f3d0"
|
|
1020
1020
|
);
|
|
1021
|
-
|
|
1021
|
+
$(
|
|
1022
1022
|
"Pastel Peach",
|
|
1023
1023
|
{
|
|
1024
1024
|
primary: "#fb923c",
|
|
@@ -1032,7 +1032,7 @@ F(
|
|
|
1032
1032
|
{ primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
|
|
1033
1033
|
"#fed7aa"
|
|
1034
1034
|
);
|
|
1035
|
-
|
|
1035
|
+
$(
|
|
1036
1036
|
"Pastel Lavender",
|
|
1037
1037
|
{
|
|
1038
1038
|
primary: "#a78bfa",
|
|
@@ -1046,7 +1046,7 @@ F(
|
|
|
1046
1046
|
{ primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
|
|
1047
1047
|
"#ddd6fe"
|
|
1048
1048
|
);
|
|
1049
|
-
|
|
1049
|
+
$(
|
|
1050
1050
|
"Pastel Lemon",
|
|
1051
1051
|
{
|
|
1052
1052
|
primary: "#facc15",
|
|
@@ -1060,7 +1060,7 @@ F(
|
|
|
1060
1060
|
{ primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
|
|
1061
1061
|
"#fef08a"
|
|
1062
1062
|
);
|
|
1063
|
-
|
|
1063
|
+
$(
|
|
1064
1064
|
"Pastel Sage",
|
|
1065
1065
|
{
|
|
1066
1066
|
primary: "#86efac",
|
|
@@ -1074,7 +1074,7 @@ F(
|
|
|
1074
1074
|
{ primary: "#166534", secondary: "#15803d", muted: "#86efac" },
|
|
1075
1075
|
"#bbf7d0"
|
|
1076
1076
|
);
|
|
1077
|
-
|
|
1077
|
+
$(
|
|
1078
1078
|
"Pastel Coral",
|
|
1079
1079
|
{
|
|
1080
1080
|
primary: "#fb7185",
|
|
@@ -1088,7 +1088,7 @@ F(
|
|
|
1088
1088
|
{ primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
|
|
1089
1089
|
"#fecdd3"
|
|
1090
1090
|
);
|
|
1091
|
-
|
|
1091
|
+
$(
|
|
1092
1092
|
"Banking",
|
|
1093
1093
|
{
|
|
1094
1094
|
primary: "#1e3a5f",
|
|
@@ -1102,7 +1102,7 @@ F(
|
|
|
1102
1102
|
{ primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
|
|
1103
1103
|
"#cbd5e1"
|
|
1104
1104
|
);
|
|
1105
|
-
|
|
1105
|
+
$(
|
|
1106
1106
|
"Healthcare",
|
|
1107
1107
|
{
|
|
1108
1108
|
primary: "#0891b2",
|
|
@@ -1116,7 +1116,7 @@ F(
|
|
|
1116
1116
|
{ primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
|
|
1117
1117
|
"#b2dfdb"
|
|
1118
1118
|
);
|
|
1119
|
-
|
|
1119
|
+
$(
|
|
1120
1120
|
"Legal",
|
|
1121
1121
|
{
|
|
1122
1122
|
primary: "#1e293b",
|
|
@@ -1130,7 +1130,7 @@ F(
|
|
|
1130
1130
|
{ primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
|
|
1131
1131
|
"#d6d3d1"
|
|
1132
1132
|
);
|
|
1133
|
-
|
|
1133
|
+
$(
|
|
1134
1134
|
"Tech Startup",
|
|
1135
1135
|
{
|
|
1136
1136
|
primary: "#7c3aed",
|
|
@@ -1144,7 +1144,7 @@ F(
|
|
|
1144
1144
|
{ primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
|
|
1145
1145
|
"#c4b5fd"
|
|
1146
1146
|
);
|
|
1147
|
-
|
|
1147
|
+
$(
|
|
1148
1148
|
"Enterprise",
|
|
1149
1149
|
{
|
|
1150
1150
|
primary: "#1e40af",
|
|
@@ -1158,7 +1158,7 @@ F(
|
|
|
1158
1158
|
{ primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
|
|
1159
1159
|
"#93c5fd"
|
|
1160
1160
|
);
|
|
1161
|
-
|
|
1161
|
+
$(
|
|
1162
1162
|
"Government",
|
|
1163
1163
|
{
|
|
1164
1164
|
primary: "#1d4ed8",
|
|
@@ -1172,7 +1172,7 @@ F(
|
|
|
1172
1172
|
{ primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
|
|
1173
1173
|
"#cbd5e1"
|
|
1174
1174
|
);
|
|
1175
|
-
|
|
1175
|
+
$(
|
|
1176
1176
|
"Education",
|
|
1177
1177
|
{
|
|
1178
1178
|
primary: "#059669",
|
|
@@ -1186,7 +1186,7 @@ F(
|
|
|
1186
1186
|
{ primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
|
|
1187
1187
|
"#a7f3d0"
|
|
1188
1188
|
);
|
|
1189
|
-
|
|
1189
|
+
$(
|
|
1190
1190
|
"Real Estate",
|
|
1191
1191
|
{
|
|
1192
1192
|
primary: "#92400e",
|
|
@@ -1200,7 +1200,7 @@ F(
|
|
|
1200
1200
|
{ primary: "#422006", secondary: "#713f12", muted: "#d97706" },
|
|
1201
1201
|
"#fcd34d"
|
|
1202
1202
|
);
|
|
1203
|
-
|
|
1203
|
+
$(
|
|
1204
1204
|
"Nord",
|
|
1205
1205
|
{
|
|
1206
1206
|
primary: "#5e81ac",
|
|
@@ -1228,7 +1228,7 @@ j(
|
|
|
1228
1228
|
{ primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
|
|
1229
1229
|
"#44475a"
|
|
1230
1230
|
);
|
|
1231
|
-
|
|
1231
|
+
$(
|
|
1232
1232
|
"Solarized Light",
|
|
1233
1233
|
{
|
|
1234
1234
|
primary: "#268bd2",
|
|
@@ -1298,7 +1298,7 @@ j(
|
|
|
1298
1298
|
{ primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
|
|
1299
1299
|
"#4a3866"
|
|
1300
1300
|
);
|
|
1301
|
-
|
|
1301
|
+
$(
|
|
1302
1302
|
"Vaporwave",
|
|
1303
1303
|
{
|
|
1304
1304
|
primary: "#ff71ce",
|
|
@@ -1326,7 +1326,7 @@ j(
|
|
|
1326
1326
|
{ primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
|
|
1327
1327
|
"#003300"
|
|
1328
1328
|
);
|
|
1329
|
-
|
|
1329
|
+
$(
|
|
1330
1330
|
"Sepia",
|
|
1331
1331
|
{
|
|
1332
1332
|
primary: "#8b6914",
|
|
@@ -1340,7 +1340,7 @@ F(
|
|
|
1340
1340
|
{ primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
|
|
1341
1341
|
"#d7ccc8"
|
|
1342
1342
|
);
|
|
1343
|
-
|
|
1343
|
+
$(
|
|
1344
1344
|
"Vintage",
|
|
1345
1345
|
{
|
|
1346
1346
|
primary: "#8d6e63",
|
|
@@ -1396,7 +1396,7 @@ j(
|
|
|
1396
1396
|
{ primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
|
|
1397
1397
|
"#4a2d66"
|
|
1398
1398
|
);
|
|
1399
|
-
|
|
1399
|
+
$(
|
|
1400
1400
|
"Christmas",
|
|
1401
1401
|
{
|
|
1402
1402
|
primary: "#c41e3a",
|
|
@@ -1424,7 +1424,7 @@ j(
|
|
|
1424
1424
|
{ primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
|
|
1425
1425
|
"#5c3400"
|
|
1426
1426
|
);
|
|
1427
|
-
|
|
1427
|
+
$(
|
|
1428
1428
|
"Valentine",
|
|
1429
1429
|
{
|
|
1430
1430
|
primary: "#e11d48",
|
|
@@ -1438,7 +1438,7 @@ F(
|
|
|
1438
1438
|
{ primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
|
|
1439
1439
|
"#fda4af"
|
|
1440
1440
|
);
|
|
1441
|
-
|
|
1441
|
+
$(
|
|
1442
1442
|
"Easter",
|
|
1443
1443
|
{
|
|
1444
1444
|
primary: "#a78bfa",
|
|
@@ -1452,7 +1452,7 @@ F(
|
|
|
1452
1452
|
{ primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
|
|
1453
1453
|
"#ddd6fe"
|
|
1454
1454
|
);
|
|
1455
|
-
|
|
1455
|
+
$(
|
|
1456
1456
|
"Summer Beach",
|
|
1457
1457
|
{
|
|
1458
1458
|
primary: "#0ea5e9",
|
|
@@ -1466,7 +1466,7 @@ F(
|
|
|
1466
1466
|
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
1467
1467
|
"#fcd34d"
|
|
1468
1468
|
);
|
|
1469
|
-
|
|
1469
|
+
$(
|
|
1470
1470
|
"Winter Frost",
|
|
1471
1471
|
{
|
|
1472
1472
|
primary: "#3b82f6",
|
|
@@ -1480,7 +1480,7 @@ F(
|
|
|
1480
1480
|
{ primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
|
|
1481
1481
|
"#bfdbfe"
|
|
1482
1482
|
);
|
|
1483
|
-
|
|
1483
|
+
$(
|
|
1484
1484
|
"Cherry Blossom",
|
|
1485
1485
|
{
|
|
1486
1486
|
primary: "#ec4899",
|
|
@@ -1494,7 +1494,7 @@ F(
|
|
|
1494
1494
|
{ primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
|
|
1495
1495
|
"#fbcfe8"
|
|
1496
1496
|
);
|
|
1497
|
-
|
|
1497
|
+
$(
|
|
1498
1498
|
"Harvest",
|
|
1499
1499
|
{
|
|
1500
1500
|
primary: "#b45309",
|
|
@@ -1508,7 +1508,7 @@ F(
|
|
|
1508
1508
|
{ primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
|
|
1509
1509
|
"#fcd34d"
|
|
1510
1510
|
);
|
|
1511
|
-
|
|
1511
|
+
$(
|
|
1512
1512
|
"Japanese Zen",
|
|
1513
1513
|
{
|
|
1514
1514
|
primary: "#6b7280",
|
|
@@ -1522,7 +1522,7 @@ F(
|
|
|
1522
1522
|
{ primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
|
|
1523
1523
|
"#d5cec0"
|
|
1524
1524
|
);
|
|
1525
|
-
|
|
1525
|
+
$(
|
|
1526
1526
|
"Moroccan",
|
|
1527
1527
|
{
|
|
1528
1528
|
primary: "#c2410c",
|
|
@@ -1536,7 +1536,7 @@ F(
|
|
|
1536
1536
|
{ primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
|
|
1537
1537
|
"#f5d0a0"
|
|
1538
1538
|
);
|
|
1539
|
-
|
|
1539
|
+
$(
|
|
1540
1540
|
"Scandinavian",
|
|
1541
1541
|
{
|
|
1542
1542
|
primary: "#4b5563",
|
|
@@ -1550,7 +1550,7 @@ F(
|
|
|
1550
1550
|
{ primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
|
|
1551
1551
|
"#e5e7eb"
|
|
1552
1552
|
);
|
|
1553
|
-
|
|
1553
|
+
$(
|
|
1554
1554
|
"Mediterranean",
|
|
1555
1555
|
{
|
|
1556
1556
|
primary: "#1e40af",
|
|
@@ -1564,7 +1564,7 @@ F(
|
|
|
1564
1564
|
{ primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
|
|
1565
1565
|
"#bfdbfe"
|
|
1566
1566
|
);
|
|
1567
|
-
|
|
1567
|
+
$(
|
|
1568
1568
|
"Chinese New Year",
|
|
1569
1569
|
{
|
|
1570
1570
|
primary: "#dc2626",
|
|
@@ -1578,7 +1578,7 @@ F(
|
|
|
1578
1578
|
{ primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
|
|
1579
1579
|
"#fca5a5"
|
|
1580
1580
|
);
|
|
1581
|
-
|
|
1581
|
+
$(
|
|
1582
1582
|
"Indian Festive",
|
|
1583
1583
|
{
|
|
1584
1584
|
primary: "#d97706",
|
|
@@ -1592,7 +1592,7 @@ F(
|
|
|
1592
1592
|
{ primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
|
|
1593
1593
|
"#fcd34d"
|
|
1594
1594
|
);
|
|
1595
|
-
|
|
1595
|
+
$(
|
|
1596
1596
|
"Brazilian Carnival",
|
|
1597
1597
|
{
|
|
1598
1598
|
primary: "#16a34a",
|
|
@@ -1606,7 +1606,7 @@ F(
|
|
|
1606
1606
|
{ primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
|
|
1607
1607
|
"#86efac"
|
|
1608
1608
|
);
|
|
1609
|
-
|
|
1609
|
+
$(
|
|
1610
1610
|
"African Earth",
|
|
1611
1611
|
{
|
|
1612
1612
|
primary: "#92400e",
|
|
@@ -1634,7 +1634,7 @@ j(
|
|
|
1634
1634
|
{ primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
|
|
1635
1635
|
"#ffffff"
|
|
1636
1636
|
);
|
|
1637
|
-
|
|
1637
|
+
$(
|
|
1638
1638
|
"Monochrome",
|
|
1639
1639
|
{
|
|
1640
1640
|
primary: "#404040",
|
|
@@ -1648,7 +1648,7 @@ F(
|
|
|
1648
1648
|
{ primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
|
|
1649
1649
|
"#c0c0c0"
|
|
1650
1650
|
);
|
|
1651
|
-
|
|
1651
|
+
$(
|
|
1652
1652
|
"Enhanced Contrast",
|
|
1653
1653
|
{
|
|
1654
1654
|
primary: "#0050b3",
|
|
@@ -1662,7 +1662,7 @@ F(
|
|
|
1662
1662
|
{ primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
|
|
1663
1663
|
"#8c8c8c"
|
|
1664
1664
|
);
|
|
1665
|
-
|
|
1665
|
+
$(
|
|
1666
1666
|
"Minimalist",
|
|
1667
1667
|
{
|
|
1668
1668
|
primary: "#18181b",
|
|
@@ -1704,7 +1704,7 @@ j(
|
|
|
1704
1704
|
{ primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
|
|
1705
1705
|
"#3e3e58"
|
|
1706
1706
|
);
|
|
1707
|
-
|
|
1707
|
+
$(
|
|
1708
1708
|
"Coffee",
|
|
1709
1709
|
{
|
|
1710
1710
|
primary: "#6f4e37",
|
|
@@ -1718,7 +1718,7 @@ F(
|
|
|
1718
1718
|
{ primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
|
|
1719
1719
|
"#d4c4a8"
|
|
1720
1720
|
);
|
|
1721
|
-
|
|
1721
|
+
$(
|
|
1722
1722
|
"Wine",
|
|
1723
1723
|
{
|
|
1724
1724
|
primary: "#7f1d1d",
|
|
@@ -1748,12 +1748,12 @@ function hr(e) {
|
|
|
1748
1748
|
function ee(e) {
|
|
1749
1749
|
return e < 1 ? `${(e * 1e3).toFixed(0)}μs` : e < 1e3 ? `${e.toFixed(2)}ms` : `${(e / 1e3).toFixed(2)}s`;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function ei() {
|
|
1752
1752
|
const e = Array.from(te.values()), t = hr(), r = e.reduce((o, i) => o + i.renderCount, 0), a = e.length > 0 ? e.reduce((o, i) => o + i.avgRenderTime, 0) / e.length : 0, n = Array.from(_e.values());
|
|
1753
1753
|
return { stats: e, slowRenders: t, totalRenders: r, avgRenderTime: a, marks: n };
|
|
1754
1754
|
}
|
|
1755
1755
|
function br() {
|
|
1756
|
-
const e =
|
|
1756
|
+
const e = ei();
|
|
1757
1757
|
console.group(
|
|
1758
1758
|
"%c[Nice2Dev Performance Report]",
|
|
1759
1759
|
"color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"
|
|
@@ -1780,10 +1780,10 @@ function br() {
|
|
|
1780
1780
|
}))
|
|
1781
1781
|
), console.groupEnd()), console.groupEnd();
|
|
1782
1782
|
}
|
|
1783
|
-
const
|
|
1783
|
+
const ai = be.memo(
|
|
1784
1784
|
({ position: e = "bottom-right", defaultCollapsed: t = true }) => {
|
|
1785
|
-
const [r, a] =
|
|
1786
|
-
if (
|
|
1785
|
+
const [r, a] = be.useState(t), [n, o] = be.useState([]), [i, s] = be.useState({ used: 0, total: 0 });
|
|
1786
|
+
if (be.useEffect(() => {
|
|
1787
1787
|
const l = () => {
|
|
1788
1788
|
const u = Array.from(te.values());
|
|
1789
1789
|
o(u.sort((y, f) => f.totalRenderTime - y.totalRenderTime).slice(0, 10));
|
|
@@ -1935,10 +1935,10 @@ const ri = he.memo(
|
|
|
1935
1935
|
);
|
|
1936
1936
|
}
|
|
1937
1937
|
);
|
|
1938
|
-
|
|
1938
|
+
ai.displayName = "ProfilerOverlay";
|
|
1939
1939
|
process.env.NODE_ENV === "development";
|
|
1940
|
-
|
|
1941
|
-
|
|
1940
|
+
be.createContext(null);
|
|
1941
|
+
be.createContext({
|
|
1942
1942
|
enabled: true,
|
|
1943
1943
|
active: false,
|
|
1944
1944
|
run: () => {
|
|
@@ -1975,10 +1975,10 @@ if (typeof document < "u" && !document.getElementById(Dt)) {
|
|
|
1975
1975
|
.nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
|
|
1976
1976
|
`, document.head.appendChild(e);
|
|
1977
1977
|
}
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1978
|
+
be.createContext(null);
|
|
1979
|
+
be.createContext(null);
|
|
1980
|
+
be.createContext(null);
|
|
1981
|
+
be.createContext(null);
|
|
1982
1982
|
const DEFAULT_VIEW_CONFIG$1 = {
|
|
1983
1983
|
timeUnit: "day",
|
|
1984
1984
|
showUtilization: true,
|
|
@@ -2008,15 +2008,15 @@ const NiceResourceAllocation = ({
|
|
|
2008
2008
|
}) => {
|
|
2009
2009
|
var _a2, _b;
|
|
2010
2010
|
const config = { ...DEFAULT_VIEW_CONFIG$1, ...externalConfig };
|
|
2011
|
-
const [selectedAllocation, setSelectedAllocation] =
|
|
2012
|
-
const [hoveredCell, setHoveredCell] =
|
|
2013
|
-
const [timeUnit, setTimeUnit] =
|
|
2014
|
-
const [expandedResources, setExpandedResources] =
|
|
2011
|
+
const [selectedAllocation, setSelectedAllocation] = be.useState(null);
|
|
2012
|
+
const [hoveredCell, setHoveredCell] = be.useState(null);
|
|
2013
|
+
const [timeUnit, setTimeUnit] = be.useState(config.timeUnit);
|
|
2014
|
+
const [expandedResources, setExpandedResources] = be.useState(
|
|
2015
2015
|
new Set(resources.map((r) => r.id))
|
|
2016
2016
|
);
|
|
2017
|
-
const [showAllocationModal, setShowAllocationModal] =
|
|
2018
|
-
const [newAllocation, setNewAllocation] =
|
|
2019
|
-
const timePeriods =
|
|
2017
|
+
const [showAllocationModal, setShowAllocationModal] = be.useState(false);
|
|
2018
|
+
const [newAllocation, setNewAllocation] = be.useState({});
|
|
2019
|
+
const timePeriods = be.useMemo(() => {
|
|
2020
2020
|
const periods = [];
|
|
2021
2021
|
const increment = TIME_INCREMENTS[timeUnit];
|
|
2022
2022
|
let current = new Date(dateRange.start);
|
|
@@ -2026,7 +2026,7 @@ const NiceResourceAllocation = ({
|
|
|
2026
2026
|
}
|
|
2027
2027
|
return periods;
|
|
2028
2028
|
}, [dateRange.start, dateRange.end, timeUnit]);
|
|
2029
|
-
const utilizationMap =
|
|
2029
|
+
const utilizationMap = be.useMemo(() => {
|
|
2030
2030
|
const map = /* @__PURE__ */ new Map();
|
|
2031
2031
|
resources.forEach((resource) => {
|
|
2032
2032
|
const resourceMap = /* @__PURE__ */ new Map();
|
|
@@ -2057,7 +2057,7 @@ const NiceResourceAllocation = ({
|
|
|
2057
2057
|
});
|
|
2058
2058
|
return map;
|
|
2059
2059
|
}, [resources, allocations, timePeriods, timeUnit]);
|
|
2060
|
-
const conflicts =
|
|
2060
|
+
const conflicts = be.useMemo(() => {
|
|
2061
2061
|
const conflictList = [];
|
|
2062
2062
|
utilizationMap.forEach((resourceMap, resourceId) => {
|
|
2063
2063
|
const resource = resources.find((r) => r.id === resourceId);
|
|
@@ -2085,7 +2085,7 @@ const NiceResourceAllocation = ({
|
|
|
2085
2085
|
});
|
|
2086
2086
|
return conflictList;
|
|
2087
2087
|
}, [utilizationMap, allocations, resources, timeUnit]);
|
|
2088
|
-
const getCellAllocations =
|
|
2088
|
+
const getCellAllocations = be.useCallback(
|
|
2089
2089
|
(resourceId, date) => {
|
|
2090
2090
|
const periodStart = date.getTime();
|
|
2091
2091
|
const periodEnd = periodStart + TIME_INCREMENTS[timeUnit];
|
|
@@ -2483,21 +2483,21 @@ const NiceInventoryManager = ({
|
|
|
2483
2483
|
}) => {
|
|
2484
2484
|
var _a2, _b;
|
|
2485
2485
|
const config = { ...DEFAULT_VIEW_CONFIG, ...externalConfig };
|
|
2486
|
-
const [filters, setFilters] =
|
|
2487
|
-
const [view, setView] =
|
|
2488
|
-
const [sortBy, setSortBy] =
|
|
2489
|
-
const [sortOrder, setSortOrder] =
|
|
2490
|
-
const [page, setPage] =
|
|
2491
|
-
const [selectedItems, setSelectedItems] =
|
|
2492
|
-
const [showItemModal, setShowItemModal] =
|
|
2493
|
-
const [showTransactionModal, setShowTransactionModal] =
|
|
2494
|
-
const [editingItem, setEditingItem] =
|
|
2495
|
-
const [newTransaction, setNewTransaction] =
|
|
2496
|
-
const [activeTab, setActiveTab] =
|
|
2497
|
-
const categories =
|
|
2486
|
+
const [filters, setFilters] = be.useState({});
|
|
2487
|
+
const [view, setView] = be.useState(config.view);
|
|
2488
|
+
const [sortBy, setSortBy] = be.useState(config.sortBy);
|
|
2489
|
+
const [sortOrder, setSortOrder] = be.useState(config.sortOrder);
|
|
2490
|
+
const [page, setPage] = be.useState(1);
|
|
2491
|
+
const [selectedItems, setSelectedItems] = be.useState(/* @__PURE__ */ new Set());
|
|
2492
|
+
const [showItemModal, setShowItemModal] = be.useState(false);
|
|
2493
|
+
const [showTransactionModal, setShowTransactionModal] = be.useState(false);
|
|
2494
|
+
const [editingItem, setEditingItem] = be.useState(null);
|
|
2495
|
+
const [newTransaction, setNewTransaction] = be.useState({});
|
|
2496
|
+
const [activeTab, setActiveTab] = be.useState("inventory");
|
|
2497
|
+
const categories = be.useMemo(() => {
|
|
2498
2498
|
return Array.from(new Set(items.map((item) => item.category))).sort();
|
|
2499
2499
|
}, [items]);
|
|
2500
|
-
const filteredItems =
|
|
2500
|
+
const filteredItems = be.useMemo(() => {
|
|
2501
2501
|
var _a3, _b2;
|
|
2502
2502
|
let result = [...items];
|
|
2503
2503
|
if (filters.searchQuery) {
|
|
@@ -2542,18 +2542,18 @@ const NiceInventoryManager = ({
|
|
|
2542
2542
|
});
|
|
2543
2543
|
return result;
|
|
2544
2544
|
}, [items, filters, sortBy, sortOrder]);
|
|
2545
|
-
const paginatedItems =
|
|
2545
|
+
const paginatedItems = be.useMemo(() => {
|
|
2546
2546
|
const start = (page - 1) * config.pageSize;
|
|
2547
2547
|
return filteredItems.slice(start, start + config.pageSize);
|
|
2548
2548
|
}, [filteredItems, page, config.pageSize]);
|
|
2549
2549
|
const totalPages = Math.ceil(filteredItems.length / config.pageSize);
|
|
2550
|
-
const reorderItems =
|
|
2550
|
+
const reorderItems = be.useMemo(() => {
|
|
2551
2551
|
return items.filter((item) => item.quantity <= item.reorderLevel);
|
|
2552
2552
|
}, [items]);
|
|
2553
|
-
const recentTransactions =
|
|
2553
|
+
const recentTransactions = be.useMemo(() => {
|
|
2554
2554
|
return [...transactions].sort((a, b) => b.date.getTime() - a.date.getTime()).slice(0, 50);
|
|
2555
2555
|
}, [transactions]);
|
|
2556
|
-
const kanbanGroups =
|
|
2556
|
+
const kanbanGroups = be.useMemo(() => {
|
|
2557
2557
|
if (view !== "kanban") {
|
|
2558
2558
|
return null;
|
|
2559
2559
|
}
|
|
@@ -3304,7 +3304,7 @@ function fmtDate$1(d, locale) {
|
|
|
3304
3304
|
const dt = d instanceof Date ? d : new Date(d);
|
|
3305
3305
|
return new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(dt);
|
|
3306
3306
|
}
|
|
3307
|
-
const NiceInvoiceView =
|
|
3307
|
+
const NiceInvoiceView = be.forwardRef(
|
|
3308
3308
|
function NiceInvoiceView2({
|
|
3309
3309
|
invoice,
|
|
3310
3310
|
locale,
|
|
@@ -3341,7 +3341,7 @@ const NiceInvoiceView = he.forwardRef(
|
|
|
3341
3341
|
vatId: "VAT ID",
|
|
3342
3342
|
...labels
|
|
3343
3343
|
};
|
|
3344
|
-
const totals =
|
|
3344
|
+
const totals = be.useMemo(() => {
|
|
3345
3345
|
let net = 0;
|
|
3346
3346
|
let vat = 0;
|
|
3347
3347
|
const byRate = /* @__PURE__ */ new Map();
|
|
@@ -3555,7 +3555,7 @@ function colorFor(occ, colors) {
|
|
|
3555
3555
|
}
|
|
3556
3556
|
return colors.high;
|
|
3557
3557
|
}
|
|
3558
|
-
const NiceWarehouseView =
|
|
3558
|
+
const NiceWarehouseView = be.forwardRef(
|
|
3559
3559
|
function NiceWarehouseView2({
|
|
3560
3560
|
warehouseName,
|
|
3561
3561
|
cells,
|
|
@@ -3568,8 +3568,8 @@ const NiceWarehouseView = he.forwardRef(
|
|
|
3568
3568
|
style,
|
|
3569
3569
|
id
|
|
3570
3570
|
}, ref) {
|
|
3571
|
-
const [hovered, setHovered] =
|
|
3572
|
-
const grid =
|
|
3571
|
+
const [hovered, setHovered] = be.useState(null);
|
|
3572
|
+
const grid = be.useMemo(() => {
|
|
3573
3573
|
const rows = /* @__PURE__ */ new Map();
|
|
3574
3574
|
for (const c of cells) {
|
|
3575
3575
|
const rowKey = c.row !== void 0 ? `r${c.row}` : c.location.rack ?? c.location.aisle ?? "0";
|
|
@@ -3597,7 +3597,7 @@ const NiceWarehouseView = he.forwardRef(
|
|
|
3597
3597
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-warehouse-view__grid", role: "grid", "aria-label": warehouseName, children: grid.map(({ rowKey, cells: row }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-warehouse-view__row", role: "row", children: row.map((c, idx) => {
|
|
3598
3598
|
const key = [c.location.rack, c.location.aisle, c.location.shelf, c.location.bin].filter(Boolean).join("-") || String(idx);
|
|
3599
3599
|
const aisleBreak = aisleEvery > 0 && idx > 0 && idx % aisleEvery === 0;
|
|
3600
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3600
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(be.Fragment, { children: [
|
|
3601
3601
|
aisleBreak && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-warehouse-view__aisle", "aria-hidden": true }),
|
|
3602
3602
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3603
3603
|
"button",
|
|
@@ -3671,7 +3671,7 @@ function fmtDate(d, locale) {
|
|
|
3671
3671
|
const dt = d instanceof Date ? d : new Date(d);
|
|
3672
3672
|
return new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(dt);
|
|
3673
3673
|
}
|
|
3674
|
-
const NicePurchaseOrder =
|
|
3674
|
+
const NicePurchaseOrder = be.forwardRef(
|
|
3675
3675
|
function NicePurchaseOrder2({
|
|
3676
3676
|
orders,
|
|
3677
3677
|
selectable = true,
|
|
@@ -3687,7 +3687,7 @@ const NicePurchaseOrder = he.forwardRef(
|
|
|
3687
3687
|
id
|
|
3688
3688
|
}, ref) {
|
|
3689
3689
|
var _a2;
|
|
3690
|
-
const [selectedId, setSelectedId] =
|
|
3690
|
+
const [selectedId, setSelectedId] = be.useState(
|
|
3691
3691
|
initialSelectedId ?? ((_a2 = orders[0]) == null ? void 0 : _a2.id)
|
|
3692
3692
|
);
|
|
3693
3693
|
const L = {
|
|
@@ -3708,7 +3708,7 @@ const NicePurchaseOrder = he.forwardRef(
|
|
|
3708
3708
|
receive: "Receive all",
|
|
3709
3709
|
...labels
|
|
3710
3710
|
};
|
|
3711
|
-
const selected =
|
|
3711
|
+
const selected = be.useMemo(
|
|
3712
3712
|
() => orders.find((o) => o.id === selectedId),
|
|
3713
3713
|
[orders, selectedId]
|
|
3714
3714
|
);
|
|
@@ -3830,7 +3830,7 @@ const NicePurchaseOrder = he.forwardRef(
|
|
|
3830
3830
|
] });
|
|
3831
3831
|
}
|
|
3832
3832
|
);
|
|
3833
|
-
const NiceHRDashboard =
|
|
3833
|
+
const NiceHRDashboard = be.forwardRef(
|
|
3834
3834
|
function NiceHRDashboard2({
|
|
3835
3835
|
employees,
|
|
3836
3836
|
labels,
|
|
@@ -3851,7 +3851,7 @@ const NiceHRDashboard = he.forwardRef(
|
|
|
3851
3851
|
activeEmployees: "Active",
|
|
3852
3852
|
...labels
|
|
3853
3853
|
};
|
|
3854
|
-
const stats =
|
|
3854
|
+
const stats = be.useMemo(() => {
|
|
3855
3855
|
const active = employees.filter((e) => e.active !== false);
|
|
3856
3856
|
const fte = active.reduce((s, e) => s + (e.fte ?? 1), 0);
|
|
3857
3857
|
const vacationAvg = active.length === 0 ? 0 : active.reduce((s, e) => s + (e.vacationBalanceDays ?? 0), 0) / active.length;
|
|
@@ -3964,11 +3964,11 @@ const DEFAULT_SEED = {
|
|
|
3964
3964
|
};
|
|
3965
3965
|
function useMockErpApi(options = {}) {
|
|
3966
3966
|
const { latencyMs = 300, errorRate = 0, seed } = options;
|
|
3967
|
-
const [loading, setLoading] =
|
|
3968
|
-
const [error, setError] =
|
|
3969
|
-
const [data, setData] =
|
|
3970
|
-
const settledRef =
|
|
3971
|
-
const refresh =
|
|
3967
|
+
const [loading, setLoading] = be.useState(true);
|
|
3968
|
+
const [error, setError] = be.useState(null);
|
|
3969
|
+
const [data, setData] = be.useState(() => ({ ...DEFAULT_SEED, ...seed }));
|
|
3970
|
+
const settledRef = be.useRef(false);
|
|
3971
|
+
const refresh = be.useCallback(async () => {
|
|
3972
3972
|
setLoading(true);
|
|
3973
3973
|
setError(null);
|
|
3974
3974
|
await wait(latencyMs);
|
|
@@ -3979,14 +3979,14 @@ function useMockErpApi(options = {}) {
|
|
|
3979
3979
|
}
|
|
3980
3980
|
setLoading(false);
|
|
3981
3981
|
}, [latencyMs, errorRate]);
|
|
3982
|
-
|
|
3982
|
+
be.useEffect(() => {
|
|
3983
3983
|
if (settledRef.current) {
|
|
3984
3984
|
return;
|
|
3985
3985
|
}
|
|
3986
3986
|
settledRef.current = true;
|
|
3987
3987
|
void refresh();
|
|
3988
3988
|
}, [refresh]);
|
|
3989
|
-
const writeWith =
|
|
3989
|
+
const writeWith = be.useCallback(
|
|
3990
3990
|
async (key, item) => {
|
|
3991
3991
|
await wait(latencyMs);
|
|
3992
3992
|
if (Math.random() < errorRate) {
|
|
@@ -4005,7 +4005,7 @@ function useMockErpApi(options = {}) {
|
|
|
4005
4005
|
},
|
|
4006
4006
|
[latencyMs, errorRate]
|
|
4007
4007
|
);
|
|
4008
|
-
return
|
|
4008
|
+
return be.useMemo(
|
|
4009
4009
|
() => ({
|
|
4010
4010
|
loading,
|
|
4011
4011
|
error,
|
|
@@ -4024,7 +4024,7 @@ function useMockErpApi(options = {}) {
|
|
|
4024
4024
|
[loading, error, data, refresh, writeWith]
|
|
4025
4025
|
);
|
|
4026
4026
|
}
|
|
4027
|
-
const NiceVatTable =
|
|
4027
|
+
const NiceVatTable = be.forwardRef(function NiceVatTable2({
|
|
4028
4028
|
country = "PL",
|
|
4029
4029
|
rates,
|
|
4030
4030
|
editable = false,
|
|
@@ -4037,7 +4037,7 @@ const NiceVatTable = he.forwardRef(function NiceVatTable2({
|
|
|
4037
4037
|
style,
|
|
4038
4038
|
id
|
|
4039
4039
|
}, ref) {
|
|
4040
|
-
const [internal, setInternal] =
|
|
4040
|
+
const [internal, setInternal] = be.useState(rates ?? NICE_VAT_PRESETS[country]);
|
|
4041
4041
|
const L = {
|
|
4042
4042
|
code: "Code",
|
|
4043
4043
|
rate: "Rate",
|
|
@@ -4047,7 +4047,7 @@ const NiceVatTable = he.forwardRef(function NiceVatTable2({
|
|
|
4047
4047
|
remove: "Remove",
|
|
4048
4048
|
...labels
|
|
4049
4049
|
};
|
|
4050
|
-
const update =
|
|
4050
|
+
const update = be.useCallback(
|
|
4051
4051
|
(next) => {
|
|
4052
4052
|
setInternal(next);
|
|
4053
4053
|
onChange == null ? void 0 : onChange(next);
|
|
@@ -4181,7 +4181,7 @@ function defaultBuildXml(opts) {
|
|
|
4181
4181
|
lines.push("</JPK>");
|
|
4182
4182
|
return lines.join("\n");
|
|
4183
4183
|
}
|
|
4184
|
-
const NiceJpkExporter =
|
|
4184
|
+
const NiceJpkExporter = be.forwardRef(
|
|
4185
4185
|
function NiceJpkExporter2({
|
|
4186
4186
|
invoices,
|
|
4187
4187
|
taxpayer,
|
|
@@ -4196,11 +4196,11 @@ const NiceJpkExporter = he.forwardRef(
|
|
|
4196
4196
|
id
|
|
4197
4197
|
}, ref) {
|
|
4198
4198
|
const today = /* @__PURE__ */ new Date();
|
|
4199
|
-
const [format, setFormat] =
|
|
4200
|
-
const [from, setFrom] =
|
|
4199
|
+
const [format, setFormat] = be.useState(defaultFormat);
|
|
4200
|
+
const [from, setFrom] = be.useState(
|
|
4201
4201
|
isoDate((defaultPeriod == null ? void 0 : defaultPeriod.from) ?? new Date(today.getFullYear(), today.getMonth(), 1))
|
|
4202
4202
|
);
|
|
4203
|
-
const [to, setTo] =
|
|
4203
|
+
const [to, setTo] = be.useState(
|
|
4204
4204
|
isoDate((defaultPeriod == null ? void 0 : defaultPeriod.to) ?? new Date(today.getFullYear(), today.getMonth() + 1, 0))
|
|
4205
4205
|
);
|
|
4206
4206
|
const L = {
|
|
@@ -4210,7 +4210,7 @@ const NiceJpkExporter = he.forwardRef(
|
|
|
4210
4210
|
export: "Export",
|
|
4211
4211
|
...labels
|
|
4212
4212
|
};
|
|
4213
|
-
const exportNow =
|
|
4213
|
+
const exportNow = be.useCallback(() => {
|
|
4214
4214
|
const opts = {
|
|
4215
4215
|
format,
|
|
4216
4216
|
period: { from: new Date(from), to: new Date(to) },
|