@nocobase/app 2.1.0-alpha.34 → 2.1.0-alpha.35

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.
@@ -20,7 +20,7 @@ import { generatePlugins, getRsbuildAlias } from '@nocobase/devtools/rsbuildConf
20
20
  const __filename = fileURLToPath(import.meta.url);
21
21
  const __dirname = path.dirname(__filename);
22
22
  const require = createRequire(import.meta.url);
23
- const devtoolsPackageJson = require('../../devtools/package.json') as { version?: string };
23
+ const devtoolsPackageJson = require('@nocobase/devtools/package.json') as { version?: string };
24
24
  const appVersion = devtoolsPackageJson.version || '';
25
25
  const APP_PUBLIC_PATH_TEMPLATE = '{{env.APP_PUBLIC_PATH}}';
26
26
 
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunknocobase=globalThis.webpackChunknocobase||[]).push([["7531"],{80566(e,a,t){t.r(a),t.d(a,{default:()=>h});var n=t(74848),r=t(73241),l=t(96540),o=t(97472),u=t(36098),i=t(47767);t(2077);var c=t(92545);let s=e=>{let{children:a}=e,t=(0,r.useFlowEngine)(),o=(0,u.n)(),s=(0,i.useNavigate)(),h=(0,i.useLocation)(),d=(0,i.useParams)(),[m,p]=(0,l.useState)(!1),w=(0,l.useRef)(!1),f=t.context.routeRepository,g=(0,l.useMemo)(()=>"/admin"===(0,c.FY)(h.pathname,o.router.getBasename()),[o,h.pathname]);return((0,l.useEffect)(()=>{w.current=!1},[h.pathname,h.search,h.hash,d.name]),(0,l.useEffect)(()=>{let e=!0;return(async()=>{var a,t,n,r;if(p(!1),!g&&!d.name){e&&p(!0);return}if(!(null==f||null==(a=f.isAccessibleLoaded)?void 0:a.call(f)))try{await (null==f||null==(n=f.ensureAccessibleLoaded)?void 0:n.call(f))}catch(a){e&&p(!0);return}if(!e||w.current)return;if(d.name){let a=null==f||null==(r=f.getRouteBySchemaUid)?void 0:r.call(f,d.name);if((null==a?void 0:a.type)==="page"){let e=(0,c.Yj)({app:o,route:a,location:{pathname:window.location.pathname,search:window.location.search,hash:window.location.hash},preserveLocationState:!0});if("document"===e.navigationMode&&e.runtimePath){w.current=!0,window.location.replace(e.runtimePath);return}}e&&p(!0);return}let l=(0,c.ug)((null==f||null==(t=f.listAccessible)?void 0:t.call(f))||[]);if(!l){e&&p(!0);return}let u=(0,c.Yj)({app:o,route:l});if(!u.runtimePath){e&&p(!0);return}(w.current=!0,"document"===u.navigationMode)?window.location.replace(u.runtimePath):s((0,c.FY)(u.runtimePath,o.router.getBasename()),{replace:!0})})(),()=>{e=!1}},[o,t,g,h.hash,h.pathname,h.search,s,d.name,f]),m)?(0,n.jsx)(n.Fragment,{children:a}):null},h=e=>{let a=(0,r.useFlowEngine)(),t=(0,o.t_Y)(a,{create:!0,props:e,use:o.pXX});if(!t)throw Error("[NocoBase] Failed to create admin-layout-model.");return(0,n.jsx)(s,{children:(0,n.jsx)(r.FlowModelRenderer,{model:t})})}}}]);
1
+ "use strict";(globalThis.webpackChunknocobase=globalThis.webpackChunknocobase||[]).push([["7531"],{80566(e,a,t){t.r(a),t.d(a,{default:()=>h});var n=t(74848),r=t(73241),l=t(96540),o=t(10438),u=t(36098),i=t(47767);t(2077);var c=t(92545);let s=e=>{let{children:a}=e,t=(0,r.useFlowEngine)(),o=(0,u.n)(),s=(0,i.useNavigate)(),h=(0,i.useLocation)(),d=(0,i.useParams)(),[m,p]=(0,l.useState)(!1),w=(0,l.useRef)(!1),f=t.context.routeRepository,g=(0,l.useMemo)(()=>"/admin"===(0,c.FY)(h.pathname,o.router.getBasename()),[o,h.pathname]);return((0,l.useEffect)(()=>{w.current=!1},[h.pathname,h.search,h.hash,d.name]),(0,l.useEffect)(()=>{let e=!0;return(async()=>{var a,t,n,r;if(p(!1),!g&&!d.name){e&&p(!0);return}if(!(null==f||null==(a=f.isAccessibleLoaded)?void 0:a.call(f)))try{await (null==f||null==(n=f.ensureAccessibleLoaded)?void 0:n.call(f))}catch(a){e&&p(!0);return}if(!e||w.current)return;if(d.name){let a=null==f||null==(r=f.getRouteBySchemaUid)?void 0:r.call(f,d.name);if((null==a?void 0:a.type)==="page"){let e=(0,c.Yj)({app:o,route:a,location:{pathname:window.location.pathname,search:window.location.search,hash:window.location.hash},preserveLocationState:!0});if("document"===e.navigationMode&&e.runtimePath){w.current=!0,window.location.replace(e.runtimePath);return}}e&&p(!0);return}let l=(0,c.ug)((null==f||null==(t=f.listAccessible)?void 0:t.call(f))||[]);if(!l){e&&p(!0);return}let u=(0,c.Yj)({app:o,route:l});if(!u.runtimePath){e&&p(!0);return}(w.current=!0,"document"===u.navigationMode)?window.location.replace(u.runtimePath):s((0,c.FY)(u.runtimePath,o.router.getBasename()),{replace:!0})})(),()=>{e=!1}},[o,t,g,h.hash,h.pathname,h.search,s,d.name,f]),m)?(0,n.jsx)(n.Fragment,{children:a}):null},h=e=>{let a=(0,r.useFlowEngine)(),t=(0,o.t_Y)(a,{create:!0,props:e,use:o.pXX});if(!t)throw Error("[NocoBase] Failed to create admin-layout-model.");return(0,n.jsx)(s,{children:(0,n.jsx)(r.FlowModelRenderer,{model:t})})}}}]);