remoraid 3.1.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/core/index.cjs +622 -538
- package/dist/core/index.d.ts +59 -26
- package/dist/core/index.js +589 -503
- package/dist/core/styles.css +73 -16
- package/dist/data-visualization/index.cjs +6546 -0
- package/dist/data-visualization/index.d.ts +529 -0
- package/dist/data-visualization/index.js +6584 -0
- package/dist/jsonforms/index.cjs +150 -2294
- package/dist/jsonforms/index.js +98 -2358
- package/package.json +29 -10
package/dist/core/index.cjs
CHANGED
|
@@ -5475,10 +5475,9 @@ __export(exports_core, {
|
|
|
5475
5475
|
useFrameLayoutElement: () => useFrameLayoutElement,
|
|
5476
5476
|
useFrameLayout: () => useFrameLayout,
|
|
5477
5477
|
useAppShellUserExperience: () => useAppShellUserExperience,
|
|
5478
|
-
supportedNavbarPositions: () => supportedNavbarPositions,
|
|
5479
|
-
supportedFooterPositions: () => supportedFooterPositions,
|
|
5480
5478
|
scrollToWidget: () => scrollToWidget,
|
|
5481
5479
|
remoraidAppShellLayoutId: () => remoraidAppShellLayoutId,
|
|
5480
|
+
navbarMetadata: () => navbarMetadata,
|
|
5482
5481
|
isValidElementOfType: () => isValidElementOfType,
|
|
5483
5482
|
isIcon: () => isIcon,
|
|
5484
5483
|
getElementTypeName: () => getElementTypeName,
|
|
@@ -5486,6 +5485,7 @@ __export(exports_core, {
|
|
|
5486
5485
|
getDefaultNavigationElements: () => getDefaultNavigationElements,
|
|
5487
5486
|
getDefaultButtonIconSize: () => getDefaultButtonIconSize,
|
|
5488
5487
|
getCssVars: () => getCssVars,
|
|
5488
|
+
footerMetadata: () => footerMetadata,
|
|
5489
5489
|
defaultUserExperienceCookieName: () => defaultUserExperienceCookieName,
|
|
5490
5490
|
defaultUserExperience: () => defaultUserExperience,
|
|
5491
5491
|
defaultTransitionDurations: () => defaultTransitionDurations,
|
|
@@ -5493,10 +5493,8 @@ __export(exports_core, {
|
|
|
5493
5493
|
defaultSettingsTableOptions: () => defaultSettingsTableOptions,
|
|
5494
5494
|
defaultRemoraidButtonSize: () => defaultRemoraidButtonSize,
|
|
5495
5495
|
defaultNavbarSettingsWidgetId: () => defaultNavbarSettingsWidgetId,
|
|
5496
|
-
defaultNavbarPositions: () => defaultNavbarPositions,
|
|
5497
5496
|
defaultLayoutsContext: () => defaultLayoutsContext,
|
|
5498
5497
|
defaultFooterSettingsWidgetId: () => defaultFooterSettingsWidgetId,
|
|
5499
|
-
defaultFooterPositions: () => defaultFooterPositions,
|
|
5500
5498
|
defaultAppShellUserExperienceCookieName: () => defaultAppShellUserExperienceCookieName,
|
|
5501
5499
|
defaultAppShellUserExperience: () => defaultAppShellUserExperience,
|
|
5502
5500
|
defaultAppContext: () => defaultAppContext,
|
|
@@ -5727,10 +5725,12 @@ function WidgetsProvider({
|
|
|
5727
5725
|
var NavbarVariant;
|
|
5728
5726
|
((NavbarVariant2) => {
|
|
5729
5727
|
NavbarVariant2["Minimal"] = "minimal";
|
|
5728
|
+
NavbarVariant2["Custom"] = "custom";
|
|
5730
5729
|
})(NavbarVariant ||= {});
|
|
5731
5730
|
var FooterVariant;
|
|
5732
5731
|
((FooterVariant2) => {
|
|
5733
5732
|
FooterVariant2["Minimal"] = "minimal";
|
|
5733
|
+
FooterVariant2["Custom"] = "custom";
|
|
5734
5734
|
})(FooterVariant ||= {});
|
|
5735
5735
|
var NavbarMode;
|
|
5736
5736
|
((NavbarMode2) => {
|
|
@@ -5866,6 +5866,34 @@ var isIcon = (value) => {
|
|
|
5866
5866
|
const candidate = value;
|
|
5867
5867
|
return "render" in candidate && typeof candidate.render === "function";
|
|
5868
5868
|
};
|
|
5869
|
+
var navbarMetadata = {
|
|
5870
|
+
["minimal" /* Minimal */]: {
|
|
5871
|
+
defaultPosition: "left" /* Left */,
|
|
5872
|
+
supportedModes: [
|
|
5873
|
+
"collapsed" /* Collapsed */,
|
|
5874
|
+
"expanded" /* Expanded */,
|
|
5875
|
+
"responsive" /* Responsive */
|
|
5876
|
+
],
|
|
5877
|
+
supportedPositions: [
|
|
5878
|
+
null,
|
|
5879
|
+
"top" /* Top */,
|
|
5880
|
+
"bottom" /* Bottom */,
|
|
5881
|
+
"left" /* Left */,
|
|
5882
|
+
"right" /* Right */,
|
|
5883
|
+
"content" /* Content */
|
|
5884
|
+
]
|
|
5885
|
+
}
|
|
5886
|
+
};
|
|
5887
|
+
var footerMetadata = {
|
|
5888
|
+
["minimal" /* Minimal */]: {
|
|
5889
|
+
defaultPosition: "content" /* Content */,
|
|
5890
|
+
supportedPositions: [
|
|
5891
|
+
null,
|
|
5892
|
+
"bottom" /* Bottom */,
|
|
5893
|
+
"content" /* Content */
|
|
5894
|
+
]
|
|
5895
|
+
}
|
|
5896
|
+
};
|
|
5869
5897
|
|
|
5870
5898
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
|
5871
5899
|
var import_core2 = require("@mantine/core");
|
|
@@ -5967,6 +5995,18 @@ var createRemoraidTheme = (customTheme, dependencies) => {
|
|
|
5967
5995
|
["medium" /* Medium */]: { size: 24, stroke: 1.7 },
|
|
5968
5996
|
["large" /* Large */]: { size: 28, stroke: 1.7 },
|
|
5969
5997
|
["huge" /* Huge */]: { size: 44, stroke: 1.7 }
|
|
5998
|
+
},
|
|
5999
|
+
Scroller: {
|
|
6000
|
+
edgeGradientColor: "transparent",
|
|
6001
|
+
className: "remoraid-masked-scroller",
|
|
6002
|
+
startControlIcon: /* @__PURE__ */ jsx_runtime3.jsx(import_icons_react.IconArrowLeft, {
|
|
6003
|
+
size: "var(--remoraid-icon-size-extraSmall)",
|
|
6004
|
+
stroke: "var(--remoraid-icon-stroke-extraSmall)"
|
|
6005
|
+
}),
|
|
6006
|
+
endControlIcon: /* @__PURE__ */ jsx_runtime3.jsx(import_icons_react.IconArrowRight, {
|
|
6007
|
+
size: "var(--remoraid-icon-size-extraSmall)",
|
|
6008
|
+
stroke: "var(--remoraid-icon-stroke-extraSmall)"
|
|
6009
|
+
})
|
|
5970
6010
|
}
|
|
5971
6011
|
}
|
|
5972
6012
|
};
|
|
@@ -5978,7 +6018,8 @@ var getCssVars = (theme) => {
|
|
|
5978
6018
|
transitionDurations,
|
|
5979
6019
|
primaryGutter,
|
|
5980
6020
|
containerSize,
|
|
5981
|
-
transparentBackground
|
|
6021
|
+
transparentBackground,
|
|
6022
|
+
componentsProps: { icons }
|
|
5982
6023
|
} = theme;
|
|
5983
6024
|
return {
|
|
5984
6025
|
"--mantine-color-body": bodyColor,
|
|
@@ -5990,6 +6031,11 @@ var getCssVars = (theme) => {
|
|
|
5990
6031
|
...Object.entries(transitionDurations).reduce((t, [key, value]) => ({
|
|
5991
6032
|
...t,
|
|
5992
6033
|
[`--remoraid-transition-duration-${key}`]: `${value}ms`
|
|
6034
|
+
}), {}),
|
|
6035
|
+
...Object.entries(icons).reduce((t, [key, { size, stroke }]) => ({
|
|
6036
|
+
...t,
|
|
6037
|
+
[`--remoraid-icon-size-${key}`]: typeof size === "number" ? `${size}px` : size,
|
|
6038
|
+
[`--remoraid-icon-stroke-${key}`]: `${stroke}`
|
|
5993
6039
|
}), {})
|
|
5994
6040
|
};
|
|
5995
6041
|
};
|
|
@@ -6227,7 +6273,9 @@ var defaultAppContext = {
|
|
|
6227
6273
|
name: "Hello, World!",
|
|
6228
6274
|
nav: [],
|
|
6229
6275
|
navbarVariant: "minimal" /* Minimal */,
|
|
6276
|
+
navbarMetadata: navbarMetadata["minimal" /* Minimal */],
|
|
6230
6277
|
footerVariant: "minimal" /* Minimal */,
|
|
6278
|
+
footerMetadata: footerMetadata["minimal" /* Minimal */],
|
|
6231
6279
|
navbarMobileVariant: null
|
|
6232
6280
|
};
|
|
6233
6281
|
var appContext = import_react9.createContext(defaultAppContext);
|
|
@@ -6238,9 +6286,30 @@ function AppProvider({
|
|
|
6238
6286
|
appContext: appContextProp,
|
|
6239
6287
|
children
|
|
6240
6288
|
}) {
|
|
6241
|
-
const {
|
|
6289
|
+
const {
|
|
6290
|
+
navbarMetadata: navbarMetadataProp,
|
|
6291
|
+
footerMetadata: footerMetadataProp,
|
|
6292
|
+
logo,
|
|
6293
|
+
...mergeableAppContext
|
|
6294
|
+
} = appContextProp;
|
|
6295
|
+
const {
|
|
6296
|
+
navbarMetadata: _defaultNavbarMetadata,
|
|
6297
|
+
footerMetadata: _defaultFooterMetadata,
|
|
6298
|
+
...defaultAppContextWithoutMetadata
|
|
6299
|
+
} = defaultAppContext;
|
|
6300
|
+
const resolvedNavbarVariant = appContextProp.navbarVariant === undefined ? defaultAppContext.navbarVariant : appContextProp.navbarVariant;
|
|
6301
|
+
const resolvedFooterVariant = appContextProp.footerVariant === undefined ? defaultAppContext.footerVariant : appContextProp.footerVariant;
|
|
6242
6302
|
return /* @__PURE__ */ jsx_runtime9.jsx(appContext.Provider, {
|
|
6243
|
-
value: {
|
|
6303
|
+
value: {
|
|
6304
|
+
...import_lodash4.merge({}, defaultAppContextWithoutMetadata, mergeableAppContext),
|
|
6305
|
+
logo,
|
|
6306
|
+
...resolvedNavbarVariant === null ? {} : {
|
|
6307
|
+
navbarMetadata: resolvedNavbarVariant === "custom" /* Custom */ ? navbarMetadataProp : navbarMetadata[resolvedNavbarVariant]
|
|
6308
|
+
},
|
|
6309
|
+
...resolvedFooterVariant === null ? {} : {
|
|
6310
|
+
footerMetadata: resolvedFooterVariant === "custom" /* Custom */ ? footerMetadataProp : footerMetadata[resolvedFooterVariant]
|
|
6311
|
+
}
|
|
6312
|
+
},
|
|
6244
6313
|
children
|
|
6245
6314
|
});
|
|
6246
6315
|
}
|
|
@@ -6249,16 +6318,152 @@ function AppProvider({
|
|
|
6249
6318
|
var import_lodash13 = __toESM(require_lodash());
|
|
6250
6319
|
|
|
6251
6320
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
6321
|
+
var import_react10 = require("react");
|
|
6322
|
+
var import_lodash5 = __toESM(require_lodash());
|
|
6323
|
+
var jsx_runtime10 = require("react/jsx-runtime");
|
|
6324
|
+
var defaultAppShellUserExperience = {
|
|
6325
|
+
navbar: {
|
|
6326
|
+
position: null,
|
|
6327
|
+
mobilePosition: null,
|
|
6328
|
+
mode: "responsive" /* Responsive */
|
|
6329
|
+
},
|
|
6330
|
+
footer: {
|
|
6331
|
+
position: null
|
|
6332
|
+
}
|
|
6333
|
+
};
|
|
6334
|
+
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
6335
|
+
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
6336
|
+
var useAppShellUserExperience = () => {
|
|
6337
|
+
return import_react10.useContext(appShellUserExperienceContext);
|
|
6338
|
+
};
|
|
6339
|
+
function AppShellUserExperienceProvider({
|
|
6340
|
+
children,
|
|
6341
|
+
initialValue,
|
|
6342
|
+
cookieName
|
|
6343
|
+
}) {
|
|
6344
|
+
const { navbarVariant, navbarMetadata: navbarMetadata2, footerVariant, footerMetadata: footerMetadata2 } = useRemoraidApp();
|
|
6345
|
+
const isValidUserExperience = (x) => {
|
|
6346
|
+
if (typeof x !== "object") {
|
|
6347
|
+
return false;
|
|
6348
|
+
}
|
|
6349
|
+
if (x === null) {
|
|
6350
|
+
return false;
|
|
6351
|
+
}
|
|
6352
|
+
if (!("navbar" in x)) {
|
|
6353
|
+
return false;
|
|
6354
|
+
}
|
|
6355
|
+
if (!("footer" in x)) {
|
|
6356
|
+
return false;
|
|
6357
|
+
}
|
|
6358
|
+
return true;
|
|
6359
|
+
};
|
|
6360
|
+
return /* @__PURE__ */ jsx_runtime10.jsx(UserExperienceProviderWrapper, {
|
|
6361
|
+
context: appShellUserExperienceContext,
|
|
6362
|
+
isValidUserExperience,
|
|
6363
|
+
cookieName: cookieName ?? defaultAppShellUserExperienceCookieName,
|
|
6364
|
+
defaultUserExperience: defaultAppShellUserExperience,
|
|
6365
|
+
initialValue: import_lodash5.merge({
|
|
6366
|
+
navbar: {
|
|
6367
|
+
position: navbarVariant === null ? null : navbarMetadata2.defaultPosition
|
|
6368
|
+
},
|
|
6369
|
+
footer: {
|
|
6370
|
+
position: footerVariant === null ? null : footerMetadata2.defaultPosition
|
|
6371
|
+
}
|
|
6372
|
+
}, initialValue),
|
|
6373
|
+
children
|
|
6374
|
+
});
|
|
6375
|
+
}
|
|
6376
|
+
|
|
6377
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6252
6378
|
var import_react17 = require("react");
|
|
6253
|
-
var import_lodash12 = __toESM(require_lodash());
|
|
6254
6379
|
|
|
6255
|
-
// src/core/components/AppShell/
|
|
6256
|
-
var
|
|
6257
|
-
var
|
|
6258
|
-
var import_lodash6 = __toESM(require_lodash());
|
|
6380
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6381
|
+
var import_core8 = require("@mantine/core");
|
|
6382
|
+
var import_lodash8 = __toESM(require_lodash());
|
|
6259
6383
|
|
|
6260
|
-
// src/core/components/
|
|
6384
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
6261
6385
|
var import_core3 = require("@mantine/core");
|
|
6386
|
+
var import_react11 = require("react");
|
|
6387
|
+
var jsx_runtime11 = require("react/jsx-runtime");
|
|
6388
|
+
function NavigationMenu({
|
|
6389
|
+
target,
|
|
6390
|
+
elements,
|
|
6391
|
+
label,
|
|
6392
|
+
componentsProps
|
|
6393
|
+
}) {
|
|
6394
|
+
const theme = useRemoraidTheme();
|
|
6395
|
+
const mantineTheme = import_core3.useMantineTheme();
|
|
6396
|
+
const router = useRemoraidRouter();
|
|
6397
|
+
const { pathname } = router;
|
|
6398
|
+
const item = (element, style) => {
|
|
6399
|
+
const isLeaf2 = element.children === undefined || element.children.length === 0;
|
|
6400
|
+
const Menu2 = isLeaf2 ? import_core3.Menu : import_core3.Menu.Sub;
|
|
6401
|
+
return /* @__PURE__ */ jsx_runtime11.jsx(Menu2.Item, {
|
|
6402
|
+
leftSection: element.icon ? /* @__PURE__ */ jsx_runtime11.jsx(element.icon, {
|
|
6403
|
+
...theme.componentsProps.icons.small
|
|
6404
|
+
}) : undefined,
|
|
6405
|
+
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
6406
|
+
onClick: (e) => {
|
|
6407
|
+
if (element.type === "anchor" /* Anchor */) {
|
|
6408
|
+
router.push(element.href);
|
|
6409
|
+
}
|
|
6410
|
+
if (element.type === "button" /* Button */) {
|
|
6411
|
+
element.onClick(e);
|
|
6412
|
+
}
|
|
6413
|
+
},
|
|
6414
|
+
style,
|
|
6415
|
+
children: element.label
|
|
6416
|
+
});
|
|
6417
|
+
};
|
|
6418
|
+
const isRoot = import_react11.isValidElement(target);
|
|
6419
|
+
const isLeaf = elements === undefined || elements.length === 0;
|
|
6420
|
+
const Menu = isRoot ? import_core3.Menu : import_core3.Menu.Sub;
|
|
6421
|
+
const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
|
|
6422
|
+
return /* @__PURE__ */ jsx_runtime11.jsx(import_core3.Transition, {
|
|
6423
|
+
mounted: isRoot ? true : target.mounted ?? true,
|
|
6424
|
+
...componentsProps?.transition,
|
|
6425
|
+
children: (transitionStyle) => {
|
|
6426
|
+
if (isLeaf) {
|
|
6427
|
+
if (isRoot) {
|
|
6428
|
+
return target;
|
|
6429
|
+
}
|
|
6430
|
+
return item(target, transitionStyle);
|
|
6431
|
+
}
|
|
6432
|
+
return /* @__PURE__ */ jsx_runtime11.jsxs(Menu, {
|
|
6433
|
+
...menuProps,
|
|
6434
|
+
children: [
|
|
6435
|
+
/* @__PURE__ */ jsx_runtime11.jsx(Menu.Target, {
|
|
6436
|
+
children: isRoot ? /* @__PURE__ */ jsx_runtime11.jsx(import_core3.Box, {
|
|
6437
|
+
...componentsProps?.rootTargetContainer,
|
|
6438
|
+
children: target
|
|
6439
|
+
}) : item(target, transitionStyle)
|
|
6440
|
+
}),
|
|
6441
|
+
/* @__PURE__ */ jsx_runtime11.jsxs(Menu.Dropdown, {
|
|
6442
|
+
children: [
|
|
6443
|
+
label !== undefined && /* @__PURE__ */ jsx_runtime11.jsx(import_core3.Menu.Label, {
|
|
6444
|
+
children: label
|
|
6445
|
+
}),
|
|
6446
|
+
elements.map((element, i) => /* @__PURE__ */ jsx_runtime11.jsx(NavigationMenu, {
|
|
6447
|
+
target: element,
|
|
6448
|
+
elements: element.children,
|
|
6449
|
+
componentsProps
|
|
6450
|
+
}, `navigation-menu-${i}`))
|
|
6451
|
+
]
|
|
6452
|
+
})
|
|
6453
|
+
]
|
|
6454
|
+
});
|
|
6455
|
+
}
|
|
6456
|
+
});
|
|
6457
|
+
}
|
|
6458
|
+
|
|
6459
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6460
|
+
var import_icons_react3 = require("@tabler/icons-react");
|
|
6461
|
+
|
|
6462
|
+
// src/core/components/RemoraidButton/index.tsx
|
|
6463
|
+
var import_core4 = require("@mantine/core");
|
|
6464
|
+
var import_icons_react2 = require("@tabler/icons-react");
|
|
6465
|
+
var import_react12 = require("react");
|
|
6466
|
+
var import_lodash6 = __toESM(require_lodash());
|
|
6262
6467
|
|
|
6263
6468
|
// node_modules/clsx/dist/clsx.mjs
|
|
6264
6469
|
function r(e) {
|
|
@@ -6282,102 +6487,102 @@ function clsx() {
|
|
|
6282
6487
|
}
|
|
6283
6488
|
var clsx_default = clsx;
|
|
6284
6489
|
|
|
6285
|
-
// src/core/components/
|
|
6286
|
-
var
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6490
|
+
// src/core/components/RemoraidButton/index.tsx
|
|
6491
|
+
var jsx_runtime12 = require("react/jsx-runtime");
|
|
6492
|
+
var defaultRemoraidButtonSize = "sm";
|
|
6493
|
+
function RemoraidButton({
|
|
6494
|
+
label,
|
|
6495
|
+
responsive: responsiveProp,
|
|
6496
|
+
breakpoint: breakpointProp,
|
|
6497
|
+
collapsed: collapsedProp,
|
|
6498
|
+
size = defaultRemoraidButtonSize,
|
|
6499
|
+
color,
|
|
6500
|
+
onClick,
|
|
6501
|
+
loading,
|
|
6502
|
+
variant = "default",
|
|
6503
|
+
mounted = true,
|
|
6504
|
+
icon: iconProp,
|
|
6505
|
+
iconSize: iconSizeProp,
|
|
6506
|
+
clickTransformation = "default" /* Default */,
|
|
6291
6507
|
componentsProps
|
|
6292
6508
|
}) {
|
|
6293
6509
|
const theme = useRemoraidTheme();
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
children
|
|
6510
|
+
const responsive = responsiveProp ?? true;
|
|
6511
|
+
const breakpoint = breakpointProp ?? theme.breakpoints.buttonCollapse;
|
|
6512
|
+
const collapsed = collapsedProp ?? false;
|
|
6513
|
+
const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
|
|
6514
|
+
const Icon2 = iconProp ?? import_icons_react2.IconClick;
|
|
6515
|
+
const iconElement = import_react12.isValidElement(Icon2) ? Icon2 : /* @__PURE__ */ jsx_runtime12.jsx(Icon2, {
|
|
6516
|
+
...import_lodash6.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6302
6517
|
});
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
const element = includePageContainer ? /* @__PURE__ */ jsx_runtime11.jsx(PageContainer, {
|
|
6357
|
-
p: 0,
|
|
6358
|
-
hidden,
|
|
6359
|
-
...componentsProps?.PageContainer,
|
|
6360
|
-
children
|
|
6361
|
-
}) : children;
|
|
6362
|
-
return /* @__PURE__ */ jsx_runtime11.jsx(import_core4.Portal, {
|
|
6363
|
-
target: layout.sections[section],
|
|
6364
|
-
children: /* @__PURE__ */ jsx_runtime11.jsx(layoutElementContext.Provider, {
|
|
6365
|
-
value: { layoutType: "frame" /* Frame */, section },
|
|
6366
|
-
children: includeContainer ? /* @__PURE__ */ jsx_runtime11.jsx(import_core4.Box, {
|
|
6367
|
-
"data-hidden": hidden,
|
|
6368
|
-
...import_lodash5.merge(containerProps, componentsProps?.container),
|
|
6369
|
-
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
6370
|
-
children: element
|
|
6371
|
-
}) : element
|
|
6518
|
+
const clickTransformationClassNames = {
|
|
6519
|
+
["default" /* Default */]: null,
|
|
6520
|
+
["none" /* None */]: "remoraid-button-none",
|
|
6521
|
+
["scale" /* Scale */]: "remoraid-button-scale",
|
|
6522
|
+
["tiltDown" /* TiltDown */]: "remoraid-button-tilt-down",
|
|
6523
|
+
["tiltUp" /* TiltUp */]: "remoraid-button-tilt-up",
|
|
6524
|
+
["tiltLeft" /* TiltLeft */]: "remoraid-button-tilt-left",
|
|
6525
|
+
["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
|
|
6526
|
+
};
|
|
6527
|
+
const clickTransformationClass = clickTransformationClassNames[clickTransformation];
|
|
6528
|
+
return /* @__PURE__ */ jsx_runtime12.jsx(import_core4.Transition, {
|
|
6529
|
+
mounted,
|
|
6530
|
+
transition: "fade",
|
|
6531
|
+
duration: theme.transitionDurations.short,
|
|
6532
|
+
timingFunction: "ease",
|
|
6533
|
+
...componentsProps?.transition,
|
|
6534
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime12.jsxs(jsx_runtime12.Fragment, {
|
|
6535
|
+
children: [
|
|
6536
|
+
/* @__PURE__ */ jsx_runtime12.jsx(import_core4.Tooltip, {
|
|
6537
|
+
label,
|
|
6538
|
+
...componentsProps?.tooltip,
|
|
6539
|
+
children: /* @__PURE__ */ jsx_runtime12.jsx(import_core4.ActionIcon, {
|
|
6540
|
+
"aria-label": label,
|
|
6541
|
+
variant,
|
|
6542
|
+
onClick,
|
|
6543
|
+
loading,
|
|
6544
|
+
size: size ? `input-${size}` : "input-sm",
|
|
6545
|
+
color,
|
|
6546
|
+
...componentsProps?.button,
|
|
6547
|
+
...componentsProps?.ActionIcon,
|
|
6548
|
+
hiddenFrom: !responsive ? undefined : breakpoint,
|
|
6549
|
+
display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
|
|
6550
|
+
style: import_lodash6.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
|
|
6551
|
+
className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
|
|
6552
|
+
children: iconElement
|
|
6553
|
+
})
|
|
6554
|
+
}),
|
|
6555
|
+
/* @__PURE__ */ jsx_runtime12.jsx(import_core4.Button, {
|
|
6556
|
+
onClick,
|
|
6557
|
+
loading,
|
|
6558
|
+
variant,
|
|
6559
|
+
size,
|
|
6560
|
+
color,
|
|
6561
|
+
leftSection: iconProp !== undefined ? iconElement : undefined,
|
|
6562
|
+
...componentsProps?.button,
|
|
6563
|
+
...componentsProps?.Button,
|
|
6564
|
+
visibleFrom: !responsive ? undefined : breakpoint,
|
|
6565
|
+
display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
|
|
6566
|
+
style: import_lodash6.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
|
|
6567
|
+
className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
|
|
6568
|
+
children: label
|
|
6569
|
+
})
|
|
6570
|
+
]
|
|
6372
6571
|
})
|
|
6373
6572
|
});
|
|
6374
6573
|
}
|
|
6375
6574
|
|
|
6575
|
+
// src/core/components/FrameLayout/Element/index.tsx
|
|
6576
|
+
var import_react14 = require("react");
|
|
6577
|
+
var import_core7 = require("@mantine/core");
|
|
6578
|
+
|
|
6376
6579
|
// src/core/components/FrameLayout/index.tsx
|
|
6377
|
-
var
|
|
6378
|
-
var
|
|
6580
|
+
var import_core5 = require("@mantine/core");
|
|
6581
|
+
var import_react13 = require("react");
|
|
6582
|
+
var jsx_runtime13 = require("react/jsx-runtime");
|
|
6583
|
+
var layoutContext = import_react13.createContext(null);
|
|
6379
6584
|
var useFrameLayout = () => {
|
|
6380
|
-
return
|
|
6585
|
+
return import_react13.useContext(layoutContext);
|
|
6381
6586
|
};
|
|
6382
6587
|
function FrameLayout({
|
|
6383
6588
|
layoutId,
|
|
@@ -6388,14 +6593,14 @@ function FrameLayout({
|
|
|
6388
6593
|
}) {
|
|
6389
6594
|
const { layouts, setLayouts } = useLayouts();
|
|
6390
6595
|
const layout = layouts[layoutId];
|
|
6391
|
-
const defaultSections =
|
|
6596
|
+
const defaultSections = import_react13.useMemo(() => ({
|
|
6392
6597
|
["bottom" /* Bottom */]: null,
|
|
6393
6598
|
["right" /* Right */]: null,
|
|
6394
6599
|
["top" /* Top */]: null,
|
|
6395
6600
|
["left" /* Left */]: null,
|
|
6396
6601
|
["content" /* Content */]: null
|
|
6397
6602
|
}), []);
|
|
6398
|
-
const setSections =
|
|
6603
|
+
const setSections = import_react13.useCallback((value) => {
|
|
6399
6604
|
setLayouts((prev) => ({
|
|
6400
6605
|
...prev,
|
|
6401
6606
|
[layoutId]: {
|
|
@@ -6404,37 +6609,37 @@ function FrameLayout({
|
|
|
6404
6609
|
}
|
|
6405
6610
|
}));
|
|
6406
6611
|
}, [layoutId, setLayouts, defaultSections]);
|
|
6407
|
-
const topSectionRef =
|
|
6612
|
+
const topSectionRef = import_react13.useCallback((n) => {
|
|
6408
6613
|
setSections((prev) => ({
|
|
6409
6614
|
...prev,
|
|
6410
6615
|
["top" /* Top */]: n
|
|
6411
6616
|
}));
|
|
6412
6617
|
}, [setSections]);
|
|
6413
|
-
const bottomSectionRef =
|
|
6618
|
+
const bottomSectionRef = import_react13.useCallback((n) => {
|
|
6414
6619
|
setSections((prev) => ({
|
|
6415
6620
|
...prev,
|
|
6416
6621
|
["bottom" /* Bottom */]: n
|
|
6417
6622
|
}));
|
|
6418
6623
|
}, [setSections]);
|
|
6419
|
-
const leftSectionRef =
|
|
6624
|
+
const leftSectionRef = import_react13.useCallback((n) => {
|
|
6420
6625
|
setSections((prev) => ({
|
|
6421
6626
|
...prev,
|
|
6422
6627
|
["left" /* Left */]: n
|
|
6423
6628
|
}));
|
|
6424
6629
|
}, [setSections]);
|
|
6425
|
-
const rightSectionRef =
|
|
6630
|
+
const rightSectionRef = import_react13.useCallback((n) => {
|
|
6426
6631
|
setSections((prev) => ({
|
|
6427
6632
|
...prev,
|
|
6428
6633
|
["right" /* Right */]: n
|
|
6429
6634
|
}));
|
|
6430
6635
|
}, [setSections]);
|
|
6431
|
-
const contentSectionRef =
|
|
6636
|
+
const contentSectionRef = import_react13.useCallback((n) => {
|
|
6432
6637
|
setSections((prev) => ({
|
|
6433
6638
|
...prev,
|
|
6434
6639
|
["content" /* Content */]: n
|
|
6435
6640
|
}));
|
|
6436
6641
|
}, [setSections]);
|
|
6437
|
-
const contentSection = /* @__PURE__ */
|
|
6642
|
+
const contentSection = /* @__PURE__ */ jsx_runtime13.jsx(import_core5.Stack, {
|
|
6438
6643
|
ref: contentSectionRef,
|
|
6439
6644
|
h: "100%",
|
|
6440
6645
|
gap: gutter,
|
|
@@ -6443,15 +6648,15 @@ function FrameLayout({
|
|
|
6443
6648
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-content-section", componentsProps?.sectionContainers?.["content" /* Content */]?.className),
|
|
6444
6649
|
children
|
|
6445
6650
|
});
|
|
6446
|
-
const layoutContextValue =
|
|
6651
|
+
const layoutContextValue = import_react13.useMemo(() => ({
|
|
6447
6652
|
type: "frame" /* Frame */,
|
|
6448
6653
|
sections: defaultSections,
|
|
6449
6654
|
...layout,
|
|
6450
6655
|
layoutId
|
|
6451
6656
|
}), [layout?.sections, defaultSections, layoutId]);
|
|
6452
|
-
return /* @__PURE__ */
|
|
6657
|
+
return /* @__PURE__ */ jsx_runtime13.jsx(layoutContext.Provider, {
|
|
6453
6658
|
value: layoutContextValue,
|
|
6454
|
-
children: /* @__PURE__ */
|
|
6659
|
+
children: /* @__PURE__ */ jsx_runtime13.jsxs(import_core5.Group, {
|
|
6455
6660
|
gap: 0,
|
|
6456
6661
|
h: "100%",
|
|
6457
6662
|
w: "100%",
|
|
@@ -6462,7 +6667,7 @@ function FrameLayout({
|
|
|
6462
6667
|
},
|
|
6463
6668
|
className: clsx_default("remoraid-frame-layout", componentsProps?.horizontalContainer?.className),
|
|
6464
6669
|
children: [
|
|
6465
|
-
/* @__PURE__ */
|
|
6670
|
+
/* @__PURE__ */ jsx_runtime13.jsx(import_core5.Group, {
|
|
6466
6671
|
ref: leftSectionRef,
|
|
6467
6672
|
h: "100%",
|
|
6468
6673
|
wrap: "nowrap",
|
|
@@ -6471,293 +6676,142 @@ function FrameLayout({
|
|
|
6471
6676
|
...componentsProps?.sectionContainers?.["left" /* Left */],
|
|
6472
6677
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-left-section", componentsProps?.sectionContainers?.["left" /* Left */]?.className)
|
|
6473
6678
|
}),
|
|
6474
|
-
/* @__PURE__ */
|
|
6679
|
+
/* @__PURE__ */ jsx_runtime13.jsxs(import_core5.Stack, {
|
|
6475
6680
|
h: "100%",
|
|
6476
6681
|
flex: 1,
|
|
6477
6682
|
gap: 0,
|
|
6478
6683
|
...componentsProps?.verticalContainer,
|
|
6479
6684
|
className: clsx_default("remoraid-frame-layout-vertical-container", componentsProps?.verticalContainer?.className),
|
|
6480
6685
|
children: [
|
|
6481
|
-
/* @__PURE__ */
|
|
6686
|
+
/* @__PURE__ */ jsx_runtime13.jsx(import_core5.Stack, {
|
|
6482
6687
|
ref: topSectionRef,
|
|
6483
6688
|
gap: gutter,
|
|
6484
6689
|
flex: 0,
|
|
6485
6690
|
...componentsProps?.sectionContainers?.["top" /* Top */],
|
|
6486
6691
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-top-section", componentsProps?.sectionContainers?.["top" /* Top */]?.className)
|
|
6487
6692
|
}),
|
|
6488
|
-
includeScrollArea ? /* @__PURE__ */
|
|
6693
|
+
includeScrollArea ? /* @__PURE__ */ jsx_runtime13.jsx(import_core5.ScrollArea, {
|
|
6489
6694
|
flex: 1,
|
|
6490
6695
|
...componentsProps?.ScrollArea,
|
|
6491
6696
|
children: contentSection
|
|
6492
6697
|
}) : contentSection,
|
|
6493
|
-
/* @__PURE__ */
|
|
6698
|
+
/* @__PURE__ */ jsx_runtime13.jsx(import_core5.Stack, {
|
|
6494
6699
|
ref: bottomSectionRef,
|
|
6495
6700
|
gap: gutter,
|
|
6496
6701
|
flex: 0,
|
|
6497
6702
|
...componentsProps?.sectionContainers?.["bottom" /* Bottom */],
|
|
6498
6703
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-bottom-section", componentsProps?.sectionContainers?.["bottom" /* Bottom */]?.className)
|
|
6499
|
-
})
|
|
6500
|
-
]
|
|
6501
|
-
}),
|
|
6502
|
-
/* @__PURE__ */ jsx_runtime12.jsx(import_core5.Group, {
|
|
6503
|
-
ref: rightSectionRef,
|
|
6504
|
-
h: "100%",
|
|
6505
|
-
gap: gutter,
|
|
6506
|
-
pl: 0,
|
|
6507
|
-
wrap: "nowrap",
|
|
6508
|
-
...componentsProps?.sectionContainers?.["right" /* Right */],
|
|
6509
|
-
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-right-section", componentsProps?.sectionContainers?.["right" /* Right */]?.className)
|
|
6510
|
-
})
|
|
6511
|
-
]
|
|
6512
|
-
})
|
|
6513
|
-
});
|
|
6514
|
-
}
|
|
6515
|
-
var FrameLayout_default = Object.assign(FrameLayout, {
|
|
6516
|
-
Element: Element2
|
|
6517
|
-
});
|
|
6518
|
-
|
|
6519
|
-
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
6520
|
-
var jsx_runtime13 = require("react/jsx-runtime");
|
|
6521
|
-
function FooterMinimal({
|
|
6522
|
-
icon: Icon2 = import_icons_react2.IconPennant,
|
|
6523
|
-
componentsProps
|
|
6524
|
-
}) {
|
|
6525
|
-
const theme = useRemoraidTheme();
|
|
6526
|
-
const {
|
|
6527
|
-
userExperience: {
|
|
6528
|
-
footer: { position }
|
|
6529
|
-
}
|
|
6530
|
-
} = useAppShellUserExperience();
|
|
6531
|
-
const content = /* @__PURE__ */ jsx_runtime13.jsx(PageContainer, {
|
|
6532
|
-
...componentsProps?.container,
|
|
6533
|
-
children: /* @__PURE__ */ jsx_runtime13.jsx(import_core6.Center, {
|
|
6534
|
-
children: /* @__PURE__ */ jsx_runtime13.jsx(Icon2, {
|
|
6535
|
-
color: "var(--mantine-color-disabled)",
|
|
6536
|
-
...theme.componentsProps.icons.huge,
|
|
6537
|
-
...componentsProps?.icon
|
|
6538
|
-
})
|
|
6539
|
-
})
|
|
6540
|
-
});
|
|
6541
|
-
if (position === "bottom" /* Bottom */) {
|
|
6542
|
-
return /* @__PURE__ */ jsx_runtime13.jsx(FrameLayout_default.Element, {
|
|
6543
|
-
section: position,
|
|
6544
|
-
includeContainer: true,
|
|
6545
|
-
...componentsProps?.layoutElement,
|
|
6546
|
-
componentsProps: import_lodash6.merge({ container: { style: { order: -50 } } }, componentsProps?.layoutElement?.componentsProps),
|
|
6547
|
-
children: content
|
|
6548
|
-
});
|
|
6549
|
-
}
|
|
6550
|
-
if (position === "content" /* Content */) {
|
|
6551
|
-
return content;
|
|
6552
|
-
}
|
|
6553
|
-
return null;
|
|
6554
|
-
}
|
|
6555
|
-
|
|
6556
|
-
// src/core/components/AppShell/Footer/index.tsx
|
|
6557
|
-
var jsx_runtime14 = require("react/jsx-runtime");
|
|
6558
|
-
var supportedFooterPositions = {
|
|
6559
|
-
["minimal" /* Minimal */]: [
|
|
6560
|
-
null,
|
|
6561
|
-
"bottom" /* Bottom */,
|
|
6562
|
-
"content" /* Content */
|
|
6563
|
-
]
|
|
6564
|
-
};
|
|
6565
|
-
var defaultFooterPositions = {
|
|
6566
|
-
["minimal" /* Minimal */]: "content" /* Content */
|
|
6567
|
-
};
|
|
6568
|
-
function Footer({ componentsProps }) {
|
|
6569
|
-
const { footerVariant } = useRemoraidApp();
|
|
6570
|
-
if (footerVariant === "minimal" /* Minimal */) {
|
|
6571
|
-
return /* @__PURE__ */ jsx_runtime14.jsx(FooterMinimal, {
|
|
6572
|
-
...componentsProps?.FooterMinimal
|
|
6573
|
-
});
|
|
6574
|
-
}
|
|
6575
|
-
return null;
|
|
6576
|
-
}
|
|
6577
|
-
var Footer_default = Object.assign(Footer, {
|
|
6578
|
-
FooterMinimal
|
|
6579
|
-
});
|
|
6580
|
-
|
|
6581
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6582
|
-
var import_react16 = require("react");
|
|
6583
|
-
|
|
6584
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6585
|
-
var import_core9 = require("@mantine/core");
|
|
6586
|
-
var import_lodash8 = __toESM(require_lodash());
|
|
6587
|
-
|
|
6588
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
6589
|
-
var import_core7 = require("@mantine/core");
|
|
6590
|
-
var import_react12 = require("react");
|
|
6591
|
-
var jsx_runtime15 = require("react/jsx-runtime");
|
|
6592
|
-
function NavigationMenu({
|
|
6593
|
-
target,
|
|
6594
|
-
elements,
|
|
6595
|
-
label,
|
|
6596
|
-
componentsProps
|
|
6597
|
-
}) {
|
|
6598
|
-
const theme = useRemoraidTheme();
|
|
6599
|
-
const mantineTheme = import_core7.useMantineTheme();
|
|
6600
|
-
const router = useRemoraidRouter();
|
|
6601
|
-
const { pathname } = router;
|
|
6602
|
-
const item = (element, style) => {
|
|
6603
|
-
const isLeaf2 = element.children === undefined || element.children.length === 0;
|
|
6604
|
-
const Menu2 = isLeaf2 ? import_core7.Menu : import_core7.Menu.Sub;
|
|
6605
|
-
return /* @__PURE__ */ jsx_runtime15.jsx(Menu2.Item, {
|
|
6606
|
-
leftSection: element.icon ? /* @__PURE__ */ jsx_runtime15.jsx(element.icon, {
|
|
6607
|
-
...theme.componentsProps.icons.small
|
|
6608
|
-
}) : undefined,
|
|
6609
|
-
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
6610
|
-
onClick: (e) => {
|
|
6611
|
-
if (element.type === "anchor" /* Anchor */) {
|
|
6612
|
-
router.push(element.href);
|
|
6613
|
-
}
|
|
6614
|
-
if (element.type === "button" /* Button */) {
|
|
6615
|
-
element.onClick(e);
|
|
6616
|
-
}
|
|
6617
|
-
},
|
|
6618
|
-
style,
|
|
6619
|
-
children: element.label
|
|
6620
|
-
});
|
|
6621
|
-
};
|
|
6622
|
-
const isRoot = import_react12.isValidElement(target);
|
|
6623
|
-
const isLeaf = elements === undefined || elements.length === 0;
|
|
6624
|
-
const Menu = isRoot ? import_core7.Menu : import_core7.Menu.Sub;
|
|
6625
|
-
const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
|
|
6626
|
-
return /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Transition, {
|
|
6627
|
-
mounted: isRoot ? true : target.mounted ?? true,
|
|
6628
|
-
...componentsProps?.transition,
|
|
6629
|
-
children: (transitionStyle) => {
|
|
6630
|
-
if (isLeaf) {
|
|
6631
|
-
if (isRoot) {
|
|
6632
|
-
return target;
|
|
6633
|
-
}
|
|
6634
|
-
return item(target, transitionStyle);
|
|
6635
|
-
}
|
|
6636
|
-
return /* @__PURE__ */ jsx_runtime15.jsxs(Menu, {
|
|
6637
|
-
...menuProps,
|
|
6638
|
-
children: [
|
|
6639
|
-
/* @__PURE__ */ jsx_runtime15.jsx(Menu.Target, {
|
|
6640
|
-
children: isRoot ? /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
|
|
6641
|
-
...componentsProps?.rootTargetContainer,
|
|
6642
|
-
children: target
|
|
6643
|
-
}) : item(target, transitionStyle)
|
|
6644
|
-
}),
|
|
6645
|
-
/* @__PURE__ */ jsx_runtime15.jsxs(Menu.Dropdown, {
|
|
6646
|
-
children: [
|
|
6647
|
-
label !== undefined && /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Label, {
|
|
6648
|
-
children: label
|
|
6649
|
-
}),
|
|
6650
|
-
elements.map((element, i) => /* @__PURE__ */ jsx_runtime15.jsx(NavigationMenu, {
|
|
6651
|
-
target: element,
|
|
6652
|
-
elements: element.children,
|
|
6653
|
-
componentsProps
|
|
6654
|
-
}, `navigation-menu-${i}`))
|
|
6655
|
-
]
|
|
6656
|
-
})
|
|
6657
|
-
]
|
|
6658
|
-
});
|
|
6659
|
-
}
|
|
6660
|
-
});
|
|
6661
|
-
}
|
|
6662
|
-
|
|
6663
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6664
|
-
var import_icons_react4 = require("@tabler/icons-react");
|
|
6665
|
-
|
|
6666
|
-
// src/core/components/RemoraidButton/index.tsx
|
|
6667
|
-
var import_core8 = require("@mantine/core");
|
|
6668
|
-
var import_icons_react3 = require("@tabler/icons-react");
|
|
6669
|
-
var import_react13 = require("react");
|
|
6670
|
-
var import_lodash7 = __toESM(require_lodash());
|
|
6671
|
-
var jsx_runtime16 = require("react/jsx-runtime");
|
|
6672
|
-
var defaultRemoraidButtonSize = "sm";
|
|
6673
|
-
function RemoraidButton({
|
|
6674
|
-
label,
|
|
6675
|
-
responsive: responsiveProp,
|
|
6676
|
-
breakpoint: breakpointProp,
|
|
6677
|
-
collapsed: collapsedProp,
|
|
6678
|
-
size = defaultRemoraidButtonSize,
|
|
6679
|
-
color,
|
|
6680
|
-
onClick,
|
|
6681
|
-
loading,
|
|
6682
|
-
variant = "default",
|
|
6683
|
-
mounted = true,
|
|
6684
|
-
icon: iconProp,
|
|
6685
|
-
iconSize: iconSizeProp,
|
|
6686
|
-
clickTransformation = "default" /* Default */,
|
|
6687
|
-
componentsProps
|
|
6688
|
-
}) {
|
|
6689
|
-
const theme = useRemoraidTheme();
|
|
6690
|
-
const responsive = responsiveProp ?? true;
|
|
6691
|
-
const breakpoint = breakpointProp ?? theme.breakpoints.buttonCollapse;
|
|
6692
|
-
const collapsed = collapsedProp ?? false;
|
|
6693
|
-
const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
|
|
6694
|
-
const Icon3 = iconProp ?? import_icons_react3.IconClick;
|
|
6695
|
-
const iconElement = import_react13.isValidElement(Icon3) ? Icon3 : /* @__PURE__ */ jsx_runtime16.jsx(Icon3, {
|
|
6696
|
-
...import_lodash7.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6697
|
-
});
|
|
6698
|
-
const clickTransformationClassNames = {
|
|
6699
|
-
["default" /* Default */]: null,
|
|
6700
|
-
["none" /* None */]: "remoraid-button-none",
|
|
6701
|
-
["scale" /* Scale */]: "remoraid-button-scale",
|
|
6702
|
-
["tiltDown" /* TiltDown */]: "remoraid-button-tilt-down",
|
|
6703
|
-
["tiltUp" /* TiltUp */]: "remoraid-button-tilt-up",
|
|
6704
|
-
["tiltLeft" /* TiltLeft */]: "remoraid-button-tilt-left",
|
|
6705
|
-
["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
|
|
6706
|
-
};
|
|
6707
|
-
const clickTransformationClass = clickTransformationClassNames[clickTransformation];
|
|
6708
|
-
return /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Transition, {
|
|
6709
|
-
mounted,
|
|
6710
|
-
transition: "fade",
|
|
6711
|
-
duration: theme.transitionDurations.short,
|
|
6712
|
-
timingFunction: "ease",
|
|
6713
|
-
...componentsProps?.transition,
|
|
6714
|
-
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
|
|
6715
|
-
children: [
|
|
6716
|
-
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.Tooltip, {
|
|
6717
|
-
label,
|
|
6718
|
-
...componentsProps?.tooltip,
|
|
6719
|
-
children: /* @__PURE__ */ jsx_runtime16.jsx(import_core8.ActionIcon, {
|
|
6720
|
-
"aria-label": label,
|
|
6721
|
-
variant,
|
|
6722
|
-
onClick,
|
|
6723
|
-
loading,
|
|
6724
|
-
size: size ? `input-${size}` : "input-sm",
|
|
6725
|
-
color,
|
|
6726
|
-
...componentsProps?.button,
|
|
6727
|
-
...componentsProps?.ActionIcon,
|
|
6728
|
-
hiddenFrom: !responsive ? undefined : breakpoint,
|
|
6729
|
-
display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
|
|
6730
|
-
style: import_lodash7.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
|
|
6731
|
-
className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
|
|
6732
|
-
children: iconElement
|
|
6733
|
-
})
|
|
6704
|
+
})
|
|
6705
|
+
]
|
|
6734
6706
|
}),
|
|
6735
|
-
/* @__PURE__ */
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
...componentsProps?.Button,
|
|
6744
|
-
visibleFrom: !responsive ? undefined : breakpoint,
|
|
6745
|
-
display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
|
|
6746
|
-
style: import_lodash7.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
|
|
6747
|
-
className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
|
|
6748
|
-
children: label
|
|
6707
|
+
/* @__PURE__ */ jsx_runtime13.jsx(import_core5.Group, {
|
|
6708
|
+
ref: rightSectionRef,
|
|
6709
|
+
h: "100%",
|
|
6710
|
+
gap: gutter,
|
|
6711
|
+
pl: 0,
|
|
6712
|
+
wrap: "nowrap",
|
|
6713
|
+
...componentsProps?.sectionContainers?.["right" /* Right */],
|
|
6714
|
+
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-right-section", componentsProps?.sectionContainers?.["right" /* Right */]?.className)
|
|
6749
6715
|
})
|
|
6750
6716
|
]
|
|
6751
6717
|
})
|
|
6752
6718
|
});
|
|
6753
6719
|
}
|
|
6720
|
+
var FrameLayout_default = Object.assign(FrameLayout, {
|
|
6721
|
+
Element: Element2
|
|
6722
|
+
});
|
|
6723
|
+
|
|
6724
|
+
// src/core/lib/errors.ts
|
|
6725
|
+
class InvalidComponentUsageError extends Error {
|
|
6726
|
+
constructor(component, rule) {
|
|
6727
|
+
super(`Invalid usage of '${component}': ${rule}`);
|
|
6728
|
+
this.name = "InvalidComponentUsageError";
|
|
6729
|
+
}
|
|
6730
|
+
}
|
|
6731
|
+
|
|
6732
|
+
// src/core/components/Page/PageContainer/index.tsx
|
|
6733
|
+
var import_core6 = require("@mantine/core");
|
|
6734
|
+
var jsx_runtime14 = require("react/jsx-runtime");
|
|
6735
|
+
function PageContainer({
|
|
6736
|
+
children,
|
|
6737
|
+
p = 0,
|
|
6738
|
+
hidden = false,
|
|
6739
|
+
componentsProps
|
|
6740
|
+
}) {
|
|
6741
|
+
const theme = useRemoraidTheme();
|
|
6742
|
+
return /* @__PURE__ */ jsx_runtime14.jsx(import_core6.Container, {
|
|
6743
|
+
size: theme.containerSize,
|
|
6744
|
+
p,
|
|
6745
|
+
w: "100%",
|
|
6746
|
+
"data-hidden": hidden,
|
|
6747
|
+
...componentsProps?.container,
|
|
6748
|
+
className: clsx_default("remoraid-page-container", componentsProps?.container?.className),
|
|
6749
|
+
children
|
|
6750
|
+
});
|
|
6751
|
+
}
|
|
6752
|
+
|
|
6753
|
+
// src/core/components/FrameLayout/Element/index.tsx
|
|
6754
|
+
var import_lodash7 = __toESM(require_lodash());
|
|
6755
|
+
var jsx_runtime15 = require("react/jsx-runtime");
|
|
6756
|
+
var layoutElementContext = import_react14.createContext(null);
|
|
6757
|
+
var useFrameLayoutElement = () => {
|
|
6758
|
+
return import_react14.useContext(layoutElementContext);
|
|
6759
|
+
};
|
|
6760
|
+
function Element2({
|
|
6761
|
+
section,
|
|
6762
|
+
includeContainer = true,
|
|
6763
|
+
includePageContainer = false,
|
|
6764
|
+
layoutId,
|
|
6765
|
+
hidden = false,
|
|
6766
|
+
componentsProps,
|
|
6767
|
+
children
|
|
6768
|
+
}) {
|
|
6769
|
+
const { layouts } = useLayouts();
|
|
6770
|
+
const closestLayout = useFrameLayout();
|
|
6771
|
+
if (!closestLayout) {
|
|
6772
|
+
throw new InvalidComponentUsageError("FrameLayout.Element", "must be used as child of 'FrameLayout'.");
|
|
6773
|
+
}
|
|
6774
|
+
const layout = layouts[layoutId ?? closestLayout.layoutId];
|
|
6775
|
+
if (!layout) {
|
|
6776
|
+
return null;
|
|
6777
|
+
}
|
|
6778
|
+
if (layout.type !== "frame" /* Frame */) {
|
|
6779
|
+
throw new TypeError("Prop 'layoutId' in 'FrameLayout.Element' must refer to a valid 'FrameLayout' component. Leave 'layoutId' undefined, if you want to use the closest 'FrameLayout' as reference layout.");
|
|
6780
|
+
}
|
|
6781
|
+
if (!layout.sections[section]) {
|
|
6782
|
+
return null;
|
|
6783
|
+
}
|
|
6784
|
+
let containerProps = {};
|
|
6785
|
+
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
|
6786
|
+
containerProps.h = "100%";
|
|
6787
|
+
}
|
|
6788
|
+
const element = includePageContainer ? /* @__PURE__ */ jsx_runtime15.jsx(PageContainer, {
|
|
6789
|
+
p: 0,
|
|
6790
|
+
hidden,
|
|
6791
|
+
...componentsProps?.PageContainer,
|
|
6792
|
+
children
|
|
6793
|
+
}) : children;
|
|
6794
|
+
return /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Portal, {
|
|
6795
|
+
target: layout.sections[section],
|
|
6796
|
+
children: /* @__PURE__ */ jsx_runtime15.jsx(layoutElementContext.Provider, {
|
|
6797
|
+
value: { layoutType: "frame" /* Frame */, section },
|
|
6798
|
+
children: includeContainer ? /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
|
|
6799
|
+
"data-hidden": hidden,
|
|
6800
|
+
...import_lodash7.merge(containerProps, componentsProps?.container),
|
|
6801
|
+
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
6802
|
+
children: element
|
|
6803
|
+
}) : element
|
|
6804
|
+
})
|
|
6805
|
+
});
|
|
6806
|
+
}
|
|
6754
6807
|
|
|
6755
6808
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6756
|
-
var
|
|
6809
|
+
var jsx_runtime16 = require("react/jsx-runtime");
|
|
6757
6810
|
function NavbarMinimalContent({
|
|
6758
6811
|
orientation,
|
|
6759
6812
|
maxElements,
|
|
6760
6813
|
collapseStaticElementsBreakpoint: collapseStaticElementsBreakpointProp,
|
|
6814
|
+
includeDefaultNavigationElements = true,
|
|
6761
6815
|
componentsProps
|
|
6762
6816
|
}) {
|
|
6763
6817
|
const theme = useRemoraidTheme();
|
|
@@ -6785,7 +6839,7 @@ function NavbarMinimalContent({
|
|
|
6785
6839
|
buttonCollapsed = false;
|
|
6786
6840
|
}
|
|
6787
6841
|
const buttonClickTransformation = orientation === "horizontal" /* Horizontal */ ? "tiltRight" /* TiltRight */ : "default" /* Default */;
|
|
6788
|
-
const logoButton = app.logo ? /* @__PURE__ */
|
|
6842
|
+
const logoButton = app.logo ? /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6789
6843
|
label: app.name,
|
|
6790
6844
|
variant: "subtle",
|
|
6791
6845
|
icon: app.logo,
|
|
@@ -6806,9 +6860,9 @@ function NavbarMinimalContent({
|
|
|
6806
6860
|
componentsProps?.logoButton?.onClick?.(e);
|
|
6807
6861
|
}
|
|
6808
6862
|
}) : undefined;
|
|
6809
|
-
const button = (element, key) => /* @__PURE__ */
|
|
6863
|
+
const button = (element, key) => /* @__PURE__ */ jsx_runtime16.jsx(NavigationMenu, {
|
|
6810
6864
|
label: element.label,
|
|
6811
|
-
target: /* @__PURE__ */
|
|
6865
|
+
target: /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6812
6866
|
mounted: element.mounted,
|
|
6813
6867
|
label: element.label,
|
|
6814
6868
|
icon: element.icon,
|
|
@@ -6845,19 +6899,23 @@ function NavbarMinimalContent({
|
|
|
6845
6899
|
}, key);
|
|
6846
6900
|
const elements = [
|
|
6847
6901
|
...app.nav,
|
|
6848
|
-
...getDefaultNavigationElements({
|
|
6902
|
+
...includeDefaultNavigationElements ? getDefaultNavigationElements({
|
|
6903
|
+
colorScheme,
|
|
6904
|
+
setColorScheme,
|
|
6905
|
+
auth: app.auth
|
|
6906
|
+
}) : []
|
|
6849
6907
|
];
|
|
6850
6908
|
const buttons = elements.filter((element) => !element.static).sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).slice(0, maxElements).map((element, i) => button(element, `nav-element-${i}`));
|
|
6851
6909
|
const staticElements = elements.filter((element) => element.static);
|
|
6852
6910
|
const staticButtons = staticElements.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).map((element, i) => button(element, `static-nav-element-${i}`));
|
|
6853
6911
|
const collapseStaticElements = staticElements.filter((element) => element.mounted ?? true).length > 1;
|
|
6854
|
-
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */
|
|
6912
|
+
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Box, {
|
|
6855
6913
|
hiddenFrom: collapseStaticElementsBreakpoint,
|
|
6856
|
-
children: /* @__PURE__ */
|
|
6914
|
+
children: /* @__PURE__ */ jsx_runtime16.jsx(NavigationMenu, {
|
|
6857
6915
|
elements: staticElements,
|
|
6858
|
-
target: /* @__PURE__ */
|
|
6916
|
+
target: /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6859
6917
|
label: "Static elements",
|
|
6860
|
-
icon:
|
|
6918
|
+
icon: import_icons_react3.IconDots,
|
|
6861
6919
|
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
6862
6920
|
collapsed: orientation === "vertical" /* Vertical */ ? buttonCollapsed : true,
|
|
6863
6921
|
clickTransformation: buttonClickTransformation,
|
|
@@ -6876,41 +6934,41 @@ function NavbarMinimalContent({
|
|
|
6876
6934
|
}, componentsProps?.NavigationMenu?.componentsProps)
|
|
6877
6935
|
})
|
|
6878
6936
|
}) : null;
|
|
6879
|
-
return /* @__PURE__ */
|
|
6937
|
+
return /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Paper, {
|
|
6880
6938
|
bg: theme.transparentBackground,
|
|
6881
6939
|
h: "100%",
|
|
6882
6940
|
p: "md",
|
|
6883
6941
|
shadow: "md",
|
|
6884
6942
|
...componentsProps?.container,
|
|
6885
|
-
children: orientation === "vertical" /* Vertical */ ? /* @__PURE__ */
|
|
6943
|
+
children: orientation === "vertical" /* Vertical */ ? /* @__PURE__ */ jsx_runtime16.jsxs(import_core8.Stack, {
|
|
6886
6944
|
h: "100%",
|
|
6887
6945
|
children: [
|
|
6888
6946
|
logoButton,
|
|
6889
|
-
/* @__PURE__ */
|
|
6947
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.ScrollArea, {
|
|
6890
6948
|
flex: 1,
|
|
6891
|
-
children: /* @__PURE__ */
|
|
6949
|
+
children: /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Stack, {
|
|
6892
6950
|
children: buttons
|
|
6893
6951
|
})
|
|
6894
6952
|
}),
|
|
6895
|
-
/* @__PURE__ */
|
|
6953
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.Stack, {
|
|
6896
6954
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6897
6955
|
children: staticButtons
|
|
6898
6956
|
}),
|
|
6899
6957
|
staticMenuButton
|
|
6900
6958
|
]
|
|
6901
|
-
}) : /* @__PURE__ */
|
|
6959
|
+
}) : /* @__PURE__ */ jsx_runtime16.jsxs(import_core8.Group, {
|
|
6902
6960
|
wrap: "nowrap",
|
|
6903
6961
|
children: [
|
|
6904
6962
|
logoButton,
|
|
6905
|
-
/* @__PURE__ */
|
|
6963
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.ScrollArea, {
|
|
6906
6964
|
flex: 1,
|
|
6907
6965
|
style: { contain: "inline-size" },
|
|
6908
|
-
children: /* @__PURE__ */
|
|
6966
|
+
children: /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Group, {
|
|
6909
6967
|
wrap: "nowrap",
|
|
6910
6968
|
children: buttons
|
|
6911
6969
|
})
|
|
6912
6970
|
}),
|
|
6913
|
-
/* @__PURE__ */
|
|
6971
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.Group, {
|
|
6914
6972
|
wrap: "nowrap",
|
|
6915
6973
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6916
6974
|
children: staticButtons
|
|
@@ -6925,17 +6983,17 @@ function NavbarMinimalContent({
|
|
|
6925
6983
|
var import_lodash11 = __toESM(require_lodash());
|
|
6926
6984
|
|
|
6927
6985
|
// src/core/components/Pinnable/index.tsx
|
|
6928
|
-
var
|
|
6929
|
-
var
|
|
6930
|
-
var
|
|
6986
|
+
var import_react16 = require("react");
|
|
6987
|
+
var import_icons_react6 = require("@tabler/icons-react");
|
|
6988
|
+
var import_core11 = require("@mantine/core");
|
|
6931
6989
|
|
|
6932
6990
|
// src/core/components/Controls/ControlButton/index.tsx
|
|
6933
|
-
var
|
|
6934
|
-
var
|
|
6991
|
+
var import_core9 = require("@mantine/core");
|
|
6992
|
+
var import_icons_react4 = require("@tabler/icons-react");
|
|
6935
6993
|
var import_lodash9 = __toESM(require_lodash());
|
|
6936
|
-
var
|
|
6994
|
+
var jsx_runtime17 = require("react/jsx-runtime");
|
|
6937
6995
|
function ControlButton({
|
|
6938
|
-
icon:
|
|
6996
|
+
icon: Icon3 = import_icons_react4.IconClick,
|
|
6939
6997
|
mounted = true,
|
|
6940
6998
|
size = "xs",
|
|
6941
6999
|
iconSize = "tiny" /* Tiny */,
|
|
@@ -6946,17 +7004,17 @@ function ControlButton({
|
|
|
6946
7004
|
componentsProps
|
|
6947
7005
|
}) {
|
|
6948
7006
|
const theme = useRemoraidTheme();
|
|
6949
|
-
return /* @__PURE__ */
|
|
7007
|
+
return /* @__PURE__ */ jsx_runtime17.jsx(import_core9.Transition, {
|
|
6950
7008
|
mounted,
|
|
6951
7009
|
transition: "fade",
|
|
6952
7010
|
duration: theme.transitionDurations.short,
|
|
6953
7011
|
timingFunction: "ease",
|
|
6954
7012
|
...componentsProps?.transition,
|
|
6955
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7013
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime17.jsx(import_core9.Tooltip, {
|
|
6956
7014
|
label: tooltip,
|
|
6957
7015
|
disabled: !Boolean(tooltip),
|
|
6958
7016
|
...componentsProps?.tooltip,
|
|
6959
|
-
children: /* @__PURE__ */
|
|
7017
|
+
children: /* @__PURE__ */ jsx_runtime17.jsx(import_core9.ActionIcon, {
|
|
6960
7018
|
"data-control-button": true,
|
|
6961
7019
|
size,
|
|
6962
7020
|
color,
|
|
@@ -6967,7 +7025,7 @@ function ControlButton({
|
|
|
6967
7025
|
order,
|
|
6968
7026
|
...import_lodash9.merge(transitionStyle, componentsProps?.button?.style)
|
|
6969
7027
|
},
|
|
6970
|
-
children: /* @__PURE__ */
|
|
7028
|
+
children: /* @__PURE__ */ jsx_runtime17.jsx(Icon3, {
|
|
6971
7029
|
...import_lodash9.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6972
7030
|
})
|
|
6973
7031
|
})
|
|
@@ -6976,11 +7034,11 @@ function ControlButton({
|
|
|
6976
7034
|
}
|
|
6977
7035
|
|
|
6978
7036
|
// src/core/components/Controls/index.tsx
|
|
6979
|
-
var
|
|
6980
|
-
var
|
|
6981
|
-
var
|
|
7037
|
+
var import_react15 = require("react");
|
|
7038
|
+
var import_core10 = require("@mantine/core");
|
|
7039
|
+
var import_icons_react5 = require("@tabler/icons-react");
|
|
6982
7040
|
var import_lodash10 = __toESM(require_lodash());
|
|
6983
|
-
var
|
|
7041
|
+
var jsx_runtime18 = require("react/jsx-runtime");
|
|
6984
7042
|
function Controls({
|
|
6985
7043
|
groupRef,
|
|
6986
7044
|
mounted = true,
|
|
@@ -6994,12 +7052,12 @@ function Controls({
|
|
|
6994
7052
|
const additionalButtons = additionalButtonsProp?.map((additionalButton) => asElementOrPropsOfType(ControlButton, additionalButton, "Check the 'additionalButtons' property of 'Controls'."));
|
|
6995
7053
|
const children = asChildrenOfType(ControlButton, childrenProp, "Check children passed to 'Controls' component.");
|
|
6996
7054
|
const theme = useRemoraidTheme();
|
|
6997
|
-
const [pos, setPos] =
|
|
7055
|
+
const [pos, setPos] = import_react15.useState({
|
|
6998
7056
|
x: 0,
|
|
6999
7057
|
y: 0
|
|
7000
7058
|
});
|
|
7001
|
-
const offsetRef =
|
|
7002
|
-
const containerRef =
|
|
7059
|
+
const offsetRef = import_react15.useRef({ x: 0, y: 0 });
|
|
7060
|
+
const containerRef = import_react15.useRef(null);
|
|
7003
7061
|
const clamp = (v, min, max) => {
|
|
7004
7062
|
return Math.min(Math.max(v, min), max);
|
|
7005
7063
|
};
|
|
@@ -7038,14 +7096,14 @@ function Controls({
|
|
|
7038
7096
|
const handlePointerUp = (e) => {
|
|
7039
7097
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
7040
7098
|
};
|
|
7041
|
-
return /* @__PURE__ */
|
|
7099
|
+
return /* @__PURE__ */ jsx_runtime18.jsx(import_core10.Transition, {
|
|
7042
7100
|
mounted,
|
|
7043
7101
|
keepMounted: true,
|
|
7044
7102
|
transition: "pop",
|
|
7045
7103
|
duration: theme.transitionDurations.short,
|
|
7046
7104
|
timingFunction: "ease",
|
|
7047
7105
|
...componentsProps?.transition,
|
|
7048
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7106
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime18.jsx(import_core10.Paper, {
|
|
7049
7107
|
ref: containerRef,
|
|
7050
7108
|
pos: "absolute",
|
|
7051
7109
|
p: gutter,
|
|
@@ -7061,14 +7119,14 @@ function Controls({
|
|
|
7061
7119
|
...import_lodash10.merge(transitionStyle, componentsProps?.container?.style)
|
|
7062
7120
|
},
|
|
7063
7121
|
className: clsx_default("remoraid-controls", componentsProps?.container?.className),
|
|
7064
|
-
children: /* @__PURE__ */
|
|
7122
|
+
children: /* @__PURE__ */ jsx_runtime18.jsxs(import_core10.Group, {
|
|
7065
7123
|
gap: gutter,
|
|
7066
7124
|
ref: groupRef,
|
|
7067
7125
|
wrap: "nowrap",
|
|
7068
7126
|
...componentsProps?.group,
|
|
7069
7127
|
className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
|
|
7070
7128
|
children: [
|
|
7071
|
-
/* @__PURE__ */
|
|
7129
|
+
/* @__PURE__ */ jsx_runtime18.jsx(import_icons_react5.IconGripHorizontal, {
|
|
7072
7130
|
...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
|
|
7073
7131
|
}),
|
|
7074
7132
|
children,
|
|
@@ -7076,7 +7134,7 @@ function Controls({
|
|
|
7076
7134
|
if (isValidElementOfType(ControlButton, button)) {
|
|
7077
7135
|
return button;
|
|
7078
7136
|
}
|
|
7079
|
-
return /* @__PURE__ */
|
|
7137
|
+
return /* @__PURE__ */ jsx_runtime18.jsx(ControlButton, {
|
|
7080
7138
|
...button
|
|
7081
7139
|
}, i);
|
|
7082
7140
|
})
|
|
@@ -7087,7 +7145,7 @@ function Controls({
|
|
|
7087
7145
|
}
|
|
7088
7146
|
|
|
7089
7147
|
// src/core/components/Pinnable/index.tsx
|
|
7090
|
-
var
|
|
7148
|
+
var jsx_runtime19 = require("react/jsx-runtime");
|
|
7091
7149
|
function Pinnable({
|
|
7092
7150
|
layoutType: layoutTypeProp,
|
|
7093
7151
|
section,
|
|
@@ -7101,14 +7159,14 @@ function Pinnable({
|
|
|
7101
7159
|
}) {
|
|
7102
7160
|
const layoutType = layoutTypeProp ?? "frame" /* Frame */;
|
|
7103
7161
|
const { layouts } = useLayouts();
|
|
7104
|
-
const [pinned, setPinned] =
|
|
7105
|
-
const containerRef =
|
|
7162
|
+
const [pinned, setPinned] = import_react16.useState(initialValue);
|
|
7163
|
+
const containerRef = import_react16.useRef(null);
|
|
7106
7164
|
const layout = layouts[layoutId ?? remoraidAppShellLayoutId];
|
|
7107
7165
|
if (layout && layout.type !== layoutType) {
|
|
7108
7166
|
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.`);
|
|
7109
7167
|
}
|
|
7110
|
-
const controlButton =
|
|
7111
|
-
icon: pinned ?
|
|
7168
|
+
const controlButton = import_react16.useMemo(() => /* @__PURE__ */ jsx_runtime19.jsx(ControlButton, {
|
|
7169
|
+
icon: pinned ? import_icons_react6.IconPinnedOff : import_icons_react6.IconPin,
|
|
7112
7170
|
tooltip: pinned ? "Unpin" : "Pin",
|
|
7113
7171
|
color: "green",
|
|
7114
7172
|
order: 100,
|
|
@@ -7118,7 +7176,7 @@ function Pinnable({
|
|
|
7118
7176
|
componentsProps?.button?.onClick?.(e);
|
|
7119
7177
|
}
|
|
7120
7178
|
}), [pinned, componentsProps?.button]);
|
|
7121
|
-
const element = /* @__PURE__ */
|
|
7179
|
+
const element = /* @__PURE__ */ jsx_runtime19.jsxs(import_core11.Box, {
|
|
7122
7180
|
pos: "relative",
|
|
7123
7181
|
ref: containerRef,
|
|
7124
7182
|
"data-hidden": hidden,
|
|
@@ -7126,25 +7184,25 @@ function Pinnable({
|
|
|
7126
7184
|
...componentsProps?.container,
|
|
7127
7185
|
className: clsx_default("remoraid-pinnable", componentsProps?.container?.className),
|
|
7128
7186
|
children: [
|
|
7129
|
-
controlsContainer === undefined ? /* @__PURE__ */
|
|
7187
|
+
controlsContainer === undefined ? /* @__PURE__ */ jsx_runtime19.jsx(Controls, {
|
|
7130
7188
|
dragContainerRef: containerRef,
|
|
7131
7189
|
...componentsProps?.controls,
|
|
7132
7190
|
children: controlButton
|
|
7133
|
-
}) : controlsContainer !== null && /* @__PURE__ */
|
|
7191
|
+
}) : controlsContainer !== null && /* @__PURE__ */ jsx_runtime19.jsx(import_core11.Portal, {
|
|
7134
7192
|
target: controlsContainer,
|
|
7135
7193
|
children: controlButton
|
|
7136
7194
|
}),
|
|
7137
7195
|
children
|
|
7138
7196
|
]
|
|
7139
7197
|
});
|
|
7140
|
-
|
|
7198
|
+
import_react16.useEffect(() => {
|
|
7141
7199
|
onPinnedValueChange?.(pinned);
|
|
7142
7200
|
}, [pinned]);
|
|
7143
7201
|
if (!layout) {
|
|
7144
7202
|
return null;
|
|
7145
7203
|
}
|
|
7146
7204
|
if (pinned && layoutType === "frame" /* Frame */) {
|
|
7147
|
-
return /* @__PURE__ */
|
|
7205
|
+
return /* @__PURE__ */ jsx_runtime19.jsx(FrameLayout_default.Element, {
|
|
7148
7206
|
layoutId,
|
|
7149
7207
|
section,
|
|
7150
7208
|
hidden,
|
|
@@ -7156,9 +7214,10 @@ function Pinnable({
|
|
|
7156
7214
|
}
|
|
7157
7215
|
|
|
7158
7216
|
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
7159
|
-
var
|
|
7217
|
+
var jsx_runtime20 = require("react/jsx-runtime");
|
|
7160
7218
|
function NavbarMinimal({
|
|
7161
7219
|
pinnable = true,
|
|
7220
|
+
includeDefaultNavigationElements = true,
|
|
7162
7221
|
componentsProps
|
|
7163
7222
|
}) {
|
|
7164
7223
|
const {
|
|
@@ -7166,15 +7225,19 @@ function NavbarMinimal({
|
|
|
7166
7225
|
navbar: { position }
|
|
7167
7226
|
}
|
|
7168
7227
|
} = useAppShellUserExperience();
|
|
7169
|
-
const [hover, setHover] =
|
|
7228
|
+
const [hover, setHover] = import_react17.useState(false);
|
|
7170
7229
|
const handleEnter = () => {
|
|
7171
7230
|
setHover(true);
|
|
7172
7231
|
};
|
|
7173
7232
|
const handleLeave = () => {
|
|
7174
7233
|
setHover(false);
|
|
7175
7234
|
};
|
|
7235
|
+
const contentProps = {
|
|
7236
|
+
includeDefaultNavigationElements,
|
|
7237
|
+
...componentsProps?.content
|
|
7238
|
+
};
|
|
7176
7239
|
if (position === "left" /* Left */ || position === "right" /* Right */) {
|
|
7177
|
-
return /* @__PURE__ */
|
|
7240
|
+
return /* @__PURE__ */ jsx_runtime20.jsx(FrameLayout_default.Element, {
|
|
7178
7241
|
section: position,
|
|
7179
7242
|
includeContainer: true,
|
|
7180
7243
|
...componentsProps?.layoutElement,
|
|
@@ -7185,19 +7248,19 @@ function NavbarMinimal({
|
|
|
7185
7248
|
}
|
|
7186
7249
|
}
|
|
7187
7250
|
}, componentsProps?.layoutElement?.componentsProps),
|
|
7188
|
-
children: /* @__PURE__ */
|
|
7251
|
+
children: /* @__PURE__ */ jsx_runtime20.jsx(NavbarMinimalContent, {
|
|
7189
7252
|
orientation: "vertical" /* Vertical */,
|
|
7190
|
-
...
|
|
7253
|
+
...contentProps
|
|
7191
7254
|
})
|
|
7192
7255
|
});
|
|
7193
7256
|
}
|
|
7194
7257
|
if (position === "top" /* Top */ || position === "bottom" /* Bottom */) {
|
|
7195
|
-
const content = /* @__PURE__ */
|
|
7258
|
+
const content = /* @__PURE__ */ jsx_runtime20.jsx(NavbarMinimalContent, {
|
|
7196
7259
|
orientation: "horizontal" /* Horizontal */,
|
|
7197
|
-
...
|
|
7260
|
+
...contentProps
|
|
7198
7261
|
});
|
|
7199
7262
|
if (pinnable) {
|
|
7200
|
-
return /* @__PURE__ */
|
|
7263
|
+
return /* @__PURE__ */ jsx_runtime20.jsx(PageContainer, {
|
|
7201
7264
|
...componentsProps?.container,
|
|
7202
7265
|
componentsProps: {
|
|
7203
7266
|
...componentsProps?.container?.componentsProps,
|
|
@@ -7206,7 +7269,7 @@ function NavbarMinimal({
|
|
|
7206
7269
|
className: clsx_default("hide-if-empty", componentsProps?.container?.componentsProps?.container?.className)
|
|
7207
7270
|
}
|
|
7208
7271
|
},
|
|
7209
|
-
children: /* @__PURE__ */
|
|
7272
|
+
children: /* @__PURE__ */ jsx_runtime20.jsx(Pinnable, {
|
|
7210
7273
|
section: position,
|
|
7211
7274
|
initialValue: true,
|
|
7212
7275
|
...componentsProps?.Pinnable,
|
|
@@ -7249,11 +7312,11 @@ function NavbarMinimal({
|
|
|
7249
7312
|
return content;
|
|
7250
7313
|
}
|
|
7251
7314
|
if (position === "content" /* Content */) {
|
|
7252
|
-
return /* @__PURE__ */
|
|
7315
|
+
return /* @__PURE__ */ jsx_runtime20.jsx(PageContainer, {
|
|
7253
7316
|
...componentsProps?.container,
|
|
7254
|
-
children: /* @__PURE__ */
|
|
7317
|
+
children: /* @__PURE__ */ jsx_runtime20.jsx(NavbarMinimalContent, {
|
|
7255
7318
|
orientation: "horizontal" /* Horizontal */,
|
|
7256
|
-
...
|
|
7319
|
+
...contentProps
|
|
7257
7320
|
})
|
|
7258
7321
|
});
|
|
7259
7322
|
}
|
|
@@ -7261,19 +7324,8 @@ function NavbarMinimal({
|
|
|
7261
7324
|
}
|
|
7262
7325
|
|
|
7263
7326
|
// src/core/components/AppShell/Navbar/index.tsx
|
|
7264
|
-
var
|
|
7265
|
-
var
|
|
7266
|
-
var supportedNavbarPositions = {
|
|
7267
|
-
["minimal" /* Minimal */]: [
|
|
7268
|
-
null,
|
|
7269
|
-
"top" /* Top */,
|
|
7270
|
-
"bottom" /* Bottom */,
|
|
7271
|
-
"left" /* Left */,
|
|
7272
|
-
"right" /* Right */,
|
|
7273
|
-
"content" /* Content */
|
|
7274
|
-
]
|
|
7275
|
-
};
|
|
7276
|
-
var defaultNavbarPositions = { ["minimal" /* Minimal */]: "left" /* Left */ };
|
|
7327
|
+
var import_icons_react7 = require("@tabler/icons-react");
|
|
7328
|
+
var jsx_runtime21 = require("react/jsx-runtime");
|
|
7277
7329
|
var getDefaultNavigationElements = ({
|
|
7278
7330
|
colorScheme,
|
|
7279
7331
|
setColorScheme,
|
|
@@ -7282,7 +7334,7 @@ var getDefaultNavigationElements = ({
|
|
|
7282
7334
|
{
|
|
7283
7335
|
type: "button" /* Button */,
|
|
7284
7336
|
label: colorScheme === "dark" ? "Light mode" : "Dark mode",
|
|
7285
|
-
icon: colorScheme === "dark" ?
|
|
7337
|
+
icon: colorScheme === "dark" ? import_icons_react7.IconSun : import_icons_react7.IconMoon,
|
|
7286
7338
|
static: true,
|
|
7287
7339
|
onClick: () => {
|
|
7288
7340
|
if (!colorScheme || !setColorScheme) {
|
|
@@ -7297,14 +7349,14 @@ var getDefaultNavigationElements = ({
|
|
|
7297
7349
|
label: "Login",
|
|
7298
7350
|
href: "/login",
|
|
7299
7351
|
static: true,
|
|
7300
|
-
icon:
|
|
7352
|
+
icon: import_icons_react7.IconLogin
|
|
7301
7353
|
},
|
|
7302
7354
|
{
|
|
7303
7355
|
mounted: auth !== undefined && auth.user !== null,
|
|
7304
7356
|
type: "button" /* Button */,
|
|
7305
7357
|
label: "Logout",
|
|
7306
7358
|
static: true,
|
|
7307
|
-
icon:
|
|
7359
|
+
icon: import_icons_react7.IconLogout,
|
|
7308
7360
|
onClick: () => {
|
|
7309
7361
|
auth?.onLogout?.();
|
|
7310
7362
|
}
|
|
@@ -7313,7 +7365,7 @@ var getDefaultNavigationElements = ({
|
|
|
7313
7365
|
function Navbar({ componentsProps }) {
|
|
7314
7366
|
const { navbarVariant } = useRemoraidApp();
|
|
7315
7367
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
7316
|
-
return /* @__PURE__ */
|
|
7368
|
+
return /* @__PURE__ */ jsx_runtime21.jsx(NavbarMinimal, {
|
|
7317
7369
|
...componentsProps?.NavbarMinimal
|
|
7318
7370
|
});
|
|
7319
7371
|
}
|
|
@@ -7323,60 +7375,60 @@ var Navbar_default = Object.assign(Navbar, {
|
|
|
7323
7375
|
NavbarMinimal
|
|
7324
7376
|
});
|
|
7325
7377
|
|
|
7326
|
-
// src/core/components/AppShell/
|
|
7327
|
-
var
|
|
7328
|
-
var
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
footer: {
|
|
7335
|
-
position: null
|
|
7336
|
-
}
|
|
7337
|
-
};
|
|
7338
|
-
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
7339
|
-
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
7340
|
-
var useAppShellUserExperience = () => {
|
|
7341
|
-
return import_react17.useContext(appShellUserExperienceContext);
|
|
7342
|
-
};
|
|
7343
|
-
function AppShellUserExperienceProvider({
|
|
7344
|
-
children,
|
|
7345
|
-
initialValue,
|
|
7346
|
-
cookieName
|
|
7378
|
+
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
7379
|
+
var import_core12 = require("@mantine/core");
|
|
7380
|
+
var import_icons_react8 = require("@tabler/icons-react");
|
|
7381
|
+
var import_lodash12 = __toESM(require_lodash());
|
|
7382
|
+
var jsx_runtime22 = require("react/jsx-runtime");
|
|
7383
|
+
function FooterMinimal({
|
|
7384
|
+
icon: Icon4 = import_icons_react8.IconPennant,
|
|
7385
|
+
componentsProps
|
|
7347
7386
|
}) {
|
|
7348
|
-
const
|
|
7349
|
-
const
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
}
|
|
7353
|
-
if (x === null) {
|
|
7354
|
-
return false;
|
|
7355
|
-
}
|
|
7356
|
-
if (!("navbar" in x)) {
|
|
7357
|
-
return false;
|
|
7358
|
-
}
|
|
7359
|
-
if (!("footer" in x)) {
|
|
7360
|
-
return false;
|
|
7387
|
+
const theme = useRemoraidTheme();
|
|
7388
|
+
const {
|
|
7389
|
+
userExperience: {
|
|
7390
|
+
footer: { position }
|
|
7361
7391
|
}
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
},
|
|
7373
|
-
footer: {
|
|
7374
|
-
position: footerVariant === null ? null : defaultFooterPositions[footerVariant]
|
|
7375
|
-
}
|
|
7376
|
-
}, initialValue),
|
|
7377
|
-
children
|
|
7392
|
+
} = useAppShellUserExperience();
|
|
7393
|
+
const content = /* @__PURE__ */ jsx_runtime22.jsx(PageContainer, {
|
|
7394
|
+
...componentsProps?.container,
|
|
7395
|
+
children: /* @__PURE__ */ jsx_runtime22.jsx(import_core12.Center, {
|
|
7396
|
+
children: /* @__PURE__ */ jsx_runtime22.jsx(Icon4, {
|
|
7397
|
+
color: "var(--mantine-color-disabled)",
|
|
7398
|
+
...theme.componentsProps.icons.huge,
|
|
7399
|
+
...componentsProps?.icon
|
|
7400
|
+
})
|
|
7401
|
+
})
|
|
7378
7402
|
});
|
|
7403
|
+
if (position === "bottom" /* Bottom */) {
|
|
7404
|
+
return /* @__PURE__ */ jsx_runtime22.jsx(FrameLayout_default.Element, {
|
|
7405
|
+
section: position,
|
|
7406
|
+
includeContainer: true,
|
|
7407
|
+
...componentsProps?.layoutElement,
|
|
7408
|
+
componentsProps: import_lodash12.merge({ container: { style: { order: -50 } } }, componentsProps?.layoutElement?.componentsProps),
|
|
7409
|
+
children: content
|
|
7410
|
+
});
|
|
7411
|
+
}
|
|
7412
|
+
if (position === "content" /* Content */) {
|
|
7413
|
+
return content;
|
|
7414
|
+
}
|
|
7415
|
+
return null;
|
|
7416
|
+
}
|
|
7417
|
+
|
|
7418
|
+
// src/core/components/AppShell/Footer/index.tsx
|
|
7419
|
+
var jsx_runtime23 = require("react/jsx-runtime");
|
|
7420
|
+
function Footer({ componentsProps }) {
|
|
7421
|
+
const { footerVariant } = useRemoraidApp();
|
|
7422
|
+
if (footerVariant === "minimal" /* Minimal */) {
|
|
7423
|
+
return /* @__PURE__ */ jsx_runtime23.jsx(FooterMinimal, {
|
|
7424
|
+
...componentsProps?.FooterMinimal
|
|
7425
|
+
});
|
|
7426
|
+
}
|
|
7427
|
+
return null;
|
|
7379
7428
|
}
|
|
7429
|
+
var Footer_default = Object.assign(Footer, {
|
|
7430
|
+
FooterMinimal
|
|
7431
|
+
});
|
|
7380
7432
|
|
|
7381
7433
|
// src/core/components/AppShell/index.tsx
|
|
7382
7434
|
var jsx_runtime24 = require("react/jsx-runtime");
|
|
@@ -7483,23 +7535,28 @@ var import_react20 = require("react");
|
|
|
7483
7535
|
|
|
7484
7536
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
7485
7537
|
var import_core15 = require("@mantine/core");
|
|
7538
|
+
var import_lodash14 = __toESM(require_lodash());
|
|
7486
7539
|
var jsx_runtime26 = require("react/jsx-runtime");
|
|
7487
7540
|
function ScrollableChipGroup({
|
|
7488
7541
|
value,
|
|
7489
|
-
ref,
|
|
7490
7542
|
onChange,
|
|
7491
7543
|
gap = "xs",
|
|
7492
7544
|
componentsProps,
|
|
7493
7545
|
children
|
|
7494
7546
|
}) {
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
...componentsProps?.
|
|
7498
|
-
|
|
7547
|
+
const theme = useRemoraidTheme();
|
|
7548
|
+
return /* @__PURE__ */ jsx_runtime26.jsx(import_core15.Scroller, {
|
|
7549
|
+
...theme.componentsProps?.Scroller,
|
|
7550
|
+
...componentsProps?.Scroller,
|
|
7551
|
+
className: clsx_default("remoraid-masked-scroller", theme.componentsProps?.Scroller?.className, componentsProps?.Scroller?.className),
|
|
7552
|
+
style: import_lodash14.merge({ contain: "inline-size" }, theme.componentsProps?.Scroller?.style, componentsProps?.Scroller?.style),
|
|
7553
|
+
attributes: import_lodash14.merge({
|
|
7554
|
+
container: { "data-remoraid-scroller-container": true }
|
|
7555
|
+
}, theme.componentsProps?.Scroller?.attributes, componentsProps?.Scroller?.attributes),
|
|
7499
7556
|
children: /* @__PURE__ */ jsx_runtime26.jsx(import_core15.Chip.Group, {
|
|
7500
7557
|
value,
|
|
7501
7558
|
onChange,
|
|
7502
|
-
...componentsProps?.
|
|
7559
|
+
...componentsProps?.ChipGroup,
|
|
7503
7560
|
multiple: true,
|
|
7504
7561
|
children: /* @__PURE__ */ jsx_runtime26.jsx(import_core15.Flex, {
|
|
7505
7562
|
justify: "flex-start",
|
|
@@ -7514,12 +7571,12 @@ function ScrollableChipGroup({
|
|
|
7514
7571
|
}
|
|
7515
7572
|
|
|
7516
7573
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
7517
|
-
var
|
|
7574
|
+
var import_lodash15 = __toESM(require_lodash());
|
|
7518
7575
|
var jsx_runtime27 = require("react/jsx-runtime");
|
|
7519
7576
|
function WidgetSelectionHeader({
|
|
7520
7577
|
title,
|
|
7521
7578
|
pinnableSection = "top" /* Top */,
|
|
7522
|
-
initiallyPinned
|
|
7579
|
+
initiallyPinned: initiallyPinnedProp,
|
|
7523
7580
|
disabledWidgets,
|
|
7524
7581
|
componentsProps
|
|
7525
7582
|
}) {
|
|
@@ -7535,6 +7592,7 @@ function WidgetSelectionHeader({
|
|
|
7535
7592
|
if (!page) {
|
|
7536
7593
|
throw new InvalidComponentUsageError("WidgetSelectionHeader", "must be used as child of 'Page'.");
|
|
7537
7594
|
}
|
|
7595
|
+
const initiallyPinned = pinnableSection ? initiallyPinnedProp ?? true : false;
|
|
7538
7596
|
const [hover, setHover] = import_react20.useState(false);
|
|
7539
7597
|
const [isPinned, setIsPinned] = import_react20.useState(initiallyPinned);
|
|
7540
7598
|
const handleEnter = () => {
|
|
@@ -7543,7 +7601,7 @@ function WidgetSelectionHeader({
|
|
|
7543
7601
|
const handleLeave = () => {
|
|
7544
7602
|
setHover(false);
|
|
7545
7603
|
};
|
|
7546
|
-
const
|
|
7604
|
+
const containerRef = import_react20.useRef(null);
|
|
7547
7605
|
const widgets = widgetsContext2.widgets[page.pageId] ?? {};
|
|
7548
7606
|
const selectedWidgets = Object.entries(widgets).reduce((t, [widgetId, widget]) => widget?.selected ? [...t, widgetId] : t, []);
|
|
7549
7607
|
const element = /* @__PURE__ */ jsx_runtime27.jsxs(import_core16.Flex, {
|
|
@@ -7551,6 +7609,7 @@ function WidgetSelectionHeader({
|
|
|
7551
7609
|
align: "center",
|
|
7552
7610
|
gap: "md",
|
|
7553
7611
|
...componentsProps?.container,
|
|
7612
|
+
ref: containerRef,
|
|
7554
7613
|
onMouseEnter: (e) => {
|
|
7555
7614
|
if (!pinnableSection) {
|
|
7556
7615
|
handleEnter();
|
|
@@ -7561,13 +7620,14 @@ function WidgetSelectionHeader({
|
|
|
7561
7620
|
if (!pinnableSection) {
|
|
7562
7621
|
handleLeave();
|
|
7563
7622
|
}
|
|
7564
|
-
componentsProps?.container?.
|
|
7623
|
+
componentsProps?.container?.onMouseLeave?.(e);
|
|
7565
7624
|
},
|
|
7566
7625
|
className: clsx_default(!pinnableSection ? "remoraid-non-widget-segment" : undefined, !pinnableSection ? "remoraid-segment" : undefined, componentsProps?.container?.className),
|
|
7567
7626
|
children: [
|
|
7568
7627
|
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Text, {
|
|
7569
7628
|
size: "md",
|
|
7570
7629
|
...componentsProps?.title,
|
|
7630
|
+
style: { whiteSpace: "nowrap", ...componentsProps?.title?.style },
|
|
7571
7631
|
children: title ?? page.name
|
|
7572
7632
|
}),
|
|
7573
7633
|
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Divider, {
|
|
@@ -7576,13 +7636,17 @@ function WidgetSelectionHeader({
|
|
|
7576
7636
|
}),
|
|
7577
7637
|
isPageRegistered(page.pageId) && /* @__PURE__ */ jsx_runtime27.jsx(ScrollableChipGroup, {
|
|
7578
7638
|
value: selectedWidgets,
|
|
7579
|
-
ref: scrollAreaRef,
|
|
7580
7639
|
...componentsProps?.ScrollableChipGroup,
|
|
7581
7640
|
onChange: (value) => {
|
|
7582
7641
|
updateWidgetSelectionBulk(page.pageId, value);
|
|
7583
7642
|
componentsProps?.ScrollableChipGroup?.onChange?.(value);
|
|
7584
7643
|
},
|
|
7585
|
-
componentsProps:
|
|
7644
|
+
componentsProps: import_lodash15.merge({
|
|
7645
|
+
Scroller: {
|
|
7646
|
+
flex: 1,
|
|
7647
|
+
miw: 0
|
|
7648
|
+
}
|
|
7649
|
+
}, componentsProps?.ScrollableChipGroup?.componentsProps),
|
|
7586
7650
|
children: Object.entries(widgets).map(([widgetId, widget]) => {
|
|
7587
7651
|
if (!widget) {
|
|
7588
7652
|
return;
|
|
@@ -7603,12 +7667,15 @@ function WidgetSelectionHeader({
|
|
|
7603
7667
|
...theme.componentsProps.icons.extraSmall
|
|
7604
7668
|
}),
|
|
7605
7669
|
...componentsProps?.Chip,
|
|
7606
|
-
styles:
|
|
7670
|
+
styles: import_lodash15.merge({
|
|
7607
7671
|
label: {
|
|
7608
7672
|
transition: "background-color var(--remoraid-transition-duration-short)"
|
|
7609
7673
|
}
|
|
7610
7674
|
}, componentsProps?.Chip?.styles),
|
|
7611
|
-
|
|
7675
|
+
wrapperProps: {
|
|
7676
|
+
...componentsProps?.Chip?.wrapperProps,
|
|
7677
|
+
id: `remoraid-widget-selection-header-chip-${widgetId}`
|
|
7678
|
+
},
|
|
7612
7679
|
children: widget.name
|
|
7613
7680
|
})
|
|
7614
7681
|
})
|
|
@@ -7649,19 +7716,20 @@ function WidgetSelectionHeader({
|
|
|
7649
7716
|
if (!activeWidget) {
|
|
7650
7717
|
return;
|
|
7651
7718
|
}
|
|
7652
|
-
if (!
|
|
7719
|
+
if (!containerRef?.current) {
|
|
7653
7720
|
return;
|
|
7654
7721
|
}
|
|
7655
|
-
|
|
7722
|
+
const activeWidgetChipElement = containerRef.current.querySelector(`#remoraid-widget-selection-header-chip-${activeWidget}`);
|
|
7723
|
+
if (!activeWidgetChipElement) {
|
|
7656
7724
|
return;
|
|
7657
7725
|
}
|
|
7658
|
-
const
|
|
7659
|
-
if (!
|
|
7726
|
+
const scrollContainerElement = activeWidgetChipElement.closest("[data-remoraid-scroller-container]");
|
|
7727
|
+
if (!scrollContainerElement) {
|
|
7660
7728
|
return;
|
|
7661
7729
|
}
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7730
|
+
scrollContainerElement.scrollTo({
|
|
7731
|
+
left: activeWidgetChipElement.offsetLeft - scrollContainerElement.clientWidth / 2 + activeWidgetChipElement.clientWidth / 2,
|
|
7732
|
+
behavior: "smooth"
|
|
7665
7733
|
});
|
|
7666
7734
|
}, [activeWidget]);
|
|
7667
7735
|
if (pinnableSection) {
|
|
@@ -7745,7 +7813,7 @@ function BadgeMinimal({
|
|
|
7745
7813
|
}
|
|
7746
7814
|
|
|
7747
7815
|
// src/core/components/BadgeGroup/index.tsx
|
|
7748
|
-
var
|
|
7816
|
+
var import_lodash16 = __toESM(require_lodash());
|
|
7749
7817
|
var jsx_runtime29 = require("react/jsx-runtime");
|
|
7750
7818
|
var react = require("react");
|
|
7751
7819
|
function BadgeGroup({
|
|
@@ -7793,7 +7861,7 @@ function BadgeGroup({
|
|
|
7793
7861
|
...componentsProps?.cumulativeBadge,
|
|
7794
7862
|
style: {
|
|
7795
7863
|
cursor: "pointer",
|
|
7796
|
-
...
|
|
7864
|
+
...import_lodash16.merge(transitionStyle, componentsProps?.cumulativeBadge?.style)
|
|
7797
7865
|
},
|
|
7798
7866
|
children: [
|
|
7799
7867
|
numVisibleBadges,
|
|
@@ -7817,7 +7885,7 @@ function BadgeGroup({
|
|
|
7817
7885
|
}
|
|
7818
7886
|
// src/core/components/AlertMinimal/index.tsx
|
|
7819
7887
|
var import_core19 = require("@mantine/core");
|
|
7820
|
-
var
|
|
7888
|
+
var import_lodash17 = __toESM(require_lodash());
|
|
7821
7889
|
var jsx_runtime30 = require("react/jsx-runtime");
|
|
7822
7890
|
function AlertMinimal({
|
|
7823
7891
|
category,
|
|
@@ -7834,7 +7902,7 @@ function AlertMinimal({
|
|
|
7834
7902
|
icon: Icon4,
|
|
7835
7903
|
iconSize = "small" /* Small */,
|
|
7836
7904
|
componentsProps
|
|
7837
|
-
} =
|
|
7905
|
+
} = import_lodash17.merge({}, theme.componentsProps.alerts[category], props);
|
|
7838
7906
|
return /* @__PURE__ */ jsx_runtime30.jsx(import_core19.Transition, {
|
|
7839
7907
|
mounted,
|
|
7840
7908
|
transition: "fade",
|
|
@@ -7848,10 +7916,10 @@ function AlertMinimal({
|
|
|
7848
7916
|
onClose,
|
|
7849
7917
|
withCloseButton: onClose !== undefined,
|
|
7850
7918
|
icon: Icon4 ? /* @__PURE__ */ jsx_runtime30.jsx(Icon4, {
|
|
7851
|
-
...
|
|
7919
|
+
...import_lodash17.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
7852
7920
|
}) : undefined,
|
|
7853
7921
|
...componentsProps?.alert,
|
|
7854
|
-
style:
|
|
7922
|
+
style: import_lodash17.merge(transitionStyle, componentsProps?.alert?.style),
|
|
7855
7923
|
children: [
|
|
7856
7924
|
text,
|
|
7857
7925
|
children
|
|
@@ -7863,7 +7931,7 @@ function AlertMinimal({
|
|
|
7863
7931
|
var import_core20 = require("@mantine/core");
|
|
7864
7932
|
var import_react22 = require("react");
|
|
7865
7933
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
7866
|
-
var
|
|
7934
|
+
var import_lodash18 = __toESM(require_lodash());
|
|
7867
7935
|
var jsx_runtime31 = require("react/jsx-runtime");
|
|
7868
7936
|
function WidgetWrapper({
|
|
7869
7937
|
config,
|
|
@@ -7934,7 +8002,7 @@ function WidgetWrapper({
|
|
|
7934
8002
|
handleLeave(e);
|
|
7935
8003
|
componentsProps?.container?.onMouseLeave?.(e);
|
|
7936
8004
|
},
|
|
7937
|
-
style:
|
|
8005
|
+
style: import_lodash18.merge(transitionStyle, { flexDirection: "column" }, componentsProps?.container?.style),
|
|
7938
8006
|
className: clsx_default("remoraid-segment", componentsProps?.container?.className),
|
|
7939
8007
|
id: config.widgetId,
|
|
7940
8008
|
children: [
|
|
@@ -8008,7 +8076,7 @@ function WidgetWrapper({
|
|
|
8008
8076
|
// src/core/components/Widget/index.tsx
|
|
8009
8077
|
var import_core21 = require("@mantine/core");
|
|
8010
8078
|
var import_react23 = require("react");
|
|
8011
|
-
var
|
|
8079
|
+
var import_lodash19 = __toESM(require_lodash());
|
|
8012
8080
|
var jsx_runtime32 = require("react/jsx-runtime");
|
|
8013
8081
|
var react2 = require("react");
|
|
8014
8082
|
function Widget({
|
|
@@ -8080,7 +8148,7 @@ function Widget({
|
|
|
8080
8148
|
size: "sm",
|
|
8081
8149
|
c: "dimmed",
|
|
8082
8150
|
...componentsProps?.description,
|
|
8083
|
-
style:
|
|
8151
|
+
style: import_lodash19.merge(transitionStyle, componentsProps?.description?.style),
|
|
8084
8152
|
children: description
|
|
8085
8153
|
})
|
|
8086
8154
|
})
|
|
@@ -8351,7 +8419,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
8351
8419
|
Row
|
|
8352
8420
|
});
|
|
8353
8421
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
8354
|
-
var
|
|
8422
|
+
var import_lodash20 = __toESM(require_lodash());
|
|
8355
8423
|
var import_core25 = require("@mantine/core");
|
|
8356
8424
|
var jsx_runtime39 = require("react/jsx-runtime");
|
|
8357
8425
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
|
@@ -8362,7 +8430,7 @@ function NavbarSettingsWidget({
|
|
|
8362
8430
|
}) {
|
|
8363
8431
|
const additionalRows = additionalRowsProp?.map((additionalRow) => asElementOrPropsOfType(SettingsTable_default.Row, additionalRow, "Check the 'additionalRows' property of 'NavbarSettingsWidget'."));
|
|
8364
8432
|
const { userExperience, updateUserExperience, initialUserExperience } = useAppShellUserExperience();
|
|
8365
|
-
const
|
|
8433
|
+
const { navbarVariant, navbarMetadata: navbarMetadata2 } = useRemoraidApp();
|
|
8366
8434
|
const modeLabels = {
|
|
8367
8435
|
["responsive" /* Responsive */]: "Responsive",
|
|
8368
8436
|
["collapsed" /* Collapsed */]: "Collapsed",
|
|
@@ -8379,7 +8447,15 @@ function NavbarSettingsWidget({
|
|
|
8379
8447
|
widgetProps: {
|
|
8380
8448
|
id: defaultNavbarSettingsWidgetId,
|
|
8381
8449
|
title: "Navbar Settings",
|
|
8382
|
-
...widgetProps
|
|
8450
|
+
...widgetProps,
|
|
8451
|
+
alerts: [
|
|
8452
|
+
{
|
|
8453
|
+
category: "negative" /* Negative */,
|
|
8454
|
+
text: "This app does not contain a registered navbar.",
|
|
8455
|
+
mounted: navbarVariant === null
|
|
8456
|
+
},
|
|
8457
|
+
...widgetProps?.alerts ?? []
|
|
8458
|
+
]
|
|
8383
8459
|
},
|
|
8384
8460
|
onRestoreDefaultValues: () => {
|
|
8385
8461
|
updateUserExperience((prev) => ({
|
|
@@ -8387,15 +8463,15 @@ function NavbarSettingsWidget({
|
|
|
8387
8463
|
navbar: initialUserExperience.navbar
|
|
8388
8464
|
}));
|
|
8389
8465
|
},
|
|
8390
|
-
custom: !
|
|
8391
|
-
children: /* @__PURE__ */ jsx_runtime39.jsxs(SettingsTable_default, {
|
|
8466
|
+
custom: !import_lodash20.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
8467
|
+
children: navbarVariant !== null && /* @__PURE__ */ jsx_runtime39.jsxs(SettingsTable_default, {
|
|
8392
8468
|
...componentsProps?.table,
|
|
8393
8469
|
children: [
|
|
8394
8470
|
/* @__PURE__ */ jsx_runtime39.jsx(SettingsTable_default.Row, {
|
|
8395
8471
|
label: "Select navbar position",
|
|
8396
8472
|
children: /* @__PURE__ */ jsx_runtime39.jsx(import_core25.Select, {
|
|
8397
8473
|
value: userExperience.navbar.position ?? "hidden",
|
|
8398
|
-
data:
|
|
8474
|
+
data: navbarMetadata2.supportedPositions.map((position) => ({
|
|
8399
8475
|
value: position ?? "hidden",
|
|
8400
8476
|
label: position === null ? "Hidden" : positionLabels[position]
|
|
8401
8477
|
})),
|
|
@@ -8417,7 +8493,7 @@ function NavbarSettingsWidget({
|
|
|
8417
8493
|
label: "Select navbar mode",
|
|
8418
8494
|
children: /* @__PURE__ */ jsx_runtime39.jsx(import_core25.Select, {
|
|
8419
8495
|
value: userExperience.navbar.mode,
|
|
8420
|
-
data:
|
|
8496
|
+
data: navbarMetadata2.supportedModes.map((mode) => ({
|
|
8421
8497
|
value: mode,
|
|
8422
8498
|
label: modeLabels[mode]
|
|
8423
8499
|
})),
|
|
@@ -8445,7 +8521,7 @@ function NavbarSettingsWidget({
|
|
|
8445
8521
|
});
|
|
8446
8522
|
}
|
|
8447
8523
|
// src/core/components/FooterSettingsWidget/index.tsx
|
|
8448
|
-
var
|
|
8524
|
+
var import_lodash21 = __toESM(require_lodash());
|
|
8449
8525
|
var import_core26 = require("@mantine/core");
|
|
8450
8526
|
var jsx_runtime40 = require("react/jsx-runtime");
|
|
8451
8527
|
var defaultFooterSettingsWidgetId = "footer-settings";
|
|
@@ -8456,7 +8532,7 @@ function FooterSettingsWidget({
|
|
|
8456
8532
|
}) {
|
|
8457
8533
|
const additionalRows = additionalRowsProp?.map((additionalRow) => asElementOrPropsOfType(SettingsTable_default.Row, additionalRow, "Check the 'additionalRows' property of 'FooterSettingsWidget'."));
|
|
8458
8534
|
const { userExperience, updateUserExperience, initialUserExperience } = useAppShellUserExperience();
|
|
8459
|
-
const
|
|
8535
|
+
const { footerVariant, footerMetadata: footerMetadata2 } = useRemoraidApp();
|
|
8460
8536
|
const positionLabels = {
|
|
8461
8537
|
["bottom" /* Bottom */]: "Bottom",
|
|
8462
8538
|
["top" /* Top */]: "Top",
|
|
@@ -8468,7 +8544,15 @@ function FooterSettingsWidget({
|
|
|
8468
8544
|
widgetProps: {
|
|
8469
8545
|
id: defaultFooterSettingsWidgetId,
|
|
8470
8546
|
title: "Footer Settings",
|
|
8471
|
-
...widgetProps
|
|
8547
|
+
...widgetProps,
|
|
8548
|
+
alerts: [
|
|
8549
|
+
{
|
|
8550
|
+
category: "negative" /* Negative */,
|
|
8551
|
+
text: "This app does not contain a registered footer.",
|
|
8552
|
+
mounted: footerVariant === null
|
|
8553
|
+
},
|
|
8554
|
+
...widgetProps?.alerts ?? []
|
|
8555
|
+
]
|
|
8472
8556
|
},
|
|
8473
8557
|
onRestoreDefaultValues: () => {
|
|
8474
8558
|
updateUserExperience((prev) => ({
|
|
@@ -8476,15 +8560,15 @@ function FooterSettingsWidget({
|
|
|
8476
8560
|
footer: initialUserExperience.footer
|
|
8477
8561
|
}));
|
|
8478
8562
|
},
|
|
8479
|
-
custom: !
|
|
8480
|
-
children: /* @__PURE__ */ jsx_runtime40.jsxs(SettingsTable_default, {
|
|
8563
|
+
custom: !import_lodash21.isEqual(userExperience.footer, initialUserExperience.footer),
|
|
8564
|
+
children: footerVariant !== null && /* @__PURE__ */ jsx_runtime40.jsxs(SettingsTable_default, {
|
|
8481
8565
|
...componentsProps?.table,
|
|
8482
8566
|
children: [
|
|
8483
8567
|
/* @__PURE__ */ jsx_runtime40.jsx(SettingsTable_default.Row, {
|
|
8484
8568
|
label: "Select footer position",
|
|
8485
8569
|
children: /* @__PURE__ */ jsx_runtime40.jsx(import_core26.Select, {
|
|
8486
8570
|
value: userExperience.footer.position ?? "hidden",
|
|
8487
|
-
data:
|
|
8571
|
+
data: footerMetadata2.supportedPositions.map((position) => ({
|
|
8488
8572
|
value: position ?? "hidden",
|
|
8489
8573
|
label: position === null ? "Hidden" : positionLabels[position]
|
|
8490
8574
|
})),
|