@vef-framework/starter 2.0.8 → 2.0.10

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@emotion/react/jsx-runtime"),r=require("@tanstack/react-router"),u=require("./context.cjs");require("./props.cjs");function i({router:e}){const o=u.useRouterContextHook();return o?t.jsx(s,{router:e,useRouterContext:o}):t.jsx(r.RouterProvider,{router:e})}function s({useRouterContext:e,router:o}){const n=e();return t.jsx(r.RouterProvider,{context:n,router:o})}exports.RouterContextHookProvider=u.RouterContextHookProvider;exports.RouterProvider=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@emotion/react/jsx-runtime"),u=require("@tanstack/react-router"),i=require("react"),c=require("./context.cjs");require("./props.cjs");function x({router:e}){const t=c.useRouterContextHook(),o=i.useMemo(()=>({router:e}),[e]);return t?r.jsx(d,{context:o,router:e,useRouterContext:t}):r.jsx(u.RouterProvider,{context:o,router:e})}function d({useRouterContext:e,context:t,router:o}){const n=e(),s=i.useMemo(()=>({...n,...t}),[n,t]);return r.jsx(u.RouterProvider,{context:s,router:o})}exports.RouterContextHookProvider=c.RouterContextHookProvider;exports.RouterProvider=x;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="__vef_reload_page_event";exports.RELOAD_PAGE_EVENT=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="__vef_reload_page_event",_="__vef_access_denied_event",e="__vef_unauthenticated_event";exports.ACCESS_DENIED_EVENT=_;exports.RELOAD_PAGE_EVENT=E;exports.UNAUTHENTICATED_EVENT=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./event.cjs"),E=require("./router.cjs"),_=require("./storage.cjs"),O=require("./symbols.cjs");exports.RELOAD_PAGE_EVENT=T.RELOAD_PAGE_EVENT;exports.ACCESS_DENIED_ROUTE_ID=E.ACCESS_DENIED_ROUTE_ID;exports.ACCESS_DENIED_ROUTE_PATH=E.ACCESS_DENIED_ROUTE_PATH;exports.INDEX_ROUTE_ID=E.INDEX_ROUTE_ID;exports.INDEX_ROUTE_PATH=E.INDEX_ROUTE_PATH;exports.LOGIN_ROUTE_ID=E.LOGIN_ROUTE_ID;exports.LOGIN_ROUTE_PATH=E.LOGIN_ROUTE_PATH;exports.STORAGE_KEY_PREFIX_STORE=_.STORAGE_KEY_PREFIX_STORE;exports.STORAGE_KEY_SUFFIX_STORE=_.STORAGE_KEY_SUFFIX_STORE;exports.SYMBOL_PAGINATION=O.SYMBOL_PAGINATION;exports.SYMBOL_SORT=O.SYMBOL_SORT;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./event.cjs"),E=require("./router.cjs"),T=require("./storage.cjs"),O=require("./symbols.cjs");exports.ACCESS_DENIED_EVENT=_.ACCESS_DENIED_EVENT;exports.RELOAD_PAGE_EVENT=_.RELOAD_PAGE_EVENT;exports.UNAUTHENTICATED_EVENT=_.UNAUTHENTICATED_EVENT;exports.ACCESS_DENIED_ROUTE_ID=E.ACCESS_DENIED_ROUTE_ID;exports.ACCESS_DENIED_ROUTE_PATH=E.ACCESS_DENIED_ROUTE_PATH;exports.INDEX_ROUTE_ID=E.INDEX_ROUTE_ID;exports.INDEX_ROUTE_PATH=E.INDEX_ROUTE_PATH;exports.LOGIN_ROUTE_ID=E.LOGIN_ROUTE_ID;exports.LOGIN_ROUTE_PATH=E.LOGIN_ROUTE_PATH;exports.STORAGE_KEY_PREFIX_STORE=T.STORAGE_KEY_PREFIX_STORE;exports.STORAGE_KEY_SUFFIX_STORE=T.STORAGE_KEY_SUFFIX_STORE;exports.SYMBOL_PAGINATION=O.SYMBOL_PAGINATION;exports.SYMBOL_SORT=O.SYMBOL_SORT;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/components"),i=require("@vef-framework/core");require("../constants/index.cjs");require("../stores/index.cjs");const u=require("./auth.cjs"),c=require("../constants/router.cjs"),r=require("../stores/app.cjs");function h({getRouter:t,http:o,query:n}){return i.createApiClient({http:{...o,getAuthTokens(){return r.useAppStore.getState().authTokens},setAuthTokens(s){r.useAppStore.setState(a=>{a.authTokens=s})},async onUnauthenticated(){await u.handleClientLogout(await t())},async onAccessDenied(){await(await t()).navigate({to:c.ACCESS_DENIED_ROUTE_PATH})},showInfoMessage:e.showInfoMessage,showWarningMessage:e.showWarningMessage,showErrorMessage:e.showErrorMessage},query:{...n,showSuccessMessage:e.showSuccessMessage}})}exports.createApiClient=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/components"),i=require("@vef-framework/core");require("../stores/index.cjs");const s=require("./event.cjs"),t=require("../stores/app.cjs");function c({http:n,query:r}){return i.createApiClient({http:{...n,getAuthTokens(){return t.useAppStore.getState().authTokens},setAuthTokens(o){t.useAppStore.setState(a=>{a.authTokens=o})},onUnauthenticated(){s.emitUnauthenticated()},onAccessDenied(){s.emitAccessDenied()},showInfoMessage:e.showInfoMessage,showWarningMessage:e.showWarningMessage,showErrorMessage:e.showErrorMessage},query:{...r,showSuccessMessage:e.showSuccessMessage}})}exports.createApiClient=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@vef-framework/shared");require("../constants/index.cjs");const i=require("../constants/event.cjs"),t=o.createEventEmitter();function u(e,n){if(typeof document>"u")return!1;const r=new CustomEvent(e,n);return document.dispatchEvent(r)}function c(e){t.emit(i.RELOAD_PAGE_EVENT,e)}exports.dispatchCustomEvent=u;exports.eventEmitter=t;exports.reloadPage=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@vef-framework/shared");require("../constants/index.cjs");const n=require("../constants/event.cjs"),e=r.createEventEmitter();function E(t,i){if(typeof document>"u")return!1;const c=new CustomEvent(t,i);return document.dispatchEvent(c)}function o(t){e.emit(n.RELOAD_PAGE_EVENT,t)}function u(){e.emit(n.ACCESS_DENIED_EVENT)}function s(){e.emit(n.UNAUTHENTICATED_EVENT)}exports.dispatchCustomEvent=E;exports.emitAccessDenied=u;exports.emitUnauthenticated=s;exports.eventEmitter=e;exports.reloadPage=o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router"),A=require("@vef-framework/components"),C=require("@vef-framework/shared");require("../components/index.cjs");require("../stores/index.cjs");const V=require("../components/not-found/index.cjs"),y=require("../components/error/index.cjs"),G=require("../components/n-progress/event.cjs"),W=require("../stores/app.cjs"),R=require("../stores/tab.cjs");function F(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}const a=600*1e3;var h=process.env.NODE_ENV==="production"?{name:"1089mxj",styles:"white-space:pre-wrap"}:{name:"1089mxj",styles:"white-space:pre-wrap/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy92ZW51cy9WRUYvdmVmLWZyYW1ld29yay1yZWFjdC9wYWNrYWdlcy9zdGFydGVyL3NyYy9oZWxwZXJzL3JvdXRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOEVlIiwiZmlsZSI6Ii9Vc2Vycy92ZW51cy9WRUYvdmVmLWZyYW1ld29yay1yZWFjdC9wYWNrYWdlcy9zdGFydGVyL3NyYy9oZWxwZXJzL3JvdXRlci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IEFueVJvdXRlV2l0aENvbnRleHQgfSBmcm9tIFwiQHRhbnN0YWNrL3JlYWN0LXJvdXRlclwi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hYmVsOiBjb250ZXh0LnRpdGxlIHx8IHVzZXJNZW51Lm5hbWVcbiAgICAgIH0pO1xuICAgICAgc2V0QWN0aXZlVGFiSWQoaWQpO1xuICAgIH1cbiAgfSk7XG5cbiAgcmV0dXJuIHJvdXRlcjtcbn1cbiJdfQ== */",toString:F};function x({history:X,routeTree:Z,context:o}){const g=t.createRouter({routeTree:Z,context:o,trailingSlash:"never",caseSensitive:!0,history:X==="hash"?t.createHashHistory():t.createBrowserHistory(),search:{strict:!0},notFoundMode:"root",defaultPendingComponent:()=>u.jsx(A.Loader,{description:"玩命加载中, 请稍安勿躁...",descriptionSize:18,size:48}),defaultErrorComponent:y.Error,defaultNotFoundComponent:V.NotFound,defaultPendingMs:500,defaultPendingMinMs:300,defaultStructuralSharing:!0,defaultHashScrollIntoView:{behavior:"smooth",block:"start",inline:"center"},defaultPreload:"intent",defaultPreloadDelay:50,defaultPreloadGcTime:a,defaultGcTime:a,defaultViewTransition:!1,async defaultOnCatch(I){const c=await C.getSanitizedErrorStack(I);A.showErrorNotification(u.jsx("pre",{css:h,children:c}),{title:I.message||I.name})}});return g.subscribe("onBeforeLoad",({pathChanged:I})=>{I&&G.nProgressEventEmitter.emit("start")}),g.subscribe("onLoad",()=>G.nProgressEventEmitter.emit("complete")),g.subscribe("onLoad",I=>{const c=I.toLocation,{fullPath:e,params:i,search:d,context:n}=g.matchRoutes(c.pathname,c.search,{preload:!1,throwOnError:!1}).at(-1),{userMenuMap:s}=W.useAppStore.getState(),{addTab:m,setActiveTabId:r}=R.useTabStore.getState(),l=`${e}|${C.hashKey(d)}|${C.hashKey(i)}`,b=s?.get(e);b&&(m({id:l,fullPath:e,params:i,search:d,label:n.title||b.name}),r(l))}),g}exports.createRouter=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router"),G=require("@vef-framework/components"),C=require("@vef-framework/shared");require("../components/index.cjs");require("../constants/index.cjs");require("../stores/index.cjs");const y=require("./auth.cjs"),b=require("./event.cjs"),F=require("../components/not-found/index.cjs"),B=require("../components/error/index.cjs"),A=require("../components/n-progress/event.cjs"),W=require("../stores/app.cjs"),h=require("../stores/tab.cjs"),a=require("../constants/event.cjs"),x=require("../constants/router.cjs");function v(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}const o=600*1e3;var Y=process.env.NODE_ENV==="production"?{name:"1089mxj",styles:"white-space:pre-wrap"}:{name:"1089mxj",styles:"white-space:pre-wrap/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy92ZW51cy9WRUYvdmVmLWZyYW1ld29yay1yZWFjdC9wYWNrYWdlcy9zdGFydGVyL3NyYy9oZWxwZXJzL3JvdXRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUZlIiwiZmlsZSI6Ii9Vc2Vycy92ZW51cy9WRUYvdmVmLWZyYW1ld29yay1yZWFjdC9wYWNrYWdlcy9zdGFydGVyL3NyYy9oZWxwZXJzL3JvdXRlci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IEFueVJvdXRlV2l0aENvbnRleHQgfSBmcm9tIFwiQHRhbnN0YWNrL3JlYWN0LXJvdXRlclwiO1xuXG5pbXBvcnQgdHlwZSB7IFJvdXRlckNvbnRleHQgfSBmcm9tIFwiLi4vdHlwZXNcIjtcblxuaW1wb3J0IHsgY3JlYXRlQnJvd3Nlckhpc3RvcnksIGNyZWF0ZUhhc2hIaXN0b3J5LCBjcmVhdGVSb3V0ZXIgYXMgY3JlYXRlUm91dGVySW50ZXJuYWwgfSBmcm9tIFwiQHRhbnN0YWNrL3JlYWN0LXJvdXRlclwiO1xuaW1wb3J0IHsgTG9hZGVyLCBzaG93RXJyb3JOb3RpZmljYXRpb24gfSBmcm9tIF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nUubmFtZVxuICAgICAgfSk7XG4gICAgICBzZXRBY3RpdmVUYWJJZChpZCk7XG4gICAgfVxuICB9KTtcblxuICBldmVudEVtaXR0ZXIub24oQUNDRVNTX0RFTklFRF9FVkVOVCwgKCkgPT4ge1xuICAgIHJvdXRlci5uYXZpZ2F0ZSh7XG4gICAgICB0bzogQUNDRVNTX0RFTklFRF9ST1VURV9QQVRIXG4gICAgfSk7XG4gIH0pO1xuICBldmVudEVtaXR0ZXIub24oVU5BVVRIRU5USUNBVEVEX0VWRU5ULCAoKSA9PiB7XG4gICAgaGFuZGxlQ2xpZW50TG9nb3V0KHJvdXRlcik7XG4gIH0pO1xuXG4gIHJldHVybiByb3V0ZXI7XG59XG4iXX0= */",toString:v};function J({history:Z,routeTree:n,context:V}){const I=t.createRouter({routeTree:n,context:V,trailingSlash:"never",caseSensitive:!0,history:Z==="hash"?t.createHashHistory():t.createBrowserHistory(),search:{strict:!0},notFoundMode:"root",defaultPendingComponent:()=>u.jsx(G.Loader,{description:"玩命加载中, 请稍安勿躁...",descriptionSize:18,size:48}),defaultErrorComponent:B.Error,defaultNotFoundComponent:F.NotFound,defaultPendingMs:500,defaultPendingMinMs:300,defaultStructuralSharing:!0,defaultHashScrollIntoView:{behavior:"smooth",block:"start",inline:"center"},defaultPreload:"intent",defaultPreloadDelay:50,defaultPreloadGcTime:o,defaultGcTime:o,defaultViewTransition:!1,async defaultOnCatch(g){const c=await C.getSanitizedErrorStack(g);G.showErrorNotification(u.jsx("pre",{css:Y,children:c}),{title:g.message||g.name})}});return I.subscribe("onBeforeLoad",({pathChanged:g})=>{g&&A.nProgressEventEmitter.emit("start")}),I.subscribe("onLoad",()=>A.nProgressEventEmitter.emit("complete")),I.subscribe("onLoad",g=>{const c=g.toLocation,{fullPath:e,params:i,search:d,context:R}=I.matchRoutes(c.pathname,c.search,{preload:!1,throwOnError:!1}).at(-1),{userMenuMap:m}=W.useAppStore.getState(),{addTab:s,setActiveTabId:r}=h.useTabStore.getState(),l=`${e}|${C.hashKey(d)}|${C.hashKey(i)}`,X=m?.get(e);X&&(s({id:l,fullPath:e,params:i,search:d,label:R.routeTitle||X.name}),r(l))}),b.eventEmitter.on(a.ACCESS_DENIED_EVENT,()=>{I.navigate({to:x.ACCESS_DENIED_ROUTE_PATH})}),b.eventEmitter.on(a.UNAUTHENTICATED_EVENT,()=>{y.handleClientLogout(I)}),I}exports.createRouter=J;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./components/index.cjs");require("./constants/index.cjs");require("./helpers/index.cjs");require("./routes/index.cjs");require("./stores/index.cjs");const u=require("./components/crud/helpers.cjs"),n=require("./components/crud/index.cjs"),s=require("./components/crud-page/index.cjs"),a=require("./components/flex-card/index.cjs"),c=require("./components/form-drawer/index.cjs"),E=require("./components/form-modal/index.cjs"),_=require("./components/pro-table/components/operation-button-group.cjs"),p=require("./components/page/index.cjs"),O=require("./components/pro-search/index.cjs"),T=require("./components/pro-table/index.cjs"),R=require("./components/pro-table/components/table-subscriber.cjs"),S=require("./components/page/viewport-context.cjs"),q=require("./constants/event.cjs"),e=require("./constants/router.cjs"),t=require("./constants/storage.cjs"),o=require("./constants/symbols.cjs"),A=require("./helpers/api.cjs"),d=require("./helpers/app.cjs"),I=require("./helpers/app-version.cjs"),P=require("./helpers/auth.cjs"),r=require("./helpers/event.cjs"),i=require("./helpers/query.cjs"),D=require("./helpers/router.cjs"),l=require("./routes/access-denied.cjs"),C=require("./routes/layout.cjs"),N=require("./routes/login.cjs"),b=require("./routes/root.cjs"),g=require("./stores/app.cjs"),L=require("./stores/tab.cjs"),m=require("./stores/theme.cjs");exports.createCrudKit=u.createCrudKit;exports.Crud=n.Crud;exports.CrudPage=s.CrudPage;exports.FlexCard=a.FlexCard;exports.FormDrawer=c.FormDrawer;exports.FormModal=E.FormModal;exports.OperationButtonGroup=_.OperationButtonGroup;exports.Page=p.Page;exports.ProSearch=O.ProSearch;exports.ProTable=T.ProTable;exports.ProTableSubscriber=R.TableSubscriber;exports.useViewportHeight=S.useViewportHeight;exports.RELOAD_PAGE_EVENT=q.RELOAD_PAGE_EVENT;exports.ACCESS_DENIED_ROUTE_ID=e.ACCESS_DENIED_ROUTE_ID;exports.ACCESS_DENIED_ROUTE_PATH=e.ACCESS_DENIED_ROUTE_PATH;exports.INDEX_ROUTE_ID=e.INDEX_ROUTE_ID;exports.INDEX_ROUTE_PATH=e.INDEX_ROUTE_PATH;exports.LOGIN_ROUTE_ID=e.LOGIN_ROUTE_ID;exports.LOGIN_ROUTE_PATH=e.LOGIN_ROUTE_PATH;exports.STORAGE_KEY_PREFIX_STORE=t.STORAGE_KEY_PREFIX_STORE;exports.STORAGE_KEY_SUFFIX_STORE=t.STORAGE_KEY_SUFFIX_STORE;exports.SYMBOL_PAGINATION=o.SYMBOL_PAGINATION;exports.SYMBOL_SORT=o.SYMBOL_SORT;exports.createApiClient=A.createApiClient;exports.createApp=d.createApp;exports.setupAppVersionNotification=I.setupAppVersionNotification;exports.handleClientLogout=P.handleClientLogout;exports.dispatchCustomEvent=r.dispatchCustomEvent;exports.eventEmitter=r.eventEmitter;exports.reloadPage=r.reloadPage;exports.extractQueryParams=i.extractQueryParams;exports.noopMutationFn=i.noopMutationFn;exports.createRouter=D.createRouter;exports.createAccessDeniedRouteOptions=l.createAccessDeniedRouteOptions;exports.createLayoutRouteOptions=C.createLayoutRouteOptions;exports.createLoginRouteOptions=N.createLoginRouteOptions;exports.createRootRouteOptions=b.createRootRouteOptions;exports.useAppStore=g.useAppStore;exports.useTabStore=L.useTabStore;exports.useThemeStore=m.useThemeStore;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./components/index.cjs");require("./constants/index.cjs");require("./helpers/index.cjs");require("./routes/index.cjs");require("./stores/index.cjs");const n=require("./components/crud/helpers.cjs"),s=require("./components/crud/index.cjs"),E=require("./components/crud-page/index.cjs"),a=require("./components/flex-card/index.cjs"),c=require("./components/form-drawer/index.cjs"),_=require("./components/form-modal/index.cjs"),T=require("./components/pro-table/components/operation-button-group.cjs"),p=require("./components/page/index.cjs"),O=require("./components/pro-search/index.cjs"),S=require("./components/pro-table/index.cjs"),A=require("./components/pro-table/components/table-subscriber.cjs"),R=require("./components/page/viewport-context.cjs"),r=require("./constants/event.cjs"),e=require("./constants/router.cjs"),o=require("./constants/storage.cjs"),i=require("./constants/symbols.cjs"),q=require("./helpers/api.cjs"),D=require("./helpers/app.cjs"),I=require("./helpers/app-version.cjs"),N=require("./helpers/auth.cjs"),t=require("./helpers/event.cjs"),u=require("./helpers/query.cjs"),d=require("./helpers/router.cjs"),C=require("./routes/access-denied.cjs"),P=require("./routes/layout.cjs"),l=require("./routes/login.cjs"),U=require("./routes/root.cjs"),b=require("./stores/app.cjs"),g=require("./stores/tab.cjs"),L=require("./stores/theme.cjs");exports.createCrudKit=n.createCrudKit;exports.Crud=s.Crud;exports.CrudPage=E.CrudPage;exports.FlexCard=a.FlexCard;exports.FormDrawer=c.FormDrawer;exports.FormModal=_.FormModal;exports.OperationButtonGroup=T.OperationButtonGroup;exports.Page=p.Page;exports.ProSearch=O.ProSearch;exports.ProTable=S.ProTable;exports.ProTableSubscriber=A.TableSubscriber;exports.useViewportHeight=R.useViewportHeight;exports.ACCESS_DENIED_EVENT=r.ACCESS_DENIED_EVENT;exports.RELOAD_PAGE_EVENT=r.RELOAD_PAGE_EVENT;exports.UNAUTHENTICATED_EVENT=r.UNAUTHENTICATED_EVENT;exports.ACCESS_DENIED_ROUTE_ID=e.ACCESS_DENIED_ROUTE_ID;exports.ACCESS_DENIED_ROUTE_PATH=e.ACCESS_DENIED_ROUTE_PATH;exports.INDEX_ROUTE_ID=e.INDEX_ROUTE_ID;exports.INDEX_ROUTE_PATH=e.INDEX_ROUTE_PATH;exports.LOGIN_ROUTE_ID=e.LOGIN_ROUTE_ID;exports.LOGIN_ROUTE_PATH=e.LOGIN_ROUTE_PATH;exports.STORAGE_KEY_PREFIX_STORE=o.STORAGE_KEY_PREFIX_STORE;exports.STORAGE_KEY_SUFFIX_STORE=o.STORAGE_KEY_SUFFIX_STORE;exports.SYMBOL_PAGINATION=i.SYMBOL_PAGINATION;exports.SYMBOL_SORT=i.SYMBOL_SORT;exports.createApiClient=q.createApiClient;exports.createApp=D.createApp;exports.setupAppVersionNotification=I.setupAppVersionNotification;exports.handleClientLogout=N.handleClientLogout;exports.dispatchCustomEvent=t.dispatchCustomEvent;exports.eventEmitter=t.eventEmitter;exports.reloadPage=t.reloadPage;exports.extractQueryParams=u.extractQueryParams;exports.noopMutationFn=u.noopMutationFn;exports.createRouter=d.createRouter;exports.createAccessDeniedRouteOptions=C.createAccessDeniedRouteOptions;exports.createLayoutRouteOptions=P.createLayoutRouteOptions;exports.createLoginRouteOptions=l.createLoginRouteOptions;exports.createRootRouteOptions=U.createRootRouteOptions;exports.useAppStore=b.useAppStore;exports.useTabStore=g.useTabStore;exports.useThemeStore=L.useThemeStore;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../components/index.cjs");require("../constants/index.cjs");const r=require("../components/access-denied/index.cjs"),i=require("../constants/router.cjs");function n(t){return{component:r.AccessDenied,beforeLoad({location:o}){const e=t();e.state.resolvedLocation||(o.state.__TSR_index===0?e.navigate({to:i.INDEX_ROUTE_PATH}):e.history.back())}}}exports.createAccessDeniedRouteOptions=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../components/index.cjs");require("../constants/index.cjs");const o=require("../components/access-denied/index.cjs"),i=require("../constants/router.cjs");function n(){return{component:o.AccessDenied,beforeLoad({location:t,context:{router:e}}){e.state.resolvedLocation||(t.state.__TSR_index===0?e.navigate({to:i.INDEX_ROUTE_PATH}):e.history.back())}}}exports.createAccessDeniedRouteOptions=n;
@@ -1,22 +1,29 @@
1
- import { jsx as t } from "@emotion/react/jsx-runtime";
2
- import { RouterProvider as e } from "@tanstack/react-router";
3
- import { useRouterContextHook as i } from "./context.js";
4
- import { RouterContextHookProvider as d } from "./context.js";
1
+ import { jsx as e } from "@emotion/react/jsx-runtime";
2
+ import { RouterProvider as i } from "@tanstack/react-router";
3
+ import { useMemo as u } from "react";
4
+ import { useRouterContextHook as x } from "./context.js";
5
+ import { RouterContextHookProvider as k } from "./context.js";
5
6
  import "./props.js";
6
- function p({
7
+ function v({
7
8
  router: o
8
9
  }) {
9
- const r = i();
10
- return r ? /* @__PURE__ */ t(u, { router: o, useRouterContext: r }) : /* @__PURE__ */ t(e, { router: o });
10
+ const t = x(), r = u(() => ({
11
+ router: o
12
+ }), [o]);
13
+ return t ? /* @__PURE__ */ e(s, { context: r, router: o, useRouterContext: t }) : /* @__PURE__ */ e(i, { context: r, router: o });
11
14
  }
12
- function u({
15
+ function s({
13
16
  useRouterContext: o,
17
+ context: t,
14
18
  router: r
15
19
  }) {
16
- const n = o();
17
- return /* @__PURE__ */ t(e, { context: n, router: r });
20
+ const n = o(), m = u(() => ({
21
+ ...n,
22
+ ...t
23
+ }), [n, t]);
24
+ return /* @__PURE__ */ e(i, { context: m, router: r });
18
25
  }
19
26
  export {
20
- d as RouterContextHookProvider,
21
- p as RouterProvider
27
+ k as RouterContextHookProvider,
28
+ v as RouterProvider
22
29
  };
@@ -1,4 +1,6 @@
1
- const _ = "__vef_reload_page_event";
1
+ const _ = "__vef_reload_page_event", e = "__vef_access_denied_event", E = "__vef_unauthenticated_event";
2
2
  export {
3
- _ as RELOAD_PAGE_EVENT
3
+ e as ACCESS_DENIED_EVENT,
4
+ _ as RELOAD_PAGE_EVENT,
5
+ E as UNAUTHENTICATED_EVENT
4
6
  };
@@ -1,17 +1,19 @@
1
- import { RELOAD_PAGE_EVENT as O } from "./event.js";
2
- import { ACCESS_DENIED_ROUTE_ID as I, ACCESS_DENIED_ROUTE_PATH as R, INDEX_ROUTE_ID as S, INDEX_ROUTE_PATH as A, LOGIN_ROUTE_ID as D, LOGIN_ROUTE_PATH as N } from "./router.js";
3
- import { STORAGE_KEY_PREFIX_STORE as r, STORAGE_KEY_SUFFIX_STORE as U } from "./storage.js";
4
- import { SYMBOL_PAGINATION as P, SYMBOL_SORT as L } from "./symbols.js";
1
+ import { ACCESS_DENIED_EVENT as T, RELOAD_PAGE_EVENT as O, UNAUTHENTICATED_EVENT as I } from "./event.js";
2
+ import { ACCESS_DENIED_ROUTE_ID as N, ACCESS_DENIED_ROUTE_PATH as S, INDEX_ROUTE_ID as D, INDEX_ROUTE_PATH as R, LOGIN_ROUTE_ID as U, LOGIN_ROUTE_PATH as o } from "./router.js";
3
+ import { STORAGE_KEY_PREFIX_STORE as C, STORAGE_KEY_SUFFIX_STORE as G } from "./storage.js";
4
+ import { SYMBOL_PAGINATION as L, SYMBOL_SORT as e } from "./symbols.js";
5
5
  export {
6
- I as ACCESS_DENIED_ROUTE_ID,
7
- R as ACCESS_DENIED_ROUTE_PATH,
8
- S as INDEX_ROUTE_ID,
9
- A as INDEX_ROUTE_PATH,
10
- D as LOGIN_ROUTE_ID,
11
- N as LOGIN_ROUTE_PATH,
6
+ T as ACCESS_DENIED_EVENT,
7
+ N as ACCESS_DENIED_ROUTE_ID,
8
+ S as ACCESS_DENIED_ROUTE_PATH,
9
+ D as INDEX_ROUTE_ID,
10
+ R as INDEX_ROUTE_PATH,
11
+ U as LOGIN_ROUTE_ID,
12
+ o as LOGIN_ROUTE_PATH,
12
13
  O as RELOAD_PAGE_EVENT,
13
- r as STORAGE_KEY_PREFIX_STORE,
14
- U as STORAGE_KEY_SUFFIX_STORE,
15
- P as SYMBOL_PAGINATION,
16
- L as SYMBOL_SORT
14
+ C as STORAGE_KEY_PREFIX_STORE,
15
+ G as STORAGE_KEY_SUFFIX_STORE,
16
+ L as SYMBOL_PAGINATION,
17
+ e as SYMBOL_SORT,
18
+ I as UNAUTHENTICATED_EVENT
17
19
  };
@@ -1,44 +1,39 @@
1
- import { showSuccessMessage as n, showErrorMessage as i, showWarningMessage as p, showInfoMessage as u } from "@vef-framework/components";
2
- import { createApiClient as c } from "@vef-framework/core";
3
- import "../constants/index.js";
1
+ import { showSuccessMessage as n, showErrorMessage as i, showWarningMessage as a, showInfoMessage as c } from "@vef-framework/components";
2
+ import { createApiClient as p } from "@vef-framework/core";
4
3
  import "../stores/index.js";
5
- import { handleClientLogout as m } from "./auth.js";
6
- import { ACCESS_DENIED_ROUTE_PATH as h } from "../constants/router.js";
7
- import { useAppStore as o } from "../stores/app.js";
8
- function l({
9
- getRouter: t,
10
- http: r,
11
- query: a
4
+ import { emitAccessDenied as u, emitUnauthenticated as h } from "./event.js";
5
+ import { useAppStore as e } from "../stores/app.js";
6
+ function k({
7
+ http: t,
8
+ query: s
12
9
  }) {
13
- return c({
10
+ return p({
14
11
  http: {
15
- ...r,
12
+ ...t,
16
13
  getAuthTokens() {
17
- return o.getState().authTokens;
14
+ return e.getState().authTokens;
18
15
  },
19
- setAuthTokens(e) {
20
- o.setState((s) => {
21
- s.authTokens = e;
16
+ setAuthTokens(o) {
17
+ e.setState((r) => {
18
+ r.authTokens = o;
22
19
  });
23
20
  },
24
- async onUnauthenticated() {
25
- await m(await t());
21
+ onUnauthenticated() {
22
+ h();
26
23
  },
27
- async onAccessDenied() {
28
- await (await t()).navigate({
29
- to: h
30
- });
24
+ onAccessDenied() {
25
+ u();
31
26
  },
32
- showInfoMessage: u,
33
- showWarningMessage: p,
27
+ showInfoMessage: c,
28
+ showWarningMessage: a,
34
29
  showErrorMessage: i
35
30
  },
36
31
  query: {
37
- ...a,
32
+ ...s,
38
33
  showSuccessMessage: n
39
34
  }
40
35
  });
41
36
  }
42
37
  export {
43
- l as createApiClient
38
+ k as createApiClient
44
39
  };
@@ -1,18 +1,26 @@
1
- import { createEventEmitter as o } from "@vef-framework/shared";
1
+ import { createEventEmitter as E } from "@vef-framework/shared";
2
2
  import "../constants/index.js";
3
- import { RELOAD_PAGE_EVENT as r } from "../constants/event.js";
4
- const i = o();
5
- function u(t, e) {
3
+ import { RELOAD_PAGE_EVENT as o, ACCESS_DENIED_EVENT as m, UNAUTHENTICATED_EVENT as c } from "../constants/event.js";
4
+ const e = E();
5
+ function d(t, n) {
6
6
  if (typeof document > "u")
7
7
  return !1;
8
- const n = new CustomEvent(t, e);
9
- return document.dispatchEvent(n);
8
+ const i = new CustomEvent(t, n);
9
+ return document.dispatchEvent(i);
10
10
  }
11
- function f(t) {
12
- i.emit(r, t);
11
+ function s(t) {
12
+ e.emit(o, t);
13
+ }
14
+ function a() {
15
+ e.emit(m);
16
+ }
17
+ function p() {
18
+ e.emit(c);
13
19
  }
14
20
  export {
15
- u as dispatchCustomEvent,
16
- i as eventEmitter,
17
- f as reloadPage
21
+ d as dispatchCustomEvent,
22
+ a as emitAccessDenied,
23
+ p as emitUnauthenticated,
24
+ e as eventEmitter,
25
+ s as reloadPage
18
26
  };
@@ -1,44 +1,49 @@
1
- import { jsx as e } from "@emotion/react/jsx-runtime";
2
- import { createRouter as s, createHashHistory as V, createBrowserHistory as y } from "@tanstack/react-router";
3
- import { showErrorNotification as r, Loader as W } from "@vef-framework/components";
4
- import { getSanitizedErrorStack as R, hashKey as b } from "@vef-framework/shared";
1
+ import { jsx as l } from "@emotion/react/jsx-runtime";
2
+ import { createRouter as n, createHashHistory as r, createBrowserHistory as F } from "@tanstack/react-router";
3
+ import { showErrorNotification as y, Loader as s } from "@vef-framework/components";
4
+ import { getSanitizedErrorStack as B, hashKey as G } from "@vef-framework/shared";
5
5
  import "../components/index.js";
6
+ import "../constants/index.js";
6
7
  import "../stores/index.js";
7
- import { NotFound as F } from "../components/not-found/index.js";
8
- import { Error as h } from "../components/error/index.js";
9
- import { nProgressEventEmitter as A } from "../components/n-progress/event.js";
10
- import { useAppStore as x } from "../stores/app.js";
11
- import { useTabStore as J } from "../stores/tab.js";
12
- function B() {
8
+ import { handleClientLogout as W } from "./auth.js";
9
+ import { eventEmitter as e } from "./event.js";
10
+ import { NotFound as h } from "../components/not-found/index.js";
11
+ import { Error as x } from "../components/error/index.js";
12
+ import { nProgressEventEmitter as b } from "../components/n-progress/event.js";
13
+ import { useAppStore as Y } from "../stores/app.js";
14
+ import { useTabStore as p } from "../stores/tab.js";
15
+ import { ACCESS_DENIED_EVENT as J, UNAUTHENTICATED_EVENT as N } from "../constants/event.js";
16
+ import { ACCESS_DENIED_ROUTE_PATH as v } from "../constants/router.js";
17
+ function S() {
13
18
  return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
14
19
  }
15
- const G = 600 * 1e3;
16
- var Y = process.env.NODE_ENV === "production" ? {
20
+ const o = 600 * 1e3;
21
+ var H = process.env.NODE_ENV === "production" ? {
17
22
  name: "1089mxj",
18
23
  styles: "white-space:pre-wrap"
19
24
  } : {
20
25
  name: "1089mxj",
21
- styles: "white-space:pre-wrap/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy92ZW51cy9WRUYvdmVmLWZyYW1ld29yay1yZWFjdC9wYWNrYWdlcy9zdGFydGVyL3NyYy9oZWxwZXJzL3JvdXRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOEVlIiwiZmlsZSI6Ii9Vc2Vycy92ZW51cy9WRUYvdmVmLWZyYW1ld29yay1yZWFjdC9wYWNrYWdlcy9zdGFydGVyL3NyYy9oZWxwZXJzL3JvdXRlci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IEFueVJvdXRlV2l0aENvbnRleHQgfSBmcm9tIFwiQHRhbnN0YWNrL3JlYWN0LXJvdXRlclwiO1xuXG5pbXBvcnQgdHlwZSB7IFJvdXRlckNvbnRleHQgfSBmcm9tIFwiLi4vdHlwZXNcIjtcblxuaW1wb3J0IHsgY3JlYXRlQnJvd3Nlckhpc3RvcnksIGNyZWF0ZUhhc2hIaXN0b3J5LCBjcmVhdGVSb3V0ZXIgYXMgY3JlYXRlUm91dGVySW50ZXJuYWwgfSBmcm9tIFw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9PiB7XG4gICAgY29uc3QgbG9jYXRpb24gPSBldmVudC50b0xvY2F0aW9uO1xuICAgIGNvbnN0IHtcbiAgICAgIGZ1bGxQYXRoLFxuICAgICAgcGFyYW1zLFxuICAgICAgc2VhcmNoLFxuICAgICAgY29udGV4dFxuICAgIH0gPSByb3V0ZXJcbiAgICAgIC5tYXRjaFJvdXRlcyhcbiAgICAgICAgbG9jYXRpb24ucGF0aG5hbWUsXG4gICAgICAgIGxvY2F0aW9uLnNlYXJjaCxcbiAgICAgICAge1xuICAgICAgICAgIHByZWxvYWQ6IGZhbHNlLFxuICAgICAgICAgIHRocm93T25FcnJvcjogZmFsc2VcbiAgICAgICAgfVxuICAgICAgKVxuICAgICAgLmF0KC0xKSE7XG5cbiAgICBjb25zdCB7IHVzZXJNZW51TWFwIH0gPSB1c2VBcHBTdG9yZS5nZXRTdGF0ZSgpO1xuICAgIGNvbnN0IHsgYWRkVGFiLCBzZXRBY3RpdmVUYWJJZCB9ID0gdXNlVGFiU3RvcmUuZ2V0U3RhdGUoKTtcblxuICAgIGNvbnN0IGlkID0gYCR7ZnVsbFBhdGh9fCR7aGFzaEtleShzZWFyY2gpfXwke2hhc2hLZXkocGFyYW1zKX1gO1xuICAgIGNvbnN0IHVzZXJNZW51ID0gdXNlck1lbnVNYXA/LmdldChmdWxsUGF0aCk7XG5cbiAgICBpZiAodXNlck1lbnUpIHtcbiAgICAgIGFkZFRhYih7XG4gICAgICAgIGlkLFxuICAgICAgICBmdWxsUGF0aCxcbiAgICAgICAgcGFyYW1zLFxuICAgICAgICBzZWFyY2gsXG4gICAgICAgIGxhYmVsOiBjb250ZXh0LnRpdGxlIHx8IHVzZXJNZW51Lm5hbWVcbiAgICAgIH0pO1xuICAgICAgc2V0QWN0aXZlVGFiSWQoaWQpO1xuICAgIH1cbiAgfSk7XG5cbiAgcmV0dXJuIHJvdXRlcjtcbn1cbiJdfQ== */",
22
- toString: B
26
+ styles: "white-space:pre-wrap/*# sourceMappingURL=data:application/json;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G4gIH0pO1xuXG4gIHJldHVybiByb3V0ZXI7XG59XG4iXX0= */",
27
+ toString: S
23
28
  };
24
- function k({
25
- history: a,
26
- routeTree: o,
27
- context: X
29
+ function _({
30
+ history: A,
31
+ routeTree: Z,
32
+ context: u
28
33
  }) {
29
- const g = s({
30
- routeTree: o,
31
- context: X,
34
+ const I = n({
35
+ routeTree: Z,
36
+ context: u,
32
37
  trailingSlash: "never",
33
38
  caseSensitive: !0,
34
- history: a === "hash" ? V() : y(),
39
+ history: A === "hash" ? r() : F(),
35
40
  search: {
36
41
  strict: !0
37
42
  },
38
43
  notFoundMode: "root",
39
- defaultPendingComponent: () => /* @__PURE__ */ e(W, { description: "玩命加载中, 请稍安勿躁...", descriptionSize: 18, size: 48 }),
40
- defaultErrorComponent: h,
41
- defaultNotFoundComponent: F,
44
+ defaultPendingComponent: () => /* @__PURE__ */ l(s, { description: "玩命加载中, 请稍安勿躁...", descriptionSize: 18, size: 48 }),
45
+ defaultErrorComponent: x,
46
+ defaultNotFoundComponent: h,
42
47
  defaultPendingMs: 500,
43
48
  defaultPendingMinMs: 300,
44
49
  defaultStructuralSharing: !0,
@@ -49,44 +54,50 @@ function k({
49
54
  },
50
55
  defaultPreload: "intent",
51
56
  defaultPreloadDelay: 50,
52
- defaultPreloadGcTime: G,
53
- defaultGcTime: G,
57
+ defaultPreloadGcTime: o,
58
+ defaultGcTime: o,
54
59
  defaultViewTransition: !1,
55
- async defaultOnCatch(I) {
56
- const c = await R(I);
57
- r(/* @__PURE__ */ e("pre", { css: Y, children: c }), {
58
- title: I.message || I.name
60
+ async defaultOnCatch(g) {
61
+ const c = await B(g);
62
+ y(/* @__PURE__ */ l("pre", { css: H, children: c }), {
63
+ title: g.message || g.name
59
64
  });
60
65
  }
61
66
  });
62
- return g.subscribe("onBeforeLoad", ({
63
- pathChanged: I
67
+ return I.subscribe("onBeforeLoad", ({
68
+ pathChanged: g
64
69
  }) => {
65
- I && A.emit("start");
66
- }), g.subscribe("onLoad", () => A.emit("complete")), g.subscribe("onLoad", (I) => {
67
- const c = I.toLocation, {
70
+ g && b.emit("start");
71
+ }), I.subscribe("onLoad", () => b.emit("complete")), I.subscribe("onLoad", (g) => {
72
+ const c = g.toLocation, {
68
73
  fullPath: C,
69
- params: d,
70
- search: i,
71
- context: Z
72
- } = g.matchRoutes(c.pathname, c.search, {
74
+ params: t,
75
+ search: d,
76
+ context: a
77
+ } = I.matchRoutes(c.pathname, c.search, {
73
78
  preload: !1,
74
79
  throwOnError: !1
75
80
  }).at(-1), {
76
- userMenuMap: u
77
- } = x.getState(), {
78
- addTab: m,
79
- setActiveTabId: n
80
- } = J.getState(), t = `${C}|${b(i)}|${b(d)}`, l = u?.get(C);
81
- l && (m({
82
- id: t,
81
+ userMenuMap: m
82
+ } = Y.getState(), {
83
+ addTab: V,
84
+ setActiveTabId: R
85
+ } = p.getState(), i = `${C}|${G(d)}|${G(t)}`, X = m?.get(C);
86
+ X && (V({
87
+ id: i,
83
88
  fullPath: C,
84
- params: d,
85
- search: i,
86
- label: Z.title || l.name
87
- }), n(t));
88
- }), g;
89
+ params: t,
90
+ search: d,
91
+ label: a.routeTitle || X.name
92
+ }), R(i));
93
+ }), e.on(J, () => {
94
+ I.navigate({
95
+ to: v
96
+ });
97
+ }), e.on(N, () => {
98
+ W(I);
99
+ }), I;
89
100
  }
90
101
  export {
91
- k as createRouter
102
+ _ as createRouter
92
103
  };
package/dist/es/index.js CHANGED
@@ -3,75 +3,77 @@ import "./constants/index.js";
3
3
  import "./helpers/index.js";
4
4
  import "./routes/index.js";
5
5
  import "./stores/index.js";
6
- import { createCrudKit as f } from "./components/crud/helpers.js";
7
- import { Crud as i } from "./components/crud/index.js";
6
+ import { createCrudKit as x } from "./components/crud/helpers.js";
7
+ import { Crud as a } from "./components/crud/index.js";
8
8
  import { CrudPage as _ } from "./components/crud-page/index.js";
9
- import { FlexCard as O } from "./components/flex-card/index.js";
10
- import { FormDrawer as R } from "./components/form-drawer/index.js";
11
- import { FormModal as s } from "./components/form-modal/index.js";
12
- import { OperationButtonGroup as c } from "./components/pro-table/components/operation-button-group.js";
13
- import { Page as I } from "./components/page/index.js";
14
- import { ProSearch as D } from "./components/pro-search/index.js";
15
- import { ProTable as N } from "./components/pro-table/index.js";
9
+ import { FlexCard as u } from "./components/flex-card/index.js";
10
+ import { FormDrawer as S } from "./components/form-drawer/index.js";
11
+ import { FormModal as R } from "./components/form-modal/index.js";
12
+ import { OperationButtonGroup as s } from "./components/pro-table/components/operation-button-group.js";
13
+ import { Page as D } from "./components/page/index.js";
14
+ import { ProSearch as N } from "./components/pro-search/index.js";
15
+ import { ProTable as P } from "./components/pro-table/index.js";
16
16
  import { TableSubscriber as l } from "./components/pro-table/components/table-subscriber.js";
17
- import { useViewportHeight as L } from "./components/page/viewport-context.js";
18
- import { RELOAD_PAGE_EVENT as G } from "./constants/event.js";
19
- import { ACCESS_DENIED_ROUTE_ID as g, ACCESS_DENIED_ROUTE_PATH as h, INDEX_ROUTE_ID as H, INDEX_ROUTE_PATH as M, LOGIN_ROUTE_ID as X, LOGIN_ROUTE_PATH as Y } from "./constants/router.js";
20
- import { STORAGE_KEY_PREFIX_STORE as K, STORAGE_KEY_SUFFIX_STORE as V } from "./constants/storage.js";
21
- import { SYMBOL_PAGINATION as w, SYMBOL_SORT as y } from "./constants/symbols.js";
22
- import { createApiClient as j } from "./helpers/api.js";
23
- import { createApp as q } from "./helpers/app.js";
24
- import { setupAppVersionNotification as J } from "./helpers/app-version.js";
25
- import { handleClientLogout as Z } from "./helpers/auth.js";
26
- import { dispatchCustomEvent as rr, eventEmitter as or, reloadPage as er } from "./helpers/event.js";
27
- import { extractQueryParams as pr, noopMutationFn as mr } from "./helpers/query.js";
28
- import { createRouter as fr } from "./helpers/router.js";
29
- import { createAccessDeniedRouteOptions as ir } from "./routes/access-denied.js";
30
- import { createLayoutRouteOptions as _r } from "./routes/layout.js";
31
- import { createLoginRouteOptions as Or } from "./routes/login.js";
17
+ import { useViewportHeight as b } from "./components/page/viewport-context.js";
18
+ import { ACCESS_DENIED_EVENT as F, RELOAD_PAGE_EVENT as G, UNAUTHENTICATED_EVENT as g } from "./constants/event.js";
19
+ import { ACCESS_DENIED_ROUTE_ID as H, ACCESS_DENIED_ROUTE_PATH as V, INDEX_ROUTE_ID as M, INDEX_ROUTE_PATH as X, LOGIN_ROUTE_ID as Y, LOGIN_ROUTE_PATH as B } from "./constants/router.js";
20
+ import { STORAGE_KEY_PREFIX_STORE as v, STORAGE_KEY_SUFFIX_STORE as w } from "./constants/storage.js";
21
+ import { SYMBOL_PAGINATION as Q, SYMBOL_SORT as j } from "./constants/symbols.js";
22
+ import { createApiClient as q } from "./helpers/api.js";
23
+ import { createApp as J } from "./helpers/app.js";
24
+ import { setupAppVersionNotification as Z } from "./helpers/app-version.js";
25
+ import { handleClientLogout as rr } from "./helpers/auth.js";
26
+ import { dispatchCustomEvent as er, eventEmitter as tr, reloadPage as pr } from "./helpers/event.js";
27
+ import { extractQueryParams as Er, noopMutationFn as xr } from "./helpers/query.js";
28
+ import { createRouter as ar } from "./helpers/router.js";
29
+ import { createAccessDeniedRouteOptions as _r } from "./routes/access-denied.js";
30
+ import { createLayoutRouteOptions as ur } from "./routes/layout.js";
31
+ import { createLoginRouteOptions as Sr } from "./routes/login.js";
32
32
  import { createRootRouteOptions as Rr } from "./routes/root.js";
33
33
  import { useAppStore as sr } from "./stores/app.js";
34
- import { useTabStore as cr } from "./stores/tab.js";
35
- import { useThemeStore as Ir } from "./stores/theme.js";
34
+ import { useTabStore as Dr } from "./stores/tab.js";
35
+ import { useThemeStore as Nr } from "./stores/theme.js";
36
36
  export {
37
- g as ACCESS_DENIED_ROUTE_ID,
38
- h as ACCESS_DENIED_ROUTE_PATH,
39
- i as Crud,
37
+ F as ACCESS_DENIED_EVENT,
38
+ H as ACCESS_DENIED_ROUTE_ID,
39
+ V as ACCESS_DENIED_ROUTE_PATH,
40
+ a as Crud,
40
41
  _ as CrudPage,
41
- O as FlexCard,
42
- R as FormDrawer,
43
- s as FormModal,
44
- H as INDEX_ROUTE_ID,
45
- M as INDEX_ROUTE_PATH,
46
- X as LOGIN_ROUTE_ID,
47
- Y as LOGIN_ROUTE_PATH,
48
- c as OperationButtonGroup,
49
- I as Page,
50
- D as ProSearch,
51
- N as ProTable,
42
+ u as FlexCard,
43
+ S as FormDrawer,
44
+ R as FormModal,
45
+ M as INDEX_ROUTE_ID,
46
+ X as INDEX_ROUTE_PATH,
47
+ Y as LOGIN_ROUTE_ID,
48
+ B as LOGIN_ROUTE_PATH,
49
+ s as OperationButtonGroup,
50
+ D as Page,
51
+ N as ProSearch,
52
+ P as ProTable,
52
53
  l as ProTableSubscriber,
53
54
  G as RELOAD_PAGE_EVENT,
54
- K as STORAGE_KEY_PREFIX_STORE,
55
- V as STORAGE_KEY_SUFFIX_STORE,
56
- w as SYMBOL_PAGINATION,
57
- y as SYMBOL_SORT,
58
- ir as createAccessDeniedRouteOptions,
59
- j as createApiClient,
60
- q as createApp,
61
- f as createCrudKit,
62
- _r as createLayoutRouteOptions,
63
- Or as createLoginRouteOptions,
55
+ v as STORAGE_KEY_PREFIX_STORE,
56
+ w as STORAGE_KEY_SUFFIX_STORE,
57
+ Q as SYMBOL_PAGINATION,
58
+ j as SYMBOL_SORT,
59
+ g as UNAUTHENTICATED_EVENT,
60
+ _r as createAccessDeniedRouteOptions,
61
+ q as createApiClient,
62
+ J as createApp,
63
+ x as createCrudKit,
64
+ ur as createLayoutRouteOptions,
65
+ Sr as createLoginRouteOptions,
64
66
  Rr as createRootRouteOptions,
65
- fr as createRouter,
66
- rr as dispatchCustomEvent,
67
- or as eventEmitter,
68
- pr as extractQueryParams,
69
- Z as handleClientLogout,
70
- mr as noopMutationFn,
71
- er as reloadPage,
72
- J as setupAppVersionNotification,
67
+ ar as createRouter,
68
+ er as dispatchCustomEvent,
69
+ tr as eventEmitter,
70
+ Er as extractQueryParams,
71
+ rr as handleClientLogout,
72
+ xr as noopMutationFn,
73
+ pr as reloadPage,
74
+ Z as setupAppVersionNotification,
73
75
  sr as useAppStore,
74
- cr as useTabStore,
75
- Ir as useThemeStore,
76
- L as useViewportHeight
76
+ Dr as useTabStore,
77
+ Nr as useThemeStore,
78
+ b as useViewportHeight
77
79
  };
@@ -1,14 +1,16 @@
1
1
  import "../components/index.js";
2
2
  import "../constants/index.js";
3
- import { AccessDenied as r } from "../components/access-denied/index.js";
3
+ import { AccessDenied as o } from "../components/access-denied/index.js";
4
4
  import { INDEX_ROUTE_PATH as i } from "../constants/router.js";
5
- function m(o) {
5
+ function a() {
6
6
  return {
7
- component: r,
7
+ component: o,
8
8
  beforeLoad({
9
- location: t
9
+ location: t,
10
+ context: {
11
+ router: e
12
+ }
10
13
  }) {
11
- const e = o();
12
14
  e.state.resolvedLocation || (t.state.__TSR_index === 0 ? e.navigate({
13
15
  to: i
14
16
  }) : e.history.back());
@@ -16,5 +18,5 @@ function m(o) {
16
18
  };
17
19
  }
18
20
  export {
19
- m as createAccessDeniedRouteOptions
21
+ a as createAccessDeniedRouteOptions
20
22
  };
@@ -2,3 +2,11 @@
2
2
  * The event type for reloading the page.
3
3
  */
4
4
  export declare const RELOAD_PAGE_EVENT = "__vef_reload_page_event";
5
+ /**
6
+ * The event type for access denied.
7
+ */
8
+ export declare const ACCESS_DENIED_EVENT = "__vef_access_denied_event";
9
+ /**
10
+ * The event type for unauthenticated.
11
+ */
12
+ export declare const UNAUTHENTICATED_EVENT = "__vef_unauthenticated_event";
@@ -1,4 +1,4 @@
1
- export { RELOAD_PAGE_EVENT } from './event';
1
+ export { ACCESS_DENIED_EVENT, RELOAD_PAGE_EVENT, UNAUTHENTICATED_EVENT } from './event';
2
2
  export { ACCESS_DENIED_ROUTE_ID, ACCESS_DENIED_ROUTE_PATH, INDEX_ROUTE_ID, INDEX_ROUTE_PATH, LOGIN_ROUTE_ID, LOGIN_ROUTE_PATH } from './router';
3
3
  export { STORAGE_KEY_PREFIX_STORE, STORAGE_KEY_SUFFIX_STORE } from './storage';
4
4
  export { SYMBOL_PAGINATION, SYMBOL_SORT } from './symbols';
@@ -1,9 +1,6 @@
1
- import { AnyRouter } from '@tanstack/react-router';
2
1
  import { HttpClientOptions, QueryClientOptions, ApiClient } from '@vef-framework/core';
3
- import { Awaitable } from '@vef-framework/shared';
4
2
  export interface ApiClientOptions {
5
- getRouter: () => Awaitable<AnyRouter>;
6
3
  http: Pick<HttpClientOptions, "baseUrl" | "timeout" | "okCode" | "tokenExpiredCode" | "refreshToken">;
7
4
  query?: Pick<QueryClientOptions, "gcTime" | "staleTime">;
8
5
  }
9
- export declare function createApiClient({ getRouter, http, query }: ApiClientOptions): ApiClient;
6
+ export declare function createApiClient({ http, query }: ApiClientOptions): ApiClient;
@@ -1,6 +1,8 @@
1
1
  import { EventEmitter } from '@vef-framework/shared';
2
2
  export declare const eventEmitter: EventEmitter<{
3
3
  __vef_reload_page_event: string;
4
+ __vef_access_denied_event: void;
5
+ __vef_unauthenticated_event: void;
4
6
  }>;
5
7
  /**
6
8
  * Dispatch a custom event.
@@ -14,3 +16,11 @@ export declare function dispatchCustomEvent<T = any>(type: string, options?: Cus
14
16
  * @param key - The key of the page to reload.
15
17
  */
16
18
  export declare function reloadPage(key: string): void;
19
+ /**
20
+ * Emit the access denied event.
21
+ */
22
+ export declare function emitAccessDenied(): void;
23
+ /**
24
+ * Emit the unauthenticated event.
25
+ */
26
+ export declare function emitUnauthenticated(): void;
@@ -5,9 +5,12 @@ import { AccessDenied } from '../components';
5
5
  *
6
6
  * @returns The options of the access denied route.
7
7
  */
8
- export declare function createAccessDeniedRouteOptions(getRouter: () => AnyRouter): {
8
+ export declare function createAccessDeniedRouteOptions(): {
9
9
  readonly component: typeof AccessDenied;
10
- readonly beforeLoad: ({ location }: {
10
+ readonly beforeLoad: ({ location, context: { router } }: {
11
11
  location: ParsedLocation;
12
+ context: {
13
+ router: AnyRouter;
14
+ };
12
15
  }) => void;
13
16
  };
@@ -1,7 +1,12 @@
1
+ import { AnyRouter } from '@tanstack/react-router';
1
2
  /**
2
3
  * The context of the router.
3
4
  */
4
5
  export interface RouterContext {
6
+ /**
7
+ * The router.
8
+ */
9
+ router: AnyRouter;
5
10
  /**
6
11
  * The title of the route.
7
12
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/starter",
3
3
  "type": "module",
4
- "version": "2.0.8",
4
+ "version": "2.0.10",
5
5
  "private": false,
6
6
  "description": "Starter for VEF framework",
7
7
  "author": {
@@ -64,10 +64,10 @@
64
64
  "@tanstack/react-router": "^1.139.6",
65
65
  "react": "^19.2.0",
66
66
  "react-dom": "^19.2.0",
67
- "@vef-framework/components": "2.0.8",
68
- "@vef-framework/core": "2.0.8",
69
- "@vef-framework/shared": "2.0.8",
70
- "@vef-framework/hooks": "2.0.8"
67
+ "@vef-framework/shared": "2.0.10",
68
+ "@vef-framework/components": "2.0.10",
69
+ "@vef-framework/core": "2.0.10",
70
+ "@vef-framework/hooks": "2.0.10"
71
71
  },
72
72
  "scripts": {
73
73
  "clean": "rimraf dist",