remoraid 2.18.43 → 2.20.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 +340 -302
- package/dist/core/index.d.ts +155 -132
- package/dist/core/index.js +280 -247
- package/dist/core/styles.css +13 -1
- package/dist/jsonforms/index.cjs +20 -11
- package/dist/jsonforms/index.js +57 -17
- package/dist/server/index.d.ts +45 -6
- package/package.json +3 -2
package/dist/core/index.cjs
CHANGED
|
@@ -1001,7 +1001,7 @@ var require_lodash = __commonJS((exports2, module2) => {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
1003
1003
|
SetCache.prototype.has = setCacheHas;
|
|
1004
|
-
function
|
|
1004
|
+
function Stack(entries) {
|
|
1005
1005
|
var data = this.__data__ = new ListCache(entries);
|
|
1006
1006
|
this.size = data.size;
|
|
1007
1007
|
}
|
|
@@ -1035,11 +1035,11 @@ var require_lodash = __commonJS((exports2, module2) => {
|
|
|
1035
1035
|
this.size = data.size;
|
|
1036
1036
|
return this;
|
|
1037
1037
|
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1038
|
+
Stack.prototype.clear = stackClear;
|
|
1039
|
+
Stack.prototype["delete"] = stackDelete;
|
|
1040
|
+
Stack.prototype.get = stackGet;
|
|
1041
|
+
Stack.prototype.has = stackHas;
|
|
1042
|
+
Stack.prototype.set = stackSet;
|
|
1043
1043
|
function arrayLikeKeys(value, inherited) {
|
|
1044
1044
|
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String) : [], length = result2.length;
|
|
1045
1045
|
for (var key in value) {
|
|
@@ -1155,7 +1155,7 @@ var require_lodash = __commonJS((exports2, module2) => {
|
|
|
1155
1155
|
result2 = initCloneByTag(value, tag, isDeep);
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
stack || (stack = new
|
|
1158
|
+
stack || (stack = new Stack);
|
|
1159
1159
|
var stacked = stack.get(value);
|
|
1160
1160
|
if (stacked) {
|
|
1161
1161
|
return stacked;
|
|
@@ -1424,21 +1424,21 @@ var require_lodash = __commonJS((exports2, module2) => {
|
|
|
1424
1424
|
objIsObj = false;
|
|
1425
1425
|
}
|
|
1426
1426
|
if (isSameTag && !objIsObj) {
|
|
1427
|
-
stack || (stack = new
|
|
1427
|
+
stack || (stack = new Stack);
|
|
1428
1428
|
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1429
1429
|
}
|
|
1430
1430
|
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
1431
1431
|
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
|
1432
1432
|
if (objIsWrapped || othIsWrapped) {
|
|
1433
1433
|
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1434
|
-
stack || (stack = new
|
|
1434
|
+
stack || (stack = new Stack);
|
|
1435
1435
|
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
1438
|
if (!isSameTag) {
|
|
1439
1439
|
return false;
|
|
1440
1440
|
}
|
|
1441
|
-
stack || (stack = new
|
|
1441
|
+
stack || (stack = new Stack);
|
|
1442
1442
|
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
1443
1443
|
}
|
|
1444
1444
|
function baseIsMap(value) {
|
|
@@ -1464,7 +1464,7 @@ var require_lodash = __commonJS((exports2, module2) => {
|
|
|
1464
1464
|
return false;
|
|
1465
1465
|
}
|
|
1466
1466
|
} else {
|
|
1467
|
-
var stack = new
|
|
1467
|
+
var stack = new Stack;
|
|
1468
1468
|
if (customizer) {
|
|
1469
1469
|
var result2 = customizer(objValue, srcValue, key, object, source, stack);
|
|
1470
1470
|
}
|
|
@@ -1560,7 +1560,7 @@ var require_lodash = __commonJS((exports2, module2) => {
|
|
|
1560
1560
|
return;
|
|
1561
1561
|
}
|
|
1562
1562
|
baseFor(source, function(srcValue, key) {
|
|
1563
|
-
stack || (stack = new
|
|
1563
|
+
stack || (stack = new Stack);
|
|
1564
1564
|
if (isObject(srcValue)) {
|
|
1565
1565
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1566
1566
|
} else {
|
|
@@ -5476,6 +5476,7 @@ __export(exports_core, {
|
|
|
5476
5476
|
isValidElementOfType: () => isValidElementOfType,
|
|
5477
5477
|
getElementTypeName: () => getElementTypeName,
|
|
5478
5478
|
getDefaultWidgetContext: () => getDefaultWidgetContext,
|
|
5479
|
+
getDefaultButtonIconSize: () => getDefaultButtonIconSize,
|
|
5479
5480
|
defaultUserExperienceCookieName: () => defaultUserExperienceCookieName,
|
|
5480
5481
|
defaultUserExperience: () => defaultUserExperience,
|
|
5481
5482
|
defaultSettingsWidgetOptions: () => defaultSettingsWidgetContext,
|
|
@@ -5515,6 +5516,7 @@ __export(exports_core, {
|
|
|
5515
5516
|
FrameLayoutSection: () => FrameLayoutSection,
|
|
5516
5517
|
FrameLayout: () => FrameLayout_default,
|
|
5517
5518
|
FooterVariant: () => FooterVariant,
|
|
5519
|
+
EnvironmentShellVariant: () => EnvironmentShellVariant,
|
|
5518
5520
|
EnvironmentShell: () => EnvironmentShell,
|
|
5519
5521
|
Controls: () => Controls,
|
|
5520
5522
|
ControlButton: () => ControlButton,
|
|
@@ -5529,13 +5531,10 @@ __export(exports_core, {
|
|
|
5529
5531
|
module.exports = __toCommonJS(exports_core);
|
|
5530
5532
|
|
|
5531
5533
|
// src/core/components/RemoraidProvider/WidgetsProvider/index.tsx
|
|
5534
|
+
var import_lodash = __toESM(require_lodash());
|
|
5532
5535
|
var import_react = __toESM(require("react"));
|
|
5533
5536
|
var jsx_dev_runtime = require("react/jsx-dev-runtime");
|
|
5534
|
-
var getDefaultWidgetContext = (configuration) => ({
|
|
5535
|
-
name: configuration.widgetId,
|
|
5536
|
-
selected: true,
|
|
5537
|
-
...configuration.initialValues
|
|
5538
|
-
});
|
|
5537
|
+
var getDefaultWidgetContext = (configuration) => import_lodash.merge({ name: configuration.widgetId, selected: true }, configuration.initialValues);
|
|
5539
5538
|
var widgetsContext = import_react.default.createContext({
|
|
5540
5539
|
widgets: {},
|
|
5541
5540
|
activeWidget: null,
|
|
@@ -5692,6 +5691,7 @@ var RemoraidBreakpoint;
|
|
|
5692
5691
|
var RemoraidIconSize;
|
|
5693
5692
|
((RemoraidIconSize2) => {
|
|
5694
5693
|
RemoraidIconSize2["Tiny"] = "tiny";
|
|
5694
|
+
RemoraidIconSize2["Small"] = "small";
|
|
5695
5695
|
RemoraidIconSize2["Medium"] = "medium";
|
|
5696
5696
|
})(RemoraidIconSize ||= {});
|
|
5697
5697
|
var LayoutType;
|
|
@@ -5743,6 +5743,12 @@ var asElementOrPropsOfType = (type, elementOrProps, additionalErrorMessage) => {
|
|
|
5743
5743
|
}
|
|
5744
5744
|
return elementOrProps;
|
|
5745
5745
|
};
|
|
5746
|
+
var getDefaultButtonIconSize = (buttonSize) => {
|
|
5747
|
+
if (buttonSize === "xs") {
|
|
5748
|
+
return "small" /* Small */;
|
|
5749
|
+
}
|
|
5750
|
+
return "medium" /* Medium */;
|
|
5751
|
+
};
|
|
5746
5752
|
|
|
5747
5753
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
|
5748
5754
|
var import_core2 = require("@mantine/core");
|
|
@@ -5785,22 +5791,18 @@ function HydrationStatusProvider({
|
|
|
5785
5791
|
}
|
|
5786
5792
|
|
|
5787
5793
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
|
5794
|
+
var import_lodash2 = __toESM(require_lodash());
|
|
5788
5795
|
var jsx_dev_runtime3 = require("react/jsx-dev-runtime");
|
|
5789
|
-
var isMantinePrimaryShade = (primaryShade) => {
|
|
5790
|
-
if (isNaN(Number(primaryShade))) {
|
|
5791
|
-
return true;
|
|
5792
|
-
}
|
|
5793
|
-
return false;
|
|
5794
|
-
};
|
|
5795
5796
|
var createRemoraidTheme = (customTheme, dependencies) => {
|
|
5796
5797
|
const { mantineTheme, colorScheme } = dependencies ?? {};
|
|
5797
|
-
const
|
|
5798
|
-
|
|
5799
|
-
|
|
5798
|
+
const transitionDurations = import_lodash2.merge({
|
|
5799
|
+
["short" /* Short */]: 200,
|
|
5800
|
+
["medium" /* Medium */]: 350,
|
|
5801
|
+
["long" /* Long */]: 500
|
|
5802
|
+
}, customTheme?.transitionDurations);
|
|
5803
|
+
const transparentBackground = customTheme?.transparentBackground ?? (mantineTheme && colorScheme ? colorScheme === "dark" ? import_core2.rgba(mantineTheme.colors.dark[8], 0.8) : import_core2.rgba(mantineTheme.white, 0.8) : undefined);
|
|
5800
5804
|
let spacingPx;
|
|
5801
5805
|
if (mantineTheme && colorScheme) {
|
|
5802
|
-
transparentBackground = colorScheme === "dark" ? import_core2.rgba(mantineTheme.colors.dark[8], 0.8) : import_core2.rgba(mantineTheme.white, 0.8);
|
|
5803
|
-
primaryColor = mantineTheme.colors[mantineTheme.primaryColor][isMantinePrimaryShade(mantineTheme.primaryShade) ? mantineTheme.primaryShade[colorScheme === "auto" ? "light" : colorScheme] : mantineTheme.primaryShade];
|
|
5804
5806
|
spacingPx = {
|
|
5805
5807
|
xs: Number(co((v) => !Number.isNaN(v), Number(import_core2.px(mantineTheme.spacing.xs)), 0)),
|
|
5806
5808
|
sm: Number(co((v) => !Number.isNaN(v), Number(import_core2.px(mantineTheme.spacing.sm)), 0)),
|
|
@@ -5809,71 +5811,72 @@ var createRemoraidTheme = (customTheme, dependencies) => {
|
|
|
5809
5811
|
xl: Number(co((v) => !Number.isNaN(v), Number(import_core2.px(mantineTheme.spacing.xl)), 0))
|
|
5810
5812
|
};
|
|
5811
5813
|
}
|
|
5812
|
-
|
|
5814
|
+
const defaultTheme = {
|
|
5813
5815
|
containerSize: 1300,
|
|
5814
5816
|
jsonStringifySpace: 2,
|
|
5815
5817
|
transparentBackground,
|
|
5816
|
-
primaryColor,
|
|
5817
5818
|
spacingPx,
|
|
5818
|
-
|
|
5819
|
-
transitionDurations: {
|
|
5820
|
-
["short" /* Short */]: 200,
|
|
5821
|
-
["medium" /* Medium */]: 350,
|
|
5822
|
-
["long" /* Long */]: 500,
|
|
5823
|
-
...customTheme?.transitionDurations
|
|
5824
|
-
},
|
|
5819
|
+
transitionDurations,
|
|
5825
5820
|
breakpoints: {
|
|
5826
5821
|
["buttonCollapse" /* ButtonCollapse */]: "md",
|
|
5827
|
-
["badgeGroupCollapse" /* BadgeGroupCollapse */]: "md"
|
|
5828
|
-
...customTheme?.breakpoints
|
|
5829
|
-
},
|
|
5830
|
-
scrollAreaProps: {
|
|
5831
|
-
scrollbarSize: 8,
|
|
5832
|
-
scrollHideDelay: 20,
|
|
5833
|
-
type: "hover",
|
|
5834
|
-
...customTheme?.scrollAreaProps
|
|
5822
|
+
["badgeGroupCollapse" /* BadgeGroupCollapse */]: "md"
|
|
5835
5823
|
},
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5824
|
+
primaryGutter: "md",
|
|
5825
|
+
componentsProps: {
|
|
5826
|
+
alerts: {
|
|
5827
|
+
["negative" /* Negative */]: {
|
|
5828
|
+
icon: import_icons_react.IconAlertCircle,
|
|
5829
|
+
color: "red",
|
|
5830
|
+
title: "Attention!"
|
|
5831
|
+
},
|
|
5832
|
+
["neutral" /* Neutral */]: {
|
|
5833
|
+
icon: import_icons_react.IconInfoCircle,
|
|
5834
|
+
color: mantineTheme?.primaryColor,
|
|
5835
|
+
title: "Information"
|
|
5836
|
+
},
|
|
5837
|
+
["positive" /* Positive */]: {
|
|
5838
|
+
icon: import_icons_react.IconCircleCheck,
|
|
5839
|
+
color: "green",
|
|
5840
|
+
title: "Success"
|
|
5841
|
+
}
|
|
5845
5842
|
},
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5843
|
+
icons: {
|
|
5844
|
+
["medium" /* Medium */]: {
|
|
5845
|
+
size: 20,
|
|
5846
|
+
stroke: 2
|
|
5847
|
+
},
|
|
5848
|
+
["small" /* Small */]: {
|
|
5849
|
+
size: 16,
|
|
5850
|
+
stroke: 2.3
|
|
5851
|
+
},
|
|
5852
|
+
["tiny" /* Tiny */]: {
|
|
5853
|
+
size: 12,
|
|
5854
|
+
stroke: 2.6
|
|
5855
|
+
}
|
|
5854
5856
|
},
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
variant: "light",
|
|
5860
|
-
color: "green",
|
|
5861
|
-
title: "Success",
|
|
5862
|
-
...customTheme?.alertProps?.positive
|
|
5863
|
-
}
|
|
5864
|
-
},
|
|
5865
|
-
iconProps: {
|
|
5866
|
-
["medium" /* Medium */]: {
|
|
5867
|
-
...defaultMediumIconProps,
|
|
5868
|
-
...customTheme?.iconProps?.medium
|
|
5857
|
+
ScrollArea: {
|
|
5858
|
+
scrollbarSize: 8,
|
|
5859
|
+
scrollHideDelay: 20,
|
|
5860
|
+
type: "hover"
|
|
5869
5861
|
},
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5862
|
+
HoverCard: {
|
|
5863
|
+
shadow: "md",
|
|
5864
|
+
withArrow: true,
|
|
5865
|
+
transitionProps: {
|
|
5866
|
+
transition: "pop",
|
|
5867
|
+
duration: transitionDurations.short
|
|
5868
|
+
},
|
|
5869
|
+
styles: {
|
|
5870
|
+
dropdown: { border: "none", background: transparentBackground },
|
|
5871
|
+
arrow: { border: "none" }
|
|
5872
|
+
}
|
|
5873
|
+
},
|
|
5874
|
+
Tooltip: {
|
|
5875
|
+
withArrow: true
|
|
5874
5876
|
}
|
|
5875
5877
|
}
|
|
5876
5878
|
};
|
|
5879
|
+
return import_lodash2.merge(defaultTheme, customTheme);
|
|
5877
5880
|
};
|
|
5878
5881
|
var themeContext = import_react4.default.createContext(createRemoraidTheme());
|
|
5879
5882
|
var useRemoraidTheme = () => {
|
|
@@ -5905,6 +5908,7 @@ var import_react_cookie2 = require("react-cookie");
|
|
|
5905
5908
|
var import_react6 = require("react");
|
|
5906
5909
|
|
|
5907
5910
|
// src/core/components/UserExperienceProviderWrapper/index.tsx
|
|
5911
|
+
var import_lodash3 = __toESM(require_lodash());
|
|
5908
5912
|
var import_react5 = require("react");
|
|
5909
5913
|
var import_react_cookie = require("react-cookie");
|
|
5910
5914
|
var jsx_dev_runtime4 = require("react/jsx-dev-runtime");
|
|
@@ -5923,10 +5927,7 @@ function UserExperienceProviderWrapper({
|
|
|
5923
5927
|
initialValue
|
|
5924
5928
|
}) {
|
|
5925
5929
|
const [cookies, setCookie] = import_react_cookie.useCookies();
|
|
5926
|
-
|
|
5927
|
-
if (typeof initialValue === "object" && typeof initialUserExperience === "object") {
|
|
5928
|
-
initialUserExperience = { ...initialUserExperience, ...initialValue };
|
|
5929
|
-
}
|
|
5930
|
+
const initialUserExperience = import_lodash3.merge(defaultUserExperience, initialValue);
|
|
5930
5931
|
const [userExperience, setUserExperience] = import_react5.useState(initialUserExperience);
|
|
5931
5932
|
const [processedCookie, setProcessedCookie] = import_react5.useState(false);
|
|
5932
5933
|
const updateUserExperience = (p) => {
|
|
@@ -6088,6 +6089,7 @@ function NavbarLink({
|
|
|
6088
6089
|
href,
|
|
6089
6090
|
indicator
|
|
6090
6091
|
}) {
|
|
6092
|
+
const theme = useRemoraidTheme();
|
|
6091
6093
|
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] = import_react9.useState(false);
|
|
6092
6094
|
const iconProps = {
|
|
6093
6095
|
size: iconSize,
|
|
@@ -6096,9 +6098,9 @@ function NavbarLink({
|
|
|
6096
6098
|
const Icon2 = icon ?? import_icons_react2.IconLink;
|
|
6097
6099
|
if (!href) {
|
|
6098
6100
|
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(import_core3.Tooltip, {
|
|
6101
|
+
...theme.componentsProps.Tooltip,
|
|
6099
6102
|
label,
|
|
6100
6103
|
position: "right",
|
|
6101
|
-
transitionProps: { duration: 0 },
|
|
6102
6104
|
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(import_core3.UnstyledButton, {
|
|
6103
6105
|
onClick,
|
|
6104
6106
|
className: "remoraid-navbar-minimal-link",
|
|
@@ -6124,9 +6126,9 @@ function NavbarLink({
|
|
|
6124
6126
|
}, undefined, false, undefined, this)
|
|
6125
6127
|
}, undefined, false, undefined, this);
|
|
6126
6128
|
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(import_core3.Tooltip, {
|
|
6129
|
+
...theme.componentsProps.Tooltip,
|
|
6127
6130
|
label,
|
|
6128
6131
|
position: "right",
|
|
6129
|
-
transitionProps: { duration: 0 },
|
|
6130
6132
|
children: indicator === undefined ? button : /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(import_core3.Indicator, {
|
|
6131
6133
|
withBorder: true,
|
|
6132
6134
|
size: 13,
|
|
@@ -6323,7 +6325,7 @@ function PageContainer({
|
|
|
6323
6325
|
}
|
|
6324
6326
|
|
|
6325
6327
|
// src/core/components/FrameLayout/Element/index.tsx
|
|
6326
|
-
var
|
|
6328
|
+
var import_lodash4 = __toESM(require_lodash());
|
|
6327
6329
|
var jsx_dev_runtime12 = require("react/jsx-dev-runtime");
|
|
6328
6330
|
function Element2({
|
|
6329
6331
|
section,
|
|
@@ -6363,7 +6365,7 @@ function Element2({
|
|
|
6363
6365
|
target: layout.sections[section],
|
|
6364
6366
|
children: includeContainer ? /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(import_core6.Box, {
|
|
6365
6367
|
"data-hidden": hidden,
|
|
6366
|
-
...
|
|
6368
|
+
...import_lodash4.merge(containerProps, componentsProps?.container),
|
|
6367
6369
|
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
6368
6370
|
children: element
|
|
6369
6371
|
}, undefined, false, undefined, this) : element
|
|
@@ -6371,6 +6373,7 @@ function Element2({
|
|
|
6371
6373
|
}
|
|
6372
6374
|
|
|
6373
6375
|
// src/core/components/FrameLayout/index.tsx
|
|
6376
|
+
var import_lodash5 = __toESM(require_lodash());
|
|
6374
6377
|
var jsx_dev_runtime13 = require("react/jsx-dev-runtime");
|
|
6375
6378
|
var layoutContext = import_react10.createContext(null);
|
|
6376
6379
|
var useFrameLayout = () => {
|
|
@@ -6485,8 +6488,7 @@ function FrameLayout({
|
|
|
6485
6488
|
}, undefined, false, undefined, this),
|
|
6486
6489
|
includeScrollArea ? /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(import_core7.ScrollArea, {
|
|
6487
6490
|
flex: 1,
|
|
6488
|
-
...theme.
|
|
6489
|
-
...componentsProps?.ScrollArea,
|
|
6491
|
+
...import_lodash5.merge({}, theme.componentsProps.ScrollArea, componentsProps?.ScrollArea),
|
|
6490
6492
|
children: contentSection
|
|
6491
6493
|
}, undefined, false, undefined, this) : contentSection,
|
|
6492
6494
|
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(import_core7.Stack, {
|
|
@@ -6516,7 +6518,7 @@ var FrameLayout_default = Object.assign(FrameLayout, {
|
|
|
6516
6518
|
});
|
|
6517
6519
|
|
|
6518
6520
|
// src/core/components/AppShell/index.tsx
|
|
6519
|
-
var
|
|
6521
|
+
var import_lodash6 = __toESM(require_lodash());
|
|
6520
6522
|
var jsx_dev_runtime14 = require("react/jsx-dev-runtime");
|
|
6521
6523
|
var remoraidAppShellLayoutId = "remoraid-app-shell";
|
|
6522
6524
|
var defaultAppShellNavbarPositions = { ["minimal" /* Minimal */]: "left" /* Left */ };
|
|
@@ -6526,7 +6528,7 @@ function AppShell({
|
|
|
6526
6528
|
footerVariant: footerVariantProp,
|
|
6527
6529
|
navbarPosition: navbarPositionProp,
|
|
6528
6530
|
footerPosition: footerPositionProp,
|
|
6529
|
-
gutter
|
|
6531
|
+
gutter,
|
|
6530
6532
|
appContext: appContext2,
|
|
6531
6533
|
componentsProps,
|
|
6532
6534
|
children
|
|
@@ -6535,6 +6537,7 @@ function AppShell({
|
|
|
6535
6537
|
const footerVariant = footerVariantProp ?? null;
|
|
6536
6538
|
const navbarPosition = navbarPositionProp ?? (navbarVariant === null ? null : defaultAppShellNavbarPositions[navbarVariant]);
|
|
6537
6539
|
const footerPosition = footerPositionProp ?? (footerVariant === null ? null : defaultAppShellFooterPositions[footerVariant]);
|
|
6540
|
+
const theme = useRemoraidTheme();
|
|
6538
6541
|
let navbar;
|
|
6539
6542
|
let footer;
|
|
6540
6543
|
let navbarLayoutElementProps = {
|
|
@@ -6562,19 +6565,19 @@ function AppShell({
|
|
|
6562
6565
|
...componentsProps?.container,
|
|
6563
6566
|
children: /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(FrameLayout_default, {
|
|
6564
6567
|
layoutId: remoraidAppShellLayoutId,
|
|
6565
|
-
gutter,
|
|
6568
|
+
gutter: gutter ?? theme.primaryGutter,
|
|
6566
6569
|
...componentsProps?.layout,
|
|
6567
6570
|
children: [
|
|
6568
6571
|
navbarPosition !== null && /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(FrameLayout_default.Element, {
|
|
6569
6572
|
section: navbarPosition,
|
|
6570
6573
|
includeContainer: false,
|
|
6571
|
-
...
|
|
6574
|
+
...import_lodash6.merge(navbarLayoutElementProps, componentsProps?.navbarLayoutElement),
|
|
6572
6575
|
children: navbar
|
|
6573
6576
|
}, undefined, false, undefined, this),
|
|
6574
6577
|
children,
|
|
6575
6578
|
footerPosition !== null && /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(FrameLayout_default.Element, {
|
|
6576
6579
|
section: footerPosition,
|
|
6577
|
-
...
|
|
6580
|
+
...import_lodash6.merge(footerLayoutElementProps, componentsProps?.footerLayoutElement),
|
|
6578
6581
|
children: footer
|
|
6579
6582
|
}, undefined, false, undefined, this)
|
|
6580
6583
|
]
|
|
@@ -6587,9 +6590,10 @@ var AppShell_default = Object.assign(AppShell, {
|
|
|
6587
6590
|
FooterMinimal
|
|
6588
6591
|
});
|
|
6589
6592
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
6590
|
-
var
|
|
6593
|
+
var import_core11 = require("@mantine/core");
|
|
6591
6594
|
|
|
6592
6595
|
// src/core/components/Page/index.tsx
|
|
6596
|
+
var import_core9 = require("@mantine/core");
|
|
6593
6597
|
var import_react11 = __toESM(require("react"));
|
|
6594
6598
|
var import_navigation2 = require("next/navigation");
|
|
6595
6599
|
var jsx_dev_runtime15 = require("react/jsx-dev-runtime");
|
|
@@ -6601,9 +6605,10 @@ function Page({
|
|
|
6601
6605
|
children,
|
|
6602
6606
|
name,
|
|
6603
6607
|
config,
|
|
6604
|
-
|
|
6608
|
+
gap,
|
|
6605
6609
|
componentsProps
|
|
6606
6610
|
}) {
|
|
6611
|
+
const theme = useRemoraidTheme();
|
|
6607
6612
|
const pathname = import_navigation2.usePathname();
|
|
6608
6613
|
const { isPageRegistered, registerPage } = useWidgets();
|
|
6609
6614
|
const pageId = config?.pageId ?? pathname;
|
|
@@ -6617,9 +6622,13 @@ function Page({
|
|
|
6617
6622
|
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(pageContext.Provider, {
|
|
6618
6623
|
value: { name: name ?? pathname, pageId, ...config },
|
|
6619
6624
|
children: /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(PageContainer, {
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6625
|
+
...componentsProps?.PageContainer,
|
|
6626
|
+
children: /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core9.Stack, {
|
|
6627
|
+
gap: gap ?? theme.primaryGutter,
|
|
6628
|
+
...componentsProps?.Stack,
|
|
6629
|
+
className: clsx_default("remoraid-page", componentsProps?.Stack?.className),
|
|
6630
|
+
children
|
|
6631
|
+
}, undefined, false, undefined, this)
|
|
6623
6632
|
}, undefined, false, undefined, this)
|
|
6624
6633
|
}, undefined, false, undefined, this);
|
|
6625
6634
|
}
|
|
@@ -6628,7 +6637,8 @@ function Page({
|
|
|
6628
6637
|
var import_icons_react4 = require("@tabler/icons-react");
|
|
6629
6638
|
|
|
6630
6639
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
6631
|
-
var
|
|
6640
|
+
var import_core10 = require("@mantine/core");
|
|
6641
|
+
var import_lodash7 = __toESM(require_lodash());
|
|
6632
6642
|
var jsx_dev_runtime16 = require("react/jsx-dev-runtime");
|
|
6633
6643
|
function ScrollableChipGroup({
|
|
6634
6644
|
value,
|
|
@@ -6637,17 +6647,16 @@ function ScrollableChipGroup({
|
|
|
6637
6647
|
componentsProps,
|
|
6638
6648
|
children: childrenProp
|
|
6639
6649
|
}) {
|
|
6640
|
-
const children = asChildrenOfType(
|
|
6650
|
+
const children = asChildrenOfType(import_core10.Chip, childrenProp, "Check children passed to 'ScrollableChipGroup' component.");
|
|
6641
6651
|
const theme = useRemoraidTheme();
|
|
6642
|
-
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(
|
|
6643
|
-
...theme.
|
|
6644
|
-
|
|
6645
|
-
children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(import_core9.Chip.Group, {
|
|
6652
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(import_core10.ScrollArea, {
|
|
6653
|
+
...import_lodash7.merge({}, theme.componentsProps.ScrollArea, componentsProps?.ScrollArea),
|
|
6654
|
+
children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(import_core10.Chip.Group, {
|
|
6646
6655
|
value,
|
|
6647
6656
|
onChange,
|
|
6648
6657
|
...componentsProps?.chipGroup,
|
|
6649
6658
|
multiple: true,
|
|
6650
|
-
children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(
|
|
6659
|
+
children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(import_core10.Flex, {
|
|
6651
6660
|
justify: "flex-start",
|
|
6652
6661
|
align: "center",
|
|
6653
6662
|
gap: gap ?? "xs",
|
|
@@ -6673,18 +6682,18 @@ function WidgetSelectionHeader({
|
|
|
6673
6682
|
throw new InvalidComponentUsageError("WidgetSelectionHeader", "must be used as child of 'Page'.");
|
|
6674
6683
|
}
|
|
6675
6684
|
const widgets = widgetsContext2.widgets[page.pageId] ?? {};
|
|
6676
|
-
return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(
|
|
6685
|
+
return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core11.Flex, {
|
|
6677
6686
|
justify: "flex-start",
|
|
6678
6687
|
align: "center",
|
|
6679
6688
|
gap: "xs",
|
|
6680
6689
|
mt,
|
|
6681
6690
|
children: [
|
|
6682
|
-
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(
|
|
6691
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core11.Text, {
|
|
6683
6692
|
size: "lg",
|
|
6684
6693
|
fw: 400,
|
|
6685
6694
|
children: title ?? page.name
|
|
6686
6695
|
}, undefined, false, undefined, this),
|
|
6687
|
-
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(
|
|
6696
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core11.Divider, {
|
|
6688
6697
|
orientation: "vertical"
|
|
6689
6698
|
}, undefined, false, undefined, this),
|
|
6690
6699
|
isPageRegistered(page.pageId) && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(ScrollableChipGroup, {
|
|
@@ -6692,15 +6701,15 @@ function WidgetSelectionHeader({
|
|
|
6692
6701
|
onChange: (value) => {
|
|
6693
6702
|
updateWidgetSelectionBulk(page.pageId, value);
|
|
6694
6703
|
},
|
|
6695
|
-
componentsProps: {
|
|
6704
|
+
componentsProps: { ScrollArea: { flex: 1 } },
|
|
6696
6705
|
children: Object.keys(widgets).map((widgetId) => {
|
|
6697
6706
|
const widget = widgets[widgetId] ?? getDefaultWidgetContext({ widgetId });
|
|
6698
|
-
return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(
|
|
6707
|
+
return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core11.Chip, {
|
|
6699
6708
|
value: widgetId,
|
|
6700
6709
|
size: "sm",
|
|
6701
6710
|
disabled: disabledWidgets && disabledWidgets.includes(widgetId),
|
|
6702
6711
|
icon: /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_icons_react4.IconCheck, {
|
|
6703
|
-
...theme.
|
|
6712
|
+
...theme.componentsProps.icons.small
|
|
6704
6713
|
}, undefined, false, undefined, this),
|
|
6705
6714
|
children: widget.name
|
|
6706
6715
|
}, widgetId, false, undefined, this);
|
|
@@ -6710,11 +6719,12 @@ function WidgetSelectionHeader({
|
|
|
6710
6719
|
}, undefined, true, undefined, this);
|
|
6711
6720
|
}
|
|
6712
6721
|
// src/core/components/BadgeGroup/index.tsx
|
|
6713
|
-
var
|
|
6722
|
+
var import_core13 = require("@mantine/core");
|
|
6714
6723
|
var import_react12 = __toESM(require("react"));
|
|
6715
6724
|
|
|
6716
6725
|
// src/core/components/BadgeMinimal/index.tsx
|
|
6717
|
-
var
|
|
6726
|
+
var import_core12 = require("@mantine/core");
|
|
6727
|
+
var import_lodash8 = __toESM(require_lodash());
|
|
6718
6728
|
var jsx_dev_runtime18 = require("react/jsx-dev-runtime");
|
|
6719
6729
|
function BadgeMinimal({
|
|
6720
6730
|
label,
|
|
@@ -6723,17 +6733,15 @@ function BadgeMinimal({
|
|
|
6723
6733
|
componentsProps
|
|
6724
6734
|
}) {
|
|
6725
6735
|
const theme = useRemoraidTheme();
|
|
6726
|
-
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(
|
|
6736
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core12.Transition, {
|
|
6727
6737
|
mounted,
|
|
6728
6738
|
transition: "fade",
|
|
6729
6739
|
duration: theme.transitionDurations.short,
|
|
6730
6740
|
timingFunction: "ease",
|
|
6731
6741
|
...componentsProps?.transition,
|
|
6732
|
-
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(
|
|
6733
|
-
disabled: !tooltip,
|
|
6734
|
-
|
|
6735
|
-
...componentsProps?.tooltip,
|
|
6736
|
-
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core11.Badge, {
|
|
6742
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core12.Tooltip, {
|
|
6743
|
+
...import_lodash8.merge({}, theme.componentsProps.Tooltip, { label: tooltip, disabled: !Boolean(tooltip) }, componentsProps?.tooltip),
|
|
6744
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core12.Badge, {
|
|
6737
6745
|
variant: "default",
|
|
6738
6746
|
...componentsProps?.badge,
|
|
6739
6747
|
style: {
|
|
@@ -6748,84 +6756,112 @@ function BadgeMinimal({
|
|
|
6748
6756
|
}
|
|
6749
6757
|
|
|
6750
6758
|
// src/core/components/BadgeGroup/index.tsx
|
|
6759
|
+
var import_lodash9 = __toESM(require_lodash());
|
|
6751
6760
|
var jsx_dev_runtime19 = require("react/jsx-dev-runtime");
|
|
6752
6761
|
var react = require("react");
|
|
6753
6762
|
function BadgeGroup({
|
|
6754
6763
|
badges: badgesProp,
|
|
6755
|
-
gap,
|
|
6756
|
-
breakpoint,
|
|
6764
|
+
gap = "xs",
|
|
6765
|
+
breakpoint: breakpointProp,
|
|
6757
6766
|
componentsProps
|
|
6758
6767
|
}) {
|
|
6759
|
-
const theme = useRemoraidTheme();
|
|
6760
6768
|
const badges = badgesProp.map((badge) => asElementOrPropsOfType(BadgeMinimal, badge, "Check 'badges' property passed to 'BadgeGroup'."));
|
|
6769
|
+
const theme = useRemoraidTheme();
|
|
6770
|
+
const breakpoint = breakpointProp ?? theme.breakpoints.badgeGroupCollapse;
|
|
6761
6771
|
const numVisibleBadges = badges.filter((badge) => isValidElementOfType(BadgeMinimal, badge) ? badge.props.mounted : badge.mounted !== false).length;
|
|
6772
|
+
const badgesElement = badges.map((badge, i) => {
|
|
6773
|
+
if (isValidElementOfType(BadgeMinimal, badge)) {
|
|
6774
|
+
return badge;
|
|
6775
|
+
}
|
|
6776
|
+
return /* @__PURE__ */ react.createElement(BadgeMinimal, {
|
|
6777
|
+
...badge,
|
|
6778
|
+
key: i
|
|
6779
|
+
});
|
|
6780
|
+
});
|
|
6762
6781
|
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
|
|
6763
6782
|
children: [
|
|
6764
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(
|
|
6765
|
-
gap
|
|
6783
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core13.Group, {
|
|
6784
|
+
gap,
|
|
6766
6785
|
wrap: "nowrap",
|
|
6767
|
-
visibleFrom: breakpoint
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
} else if (import_react12.isValidElement(badge)) {
|
|
6772
|
-
throw new TypeError(`Expected React element of type ${BadgeMinimal.name}, but received type: ${typeof badge.type === "string" ? badge.type : badge.type?.name ?? "unknown"}. Check the 'badges' property of this widget.`);
|
|
6773
|
-
}
|
|
6774
|
-
return /* @__PURE__ */ react.createElement(BadgeMinimal, {
|
|
6775
|
-
...badge,
|
|
6776
|
-
key: i
|
|
6777
|
-
});
|
|
6778
|
-
})
|
|
6786
|
+
visibleFrom: numVisibleBadges > 1 ? breakpoint : undefined,
|
|
6787
|
+
...componentsProps?.container,
|
|
6788
|
+
className: clsx_default("remoraid-badge-group", componentsProps?.container?.className),
|
|
6789
|
+
children: badgesElement
|
|
6779
6790
|
}, undefined, false, undefined, this),
|
|
6780
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6791
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core13.Transition, {
|
|
6792
|
+
mounted: numVisibleBadges > 1,
|
|
6793
|
+
transition: "fade",
|
|
6794
|
+
duration: theme.transitionDurations.short,
|
|
6795
|
+
timingFunction: "ease",
|
|
6796
|
+
...componentsProps?.cumulativeBadgeTransition,
|
|
6797
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core13.HoverCard, {
|
|
6798
|
+
...import_lodash9.merge({}, theme.componentsProps.HoverCard, componentsProps?.HoverCard),
|
|
6799
|
+
children: [
|
|
6800
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core13.HoverCard.Target, {
|
|
6801
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core13.Badge, {
|
|
6802
|
+
hiddenFrom: breakpoint,
|
|
6803
|
+
variant: "dot",
|
|
6804
|
+
...componentsProps?.cumulativeBadge,
|
|
6805
|
+
style: {
|
|
6806
|
+
cursor: "pointer",
|
|
6807
|
+
...import_lodash9.merge(transitionStyle, componentsProps?.cumulativeBadge?.style)
|
|
6808
|
+
},
|
|
6809
|
+
children: [
|
|
6810
|
+
numVisibleBadges,
|
|
6811
|
+
" badges"
|
|
6812
|
+
]
|
|
6813
|
+
}, undefined, true, undefined, this)
|
|
6814
|
+
}, undefined, false, undefined, this),
|
|
6815
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core13.HoverCard.Dropdown, {
|
|
6816
|
+
p: gap,
|
|
6817
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core13.Stack, {
|
|
6818
|
+
gap,
|
|
6819
|
+
...componentsProps?.hoverContainer,
|
|
6820
|
+
children: badgesElement
|
|
6821
|
+
}, undefined, false, undefined, this)
|
|
6822
|
+
}, undefined, false, undefined, this)
|
|
6823
|
+
]
|
|
6824
|
+
}, undefined, true, undefined, this)
|
|
6792
6825
|
}, undefined, false, undefined, this)
|
|
6793
6826
|
]
|
|
6794
6827
|
}, undefined, true, undefined, this);
|
|
6795
6828
|
}
|
|
6796
6829
|
// src/core/components/AlertMinimal/index.tsx
|
|
6797
|
-
var
|
|
6830
|
+
var import_core14 = require("@mantine/core");
|
|
6831
|
+
var import_lodash10 = __toESM(require_lodash());
|
|
6798
6832
|
var jsx_dev_runtime20 = require("react/jsx-dev-runtime");
|
|
6799
6833
|
function AlertMinimal({
|
|
6800
|
-
title,
|
|
6801
6834
|
category,
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
mounted = true,
|
|
6805
|
-
mt,
|
|
6806
|
-
mb,
|
|
6807
|
-
componentsProps,
|
|
6808
|
-
children
|
|
6835
|
+
children,
|
|
6836
|
+
...props
|
|
6809
6837
|
}) {
|
|
6810
6838
|
const theme = useRemoraidTheme();
|
|
6811
|
-
|
|
6812
|
-
|
|
6839
|
+
const {
|
|
6840
|
+
title,
|
|
6841
|
+
text,
|
|
6842
|
+
color,
|
|
6843
|
+
onClose,
|
|
6844
|
+
mounted = true,
|
|
6845
|
+
icon: Icon2,
|
|
6846
|
+
iconSize = "medium" /* Medium */,
|
|
6847
|
+
componentsProps
|
|
6848
|
+
} = import_lodash10.merge({}, theme.componentsProps.alerts[category], props);
|
|
6849
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(import_core14.Transition, {
|
|
6850
|
+
mounted,
|
|
6813
6851
|
transition: "fade",
|
|
6814
6852
|
duration: theme.transitionDurations.short,
|
|
6815
6853
|
timingFunction: "ease",
|
|
6816
6854
|
...componentsProps?.transition,
|
|
6817
|
-
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6855
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(import_core14.Alert, {
|
|
6856
|
+
title,
|
|
6857
|
+
color,
|
|
6858
|
+
variant: "light",
|
|
6821
6859
|
onClose,
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
...componentsProps?.alert?.style ?? theme.alertProps[category].style
|
|
6828
|
-
},
|
|
6860
|
+
withCloseButton: onClose !== undefined,
|
|
6861
|
+
icon: Icon2 ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Icon2, {
|
|
6862
|
+
...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6863
|
+
}, undefined, false, undefined, this) : undefined,
|
|
6864
|
+
style: import_lodash10.merge(transitionStyle, componentsProps?.alert?.style),
|
|
6829
6865
|
children: [
|
|
6830
6866
|
text,
|
|
6831
6867
|
children
|
|
@@ -6834,33 +6870,35 @@ function AlertMinimal({
|
|
|
6834
6870
|
}, undefined, false, undefined, this);
|
|
6835
6871
|
}
|
|
6836
6872
|
// src/core/components/RemoraidButton/index.tsx
|
|
6837
|
-
var
|
|
6873
|
+
var import_core15 = require("@mantine/core");
|
|
6838
6874
|
var import_icons_react5 = require("@tabler/icons-react");
|
|
6839
|
-
var
|
|
6875
|
+
var import_lodash11 = __toESM(require_lodash());
|
|
6840
6876
|
var jsx_dev_runtime21 = require("react/jsx-dev-runtime");
|
|
6841
6877
|
function RemoraidButton({
|
|
6842
6878
|
label,
|
|
6843
6879
|
responsive: ResponsiveProp,
|
|
6844
6880
|
breakpoint: breakpointProp,
|
|
6845
6881
|
collapsed: collapsedProp,
|
|
6846
|
-
size,
|
|
6882
|
+
size = "sm",
|
|
6847
6883
|
color,
|
|
6848
6884
|
onClick,
|
|
6849
6885
|
loading,
|
|
6850
6886
|
variant = "default",
|
|
6851
6887
|
mounted = true,
|
|
6852
6888
|
icon: iconProp,
|
|
6853
|
-
iconSize
|
|
6889
|
+
iconSize: iconSizeProp,
|
|
6854
6890
|
componentsProps
|
|
6855
6891
|
}) {
|
|
6856
6892
|
const responsive = ResponsiveProp ?? true;
|
|
6857
6893
|
const breakpoint = breakpointProp ?? "md";
|
|
6858
6894
|
const collapsed = collapsedProp ?? false;
|
|
6859
|
-
const
|
|
6895
|
+
const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
|
|
6896
|
+
const Icon3 = iconProp ?? import_icons_react5.IconClick;
|
|
6860
6897
|
const theme = useRemoraidTheme();
|
|
6861
|
-
const
|
|
6862
|
-
|
|
6863
|
-
|
|
6898
|
+
const iconElement = /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Icon3, {
|
|
6899
|
+
...import_lodash11.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6900
|
+
}, undefined, false, undefined, this);
|
|
6901
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(import_core15.Transition, {
|
|
6864
6902
|
mounted,
|
|
6865
6903
|
transition: "fade",
|
|
6866
6904
|
duration: theme.transitionDurations.short,
|
|
@@ -6868,10 +6906,9 @@ function RemoraidButton({
|
|
|
6868
6906
|
...componentsProps?.transition,
|
|
6869
6907
|
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(jsx_dev_runtime21.Fragment, {
|
|
6870
6908
|
children: [
|
|
6871
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(
|
|
6872
|
-
label,
|
|
6873
|
-
|
|
6874
|
-
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(import_core14.ActionIcon, {
|
|
6909
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(import_core15.Tooltip, {
|
|
6910
|
+
...import_lodash11.merge({}, theme.componentsProps.Tooltip, { label }, componentsProps?.tooltip),
|
|
6911
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(import_core15.ActionIcon, {
|
|
6875
6912
|
"aria-label": label,
|
|
6876
6913
|
variant,
|
|
6877
6914
|
onClick,
|
|
@@ -6889,7 +6926,7 @@ function RemoraidButton({
|
|
|
6889
6926
|
children: iconElement
|
|
6890
6927
|
}, undefined, false, undefined, this)
|
|
6891
6928
|
}, undefined, false, undefined, this),
|
|
6892
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(
|
|
6929
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(import_core15.Button, {
|
|
6893
6930
|
onClick,
|
|
6894
6931
|
loading,
|
|
6895
6932
|
variant,
|
|
@@ -6911,8 +6948,9 @@ function RemoraidButton({
|
|
|
6911
6948
|
}, undefined, false, undefined, this);
|
|
6912
6949
|
}
|
|
6913
6950
|
// src/core/components/Controls/ControlButton/index.tsx
|
|
6914
|
-
var
|
|
6951
|
+
var import_core16 = require("@mantine/core");
|
|
6915
6952
|
var import_icons_react6 = require("@tabler/icons-react");
|
|
6953
|
+
var import_lodash12 = __toESM(require_lodash());
|
|
6916
6954
|
var jsx_dev_runtime22 = require("react/jsx-dev-runtime");
|
|
6917
6955
|
function ControlButton({
|
|
6918
6956
|
icon: Icon4 = import_icons_react6.IconClick,
|
|
@@ -6926,17 +6964,15 @@ function ControlButton({
|
|
|
6926
6964
|
componentsProps
|
|
6927
6965
|
}) {
|
|
6928
6966
|
const theme = useRemoraidTheme();
|
|
6929
|
-
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(
|
|
6967
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(import_core16.Transition, {
|
|
6930
6968
|
mounted,
|
|
6931
|
-
transition: "
|
|
6969
|
+
transition: "fade",
|
|
6932
6970
|
duration: theme.transitionDurations.short,
|
|
6933
6971
|
timingFunction: "ease",
|
|
6934
6972
|
...componentsProps?.transition,
|
|
6935
|
-
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(
|
|
6936
|
-
label: tooltip,
|
|
6937
|
-
|
|
6938
|
-
...componentsProps?.tooltip,
|
|
6939
|
-
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(import_core15.ActionIcon, {
|
|
6973
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(import_core16.Tooltip, {
|
|
6974
|
+
...import_lodash12.merge({}, theme.componentsProps.Tooltip, { label: tooltip, disabled: !Boolean(tooltip) }, componentsProps?.tooltip),
|
|
6975
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(import_core16.ActionIcon, {
|
|
6940
6976
|
"data-control-button": true,
|
|
6941
6977
|
size,
|
|
6942
6978
|
color,
|
|
@@ -6944,13 +6980,11 @@ function ControlButton({
|
|
|
6944
6980
|
radius: "xl",
|
|
6945
6981
|
...componentsProps?.button,
|
|
6946
6982
|
style: {
|
|
6947
|
-
...transitionStyle,
|
|
6948
6983
|
order,
|
|
6949
|
-
...componentsProps?.button?.style
|
|
6984
|
+
...import_lodash12.merge(transitionStyle, componentsProps?.button?.style)
|
|
6950
6985
|
},
|
|
6951
6986
|
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Icon4, {
|
|
6952
|
-
...theme.
|
|
6953
|
-
...componentsProps?.icon
|
|
6987
|
+
...import_lodash12.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6954
6988
|
}, undefined, false, undefined, this)
|
|
6955
6989
|
}, undefined, false, undefined, this)
|
|
6956
6990
|
}, undefined, false, undefined, this)
|
|
@@ -6958,10 +6992,10 @@ function ControlButton({
|
|
|
6958
6992
|
}
|
|
6959
6993
|
|
|
6960
6994
|
// src/core/components/Controls/index.tsx
|
|
6961
|
-
var
|
|
6962
|
-
var
|
|
6995
|
+
var import_react13 = require("react");
|
|
6996
|
+
var import_core17 = require("@mantine/core");
|
|
6963
6997
|
var import_icons_react7 = require("@tabler/icons-react");
|
|
6964
|
-
var
|
|
6998
|
+
var import_lodash13 = __toESM(require_lodash());
|
|
6965
6999
|
var jsx_dev_runtime23 = require("react/jsx-dev-runtime");
|
|
6966
7000
|
function Controls({
|
|
6967
7001
|
groupRef,
|
|
@@ -6976,12 +7010,12 @@ function Controls({
|
|
|
6976
7010
|
const additionalButtons = additionalButtonsProp?.map((additionalButton) => asElementOrPropsOfType(ControlButton, additionalButton, "Check the 'additionalButtons' property of 'Controls'."));
|
|
6977
7011
|
const children = asChildrenOfType(ControlButton, childrenProp, "Check children passed to 'Controls' component.");
|
|
6978
7012
|
const theme = useRemoraidTheme();
|
|
6979
|
-
const [pos, setPos] =
|
|
7013
|
+
const [pos, setPos] = import_react13.useState({
|
|
6980
7014
|
x: 0,
|
|
6981
7015
|
y: 0
|
|
6982
7016
|
});
|
|
6983
|
-
const offsetRef =
|
|
6984
|
-
const containerRef =
|
|
7017
|
+
const offsetRef = import_react13.useRef({ x: 0, y: 0 });
|
|
7018
|
+
const containerRef = import_react13.useRef(null);
|
|
6985
7019
|
const clamp = (v, min, max) => {
|
|
6986
7020
|
return Math.min(Math.max(v, min), max);
|
|
6987
7021
|
};
|
|
@@ -7020,14 +7054,14 @@ function Controls({
|
|
|
7020
7054
|
const handlePointerUp = (e) => {
|
|
7021
7055
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
7022
7056
|
};
|
|
7023
|
-
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(
|
|
7057
|
+
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(import_core17.Transition, {
|
|
7024
7058
|
mounted,
|
|
7025
7059
|
keepMounted: true,
|
|
7026
7060
|
transition: "pop",
|
|
7027
7061
|
duration: theme.transitionDurations.short,
|
|
7028
7062
|
timingFunction: "ease",
|
|
7029
7063
|
...componentsProps?.transition,
|
|
7030
|
-
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(
|
|
7064
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(import_core17.Paper, {
|
|
7031
7065
|
ref: containerRef,
|
|
7032
7066
|
pos: "absolute",
|
|
7033
7067
|
p: gutter,
|
|
@@ -7040,10 +7074,10 @@ function Controls({
|
|
|
7040
7074
|
style: {
|
|
7041
7075
|
right: pos.x,
|
|
7042
7076
|
top: pos.y,
|
|
7043
|
-
...
|
|
7077
|
+
...import_lodash13.merge(transitionStyle, componentsProps?.container?.style)
|
|
7044
7078
|
},
|
|
7045
7079
|
className: clsx_default("remoraid-controls", componentsProps?.container?.className),
|
|
7046
|
-
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(
|
|
7080
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(import_core17.Group, {
|
|
7047
7081
|
gap: gutter,
|
|
7048
7082
|
ref: groupRef,
|
|
7049
7083
|
wrap: "nowrap",
|
|
@@ -7051,9 +7085,7 @@ function Controls({
|
|
|
7051
7085
|
className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
|
|
7052
7086
|
children: [
|
|
7053
7087
|
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(import_icons_react7.IconGripHorizontal, {
|
|
7054
|
-
order: -100,
|
|
7055
|
-
color: "var(--mantine-color-default-border)",
|
|
7056
|
-
...import_lodash3.merge(theme.iconProps[iconSize], componentsProps?.gripIcon)
|
|
7088
|
+
...import_lodash13.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
|
|
7057
7089
|
}, undefined, false, undefined, this),
|
|
7058
7090
|
children,
|
|
7059
7091
|
additionalButtons && additionalButtons.map((button, i) => {
|
|
@@ -7070,14 +7102,14 @@ function Controls({
|
|
|
7070
7102
|
}, undefined, false, undefined, this);
|
|
7071
7103
|
}
|
|
7072
7104
|
// src/core/components/Widget/WidgetWrapper/index.tsx
|
|
7073
|
-
var
|
|
7074
|
-
var
|
|
7105
|
+
var import_core19 = require("@mantine/core");
|
|
7106
|
+
var import_react15 = require("react");
|
|
7075
7107
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
7076
7108
|
|
|
7077
7109
|
// src/core/components/Pinnable/index.tsx
|
|
7078
|
-
var
|
|
7110
|
+
var import_react14 = require("react");
|
|
7079
7111
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
7080
|
-
var
|
|
7112
|
+
var import_core18 = require("@mantine/core");
|
|
7081
7113
|
var jsx_dev_runtime24 = require("react/jsx-dev-runtime");
|
|
7082
7114
|
function Pinnable({
|
|
7083
7115
|
layoutType: layoutTypeProp,
|
|
@@ -7091,13 +7123,13 @@ function Pinnable({
|
|
|
7091
7123
|
}) {
|
|
7092
7124
|
const layoutType = layoutTypeProp ?? "frame" /* Frame */;
|
|
7093
7125
|
const { layouts } = useLayouts();
|
|
7094
|
-
const [pinned, setPinned] =
|
|
7095
|
-
const containerRef =
|
|
7126
|
+
const [pinned, setPinned] = import_react14.useState(initialValue);
|
|
7127
|
+
const containerRef = import_react14.useRef(null);
|
|
7096
7128
|
const layout = layouts[layoutId ?? remoraidAppShellLayoutId];
|
|
7097
7129
|
if (layout && layout.type !== layoutType) {
|
|
7098
7130
|
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.`);
|
|
7099
7131
|
}
|
|
7100
|
-
const controlButton =
|
|
7132
|
+
const controlButton = import_react14.useMemo(() => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(ControlButton, {
|
|
7101
7133
|
icon: pinned ? import_icons_react8.IconPinnedOff : import_icons_react8.IconPin,
|
|
7102
7134
|
tooltip: pinned ? "Unpin" : "Pin",
|
|
7103
7135
|
color: "green",
|
|
@@ -7108,7 +7140,7 @@ function Pinnable({
|
|
|
7108
7140
|
componentsProps?.button?.onClick?.(e);
|
|
7109
7141
|
}
|
|
7110
7142
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
7111
|
-
const element = /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(
|
|
7143
|
+
const element = /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(import_core18.Box, {
|
|
7112
7144
|
pos: "relative",
|
|
7113
7145
|
ref: containerRef,
|
|
7114
7146
|
"data-hidden": hidden,
|
|
@@ -7119,7 +7151,7 @@ function Pinnable({
|
|
|
7119
7151
|
dragContainerRef: containerRef,
|
|
7120
7152
|
...componentsProps?.controls,
|
|
7121
7153
|
children: controlButton
|
|
7122
|
-
}, undefined, false, undefined, this) : controlsContainer !== null && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(
|
|
7154
|
+
}, undefined, false, undefined, this) : controlsContainer !== null && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(import_core18.Portal, {
|
|
7123
7155
|
target: controlsContainer,
|
|
7124
7156
|
children: controlButton
|
|
7125
7157
|
}, undefined, false, undefined, this),
|
|
@@ -7142,7 +7174,7 @@ function Pinnable({
|
|
|
7142
7174
|
}
|
|
7143
7175
|
|
|
7144
7176
|
// src/core/components/Widget/WidgetWrapper/index.tsx
|
|
7145
|
-
var
|
|
7177
|
+
var import_lodash14 = __toESM(require_lodash());
|
|
7146
7178
|
var jsx_dev_runtime25 = require("react/jsx-dev-runtime");
|
|
7147
7179
|
function WidgetWrapper({
|
|
7148
7180
|
config,
|
|
@@ -7164,11 +7196,11 @@ function WidgetWrapper({
|
|
|
7164
7196
|
const page = usePage();
|
|
7165
7197
|
const theme = useRemoraidTheme();
|
|
7166
7198
|
const mounted = page !== null && isWidgetSelected(page.pageId, config.widgetId);
|
|
7167
|
-
const [controlsContainer, setControlsContainer] =
|
|
7168
|
-
const [hidden, setHidden] =
|
|
7199
|
+
const [controlsContainer, setControlsContainer] = import_react15.useState(null);
|
|
7200
|
+
const [hidden, setHidden] = import_react15.useState(!mounted);
|
|
7169
7201
|
const pageRegistered = page ? isPageRegistered(page.pageId) : false;
|
|
7170
|
-
const containerRef =
|
|
7171
|
-
const controlsContainerRef =
|
|
7202
|
+
const containerRef = import_react15.useRef(null);
|
|
7203
|
+
const controlsContainerRef = import_react15.useCallback((n) => {
|
|
7172
7204
|
setControlsContainer(n);
|
|
7173
7205
|
}, [setControlsContainer]);
|
|
7174
7206
|
const handleEnter = () => {
|
|
@@ -7177,7 +7209,7 @@ function WidgetWrapper({
|
|
|
7177
7209
|
const handleLeave = () => {
|
|
7178
7210
|
updateActiveWidget(null);
|
|
7179
7211
|
};
|
|
7180
|
-
let element = /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(
|
|
7212
|
+
let element = /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(import_core19.Transition, {
|
|
7181
7213
|
mounted,
|
|
7182
7214
|
transition: "fade-left",
|
|
7183
7215
|
duration: theme.transitionDurations.medium,
|
|
@@ -7187,7 +7219,7 @@ function WidgetWrapper({
|
|
|
7187
7219
|
setHidden(true);
|
|
7188
7220
|
componentsProps?.transition?.onExited?.();
|
|
7189
7221
|
},
|
|
7190
|
-
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(
|
|
7222
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(import_core19.Paper, {
|
|
7191
7223
|
ref: containerRef,
|
|
7192
7224
|
p: "md",
|
|
7193
7225
|
shadow: "md",
|
|
@@ -7208,7 +7240,7 @@ function WidgetWrapper({
|
|
|
7208
7240
|
}
|
|
7209
7241
|
componentsProps?.container?.onMouseLeave?.(e);
|
|
7210
7242
|
},
|
|
7211
|
-
style:
|
|
7243
|
+
style: import_lodash14.merge(transitionStyle, componentsProps?.container?.style),
|
|
7212
7244
|
id: config.widgetId,
|
|
7213
7245
|
children: [
|
|
7214
7246
|
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Controls, {
|
|
@@ -7272,7 +7304,7 @@ function WidgetWrapper({
|
|
|
7272
7304
|
children: element
|
|
7273
7305
|
}, undefined, false, undefined, this);
|
|
7274
7306
|
}
|
|
7275
|
-
|
|
7307
|
+
import_react15.useEffect(() => {
|
|
7276
7308
|
if (!page) {
|
|
7277
7309
|
return;
|
|
7278
7310
|
}
|
|
@@ -7280,7 +7312,7 @@ function WidgetWrapper({
|
|
|
7280
7312
|
registerWidget(page.pageId, config);
|
|
7281
7313
|
}
|
|
7282
7314
|
}, [pageRegistered]);
|
|
7283
|
-
|
|
7315
|
+
import_react15.useEffect(() => {
|
|
7284
7316
|
if (mounted) {
|
|
7285
7317
|
const id = requestAnimationFrame(() => {
|
|
7286
7318
|
setHidden(false);
|
|
@@ -7293,7 +7325,7 @@ function WidgetWrapper({
|
|
|
7293
7325
|
return element;
|
|
7294
7326
|
}
|
|
7295
7327
|
// src/core/components/Widget/index.tsx
|
|
7296
|
-
var
|
|
7328
|
+
var import_core20 = require("@mantine/core");
|
|
7297
7329
|
var jsx_dev_runtime26 = require("react/jsx-dev-runtime");
|
|
7298
7330
|
var react2 = require("react");
|
|
7299
7331
|
function Widget({
|
|
@@ -7329,18 +7361,19 @@ function Widget({
|
|
|
7329
7361
|
...componentsProps?.wrapper,
|
|
7330
7362
|
pinnableSection: pinnableSection ?? componentsProps?.wrapper?.pinnableSection,
|
|
7331
7363
|
children: [
|
|
7332
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(
|
|
7364
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Group, {
|
|
7333
7365
|
justify: "space-between",
|
|
7334
7366
|
wrap: "nowrap",
|
|
7335
7367
|
children: [
|
|
7336
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(
|
|
7368
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Group, {
|
|
7337
7369
|
gap: badgesGap,
|
|
7338
7370
|
wrap: "nowrap",
|
|
7339
7371
|
children: [
|
|
7340
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(
|
|
7372
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Title, {
|
|
7341
7373
|
order: 1,
|
|
7342
|
-
size: "
|
|
7374
|
+
size: "h2",
|
|
7343
7375
|
lineClamp: 1,
|
|
7376
|
+
...componentsProps?.title,
|
|
7344
7377
|
children: title ?? id
|
|
7345
7378
|
}, undefined, false, undefined, this),
|
|
7346
7379
|
badges !== undefined && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(BadgeGroup, {
|
|
@@ -7350,7 +7383,7 @@ function Widget({
|
|
|
7350
7383
|
}, undefined, false, undefined, this)
|
|
7351
7384
|
]
|
|
7352
7385
|
}, undefined, true, undefined, this),
|
|
7353
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(
|
|
7386
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Group, {
|
|
7354
7387
|
gap: buttonsGap,
|
|
7355
7388
|
wrap: "nowrap",
|
|
7356
7389
|
children: buttons !== undefined && buttons.map((button, i) => {
|
|
@@ -7365,11 +7398,11 @@ function Widget({
|
|
|
7365
7398
|
}, undefined, false, undefined, this)
|
|
7366
7399
|
]
|
|
7367
7400
|
}, undefined, true, undefined, this),
|
|
7368
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(
|
|
7401
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Divider, {
|
|
7369
7402
|
my: "md",
|
|
7370
7403
|
...componentsProps?.divider
|
|
7371
7404
|
}, undefined, false, undefined, this),
|
|
7372
|
-
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(
|
|
7405
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Stack, {
|
|
7373
7406
|
align: "stretch",
|
|
7374
7407
|
gap: alertsGap,
|
|
7375
7408
|
mb: alerts && alerts.length > 0 ? "md" : 0,
|
|
@@ -7384,8 +7417,8 @@ function Widget({
|
|
|
7384
7417
|
});
|
|
7385
7418
|
})
|
|
7386
7419
|
}, undefined, false, undefined, this),
|
|
7387
|
-
loading ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(
|
|
7388
|
-
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(
|
|
7420
|
+
loading ? /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Center, {
|
|
7421
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(import_core20.Loader, {
|
|
7389
7422
|
...componentsProps?.loader
|
|
7390
7423
|
}, undefined, false, undefined, this)
|
|
7391
7424
|
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(jsx_dev_runtime26.Fragment, {
|
|
@@ -7395,7 +7428,6 @@ function Widget({
|
|
|
7395
7428
|
}, undefined, true, undefined, this);
|
|
7396
7429
|
}
|
|
7397
7430
|
// src/core/components/NotFoundPage/index.tsx
|
|
7398
|
-
var import_core20 = require("@mantine/core");
|
|
7399
7431
|
var import_navigation3 = require("next/navigation");
|
|
7400
7432
|
var jsx_dev_runtime27 = require("react/jsx-dev-runtime");
|
|
7401
7433
|
function NotFoundPage({
|
|
@@ -7404,13 +7436,12 @@ function NotFoundPage({
|
|
|
7404
7436
|
componentsProps
|
|
7405
7437
|
}) {
|
|
7406
7438
|
const pathname = import_navigation3.usePathname();
|
|
7407
|
-
const theme = useRemoraidTheme();
|
|
7408
7439
|
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Page, {
|
|
7409
7440
|
name: "Not Found",
|
|
7410
7441
|
...componentsProps?.page,
|
|
7411
7442
|
children: [
|
|
7412
|
-
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(
|
|
7413
|
-
|
|
7443
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(AlertMinimal, {
|
|
7444
|
+
category: "negative" /* Negative */,
|
|
7414
7445
|
title: "404 - Page Not Found",
|
|
7415
7446
|
children: message ?? `Could not find page ${pathname}.`
|
|
7416
7447
|
}, undefined, false, undefined, this),
|
|
@@ -7419,48 +7450,54 @@ function NotFoundPage({
|
|
|
7419
7450
|
}, undefined, true, undefined, this);
|
|
7420
7451
|
}
|
|
7421
7452
|
// src/core/components/EnvironmentShell/index.tsx
|
|
7422
|
-
var import_core21 = require("@mantine/core");
|
|
7423
7453
|
var jsx_dev_runtime28 = require("react/jsx-dev-runtime");
|
|
7454
|
+
var EnvironmentShellVariant;
|
|
7455
|
+
((EnvironmentShellVariant2) => {
|
|
7456
|
+
EnvironmentShellVariant2["Alert"] = "alert";
|
|
7457
|
+
EnvironmentShellVariant2["Error"] = "error";
|
|
7458
|
+
EnvironmentShellVariant2["Silent"] = "silent";
|
|
7459
|
+
})(EnvironmentShellVariant ||= {});
|
|
7424
7460
|
function EnvironmentShell({
|
|
7425
|
-
children,
|
|
7426
7461
|
environment,
|
|
7462
|
+
variant = "alert" /* Alert */,
|
|
7427
7463
|
message,
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
componentsProps
|
|
7464
|
+
includeAlertContainer = false,
|
|
7465
|
+
componentsProps,
|
|
7466
|
+
children
|
|
7432
7467
|
}) {
|
|
7433
|
-
const theme = useRemoraidTheme();
|
|
7434
7468
|
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
|
7435
|
-
const
|
|
7436
|
-
const
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
children: message ?? alertMessage
|
|
7469
|
+
const defaultMessage = `Components could not be rendered because the following environment variable${undefinedKeys.length > 1 ? "s" : ""} are not specified: ${undefinedKeys.join(", ")}.`;
|
|
7470
|
+
const alertElement = /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(AlertMinimal, {
|
|
7471
|
+
mounted: undefinedKeys.length > 0,
|
|
7472
|
+
title: `Please specify environment variable${undefinedKeys.length > 1 ? "s" : ""}`,
|
|
7473
|
+
category: "negative" /* Negative */,
|
|
7474
|
+
text: message ?? defaultMessage,
|
|
7475
|
+
...componentsProps?.alert
|
|
7443
7476
|
}, undefined, false, undefined, this);
|
|
7444
7477
|
if (undefinedKeys.length === 0) {
|
|
7445
|
-
return
|
|
7446
|
-
children
|
|
7447
|
-
}, undefined, false, undefined, this);
|
|
7478
|
+
return children;
|
|
7448
7479
|
}
|
|
7449
|
-
if (
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7480
|
+
if (variant === "alert" /* Alert */) {
|
|
7481
|
+
if (includeAlertContainer) {
|
|
7482
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(PageContainer, {
|
|
7483
|
+
...componentsProps?.alertContainer,
|
|
7484
|
+
children: alertElement
|
|
7485
|
+
}, undefined, false, undefined, this);
|
|
7486
|
+
}
|
|
7487
|
+
return alertElement;
|
|
7488
|
+
}
|
|
7489
|
+
if (variant === "error" /* Error */) {
|
|
7490
|
+
throw new ReferenceError(message ?? defaultMessage);
|
|
7454
7491
|
}
|
|
7455
|
-
return
|
|
7492
|
+
return null;
|
|
7456
7493
|
}
|
|
7457
7494
|
// src/core/components/SettingsWidget/index.tsx
|
|
7458
|
-
var
|
|
7495
|
+
var import_react16 = require("react");
|
|
7459
7496
|
var import_icons_react11 = require("@tabler/icons-react");
|
|
7460
7497
|
|
|
7461
7498
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
|
7462
7499
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
7463
|
-
var
|
|
7500
|
+
var import_core21 = require("@mantine/core");
|
|
7464
7501
|
var jsx_dev_runtime29 = require("react/jsx-dev-runtime");
|
|
7465
7502
|
function SaveButton({
|
|
7466
7503
|
onSaveChanges,
|
|
@@ -7483,7 +7520,7 @@ function SaveButton({
|
|
|
7483
7520
|
}
|
|
7484
7521
|
}, undefined, false, undefined, this);
|
|
7485
7522
|
if (insideContainer !== false) {
|
|
7486
|
-
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(
|
|
7523
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(import_core21.Group, {
|
|
7487
7524
|
w: "100%",
|
|
7488
7525
|
justify: "flex-end",
|
|
7489
7526
|
mt: "md",
|
|
@@ -7497,9 +7534,9 @@ function SaveButton({
|
|
|
7497
7534
|
// src/core/components/SettingsWidget/index.tsx
|
|
7498
7535
|
var jsx_dev_runtime30 = require("react/jsx-dev-runtime");
|
|
7499
7536
|
var defaultSettingsWidgetContext = {};
|
|
7500
|
-
var settingsWidgetContext =
|
|
7537
|
+
var settingsWidgetContext = import_react16.createContext(defaultSettingsWidgetContext);
|
|
7501
7538
|
var useSettingsWidgetContext = () => {
|
|
7502
|
-
return
|
|
7539
|
+
return import_react16.useContext(settingsWidgetContext);
|
|
7503
7540
|
};
|
|
7504
7541
|
function SettingsWidget({
|
|
7505
7542
|
children,
|
|
@@ -7513,7 +7550,6 @@ function SettingsWidget({
|
|
|
7513
7550
|
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Widget, {
|
|
7514
7551
|
title: "Settings",
|
|
7515
7552
|
id: "settings",
|
|
7516
|
-
mt: "md",
|
|
7517
7553
|
...widgetProps,
|
|
7518
7554
|
buttons: [
|
|
7519
7555
|
...onRestoreDefaultValues ? [
|
|
@@ -7546,27 +7582,27 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
|
|
|
7546
7582
|
SaveButton
|
|
7547
7583
|
});
|
|
7548
7584
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
|
7549
|
-
var
|
|
7550
|
-
var
|
|
7585
|
+
var import_react17 = require("react");
|
|
7586
|
+
var import_core23 = require("@mantine/core");
|
|
7551
7587
|
|
|
7552
7588
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
|
7553
|
-
var
|
|
7589
|
+
var import_core22 = require("@mantine/core");
|
|
7554
7590
|
var jsx_dev_runtime31 = require("react/jsx-dev-runtime");
|
|
7555
7591
|
function Row({
|
|
7556
7592
|
children,
|
|
7557
7593
|
label
|
|
7558
7594
|
}) {
|
|
7559
7595
|
const options = useSettingsTableOptions();
|
|
7560
|
-
return /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(
|
|
7596
|
+
return /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(import_core22.Table.Tr, {
|
|
7561
7597
|
children: [
|
|
7562
|
-
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(
|
|
7598
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(import_core22.Table.Th, {
|
|
7563
7599
|
w: options.leftColumnWidth,
|
|
7564
|
-
children: /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(
|
|
7600
|
+
children: /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(import_core22.Text, {
|
|
7565
7601
|
size: "sm",
|
|
7566
7602
|
children: label
|
|
7567
7603
|
}, undefined, false, undefined, this)
|
|
7568
7604
|
}, undefined, false, undefined, this),
|
|
7569
|
-
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(
|
|
7605
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(import_core22.Table.Td, {
|
|
7570
7606
|
py: "xs",
|
|
7571
7607
|
children
|
|
7572
7608
|
}, undefined, false, undefined, this)
|
|
@@ -7579,9 +7615,9 @@ var jsx_dev_runtime32 = require("react/jsx-dev-runtime");
|
|
|
7579
7615
|
var defaultSettingsTableOptions = {
|
|
7580
7616
|
leftColumnWidth: "38.2%"
|
|
7581
7617
|
};
|
|
7582
|
-
var settingsTableOptionsContext =
|
|
7618
|
+
var settingsTableOptionsContext = import_react17.createContext(defaultSettingsTableOptions);
|
|
7583
7619
|
var useSettingsTableOptions = () => {
|
|
7584
|
-
return
|
|
7620
|
+
return import_react17.useContext(settingsTableOptionsContext);
|
|
7585
7621
|
};
|
|
7586
7622
|
function SettingsTable({
|
|
7587
7623
|
leftColumnWidth,
|
|
@@ -7593,12 +7629,12 @@ function SettingsTable({
|
|
|
7593
7629
|
value: {
|
|
7594
7630
|
leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
|
|
7595
7631
|
},
|
|
7596
|
-
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(
|
|
7632
|
+
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(import_core23.Table, {
|
|
7597
7633
|
bg: theme.transparentBackground,
|
|
7598
7634
|
withTableBorder: true,
|
|
7599
7635
|
variant: "vertical",
|
|
7600
7636
|
layout: "fixed",
|
|
7601
|
-
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(
|
|
7637
|
+
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(import_core23.Table.Tbody, {
|
|
7602
7638
|
children
|
|
7603
7639
|
}, undefined, false, undefined, this)
|
|
7604
7640
|
}, undefined, false, undefined, this)
|
|
@@ -7608,8 +7644,8 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
7608
7644
|
Row
|
|
7609
7645
|
});
|
|
7610
7646
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
7611
|
-
var
|
|
7612
|
-
var
|
|
7647
|
+
var import_lodash15 = __toESM(require_lodash());
|
|
7648
|
+
var import_core24 = require("@mantine/core");
|
|
7613
7649
|
var import_icons_react12 = require("@tabler/icons-react");
|
|
7614
7650
|
var jsx_dev_runtime33 = require("react/jsx-dev-runtime");
|
|
7615
7651
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
|
@@ -7634,13 +7670,13 @@ function NavbarSettingsWidget({
|
|
|
7634
7670
|
navbar: initialUserExperience.navbar
|
|
7635
7671
|
}));
|
|
7636
7672
|
},
|
|
7637
|
-
custom: !
|
|
7673
|
+
custom: !import_lodash15.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
7638
7674
|
children: /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(SettingsTable_default, {
|
|
7639
7675
|
...componentsProps?.table,
|
|
7640
7676
|
children: [
|
|
7641
7677
|
/* @__PURE__ */ jsx_dev_runtime33.jsxDEV(SettingsTable_default.Row, {
|
|
7642
7678
|
label: "Select which pages you want to display or hide",
|
|
7643
|
-
children: /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(
|
|
7679
|
+
children: /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(import_core24.Chip.Group, {
|
|
7644
7680
|
multiple: true,
|
|
7645
7681
|
value: app.navigablePages.filter((p) => !userExperience.navbar.hiddenPages.includes(p.href)).map((p) => p.href),
|
|
7646
7682
|
onChange: (newValue) => {
|
|
@@ -7652,18 +7688,20 @@ function NavbarSettingsWidget({
|
|
|
7652
7688
|
}
|
|
7653
7689
|
}));
|
|
7654
7690
|
},
|
|
7655
|
-
children: /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(
|
|
7691
|
+
children: /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(import_core24.Group, {
|
|
7656
7692
|
justify: "flex-start",
|
|
7657
7693
|
gap: "xs",
|
|
7658
|
-
children: app.navigablePages.map((
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7694
|
+
children: app.navigablePages.map(({ label, href, icon: Icon4 = import_icons_react12.IconLink }, i) => {
|
|
7695
|
+
return /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(import_core24.Chip, {
|
|
7696
|
+
value: href,
|
|
7697
|
+
icon: /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(Icon4, {
|
|
7698
|
+
...theme.componentsProps.icons.small,
|
|
7699
|
+
color: "var(--mantine-primary-color-filled)"
|
|
7700
|
+
}, undefined, false, undefined, this),
|
|
7701
|
+
variant: "outline",
|
|
7702
|
+
children: label
|
|
7703
|
+
}, i, false, undefined, this);
|
|
7704
|
+
})
|
|
7667
7705
|
}, undefined, false, undefined, this)
|
|
7668
7706
|
}, undefined, false, undefined, this)
|
|
7669
7707
|
}, "select-hidden-pages", false, undefined, this),
|
|
@@ -7680,7 +7718,7 @@ function NavbarSettingsWidget({
|
|
|
7680
7718
|
}, undefined, false, undefined, this);
|
|
7681
7719
|
}
|
|
7682
7720
|
// src/core/components/ContextClusterProvider/index.tsx
|
|
7683
|
-
var
|
|
7721
|
+
var import_react18 = __toESM(require("react"));
|
|
7684
7722
|
var jsx_dev_runtime34 = require("react/jsx-dev-runtime");
|
|
7685
7723
|
var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
7686
7724
|
const isStaticId = (id) => {
|
|
@@ -7692,16 +7730,16 @@ var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
|
7692
7730
|
const contexts = {};
|
|
7693
7731
|
const defaultValues = {};
|
|
7694
7732
|
const createContext8 = (id, defaultValue) => {
|
|
7695
|
-
const context =
|
|
7733
|
+
const context = import_react18.default.createContext(defaultValue ?? generalDefaultValue);
|
|
7696
7734
|
contexts[id] = context;
|
|
7697
7735
|
defaultValues[id] = defaultValue ?? generalDefaultValue;
|
|
7698
7736
|
return context;
|
|
7699
7737
|
};
|
|
7700
7738
|
const useContext11 = (id) => {
|
|
7701
7739
|
if (isStaticId(id)) {
|
|
7702
|
-
return contexts[id] ?
|
|
7740
|
+
return contexts[id] ? import_react18.default.useContext(contexts[id]) : generalDefaultValue;
|
|
7703
7741
|
}
|
|
7704
|
-
return contexts[id] ?
|
|
7742
|
+
return contexts[id] ? import_react18.default.useContext(contexts[id]) : null;
|
|
7705
7743
|
};
|
|
7706
7744
|
return {
|
|
7707
7745
|
contexts,
|