@vuu-ui/vuu-shell 0.8.14-debug → 0.8.15-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 +19 -2
- package/cjs/index.js.map +2 -2
- package/esm/index.js +19 -2
- package/esm/index.js.map +2 -2
- package/index.css +13 -4
- package/index.css.map +2 -2
- package/package.json +9 -9
- package/types/layout-management/useLayoutManager.d.ts +5 -3
package/cjs/index.js
CHANGED
|
@@ -1829,6 +1829,7 @@ var getPersistenceManager = () => {
|
|
|
1829
1829
|
return _persistenceManager;
|
|
1830
1830
|
};
|
|
1831
1831
|
var LayoutManagementContext = import_react27.default.createContext({
|
|
1832
|
+
getApplicationSettings: () => void 0,
|
|
1832
1833
|
layoutMetadata: [],
|
|
1833
1834
|
saveLayout: () => void 0,
|
|
1834
1835
|
// The default Application JSON will be served if no LayoutManagementProvider
|
|
@@ -1958,12 +1959,27 @@ var LayoutManagementProvider = (props) => {
|
|
|
1958
1959
|
[notify]
|
|
1959
1960
|
);
|
|
1960
1961
|
const saveApplicationSettings = (0, import_react27.useCallback)(
|
|
1961
|
-
(settings) => {
|
|
1962
|
-
|
|
1962
|
+
(settings, key) => {
|
|
1963
|
+
const { settings: applicationSettings } = applicationJSONRef.current;
|
|
1964
|
+
if (key) {
|
|
1965
|
+
setApplicationSettings({
|
|
1966
|
+
...applicationSettings,
|
|
1967
|
+
[key]: settings
|
|
1968
|
+
});
|
|
1969
|
+
} else {
|
|
1970
|
+
setApplicationSettings(settings);
|
|
1971
|
+
}
|
|
1963
1972
|
getPersistenceManager().saveApplicationJSON(applicationJSONRef.current);
|
|
1964
1973
|
},
|
|
1965
1974
|
[setApplicationSettings]
|
|
1966
1975
|
);
|
|
1976
|
+
const getApplicationSettings = (0, import_react27.useCallback)(
|
|
1977
|
+
(key) => {
|
|
1978
|
+
const { settings } = applicationJSONRef.current;
|
|
1979
|
+
return key ? settings == null ? void 0 : settings[key] : settings;
|
|
1980
|
+
},
|
|
1981
|
+
[]
|
|
1982
|
+
);
|
|
1967
1983
|
const loadLayoutById = (0, import_react27.useCallback)(
|
|
1968
1984
|
(id) => {
|
|
1969
1985
|
getPersistenceManager().loadLayout(id).then((layoutJson) => {
|
|
@@ -1992,6 +2008,7 @@ var LayoutManagementProvider = (props) => {
|
|
|
1992
2008
|
LayoutManagementContext.Provider,
|
|
1993
2009
|
{
|
|
1994
2010
|
value: {
|
|
2011
|
+
getApplicationSettings,
|
|
1995
2012
|
layoutMetadata,
|
|
1996
2013
|
saveLayout,
|
|
1997
2014
|
applicationJson: applicationJSONRef.current,
|