@trops/dash-core 0.1.378 → 0.1.379
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +24 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2548,6 +2548,20 @@ var ThemeWrapper = function ThemeWrapper(_ref) {
|
|
|
2548
2548
|
});
|
|
2549
2549
|
};
|
|
2550
2550
|
|
|
2551
|
+
function AppContextBroadcast(_ref) {
|
|
2552
|
+
var ctx = _ref.ctx;
|
|
2553
|
+
React.useEffect(function () {
|
|
2554
|
+
if (ctx && typeof window !== "undefined") {
|
|
2555
|
+
window.__dashAppContext = ctx;
|
|
2556
|
+
window.dispatchEvent(new Event("dash:app-context-changed"));
|
|
2557
|
+
}
|
|
2558
|
+
}, [ctx]);
|
|
2559
|
+
return null;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
// TODO
|
|
2563
|
+
// make theme files or have a Theme context which we can populate with a plugin or config
|
|
2564
|
+
// color theme (coming soon)
|
|
2551
2565
|
var debugStyles = {
|
|
2552
2566
|
workspace: {
|
|
2553
2567
|
classes: "bg-gray-800 border border-red-900 rounded p-4"
|
|
@@ -2565,11 +2579,11 @@ var debugStyles = {
|
|
|
2565
2579
|
classes: "border border-blue-700 bg-gray-800 rounded p-4"
|
|
2566
2580
|
}
|
|
2567
2581
|
};
|
|
2568
|
-
var AppWrapper = function AppWrapper(
|
|
2569
|
-
var children =
|
|
2570
|
-
|
|
2571
|
-
credentials =
|
|
2572
|
-
dashApi =
|
|
2582
|
+
var AppWrapper = function AppWrapper(_ref2) {
|
|
2583
|
+
var children = _ref2.children,
|
|
2584
|
+
_ref2$credentials = _ref2.credentials,
|
|
2585
|
+
credentials = _ref2$credentials === void 0 ? null : _ref2$credentials,
|
|
2586
|
+
dashApi = _ref2.dashApi;
|
|
2573
2587
|
var _useState = React.useState(credentials),
|
|
2574
2588
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2575
2589
|
creds = _useState2[0],
|
|
@@ -2803,9 +2817,11 @@ var AppWrapper = function AppWrapper(_ref) {
|
|
|
2803
2817
|
return null;
|
|
2804
2818
|
}
|
|
2805
2819
|
}, [debugMode, creds, credentials, searchClient, dashApi, settings, providers, isLoadingProviders, loadProviders, changeSearchClient, changeCreds, changeDebugMode, changeSettings, changeApplicationTheme, openDataDirectory]);
|
|
2806
|
-
return /*#__PURE__*/jsxRuntime.
|
|
2820
|
+
return /*#__PURE__*/jsxRuntime.jsxs(AppContext.Provider, {
|
|
2807
2821
|
value: contextValue,
|
|
2808
|
-
children:
|
|
2822
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(AppContextBroadcast, {
|
|
2823
|
+
ctx: contextValue
|
|
2824
|
+
}), children]
|
|
2809
2825
|
});
|
|
2810
2826
|
};
|
|
2811
2827
|
|
|
@@ -25688,6 +25704,7 @@ var LayoutGridContainer = /*#__PURE__*/React.memo(function (_ref3) {
|
|
|
25688
25704
|
workspaceId: workspace === null || workspace === void 0 ? void 0 : workspace.id,
|
|
25689
25705
|
widgetComponentName: cellComponent.component,
|
|
25690
25706
|
widgetId: cellComponent.id,
|
|
25707
|
+
selectedProviders: cellComponent.selectedProviders || null,
|
|
25691
25708
|
sourcePackage: ((_ComponentManager$con = ComponentManager.config(cellComponent.component, cellComponent)) === null || _ComponentManager$con === void 0 ? void 0 : _ComponentManager$con._sourcePackage) || null
|
|
25692
25709
|
}
|
|
25693
25710
|
}));
|