@blocklet/pages-kit-block-studio 0.4.157 → 0.4.159
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.
|
@@ -47,7 +47,6 @@ const Empty_1 = __importDefault(require("@arcblock/ux/lib/Empty"));
|
|
|
47
47
|
const context_1 = require("@arcblock/ux/lib/Locale/context");
|
|
48
48
|
const Toast_1 = __importStar(require("@arcblock/ux/lib/Toast"));
|
|
49
49
|
const js_sdk_1 = require("@blocklet/js-sdk");
|
|
50
|
-
// @ts-ignore
|
|
51
50
|
const theme_1 = require("@blocklet/pages-kit-inner-components/theme");
|
|
52
51
|
// @ts-ignore
|
|
53
52
|
const components_1 = require("@blocklet/pages-kit-runtime/components");
|
|
@@ -425,7 +424,7 @@ function Layout({ loadState, loadedData }) {
|
|
|
425
424
|
const url = new URL(window.location.href);
|
|
426
425
|
const initialComponentId = url.searchParams.get('componentId') || state.metadata.id;
|
|
427
426
|
const initialLocale = url.searchParams.get('locale') || locale || 'en';
|
|
428
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Box, { className: "custom-component-root", sx: { height: '100%', width: '100%', overflow: 'auto' }, children: (0, jsx_runtime_1.jsx)(
|
|
427
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { className: "custom-component-root", sx: { height: '100%', width: '100%', overflow: 'auto' }, children: (0, jsx_runtime_1.jsx)(theme_1.PageProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, {}), children: (0, jsx_runtime_1.jsx)(components_2.CustomComponentRenderer, { locale: initialLocale, componentId: initialComponentId || state.metadata.id, dev: { mode: 'draft', components: mergedAllBlocks, defaultLocale }, properties: mergedPropertiesValues }, `custom-${renderComponentTrigger}`) }) }) }));
|
|
429
428
|
}
|
|
430
429
|
// 没有匹配到路由,使用欢迎页面
|
|
431
430
|
if (notSelectedBlock) {
|
|
@@ -804,10 +803,10 @@ function SashRender() {
|
|
|
804
803
|
}
|
|
805
804
|
const DragHandle = (0, material_1.styled)('div') `
|
|
806
805
|
height: 100%;
|
|
807
|
-
background-color:
|
|
806
|
+
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
808
807
|
|
|
809
808
|
&:hover {
|
|
810
|
-
background-color:
|
|
809
|
+
background-color: ${({ theme }) => theme.palette.grey[200]};
|
|
811
810
|
}
|
|
812
811
|
`;
|
|
813
812
|
const StyledDashboard = (0, material_1.styled)(studio_ui_1.Dashboard) `
|
|
@@ -848,7 +847,7 @@ const StyledDashboard = (0, material_1.styled)(studio_ui_1.Dashboard) `
|
|
|
848
847
|
}
|
|
849
848
|
`;
|
|
850
849
|
function LayoutWrapper({ loadState, loadedData, ...rest }) {
|
|
851
|
-
return ((0, jsx_runtime_1.jsx)(material_1.StyledEngineProvider, { injectFirst: true, children: (0, jsx_runtime_1.jsx)(
|
|
850
|
+
return ((0, jsx_runtime_1.jsx)(material_1.StyledEngineProvider, { injectFirst: true, children: (0, jsx_runtime_1.jsx)(theme_1.DashboardProvider, { children: (0, jsx_runtime_1.jsx)(Toast_1.ToastProvider, { children: (0, jsx_runtime_1.jsx)(context_1.LocaleProvider, { translations: locales_1.translations, fallbackLocale: "en", children: (0, jsx_runtime_1.jsx)(SessionProvider, { serviceHost: basename, protectedRoutes: [`${basename}/*`], children: (0, jsx_runtime_1.jsx)(Layout, { loadState: loadState, loadedData: loadedData }) }) }) }) }) }));
|
|
852
851
|
}
|
|
853
852
|
exports.default = LayoutWrapper;
|
|
854
853
|
function CreateResource({ open, onClose }) {
|