@vuu-ui/vuu-shell 0.8.28-debug → 0.8.29-debug
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/cjs/index.js +54 -45
- package/cjs/index.js.map +3 -3
- package/esm/index.js +74 -65
- package/esm/index.js.map +3 -3
- package/index.css +18 -42
- package/index.css.map +3 -3
- package/package.json +9 -9
package/esm/index.js
CHANGED
|
@@ -1367,11 +1367,11 @@ import { List } from "@vuu-ui/vuu-ui-controls";
|
|
|
1367
1367
|
|
|
1368
1368
|
// src/layout-management/useLayoutManager.tsx
|
|
1369
1369
|
import React5, {
|
|
1370
|
-
useCallback as
|
|
1370
|
+
useCallback as useCallback8,
|
|
1371
1371
|
useContext as useContext2,
|
|
1372
|
-
useEffect as
|
|
1372
|
+
useEffect as useEffect5,
|
|
1373
1373
|
useRef as useRef4,
|
|
1374
|
-
useState as
|
|
1374
|
+
useState as useState6
|
|
1375
1375
|
} from "react";
|
|
1376
1376
|
import {
|
|
1377
1377
|
resolveJSONPath,
|
|
@@ -1670,14 +1670,23 @@ var ContextMenuProvider = ({
|
|
|
1670
1670
|
};
|
|
1671
1671
|
|
|
1672
1672
|
// ../vuu-popups/src/notifications/NotificationsProvider.tsx
|
|
1673
|
-
import React4, {
|
|
1674
|
-
import classNames from "clsx";
|
|
1675
|
-
import { getUniqueId } from "@vuu-ui/vuu-utils";
|
|
1673
|
+
import React4, { useContext } from "react";
|
|
1676
1674
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1677
|
-
var
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1675
|
+
var NotificationsContextObject = class {
|
|
1676
|
+
constructor() {
|
|
1677
|
+
this.notify = () => "have you forgotten to provide a NotificationsCenter?";
|
|
1678
|
+
this.setNotify = (dispatcher) => {
|
|
1679
|
+
this.notify = dispatcher;
|
|
1680
|
+
};
|
|
1681
|
+
}
|
|
1682
|
+
};
|
|
1683
|
+
var NotificationsContext = React4.createContext(
|
|
1684
|
+
new NotificationsContextObject()
|
|
1685
|
+
);
|
|
1686
|
+
var useNotifications = () => {
|
|
1687
|
+
const { notify } = useContext(NotificationsContext);
|
|
1688
|
+
return notify;
|
|
1689
|
+
};
|
|
1681
1690
|
|
|
1682
1691
|
// src/persistence-management/defaultApplicationJson.ts
|
|
1683
1692
|
var loadingApplicationJson = {
|
|
@@ -1719,7 +1728,7 @@ var defaultApplicationJson = {
|
|
|
1719
1728
|
|
|
1720
1729
|
// src/persistence-management/LocalPersistenceManager.ts
|
|
1721
1730
|
import { getLocalEntity, saveLocalEntity } from "@vuu-ui/vuu-filters";
|
|
1722
|
-
import { formatDate, getUniqueId
|
|
1731
|
+
import { formatDate, getUniqueId } from "@vuu-ui/vuu-utils";
|
|
1723
1732
|
var baseMetadataSaveLocation = "layouts/metadata";
|
|
1724
1733
|
var baseLayoutsSaveLocation = "layouts/layouts";
|
|
1725
1734
|
var _urlKey;
|
|
@@ -1782,7 +1791,7 @@ var LocalPersistenceManager = class {
|
|
|
1782
1791
|
return new Promise((resolve) => {
|
|
1783
1792
|
Promise.all([this.loadLayouts(), this.loadMetadata()]).then(
|
|
1784
1793
|
([existingLayouts, existingMetadata]) => {
|
|
1785
|
-
const id =
|
|
1794
|
+
const id = getUniqueId();
|
|
1786
1795
|
const newMetadata = {
|
|
1787
1796
|
...metadata,
|
|
1788
1797
|
id,
|
|
@@ -1872,14 +1881,14 @@ var LocalPersistenceManager = class {
|
|
|
1872
1881
|
_urlKey = new WeakMap();
|
|
1873
1882
|
|
|
1874
1883
|
// src/persistence-management/useLayoutContextMenuItems.tsx
|
|
1875
|
-
import { useCallback as
|
|
1884
|
+
import { useCallback as useCallback7, useMemo as useMemo4 } from "react";
|
|
1876
1885
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1877
1886
|
var useLayoutContextMenuItems = (setDialogState) => {
|
|
1878
1887
|
const { saveLayout } = useLayoutManager();
|
|
1879
|
-
const handleCloseDialog =
|
|
1888
|
+
const handleCloseDialog = useCallback7(() => {
|
|
1880
1889
|
setDialogState(void 0);
|
|
1881
1890
|
}, [setDialogState]);
|
|
1882
|
-
const handleSave =
|
|
1891
|
+
const handleSave = useCallback7(
|
|
1883
1892
|
(layoutMetadata) => {
|
|
1884
1893
|
saveLayout(layoutMetadata);
|
|
1885
1894
|
setDialogState(void 0);
|
|
@@ -1972,11 +1981,11 @@ var ensureLayoutHasTitle = (layout, layoutMetadata) => {
|
|
|
1972
1981
|
}
|
|
1973
1982
|
};
|
|
1974
1983
|
var LayoutManagementProvider = (props) => {
|
|
1975
|
-
const [layoutMetadata, setLayoutMetadata] =
|
|
1976
|
-
const [, forceRefresh] =
|
|
1977
|
-
const
|
|
1984
|
+
const [layoutMetadata, setLayoutMetadata] = useState6([]);
|
|
1985
|
+
const [, forceRefresh] = useState6({});
|
|
1986
|
+
const notify = useNotifications();
|
|
1978
1987
|
const applicationJSONRef = useRef4(loadingApplicationJson);
|
|
1979
|
-
const setApplicationJSON =
|
|
1988
|
+
const setApplicationJSON = useCallback8(
|
|
1980
1989
|
(applicationJSON, rerender = true) => {
|
|
1981
1990
|
applicationJSONRef.current = applicationJSON;
|
|
1982
1991
|
if (rerender) {
|
|
@@ -1985,7 +1994,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
1985
1994
|
},
|
|
1986
1995
|
[]
|
|
1987
1996
|
);
|
|
1988
|
-
const setApplicationLayout =
|
|
1997
|
+
const setApplicationLayout = useCallback8(
|
|
1989
1998
|
(layout, rerender = true) => {
|
|
1990
1999
|
setApplicationJSON(
|
|
1991
2000
|
{
|
|
@@ -1997,7 +2006,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
1997
2006
|
},
|
|
1998
2007
|
[setApplicationJSON]
|
|
1999
2008
|
);
|
|
2000
|
-
const setApplicationSettings =
|
|
2009
|
+
const setApplicationSettings = useCallback8(
|
|
2001
2010
|
(settings) => {
|
|
2002
2011
|
setApplicationJSON(
|
|
2003
2012
|
{
|
|
@@ -2012,13 +2021,13 @@ var LayoutManagementProvider = (props) => {
|
|
|
2012
2021
|
},
|
|
2013
2022
|
[setApplicationJSON]
|
|
2014
2023
|
);
|
|
2015
|
-
|
|
2024
|
+
useEffect5(() => {
|
|
2016
2025
|
const persistenceManager = getPersistenceManager();
|
|
2017
2026
|
persistenceManager.loadMetadata().then((metadata) => {
|
|
2018
2027
|
setLayoutMetadata(metadata);
|
|
2019
2028
|
}).catch((error2) => {
|
|
2020
2029
|
notify({
|
|
2021
|
-
type: "error"
|
|
2030
|
+
type: "error",
|
|
2022
2031
|
header: "Failed to Load Layouts",
|
|
2023
2032
|
body: "Could not load list of available layouts"
|
|
2024
2033
|
});
|
|
@@ -2028,7 +2037,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
2028
2037
|
setApplicationJSON(applicationJSON);
|
|
2029
2038
|
}).catch((error2) => {
|
|
2030
2039
|
notify({
|
|
2031
|
-
type: "error"
|
|
2040
|
+
type: "error",
|
|
2032
2041
|
header: "Failed to Load Layout",
|
|
2033
2042
|
body: "Could not load your latest view"
|
|
2034
2043
|
});
|
|
@@ -2038,7 +2047,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
2038
2047
|
);
|
|
2039
2048
|
});
|
|
2040
2049
|
}, [notify, setApplicationJSON]);
|
|
2041
|
-
const saveApplicationLayout =
|
|
2050
|
+
const saveApplicationLayout = useCallback8(
|
|
2042
2051
|
(layout) => {
|
|
2043
2052
|
if (isLayoutJSON(layout)) {
|
|
2044
2053
|
setApplicationLayout(layout, false);
|
|
@@ -2049,7 +2058,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
2049
2058
|
},
|
|
2050
2059
|
[setApplicationLayout]
|
|
2051
2060
|
);
|
|
2052
|
-
const saveLayout =
|
|
2061
|
+
const saveLayout = useCallback8(
|
|
2053
2062
|
(metadata) => {
|
|
2054
2063
|
const layoutToSave = resolveJSONPath(
|
|
2055
2064
|
applicationJSONRef.current.layout,
|
|
@@ -2058,14 +2067,14 @@ var LayoutManagementProvider = (props) => {
|
|
|
2058
2067
|
if (layoutToSave && isLayoutJSON(layoutToSave)) {
|
|
2059
2068
|
getPersistenceManager().createLayout(metadata, ensureLayoutHasTitle(layoutToSave, metadata)).then((metadata2) => {
|
|
2060
2069
|
notify({
|
|
2061
|
-
type: "success"
|
|
2070
|
+
type: "success",
|
|
2062
2071
|
header: "Layout Saved Successfully",
|
|
2063
2072
|
body: `${metadata2.name} saved successfully`
|
|
2064
2073
|
});
|
|
2065
2074
|
setLayoutMetadata((prev) => [...prev, metadata2]);
|
|
2066
2075
|
}).catch((error2) => {
|
|
2067
2076
|
notify({
|
|
2068
|
-
type: "error"
|
|
2077
|
+
type: "error",
|
|
2069
2078
|
header: "Failed to Save Layout",
|
|
2070
2079
|
body: `Failed to save layout ${metadata.name}`
|
|
2071
2080
|
});
|
|
@@ -2074,7 +2083,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
2074
2083
|
} else {
|
|
2075
2084
|
console.error("Tried to save invalid layout", layoutToSave);
|
|
2076
2085
|
notify({
|
|
2077
|
-
type: "error"
|
|
2086
|
+
type: "error",
|
|
2078
2087
|
header: "Failed to Save Layout",
|
|
2079
2088
|
body: "Cannot save invalid layout"
|
|
2080
2089
|
});
|
|
@@ -2082,7 +2091,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
2082
2091
|
},
|
|
2083
2092
|
[notify]
|
|
2084
2093
|
);
|
|
2085
|
-
const saveApplicationSettings =
|
|
2094
|
+
const saveApplicationSettings = useCallback8(
|
|
2086
2095
|
(settings, key) => {
|
|
2087
2096
|
const { settings: applicationSettings } = applicationJSONRef.current;
|
|
2088
2097
|
if (key) {
|
|
@@ -2097,14 +2106,14 @@ var LayoutManagementProvider = (props) => {
|
|
|
2097
2106
|
},
|
|
2098
2107
|
[setApplicationSettings]
|
|
2099
2108
|
);
|
|
2100
|
-
const getApplicationSettings =
|
|
2109
|
+
const getApplicationSettings = useCallback8(
|
|
2101
2110
|
(key) => {
|
|
2102
2111
|
const { settings } = applicationJSONRef.current;
|
|
2103
2112
|
return key ? settings == null ? void 0 : settings[key] : settings;
|
|
2104
2113
|
},
|
|
2105
2114
|
[]
|
|
2106
2115
|
);
|
|
2107
|
-
const loadLayoutById =
|
|
2116
|
+
const loadLayoutById = useCallback8(
|
|
2108
2117
|
(id) => {
|
|
2109
2118
|
getPersistenceManager().loadLayout(id).then((layoutJson) => {
|
|
2110
2119
|
var _a, _b;
|
|
@@ -2119,7 +2128,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
2119
2128
|
});
|
|
2120
2129
|
}).catch((error2) => {
|
|
2121
2130
|
notify({
|
|
2122
|
-
type: "error"
|
|
2131
|
+
type: "error",
|
|
2123
2132
|
header: "Failed to Load Layout",
|
|
2124
2133
|
body: "Failed to load the requested layout"
|
|
2125
2134
|
});
|
|
@@ -2234,7 +2243,7 @@ import { Stack, useLayoutProviderDispatch } from "@vuu-ui/vuu-layout";
|
|
|
2234
2243
|
import { Tab, Tabstrip } from "@vuu-ui/vuu-ui-controls";
|
|
2235
2244
|
import { useThemeAttributes as useThemeAttributes2 } from "@vuu-ui/vuu-utils";
|
|
2236
2245
|
import cx6 from "clsx";
|
|
2237
|
-
import { useCallback as
|
|
2246
|
+
import { useCallback as useCallback9, useState as useState7 } from "react";
|
|
2238
2247
|
|
|
2239
2248
|
// src/feature-list/FeatureList.tsx
|
|
2240
2249
|
import { Palette, PaletteItem } from "@vuu-ui/vuu-layout";
|
|
@@ -2301,11 +2310,11 @@ var LeftNav = (props) => {
|
|
|
2301
2310
|
tableFeatures,
|
|
2302
2311
|
...htmlAttributes
|
|
2303
2312
|
} = props;
|
|
2304
|
-
const [navState, setNavState] =
|
|
2313
|
+
const [navState, setNavState] = useState7({
|
|
2305
2314
|
activeTabIndex: defaultActiveTabIndex,
|
|
2306
2315
|
expanded: defaultExpanded
|
|
2307
2316
|
});
|
|
2308
|
-
const getFullWidth =
|
|
2317
|
+
const getFullWidth = useCallback9(
|
|
2309
2318
|
(tabIndex, expanded) => {
|
|
2310
2319
|
if (tabIndex === 0) {
|
|
2311
2320
|
return expanded ? sizeExpanded : sizeCollapsed;
|
|
@@ -2315,7 +2324,7 @@ var LeftNav = (props) => {
|
|
|
2315
2324
|
},
|
|
2316
2325
|
[sizeCollapsed, sizeContent, sizeExpanded]
|
|
2317
2326
|
);
|
|
2318
|
-
const handleTabSelection =
|
|
2327
|
+
const handleTabSelection = useCallback9(
|
|
2319
2328
|
(activeTabIndex) => {
|
|
2320
2329
|
const { activeTabIndex: currentIndex, expanded } = navState;
|
|
2321
2330
|
const newState = { activeTabIndex, expanded };
|
|
@@ -2336,7 +2345,7 @@ var LeftNav = (props) => {
|
|
|
2336
2345
|
navState.activeTabIndex,
|
|
2337
2346
|
navState.expanded
|
|
2338
2347
|
);
|
|
2339
|
-
const toggleExpanded =
|
|
2348
|
+
const toggleExpanded = useCallback9(() => {
|
|
2340
2349
|
const { activeTabIndex, expanded } = navState;
|
|
2341
2350
|
const primaryMenuExpanded = !expanded;
|
|
2342
2351
|
const newState = { activeTabIndex, expanded: primaryMenuExpanded };
|
|
@@ -2428,11 +2437,11 @@ import {
|
|
|
2428
2437
|
import { Button as Button5, useIdMemo } from "@salt-ds/core";
|
|
2429
2438
|
import cx7 from "clsx";
|
|
2430
2439
|
import {
|
|
2431
|
-
useCallback as
|
|
2432
|
-
useEffect as
|
|
2440
|
+
useCallback as useCallback10,
|
|
2441
|
+
useEffect as useEffect6,
|
|
2433
2442
|
useMemo as useMemo5,
|
|
2434
2443
|
useRef as useRef5,
|
|
2435
|
-
useState as
|
|
2444
|
+
useState as useState8
|
|
2436
2445
|
} from "react";
|
|
2437
2446
|
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2438
2447
|
var classBase10 = "vuuSessionEditingForm";
|
|
@@ -2510,8 +2519,8 @@ var SessionEditingForm = ({
|
|
|
2510
2519
|
schema,
|
|
2511
2520
|
...htmlAttributes
|
|
2512
2521
|
}) => {
|
|
2513
|
-
const [values, setValues] =
|
|
2514
|
-
const [errorMessage, setErrorMessage] =
|
|
2522
|
+
const [values, setValues] = useState8();
|
|
2523
|
+
const [errorMessage, setErrorMessage] = useState8("");
|
|
2515
2524
|
const formContentRef = useRef5(null);
|
|
2516
2525
|
const initialDataRef = useRef5();
|
|
2517
2526
|
const dataStatusRef = useRef5(Status.uninitialised);
|
|
@@ -2543,7 +2552,7 @@ var SessionEditingForm = ({
|
|
|
2543
2552
|
return ds;
|
|
2544
2553
|
}, [dataSourceProp, schema]);
|
|
2545
2554
|
const id = useIdMemo(idProp);
|
|
2546
|
-
const handleChange =
|
|
2555
|
+
const handleChange = useCallback10(
|
|
2547
2556
|
(evt) => {
|
|
2548
2557
|
const [field, value] = getFieldNameAndValue(evt);
|
|
2549
2558
|
const { type } = getField(fields, field);
|
|
@@ -2560,7 +2569,7 @@ var SessionEditingForm = ({
|
|
|
2560
2569
|
},
|
|
2561
2570
|
[fields]
|
|
2562
2571
|
);
|
|
2563
|
-
const handleBlur =
|
|
2572
|
+
const handleBlur = useCallback10(
|
|
2564
2573
|
(evt) => {
|
|
2565
2574
|
const [field, value] = getFieldNameAndValue(evt);
|
|
2566
2575
|
const { type } = getField(fields, field);
|
|
@@ -2577,7 +2586,7 @@ var SessionEditingForm = ({
|
|
|
2577
2586
|
},
|
|
2578
2587
|
[dataSource, fields, keyField, values]
|
|
2579
2588
|
);
|
|
2580
|
-
const applyAction =
|
|
2589
|
+
const applyAction = useCallback10(
|
|
2581
2590
|
(action) => {
|
|
2582
2591
|
if (typeof action === "object" && action !== null) {
|
|
2583
2592
|
if ("type" in action && action.type === "CLOSE_DIALOG_ACTION") {
|
|
@@ -2587,7 +2596,7 @@ var SessionEditingForm = ({
|
|
|
2587
2596
|
},
|
|
2588
2597
|
[onClose]
|
|
2589
2598
|
);
|
|
2590
|
-
const handleSubmit =
|
|
2599
|
+
const handleSubmit = useCallback10(async () => {
|
|
2591
2600
|
const response = await dataSource.menuRpcCall({
|
|
2592
2601
|
type: "VP_EDIT_SUBMIT_FORM_RPC"
|
|
2593
2602
|
});
|
|
@@ -2597,7 +2606,7 @@ var SessionEditingForm = ({
|
|
|
2597
2606
|
applyAction(response.action);
|
|
2598
2607
|
}
|
|
2599
2608
|
}, [applyAction, dataSource]);
|
|
2600
|
-
const handleKeyDown =
|
|
2609
|
+
const handleKeyDown = useCallback10(
|
|
2601
2610
|
(evt) => {
|
|
2602
2611
|
if (evt.key === "Enter" && dataStatusRef.current === Status.changed) {
|
|
2603
2612
|
handleSubmit();
|
|
@@ -2605,7 +2614,7 @@ var SessionEditingForm = ({
|
|
|
2605
2614
|
},
|
|
2606
2615
|
[handleSubmit]
|
|
2607
2616
|
);
|
|
2608
|
-
const handleCancel =
|
|
2617
|
+
const handleCancel = useCallback10(() => {
|
|
2609
2618
|
onClose();
|
|
2610
2619
|
}, [onClose]);
|
|
2611
2620
|
const getFormControl = (field) => {
|
|
@@ -2628,7 +2637,7 @@ var SessionEditingForm = ({
|
|
|
2628
2637
|
);
|
|
2629
2638
|
}
|
|
2630
2639
|
};
|
|
2631
|
-
|
|
2640
|
+
useEffect6(() => {
|
|
2632
2641
|
if (formContentRef.current) {
|
|
2633
2642
|
const firstInput = formContentRef.current.querySelector(
|
|
2634
2643
|
"input"
|
|
@@ -2641,7 +2650,7 @@ var SessionEditingForm = ({
|
|
|
2641
2650
|
}
|
|
2642
2651
|
}
|
|
2643
2652
|
}, []);
|
|
2644
|
-
|
|
2653
|
+
useEffect6(() => {
|
|
2645
2654
|
return () => {
|
|
2646
2655
|
if (dataSource) {
|
|
2647
2656
|
dataSource.unsubscribe();
|
|
@@ -2713,16 +2722,16 @@ import {
|
|
|
2713
2722
|
} from "@vuu-ui/vuu-utils";
|
|
2714
2723
|
import cx10 from "clsx";
|
|
2715
2724
|
import {
|
|
2716
|
-
useCallback as
|
|
2725
|
+
useCallback as useCallback13,
|
|
2717
2726
|
useMemo as useMemo8,
|
|
2718
2727
|
useRef as useRef7,
|
|
2719
|
-
useState as
|
|
2728
|
+
useState as useState10
|
|
2720
2729
|
} from "react";
|
|
2721
2730
|
|
|
2722
2731
|
// src/shell-layouts/context-panel/ContextPanel.tsx
|
|
2723
2732
|
import { Button as Button6 } from "@salt-ds/core";
|
|
2724
2733
|
import cx8 from "clsx";
|
|
2725
|
-
import { useCallback as
|
|
2734
|
+
import { useCallback as useCallback11, useMemo as useMemo6 } from "react";
|
|
2726
2735
|
import {
|
|
2727
2736
|
layoutFromJson,
|
|
2728
2737
|
View,
|
|
@@ -2738,7 +2747,7 @@ var ContextPanel = ({
|
|
|
2738
2747
|
title
|
|
2739
2748
|
}) => {
|
|
2740
2749
|
const dispatchLayoutAction = useLayoutProviderDispatch2();
|
|
2741
|
-
const handleClose =
|
|
2750
|
+
const handleClose = useCallback11(() => {
|
|
2742
2751
|
dispatchLayoutAction({
|
|
2743
2752
|
path: "#context-panel",
|
|
2744
2753
|
propName: "expanded",
|
|
@@ -2848,15 +2857,15 @@ import {
|
|
|
2848
2857
|
Flexbox as Flexbox2,
|
|
2849
2858
|
View as View2
|
|
2850
2859
|
} from "@vuu-ui/vuu-layout";
|
|
2851
|
-
import { useCallback as
|
|
2860
|
+
import { useCallback as useCallback12, useRef as useRef6, useState as useState9 } from "react";
|
|
2852
2861
|
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2853
2862
|
var useInlayLeftPanel = ({
|
|
2854
2863
|
appHeader,
|
|
2855
2864
|
LeftSidePanelProps
|
|
2856
2865
|
}) => {
|
|
2857
2866
|
const paletteView = useRef6(null);
|
|
2858
|
-
const [open, setOpen] =
|
|
2859
|
-
const handleDrawerClick =
|
|
2867
|
+
const [open, setOpen] = useState9(true);
|
|
2868
|
+
const handleDrawerClick = useCallback12(
|
|
2860
2869
|
(e) => {
|
|
2861
2870
|
var _a;
|
|
2862
2871
|
const target = e.target;
|
|
@@ -2866,7 +2875,7 @@ var useInlayLeftPanel = ({
|
|
|
2866
2875
|
},
|
|
2867
2876
|
[open]
|
|
2868
2877
|
);
|
|
2869
|
-
const getDrawers =
|
|
2878
|
+
const getDrawers = useCallback12(
|
|
2870
2879
|
(leftSidePanel) => {
|
|
2871
2880
|
const drawers = [];
|
|
2872
2881
|
drawers.push(
|
|
@@ -2957,8 +2966,8 @@ var Shell = ({
|
|
|
2957
2966
|
const layoutId = useRef7("latest");
|
|
2958
2967
|
const { applicationJson, saveApplicationLayout, loadLayoutById } = useLayoutManager();
|
|
2959
2968
|
const { buildMenuOptions, handleMenuAction } = useLayoutContextMenuItems(setDialogState);
|
|
2960
|
-
const [connectionStatus, setConnectionStatus] =
|
|
2961
|
-
const handleLayoutChange =
|
|
2969
|
+
const [connectionStatus, setConnectionStatus] = useState10("connected");
|
|
2970
|
+
const handleLayoutChange = useCallback13(
|
|
2962
2971
|
(layout) => {
|
|
2963
2972
|
try {
|
|
2964
2973
|
saveApplicationLayout(layout);
|
|
@@ -2968,12 +2977,12 @@ var Shell = ({
|
|
|
2968
2977
|
},
|
|
2969
2978
|
[saveApplicationLayout]
|
|
2970
2979
|
);
|
|
2971
|
-
const handleSwitchTheme =
|
|
2980
|
+
const handleSwitchTheme = useCallback13((mode) => {
|
|
2972
2981
|
if (rootRef.current) {
|
|
2973
2982
|
rootRef.current.dataset.mode = mode;
|
|
2974
2983
|
}
|
|
2975
2984
|
}, []);
|
|
2976
|
-
const handleNavigate =
|
|
2985
|
+
const handleNavigate = useCallback13(
|
|
2977
2986
|
(id) => {
|
|
2978
2987
|
layoutId.current = id;
|
|
2979
2988
|
loadLayoutById(id);
|
|
@@ -3073,7 +3082,7 @@ var useShellContext = () => {
|
|
|
3073
3082
|
// src/theme-switch/ThemeSwitch.tsx
|
|
3074
3083
|
import cx11 from "clsx";
|
|
3075
3084
|
import { ToggleButton, ToggleButtonGroup, useControlled } from "@salt-ds/core";
|
|
3076
|
-
import { useCallback as
|
|
3085
|
+
import { useCallback as useCallback14 } from "react";
|
|
3077
3086
|
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3078
3087
|
var classBase13 = "vuuThemeSwitch";
|
|
3079
3088
|
var ThemeSwitch = ({
|
|
@@ -3089,7 +3098,7 @@ var ThemeSwitch = ({
|
|
|
3089
3098
|
name: "ThemeSwitch",
|
|
3090
3099
|
state: "mode"
|
|
3091
3100
|
});
|
|
3092
|
-
const handleChangeSecondary =
|
|
3101
|
+
const handleChangeSecondary = useCallback14(
|
|
3093
3102
|
(evt) => {
|
|
3094
3103
|
const { value } = evt.target;
|
|
3095
3104
|
setMode(value);
|