remoraid 2.0.0 → 2.1.7
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/core/index.cjs +100 -74
- package/dist/core/index.d.ts +22 -8
- package/dist/core/index.js +100 -74
- package/dist/jsonforms/index.cjs +1 -0
- package/dist/jsonforms/index.d.ts +1 -1
- package/dist/jsonforms/index.js +1 -0
- package/dist/modals/index.cjs +288 -0
- package/dist/modals/index.d.ts +15 -0
- package/dist/modals/index.js +319 -0
- package/dist/server/index.cjs +31 -31
- package/dist/server/index.d.ts +8 -4
- package/dist/server/index.js +31 -31
- package/package.json +7 -1
package/dist/core/index.js
CHANGED
@@ -118,6 +118,7 @@ var createRemoraidTheme = (customTheme, mantineTheme, colorScheme) => {
|
|
118
118
|
medium: defaultMediumIconProps,
|
119
119
|
tiny: { size: 14, stroke: 3 }
|
120
120
|
},
|
121
|
+
jsonStringifySpace: 2,
|
121
122
|
transparentBackground,
|
122
123
|
primaryColor,
|
123
124
|
spacingPx,
|
@@ -675,13 +676,31 @@ import {
|
|
675
676
|
} from "@mantine/core";
|
676
677
|
|
677
678
|
// src/core/components/Page/index.tsx
|
678
|
-
import { Container } from "@mantine/core";
|
679
679
|
import React5, {
|
680
680
|
useContext as useContext4,
|
681
681
|
useEffect as useEffect2
|
682
682
|
} from "react";
|
683
683
|
import { usePathname as usePathname2 } from "next/navigation";
|
684
|
+
|
685
|
+
// src/core/components/Page/PageContainer/index.tsx
|
686
|
+
import { Container } from "@mantine/core";
|
684
687
|
import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
|
688
|
+
function PageContainer({
|
689
|
+
children,
|
690
|
+
pt,
|
691
|
+
componentsProps
|
692
|
+
}) {
|
693
|
+
const theme = useRemoraidTheme();
|
694
|
+
return /* @__PURE__ */ jsxDEV8(Container, {
|
695
|
+
size: theme.containerSize,
|
696
|
+
pt: pt ?? "md",
|
697
|
+
...componentsProps?.container,
|
698
|
+
children
|
699
|
+
}, undefined, false, undefined, this);
|
700
|
+
}
|
701
|
+
|
702
|
+
// src/core/components/Page/index.tsx
|
703
|
+
import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
|
685
704
|
var pageContext = React5.createContext(null);
|
686
705
|
var usePage = () => {
|
687
706
|
return useContext4(pageContext);
|
@@ -695,7 +714,6 @@ function Page({
|
|
695
714
|
}) {
|
696
715
|
const pathname = usePathname2();
|
697
716
|
const { isPageRegistered, registerPage } = useWidgets();
|
698
|
-
const theme = useRemoraidTheme();
|
699
717
|
const pageId = config?.pageId ?? pathname;
|
700
718
|
useEffect2(() => {
|
701
719
|
if (!isPageRegistered(pageId)) {
|
@@ -704,12 +722,11 @@ function Page({
|
|
704
722
|
}
|
705
723
|
}
|
706
724
|
}, []);
|
707
|
-
return /* @__PURE__ */
|
725
|
+
return /* @__PURE__ */ jsxDEV9(pageContext.Provider, {
|
708
726
|
value: { name: name ?? pathname, pageId, ...config },
|
709
|
-
children: /* @__PURE__ */
|
710
|
-
|
711
|
-
|
712
|
-
...componentsProps?.container,
|
727
|
+
children: /* @__PURE__ */ jsxDEV9(PageContainer, {
|
728
|
+
pt,
|
729
|
+
componentsProps: { container: componentsProps?.container },
|
713
730
|
children
|
714
731
|
}, undefined, false, undefined, this)
|
715
732
|
}, undefined, false, undefined, this);
|
@@ -717,7 +734,7 @@ function Page({
|
|
717
734
|
|
718
735
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
719
736
|
import { IconCheck } from "@tabler/icons-react";
|
720
|
-
import { jsxDEV as
|
737
|
+
import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
|
721
738
|
function WidgetSelectionHeader({
|
722
739
|
title,
|
723
740
|
disabledWidgets,
|
@@ -730,39 +747,39 @@ function WidgetSelectionHeader({
|
|
730
747
|
console.error("'WidgetSelectionHeader' must be rendered inside of a 'Page' component.");
|
731
748
|
return null;
|
732
749
|
}
|
733
|
-
return /* @__PURE__ */
|
750
|
+
return /* @__PURE__ */ jsxDEV10(Flex2, {
|
734
751
|
justify: "flex-start",
|
735
752
|
align: "center",
|
736
753
|
gap: "xs",
|
737
754
|
mt,
|
738
755
|
children: [
|
739
|
-
/* @__PURE__ */
|
756
|
+
/* @__PURE__ */ jsxDEV10(Text, {
|
740
757
|
size: "lg",
|
741
758
|
fw: 400,
|
742
759
|
children: title ?? page.name
|
743
760
|
}, undefined, false, undefined, this),
|
744
|
-
/* @__PURE__ */
|
761
|
+
/* @__PURE__ */ jsxDEV10(Divider2, {
|
745
762
|
orientation: "vertical"
|
746
763
|
}, undefined, false, undefined, this),
|
747
|
-
isPageRegistered(page.pageId) && /* @__PURE__ */
|
764
|
+
isPageRegistered(page.pageId) && /* @__PURE__ */ jsxDEV10(ScrollArea, {
|
748
765
|
flex: 1,
|
749
766
|
...theme.scrollAreaProps,
|
750
|
-
children: /* @__PURE__ */
|
767
|
+
children: /* @__PURE__ */ jsxDEV10(Chip.Group, {
|
751
768
|
multiple: true,
|
752
769
|
value: Object.keys(widgets[page.pageId]).filter((widgetId) => widgets[page.pageId][widgetId].selected),
|
753
770
|
onChange: (value) => {
|
754
771
|
updateWidgetSelectionBulk(page.pageId, value);
|
755
772
|
},
|
756
|
-
children: /* @__PURE__ */
|
773
|
+
children: /* @__PURE__ */ jsxDEV10(Flex2, {
|
757
774
|
justify: "flex-start",
|
758
775
|
align: "center",
|
759
776
|
gap: "xs",
|
760
777
|
h: "auto",
|
761
|
-
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */
|
778
|
+
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */ jsxDEV10(Chip, {
|
762
779
|
value: widgetId,
|
763
780
|
size: "sm",
|
764
781
|
disabled: disabledWidgets && disabledWidgets.includes(widgetId),
|
765
|
-
icon: /* @__PURE__ */
|
782
|
+
icon: /* @__PURE__ */ jsxDEV10(IconCheck, {
|
766
783
|
...theme.iconProps.tiny
|
767
784
|
}, undefined, false, undefined, this),
|
768
785
|
children: widgets[page.pageId][widgetId].name
|
@@ -776,17 +793,17 @@ function WidgetSelectionHeader({
|
|
776
793
|
// src/core/components/CloseButton/index.tsx
|
777
794
|
import { ActionIcon, Transition } from "@mantine/core";
|
778
795
|
import { IconX } from "@tabler/icons-react";
|
779
|
-
import { jsxDEV as
|
796
|
+
import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
|
780
797
|
function CloseButton({ widgetId }) {
|
781
798
|
const theme = useRemoraidTheme();
|
782
799
|
const { activeWidget, updateWidgetSelection } = useWidgets();
|
783
800
|
const page = usePage();
|
784
|
-
return /* @__PURE__ */
|
801
|
+
return /* @__PURE__ */ jsxDEV11(Transition, {
|
785
802
|
mounted: activeWidget === widgetId,
|
786
803
|
transition: "pop-top-right",
|
787
804
|
duration: theme.transitionDurations.short,
|
788
805
|
timingFunction: "ease",
|
789
|
-
children: (transitionStyle) => /* @__PURE__ */
|
806
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV11(ActionIcon, {
|
790
807
|
pos: "absolute",
|
791
808
|
size: "xs",
|
792
809
|
className: "remoraid-close-button",
|
@@ -799,7 +816,7 @@ function CloseButton({ widgetId }) {
|
|
799
816
|
updateWidgetSelection(page.pageId, widgetId, false);
|
800
817
|
},
|
801
818
|
style: transitionStyle,
|
802
|
-
children: /* @__PURE__ */
|
819
|
+
children: /* @__PURE__ */ jsxDEV11(IconX, {
|
803
820
|
...theme.iconProps.tiny
|
804
821
|
}, undefined, false, undefined, this)
|
805
822
|
}, undefined, false, undefined, this)
|
@@ -819,7 +836,7 @@ import {
|
|
819
836
|
Tooltip as Tooltip2,
|
820
837
|
Transition as Transition2
|
821
838
|
} from "@mantine/core";
|
822
|
-
import { jsxDEV as
|
839
|
+
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
823
840
|
var isBadgeMinimalProps = (e) => {
|
824
841
|
if (typeof e !== "object") {
|
825
842
|
return false;
|
@@ -832,17 +849,17 @@ var isBadgeMinimalProps = (e) => {
|
|
832
849
|
function BadgeMinimal(props) {
|
833
850
|
const { label, tooltip, mounted, componentsProps } = props;
|
834
851
|
const theme = useRemoraidTheme();
|
835
|
-
return /* @__PURE__ */
|
852
|
+
return /* @__PURE__ */ jsxDEV12(Transition2, {
|
836
853
|
mounted: mounted !== false,
|
837
854
|
transition: "fade",
|
838
855
|
duration: theme.transitionDurations.short,
|
839
856
|
timingFunction: "ease",
|
840
857
|
...componentsProps?.transition,
|
841
|
-
children: (transitionStyle) => /* @__PURE__ */
|
858
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV12(Tooltip2, {
|
842
859
|
disabled: !tooltip,
|
843
860
|
label: tooltip,
|
844
861
|
...componentsProps?.tooltip,
|
845
|
-
children: /* @__PURE__ */
|
862
|
+
children: /* @__PURE__ */ jsxDEV12(Badge, {
|
846
863
|
variant: "default",
|
847
864
|
...componentsProps?.badge,
|
848
865
|
style: {
|
@@ -857,7 +874,7 @@ function BadgeMinimal(props) {
|
|
857
874
|
}
|
858
875
|
|
859
876
|
// src/core/components/BadgeGroup/index.tsx
|
860
|
-
import { jsxDEV as
|
877
|
+
import { jsxDEV as jsxDEV13, Fragment as Fragment2 } from "react/jsx-dev-runtime";
|
861
878
|
import { createElement } from "react";
|
862
879
|
function BadgeGroup({
|
863
880
|
badges,
|
@@ -867,9 +884,9 @@ function BadgeGroup({
|
|
867
884
|
}) {
|
868
885
|
const theme = useRemoraidTheme();
|
869
886
|
const numVisibleBadges = badges.filter((e) => isBadgeMinimalProps(e) ? e.mounted !== false : true).length;
|
870
|
-
return /* @__PURE__ */
|
887
|
+
return /* @__PURE__ */ jsxDEV13(Fragment2, {
|
871
888
|
children: [
|
872
|
-
/* @__PURE__ */
|
889
|
+
/* @__PURE__ */ jsxDEV13(Group3, {
|
873
890
|
gap: gap ?? "xs",
|
874
891
|
wrap: "nowrap",
|
875
892
|
visibleFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
@@ -883,10 +900,10 @@ function BadgeGroup({
|
|
883
900
|
return e;
|
884
901
|
})
|
885
902
|
}, undefined, false, undefined, this),
|
886
|
-
/* @__PURE__ */
|
903
|
+
/* @__PURE__ */ jsxDEV13(Tooltip3, {
|
887
904
|
label: `${numVisibleBadges} badge${numVisibleBadges === 1 ? "" : "s"}`,
|
888
905
|
...componentsProps?.tooltip,
|
889
|
-
children: /* @__PURE__ */
|
906
|
+
children: /* @__PURE__ */ jsxDEV13(Badge2, {
|
890
907
|
hiddenFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
891
908
|
hidden: numVisibleBadges === 0,
|
892
909
|
variant: "light",
|
@@ -904,7 +921,7 @@ import {
|
|
904
921
|
Alert,
|
905
922
|
Transition as Transition3
|
906
923
|
} from "@mantine/core";
|
907
|
-
import { jsxDEV as
|
924
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
908
925
|
var isAlertMinimalProps = (e) => {
|
909
926
|
if (typeof e !== "object") {
|
910
927
|
return false;
|
@@ -926,13 +943,13 @@ function AlertMinimal({
|
|
926
943
|
componentsProps
|
927
944
|
}) {
|
928
945
|
const theme = useRemoraidTheme();
|
929
|
-
return /* @__PURE__ */
|
946
|
+
return /* @__PURE__ */ jsxDEV14(Transition3, {
|
930
947
|
mounted: mounted !== false,
|
931
948
|
transition: "fade",
|
932
949
|
duration: theme.transitionDurations.short,
|
933
950
|
timingFunction: "ease",
|
934
951
|
...componentsProps?.transition,
|
935
|
-
children: (transitionStyle) => /* @__PURE__ */
|
952
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV14(Alert, {
|
936
953
|
...theme.alertProps[category],
|
937
954
|
title: title ?? theme.alertProps[category].title,
|
938
955
|
withCloseButton: onClose !== undefined,
|
@@ -958,7 +975,7 @@ import {
|
|
958
975
|
Tooltip as Tooltip4
|
959
976
|
} from "@mantine/core";
|
960
977
|
import { IconClick } from "@tabler/icons-react";
|
961
|
-
import { jsxDEV as
|
978
|
+
import { jsxDEV as jsxDEV15, Fragment as Fragment3 } from "react/jsx-dev-runtime";
|
962
979
|
var isResponsiveButtonProps = (e) => {
|
963
980
|
if (typeof e !== "object") {
|
964
981
|
return false;
|
@@ -971,17 +988,17 @@ var isResponsiveButtonProps = (e) => {
|
|
971
988
|
function ResponsiveButton(props) {
|
972
989
|
const { onClick, label, loading, variant, componentsProps, breakpoint } = props;
|
973
990
|
const theme = useRemoraidTheme();
|
974
|
-
const icon = props.icon ? /* @__PURE__ */
|
991
|
+
const icon = props.icon ? /* @__PURE__ */ jsxDEV15(props.icon, {
|
975
992
|
...theme.iconProps.medium
|
976
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
993
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV15(IconClick, {
|
977
994
|
...theme.iconProps.medium
|
978
995
|
}, undefined, false, undefined, this);
|
979
|
-
return /* @__PURE__ */
|
996
|
+
return /* @__PURE__ */ jsxDEV15(Fragment3, {
|
980
997
|
children: [
|
981
|
-
/* @__PURE__ */
|
998
|
+
/* @__PURE__ */ jsxDEV15(Tooltip4, {
|
982
999
|
label,
|
983
1000
|
...componentsProps?.tooltip,
|
984
|
-
children: /* @__PURE__ */
|
1001
|
+
children: /* @__PURE__ */ jsxDEV15(ActionIcon2, {
|
985
1002
|
variant: variant || "default",
|
986
1003
|
onClick,
|
987
1004
|
loading,
|
@@ -991,7 +1008,7 @@ function ResponsiveButton(props) {
|
|
991
1008
|
children: icon
|
992
1009
|
}, undefined, false, undefined, this)
|
993
1010
|
}, undefined, false, undefined, this),
|
994
|
-
/* @__PURE__ */
|
1011
|
+
/* @__PURE__ */ jsxDEV15(Button, {
|
995
1012
|
onClick,
|
996
1013
|
loading,
|
997
1014
|
variant: variant || "default",
|
@@ -1008,7 +1025,7 @@ import {
|
|
1008
1025
|
Transition as Transition4
|
1009
1026
|
} from "@mantine/core";
|
1010
1027
|
import { useEffect as useEffect3 } from "react";
|
1011
|
-
import { jsxDEV as
|
1028
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
1012
1029
|
function WidgetWrapper({
|
1013
1030
|
children,
|
1014
1031
|
config,
|
@@ -1034,12 +1051,12 @@ function WidgetWrapper({
|
|
1034
1051
|
registerWidget(page.pageId, config);
|
1035
1052
|
}
|
1036
1053
|
}, [pageRegistered]);
|
1037
|
-
return /* @__PURE__ */
|
1054
|
+
return /* @__PURE__ */ jsxDEV16(Transition4, {
|
1038
1055
|
mounted: page !== null && isWidgetSelected(page.pageId, config.widgetId),
|
1039
1056
|
transition: "fade-left",
|
1040
1057
|
duration: theme.transitionDurations.medium,
|
1041
1058
|
timingFunction: "ease",
|
1042
|
-
children: (transitionStyle) => /* @__PURE__ */
|
1059
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV16(Paper3, {
|
1043
1060
|
p: "md",
|
1044
1061
|
shadow: "md",
|
1045
1062
|
bg: theme.transparentBackground,
|
@@ -1055,7 +1072,7 @@ function WidgetWrapper({
|
|
1055
1072
|
updateActiveWidget(null);
|
1056
1073
|
},
|
1057
1074
|
children: [
|
1058
|
-
withCloseButton !== false && /* @__PURE__ */
|
1075
|
+
withCloseButton !== false && /* @__PURE__ */ jsxDEV16(CloseButton, {
|
1059
1076
|
widgetId: config.widgetId
|
1060
1077
|
}, undefined, false, undefined, this),
|
1061
1078
|
children
|
@@ -1071,7 +1088,7 @@ import {
|
|
1071
1088
|
Loader,
|
1072
1089
|
Title
|
1073
1090
|
} from "@mantine/core";
|
1074
|
-
import { jsxDEV as
|
1091
|
+
import { jsxDEV as jsxDEV17, Fragment as Fragment4 } from "react/jsx-dev-runtime";
|
1075
1092
|
import { createElement as createElement2 } from "react";
|
1076
1093
|
function Widget({
|
1077
1094
|
children,
|
@@ -1089,7 +1106,7 @@ function Widget({
|
|
1089
1106
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
1090
1107
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
1091
1108
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
1092
|
-
return /* @__PURE__ */
|
1109
|
+
return /* @__PURE__ */ jsxDEV17(WidgetWrapper, {
|
1093
1110
|
config: {
|
1094
1111
|
widgetId: id,
|
1095
1112
|
name: title,
|
@@ -1102,28 +1119,28 @@ function Widget({
|
|
1102
1119
|
},
|
1103
1120
|
...componentsProps?.wrapper,
|
1104
1121
|
children: [
|
1105
|
-
/* @__PURE__ */
|
1122
|
+
/* @__PURE__ */ jsxDEV17(Group4, {
|
1106
1123
|
justify: "space-between",
|
1107
1124
|
wrap: "nowrap",
|
1108
1125
|
children: [
|
1109
|
-
/* @__PURE__ */
|
1126
|
+
/* @__PURE__ */ jsxDEV17(Group4, {
|
1110
1127
|
gap: badgesGap,
|
1111
1128
|
wrap: "nowrap",
|
1112
1129
|
children: [
|
1113
|
-
/* @__PURE__ */
|
1130
|
+
/* @__PURE__ */ jsxDEV17(Title, {
|
1114
1131
|
order: 1,
|
1115
1132
|
size: "h3",
|
1116
1133
|
lineClamp: 1,
|
1117
1134
|
children: title
|
1118
1135
|
}, undefined, false, undefined, this),
|
1119
|
-
badges !== undefined && /* @__PURE__ */
|
1136
|
+
badges !== undefined && /* @__PURE__ */ jsxDEV17(BadgeGroup, {
|
1120
1137
|
badges,
|
1121
1138
|
gap: badgesGap,
|
1122
1139
|
...componentsProps?.badgeGroup
|
1123
1140
|
}, undefined, false, undefined, this)
|
1124
1141
|
]
|
1125
1142
|
}, undefined, true, undefined, this),
|
1126
|
-
/* @__PURE__ */
|
1143
|
+
/* @__PURE__ */ jsxDEV17(Group4, {
|
1127
1144
|
gap: buttonsGap,
|
1128
1145
|
wrap: "nowrap",
|
1129
1146
|
children: buttons !== undefined && buttons.map((e, i) => {
|
@@ -1138,7 +1155,7 @@ function Widget({
|
|
1138
1155
|
}, undefined, false, undefined, this)
|
1139
1156
|
]
|
1140
1157
|
}, undefined, true, undefined, this),
|
1141
|
-
/* @__PURE__ */
|
1158
|
+
/* @__PURE__ */ jsxDEV17(Divider3, {
|
1142
1159
|
my: "md"
|
1143
1160
|
}, undefined, false, undefined, this),
|
1144
1161
|
alerts !== undefined && alerts.map((a, i) => {
|
@@ -1151,11 +1168,11 @@ function Widget({
|
|
1151
1168
|
}
|
1152
1169
|
return a;
|
1153
1170
|
}),
|
1154
|
-
loading ? /* @__PURE__ */
|
1155
|
-
children: /* @__PURE__ */
|
1171
|
+
loading ? /* @__PURE__ */ jsxDEV17(Center, {
|
1172
|
+
children: /* @__PURE__ */ jsxDEV17(Loader, {
|
1156
1173
|
...componentsProps?.loader
|
1157
1174
|
}, undefined, false, undefined, this)
|
1158
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
1175
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV17(Fragment4, {
|
1159
1176
|
children
|
1160
1177
|
}, undefined, false, undefined, this)
|
1161
1178
|
]
|
@@ -1164,7 +1181,7 @@ function Widget({
|
|
1164
1181
|
// src/core/components/Page/NotFoundPage/index.tsx
|
1165
1182
|
import { Alert as Alert2 } from "@mantine/core";
|
1166
1183
|
import { usePathname as usePathname3 } from "next/navigation";
|
1167
|
-
import { jsxDEV as
|
1184
|
+
import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
|
1168
1185
|
function NotFoundPage({
|
1169
1186
|
children,
|
1170
1187
|
message,
|
@@ -1172,11 +1189,11 @@ function NotFoundPage({
|
|
1172
1189
|
}) {
|
1173
1190
|
const pathname = usePathname3();
|
1174
1191
|
const theme = useRemoraidTheme();
|
1175
|
-
return /* @__PURE__ */
|
1192
|
+
return /* @__PURE__ */ jsxDEV18(Page, {
|
1176
1193
|
name: "Not Found",
|
1177
1194
|
...componentsProps?.page,
|
1178
1195
|
children: [
|
1179
|
-
/* @__PURE__ */
|
1196
|
+
/* @__PURE__ */ jsxDEV18(Alert2, {
|
1180
1197
|
...theme.alertProps.negative,
|
1181
1198
|
title: "404 - Page Not Found",
|
1182
1199
|
children: message ?? `Could not find page ${pathname}.`
|
@@ -1187,31 +1204,39 @@ function NotFoundPage({
|
|
1187
1204
|
}
|
1188
1205
|
// src/core/components/EnvironmentShell/index.tsx
|
1189
1206
|
import { Alert as Alert3 } from "@mantine/core";
|
1190
|
-
import { jsxDEV as
|
1207
|
+
import { jsxDEV as jsxDEV19, Fragment as Fragment5 } from "react/jsx-dev-runtime";
|
1191
1208
|
function EnvironmentShell({
|
1192
1209
|
children,
|
1193
|
-
|
1210
|
+
environment,
|
1194
1211
|
message,
|
1195
1212
|
m,
|
1196
|
-
mt
|
1213
|
+
mt,
|
1214
|
+
withContainer,
|
1215
|
+
componentsProps
|
1197
1216
|
}) {
|
1198
1217
|
const theme = useRemoraidTheme();
|
1199
|
-
const
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1218
|
+
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
1219
|
+
const alertTitle = `Please Specify Environment Variable${undefinedKeys.length > 1 ? "s" : ""}`;
|
1220
|
+
const alertMessage = `Components could not be rendered because the following environment variables are not specified: ${undefinedKeys.join(", ")}.`;
|
1221
|
+
const alert = /* @__PURE__ */ jsxDEV19(Alert3, {
|
1222
|
+
...theme.alertProps.neutral,
|
1223
|
+
title: alertTitle,
|
1224
|
+
m,
|
1225
|
+
mt,
|
1226
|
+
children: message ?? alertMessage
|
1227
|
+
}, undefined, false, undefined, this);
|
1228
|
+
if (undefinedKeys.length === 0) {
|
1229
|
+
return /* @__PURE__ */ jsxDEV19(Fragment5, {
|
1230
|
+
children
|
1210
1231
|
}, undefined, false, undefined, this);
|
1211
1232
|
}
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1233
|
+
if (withContainer) {
|
1234
|
+
return /* @__PURE__ */ jsxDEV19(PageContainer, {
|
1235
|
+
componentsProps: { container: componentsProps?.container },
|
1236
|
+
children: alert
|
1237
|
+
}, undefined, false, undefined, this);
|
1238
|
+
}
|
1239
|
+
return alert;
|
1215
1240
|
}
|
1216
1241
|
export {
|
1217
1242
|
userExperienceCookieName,
|
@@ -1226,6 +1251,7 @@ export {
|
|
1226
1251
|
Widget,
|
1227
1252
|
ResponsiveButton,
|
1228
1253
|
RemoraidProvider,
|
1254
|
+
PageContainer,
|
1229
1255
|
Page,
|
1230
1256
|
NotFoundPage,
|
1231
1257
|
EnvironmentShell,
|
package/dist/jsonforms/index.cjs
CHANGED
@@ -25,4 +25,4 @@ interface FormOptionsProviderProps {
|
|
25
25
|
initialValue?: Partial<FormOptions>;
|
26
26
|
}
|
27
27
|
declare function FormOptionsProvider({ children, initialValue }: PropsWithChildren<FormOptionsProviderProps>): ReactNode;
|
28
|
-
export { useFormOptions, renderers, remoraidRenderers, remoraidLayoutRenderers, remoraidControlRenderers, defaultFormOptions, FormOptionsProvider };
|
28
|
+
export { useFormOptions, renderers, remoraidRenderers, remoraidLayoutRenderers, remoraidControlRenderers, defaultFormOptions, RemoraidRenderer, RemoraidLayoutRenderer, RemoraidControlRenderer, JSONFormsRenderer, FormOptionsProviderProps, FormOptionsProvider, FormOptions };
|
package/dist/jsonforms/index.js
CHANGED