remoraid 2.33.1 → 2.36.2
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 +41 -17
- package/dist/core/index.d.ts +7 -4
- package/dist/core/index.js +51 -24
- package/dist/jsonforms/index.cjs +39 -18
- package/dist/jsonforms/index.js +48 -24
- package/package.json +1 -1
package/dist/core/index.cjs
CHANGED
|
@@ -5561,6 +5561,9 @@ var useWidgets = () => {
|
|
|
5561
5561
|
};
|
|
5562
5562
|
var useWidget = (pageId, widgetId) => {
|
|
5563
5563
|
const { widgets } = useWidgets();
|
|
5564
|
+
if (pageId === undefined || widgetId === undefined) {
|
|
5565
|
+
return null;
|
|
5566
|
+
}
|
|
5564
5567
|
return widgets?.[pageId]?.[widgetId] ?? null;
|
|
5565
5568
|
};
|
|
5566
5569
|
function WidgetsProvider({
|
|
@@ -6909,6 +6912,7 @@ function Pinnable({
|
|
|
6909
6912
|
layoutId,
|
|
6910
6913
|
controlsContainer,
|
|
6911
6914
|
hidden = false,
|
|
6915
|
+
onPinnedValueChange,
|
|
6912
6916
|
componentsProps,
|
|
6913
6917
|
children
|
|
6914
6918
|
}) {
|
|
@@ -6927,7 +6931,7 @@ function Pinnable({
|
|
|
6927
6931
|
order: 100,
|
|
6928
6932
|
...componentsProps?.button,
|
|
6929
6933
|
onClick: (e) => {
|
|
6930
|
-
setPinned((
|
|
6934
|
+
setPinned((prev) => !prev);
|
|
6931
6935
|
componentsProps?.button?.onClick?.(e);
|
|
6932
6936
|
}
|
|
6933
6937
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
@@ -6950,6 +6954,9 @@ function Pinnable({
|
|
|
6950
6954
|
children
|
|
6951
6955
|
]
|
|
6952
6956
|
}, undefined, true, undefined, this);
|
|
6957
|
+
import_react13.useEffect(() => {
|
|
6958
|
+
onPinnedValueChange?.(pinned);
|
|
6959
|
+
}, [pinned]);
|
|
6953
6960
|
if (!layout) {
|
|
6954
6961
|
return null;
|
|
6955
6962
|
}
|
|
@@ -7542,11 +7549,13 @@ function WidgetWrapper({
|
|
|
7542
7549
|
}
|
|
7543
7550
|
// src/core/components/Widget/index.tsx
|
|
7544
7551
|
var import_core20 = require("@mantine/core");
|
|
7552
|
+
var import_lodash13 = __toESM(require_lodash());
|
|
7545
7553
|
var jsx_dev_runtime26 = require("react/jsx-dev-runtime");
|
|
7546
7554
|
var react2 = require("react");
|
|
7547
7555
|
function Widget({
|
|
7548
7556
|
id,
|
|
7549
7557
|
title,
|
|
7558
|
+
description,
|
|
7550
7559
|
config,
|
|
7551
7560
|
badges: badgesProp,
|
|
7552
7561
|
buttons: buttonsProp,
|
|
@@ -7585,21 +7594,36 @@ function Widget({
|
|
|
7585
7594
|
justify: "space-between",
|
|
7586
7595
|
wrap: "nowrap",
|
|
7587
7596
|
children: [
|
|
7588
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.
|
|
7589
|
-
gap:
|
|
7590
|
-
wrap: "nowrap",
|
|
7597
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Stack, {
|
|
7598
|
+
gap: 4,
|
|
7591
7599
|
children: [
|
|
7592
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.
|
|
7593
|
-
order: 1,
|
|
7594
|
-
size: "h2",
|
|
7595
|
-
lineClamp: 1,
|
|
7596
|
-
...componentsProps?.title,
|
|
7597
|
-
children: title ?? id
|
|
7598
|
-
}, undefined, false, undefined, this),
|
|
7599
|
-
badges !== undefined && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(BadgeGroup, {
|
|
7600
|
-
badges,
|
|
7600
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Group, {
|
|
7601
7601
|
gap: badgesGap,
|
|
7602
|
-
|
|
7602
|
+
wrap: "nowrap",
|
|
7603
|
+
children: [
|
|
7604
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Title, {
|
|
7605
|
+
order: 1,
|
|
7606
|
+
size: "h2",
|
|
7607
|
+
lineClamp: 1,
|
|
7608
|
+
...componentsProps?.title,
|
|
7609
|
+
children: title ?? id
|
|
7610
|
+
}, undefined, false, undefined, this),
|
|
7611
|
+
badges !== undefined && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(BadgeGroup, {
|
|
7612
|
+
badges,
|
|
7613
|
+
gap: badgesGap,
|
|
7614
|
+
...componentsProps?.badgeGroup
|
|
7615
|
+
}, undefined, false, undefined, this)
|
|
7616
|
+
]
|
|
7617
|
+
}, undefined, true, undefined, this),
|
|
7618
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Transition, {
|
|
7619
|
+
mounted: Boolean(description),
|
|
7620
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Text, {
|
|
7621
|
+
size: "sm",
|
|
7622
|
+
c: "dimmed",
|
|
7623
|
+
...componentsProps?.description,
|
|
7624
|
+
style: import_lodash13.merge(transitionStyle, componentsProps?.description?.style),
|
|
7625
|
+
children: description
|
|
7626
|
+
}, undefined, false, undefined, this)
|
|
7603
7627
|
}, undefined, false, undefined, this)
|
|
7604
7628
|
]
|
|
7605
7629
|
}, undefined, true, undefined, this),
|
|
@@ -7638,7 +7662,7 @@ function Widget({
|
|
|
7638
7662
|
});
|
|
7639
7663
|
})
|
|
7640
7664
|
}, undefined, false, undefined, this),
|
|
7641
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.ScrollArea.Autosize, {
|
|
7665
|
+
(loading || Boolean(children)) && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.ScrollArea.Autosize, {
|
|
7642
7666
|
flex: 1,
|
|
7643
7667
|
...componentsProps?.childrenContainer,
|
|
7644
7668
|
children: loading ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Center, {
|
|
@@ -7868,7 +7892,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
7868
7892
|
Row
|
|
7869
7893
|
});
|
|
7870
7894
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
7871
|
-
var
|
|
7895
|
+
var import_lodash14 = __toESM(require_lodash());
|
|
7872
7896
|
var import_core24 = require("@mantine/core");
|
|
7873
7897
|
var import_icons_react12 = require("@tabler/icons-react");
|
|
7874
7898
|
var jsx_dev_runtime33 = require("react/jsx-dev-runtime");
|
|
@@ -7894,7 +7918,7 @@ function NavbarSettingsWidget({
|
|
|
7894
7918
|
navbar: initialUserExperience.navbar
|
|
7895
7919
|
}));
|
|
7896
7920
|
},
|
|
7897
|
-
custom: !
|
|
7921
|
+
custom: !import_lodash14.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
7898
7922
|
children: /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(SettingsTable_default, {
|
|
7899
7923
|
...componentsProps?.table,
|
|
7900
7924
|
children: [
|
package/dist/core/index.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ declare enum ClickTransformation {
|
|
|
185
185
|
}
|
|
186
186
|
declare const getDefaultWidgetContext: (configuration: WidgetConfiguration) => WidgetContext;
|
|
187
187
|
declare const useWidgets: () => WidgetsContext;
|
|
188
|
-
declare const useWidget: (pageId: string, widgetId: string) => WidgetContext | null;
|
|
188
|
+
declare const useWidget: (pageId: string | undefined, widgetId: string | undefined) => WidgetContext | null;
|
|
189
189
|
interface WidgetsProviderProps {}
|
|
190
190
|
import { PartialDeep as PartialDeep2 } from "type-fest";
|
|
191
191
|
declare const defaultTransitionDurations: RemoraidTheme["transitionDurations"];
|
|
@@ -485,6 +485,7 @@ interface ExplicitPinnableProps<T extends LayoutType> {
|
|
|
485
485
|
layoutId?: string;
|
|
486
486
|
controlsContainer?: HTMLDivElement | null;
|
|
487
487
|
hidden?: boolean;
|
|
488
|
+
onPinnedValueChange?: (newValue: boolean) => void;
|
|
488
489
|
componentsProps?: {
|
|
489
490
|
controls?: Partial<ControlsProps>
|
|
490
491
|
button?: Partial<ControlButtonProps>
|
|
@@ -493,7 +494,7 @@ interface ExplicitPinnableProps<T extends LayoutType> {
|
|
|
493
494
|
};
|
|
494
495
|
}
|
|
495
496
|
type PinnableProps<T extends LayoutType = PinnableDefaultLayoutType> = OptionalIfExtends<ExplicitPinnableProps<T>, "layoutType", PinnableDefaultLayoutType, T>;
|
|
496
|
-
declare function Pinnable2<T extends LayoutType = PinnableDefaultLayoutType>({ layoutType: layoutTypeProp, section, initialValue, layoutId, controlsContainer, hidden, componentsProps, children }: PropsWithChildren15<PinnableProps<T>>): ReactNode20;
|
|
497
|
+
declare function Pinnable2<T extends LayoutType = PinnableDefaultLayoutType>({ layoutType: layoutTypeProp, section, initialValue, layoutId, controlsContainer, hidden, onPinnedValueChange, componentsProps, children }: PropsWithChildren15<PinnableProps<T>>): ReactNode20;
|
|
497
498
|
interface WidgetSelectionHeaderProps {
|
|
498
499
|
title?: string;
|
|
499
500
|
pinnableSection?: FrameLayoutSection.Top | FrameLayoutSection.Bottom | null;
|
|
@@ -582,11 +583,12 @@ interface WidgetWrapperProps {
|
|
|
582
583
|
};
|
|
583
584
|
}
|
|
584
585
|
declare function WidgetWrapper({ config, mt, withCloseButton, pinnableSection, componentsProps, children }: PropsWithChildren16<WidgetWrapperProps>): ReactNode25;
|
|
585
|
-
import { MantineSize as MantineSize10, LoaderProps, DividerProps, StackProps as StackProps3, TitleProps, ScrollAreaAutosizeProps } from "@mantine/core";
|
|
586
|
+
import { MantineSize as MantineSize10, LoaderProps, DividerProps, StackProps as StackProps3, TitleProps, ScrollAreaAutosizeProps, TextProps as TextProps2 } from "@mantine/core";
|
|
586
587
|
import { PropsWithChildren as PropsWithChildren17, ReactNode as ReactNode26 } from "react";
|
|
587
588
|
interface WidgetProps {
|
|
588
589
|
id: string;
|
|
589
590
|
title?: string;
|
|
591
|
+
description?: string;
|
|
590
592
|
config?: Partial<Omit<WidgetConfiguration, "widgetId">>;
|
|
591
593
|
badges?: ElementOrPropsOfType<typeof BadgeMinimal>[];
|
|
592
594
|
buttons?: ElementOrPropsOfType<typeof RemoraidButton, RemoraidButtonProps<true> | RemoraidButtonProps<false>>[];
|
|
@@ -605,12 +607,13 @@ interface WidgetProps {
|
|
|
605
607
|
childrenContainer?: Partial<ScrollAreaAutosizeProps>
|
|
606
608
|
loader?: Partial<LoaderProps>
|
|
607
609
|
title?: Partial<TitleProps>
|
|
610
|
+
description?: Partial<TextProps2>
|
|
608
611
|
badgeGroup?: Partial<BadgeGroupProps>
|
|
609
612
|
divider?: Partial<DividerProps>
|
|
610
613
|
alertsContainer?: Partial<StackProps3>
|
|
611
614
|
};
|
|
612
615
|
}
|
|
613
|
-
declare function Widget({ id, title, config, badges: badgesProp, buttons: buttonsProp, alerts: alertsProp, gaps, loading, mt, pinnableSection, componentsProps, children }: PropsWithChildren17<WidgetProps>): ReactNode26;
|
|
616
|
+
declare function Widget({ id, title, description, config, badges: badgesProp, buttons: buttonsProp, alerts: alertsProp, gaps, loading, mt, pinnableSection, componentsProps, children }: PropsWithChildren17<WidgetProps>): ReactNode26;
|
|
614
617
|
import { ContainerProps as ContainerProps2, StackProps as StackProps4 } from "@mantine/core";
|
|
615
618
|
import { PropsWithChildren as PropsWithChildren18, ReactNode as ReactNode27 } from "react";
|
|
616
619
|
declare const usePage: () => PageConfiguration | null;
|
package/dist/core/index.js
CHANGED
|
@@ -5462,6 +5462,9 @@ var useWidgets = () => {
|
|
|
5462
5462
|
};
|
|
5463
5463
|
var useWidget = (pageId, widgetId) => {
|
|
5464
5464
|
const { widgets } = useWidgets();
|
|
5465
|
+
if (pageId === undefined || widgetId === undefined) {
|
|
5466
|
+
return null;
|
|
5467
|
+
}
|
|
5465
5468
|
return widgets?.[pageId]?.[widgetId] ?? null;
|
|
5466
5469
|
};
|
|
5467
5470
|
function WidgetsProvider({
|
|
@@ -6661,7 +6664,7 @@ function Page({
|
|
|
6661
6664
|
|
|
6662
6665
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
6663
6666
|
import { IconCheck, IconFocus, IconNavigation } from "@tabler/icons-react";
|
|
6664
|
-
import { useEffect as
|
|
6667
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } from "react";
|
|
6665
6668
|
|
|
6666
6669
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
6667
6670
|
import {
|
|
@@ -6704,6 +6707,7 @@ var import_lodash8 = __toESM(require_lodash(), 1);
|
|
|
6704
6707
|
|
|
6705
6708
|
// src/core/components/Pinnable/index.tsx
|
|
6706
6709
|
import {
|
|
6710
|
+
useEffect as useEffect4,
|
|
6707
6711
|
useMemo as useMemo4,
|
|
6708
6712
|
useRef as useRef2,
|
|
6709
6713
|
useState as useState7
|
|
@@ -6885,6 +6889,7 @@ function Pinnable({
|
|
|
6885
6889
|
layoutId,
|
|
6886
6890
|
controlsContainer,
|
|
6887
6891
|
hidden = false,
|
|
6892
|
+
onPinnedValueChange,
|
|
6888
6893
|
componentsProps,
|
|
6889
6894
|
children
|
|
6890
6895
|
}) {
|
|
@@ -6903,7 +6908,7 @@ function Pinnable({
|
|
|
6903
6908
|
order: 100,
|
|
6904
6909
|
...componentsProps?.button,
|
|
6905
6910
|
onClick: (e) => {
|
|
6906
|
-
setPinned((
|
|
6911
|
+
setPinned((prev) => !prev);
|
|
6907
6912
|
componentsProps?.button?.onClick?.(e);
|
|
6908
6913
|
}
|
|
6909
6914
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
@@ -6926,6 +6931,9 @@ function Pinnable({
|
|
|
6926
6931
|
children
|
|
6927
6932
|
]
|
|
6928
6933
|
}, undefined, true, undefined, this);
|
|
6934
|
+
useEffect4(() => {
|
|
6935
|
+
onPinnedValueChange?.(pinned);
|
|
6936
|
+
}, [pinned]);
|
|
6929
6937
|
if (!layout) {
|
|
6930
6938
|
return null;
|
|
6931
6939
|
}
|
|
@@ -7071,7 +7079,7 @@ function WidgetSelectionHeader({
|
|
|
7071
7079
|
}, undefined, false, undefined, this)
|
|
7072
7080
|
]
|
|
7073
7081
|
}, undefined, true, undefined, this);
|
|
7074
|
-
|
|
7082
|
+
useEffect5(() => {
|
|
7075
7083
|
if (!activeWidget) {
|
|
7076
7084
|
return;
|
|
7077
7085
|
}
|
|
@@ -7389,7 +7397,7 @@ function RemoraidButton({
|
|
|
7389
7397
|
import { Paper as Paper3, Transition as Transition7 } from "@mantine/core";
|
|
7390
7398
|
import {
|
|
7391
7399
|
useCallback as useCallback2,
|
|
7392
|
-
useEffect as
|
|
7400
|
+
useEffect as useEffect6,
|
|
7393
7401
|
useRef as useRef4,
|
|
7394
7402
|
useState as useState9
|
|
7395
7403
|
} from "react";
|
|
@@ -7526,7 +7534,7 @@ function WidgetWrapper({
|
|
|
7526
7534
|
children: element
|
|
7527
7535
|
}, undefined, false, undefined, this);
|
|
7528
7536
|
}
|
|
7529
|
-
|
|
7537
|
+
useEffect6(() => {
|
|
7530
7538
|
if (!page) {
|
|
7531
7539
|
return;
|
|
7532
7540
|
}
|
|
@@ -7545,13 +7553,17 @@ import {
|
|
|
7545
7553
|
Title,
|
|
7546
7554
|
Stack as Stack5,
|
|
7547
7555
|
Box as Box5,
|
|
7548
|
-
ScrollArea as ScrollArea3
|
|
7556
|
+
ScrollArea as ScrollArea3,
|
|
7557
|
+
Transition as Transition8,
|
|
7558
|
+
Text as Text2
|
|
7549
7559
|
} from "@mantine/core";
|
|
7560
|
+
var import_lodash13 = __toESM(require_lodash(), 1);
|
|
7550
7561
|
import { jsxDEV as jsxDEV26 } from "react/jsx-dev-runtime";
|
|
7551
7562
|
import { createElement as createElement2 } from "react";
|
|
7552
7563
|
function Widget({
|
|
7553
7564
|
id,
|
|
7554
7565
|
title,
|
|
7566
|
+
description,
|
|
7555
7567
|
config,
|
|
7556
7568
|
badges: badgesProp,
|
|
7557
7569
|
buttons: buttonsProp,
|
|
@@ -7590,21 +7602,36 @@ function Widget({
|
|
|
7590
7602
|
justify: "space-between",
|
|
7591
7603
|
wrap: "nowrap",
|
|
7592
7604
|
children: [
|
|
7593
|
-
/* @__PURE__ */ jsxDEV26(
|
|
7594
|
-
gap:
|
|
7595
|
-
wrap: "nowrap",
|
|
7605
|
+
/* @__PURE__ */ jsxDEV26(Stack5, {
|
|
7606
|
+
gap: 4,
|
|
7596
7607
|
children: [
|
|
7597
|
-
/* @__PURE__ */ jsxDEV26(
|
|
7598
|
-
order: 1,
|
|
7599
|
-
size: "h2",
|
|
7600
|
-
lineClamp: 1,
|
|
7601
|
-
...componentsProps?.title,
|
|
7602
|
-
children: title ?? id
|
|
7603
|
-
}, undefined, false, undefined, this),
|
|
7604
|
-
badges !== undefined && /* @__PURE__ */ jsxDEV26(BadgeGroup, {
|
|
7605
|
-
badges,
|
|
7608
|
+
/* @__PURE__ */ jsxDEV26(Group5, {
|
|
7606
7609
|
gap: badgesGap,
|
|
7607
|
-
|
|
7610
|
+
wrap: "nowrap",
|
|
7611
|
+
children: [
|
|
7612
|
+
/* @__PURE__ */ jsxDEV26(Title, {
|
|
7613
|
+
order: 1,
|
|
7614
|
+
size: "h2",
|
|
7615
|
+
lineClamp: 1,
|
|
7616
|
+
...componentsProps?.title,
|
|
7617
|
+
children: title ?? id
|
|
7618
|
+
}, undefined, false, undefined, this),
|
|
7619
|
+
badges !== undefined && /* @__PURE__ */ jsxDEV26(BadgeGroup, {
|
|
7620
|
+
badges,
|
|
7621
|
+
gap: badgesGap,
|
|
7622
|
+
...componentsProps?.badgeGroup
|
|
7623
|
+
}, undefined, false, undefined, this)
|
|
7624
|
+
]
|
|
7625
|
+
}, undefined, true, undefined, this),
|
|
7626
|
+
/* @__PURE__ */ jsxDEV26(Transition8, {
|
|
7627
|
+
mounted: Boolean(description),
|
|
7628
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV26(Text2, {
|
|
7629
|
+
size: "sm",
|
|
7630
|
+
c: "dimmed",
|
|
7631
|
+
...componentsProps?.description,
|
|
7632
|
+
style: import_lodash13.merge(transitionStyle, componentsProps?.description?.style),
|
|
7633
|
+
children: description
|
|
7634
|
+
}, undefined, false, undefined, this)
|
|
7608
7635
|
}, undefined, false, undefined, this)
|
|
7609
7636
|
]
|
|
7610
7637
|
}, undefined, true, undefined, this),
|
|
@@ -7643,7 +7670,7 @@ function Widget({
|
|
|
7643
7670
|
});
|
|
7644
7671
|
})
|
|
7645
7672
|
}, undefined, false, undefined, this),
|
|
7646
|
-
/* @__PURE__ */ jsxDEV26(ScrollArea3.Autosize, {
|
|
7673
|
+
(loading || Boolean(children)) && /* @__PURE__ */ jsxDEV26(ScrollArea3.Autosize, {
|
|
7647
7674
|
flex: 1,
|
|
7648
7675
|
...componentsProps?.childrenContainer,
|
|
7649
7676
|
children: loading ? /* @__PURE__ */ jsxDEV26(Center, {
|
|
@@ -7815,7 +7842,7 @@ import { createContext as createContext7, useContext as useContext10 } from "rea
|
|
|
7815
7842
|
import { Table as Table2 } from "@mantine/core";
|
|
7816
7843
|
|
|
7817
7844
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
|
7818
|
-
import { Table, Text as
|
|
7845
|
+
import { Table, Text as Text3 } from "@mantine/core";
|
|
7819
7846
|
import { jsxDEV as jsxDEV31 } from "react/jsx-dev-runtime";
|
|
7820
7847
|
function Row({
|
|
7821
7848
|
children,
|
|
@@ -7826,7 +7853,7 @@ function Row({
|
|
|
7826
7853
|
children: [
|
|
7827
7854
|
/* @__PURE__ */ jsxDEV31(Table.Th, {
|
|
7828
7855
|
w: options.leftColumnWidth,
|
|
7829
|
-
children: /* @__PURE__ */ jsxDEV31(
|
|
7856
|
+
children: /* @__PURE__ */ jsxDEV31(Text3, {
|
|
7830
7857
|
size: "sm",
|
|
7831
7858
|
children: label
|
|
7832
7859
|
}, undefined, false, undefined, this)
|
|
@@ -7873,7 +7900,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
7873
7900
|
Row
|
|
7874
7901
|
});
|
|
7875
7902
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
7876
|
-
var
|
|
7903
|
+
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
7877
7904
|
import { Chip as Chip3, Group as Group7 } from "@mantine/core";
|
|
7878
7905
|
import { IconLink as IconLink2 } from "@tabler/icons-react";
|
|
7879
7906
|
import { jsxDEV as jsxDEV33 } from "react/jsx-dev-runtime";
|
|
@@ -7899,7 +7926,7 @@ function NavbarSettingsWidget({
|
|
|
7899
7926
|
navbar: initialUserExperience.navbar
|
|
7900
7927
|
}));
|
|
7901
7928
|
},
|
|
7902
|
-
custom: !
|
|
7929
|
+
custom: !import_lodash14.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
7903
7930
|
children: /* @__PURE__ */ jsxDEV33(SettingsTable_default, {
|
|
7904
7931
|
...componentsProps?.table,
|
|
7905
7932
|
children: [
|
package/dist/jsonforms/index.cjs
CHANGED
|
@@ -6409,6 +6409,7 @@ function Pinnable({
|
|
|
6409
6409
|
layoutId,
|
|
6410
6410
|
controlsContainer,
|
|
6411
6411
|
hidden = false,
|
|
6412
|
+
onPinnedValueChange,
|
|
6412
6413
|
componentsProps,
|
|
6413
6414
|
children
|
|
6414
6415
|
}) {
|
|
@@ -6427,7 +6428,7 @@ function Pinnable({
|
|
|
6427
6428
|
order: 100,
|
|
6428
6429
|
...componentsProps?.button,
|
|
6429
6430
|
onClick: (e) => {
|
|
6430
|
-
setPinned((
|
|
6431
|
+
setPinned((prev) => !prev);
|
|
6431
6432
|
componentsProps?.button?.onClick?.(e);
|
|
6432
6433
|
}
|
|
6433
6434
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
@@ -6450,6 +6451,9 @@ function Pinnable({
|
|
|
6450
6451
|
children
|
|
6451
6452
|
]
|
|
6452
6453
|
}, undefined, true, undefined, this);
|
|
6454
|
+
import_react13.useEffect(() => {
|
|
6455
|
+
onPinnedValueChange?.(pinned);
|
|
6456
|
+
}, [pinned]);
|
|
6453
6457
|
if (!layout) {
|
|
6454
6458
|
return null;
|
|
6455
6459
|
}
|
|
@@ -6853,11 +6857,13 @@ function WidgetWrapper({
|
|
|
6853
6857
|
}
|
|
6854
6858
|
// src/core/components/Widget/index.tsx
|
|
6855
6859
|
var import_core20 = require("@mantine/core");
|
|
6860
|
+
var import_lodash13 = __toESM(require_lodash());
|
|
6856
6861
|
var jsx_dev_runtime26 = require("react/jsx-dev-runtime");
|
|
6857
6862
|
var react2 = require("react");
|
|
6858
6863
|
function Widget({
|
|
6859
6864
|
id,
|
|
6860
6865
|
title,
|
|
6866
|
+
description,
|
|
6861
6867
|
config,
|
|
6862
6868
|
badges: badgesProp,
|
|
6863
6869
|
buttons: buttonsProp,
|
|
@@ -6896,21 +6902,36 @@ function Widget({
|
|
|
6896
6902
|
justify: "space-between",
|
|
6897
6903
|
wrap: "nowrap",
|
|
6898
6904
|
children: [
|
|
6899
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.
|
|
6900
|
-
gap:
|
|
6901
|
-
wrap: "nowrap",
|
|
6905
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Stack, {
|
|
6906
|
+
gap: 4,
|
|
6902
6907
|
children: [
|
|
6903
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.
|
|
6904
|
-
order: 1,
|
|
6905
|
-
size: "h2",
|
|
6906
|
-
lineClamp: 1,
|
|
6907
|
-
...componentsProps?.title,
|
|
6908
|
-
children: title ?? id
|
|
6909
|
-
}, undefined, false, undefined, this),
|
|
6910
|
-
badges !== undefined && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(BadgeGroup, {
|
|
6911
|
-
badges,
|
|
6908
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Group, {
|
|
6912
6909
|
gap: badgesGap,
|
|
6913
|
-
|
|
6910
|
+
wrap: "nowrap",
|
|
6911
|
+
children: [
|
|
6912
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Title, {
|
|
6913
|
+
order: 1,
|
|
6914
|
+
size: "h2",
|
|
6915
|
+
lineClamp: 1,
|
|
6916
|
+
...componentsProps?.title,
|
|
6917
|
+
children: title ?? id
|
|
6918
|
+
}, undefined, false, undefined, this),
|
|
6919
|
+
badges !== undefined && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(BadgeGroup, {
|
|
6920
|
+
badges,
|
|
6921
|
+
gap: badgesGap,
|
|
6922
|
+
...componentsProps?.badgeGroup
|
|
6923
|
+
}, undefined, false, undefined, this)
|
|
6924
|
+
]
|
|
6925
|
+
}, undefined, true, undefined, this),
|
|
6926
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Transition, {
|
|
6927
|
+
mounted: Boolean(description),
|
|
6928
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Text, {
|
|
6929
|
+
size: "sm",
|
|
6930
|
+
c: "dimmed",
|
|
6931
|
+
...componentsProps?.description,
|
|
6932
|
+
style: import_lodash13.merge(transitionStyle, componentsProps?.description?.style),
|
|
6933
|
+
children: description
|
|
6934
|
+
}, undefined, false, undefined, this)
|
|
6914
6935
|
}, undefined, false, undefined, this)
|
|
6915
6936
|
]
|
|
6916
6937
|
}, undefined, true, undefined, this),
|
|
@@ -6949,7 +6970,7 @@ function Widget({
|
|
|
6949
6970
|
});
|
|
6950
6971
|
})
|
|
6951
6972
|
}, undefined, false, undefined, this),
|
|
6952
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.ScrollArea.Autosize, {
|
|
6973
|
+
(loading || Boolean(children)) && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.ScrollArea.Autosize, {
|
|
6953
6974
|
flex: 1,
|
|
6954
6975
|
...componentsProps?.childrenContainer,
|
|
6955
6976
|
children: loading ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Center, {
|
|
@@ -7120,7 +7141,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
7120
7141
|
Row
|
|
7121
7142
|
});
|
|
7122
7143
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
7123
|
-
var
|
|
7144
|
+
var import_lodash14 = __toESM(require_lodash());
|
|
7124
7145
|
var import_core24 = require("@mantine/core");
|
|
7125
7146
|
var import_icons_react12 = require("@tabler/icons-react");
|
|
7126
7147
|
var jsx_dev_runtime33 = require("react/jsx-dev-runtime");
|
|
@@ -7405,7 +7426,7 @@ var import_react26 = require("@jsonforms/react");
|
|
|
7405
7426
|
var import_core31 = require("@mantine/core");
|
|
7406
7427
|
var import_icons_react13 = require("@tabler/icons-react");
|
|
7407
7428
|
var import_core32 = require("remoraid/core");
|
|
7408
|
-
var
|
|
7429
|
+
var import_lodash15 = __toESM(require_lodash());
|
|
7409
7430
|
var jsx_dev_runtime39 = require("react/jsx-dev-runtime");
|
|
7410
7431
|
function PlainArrayControl(props) {
|
|
7411
7432
|
const theme = import_core32.useRemoraidTheme();
|
|
@@ -7463,7 +7484,7 @@ function PlainArrayControl(props) {
|
|
|
7463
7484
|
renderers: renderers ?? [],
|
|
7464
7485
|
cells: cells ?? [],
|
|
7465
7486
|
onChange: ({ data: newData }) => {
|
|
7466
|
-
if (
|
|
7487
|
+
if (import_lodash15.isEqual(data[i], newData.item)) {
|
|
7467
7488
|
return;
|
|
7468
7489
|
}
|
|
7469
7490
|
const dataCopy = [...data];
|
package/dist/jsonforms/index.js
CHANGED
|
@@ -6253,7 +6253,7 @@ var usePage = () => {
|
|
|
6253
6253
|
|
|
6254
6254
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
6255
6255
|
import { IconCheck, IconFocus, IconNavigation } from "@tabler/icons-react";
|
|
6256
|
-
import { useEffect as
|
|
6256
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } from "react";
|
|
6257
6257
|
|
|
6258
6258
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
6259
6259
|
import {
|
|
@@ -6268,6 +6268,7 @@ var import_lodash8 = __toESM(require_lodash(), 1);
|
|
|
6268
6268
|
|
|
6269
6269
|
// src/core/components/Pinnable/index.tsx
|
|
6270
6270
|
import {
|
|
6271
|
+
useEffect as useEffect4,
|
|
6271
6272
|
useMemo as useMemo4,
|
|
6272
6273
|
useRef as useRef2,
|
|
6273
6274
|
useState as useState7
|
|
@@ -6449,6 +6450,7 @@ function Pinnable({
|
|
|
6449
6450
|
layoutId,
|
|
6450
6451
|
controlsContainer,
|
|
6451
6452
|
hidden = false,
|
|
6453
|
+
onPinnedValueChange,
|
|
6452
6454
|
componentsProps,
|
|
6453
6455
|
children
|
|
6454
6456
|
}) {
|
|
@@ -6467,7 +6469,7 @@ function Pinnable({
|
|
|
6467
6469
|
order: 100,
|
|
6468
6470
|
...componentsProps?.button,
|
|
6469
6471
|
onClick: (e) => {
|
|
6470
|
-
setPinned((
|
|
6472
|
+
setPinned((prev) => !prev);
|
|
6471
6473
|
componentsProps?.button?.onClick?.(e);
|
|
6472
6474
|
}
|
|
6473
6475
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
@@ -6490,6 +6492,9 @@ function Pinnable({
|
|
|
6490
6492
|
children
|
|
6491
6493
|
]
|
|
6492
6494
|
}, undefined, true, undefined, this);
|
|
6495
|
+
useEffect4(() => {
|
|
6496
|
+
onPinnedValueChange?.(pinned);
|
|
6497
|
+
}, [pinned]);
|
|
6493
6498
|
if (!layout) {
|
|
6494
6499
|
return null;
|
|
6495
6500
|
}
|
|
@@ -6764,7 +6769,7 @@ function RemoraidButton({
|
|
|
6764
6769
|
import { Paper as Paper3, Transition as Transition7 } from "@mantine/core";
|
|
6765
6770
|
import {
|
|
6766
6771
|
useCallback as useCallback2,
|
|
6767
|
-
useEffect as
|
|
6772
|
+
useEffect as useEffect6,
|
|
6768
6773
|
useRef as useRef4,
|
|
6769
6774
|
useState as useState9
|
|
6770
6775
|
} from "react";
|
|
@@ -6901,7 +6906,7 @@ function WidgetWrapper({
|
|
|
6901
6906
|
children: element
|
|
6902
6907
|
}, undefined, false, undefined, this);
|
|
6903
6908
|
}
|
|
6904
|
-
|
|
6909
|
+
useEffect6(() => {
|
|
6905
6910
|
if (!page) {
|
|
6906
6911
|
return;
|
|
6907
6912
|
}
|
|
@@ -6920,13 +6925,17 @@ import {
|
|
|
6920
6925
|
Title,
|
|
6921
6926
|
Stack as Stack5,
|
|
6922
6927
|
Box as Box5,
|
|
6923
|
-
ScrollArea as ScrollArea3
|
|
6928
|
+
ScrollArea as ScrollArea3,
|
|
6929
|
+
Transition as Transition8,
|
|
6930
|
+
Text as Text2
|
|
6924
6931
|
} from "@mantine/core";
|
|
6932
|
+
var import_lodash13 = __toESM(require_lodash(), 1);
|
|
6925
6933
|
import { jsxDEV as jsxDEV26 } from "react/jsx-dev-runtime";
|
|
6926
6934
|
import { createElement as createElement2 } from "react";
|
|
6927
6935
|
function Widget({
|
|
6928
6936
|
id,
|
|
6929
6937
|
title,
|
|
6938
|
+
description,
|
|
6930
6939
|
config,
|
|
6931
6940
|
badges: badgesProp,
|
|
6932
6941
|
buttons: buttonsProp,
|
|
@@ -6965,21 +6974,36 @@ function Widget({
|
|
|
6965
6974
|
justify: "space-between",
|
|
6966
6975
|
wrap: "nowrap",
|
|
6967
6976
|
children: [
|
|
6968
|
-
/* @__PURE__ */ jsxDEV26(
|
|
6969
|
-
gap:
|
|
6970
|
-
wrap: "nowrap",
|
|
6977
|
+
/* @__PURE__ */ jsxDEV26(Stack5, {
|
|
6978
|
+
gap: 4,
|
|
6971
6979
|
children: [
|
|
6972
|
-
/* @__PURE__ */ jsxDEV26(
|
|
6973
|
-
order: 1,
|
|
6974
|
-
size: "h2",
|
|
6975
|
-
lineClamp: 1,
|
|
6976
|
-
...componentsProps?.title,
|
|
6977
|
-
children: title ?? id
|
|
6978
|
-
}, undefined, false, undefined, this),
|
|
6979
|
-
badges !== undefined && /* @__PURE__ */ jsxDEV26(BadgeGroup, {
|
|
6980
|
-
badges,
|
|
6980
|
+
/* @__PURE__ */ jsxDEV26(Group5, {
|
|
6981
6981
|
gap: badgesGap,
|
|
6982
|
-
|
|
6982
|
+
wrap: "nowrap",
|
|
6983
|
+
children: [
|
|
6984
|
+
/* @__PURE__ */ jsxDEV26(Title, {
|
|
6985
|
+
order: 1,
|
|
6986
|
+
size: "h2",
|
|
6987
|
+
lineClamp: 1,
|
|
6988
|
+
...componentsProps?.title,
|
|
6989
|
+
children: title ?? id
|
|
6990
|
+
}, undefined, false, undefined, this),
|
|
6991
|
+
badges !== undefined && /* @__PURE__ */ jsxDEV26(BadgeGroup, {
|
|
6992
|
+
badges,
|
|
6993
|
+
gap: badgesGap,
|
|
6994
|
+
...componentsProps?.badgeGroup
|
|
6995
|
+
}, undefined, false, undefined, this)
|
|
6996
|
+
]
|
|
6997
|
+
}, undefined, true, undefined, this),
|
|
6998
|
+
/* @__PURE__ */ jsxDEV26(Transition8, {
|
|
6999
|
+
mounted: Boolean(description),
|
|
7000
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV26(Text2, {
|
|
7001
|
+
size: "sm",
|
|
7002
|
+
c: "dimmed",
|
|
7003
|
+
...componentsProps?.description,
|
|
7004
|
+
style: import_lodash13.merge(transitionStyle, componentsProps?.description?.style),
|
|
7005
|
+
children: description
|
|
7006
|
+
}, undefined, false, undefined, this)
|
|
6983
7007
|
}, undefined, false, undefined, this)
|
|
6984
7008
|
]
|
|
6985
7009
|
}, undefined, true, undefined, this),
|
|
@@ -7018,7 +7042,7 @@ function Widget({
|
|
|
7018
7042
|
});
|
|
7019
7043
|
})
|
|
7020
7044
|
}, undefined, false, undefined, this),
|
|
7021
|
-
/* @__PURE__ */ jsxDEV26(ScrollArea3.Autosize, {
|
|
7045
|
+
(loading || Boolean(children)) && /* @__PURE__ */ jsxDEV26(ScrollArea3.Autosize, {
|
|
7022
7046
|
flex: 1,
|
|
7023
7047
|
...componentsProps?.childrenContainer,
|
|
7024
7048
|
children: loading ? /* @__PURE__ */ jsxDEV26(Center, {
|
|
@@ -7131,7 +7155,7 @@ import { createContext as createContext7, useContext as useContext10 } from "rea
|
|
|
7131
7155
|
import { Table as Table2 } from "@mantine/core";
|
|
7132
7156
|
|
|
7133
7157
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
|
7134
|
-
import { Table, Text as
|
|
7158
|
+
import { Table, Text as Text3 } from "@mantine/core";
|
|
7135
7159
|
import { jsxDEV as jsxDEV31 } from "react/jsx-dev-runtime";
|
|
7136
7160
|
function Row({
|
|
7137
7161
|
children,
|
|
@@ -7142,7 +7166,7 @@ function Row({
|
|
|
7142
7166
|
children: [
|
|
7143
7167
|
/* @__PURE__ */ jsxDEV31(Table.Th, {
|
|
7144
7168
|
w: options.leftColumnWidth,
|
|
7145
|
-
children: /* @__PURE__ */ jsxDEV31(
|
|
7169
|
+
children: /* @__PURE__ */ jsxDEV31(Text3, {
|
|
7146
7170
|
size: "sm",
|
|
7147
7171
|
children: label
|
|
7148
7172
|
}, undefined, false, undefined, this)
|
|
@@ -7189,7 +7213,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
7189
7213
|
Row
|
|
7190
7214
|
});
|
|
7191
7215
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
7192
|
-
var
|
|
7216
|
+
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
7193
7217
|
import { Chip as Chip3, Group as Group7 } from "@mantine/core";
|
|
7194
7218
|
import { IconLink as IconLink2 } from "@tabler/icons-react";
|
|
7195
7219
|
import { jsxDEV as jsxDEV33 } from "react/jsx-dev-runtime";
|
|
@@ -7491,7 +7515,7 @@ import {
|
|
|
7491
7515
|
} from "@jsonforms/react";
|
|
7492
7516
|
import { Box as Box7, Button as Button2, Flex as Flex4, Input as Input3, Paper as Paper6, Stack as Stack6 } from "@mantine/core";
|
|
7493
7517
|
import { IconPlus, IconTrash } from "@tabler/icons-react";
|
|
7494
|
-
var
|
|
7518
|
+
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
7495
7519
|
import {
|
|
7496
7520
|
AlertCategory as AlertCategory3,
|
|
7497
7521
|
AlertMinimal as AlertMinimal2,
|
|
@@ -7555,7 +7579,7 @@ function PlainArrayControl(props) {
|
|
|
7555
7579
|
renderers: renderers ?? [],
|
|
7556
7580
|
cells: cells ?? [],
|
|
7557
7581
|
onChange: ({ data: newData }) => {
|
|
7558
|
-
if (
|
|
7582
|
+
if (import_lodash15.isEqual(data[i], newData.item)) {
|
|
7559
7583
|
return;
|
|
7560
7584
|
}
|
|
7561
7585
|
const dataCopy = [...data];
|