remoraid 2.43.2 → 2.45.0
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/adapters/next/index.cjs +84 -0
- package/dist/adapters/next/index.d.ts +27 -0
- package/dist/adapters/next/index.js +43 -0
- package/dist/adapters/react-router/index.cjs +47 -0
- package/dist/adapters/react-router/index.d.ts +7 -0
- package/dist/adapters/react-router/index.js +15 -0
- package/dist/core/index.cjs +302 -269
- package/dist/core/index.d.ts +87 -76
- package/dist/core/index.js +286 -250
- package/dist/jsonforms/index.cjs +269 -275
- package/dist/jsonforms/index.js +255 -258
- package/dist/server/index.d.ts +2 -2
- package/package.json +22 -2
package/dist/jsonforms/index.js
CHANGED
|
@@ -5510,13 +5510,6 @@ var getDefaultButtonIconSize = (buttonSize) => {
|
|
|
5510
5510
|
}
|
|
5511
5511
|
return "large" /* Large */;
|
|
5512
5512
|
};
|
|
5513
|
-
var isIcon = (value) => {
|
|
5514
|
-
if (typeof value !== "object" || value === null) {
|
|
5515
|
-
return false;
|
|
5516
|
-
}
|
|
5517
|
-
const candidate = value;
|
|
5518
|
-
return "render" in candidate && typeof candidate.render === "function";
|
|
5519
|
-
};
|
|
5520
5513
|
|
|
5521
5514
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
|
5522
5515
|
import { px, rgba, useMantineTheme } from "@mantine/core";
|
|
@@ -5656,7 +5649,12 @@ function UserExperienceProviderWrapper({
|
|
|
5656
5649
|
initialValue
|
|
5657
5650
|
}) {
|
|
5658
5651
|
const [cookies, setCookie] = useCookies();
|
|
5659
|
-
const initialUserExperience = import_lodash3.
|
|
5652
|
+
const initialUserExperience = import_lodash3.mergeWith({}, defaultUserExperience, initialValue, (_objValue, srcValue) => {
|
|
5653
|
+
if (Array.isArray(srcValue)) {
|
|
5654
|
+
return [...srcValue];
|
|
5655
|
+
}
|
|
5656
|
+
return;
|
|
5657
|
+
});
|
|
5660
5658
|
const [userExperience, setUserExperience] = useState3(initialUserExperience);
|
|
5661
5659
|
const [processedCookie, setProcessedCookie] = useState3(false);
|
|
5662
5660
|
const updateUserExperience = (p) => {
|
|
@@ -5708,16 +5706,31 @@ var useLayouts = () => {
|
|
|
5708
5706
|
return useContext5(layoutsContext);
|
|
5709
5707
|
};
|
|
5710
5708
|
|
|
5711
|
-
// src/core/components/RemoraidProvider/index.tsx
|
|
5709
|
+
// src/core/components/RemoraidProvider/RouterProvider/index.tsx
|
|
5710
|
+
import {
|
|
5711
|
+
createContext as createContext4,
|
|
5712
|
+
useContext as useContext6
|
|
5713
|
+
} from "react";
|
|
5712
5714
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
5715
|
+
var defaultRouter = {
|
|
5716
|
+
pathname: "/",
|
|
5717
|
+
push: () => {}
|
|
5718
|
+
};
|
|
5719
|
+
var routerContext = createContext4(defaultRouter);
|
|
5720
|
+
var useRemoraidRouter = () => {
|
|
5721
|
+
return useContext6(routerContext);
|
|
5722
|
+
};
|
|
5723
|
+
|
|
5724
|
+
// src/core/components/RemoraidProvider/index.tsx
|
|
5725
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
5713
5726
|
// src/core/components/AppShell/index.tsx
|
|
5714
5727
|
import { Box as Box5 } from "@mantine/core";
|
|
5715
5728
|
import { useEffect as useEffect4 } from "react";
|
|
5716
5729
|
|
|
5717
5730
|
// src/core/components/AppShell/AppProvider/index.tsx
|
|
5718
5731
|
var import_lodash4 = __toESM(require_lodash(), 1);
|
|
5719
|
-
import { createContext as
|
|
5720
|
-
import { jsx as
|
|
5732
|
+
import { createContext as createContext5, useContext as useContext7 } from "react";
|
|
5733
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
5721
5734
|
var defaultAppContext = {
|
|
5722
5735
|
name: "Hello, World!",
|
|
5723
5736
|
nav: [],
|
|
@@ -5725,16 +5738,16 @@ var defaultAppContext = {
|
|
|
5725
5738
|
footerVariant: "minimal" /* Minimal */,
|
|
5726
5739
|
navbarMobileVariant: null
|
|
5727
5740
|
};
|
|
5728
|
-
var appContext =
|
|
5741
|
+
var appContext = createContext5(defaultAppContext);
|
|
5729
5742
|
var useRemoraidApp = () => {
|
|
5730
|
-
return
|
|
5743
|
+
return useContext7(appContext);
|
|
5731
5744
|
};
|
|
5732
5745
|
function AppProvider({
|
|
5733
5746
|
appContext: appContextProp,
|
|
5734
5747
|
children
|
|
5735
5748
|
}) {
|
|
5736
5749
|
const { logo, ...appContextPropWithoutLogo } = appContextProp;
|
|
5737
|
-
return /* @__PURE__ */
|
|
5750
|
+
return /* @__PURE__ */ jsx9(appContext.Provider, {
|
|
5738
5751
|
value: { ...import_lodash4.merge(defaultAppContext, appContextPropWithoutLogo), logo },
|
|
5739
5752
|
children
|
|
5740
5753
|
});
|
|
@@ -5745,7 +5758,7 @@ var import_lodash13 = __toESM(require_lodash(), 1);
|
|
|
5745
5758
|
|
|
5746
5759
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
5747
5760
|
var import_lodash12 = __toESM(require_lodash(), 1);
|
|
5748
|
-
import { useContext as
|
|
5761
|
+
import { useContext as useContext10 } from "react";
|
|
5749
5762
|
|
|
5750
5763
|
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
5751
5764
|
import { Center } from "@mantine/core";
|
|
@@ -5778,7 +5791,7 @@ function clsx() {
|
|
|
5778
5791
|
var clsx_default = clsx;
|
|
5779
5792
|
|
|
5780
5793
|
// src/core/components/Page/PageContainer/index.tsx
|
|
5781
|
-
import { jsx as
|
|
5794
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
5782
5795
|
function PageContainer({
|
|
5783
5796
|
children,
|
|
5784
5797
|
p = 0,
|
|
@@ -5786,7 +5799,7 @@ function PageContainer({
|
|
|
5786
5799
|
componentsProps
|
|
5787
5800
|
}) {
|
|
5788
5801
|
const theme = useRemoraidTheme();
|
|
5789
|
-
return /* @__PURE__ */
|
|
5802
|
+
return /* @__PURE__ */ jsx10(Container, {
|
|
5790
5803
|
size: theme.containerSize,
|
|
5791
5804
|
p,
|
|
5792
5805
|
w: "100%",
|
|
@@ -5804,14 +5817,14 @@ import {
|
|
|
5804
5817
|
Stack
|
|
5805
5818
|
} from "@mantine/core";
|
|
5806
5819
|
import {
|
|
5807
|
-
createContext as
|
|
5820
|
+
createContext as createContext7,
|
|
5808
5821
|
useCallback,
|
|
5809
|
-
useContext as
|
|
5822
|
+
useContext as useContext9,
|
|
5810
5823
|
useMemo as useMemo3
|
|
5811
5824
|
} from "react";
|
|
5812
5825
|
|
|
5813
5826
|
// src/core/components/FrameLayout/Element/index.tsx
|
|
5814
|
-
import { createContext as
|
|
5827
|
+
import { createContext as createContext6, useContext as useContext8 } from "react";
|
|
5815
5828
|
import { Box, Portal } from "@mantine/core";
|
|
5816
5829
|
|
|
5817
5830
|
// src/core/lib/errors.ts
|
|
@@ -5824,10 +5837,10 @@ class InvalidComponentUsageError extends Error {
|
|
|
5824
5837
|
|
|
5825
5838
|
// src/core/components/FrameLayout/Element/index.tsx
|
|
5826
5839
|
var import_lodash5 = __toESM(require_lodash(), 1);
|
|
5827
|
-
import { jsx as
|
|
5828
|
-
var layoutElementContext =
|
|
5840
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
5841
|
+
var layoutElementContext = createContext6(null);
|
|
5829
5842
|
var useFrameLayoutElement = () => {
|
|
5830
|
-
return
|
|
5843
|
+
return useContext8(layoutElementContext);
|
|
5831
5844
|
};
|
|
5832
5845
|
function Element2({
|
|
5833
5846
|
section,
|
|
@@ -5857,17 +5870,17 @@ function Element2({
|
|
|
5857
5870
|
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
|
5858
5871
|
containerProps.h = "100%";
|
|
5859
5872
|
}
|
|
5860
|
-
const element = includePageContainer ? /* @__PURE__ */
|
|
5873
|
+
const element = includePageContainer ? /* @__PURE__ */ jsx11(PageContainer, {
|
|
5861
5874
|
p: 0,
|
|
5862
5875
|
hidden,
|
|
5863
5876
|
...componentsProps?.PageContainer,
|
|
5864
5877
|
children
|
|
5865
5878
|
}) : children;
|
|
5866
|
-
return /* @__PURE__ */
|
|
5879
|
+
return /* @__PURE__ */ jsx11(Portal, {
|
|
5867
5880
|
target: layout.sections[section],
|
|
5868
|
-
children: /* @__PURE__ */
|
|
5881
|
+
children: /* @__PURE__ */ jsx11(layoutElementContext.Provider, {
|
|
5869
5882
|
value: { layoutType: "frame" /* Frame */, section },
|
|
5870
|
-
children: includeContainer ? /* @__PURE__ */
|
|
5883
|
+
children: includeContainer ? /* @__PURE__ */ jsx11(Box, {
|
|
5871
5884
|
"data-hidden": hidden,
|
|
5872
5885
|
...import_lodash5.merge(containerProps, componentsProps?.container),
|
|
5873
5886
|
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
@@ -5878,10 +5891,10 @@ function Element2({
|
|
|
5878
5891
|
}
|
|
5879
5892
|
|
|
5880
5893
|
// src/core/components/FrameLayout/index.tsx
|
|
5881
|
-
import { jsx as
|
|
5882
|
-
var layoutContext =
|
|
5894
|
+
import { jsx as jsx12, jsxs } from "react/jsx-runtime";
|
|
5895
|
+
var layoutContext = createContext7(null);
|
|
5883
5896
|
var useFrameLayout = () => {
|
|
5884
|
-
return
|
|
5897
|
+
return useContext9(layoutContext);
|
|
5885
5898
|
};
|
|
5886
5899
|
function FrameLayout({
|
|
5887
5900
|
layoutId,
|
|
@@ -5938,7 +5951,7 @@ function FrameLayout({
|
|
|
5938
5951
|
["content" /* Content */]: n
|
|
5939
5952
|
}));
|
|
5940
5953
|
}, [setSections]);
|
|
5941
|
-
const contentSection = /* @__PURE__ */
|
|
5954
|
+
const contentSection = /* @__PURE__ */ jsx12(Stack, {
|
|
5942
5955
|
ref: contentSectionRef,
|
|
5943
5956
|
h: "100%",
|
|
5944
5957
|
gap: gutter,
|
|
@@ -5953,7 +5966,7 @@ function FrameLayout({
|
|
|
5953
5966
|
...layout,
|
|
5954
5967
|
layoutId
|
|
5955
5968
|
}), [layout?.sections, defaultSections, layoutId]);
|
|
5956
|
-
return /* @__PURE__ */
|
|
5969
|
+
return /* @__PURE__ */ jsx12(layoutContext.Provider, {
|
|
5957
5970
|
value: layoutContextValue,
|
|
5958
5971
|
children: /* @__PURE__ */ jsxs(Group, {
|
|
5959
5972
|
gap: 0,
|
|
@@ -5966,7 +5979,7 @@ function FrameLayout({
|
|
|
5966
5979
|
},
|
|
5967
5980
|
className: clsx_default("remoraid-frame-layout", componentsProps?.horizontalContainer?.className),
|
|
5968
5981
|
children: [
|
|
5969
|
-
/* @__PURE__ */
|
|
5982
|
+
/* @__PURE__ */ jsx12(Group, {
|
|
5970
5983
|
ref: leftSectionRef,
|
|
5971
5984
|
h: "100%",
|
|
5972
5985
|
wrap: "nowrap",
|
|
@@ -5982,19 +5995,19 @@ function FrameLayout({
|
|
|
5982
5995
|
...componentsProps?.verticalContainer,
|
|
5983
5996
|
className: clsx_default("remoraid-frame-layout-vertical-container", componentsProps?.verticalContainer?.className),
|
|
5984
5997
|
children: [
|
|
5985
|
-
/* @__PURE__ */
|
|
5998
|
+
/* @__PURE__ */ jsx12(Stack, {
|
|
5986
5999
|
ref: topSectionRef,
|
|
5987
6000
|
gap: gutter,
|
|
5988
6001
|
flex: 0,
|
|
5989
6002
|
...componentsProps?.sectionContainers?.["top" /* Top */],
|
|
5990
6003
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-top-section", componentsProps?.sectionContainers?.["top" /* Top */]?.className)
|
|
5991
6004
|
}),
|
|
5992
|
-
includeScrollArea ? /* @__PURE__ */
|
|
6005
|
+
includeScrollArea ? /* @__PURE__ */ jsx12(ScrollArea, {
|
|
5993
6006
|
flex: 1,
|
|
5994
6007
|
...componentsProps?.ScrollArea,
|
|
5995
6008
|
children: contentSection
|
|
5996
6009
|
}) : contentSection,
|
|
5997
|
-
/* @__PURE__ */
|
|
6010
|
+
/* @__PURE__ */ jsx12(Stack, {
|
|
5998
6011
|
ref: bottomSectionRef,
|
|
5999
6012
|
gap: gutter,
|
|
6000
6013
|
flex: 0,
|
|
@@ -6003,7 +6016,7 @@ function FrameLayout({
|
|
|
6003
6016
|
})
|
|
6004
6017
|
]
|
|
6005
6018
|
}),
|
|
6006
|
-
/* @__PURE__ */
|
|
6019
|
+
/* @__PURE__ */ jsx12(Group, {
|
|
6007
6020
|
ref: rightSectionRef,
|
|
6008
6021
|
h: "100%",
|
|
6009
6022
|
gap: gutter,
|
|
@@ -6021,7 +6034,7 @@ var FrameLayout_default = Object.assign(FrameLayout, {
|
|
|
6021
6034
|
});
|
|
6022
6035
|
|
|
6023
6036
|
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
6024
|
-
import { jsx as
|
|
6037
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
6025
6038
|
function FooterMinimal({
|
|
6026
6039
|
icon: Icon2 = IconPennant,
|
|
6027
6040
|
componentsProps
|
|
@@ -6032,10 +6045,10 @@ function FooterMinimal({
|
|
|
6032
6045
|
footer: { position }
|
|
6033
6046
|
}
|
|
6034
6047
|
} = useAppShellUserExperience();
|
|
6035
|
-
const content = /* @__PURE__ */
|
|
6048
|
+
const content = /* @__PURE__ */ jsx13(PageContainer, {
|
|
6036
6049
|
...componentsProps?.container,
|
|
6037
|
-
children: /* @__PURE__ */
|
|
6038
|
-
children: /* @__PURE__ */
|
|
6050
|
+
children: /* @__PURE__ */ jsx13(Center, {
|
|
6051
|
+
children: /* @__PURE__ */ jsx13(Icon2, {
|
|
6039
6052
|
color: "var(--mantine-color-default-border)",
|
|
6040
6053
|
...theme.componentsProps.icons.huge,
|
|
6041
6054
|
...componentsProps?.icon
|
|
@@ -6043,7 +6056,7 @@ function FooterMinimal({
|
|
|
6043
6056
|
})
|
|
6044
6057
|
});
|
|
6045
6058
|
if (position === "bottom" /* Bottom */) {
|
|
6046
|
-
return /* @__PURE__ */
|
|
6059
|
+
return /* @__PURE__ */ jsx13(FrameLayout_default.Element, {
|
|
6047
6060
|
section: position,
|
|
6048
6061
|
includeContainer: true,
|
|
6049
6062
|
...componentsProps?.layoutElement,
|
|
@@ -6058,7 +6071,7 @@ function FooterMinimal({
|
|
|
6058
6071
|
}
|
|
6059
6072
|
|
|
6060
6073
|
// src/core/components/AppShell/Footer/index.tsx
|
|
6061
|
-
import { jsx as
|
|
6074
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
6062
6075
|
var supportedFooterPositions = {
|
|
6063
6076
|
["minimal" /* Minimal */]: [
|
|
6064
6077
|
null,
|
|
@@ -6072,7 +6085,7 @@ var defaultFooterPositions = {
|
|
|
6072
6085
|
function Footer({ componentsProps }) {
|
|
6073
6086
|
const { footerVariant } = useRemoraidApp();
|
|
6074
6087
|
if (footerVariant === "minimal" /* Minimal */) {
|
|
6075
|
-
return /* @__PURE__ */
|
|
6088
|
+
return /* @__PURE__ */ jsx14(FooterMinimal, {
|
|
6076
6089
|
...componentsProps?.FooterMinimal
|
|
6077
6090
|
});
|
|
6078
6091
|
}
|
|
@@ -6086,7 +6099,6 @@ var Footer_default = Object.assign(Footer, {
|
|
|
6086
6099
|
import { useState as useState7 } from "react";
|
|
6087
6100
|
|
|
6088
6101
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6089
|
-
import { isValidElement as isValidElement4 } from "react";
|
|
6090
6102
|
import {
|
|
6091
6103
|
Box as Box3,
|
|
6092
6104
|
Group as Group2,
|
|
@@ -6094,7 +6106,6 @@ import {
|
|
|
6094
6106
|
ScrollArea as ScrollArea2,
|
|
6095
6107
|
Stack as Stack2
|
|
6096
6108
|
} from "@mantine/core";
|
|
6097
|
-
import { usePathname as usePathname2, useRouter as useRouter2 } from "next/navigation";
|
|
6098
6109
|
var import_lodash8 = __toESM(require_lodash(), 1);
|
|
6099
6110
|
|
|
6100
6111
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
@@ -6104,9 +6115,8 @@ import {
|
|
|
6104
6115
|
Transition,
|
|
6105
6116
|
useMantineTheme as useMantineTheme2
|
|
6106
6117
|
} from "@mantine/core";
|
|
6107
|
-
import { usePathname, useRouter } from "next/navigation";
|
|
6108
6118
|
import { isValidElement as isValidElement2 } from "react";
|
|
6109
|
-
import { jsx as
|
|
6119
|
+
import { jsx as jsx15, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
6110
6120
|
function NavigationMenu({
|
|
6111
6121
|
target,
|
|
6112
6122
|
elements,
|
|
@@ -6115,13 +6125,13 @@ function NavigationMenu({
|
|
|
6115
6125
|
}) {
|
|
6116
6126
|
const theme = useRemoraidTheme();
|
|
6117
6127
|
const mantineTheme = useMantineTheme2();
|
|
6118
|
-
const
|
|
6119
|
-
const
|
|
6120
|
-
const item = (element) => /* @__PURE__ */
|
|
6128
|
+
const router = useRemoraidRouter();
|
|
6129
|
+
const { pathname } = router;
|
|
6130
|
+
const item = (element) => /* @__PURE__ */ jsx15(Transition, {
|
|
6121
6131
|
mounted: element.mounted ?? true,
|
|
6122
6132
|
...componentsProps?.transition,
|
|
6123
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6124
|
-
leftSection: element.icon ? /* @__PURE__ */
|
|
6133
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx15(Menu.Item, {
|
|
6134
|
+
leftSection: element.icon ? /* @__PURE__ */ jsx15(element.icon, {
|
|
6125
6135
|
...theme.componentsProps.icons.small
|
|
6126
6136
|
}) : undefined,
|
|
6127
6137
|
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
@@ -6145,17 +6155,17 @@ function NavigationMenu({
|
|
|
6145
6155
|
trigger: "click-hover",
|
|
6146
6156
|
...componentsProps?.Menu,
|
|
6147
6157
|
children: [
|
|
6148
|
-
/* @__PURE__ */
|
|
6149
|
-
children: /* @__PURE__ */
|
|
6158
|
+
/* @__PURE__ */ jsx15(Menu.Target, {
|
|
6159
|
+
children: /* @__PURE__ */ jsx15(Box2, {
|
|
6150
6160
|
children: targetElement
|
|
6151
6161
|
})
|
|
6152
6162
|
}),
|
|
6153
6163
|
/* @__PURE__ */ jsxs2(Menu.Dropdown, {
|
|
6154
6164
|
children: [
|
|
6155
|
-
label !== undefined && /* @__PURE__ */
|
|
6165
|
+
label !== undefined && /* @__PURE__ */ jsx15(Menu.Label, {
|
|
6156
6166
|
children: label
|
|
6157
6167
|
}),
|
|
6158
|
-
elements.map((element, i) => /* @__PURE__ */
|
|
6168
|
+
elements.map((element, i) => /* @__PURE__ */ jsx15(NavigationMenu, {
|
|
6159
6169
|
target: item(element),
|
|
6160
6170
|
elements: element.children,
|
|
6161
6171
|
componentsProps
|
|
@@ -6181,7 +6191,7 @@ import { IconClick } from "@tabler/icons-react";
|
|
|
6181
6191
|
import {
|
|
6182
6192
|
isValidElement as isValidElement3
|
|
6183
6193
|
} from "react";
|
|
6184
|
-
import { jsx as
|
|
6194
|
+
import { jsx as jsx16, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
6185
6195
|
var defaultRemoraidButtonSize = "sm";
|
|
6186
6196
|
function RemoraidButton({
|
|
6187
6197
|
label,
|
|
@@ -6205,7 +6215,7 @@ function RemoraidButton({
|
|
|
6205
6215
|
const collapsed = collapsedProp ?? false;
|
|
6206
6216
|
const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
|
|
6207
6217
|
const Icon3 = iconProp ?? IconClick;
|
|
6208
|
-
const iconElement = isValidElement3(Icon3) ? Icon3 : /* @__PURE__ */
|
|
6218
|
+
const iconElement = isValidElement3(Icon3) ? Icon3 : /* @__PURE__ */ jsx16(Icon3, {
|
|
6209
6219
|
...import_lodash7.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6210
6220
|
});
|
|
6211
6221
|
const clickTransformationClassNames = {
|
|
@@ -6218,7 +6228,7 @@ function RemoraidButton({
|
|
|
6218
6228
|
["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
|
|
6219
6229
|
};
|
|
6220
6230
|
const clickTransformationClass = clickTransformationClassNames[clickTransformation];
|
|
6221
|
-
return /* @__PURE__ */
|
|
6231
|
+
return /* @__PURE__ */ jsx16(Transition2, {
|
|
6222
6232
|
mounted,
|
|
6223
6233
|
transition: "fade",
|
|
6224
6234
|
duration: theme.transitionDurations.short,
|
|
@@ -6226,10 +6236,10 @@ function RemoraidButton({
|
|
|
6226
6236
|
...componentsProps?.transition,
|
|
6227
6237
|
children: (transitionStyle) => /* @__PURE__ */ jsxs3(Fragment, {
|
|
6228
6238
|
children: [
|
|
6229
|
-
/* @__PURE__ */
|
|
6239
|
+
/* @__PURE__ */ jsx16(Tooltip, {
|
|
6230
6240
|
label,
|
|
6231
6241
|
...componentsProps?.tooltip,
|
|
6232
|
-
children: /* @__PURE__ */
|
|
6242
|
+
children: /* @__PURE__ */ jsx16(ActionIcon, {
|
|
6233
6243
|
"aria-label": label,
|
|
6234
6244
|
variant,
|
|
6235
6245
|
onClick,
|
|
@@ -6245,7 +6255,7 @@ function RemoraidButton({
|
|
|
6245
6255
|
children: iconElement
|
|
6246
6256
|
})
|
|
6247
6257
|
}),
|
|
6248
|
-
/* @__PURE__ */
|
|
6258
|
+
/* @__PURE__ */ jsx16(Button, {
|
|
6249
6259
|
onClick,
|
|
6250
6260
|
loading,
|
|
6251
6261
|
variant,
|
|
@@ -6266,8 +6276,7 @@ function RemoraidButton({
|
|
|
6266
6276
|
}
|
|
6267
6277
|
|
|
6268
6278
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6269
|
-
import
|
|
6270
|
-
import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6279
|
+
import { jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6271
6280
|
function NavbarMinimalContent({
|
|
6272
6281
|
orientation,
|
|
6273
6282
|
maxElements,
|
|
@@ -6277,8 +6286,8 @@ function NavbarMinimalContent({
|
|
|
6277
6286
|
const theme = useRemoraidTheme();
|
|
6278
6287
|
const { userExperience: appShellUserExperience } = useAppShellUserExperience();
|
|
6279
6288
|
const app = useRemoraidApp();
|
|
6280
|
-
const router =
|
|
6281
|
-
const pathname =
|
|
6289
|
+
const router = useRemoraidRouter();
|
|
6290
|
+
const { pathname } = router;
|
|
6282
6291
|
const layoutElement = useFrameLayoutElement();
|
|
6283
6292
|
const { colorScheme, setColorScheme } = useHydratedMantineColorScheme();
|
|
6284
6293
|
const collapseStaticElementsBreakpoint = collapseStaticElementsBreakpointProp ?? theme.breakpoints.navbarStaticElementsCollapse;
|
|
@@ -6299,21 +6308,10 @@ function NavbarMinimalContent({
|
|
|
6299
6308
|
buttonCollapsed = false;
|
|
6300
6309
|
}
|
|
6301
6310
|
const buttonClickTransformation = orientation === "horizontal" /* Horizontal */ ? "tiltRight" /* TiltRight */ : "default" /* Default */;
|
|
6302
|
-
const
|
|
6303
|
-
const logoIconSize = getDefaultButtonIconSize(logoButtonSize);
|
|
6304
|
-
const logoButton = app.logo ? /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6311
|
+
const logoButton = app.logo ? /* @__PURE__ */ jsx17(RemoraidButton, {
|
|
6305
6312
|
label: app.name,
|
|
6306
6313
|
variant: "subtle",
|
|
6307
|
-
icon:
|
|
6308
|
-
src: app.logo,
|
|
6309
|
-
alt: "App logo",
|
|
6310
|
-
...componentsProps?.logo,
|
|
6311
|
-
style: {
|
|
6312
|
-
width: theme.componentsProps.icons[logoIconSize].size,
|
|
6313
|
-
height: theme.componentsProps.icons[logoIconSize].size,
|
|
6314
|
-
...componentsProps?.logo?.style
|
|
6315
|
-
}
|
|
6316
|
-
}),
|
|
6314
|
+
icon: app.logo,
|
|
6317
6315
|
responsive: buttonResponsive,
|
|
6318
6316
|
collapsed: buttonCollapsed,
|
|
6319
6317
|
clickTransformation: buttonClickTransformation,
|
|
@@ -6331,9 +6329,9 @@ function NavbarMinimalContent({
|
|
|
6331
6329
|
componentsProps?.logoButton?.onClick?.(e);
|
|
6332
6330
|
}
|
|
6333
6331
|
}) : undefined;
|
|
6334
|
-
const button = (element, key) => /* @__PURE__ */
|
|
6332
|
+
const button = (element, key) => /* @__PURE__ */ jsx17(NavigationMenu, {
|
|
6335
6333
|
label: element.label,
|
|
6336
|
-
target: /* @__PURE__ */
|
|
6334
|
+
target: /* @__PURE__ */ jsx17(RemoraidButton, {
|
|
6337
6335
|
mounted: element.mounted,
|
|
6338
6336
|
label: element.label,
|
|
6339
6337
|
icon: element.icon,
|
|
@@ -6376,11 +6374,11 @@ function NavbarMinimalContent({
|
|
|
6376
6374
|
const staticElements = elements.filter((element) => element.static);
|
|
6377
6375
|
const staticButtons = staticElements.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).map((element, i) => button(element, `static-nav-element-${i}`));
|
|
6378
6376
|
const collapseStaticElements = staticElements.filter((element) => element.mounted ?? true).length > 1;
|
|
6379
|
-
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */
|
|
6377
|
+
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx17(Box3, {
|
|
6380
6378
|
hiddenFrom: collapseStaticElementsBreakpoint,
|
|
6381
|
-
children: /* @__PURE__ */
|
|
6379
|
+
children: /* @__PURE__ */ jsx17(NavigationMenu, {
|
|
6382
6380
|
elements: staticElements,
|
|
6383
|
-
target: /* @__PURE__ */
|
|
6381
|
+
target: /* @__PURE__ */ jsx17(RemoraidButton, {
|
|
6384
6382
|
label: "Static elements",
|
|
6385
6383
|
icon: IconDots,
|
|
6386
6384
|
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
@@ -6401,7 +6399,7 @@ function NavbarMinimalContent({
|
|
|
6401
6399
|
}, componentsProps?.NavigationMenu?.componentsProps)
|
|
6402
6400
|
})
|
|
6403
6401
|
}) : null;
|
|
6404
|
-
return /* @__PURE__ */
|
|
6402
|
+
return /* @__PURE__ */ jsx17(Paper, {
|
|
6405
6403
|
bg: theme.transparentBackground,
|
|
6406
6404
|
h: "100%",
|
|
6407
6405
|
p: "md",
|
|
@@ -6411,13 +6409,13 @@ function NavbarMinimalContent({
|
|
|
6411
6409
|
h: "100%",
|
|
6412
6410
|
children: [
|
|
6413
6411
|
logoButton,
|
|
6414
|
-
/* @__PURE__ */
|
|
6412
|
+
/* @__PURE__ */ jsx17(ScrollArea2, {
|
|
6415
6413
|
flex: 1,
|
|
6416
|
-
children: /* @__PURE__ */
|
|
6414
|
+
children: /* @__PURE__ */ jsx17(Stack2, {
|
|
6417
6415
|
children: buttons
|
|
6418
6416
|
})
|
|
6419
6417
|
}),
|
|
6420
|
-
/* @__PURE__ */
|
|
6418
|
+
/* @__PURE__ */ jsx17(Stack2, {
|
|
6421
6419
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6422
6420
|
children: staticButtons
|
|
6423
6421
|
}),
|
|
@@ -6427,15 +6425,15 @@ function NavbarMinimalContent({
|
|
|
6427
6425
|
wrap: "nowrap",
|
|
6428
6426
|
children: [
|
|
6429
6427
|
logoButton,
|
|
6430
|
-
/* @__PURE__ */
|
|
6428
|
+
/* @__PURE__ */ jsx17(ScrollArea2, {
|
|
6431
6429
|
flex: 1,
|
|
6432
6430
|
style: { contain: "inline-size" },
|
|
6433
|
-
children: /* @__PURE__ */
|
|
6431
|
+
children: /* @__PURE__ */ jsx17(Group2, {
|
|
6434
6432
|
wrap: "nowrap",
|
|
6435
6433
|
children: buttons
|
|
6436
6434
|
})
|
|
6437
6435
|
}),
|
|
6438
|
-
/* @__PURE__ */
|
|
6436
|
+
/* @__PURE__ */ jsx17(Group2, {
|
|
6439
6437
|
wrap: "nowrap",
|
|
6440
6438
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6441
6439
|
children: staticButtons
|
|
@@ -6467,7 +6465,7 @@ import {
|
|
|
6467
6465
|
} from "@mantine/core";
|
|
6468
6466
|
import { IconClick as IconClick2 } from "@tabler/icons-react";
|
|
6469
6467
|
var import_lodash9 = __toESM(require_lodash(), 1);
|
|
6470
|
-
import { jsx as
|
|
6468
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
6471
6469
|
function ControlButton({
|
|
6472
6470
|
icon: Icon4 = IconClick2,
|
|
6473
6471
|
mounted = true,
|
|
@@ -6480,17 +6478,17 @@ function ControlButton({
|
|
|
6480
6478
|
componentsProps
|
|
6481
6479
|
}) {
|
|
6482
6480
|
const theme = useRemoraidTheme();
|
|
6483
|
-
return /* @__PURE__ */
|
|
6481
|
+
return /* @__PURE__ */ jsx18(Transition3, {
|
|
6484
6482
|
mounted,
|
|
6485
6483
|
transition: "fade",
|
|
6486
6484
|
duration: theme.transitionDurations.short,
|
|
6487
6485
|
timingFunction: "ease",
|
|
6488
6486
|
...componentsProps?.transition,
|
|
6489
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6487
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx18(Tooltip2, {
|
|
6490
6488
|
label: tooltip,
|
|
6491
6489
|
disabled: !Boolean(tooltip),
|
|
6492
6490
|
...componentsProps?.tooltip,
|
|
6493
|
-
children: /* @__PURE__ */
|
|
6491
|
+
children: /* @__PURE__ */ jsx18(ActionIcon2, {
|
|
6494
6492
|
"data-control-button": true,
|
|
6495
6493
|
size,
|
|
6496
6494
|
color,
|
|
@@ -6501,7 +6499,7 @@ function ControlButton({
|
|
|
6501
6499
|
order,
|
|
6502
6500
|
...import_lodash9.merge(transitionStyle, componentsProps?.button?.style)
|
|
6503
6501
|
},
|
|
6504
|
-
children: /* @__PURE__ */
|
|
6502
|
+
children: /* @__PURE__ */ jsx18(Icon4, {
|
|
6505
6503
|
...import_lodash9.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6506
6504
|
})
|
|
6507
6505
|
})
|
|
@@ -6518,7 +6516,7 @@ import {
|
|
|
6518
6516
|
} from "@mantine/core";
|
|
6519
6517
|
import { IconGripHorizontal } from "@tabler/icons-react";
|
|
6520
6518
|
var import_lodash10 = __toESM(require_lodash(), 1);
|
|
6521
|
-
import { jsx as
|
|
6519
|
+
import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
6522
6520
|
function Controls({
|
|
6523
6521
|
groupRef,
|
|
6524
6522
|
mounted = true,
|
|
@@ -6576,14 +6574,14 @@ function Controls({
|
|
|
6576
6574
|
const handlePointerUp = (e) => {
|
|
6577
6575
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
6578
6576
|
};
|
|
6579
|
-
return /* @__PURE__ */
|
|
6577
|
+
return /* @__PURE__ */ jsx19(Transition4, {
|
|
6580
6578
|
mounted,
|
|
6581
6579
|
keepMounted: true,
|
|
6582
6580
|
transition: "pop",
|
|
6583
6581
|
duration: theme.transitionDurations.short,
|
|
6584
6582
|
timingFunction: "ease",
|
|
6585
6583
|
...componentsProps?.transition,
|
|
6586
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6584
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx19(Paper2, {
|
|
6587
6585
|
ref: containerRef,
|
|
6588
6586
|
pos: "absolute",
|
|
6589
6587
|
p: gutter,
|
|
@@ -6606,7 +6604,7 @@ function Controls({
|
|
|
6606
6604
|
...componentsProps?.group,
|
|
6607
6605
|
className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
|
|
6608
6606
|
children: [
|
|
6609
|
-
/* @__PURE__ */
|
|
6607
|
+
/* @__PURE__ */ jsx19(IconGripHorizontal, {
|
|
6610
6608
|
...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
|
|
6611
6609
|
}),
|
|
6612
6610
|
children,
|
|
@@ -6614,7 +6612,7 @@ function Controls({
|
|
|
6614
6612
|
if (isValidElementOfType(ControlButton, button)) {
|
|
6615
6613
|
return button;
|
|
6616
6614
|
}
|
|
6617
|
-
return /* @__PURE__ */
|
|
6615
|
+
return /* @__PURE__ */ jsx19(ControlButton, {
|
|
6618
6616
|
...button
|
|
6619
6617
|
}, i);
|
|
6620
6618
|
})
|
|
@@ -6625,7 +6623,7 @@ function Controls({
|
|
|
6625
6623
|
}
|
|
6626
6624
|
|
|
6627
6625
|
// src/core/components/Pinnable/index.tsx
|
|
6628
|
-
import { jsx as
|
|
6626
|
+
import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
6629
6627
|
function Pinnable({
|
|
6630
6628
|
layoutType: layoutTypeProp,
|
|
6631
6629
|
section,
|
|
@@ -6645,7 +6643,7 @@ function Pinnable({
|
|
|
6645
6643
|
if (layout && layout.type !== layoutType) {
|
|
6646
6644
|
throw new TypeError(`Prop 'layoutId' in '${Pinnable.name}' refers to a layout of type ${layout.type}, expected ${layoutType}. Leave 'layoutId' undefined, if you want to use the layout in '${AppShell_default.name}' as reference layout.`);
|
|
6647
6645
|
}
|
|
6648
|
-
const controlButton = useMemo4(() => /* @__PURE__ */
|
|
6646
|
+
const controlButton = useMemo4(() => /* @__PURE__ */ jsx20(ControlButton, {
|
|
6649
6647
|
icon: pinned ? IconPinnedOff : IconPin,
|
|
6650
6648
|
tooltip: pinned ? "Unpin" : "Pin",
|
|
6651
6649
|
color: "green",
|
|
@@ -6664,11 +6662,11 @@ function Pinnable({
|
|
|
6664
6662
|
...componentsProps?.container,
|
|
6665
6663
|
className: clsx_default("remoraid-pinnable", componentsProps?.container?.className),
|
|
6666
6664
|
children: [
|
|
6667
|
-
controlsContainer === undefined ? /* @__PURE__ */
|
|
6665
|
+
controlsContainer === undefined ? /* @__PURE__ */ jsx20(Controls, {
|
|
6668
6666
|
dragContainerRef: containerRef,
|
|
6669
6667
|
...componentsProps?.controls,
|
|
6670
6668
|
children: controlButton
|
|
6671
|
-
}) : controlsContainer !== null && /* @__PURE__ */
|
|
6669
|
+
}) : controlsContainer !== null && /* @__PURE__ */ jsx20(Portal2, {
|
|
6672
6670
|
target: controlsContainer,
|
|
6673
6671
|
children: controlButton
|
|
6674
6672
|
}),
|
|
@@ -6682,7 +6680,7 @@ function Pinnable({
|
|
|
6682
6680
|
return null;
|
|
6683
6681
|
}
|
|
6684
6682
|
if (pinned && layoutType === "frame" /* Frame */) {
|
|
6685
|
-
return /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ jsx20(FrameLayout_default.Element, {
|
|
6686
6684
|
layoutId,
|
|
6687
6685
|
section,
|
|
6688
6686
|
hidden,
|
|
@@ -6694,7 +6692,7 @@ function Pinnable({
|
|
|
6694
6692
|
}
|
|
6695
6693
|
|
|
6696
6694
|
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6697
|
-
import { jsx as
|
|
6695
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
6698
6696
|
function NavbarMinimal({
|
|
6699
6697
|
pinnable = true,
|
|
6700
6698
|
componentsProps
|
|
@@ -6712,7 +6710,7 @@ function NavbarMinimal({
|
|
|
6712
6710
|
setHover(false);
|
|
6713
6711
|
};
|
|
6714
6712
|
if (position === "left" /* Left */ || position === "right" /* Right */) {
|
|
6715
|
-
return /* @__PURE__ */
|
|
6713
|
+
return /* @__PURE__ */ jsx21(FrameLayout_default.Element, {
|
|
6716
6714
|
section: position,
|
|
6717
6715
|
includeContainer: true,
|
|
6718
6716
|
...componentsProps?.layoutElement,
|
|
@@ -6723,19 +6721,19 @@ function NavbarMinimal({
|
|
|
6723
6721
|
}
|
|
6724
6722
|
}
|
|
6725
6723
|
}, componentsProps?.layoutElement?.componentsProps),
|
|
6726
|
-
children: /* @__PURE__ */
|
|
6724
|
+
children: /* @__PURE__ */ jsx21(NavbarMinimalContent, {
|
|
6727
6725
|
orientation: "vertical" /* Vertical */,
|
|
6728
6726
|
...componentsProps?.content
|
|
6729
6727
|
})
|
|
6730
6728
|
});
|
|
6731
6729
|
}
|
|
6732
6730
|
if (position === "top" /* Top */ || position === "bottom" /* Bottom */) {
|
|
6733
|
-
const content = /* @__PURE__ */
|
|
6731
|
+
const content = /* @__PURE__ */ jsx21(NavbarMinimalContent, {
|
|
6734
6732
|
orientation: "horizontal" /* Horizontal */,
|
|
6735
6733
|
...componentsProps?.content
|
|
6736
6734
|
});
|
|
6737
6735
|
if (pinnable) {
|
|
6738
|
-
return /* @__PURE__ */
|
|
6736
|
+
return /* @__PURE__ */ jsx21(PageContainer, {
|
|
6739
6737
|
...componentsProps?.container,
|
|
6740
6738
|
componentsProps: {
|
|
6741
6739
|
...componentsProps?.container?.componentsProps,
|
|
@@ -6744,7 +6742,7 @@ function NavbarMinimal({
|
|
|
6744
6742
|
className: clsx_default("hide-if-empty", componentsProps?.container?.componentsProps?.container?.className)
|
|
6745
6743
|
}
|
|
6746
6744
|
},
|
|
6747
|
-
children: /* @__PURE__ */
|
|
6745
|
+
children: /* @__PURE__ */ jsx21(Pinnable, {
|
|
6748
6746
|
section: position,
|
|
6749
6747
|
initialValue: true,
|
|
6750
6748
|
...componentsProps?.Pinnable,
|
|
@@ -6787,9 +6785,9 @@ function NavbarMinimal({
|
|
|
6787
6785
|
return content;
|
|
6788
6786
|
}
|
|
6789
6787
|
if (position === "content" /* Content */) {
|
|
6790
|
-
return /* @__PURE__ */
|
|
6788
|
+
return /* @__PURE__ */ jsx21(PageContainer, {
|
|
6791
6789
|
...componentsProps?.container,
|
|
6792
|
-
children: /* @__PURE__ */
|
|
6790
|
+
children: /* @__PURE__ */ jsx21(NavbarMinimalContent, {
|
|
6793
6791
|
orientation: "horizontal" /* Horizontal */,
|
|
6794
6792
|
...componentsProps?.content
|
|
6795
6793
|
})
|
|
@@ -6800,7 +6798,7 @@ function NavbarMinimal({
|
|
|
6800
6798
|
|
|
6801
6799
|
// src/core/components/AppShell/Navbar/index.tsx
|
|
6802
6800
|
import { IconLogin, IconLogout, IconMoon, IconSun } from "@tabler/icons-react";
|
|
6803
|
-
import { jsx as
|
|
6801
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
6804
6802
|
var supportedNavbarPositions = {
|
|
6805
6803
|
["minimal" /* Minimal */]: [
|
|
6806
6804
|
null,
|
|
@@ -6848,21 +6846,21 @@ var getDefaultNavigationElements = ({
|
|
|
6848
6846
|
}
|
|
6849
6847
|
}
|
|
6850
6848
|
];
|
|
6851
|
-
function
|
|
6849
|
+
function Navbar({ componentsProps }) {
|
|
6852
6850
|
const { navbarVariant } = useRemoraidApp();
|
|
6853
6851
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
6854
|
-
return /* @__PURE__ */
|
|
6852
|
+
return /* @__PURE__ */ jsx22(NavbarMinimal, {
|
|
6855
6853
|
...componentsProps?.NavbarMinimal
|
|
6856
6854
|
});
|
|
6857
6855
|
}
|
|
6858
6856
|
return null;
|
|
6859
6857
|
}
|
|
6860
|
-
var Navbar_default = Object.assign(
|
|
6858
|
+
var Navbar_default = Object.assign(Navbar, {
|
|
6861
6859
|
NavbarMinimal
|
|
6862
6860
|
});
|
|
6863
6861
|
|
|
6864
6862
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
6865
|
-
import { jsx as
|
|
6863
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
6866
6864
|
var defaultAppShellUserExperience = {
|
|
6867
6865
|
navbar: {
|
|
6868
6866
|
position: null,
|
|
@@ -6876,7 +6874,7 @@ var defaultAppShellUserExperience = {
|
|
|
6876
6874
|
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
6877
6875
|
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
6878
6876
|
var useAppShellUserExperience = () => {
|
|
6879
|
-
return
|
|
6877
|
+
return useContext10(appShellUserExperienceContext);
|
|
6880
6878
|
};
|
|
6881
6879
|
function AppShellUserExperienceProvider({
|
|
6882
6880
|
children,
|
|
@@ -6899,7 +6897,7 @@ function AppShellUserExperienceProvider({
|
|
|
6899
6897
|
}
|
|
6900
6898
|
return true;
|
|
6901
6899
|
};
|
|
6902
|
-
return /* @__PURE__ */
|
|
6900
|
+
return /* @__PURE__ */ jsx23(UserExperienceProviderWrapper, {
|
|
6903
6901
|
context: appShellUserExperienceContext,
|
|
6904
6902
|
isValidUserExperience,
|
|
6905
6903
|
cookieName: cookieName ?? defaultAppShellUserExperienceCookieName,
|
|
@@ -6917,7 +6915,7 @@ function AppShellUserExperienceProvider({
|
|
|
6917
6915
|
}
|
|
6918
6916
|
|
|
6919
6917
|
// src/core/components/AppShell/index.tsx
|
|
6920
|
-
import { jsx as
|
|
6918
|
+
import { jsx as jsx24, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
6921
6919
|
var remoraidAppShellLayoutId = "remoraid-app-shell";
|
|
6922
6920
|
function AppShell({
|
|
6923
6921
|
gutter,
|
|
@@ -6941,13 +6939,13 @@ function AppShell({
|
|
|
6941
6939
|
}
|
|
6942
6940
|
meta.content = computedBodyColor;
|
|
6943
6941
|
}, [colorScheme]);
|
|
6944
|
-
return /* @__PURE__ */
|
|
6942
|
+
return /* @__PURE__ */ jsx24(AppProvider, {
|
|
6945
6943
|
appContext: appContext2,
|
|
6946
6944
|
...componentsProps?.AppProvider,
|
|
6947
|
-
children: /* @__PURE__ */
|
|
6945
|
+
children: /* @__PURE__ */ jsx24(AppShellUserExperienceProvider, {
|
|
6948
6946
|
...componentsProps?.AppShellUserExperienceProvider,
|
|
6949
6947
|
initialValue: import_lodash13.merge(initialUserExperience, componentsProps?.AppShellUserExperienceProvider?.initialValue),
|
|
6950
|
-
children: /* @__PURE__ */
|
|
6948
|
+
children: /* @__PURE__ */ jsx24(Box5, {
|
|
6951
6949
|
h: "100dvh",
|
|
6952
6950
|
...componentsProps?.container,
|
|
6953
6951
|
children: /* @__PURE__ */ jsxs7(FrameLayout_default, {
|
|
@@ -6955,11 +6953,11 @@ function AppShell({
|
|
|
6955
6953
|
gutter: gutter ?? theme.primaryGutter,
|
|
6956
6954
|
...componentsProps?.layout,
|
|
6957
6955
|
children: [
|
|
6958
|
-
/* @__PURE__ */
|
|
6956
|
+
/* @__PURE__ */ jsx24(Navbar_default, {
|
|
6959
6957
|
...componentsProps?.navbar
|
|
6960
6958
|
}),
|
|
6961
6959
|
children,
|
|
6962
|
-
/* @__PURE__ */
|
|
6960
|
+
/* @__PURE__ */ jsx24(Footer_default, {
|
|
6963
6961
|
...componentsProps?.footer
|
|
6964
6962
|
})
|
|
6965
6963
|
]
|
|
@@ -6985,15 +6983,14 @@ import {
|
|
|
6985
6983
|
|
|
6986
6984
|
// src/core/components/Page/index.tsx
|
|
6987
6985
|
import { Stack as Stack3 } from "@mantine/core";
|
|
6988
|
-
import
|
|
6989
|
-
useContext as
|
|
6986
|
+
import React8, {
|
|
6987
|
+
useContext as useContext11,
|
|
6990
6988
|
useEffect as useEffect5
|
|
6991
6989
|
} from "react";
|
|
6992
|
-
import {
|
|
6993
|
-
|
|
6994
|
-
var pageContext = React7.createContext(null);
|
|
6990
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
6991
|
+
var pageContext = React8.createContext(null);
|
|
6995
6992
|
var usePage = () => {
|
|
6996
|
-
return
|
|
6993
|
+
return useContext11(pageContext);
|
|
6997
6994
|
};
|
|
6998
6995
|
|
|
6999
6996
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
@@ -7006,11 +7003,11 @@ import {
|
|
|
7006
7003
|
Flex,
|
|
7007
7004
|
ScrollArea as ScrollArea3
|
|
7008
7005
|
} from "@mantine/core";
|
|
7009
|
-
import { jsx as
|
|
7006
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
7010
7007
|
|
|
7011
7008
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
7012
7009
|
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
7013
|
-
import { jsx as
|
|
7010
|
+
import { jsx as jsx27, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
7014
7011
|
// src/core/components/BadgeGroup/index.tsx
|
|
7015
7012
|
import {
|
|
7016
7013
|
Badge as Badge2,
|
|
@@ -7019,7 +7016,7 @@ import {
|
|
|
7019
7016
|
Stack as Stack4,
|
|
7020
7017
|
Transition as Transition6
|
|
7021
7018
|
} from "@mantine/core";
|
|
7022
|
-
import
|
|
7019
|
+
import React9 from "react";
|
|
7023
7020
|
|
|
7024
7021
|
// src/core/components/BadgeMinimal/index.tsx
|
|
7025
7022
|
import {
|
|
@@ -7027,7 +7024,7 @@ import {
|
|
|
7027
7024
|
Tooltip as Tooltip3,
|
|
7028
7025
|
Transition as Transition5
|
|
7029
7026
|
} from "@mantine/core";
|
|
7030
|
-
import { jsx as
|
|
7027
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
7031
7028
|
function BadgeMinimal({
|
|
7032
7029
|
label,
|
|
7033
7030
|
tooltip,
|
|
@@ -7035,17 +7032,17 @@ function BadgeMinimal({
|
|
|
7035
7032
|
componentsProps
|
|
7036
7033
|
}) {
|
|
7037
7034
|
const theme = useRemoraidTheme();
|
|
7038
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ jsx28(Transition5, {
|
|
7039
7036
|
mounted,
|
|
7040
7037
|
transition: "fade",
|
|
7041
7038
|
duration: theme.transitionDurations.short,
|
|
7042
7039
|
timingFunction: "ease",
|
|
7043
7040
|
...componentsProps?.transition,
|
|
7044
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7041
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx28(Tooltip3, {
|
|
7045
7042
|
label: tooltip,
|
|
7046
7043
|
disabled: !Boolean(tooltip),
|
|
7047
7044
|
...componentsProps?.tooltip,
|
|
7048
|
-
children: /* @__PURE__ */
|
|
7045
|
+
children: /* @__PURE__ */ jsx28(Badge, {
|
|
7049
7046
|
variant: "default",
|
|
7050
7047
|
...componentsProps?.badge,
|
|
7051
7048
|
style: {
|
|
@@ -7061,7 +7058,7 @@ function BadgeMinimal({
|
|
|
7061
7058
|
|
|
7062
7059
|
// src/core/components/BadgeGroup/index.tsx
|
|
7063
7060
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
7064
|
-
import { jsx as
|
|
7061
|
+
import { jsx as jsx29, jsxs as jsxs9, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
7065
7062
|
import { createElement } from "react";
|
|
7066
7063
|
function BadgeGroup({
|
|
7067
7064
|
badges: badgesProp,
|
|
@@ -7084,7 +7081,7 @@ function BadgeGroup({
|
|
|
7084
7081
|
});
|
|
7085
7082
|
return /* @__PURE__ */ jsxs9(Fragment2, {
|
|
7086
7083
|
children: [
|
|
7087
|
-
/* @__PURE__ */
|
|
7084
|
+
/* @__PURE__ */ jsx29(Group4, {
|
|
7088
7085
|
gap,
|
|
7089
7086
|
wrap: "nowrap",
|
|
7090
7087
|
visibleFrom: numVisibleBadges > 1 ? breakpoint : undefined,
|
|
@@ -7092,7 +7089,7 @@ function BadgeGroup({
|
|
|
7092
7089
|
className: clsx_default("hide-if-empty", componentsProps?.container?.className),
|
|
7093
7090
|
children: badgesElement
|
|
7094
7091
|
}),
|
|
7095
|
-
/* @__PURE__ */
|
|
7092
|
+
/* @__PURE__ */ jsx29(Transition6, {
|
|
7096
7093
|
mounted: numVisibleBadges > 1,
|
|
7097
7094
|
transition: "fade",
|
|
7098
7095
|
duration: theme.transitionDurations.short,
|
|
@@ -7101,7 +7098,7 @@ function BadgeGroup({
|
|
|
7101
7098
|
children: (transitionStyle) => /* @__PURE__ */ jsxs9(HoverCard, {
|
|
7102
7099
|
...componentsProps?.HoverCard,
|
|
7103
7100
|
children: [
|
|
7104
|
-
/* @__PURE__ */
|
|
7101
|
+
/* @__PURE__ */ jsx29(HoverCard.Target, {
|
|
7105
7102
|
children: /* @__PURE__ */ jsxs9(Badge2, {
|
|
7106
7103
|
hiddenFrom: breakpoint,
|
|
7107
7104
|
variant: "dot",
|
|
@@ -7116,9 +7113,9 @@ function BadgeGroup({
|
|
|
7116
7113
|
]
|
|
7117
7114
|
})
|
|
7118
7115
|
}),
|
|
7119
|
-
/* @__PURE__ */
|
|
7116
|
+
/* @__PURE__ */ jsx29(HoverCard.Dropdown, {
|
|
7120
7117
|
p: gap,
|
|
7121
|
-
children: /* @__PURE__ */
|
|
7118
|
+
children: /* @__PURE__ */ jsx29(Stack4, {
|
|
7122
7119
|
gap,
|
|
7123
7120
|
...componentsProps?.hoverContainer,
|
|
7124
7121
|
children: badgesElement
|
|
@@ -7133,7 +7130,7 @@ function BadgeGroup({
|
|
|
7133
7130
|
// src/core/components/AlertMinimal/index.tsx
|
|
7134
7131
|
import { Alert, Transition as Transition7 } from "@mantine/core";
|
|
7135
7132
|
var import_lodash16 = __toESM(require_lodash(), 1);
|
|
7136
|
-
import { jsx as
|
|
7133
|
+
import { jsx as jsx30, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
7137
7134
|
function AlertMinimal({
|
|
7138
7135
|
category,
|
|
7139
7136
|
children,
|
|
@@ -7150,7 +7147,7 @@ function AlertMinimal({
|
|
|
7150
7147
|
iconSize = "small" /* Small */,
|
|
7151
7148
|
componentsProps
|
|
7152
7149
|
} = import_lodash16.merge({}, theme.componentsProps.alerts[category], props);
|
|
7153
|
-
return /* @__PURE__ */
|
|
7150
|
+
return /* @__PURE__ */ jsx30(Transition7, {
|
|
7154
7151
|
mounted,
|
|
7155
7152
|
transition: "fade",
|
|
7156
7153
|
duration: theme.transitionDurations.short,
|
|
@@ -7162,9 +7159,10 @@ function AlertMinimal({
|
|
|
7162
7159
|
variant: "light",
|
|
7163
7160
|
onClose,
|
|
7164
7161
|
withCloseButton: onClose !== undefined,
|
|
7165
|
-
icon: Icon4 ? /* @__PURE__ */
|
|
7162
|
+
icon: Icon4 ? /* @__PURE__ */ jsx30(Icon4, {
|
|
7166
7163
|
...import_lodash16.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
7167
7164
|
}) : undefined,
|
|
7165
|
+
...componentsProps?.alert,
|
|
7168
7166
|
style: import_lodash16.merge(transitionStyle, componentsProps?.alert?.style),
|
|
7169
7167
|
children: [
|
|
7170
7168
|
text,
|
|
@@ -7183,7 +7181,7 @@ import {
|
|
|
7183
7181
|
} from "react";
|
|
7184
7182
|
import { IconX } from "@tabler/icons-react";
|
|
7185
7183
|
var import_lodash17 = __toESM(require_lodash(), 1);
|
|
7186
|
-
import { jsx as
|
|
7184
|
+
import { jsx as jsx31, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
7187
7185
|
function WidgetWrapper({
|
|
7188
7186
|
config,
|
|
7189
7187
|
mt = 0,
|
|
@@ -7222,7 +7220,7 @@ function WidgetWrapper({
|
|
|
7222
7220
|
updateActiveWidget(null);
|
|
7223
7221
|
};
|
|
7224
7222
|
const mounted = Boolean(widget?.selected);
|
|
7225
|
-
let element = /* @__PURE__ */
|
|
7223
|
+
let element = /* @__PURE__ */ jsx31(Transition8, {
|
|
7226
7224
|
mounted,
|
|
7227
7225
|
transition: "fade-left",
|
|
7228
7226
|
duration: theme.transitionDurations.medium,
|
|
@@ -7257,12 +7255,12 @@ function WidgetWrapper({
|
|
|
7257
7255
|
className: clsx_default("remoraid-segment", componentsProps?.container?.className),
|
|
7258
7256
|
id: config.widgetId,
|
|
7259
7257
|
children: [
|
|
7260
|
-
/* @__PURE__ */
|
|
7258
|
+
/* @__PURE__ */ jsx31(Controls, {
|
|
7261
7259
|
dragContainerRef: containerRef,
|
|
7262
7260
|
groupRef: controlsContainerRef,
|
|
7263
7261
|
mounted: activeWidget === config.widgetId,
|
|
7264
7262
|
...componentsProps?.controls,
|
|
7265
|
-
children: /* @__PURE__ */
|
|
7263
|
+
children: /* @__PURE__ */ jsx31(ControlButton, {
|
|
7266
7264
|
mounted: withCloseButton,
|
|
7267
7265
|
icon: IconX,
|
|
7268
7266
|
tooltip: "Hide widget",
|
|
@@ -7291,7 +7289,7 @@ function WidgetWrapper({
|
|
|
7291
7289
|
})
|
|
7292
7290
|
});
|
|
7293
7291
|
if (pinnableSection !== undefined) {
|
|
7294
|
-
element = /* @__PURE__ */
|
|
7292
|
+
element = /* @__PURE__ */ jsx31(Pinnable, {
|
|
7295
7293
|
section: pinnableSection,
|
|
7296
7294
|
controlsContainer,
|
|
7297
7295
|
hidden: Boolean(widget?.hidden),
|
|
@@ -7339,7 +7337,7 @@ import {
|
|
|
7339
7337
|
} from "@mantine/core";
|
|
7340
7338
|
import { Children } from "react";
|
|
7341
7339
|
var import_lodash18 = __toESM(require_lodash(), 1);
|
|
7342
|
-
import { jsx as
|
|
7340
|
+
import { jsx as jsx32, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
7343
7341
|
import { createElement as createElement2 } from "react";
|
|
7344
7342
|
function Widget({
|
|
7345
7343
|
id,
|
|
@@ -7362,7 +7360,7 @@ function Widget({
|
|
|
7362
7360
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
|
7363
7361
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
|
7364
7362
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
|
7365
|
-
return /* @__PURE__ */
|
|
7363
|
+
return /* @__PURE__ */ jsx32(WidgetWrapper, {
|
|
7366
7364
|
config: {
|
|
7367
7365
|
widgetId: id,
|
|
7368
7366
|
...config,
|
|
@@ -7390,23 +7388,23 @@ function Widget({
|
|
|
7390
7388
|
gap: badgesGap,
|
|
7391
7389
|
wrap: "nowrap",
|
|
7392
7390
|
children: [
|
|
7393
|
-
/* @__PURE__ */
|
|
7391
|
+
/* @__PURE__ */ jsx32(Title, {
|
|
7394
7392
|
order: 1,
|
|
7395
7393
|
size: "h2",
|
|
7396
7394
|
lineClamp: 1,
|
|
7397
7395
|
...componentsProps?.title,
|
|
7398
7396
|
children: title ?? id
|
|
7399
7397
|
}),
|
|
7400
|
-
badges !== undefined && /* @__PURE__ */
|
|
7398
|
+
badges !== undefined && /* @__PURE__ */ jsx32(BadgeGroup, {
|
|
7401
7399
|
badges,
|
|
7402
7400
|
gap: badgesGap,
|
|
7403
7401
|
...componentsProps?.badgeGroup
|
|
7404
7402
|
})
|
|
7405
7403
|
]
|
|
7406
7404
|
}),
|
|
7407
|
-
/* @__PURE__ */
|
|
7405
|
+
/* @__PURE__ */ jsx32(Transition9, {
|
|
7408
7406
|
mounted: Boolean(description),
|
|
7409
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7407
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx32(Text2, {
|
|
7410
7408
|
size: "sm",
|
|
7411
7409
|
c: "dimmed",
|
|
7412
7410
|
...componentsProps?.description,
|
|
@@ -7416,7 +7414,7 @@ function Widget({
|
|
|
7416
7414
|
})
|
|
7417
7415
|
]
|
|
7418
7416
|
}),
|
|
7419
|
-
/* @__PURE__ */
|
|
7417
|
+
/* @__PURE__ */ jsx32(Group5, {
|
|
7420
7418
|
gap: buttonsGap,
|
|
7421
7419
|
wrap: "nowrap",
|
|
7422
7420
|
children: buttons !== undefined && buttons.map((button, i) => {
|
|
@@ -7431,12 +7429,12 @@ function Widget({
|
|
|
7431
7429
|
})
|
|
7432
7430
|
]
|
|
7433
7431
|
}),
|
|
7434
|
-
/* @__PURE__ */
|
|
7435
|
-
children: /* @__PURE__ */
|
|
7432
|
+
/* @__PURE__ */ jsx32(Box7, {
|
|
7433
|
+
children: /* @__PURE__ */ jsx32(Divider2, {
|
|
7436
7434
|
...componentsProps?.divider
|
|
7437
7435
|
})
|
|
7438
7436
|
}),
|
|
7439
|
-
/* @__PURE__ */
|
|
7437
|
+
/* @__PURE__ */ jsx32(Stack5, {
|
|
7440
7438
|
align: "stretch",
|
|
7441
7439
|
gap: alertsGap,
|
|
7442
7440
|
...componentsProps?.alertsContainer,
|
|
@@ -7451,12 +7449,12 @@ function Widget({
|
|
|
7451
7449
|
});
|
|
7452
7450
|
})
|
|
7453
7451
|
}),
|
|
7454
|
-
(loading || Children.toArray(children).length > 0) && /* @__PURE__ */
|
|
7452
|
+
(loading || Children.toArray(children).length > 0) && /* @__PURE__ */ jsx32(ScrollArea4.Autosize, {
|
|
7455
7453
|
flex: 1,
|
|
7456
7454
|
...componentsProps?.childrenContainer,
|
|
7457
7455
|
className: clsx_default("remoraid-widget-children-container", componentsProps?.childrenContainer?.className),
|
|
7458
|
-
children: loading ? /* @__PURE__ */
|
|
7459
|
-
children: /* @__PURE__ */
|
|
7456
|
+
children: loading ? /* @__PURE__ */ jsx32(Center2, {
|
|
7457
|
+
children: /* @__PURE__ */ jsx32(Loader, {
|
|
7460
7458
|
...componentsProps?.loader
|
|
7461
7459
|
})
|
|
7462
7460
|
}) : children
|
|
@@ -7466,25 +7464,24 @@ function Widget({
|
|
|
7466
7464
|
});
|
|
7467
7465
|
}
|
|
7468
7466
|
// src/core/components/NotFoundPage/index.tsx
|
|
7469
|
-
import {
|
|
7470
|
-
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7467
|
+
import { jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7471
7468
|
// src/core/components/EnvironmentShell/index.tsx
|
|
7472
|
-
import { jsx as
|
|
7469
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
7473
7470
|
// src/core/components/SettingsWidget/index.tsx
|
|
7474
|
-
import { createContext as
|
|
7471
|
+
import { createContext as createContext8, useContext as useContext12 } from "react";
|
|
7475
7472
|
import { IconRestore } from "@tabler/icons-react";
|
|
7476
7473
|
|
|
7477
7474
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
|
7478
7475
|
import { IconDeviceFloppy } from "@tabler/icons-react";
|
|
7479
7476
|
import { Group as Group6 } from "@mantine/core";
|
|
7480
|
-
import { jsx as
|
|
7477
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
7481
7478
|
function SaveButton({
|
|
7482
7479
|
onSaveChanges,
|
|
7483
7480
|
insideContainer,
|
|
7484
7481
|
componentsProps
|
|
7485
7482
|
}) {
|
|
7486
7483
|
const settingsWidgetOptions = useSettingsWidgetContext();
|
|
7487
|
-
const button = /* @__PURE__ */
|
|
7484
|
+
const button = /* @__PURE__ */ jsx35(RemoraidButton, {
|
|
7488
7485
|
label: "Save Changes",
|
|
7489
7486
|
icon: IconDeviceFloppy,
|
|
7490
7487
|
onClick: onSaveChanges,
|
|
@@ -7499,7 +7496,7 @@ function SaveButton({
|
|
|
7499
7496
|
}
|
|
7500
7497
|
});
|
|
7501
7498
|
if (insideContainer !== false) {
|
|
7502
|
-
return /* @__PURE__ */
|
|
7499
|
+
return /* @__PURE__ */ jsx35(Group6, {
|
|
7503
7500
|
w: "100%",
|
|
7504
7501
|
justify: "flex-end",
|
|
7505
7502
|
mt: "md",
|
|
@@ -7511,11 +7508,11 @@ function SaveButton({
|
|
|
7511
7508
|
}
|
|
7512
7509
|
|
|
7513
7510
|
// src/core/components/SettingsWidget/index.tsx
|
|
7514
|
-
import { jsx as
|
|
7511
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
7515
7512
|
var defaultSettingsWidgetContext = {};
|
|
7516
|
-
var settingsWidgetContext =
|
|
7513
|
+
var settingsWidgetContext = createContext8(defaultSettingsWidgetContext);
|
|
7517
7514
|
var useSettingsWidgetContext = () => {
|
|
7518
|
-
return
|
|
7515
|
+
return useContext12(settingsWidgetContext);
|
|
7519
7516
|
};
|
|
7520
7517
|
function SettingsWidget({
|
|
7521
7518
|
children,
|
|
@@ -7524,9 +7521,9 @@ function SettingsWidget({
|
|
|
7524
7521
|
custom,
|
|
7525
7522
|
widgetProps
|
|
7526
7523
|
}) {
|
|
7527
|
-
return /* @__PURE__ */
|
|
7524
|
+
return /* @__PURE__ */ jsx36(settingsWidgetContext.Provider, {
|
|
7528
7525
|
value: { custom, unsavedChanges },
|
|
7529
|
-
children: /* @__PURE__ */
|
|
7526
|
+
children: /* @__PURE__ */ jsx36(Widget, {
|
|
7530
7527
|
title: "Settings",
|
|
7531
7528
|
id: "settings",
|
|
7532
7529
|
...widgetProps,
|
|
@@ -7561,12 +7558,12 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
|
|
|
7561
7558
|
SaveButton
|
|
7562
7559
|
});
|
|
7563
7560
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
|
7564
|
-
import { createContext as
|
|
7561
|
+
import { createContext as createContext9, useContext as useContext13 } from "react";
|
|
7565
7562
|
import { Table as Table2 } from "@mantine/core";
|
|
7566
7563
|
|
|
7567
7564
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
|
7568
7565
|
import { Table, Text as Text3 } from "@mantine/core";
|
|
7569
|
-
import { jsx as
|
|
7566
|
+
import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
7570
7567
|
function Row({
|
|
7571
7568
|
children,
|
|
7572
7569
|
label
|
|
@@ -7574,14 +7571,14 @@ function Row({
|
|
|
7574
7571
|
const options = useSettingsTableOptions();
|
|
7575
7572
|
return /* @__PURE__ */ jsxs14(Table.Tr, {
|
|
7576
7573
|
children: [
|
|
7577
|
-
/* @__PURE__ */
|
|
7574
|
+
/* @__PURE__ */ jsx37(Table.Th, {
|
|
7578
7575
|
w: options.leftColumnWidth,
|
|
7579
|
-
children: /* @__PURE__ */
|
|
7576
|
+
children: /* @__PURE__ */ jsx37(Text3, {
|
|
7580
7577
|
size: "sm",
|
|
7581
7578
|
children: label
|
|
7582
7579
|
})
|
|
7583
7580
|
}),
|
|
7584
|
-
/* @__PURE__ */
|
|
7581
|
+
/* @__PURE__ */ jsx37(Table.Td, {
|
|
7585
7582
|
py: "xs",
|
|
7586
7583
|
children
|
|
7587
7584
|
})
|
|
@@ -7590,13 +7587,13 @@ function Row({
|
|
|
7590
7587
|
}
|
|
7591
7588
|
|
|
7592
7589
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
|
7593
|
-
import { jsx as
|
|
7590
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
7594
7591
|
var defaultSettingsTableOptions = {
|
|
7595
7592
|
leftColumnWidth: "38.2%"
|
|
7596
7593
|
};
|
|
7597
|
-
var settingsTableOptionsContext =
|
|
7594
|
+
var settingsTableOptionsContext = createContext9(defaultSettingsTableOptions);
|
|
7598
7595
|
var useSettingsTableOptions = () => {
|
|
7599
|
-
return
|
|
7596
|
+
return useContext13(settingsTableOptionsContext);
|
|
7600
7597
|
};
|
|
7601
7598
|
function SettingsTable({
|
|
7602
7599
|
leftColumnWidth,
|
|
@@ -7604,16 +7601,16 @@ function SettingsTable({
|
|
|
7604
7601
|
}) {
|
|
7605
7602
|
const children = asChildrenOfType(Row, childrenProp, "Check children passed to 'SettingsTable' component.");
|
|
7606
7603
|
const theme = useRemoraidTheme();
|
|
7607
|
-
return /* @__PURE__ */
|
|
7604
|
+
return /* @__PURE__ */ jsx38(settingsTableOptionsContext.Provider, {
|
|
7608
7605
|
value: {
|
|
7609
7606
|
leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
|
|
7610
7607
|
},
|
|
7611
|
-
children: /* @__PURE__ */
|
|
7608
|
+
children: /* @__PURE__ */ jsx38(Table2, {
|
|
7612
7609
|
bg: theme.transparentBackground,
|
|
7613
7610
|
withTableBorder: true,
|
|
7614
7611
|
variant: "vertical",
|
|
7615
7612
|
layout: "fixed",
|
|
7616
|
-
children: /* @__PURE__ */
|
|
7613
|
+
children: /* @__PURE__ */ jsx38(Table2.Tbody, {
|
|
7617
7614
|
children
|
|
7618
7615
|
})
|
|
7619
7616
|
})
|
|
@@ -7625,14 +7622,14 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
7625
7622
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
7626
7623
|
var import_lodash19 = __toESM(require_lodash(), 1);
|
|
7627
7624
|
import { Select } from "@mantine/core";
|
|
7628
|
-
import { jsx as
|
|
7625
|
+
import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
7629
7626
|
// src/core/components/FooterSettingsWidget/index.tsx
|
|
7630
7627
|
var import_lodash20 = __toESM(require_lodash(), 1);
|
|
7631
7628
|
import { Select as Select2 } from "@mantine/core";
|
|
7632
|
-
import { jsx as
|
|
7629
|
+
import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
7633
7630
|
// src/core/components/ContextClusterProvider/index.tsx
|
|
7634
|
-
import
|
|
7635
|
-
import { jsx as
|
|
7631
|
+
import React10 from "react";
|
|
7632
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
7636
7633
|
// src/core/components/InputWrapperScrollArea/index.tsx
|
|
7637
7634
|
import {
|
|
7638
7635
|
Box as Box8,
|
|
@@ -7642,7 +7639,7 @@ import {
|
|
|
7642
7639
|
} from "@mantine/core";
|
|
7643
7640
|
import { useState as useState10 } from "react";
|
|
7644
7641
|
import { useRemoraidTheme as useRemoraidTheme2 } from "remoraid/core";
|
|
7645
|
-
import { jsx as
|
|
7642
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
7646
7643
|
function InputWrapperScrollArea({
|
|
7647
7644
|
children,
|
|
7648
7645
|
label,
|
|
@@ -7654,7 +7651,7 @@ function InputWrapperScrollArea({
|
|
|
7654
7651
|
}) {
|
|
7655
7652
|
const theme = useRemoraidTheme2();
|
|
7656
7653
|
const [isHovering, setIsHovering] = useState10(false);
|
|
7657
|
-
return /* @__PURE__ */
|
|
7654
|
+
return /* @__PURE__ */ jsx42(Input.Wrapper, {
|
|
7658
7655
|
label,
|
|
7659
7656
|
error,
|
|
7660
7657
|
onMouseEnter: () => setIsHovering(true),
|
|
@@ -7662,7 +7659,7 @@ function InputWrapperScrollArea({
|
|
|
7662
7659
|
description,
|
|
7663
7660
|
withAsterisk: required,
|
|
7664
7661
|
...componentsProps?.container,
|
|
7665
|
-
children: /* @__PURE__ */
|
|
7662
|
+
children: /* @__PURE__ */ jsx42(Paper4, {
|
|
7666
7663
|
shadow: "none",
|
|
7667
7664
|
p: 0,
|
|
7668
7665
|
mt: Boolean(description) ? 4 : 0,
|
|
@@ -7673,12 +7670,12 @@ function InputWrapperScrollArea({
|
|
|
7673
7670
|
transition: "border-color .1s",
|
|
7674
7671
|
borderColor: error ? "var(--mantine-color-error)" : isHovering ? "var(--mantine-primary-color-filled)" : undefined
|
|
7675
7672
|
},
|
|
7676
|
-
children: /* @__PURE__ */
|
|
7673
|
+
children: /* @__PURE__ */ jsx42(ScrollArea5, {
|
|
7677
7674
|
mah,
|
|
7678
7675
|
px: "md",
|
|
7679
7676
|
flex: 1,
|
|
7680
7677
|
...componentsProps?.ScrollArea,
|
|
7681
|
-
children: /* @__PURE__ */
|
|
7678
|
+
children: /* @__PURE__ */ jsx42(Box8, {
|
|
7682
7679
|
...componentsProps?.childrenContainer,
|
|
7683
7680
|
children
|
|
7684
7681
|
})
|
|
@@ -7692,20 +7689,20 @@ import { JsonInput } from "@mantine/core";
|
|
|
7692
7689
|
import { useState as useState12 } from "react";
|
|
7693
7690
|
|
|
7694
7691
|
// src/jsonforms/components/FormOptionsProvider/index.tsx
|
|
7695
|
-
import
|
|
7696
|
-
useContext as
|
|
7692
|
+
import React11, {
|
|
7693
|
+
useContext as useContext14,
|
|
7697
7694
|
useState as useState11
|
|
7698
7695
|
} from "react";
|
|
7699
|
-
import { jsx as
|
|
7696
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
7700
7697
|
var defaultFormOptions = {
|
|
7701
7698
|
withDescriptions: false,
|
|
7702
7699
|
gutter: "md"
|
|
7703
7700
|
};
|
|
7704
|
-
var formOptionsContext =
|
|
7701
|
+
var formOptionsContext = React11.createContext({
|
|
7705
7702
|
formOptions: defaultFormOptions,
|
|
7706
7703
|
updateFormOptions: () => {}
|
|
7707
7704
|
});
|
|
7708
|
-
var useFormOptions = () =>
|
|
7705
|
+
var useFormOptions = () => useContext14(formOptionsContext);
|
|
7709
7706
|
function FormOptionsProvider({
|
|
7710
7707
|
children,
|
|
7711
7708
|
initialValue
|
|
@@ -7717,14 +7714,14 @@ function FormOptionsProvider({
|
|
|
7717
7714
|
const updateFormOptions = (newFormOptions) => {
|
|
7718
7715
|
setFormOptions((prev) => ({ ...prev, ...newFormOptions }));
|
|
7719
7716
|
};
|
|
7720
|
-
return /* @__PURE__ */
|
|
7717
|
+
return /* @__PURE__ */ jsx43(formOptionsContext.Provider, {
|
|
7721
7718
|
value: { formOptions, updateFormOptions },
|
|
7722
7719
|
children
|
|
7723
7720
|
});
|
|
7724
7721
|
}
|
|
7725
7722
|
|
|
7726
7723
|
// src/jsonforms/renderers/AnyControl.tsx
|
|
7727
|
-
import { jsx as
|
|
7724
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
7728
7725
|
function PlainAnyControl({
|
|
7729
7726
|
data,
|
|
7730
7727
|
handleChange,
|
|
@@ -7741,13 +7738,13 @@ function PlainAnyControl({
|
|
|
7741
7738
|
const [error, setError] = useState12(false);
|
|
7742
7739
|
const label = labelProp !== "remoraid-array-item" ? labelProp : null;
|
|
7743
7740
|
const description = withDescriptions ? schema.description : undefined;
|
|
7744
|
-
return /* @__PURE__ */
|
|
7741
|
+
return /* @__PURE__ */ jsx44(InputWrapperScrollArea, {
|
|
7745
7742
|
label: label ?? undefined,
|
|
7746
7743
|
error: error ? "Invalid JSON" : undefined,
|
|
7747
7744
|
description,
|
|
7748
7745
|
required,
|
|
7749
7746
|
mah: 140,
|
|
7750
|
-
children: /* @__PURE__ */
|
|
7747
|
+
children: /* @__PURE__ */ jsx44(JsonInput, {
|
|
7751
7748
|
onChange: (newValue) => {
|
|
7752
7749
|
setInput(newValue);
|
|
7753
7750
|
try {
|
|
@@ -7782,7 +7779,7 @@ import {
|
|
|
7782
7779
|
} from "@jsonforms/core";
|
|
7783
7780
|
import { Input as Input2, Paper as Paper5, Select as Select3 } from "@mantine/core";
|
|
7784
7781
|
import { useMemo as useMemo5, useState as useState13 } from "react";
|
|
7785
|
-
import { jsx as
|
|
7782
|
+
import { jsx as jsx45, jsxs as jsxs17, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
7786
7783
|
function PlainAnyOfControl({
|
|
7787
7784
|
data,
|
|
7788
7785
|
schema,
|
|
@@ -7866,8 +7863,8 @@ function PlainAnyOfControl({
|
|
|
7866
7863
|
value: String(i),
|
|
7867
7864
|
label: o.label
|
|
7868
7865
|
}));
|
|
7869
|
-
return /* @__PURE__ */
|
|
7870
|
-
children: /* @__PURE__ */
|
|
7866
|
+
return /* @__PURE__ */ jsx45(Fragment3, {
|
|
7867
|
+
children: /* @__PURE__ */ jsx45(Input2.Wrapper, {
|
|
7871
7868
|
label,
|
|
7872
7869
|
description: formOptions.withDescriptions ? schema.description ?? null : null,
|
|
7873
7870
|
withAsterisk: required,
|
|
@@ -7878,7 +7875,7 @@ function PlainAnyOfControl({
|
|
|
7878
7875
|
p: formOptions.gutter,
|
|
7879
7876
|
mt: formOptions.withDescriptions && schema.description && schema.description.length > 0 ? 4 : 0,
|
|
7880
7877
|
children: [
|
|
7881
|
-
/* @__PURE__ */
|
|
7878
|
+
/* @__PURE__ */ jsx45(Select3, {
|
|
7882
7879
|
label: "Value type",
|
|
7883
7880
|
data: selectData,
|
|
7884
7881
|
value: selectedOption,
|
|
@@ -7899,7 +7896,7 @@ function PlainAnyOfControl({
|
|
|
7899
7896
|
variant: "default",
|
|
7900
7897
|
mb: selectedOption !== null && inferType(selectedSchema) !== "null" ? formOptions.gutter : undefined
|
|
7901
7898
|
}),
|
|
7902
|
-
selectedOption !== null && /* @__PURE__ */
|
|
7899
|
+
selectedOption !== null && /* @__PURE__ */ jsx45(JsonForms, {
|
|
7903
7900
|
schema: {
|
|
7904
7901
|
...selectedSchema,
|
|
7905
7902
|
$schema: undefined
|
|
@@ -7935,7 +7932,7 @@ import {
|
|
|
7935
7932
|
RemoraidButton as RemoraidButton2,
|
|
7936
7933
|
useRemoraidTheme as useRemoraidTheme3
|
|
7937
7934
|
} from "remoraid/core";
|
|
7938
|
-
import { jsx as
|
|
7935
|
+
import { jsx as jsx46, jsxs as jsxs18, Fragment as Fragment4 } from "react/jsx-runtime";
|
|
7939
7936
|
function PlainArrayControl(props) {
|
|
7940
7937
|
const theme = useRemoraidTheme3();
|
|
7941
7938
|
const { label, schema, data, handleChange, path, required } = props;
|
|
@@ -7954,18 +7951,18 @@ function PlainArrayControl(props) {
|
|
|
7954
7951
|
required: ["item"]
|
|
7955
7952
|
};
|
|
7956
7953
|
} else {
|
|
7957
|
-
return /* @__PURE__ */
|
|
7954
|
+
return /* @__PURE__ */ jsx46(AlertMinimal2, {
|
|
7958
7955
|
category: AlertCategory3.Negative,
|
|
7959
7956
|
title: "Renderer missing",
|
|
7960
7957
|
text: `Could not find applicable renderer for property '${label}'.`
|
|
7961
7958
|
});
|
|
7962
7959
|
}
|
|
7963
|
-
return /* @__PURE__ */
|
|
7964
|
-
children: /* @__PURE__ */
|
|
7960
|
+
return /* @__PURE__ */ jsx46(Fragment4, {
|
|
7961
|
+
children: /* @__PURE__ */ jsx46(Input3.Wrapper, {
|
|
7965
7962
|
label,
|
|
7966
7963
|
description: formOptions.withDescriptions ? schema.description : undefined,
|
|
7967
7964
|
withAsterisk: required,
|
|
7968
|
-
children: /* @__PURE__ */
|
|
7965
|
+
children: /* @__PURE__ */ jsx46(Paper6, {
|
|
7969
7966
|
withBorder: Array.isArray(data) && data.length > 0,
|
|
7970
7967
|
shadow: "0",
|
|
7971
7968
|
bg: "var(--remoraid-transparent-background)",
|
|
@@ -7984,9 +7981,9 @@ function PlainArrayControl(props) {
|
|
|
7984
7981
|
direction: "row",
|
|
7985
7982
|
wrap: "nowrap",
|
|
7986
7983
|
children: [
|
|
7987
|
-
/* @__PURE__ */
|
|
7984
|
+
/* @__PURE__ */ jsx46(Box9, {
|
|
7988
7985
|
flex: 1,
|
|
7989
|
-
children: /* @__PURE__ */
|
|
7986
|
+
children: /* @__PURE__ */ jsx46(JsonForms2, {
|
|
7990
7987
|
schema: schemaItems,
|
|
7991
7988
|
data: { item },
|
|
7992
7989
|
renderers: renderers ?? [],
|
|
@@ -8002,7 +7999,7 @@ function PlainArrayControl(props) {
|
|
|
8002
7999
|
validationMode: "NoValidation"
|
|
8003
8000
|
})
|
|
8004
8001
|
}),
|
|
8005
|
-
/* @__PURE__ */
|
|
8002
|
+
/* @__PURE__ */ jsx46(RemoraidButton2, {
|
|
8006
8003
|
responsive: false,
|
|
8007
8004
|
collapsed: true,
|
|
8008
8005
|
label: "Delete item",
|
|
@@ -8014,10 +8011,10 @@ function PlainArrayControl(props) {
|
|
|
8014
8011
|
})
|
|
8015
8012
|
]
|
|
8016
8013
|
}, i);
|
|
8017
|
-
}) : /* @__PURE__ */
|
|
8018
|
-
/* @__PURE__ */
|
|
8014
|
+
}) : /* @__PURE__ */ jsx46(Fragment4, {}),
|
|
8015
|
+
/* @__PURE__ */ jsx46(Button2, {
|
|
8019
8016
|
variant: "default",
|
|
8020
|
-
leftSection: /* @__PURE__ */
|
|
8017
|
+
leftSection: /* @__PURE__ */ jsx46(IconPlus, {
|
|
8021
8018
|
...theme.componentsProps.icons.medium
|
|
8022
8019
|
}),
|
|
8023
8020
|
onClick: () => {
|
|
@@ -8047,7 +8044,7 @@ var ArrayControl_default = ArrayControl;
|
|
|
8047
8044
|
// src/jsonforms/renderers/CheckboxControl.tsx
|
|
8048
8045
|
import { withJsonFormsControlProps as withJsonFormsControlProps4 } from "@jsonforms/react";
|
|
8049
8046
|
import { Checkbox } from "@mantine/core";
|
|
8050
|
-
import { jsx as
|
|
8047
|
+
import { jsx as jsx47, Fragment as Fragment5 } from "react/jsx-runtime";
|
|
8051
8048
|
function PlainCheckboxControl({
|
|
8052
8049
|
data,
|
|
8053
8050
|
handleChange,
|
|
@@ -8057,8 +8054,8 @@ function PlainCheckboxControl({
|
|
|
8057
8054
|
schema
|
|
8058
8055
|
}) {
|
|
8059
8056
|
const { formOptions } = useFormOptions();
|
|
8060
|
-
return /* @__PURE__ */
|
|
8061
|
-
children: /* @__PURE__ */
|
|
8057
|
+
return /* @__PURE__ */ jsx47(Fragment5, {
|
|
8058
|
+
children: /* @__PURE__ */ jsx47(Checkbox, {
|
|
8062
8059
|
label,
|
|
8063
8060
|
py: formOptions.gutter,
|
|
8064
8061
|
labelPosition: "left",
|
|
@@ -8077,7 +8074,7 @@ var CheckboxControl_default = CheckboxControl;
|
|
|
8077
8074
|
// src/jsonforms/renderers/NumberControl.tsx
|
|
8078
8075
|
import { withJsonFormsControlProps as withJsonFormsControlProps5 } from "@jsonforms/react";
|
|
8079
8076
|
import { NumberInput } from "@mantine/core";
|
|
8080
|
-
import { jsx as
|
|
8077
|
+
import { jsx as jsx48, Fragment as Fragment6 } from "react/jsx-runtime";
|
|
8081
8078
|
function PlainNumberControl({
|
|
8082
8079
|
data,
|
|
8083
8080
|
handleChange,
|
|
@@ -8089,8 +8086,8 @@ function PlainNumberControl({
|
|
|
8089
8086
|
const {
|
|
8090
8087
|
formOptions: { withDescriptions }
|
|
8091
8088
|
} = useFormOptions();
|
|
8092
|
-
return /* @__PURE__ */
|
|
8093
|
-
children: /* @__PURE__ */
|
|
8089
|
+
return /* @__PURE__ */ jsx48(Fragment6, {
|
|
8090
|
+
children: /* @__PURE__ */ jsx48(NumberInput, {
|
|
8094
8091
|
label,
|
|
8095
8092
|
variant: "default",
|
|
8096
8093
|
value: data ?? "",
|
|
@@ -8128,7 +8125,7 @@ import {
|
|
|
8128
8125
|
} from "@jsonforms/core";
|
|
8129
8126
|
import { useState as useState14 } from "react";
|
|
8130
8127
|
import { IconPlus as IconPlus2, IconTrash as IconTrash2 } from "@tabler/icons-react";
|
|
8131
|
-
import { jsx as
|
|
8128
|
+
import { jsx as jsx49, jsxs as jsxs19, Fragment as Fragment7 } from "react/jsx-runtime";
|
|
8132
8129
|
function PlainObjectControl({
|
|
8133
8130
|
label: labelProp,
|
|
8134
8131
|
schema,
|
|
@@ -8147,11 +8144,11 @@ function PlainObjectControl({
|
|
|
8147
8144
|
const declaredKeys = new Set(Object.keys(schema.properties ?? {}));
|
|
8148
8145
|
const objectData = data && typeof data === "object" && !Array.isArray(data) ? data : {};
|
|
8149
8146
|
const additionalEntries = Object.entries(objectData).filter(([key]) => !declaredKeys.has(key));
|
|
8150
|
-
return /* @__PURE__ */
|
|
8147
|
+
return /* @__PURE__ */ jsx49(Input4.Wrapper, {
|
|
8151
8148
|
label,
|
|
8152
8149
|
description,
|
|
8153
8150
|
withAsterisk: required,
|
|
8154
|
-
children: /* @__PURE__ */
|
|
8151
|
+
children: /* @__PURE__ */ jsx49(Paper7, {
|
|
8155
8152
|
withBorder: true,
|
|
8156
8153
|
bg: "var(--remoraid-transparent-background)",
|
|
8157
8154
|
shadow: "0",
|
|
@@ -8162,7 +8159,7 @@ function PlainObjectControl({
|
|
|
8162
8159
|
justify: "flex-start",
|
|
8163
8160
|
gap: formOptions.gutter,
|
|
8164
8161
|
children: [
|
|
8165
|
-
hasProperties && /* @__PURE__ */
|
|
8162
|
+
hasProperties && /* @__PURE__ */ jsx49(JsonForms3, {
|
|
8166
8163
|
schema: {
|
|
8167
8164
|
...schema,
|
|
8168
8165
|
$schema: undefined
|
|
@@ -8177,7 +8174,7 @@ function PlainObjectControl({
|
|
|
8177
8174
|
}),
|
|
8178
8175
|
hasAdditionalProperties && /* @__PURE__ */ jsxs19(Fragment7, {
|
|
8179
8176
|
children: [
|
|
8180
|
-
additionalEntries.length > 0 && /* @__PURE__ */
|
|
8177
|
+
additionalEntries.length > 0 && /* @__PURE__ */ jsx49(Stack7, {
|
|
8181
8178
|
align: "stretch",
|
|
8182
8179
|
justify: "flex-start",
|
|
8183
8180
|
gap: formOptions.gutter,
|
|
@@ -8188,9 +8185,9 @@ function PlainObjectControl({
|
|
|
8188
8185
|
direction: "row",
|
|
8189
8186
|
wrap: "nowrap",
|
|
8190
8187
|
children: [
|
|
8191
|
-
/* @__PURE__ */
|
|
8188
|
+
/* @__PURE__ */ jsx49(Box10, {
|
|
8192
8189
|
flex: 1,
|
|
8193
|
-
children: /* @__PURE__ */
|
|
8190
|
+
children: /* @__PURE__ */ jsx49(JsonForms3, {
|
|
8194
8191
|
schema: {
|
|
8195
8192
|
...schema.additionalProperties === true ? {} : schema.additionalProperties,
|
|
8196
8193
|
title: key,
|
|
@@ -8209,7 +8206,7 @@ function PlainObjectControl({
|
|
|
8209
8206
|
}
|
|
8210
8207
|
})
|
|
8211
8208
|
}),
|
|
8212
|
-
/* @__PURE__ */
|
|
8209
|
+
/* @__PURE__ */ jsx49(RemoraidButton, {
|
|
8213
8210
|
responsive: false,
|
|
8214
8211
|
collapsed: true,
|
|
8215
8212
|
label: `Delete ${key}`,
|
|
@@ -8232,7 +8229,7 @@ function PlainObjectControl({
|
|
|
8232
8229
|
wrap: "nowrap",
|
|
8233
8230
|
align: "flex-end",
|
|
8234
8231
|
children: [
|
|
8235
|
-
/* @__PURE__ */
|
|
8232
|
+
/* @__PURE__ */ jsx49(TextInput, {
|
|
8236
8233
|
label: "New key",
|
|
8237
8234
|
variant: "default",
|
|
8238
8235
|
value: newKey,
|
|
@@ -8243,7 +8240,7 @@ function PlainObjectControl({
|
|
|
8243
8240
|
description: formOptions.withDescriptions ? "Key for new additional property value" : null,
|
|
8244
8241
|
flex: 1
|
|
8245
8242
|
}),
|
|
8246
|
-
/* @__PURE__ */
|
|
8243
|
+
/* @__PURE__ */ jsx49(RemoraidButton, {
|
|
8247
8244
|
responsive: false,
|
|
8248
8245
|
collapsed: true,
|
|
8249
8246
|
label: "Add key",
|
|
@@ -8283,7 +8280,7 @@ var ObjectControl_default = ObjectControl;
|
|
|
8283
8280
|
// src/jsonforms/renderers/StringSelectControl.tsx
|
|
8284
8281
|
import { withJsonFormsControlProps as withJsonFormsControlProps7 } from "@jsonforms/react";
|
|
8285
8282
|
import { Select as Select4 } from "@mantine/core";
|
|
8286
|
-
import { jsx as
|
|
8283
|
+
import { jsx as jsx50, Fragment as Fragment8 } from "react/jsx-runtime";
|
|
8287
8284
|
function PlainTimestampControl({
|
|
8288
8285
|
data,
|
|
8289
8286
|
handleChange,
|
|
@@ -8295,8 +8292,8 @@ function PlainTimestampControl({
|
|
|
8295
8292
|
const {
|
|
8296
8293
|
formOptions: { withDescriptions }
|
|
8297
8294
|
} = useFormOptions();
|
|
8298
|
-
return /* @__PURE__ */
|
|
8299
|
-
children: /* @__PURE__ */
|
|
8295
|
+
return /* @__PURE__ */ jsx50(Fragment8, {
|
|
8296
|
+
children: /* @__PURE__ */ jsx50(Select4, {
|
|
8300
8297
|
label,
|
|
8301
8298
|
data: schema.enum,
|
|
8302
8299
|
value: data,
|
|
@@ -8432,7 +8429,7 @@ var verticalLayoutTester_default = tester9;
|
|
|
8432
8429
|
// src/jsonforms/renderers/TextControl.tsx
|
|
8433
8430
|
import { withJsonFormsControlProps as withJsonFormsControlProps8 } from "@jsonforms/react";
|
|
8434
8431
|
import { TextInput as TextInput2 } from "@mantine/core";
|
|
8435
|
-
import { jsx as
|
|
8432
|
+
import { jsx as jsx51, Fragment as Fragment9 } from "react/jsx-runtime";
|
|
8436
8433
|
function PlainTextControl({
|
|
8437
8434
|
data,
|
|
8438
8435
|
handleChange,
|
|
@@ -8444,8 +8441,8 @@ function PlainTextControl({
|
|
|
8444
8441
|
const {
|
|
8445
8442
|
formOptions: { withDescriptions }
|
|
8446
8443
|
} = useFormOptions();
|
|
8447
|
-
return /* @__PURE__ */
|
|
8448
|
-
children: /* @__PURE__ */
|
|
8444
|
+
return /* @__PURE__ */ jsx51(Fragment9, {
|
|
8445
|
+
children: /* @__PURE__ */ jsx51(TextInput2, {
|
|
8449
8446
|
label,
|
|
8450
8447
|
variant: "default",
|
|
8451
8448
|
placeholder: "",
|
|
@@ -8464,7 +8461,7 @@ var TextControl_default = TextControl;
|
|
|
8464
8461
|
// src/jsonforms/renderers/TimestampControl.tsx
|
|
8465
8462
|
import { withJsonFormsControlProps as withJsonFormsControlProps9 } from "@jsonforms/react";
|
|
8466
8463
|
import { DatePickerInput } from "@mantine/dates";
|
|
8467
|
-
import { jsx as
|
|
8464
|
+
import { jsx as jsx52, Fragment as Fragment10 } from "react/jsx-runtime";
|
|
8468
8465
|
function PlainTimestampControl2({
|
|
8469
8466
|
data,
|
|
8470
8467
|
handleChange,
|
|
@@ -8476,8 +8473,8 @@ function PlainTimestampControl2({
|
|
|
8476
8473
|
const {
|
|
8477
8474
|
formOptions: { withDescriptions }
|
|
8478
8475
|
} = useFormOptions();
|
|
8479
|
-
return /* @__PURE__ */
|
|
8480
|
-
children: /* @__PURE__ */
|
|
8476
|
+
return /* @__PURE__ */ jsx52(Fragment10, {
|
|
8477
|
+
children: /* @__PURE__ */ jsx52(DatePickerInput, {
|
|
8481
8478
|
variant: "default",
|
|
8482
8479
|
label,
|
|
8483
8480
|
placeholder: "Pick a date",
|
|
@@ -8496,17 +8493,17 @@ var TimestampControl2 = withJsonFormsControlProps9(PlainTimestampControl2);
|
|
|
8496
8493
|
var TimestampControl_default = TimestampControl2;
|
|
8497
8494
|
|
|
8498
8495
|
// src/jsonforms/renderers/VerticalLayout.tsx
|
|
8499
|
-
import
|
|
8496
|
+
import React12 from "react";
|
|
8500
8497
|
import { withJsonFormsLayoutProps } from "@jsonforms/react";
|
|
8501
8498
|
import { JsonFormsDispatch, useJsonForms as useJsonForms4 } from "@jsonforms/react";
|
|
8502
|
-
import { jsx as
|
|
8499
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
8503
8500
|
"use client";
|
|
8504
8501
|
var JsonFormsLayout = ({
|
|
8505
8502
|
className,
|
|
8506
8503
|
children,
|
|
8507
8504
|
visible
|
|
8508
8505
|
}) => {
|
|
8509
|
-
return /* @__PURE__ */
|
|
8506
|
+
return /* @__PURE__ */ jsx53("div", {
|
|
8510
8507
|
className,
|
|
8511
8508
|
hidden: visible === undefined || visible === null ? false : !visible,
|
|
8512
8509
|
children
|
|
@@ -8517,10 +8514,10 @@ var renderChildren = (layout, schema, className, path, enabled) => {
|
|
|
8517
8514
|
const { formOptions } = useFormOptions();
|
|
8518
8515
|
const gutter = typeof formOptions.gutter === "string" ? `var(--mantine-spacing-${formOptions.gutter})` : `${formOptions.gutter}px`;
|
|
8519
8516
|
return layout.elements.map((child, index) => {
|
|
8520
|
-
return /* @__PURE__ */
|
|
8517
|
+
return /* @__PURE__ */ jsx53("div", {
|
|
8521
8518
|
className,
|
|
8522
8519
|
style: { marginTop: index === 0 ? 0 : gutter },
|
|
8523
|
-
children: /* @__PURE__ */
|
|
8520
|
+
children: /* @__PURE__ */ jsx53(JsonFormsDispatch, {
|
|
8524
8521
|
renderers,
|
|
8525
8522
|
cells,
|
|
8526
8523
|
uischema: child,
|
|
@@ -8533,11 +8530,11 @@ var renderChildren = (layout, schema, className, path, enabled) => {
|
|
|
8533
8530
|
};
|
|
8534
8531
|
var VerticalLayoutRenderer = (props) => {
|
|
8535
8532
|
const { data: _data, ...otherProps } = props;
|
|
8536
|
-
return /* @__PURE__ */
|
|
8533
|
+
return /* @__PURE__ */ jsx53(VerticalLayoutRendererComponent, {
|
|
8537
8534
|
...otherProps
|
|
8538
8535
|
});
|
|
8539
8536
|
};
|
|
8540
|
-
var VerticalLayoutRendererComponent =
|
|
8537
|
+
var VerticalLayoutRendererComponent = React12.memo(function VerticalLayoutRendererComponent2({
|
|
8541
8538
|
schema,
|
|
8542
8539
|
uischema,
|
|
8543
8540
|
path,
|
|
@@ -8547,7 +8544,7 @@ var VerticalLayoutRendererComponent = React11.memo(function VerticalLayoutRender
|
|
|
8547
8544
|
const verticalLayout = uischema;
|
|
8548
8545
|
const layoutClassName = "";
|
|
8549
8546
|
const childClassNames = "";
|
|
8550
|
-
return /* @__PURE__ */
|
|
8547
|
+
return /* @__PURE__ */ jsx53(JsonFormsLayout, {
|
|
8551
8548
|
className: layoutClassName,
|
|
8552
8549
|
uischema,
|
|
8553
8550
|
schema,
|