remoraid 2.0.0 → 2.2.1
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 +191 -108
- package/dist/core/index.d.ts +74 -44
- package/dist/core/index.js +191 -106
- package/dist/jsonforms/index.cjs +66 -155
- package/dist/jsonforms/index.d.ts +1 -1
- package/dist/jsonforms/index.js +48 -149
- package/dist/modals/index.cjs +63 -0
- package/dist/modals/index.d.ts +15 -0
- package/dist/modals/index.js +31 -0
- package/dist/server/index.cjs +31 -31
- package/dist/server/index.d.ts +11 -7
- package/dist/server/index.js +31 -31
- package/package.json +7 -1
package/dist/core/index.cjs
CHANGED
@@ -55,10 +55,12 @@ __export(exports_core, {
|
|
55
55
|
Widget: () => Widget,
|
56
56
|
ResponsiveButton: () => ResponsiveButton,
|
57
57
|
RemoraidProvider: () => RemoraidProvider,
|
58
|
+
PageContainer: () => PageContainer,
|
58
59
|
Page: () => Page,
|
59
60
|
NotFoundPage: () => NotFoundPage,
|
60
61
|
EnvironmentShell: () => EnvironmentShell,
|
61
62
|
CloseButton: () => CloseButton,
|
63
|
+
Button: () => Button,
|
62
64
|
BadgeMinimal: () => BadgeMinimal,
|
63
65
|
BadgeGroup: () => BadgeGroup,
|
64
66
|
AppShell: () => AppShell,
|
@@ -79,6 +81,15 @@ var import_react2 = require("react");
|
|
79
81
|
|
80
82
|
// src/core/lib/utils.ts
|
81
83
|
var co = (condition, value, fallback) => condition(value) ? value : fallback;
|
84
|
+
var isRemoraidButtonProps = (e) => {
|
85
|
+
if (typeof e !== "object") {
|
86
|
+
return false;
|
87
|
+
}
|
88
|
+
if (!("label" in e)) {
|
89
|
+
return false;
|
90
|
+
}
|
91
|
+
return true;
|
92
|
+
};
|
82
93
|
|
83
94
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
84
95
|
var import_core = require("@mantine/core");
|
@@ -154,6 +165,7 @@ var createRemoraidTheme = (customTheme, mantineTheme, colorScheme) => {
|
|
154
165
|
medium: defaultMediumIconProps,
|
155
166
|
tiny: { size: 14, stroke: 3 }
|
156
167
|
},
|
168
|
+
jsonStringifySpace: 2,
|
157
169
|
transparentBackground,
|
158
170
|
primaryColor,
|
159
171
|
spacingPx,
|
@@ -693,10 +705,28 @@ function AppShell({
|
|
693
705
|
var import_core6 = require("@mantine/core");
|
694
706
|
|
695
707
|
// src/core/components/Page/index.tsx
|
696
|
-
var import_core5 = require("@mantine/core");
|
697
708
|
var import_react5 = __toESM(require("react"));
|
698
709
|
var import_navigation2 = require("next/navigation");
|
710
|
+
|
711
|
+
// src/core/components/Page/PageContainer/index.tsx
|
712
|
+
var import_core5 = require("@mantine/core");
|
699
713
|
var jsx_dev_runtime8 = require("react/jsx-dev-runtime");
|
714
|
+
function PageContainer({
|
715
|
+
children,
|
716
|
+
pt,
|
717
|
+
componentsProps
|
718
|
+
}) {
|
719
|
+
const theme = useRemoraidTheme();
|
720
|
+
return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(import_core5.Container, {
|
721
|
+
size: theme.containerSize,
|
722
|
+
pt: pt ?? "md",
|
723
|
+
...componentsProps?.container,
|
724
|
+
children
|
725
|
+
}, undefined, false, undefined, this);
|
726
|
+
}
|
727
|
+
|
728
|
+
// src/core/components/Page/index.tsx
|
729
|
+
var jsx_dev_runtime9 = require("react/jsx-dev-runtime");
|
700
730
|
var pageContext = import_react5.default.createContext(null);
|
701
731
|
var usePage = () => {
|
702
732
|
return import_react5.useContext(pageContext);
|
@@ -710,7 +740,6 @@ function Page({
|
|
710
740
|
}) {
|
711
741
|
const pathname = import_navigation2.usePathname();
|
712
742
|
const { isPageRegistered, registerPage } = useWidgets();
|
713
|
-
const theme = useRemoraidTheme();
|
714
743
|
const pageId = config?.pageId ?? pathname;
|
715
744
|
import_react5.useEffect(() => {
|
716
745
|
if (!isPageRegistered(pageId)) {
|
@@ -719,12 +748,11 @@ function Page({
|
|
719
748
|
}
|
720
749
|
}
|
721
750
|
}, []);
|
722
|
-
return /* @__PURE__ */
|
751
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(pageContext.Provider, {
|
723
752
|
value: { name: name ?? pathname, pageId, ...config },
|
724
|
-
children: /* @__PURE__ */
|
725
|
-
|
726
|
-
|
727
|
-
...componentsProps?.container,
|
753
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(PageContainer, {
|
754
|
+
pt,
|
755
|
+
componentsProps: { container: componentsProps?.container },
|
728
756
|
children
|
729
757
|
}, undefined, false, undefined, this)
|
730
758
|
}, undefined, false, undefined, this);
|
@@ -732,7 +760,7 @@ function Page({
|
|
732
760
|
|
733
761
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
734
762
|
var import_icons_react4 = require("@tabler/icons-react");
|
735
|
-
var
|
763
|
+
var jsx_dev_runtime10 = require("react/jsx-dev-runtime");
|
736
764
|
function WidgetSelectionHeader({
|
737
765
|
title,
|
738
766
|
disabledWidgets,
|
@@ -745,39 +773,39 @@ function WidgetSelectionHeader({
|
|
745
773
|
console.error("'WidgetSelectionHeader' must be rendered inside of a 'Page' component.");
|
746
774
|
return null;
|
747
775
|
}
|
748
|
-
return /* @__PURE__ */
|
776
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_core6.Flex, {
|
749
777
|
justify: "flex-start",
|
750
778
|
align: "center",
|
751
779
|
gap: "xs",
|
752
780
|
mt,
|
753
781
|
children: [
|
754
|
-
/* @__PURE__ */
|
782
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_core6.Text, {
|
755
783
|
size: "lg",
|
756
784
|
fw: 400,
|
757
785
|
children: title ?? page.name
|
758
786
|
}, undefined, false, undefined, this),
|
759
|
-
/* @__PURE__ */
|
787
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_core6.Divider, {
|
760
788
|
orientation: "vertical"
|
761
789
|
}, undefined, false, undefined, this),
|
762
|
-
isPageRegistered(page.pageId) && /* @__PURE__ */
|
790
|
+
isPageRegistered(page.pageId) && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_core6.ScrollArea, {
|
763
791
|
flex: 1,
|
764
792
|
...theme.scrollAreaProps,
|
765
|
-
children: /* @__PURE__ */
|
793
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_core6.Chip.Group, {
|
766
794
|
multiple: true,
|
767
795
|
value: Object.keys(widgets[page.pageId]).filter((widgetId) => widgets[page.pageId][widgetId].selected),
|
768
796
|
onChange: (value) => {
|
769
797
|
updateWidgetSelectionBulk(page.pageId, value);
|
770
798
|
},
|
771
|
-
children: /* @__PURE__ */
|
799
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_core6.Flex, {
|
772
800
|
justify: "flex-start",
|
773
801
|
align: "center",
|
774
802
|
gap: "xs",
|
775
803
|
h: "auto",
|
776
|
-
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */
|
804
|
+
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_core6.Chip, {
|
777
805
|
value: widgetId,
|
778
806
|
size: "sm",
|
779
807
|
disabled: disabledWidgets && disabledWidgets.includes(widgetId),
|
780
|
-
icon: /* @__PURE__ */
|
808
|
+
icon: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_icons_react4.IconCheck, {
|
781
809
|
...theme.iconProps.tiny
|
782
810
|
}, undefined, false, undefined, this),
|
783
811
|
children: widgets[page.pageId][widgetId].name
|
@@ -788,20 +816,20 @@ function WidgetSelectionHeader({
|
|
788
816
|
]
|
789
817
|
}, undefined, true, undefined, this);
|
790
818
|
}
|
791
|
-
// src/core/components/CloseButton/index.tsx
|
819
|
+
// src/core/components/Widget/WidgetWrapper/CloseButton/index.tsx
|
792
820
|
var import_core7 = require("@mantine/core");
|
793
821
|
var import_icons_react5 = require("@tabler/icons-react");
|
794
|
-
var
|
822
|
+
var jsx_dev_runtime11 = require("react/jsx-dev-runtime");
|
795
823
|
function CloseButton({ widgetId }) {
|
796
824
|
const theme = useRemoraidTheme();
|
797
825
|
const { activeWidget, updateWidgetSelection } = useWidgets();
|
798
826
|
const page = usePage();
|
799
|
-
return /* @__PURE__ */
|
827
|
+
return /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(import_core7.Transition, {
|
800
828
|
mounted: activeWidget === widgetId,
|
801
829
|
transition: "pop-top-right",
|
802
830
|
duration: theme.transitionDurations.short,
|
803
831
|
timingFunction: "ease",
|
804
|
-
children: (transitionStyle) => /* @__PURE__ */
|
832
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(import_core7.ActionIcon, {
|
805
833
|
pos: "absolute",
|
806
834
|
size: "xs",
|
807
835
|
className: "remoraid-close-button",
|
@@ -814,7 +842,7 @@ function CloseButton({ widgetId }) {
|
|
814
842
|
updateWidgetSelection(page.pageId, widgetId, false);
|
815
843
|
},
|
816
844
|
style: transitionStyle,
|
817
|
-
children: /* @__PURE__ */
|
845
|
+
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(import_icons_react5.IconX, {
|
818
846
|
...theme.iconProps.tiny
|
819
847
|
}, undefined, false, undefined, this)
|
820
848
|
}, undefined, false, undefined, this)
|
@@ -826,7 +854,7 @@ var import_react6 = __toESM(require("react"));
|
|
826
854
|
|
827
855
|
// src/core/components/BadgeMinimal/index.tsx
|
828
856
|
var import_core8 = require("@mantine/core");
|
829
|
-
var
|
857
|
+
var jsx_dev_runtime12 = require("react/jsx-dev-runtime");
|
830
858
|
var isBadgeMinimalProps = (e) => {
|
831
859
|
if (typeof e !== "object") {
|
832
860
|
return false;
|
@@ -839,17 +867,17 @@ var isBadgeMinimalProps = (e) => {
|
|
839
867
|
function BadgeMinimal(props) {
|
840
868
|
const { label, tooltip, mounted, componentsProps } = props;
|
841
869
|
const theme = useRemoraidTheme();
|
842
|
-
return /* @__PURE__ */
|
870
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(import_core8.Transition, {
|
843
871
|
mounted: mounted !== false,
|
844
872
|
transition: "fade",
|
845
873
|
duration: theme.transitionDurations.short,
|
846
874
|
timingFunction: "ease",
|
847
875
|
...componentsProps?.transition,
|
848
|
-
children: (transitionStyle) => /* @__PURE__ */
|
876
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(import_core8.Tooltip, {
|
849
877
|
disabled: !tooltip,
|
850
878
|
label: tooltip,
|
851
879
|
...componentsProps?.tooltip,
|
852
|
-
children: /* @__PURE__ */
|
880
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(import_core8.Badge, {
|
853
881
|
variant: "default",
|
854
882
|
...componentsProps?.badge,
|
855
883
|
style: {
|
@@ -864,7 +892,7 @@ function BadgeMinimal(props) {
|
|
864
892
|
}
|
865
893
|
|
866
894
|
// src/core/components/BadgeGroup/index.tsx
|
867
|
-
var
|
895
|
+
var jsx_dev_runtime13 = require("react/jsx-dev-runtime");
|
868
896
|
var react = require("react");
|
869
897
|
function BadgeGroup({
|
870
898
|
badges,
|
@@ -874,9 +902,9 @@ function BadgeGroup({
|
|
874
902
|
}) {
|
875
903
|
const theme = useRemoraidTheme();
|
876
904
|
const numVisibleBadges = badges.filter((e) => isBadgeMinimalProps(e) ? e.mounted !== false : true).length;
|
877
|
-
return /* @__PURE__ */
|
905
|
+
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
|
878
906
|
children: [
|
879
|
-
/* @__PURE__ */
|
907
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(import_core9.Group, {
|
880
908
|
gap: gap ?? "xs",
|
881
909
|
wrap: "nowrap",
|
882
910
|
visibleFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
@@ -890,10 +918,10 @@ function BadgeGroup({
|
|
890
918
|
return e;
|
891
919
|
})
|
892
920
|
}, undefined, false, undefined, this),
|
893
|
-
/* @__PURE__ */
|
921
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(import_core9.Tooltip, {
|
894
922
|
label: `${numVisibleBadges} badge${numVisibleBadges === 1 ? "" : "s"}`,
|
895
923
|
...componentsProps?.tooltip,
|
896
|
-
children: /* @__PURE__ */
|
924
|
+
children: /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(import_core9.Badge, {
|
897
925
|
hiddenFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
898
926
|
hidden: numVisibleBadges === 0,
|
899
927
|
variant: "light",
|
@@ -908,7 +936,7 @@ function BadgeGroup({
|
|
908
936
|
}
|
909
937
|
// src/core/components/AlertMinimal/index.tsx
|
910
938
|
var import_core10 = require("@mantine/core");
|
911
|
-
var
|
939
|
+
var jsx_dev_runtime14 = require("react/jsx-dev-runtime");
|
912
940
|
var isAlertMinimalProps = (e) => {
|
913
941
|
if (typeof e !== "object") {
|
914
942
|
return false;
|
@@ -930,13 +958,13 @@ function AlertMinimal({
|
|
930
958
|
componentsProps
|
931
959
|
}) {
|
932
960
|
const theme = useRemoraidTheme();
|
933
|
-
return /* @__PURE__ */
|
961
|
+
return /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(import_core10.Transition, {
|
934
962
|
mounted: mounted !== false,
|
935
963
|
transition: "fade",
|
936
964
|
duration: theme.transitionDurations.short,
|
937
965
|
timingFunction: "ease",
|
938
966
|
...componentsProps?.transition,
|
939
|
-
children: (transitionStyle) => /* @__PURE__ */
|
967
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(import_core10.Alert, {
|
940
968
|
...theme.alertProps[category],
|
941
969
|
title: title ?? theme.alertProps[category].title,
|
942
970
|
withCloseButton: onClose !== undefined,
|
@@ -956,56 +984,103 @@ function AlertMinimal({
|
|
956
984
|
}, undefined, false, undefined, this);
|
957
985
|
}
|
958
986
|
// src/core/components/ResponsiveButton/index.tsx
|
987
|
+
var import_core12 = require("@mantine/core");
|
988
|
+
|
989
|
+
// src/core/components/Button/index.tsx
|
959
990
|
var import_core11 = require("@mantine/core");
|
960
991
|
var import_icons_react6 = require("@tabler/icons-react");
|
961
|
-
var
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
}
|
971
|
-
function ResponsiveButton(props) {
|
972
|
-
const { onClick, label, loading, variant, componentsProps, breakpoint } = props;
|
992
|
+
var jsx_dev_runtime15 = require("react/jsx-dev-runtime");
|
993
|
+
function Button({
|
994
|
+
label,
|
995
|
+
collapsed,
|
996
|
+
componentsProps,
|
997
|
+
onClick,
|
998
|
+
loading,
|
999
|
+
variant,
|
1000
|
+
...props
|
1001
|
+
}) {
|
973
1002
|
const theme = useRemoraidTheme();
|
974
|
-
const
|
975
|
-
|
976
|
-
|
977
|
-
|
1003
|
+
const iconProps = { ...theme.iconProps.medium, ...componentsProps?.icon };
|
1004
|
+
const icon = props.icon ? /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(props.icon, {
|
1005
|
+
...iconProps
|
1006
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_icons_react6.IconClick, {
|
1007
|
+
...iconProps
|
1008
|
+
}, undefined, false, undefined, this);
|
1009
|
+
if (collapsed === true) {
|
1010
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core11.Tooltip, {
|
1011
|
+
label,
|
1012
|
+
...componentsProps?.tooltip,
|
1013
|
+
children: /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core11.ActionIcon, {
|
1014
|
+
variant: variant ?? "default",
|
1015
|
+
onClick,
|
1016
|
+
loading,
|
1017
|
+
size: "input-sm",
|
1018
|
+
"aria-label": "Refresh",
|
1019
|
+
...componentsProps?.actionIcon,
|
1020
|
+
children: icon
|
1021
|
+
}, undefined, false, undefined, this)
|
1022
|
+
}, undefined, false, undefined, this);
|
1023
|
+
}
|
1024
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core11.Button, {
|
1025
|
+
onClick,
|
1026
|
+
loading,
|
1027
|
+
variant: variant ?? "default",
|
1028
|
+
leftSection: props.icon ? icon : undefined,
|
1029
|
+
...componentsProps?.button,
|
1030
|
+
children: label
|
978
1031
|
}, undefined, false, undefined, this);
|
979
|
-
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
// src/core/components/ResponsiveButton/index.tsx
|
1035
|
+
var jsx_dev_runtime16 = require("react/jsx-dev-runtime");
|
1036
|
+
function ResponsiveButton({
|
1037
|
+
breakpoint,
|
1038
|
+
componentsProps,
|
1039
|
+
...remoraidButtonProps
|
1040
|
+
}) {
|
1041
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(jsx_dev_runtime16.Fragment, {
|
980
1042
|
children: [
|
981
|
-
/* @__PURE__ */
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
1043
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(import_core12.Box, {
|
1044
|
+
hiddenFrom: breakpoint ?? "md",
|
1045
|
+
children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Button, {
|
1046
|
+
...remoraidButtonProps,
|
1047
|
+
...componentsProps?.Button,
|
1048
|
+
componentsProps: {
|
1049
|
+
tooltip: componentsProps?.tooltip,
|
1050
|
+
icon: componentsProps?.icon,
|
1051
|
+
...componentsProps?.Button?.componentsProps,
|
1052
|
+
actionIcon: {
|
1053
|
+
...componentsProps?.button,
|
1054
|
+
...componentsProps?.Button?.componentsProps?.actionIcon
|
1055
|
+
}
|
1056
|
+
},
|
1057
|
+
collapsed: true
|
992
1058
|
}, undefined, false, undefined, this)
|
993
1059
|
}, undefined, false, undefined, this),
|
994
|
-
/* @__PURE__ */
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1060
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(import_core12.Box, {
|
1061
|
+
visibleFrom: breakpoint ?? "md",
|
1062
|
+
children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Button, {
|
1063
|
+
...remoraidButtonProps,
|
1064
|
+
...componentsProps?.Button,
|
1065
|
+
componentsProps: {
|
1066
|
+
tooltip: componentsProps?.tooltip,
|
1067
|
+
icon: componentsProps?.icon,
|
1068
|
+
...componentsProps?.Button?.componentsProps,
|
1069
|
+
button: {
|
1070
|
+
...componentsProps?.button,
|
1071
|
+
...componentsProps?.Button?.componentsProps?.button
|
1072
|
+
}
|
1073
|
+
},
|
1074
|
+
collapsed: false
|
1075
|
+
}, undefined, false, undefined, this)
|
1001
1076
|
}, undefined, false, undefined, this)
|
1002
1077
|
]
|
1003
1078
|
}, undefined, true, undefined, this);
|
1004
1079
|
}
|
1005
1080
|
// src/core/components/Widget/WidgetWrapper/index.tsx
|
1006
|
-
var
|
1081
|
+
var import_core13 = require("@mantine/core");
|
1007
1082
|
var import_react7 = require("react");
|
1008
|
-
var
|
1083
|
+
var jsx_dev_runtime17 = require("react/jsx-dev-runtime");
|
1009
1084
|
function WidgetWrapper({
|
1010
1085
|
children,
|
1011
1086
|
config,
|
@@ -1031,12 +1106,12 @@ function WidgetWrapper({
|
|
1031
1106
|
registerWidget(page.pageId, config);
|
1032
1107
|
}
|
1033
1108
|
}, [pageRegistered]);
|
1034
|
-
return /* @__PURE__ */
|
1109
|
+
return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Transition, {
|
1035
1110
|
mounted: page !== null && isWidgetSelected(page.pageId, config.widgetId),
|
1036
1111
|
transition: "fade-left",
|
1037
1112
|
duration: theme.transitionDurations.medium,
|
1038
1113
|
timingFunction: "ease",
|
1039
|
-
children: (transitionStyle) => /* @__PURE__ */
|
1114
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Paper, {
|
1040
1115
|
p: "md",
|
1041
1116
|
shadow: "md",
|
1042
1117
|
bg: theme.transparentBackground,
|
@@ -1052,7 +1127,7 @@ function WidgetWrapper({
|
|
1052
1127
|
updateActiveWidget(null);
|
1053
1128
|
},
|
1054
1129
|
children: [
|
1055
|
-
withCloseButton !== false && /* @__PURE__ */
|
1130
|
+
withCloseButton !== false && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(CloseButton, {
|
1056
1131
|
widgetId: config.widgetId
|
1057
1132
|
}, undefined, false, undefined, this),
|
1058
1133
|
children
|
@@ -1061,8 +1136,8 @@ function WidgetWrapper({
|
|
1061
1136
|
}, undefined, false, undefined, this);
|
1062
1137
|
}
|
1063
1138
|
// src/core/components/Widget/index.tsx
|
1064
|
-
var
|
1065
|
-
var
|
1139
|
+
var import_core14 = require("@mantine/core");
|
1140
|
+
var jsx_dev_runtime18 = require("react/jsx-dev-runtime");
|
1066
1141
|
var react2 = require("react");
|
1067
1142
|
function Widget({
|
1068
1143
|
children,
|
@@ -1080,7 +1155,7 @@ function Widget({
|
|
1080
1155
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
1081
1156
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
1082
1157
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
1083
|
-
return /* @__PURE__ */
|
1158
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(WidgetWrapper, {
|
1084
1159
|
config: {
|
1085
1160
|
widgetId: id,
|
1086
1161
|
name: title,
|
@@ -1093,32 +1168,32 @@ function Widget({
|
|
1093
1168
|
},
|
1094
1169
|
...componentsProps?.wrapper,
|
1095
1170
|
children: [
|
1096
|
-
/* @__PURE__ */
|
1171
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core14.Group, {
|
1097
1172
|
justify: "space-between",
|
1098
1173
|
wrap: "nowrap",
|
1099
1174
|
children: [
|
1100
|
-
/* @__PURE__ */
|
1175
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core14.Group, {
|
1101
1176
|
gap: badgesGap,
|
1102
1177
|
wrap: "nowrap",
|
1103
1178
|
children: [
|
1104
|
-
/* @__PURE__ */
|
1179
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core14.Title, {
|
1105
1180
|
order: 1,
|
1106
1181
|
size: "h3",
|
1107
1182
|
lineClamp: 1,
|
1108
1183
|
children: title
|
1109
1184
|
}, undefined, false, undefined, this),
|
1110
|
-
badges !== undefined && /* @__PURE__ */
|
1185
|
+
badges !== undefined && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(BadgeGroup, {
|
1111
1186
|
badges,
|
1112
1187
|
gap: badgesGap,
|
1113
1188
|
...componentsProps?.badgeGroup
|
1114
1189
|
}, undefined, false, undefined, this)
|
1115
1190
|
]
|
1116
1191
|
}, undefined, true, undefined, this),
|
1117
|
-
/* @__PURE__ */
|
1192
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core14.Group, {
|
1118
1193
|
gap: buttonsGap,
|
1119
1194
|
wrap: "nowrap",
|
1120
1195
|
children: buttons !== undefined && buttons.map((e, i) => {
|
1121
|
-
if (
|
1196
|
+
if (isRemoraidButtonProps(e)) {
|
1122
1197
|
return /* @__PURE__ */ react2.createElement(ResponsiveButton, {
|
1123
1198
|
...e,
|
1124
1199
|
key: i
|
@@ -1129,7 +1204,7 @@ function Widget({
|
|
1129
1204
|
}, undefined, false, undefined, this)
|
1130
1205
|
]
|
1131
1206
|
}, undefined, true, undefined, this),
|
1132
|
-
/* @__PURE__ */
|
1207
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core14.Divider, {
|
1133
1208
|
my: "md"
|
1134
1209
|
}, undefined, false, undefined, this),
|
1135
1210
|
alerts !== undefined && alerts.map((a, i) => {
|
@@ -1142,20 +1217,20 @@ function Widget({
|
|
1142
1217
|
}
|
1143
1218
|
return a;
|
1144
1219
|
}),
|
1145
|
-
loading ? /* @__PURE__ */
|
1146
|
-
children: /* @__PURE__ */
|
1220
|
+
loading ? /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core14.Center, {
|
1221
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core14.Loader, {
|
1147
1222
|
...componentsProps?.loader
|
1148
1223
|
}, undefined, false, undefined, this)
|
1149
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
1224
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(jsx_dev_runtime18.Fragment, {
|
1150
1225
|
children
|
1151
1226
|
}, undefined, false, undefined, this)
|
1152
1227
|
]
|
1153
1228
|
}, undefined, true, undefined, this);
|
1154
1229
|
}
|
1155
1230
|
// src/core/components/Page/NotFoundPage/index.tsx
|
1156
|
-
var
|
1231
|
+
var import_core15 = require("@mantine/core");
|
1157
1232
|
var import_navigation3 = require("next/navigation");
|
1158
|
-
var
|
1233
|
+
var jsx_dev_runtime19 = require("react/jsx-dev-runtime");
|
1159
1234
|
function NotFoundPage({
|
1160
1235
|
children,
|
1161
1236
|
message,
|
@@ -1163,11 +1238,11 @@ function NotFoundPage({
|
|
1163
1238
|
}) {
|
1164
1239
|
const pathname = import_navigation3.usePathname();
|
1165
1240
|
const theme = useRemoraidTheme();
|
1166
|
-
return /* @__PURE__ */
|
1241
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Page, {
|
1167
1242
|
name: "Not Found",
|
1168
1243
|
...componentsProps?.page,
|
1169
1244
|
children: [
|
1170
|
-
/* @__PURE__ */
|
1245
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core15.Alert, {
|
1171
1246
|
...theme.alertProps.negative,
|
1172
1247
|
title: "404 - Page Not Found",
|
1173
1248
|
children: message ?? `Could not find page ${pathname}.`
|
@@ -1177,30 +1252,38 @@ function NotFoundPage({
|
|
1177
1252
|
}, undefined, true, undefined, this);
|
1178
1253
|
}
|
1179
1254
|
// src/core/components/EnvironmentShell/index.tsx
|
1180
|
-
var
|
1181
|
-
var
|
1255
|
+
var import_core16 = require("@mantine/core");
|
1256
|
+
var jsx_dev_runtime20 = require("react/jsx-dev-runtime");
|
1182
1257
|
function EnvironmentShell({
|
1183
1258
|
children,
|
1184
|
-
|
1259
|
+
environment,
|
1185
1260
|
message,
|
1186
1261
|
m,
|
1187
|
-
mt
|
1262
|
+
mt,
|
1263
|
+
withContainer,
|
1264
|
+
componentsProps
|
1188
1265
|
}) {
|
1189
1266
|
const theme = useRemoraidTheme();
|
1190
|
-
const
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1267
|
+
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
1268
|
+
const alertTitle = `Please Specify Environment Variable${undefinedKeys.length > 1 ? "s" : ""}`;
|
1269
|
+
const alertMessage = `Components could not be rendered because the following environment variables are not specified: ${undefinedKeys.join(", ")}.`;
|
1270
|
+
const alert = /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(import_core16.Alert, {
|
1271
|
+
...theme.alertProps.neutral,
|
1272
|
+
title: alertTitle,
|
1273
|
+
m,
|
1274
|
+
mt,
|
1275
|
+
children: message ?? alertMessage
|
1276
|
+
}, undefined, false, undefined, this);
|
1277
|
+
if (undefinedKeys.length === 0) {
|
1278
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
|
1279
|
+
children
|
1201
1280
|
}, undefined, false, undefined, this);
|
1202
1281
|
}
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1282
|
+
if (withContainer) {
|
1283
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(PageContainer, {
|
1284
|
+
componentsProps: { container: componentsProps?.container },
|
1285
|
+
children: alert
|
1286
|
+
}, undefined, false, undefined, this);
|
1287
|
+
}
|
1288
|
+
return alert;
|
1206
1289
|
}
|