@orbe-agro/client-core 5.6.259 → 5.6.260
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/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js +2 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js.map +1 -1
- package/dist/@ecme/components/template/Footer.js +1 -1
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.d.ts.map +1 -1
- package/lib/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.tsx +4 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ import { useLocation } from "react-router-dom";
|
|
|
6
6
|
import "../../../configs/index.js";
|
|
7
7
|
import GlobalLoading from "../../shared/loaders/GlobalLoading.js";
|
|
8
8
|
import "../../template/OrbeAiWidget/index.js";
|
|
9
|
+
import Can from "../../shared/Can.js";
|
|
9
10
|
import { protectedRoutes, publicRoutes } from "../../../configs/routes.config/routes.config.js";
|
|
10
11
|
import OrbeAiWidget from "../../template/OrbeAiWidget/OrbeAiWidget.js";
|
|
11
12
|
const layouts = {
|
|
@@ -38,7 +39,7 @@ const PostLoginLayout = ({
|
|
|
38
39
|
}, [location.pathname, layoutType]);
|
|
39
40
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
41
|
/* @__PURE__ */ jsx(GlobalLoading, {}),
|
|
41
|
-
/* @__PURE__ */ jsx(OrbeAiWidget, {}),
|
|
42
|
+
/* @__PURE__ */ jsx(Can, { I: "VISUALIZAR_CHAT_ORBE_AI", children: /* @__PURE__ */ jsx(OrbeAiWidget, {}) }),
|
|
42
43
|
/* @__PURE__ */ jsx(
|
|
43
44
|
Suspense,
|
|
44
45
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostLoginLayout.js","sources":["../../../../../lib/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.tsx"],"sourcesContent":["import { lazy, Suspense, useMemo } from \"react\";\nimport {\n LAYOUT_COLLAPSIBLE_SIDE,\n LAYOUT_STACKED_SIDE,\n LAYOUT_TOP_BAR_CLASSIC,\n LAYOUT_FRAMELESS_SIDE,\n LAYOUT_CONTENT_OVERLAY,\n LAYOUT_BLANK,\n} from \"@/constants/theme.constant\";\nimport Loading from \"@/components/shared/Loading\";\nimport type { CommonProps } from \"@/@types/common\";\nimport type { LazyExoticComponent, JSX } from \"react\";\nimport type { LayoutType } from \"@/@types/theme\";\nimport { LinkRenderer } from \"../Layouts\";\nimport { useLocation } from \"react-router-dom\";\nimport { Routes } from \"@/@types\";\nimport { protectedRoutes, publicRoutes } from \"@/configs\";\nimport GlobalLoading from \"@/components/shared/loaders/GlobalLoading\";\nimport OrbeAiWidget from \"@/components/template/OrbeAiWidget\";\n\ntype Layouts = Record<\n string,\n LazyExoticComponent<<T extends CommonProps>(props: T) => JSX.Element>\n>;\n\ninterface PostLoginLayoutProps extends CommonProps {\n layoutType: LayoutType;\n linkRenderer?: LinkRenderer;\n pageTitle?: string;\n}\n\nconst layouts: Layouts = {\n [LAYOUT_COLLAPSIBLE_SIDE]: lazy(() => import(\"./components/CollapsibleSide\")),\n [LAYOUT_STACKED_SIDE]: lazy(() => import(\"./components/StackedSide\")),\n [LAYOUT_TOP_BAR_CLASSIC]: lazy(() => import(\"./components/TopBarClassic\")),\n [LAYOUT_FRAMELESS_SIDE]: lazy(() => import(\"./components/FrameLessSide\")),\n [LAYOUT_CONTENT_OVERLAY]: lazy(() => import(\"./components/ContentOverlay\")),\n [LAYOUT_BLANK]: lazy(() => import(\"./components/Blank\")),\n};\n\nconst findRouteByPath = (\n path: string,\n routes: Routes\n): Routes[0] | undefined => {\n for (const route of routes) {\n if (route.path === path) {\n return route;\n }\n }\n};\n\nconst PostLoginLayout = ({\n layoutType,\n children,\n linkRenderer,\n pageTitle,\n}: PostLoginLayoutProps) => {\n const location = useLocation();\n const AppLayout = useMemo(() => {\n const allRoutes = [...protectedRoutes, ...publicRoutes];\n const currentRoute = findRouteByPath(location.pathname, allRoutes);\n const layout = currentRoute?.meta?.layout ?? layoutType;\n return layouts[layout] ?? layouts[Object.keys(layouts)[0]];\n }, [location.pathname, layoutType]);\n\n return (\n <>\n <GlobalLoading />\n <OrbeAiWidget />\n <Suspense\n fallback={\n <div className=\"flex flex-auto flex-col h-[100vh]\">\n <Loading loading={true}/>\n </div>\n }\n >\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <AppLayout linkRenderer={linkRenderer} pageTitle={pageTitle}>\n {children}\n </AppLayout>\n </Suspense>\n </>\n );\n};\n\nexport default PostLoginLayout;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PostLoginLayout.js","sources":["../../../../../lib/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.tsx"],"sourcesContent":["import { lazy, Suspense, useMemo } from \"react\";\nimport {\n LAYOUT_COLLAPSIBLE_SIDE,\n LAYOUT_STACKED_SIDE,\n LAYOUT_TOP_BAR_CLASSIC,\n LAYOUT_FRAMELESS_SIDE,\n LAYOUT_CONTENT_OVERLAY,\n LAYOUT_BLANK,\n} from \"@/constants/theme.constant\";\nimport Loading from \"@/components/shared/Loading\";\nimport type { CommonProps } from \"@/@types/common\";\nimport type { LazyExoticComponent, JSX } from \"react\";\nimport type { LayoutType } from \"@/@types/theme\";\nimport { LinkRenderer } from \"../Layouts\";\nimport { useLocation } from \"react-router-dom\";\nimport { Routes } from \"@/@types\";\nimport { protectedRoutes, publicRoutes } from \"@/configs\";\nimport GlobalLoading from \"@/components/shared/loaders/GlobalLoading\";\nimport OrbeAiWidget from \"@/components/template/OrbeAiWidget\";\nimport Can from \"@/components/shared/Can\";\n\ntype Layouts = Record<\n string,\n LazyExoticComponent<<T extends CommonProps>(props: T) => JSX.Element>\n>;\n\ninterface PostLoginLayoutProps extends CommonProps {\n layoutType: LayoutType;\n linkRenderer?: LinkRenderer;\n pageTitle?: string;\n}\n\nconst layouts: Layouts = {\n [LAYOUT_COLLAPSIBLE_SIDE]: lazy(() => import(\"./components/CollapsibleSide\")),\n [LAYOUT_STACKED_SIDE]: lazy(() => import(\"./components/StackedSide\")),\n [LAYOUT_TOP_BAR_CLASSIC]: lazy(() => import(\"./components/TopBarClassic\")),\n [LAYOUT_FRAMELESS_SIDE]: lazy(() => import(\"./components/FrameLessSide\")),\n [LAYOUT_CONTENT_OVERLAY]: lazy(() => import(\"./components/ContentOverlay\")),\n [LAYOUT_BLANK]: lazy(() => import(\"./components/Blank\")),\n};\n\nconst findRouteByPath = (\n path: string,\n routes: Routes\n): Routes[0] | undefined => {\n for (const route of routes) {\n if (route.path === path) {\n return route;\n }\n }\n};\n\nconst PostLoginLayout = ({\n layoutType,\n children,\n linkRenderer,\n pageTitle,\n}: PostLoginLayoutProps) => {\n const location = useLocation();\n const AppLayout = useMemo(() => {\n const allRoutes = [...protectedRoutes, ...publicRoutes];\n const currentRoute = findRouteByPath(location.pathname, allRoutes);\n const layout = currentRoute?.meta?.layout ?? layoutType;\n return layouts[layout] ?? layouts[Object.keys(layouts)[0]];\n }, [location.pathname, layoutType]);\n\n return (\n <>\n <GlobalLoading />\n <Can I=\"VISUALIZAR_CHAT_ORBE_AI\">\n <OrbeAiWidget />\n </Can>\n <Suspense\n fallback={\n <div className=\"flex flex-auto flex-col h-[100vh]\">\n <Loading loading={true}/>\n </div>\n }\n >\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <AppLayout linkRenderer={linkRenderer} pageTitle={pageTitle}>\n {children}\n </AppLayout>\n </Suspense>\n </>\n );\n};\n\nexport default PostLoginLayout;\n"],"names":[],"mappings":";;;;;;;;;;;AAgCA,MAAM,UAAmB;AAAA,EACvB,CAAC,uBAAuB,GAAG,KAAK,MAAM,OAAO,iCAA8B,CAAC;AAAA,EAC5E,CAAC,mBAAmB,GAAG,KAAK,MAAM,OAAO,6BAA0B,CAAC;AAAA,EACpE,CAAC,sBAAsB,GAAG,KAAK,MAAM,OAAO,+BAA4B,CAAC;AAAA,EACzE,CAAC,qBAAqB,GAAG,KAAK,MAAM,OAAO,+BAA4B,CAAC;AAAA,EACxE,CAAC,sBAAsB,GAAG,KAAK,MAAM,OAAO,gCAA6B,CAAC;AAAA,EAC1E,CAAC,YAAY,GAAG,KAAK,MAAM,OAAO,uBAAoB,CAAC;AACzD;AAEA,MAAM,kBAAkB,CACtB,MACA,WAC0B;AAC1B,aAAW,SAAS,QAAQ;AAC1B,QAAI,MAAM,SAAS,MAAM;AACvB,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA4B;AAC1B,QAAM,WAAW,YAAA;AACjB,QAAM,YAAY,QAAQ,MAAM;AAC9B,UAAM,YAAY,CAAC,GAAG,iBAAiB,GAAG,YAAY;AACtD,UAAM,eAAe,gBAAgB,SAAS,UAAU,SAAS;AACjE,UAAM,SAAS,cAAc,MAAM,UAAU;AAC7C,WAAO,QAAQ,MAAM,KAAK,QAAQ,OAAO,KAAK,OAAO,EAAE,CAAC,CAAC;AAAA,EAC3D,GAAG,CAAC,SAAS,UAAU,UAAU,CAAC;AAElC,SACE,qBAAA,UAAA,EACE,UAAA;AAAA,IAAA,oBAAC,eAAA,EAAc;AAAA,wBACd,KAAA,EAAI,GAAE,2BACL,UAAA,oBAAC,gBAAa,GAChB;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,8BACG,OAAA,EAAI,WAAU,qCACb,UAAA,oBAAC,SAAA,EAAQ,SAAS,KAAA,CAAK,EAAA,CACzB;AAAA,QAKF,UAAA,oBAAC,WAAA,EAAU,cAA4B,WACpC,SAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -3,7 +3,7 @@ import Container from "../shared/Container.js";
|
|
|
3
3
|
import classNames from "../../utils/classNames.js";
|
|
4
4
|
import { APP_NAME } from "../../constants/app.constant.js";
|
|
5
5
|
import { PAGE_CONTAINER_GUTTER_X } from "../../constants/theme.constant.js";
|
|
6
|
-
const version = true ? "5.6.
|
|
6
|
+
const version = true ? "5.6.260" : "0.0.0";
|
|
7
7
|
const FooterContent = () => {
|
|
8
8
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-auto items-center justify-between", children: [
|
|
9
9
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostLoginLayout.d.ts","sourceRoot":"","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"PostLoginLayout.d.ts","sourceRoot":"","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAa1C,UAAU,oBAAqB,SAAQ,WAAW;IAChD,UAAU,EAAE,UAAU,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsBD,QAAA,MAAM,eAAe,GAAI,oDAKtB,oBAAoB,4CA8BtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -17,6 +17,7 @@ import { Routes } from "@/@types";
|
|
|
17
17
|
import { protectedRoutes, publicRoutes } from "@/configs";
|
|
18
18
|
import GlobalLoading from "@/components/shared/loaders/GlobalLoading";
|
|
19
19
|
import OrbeAiWidget from "@/components/template/OrbeAiWidget";
|
|
20
|
+
import Can from "@/components/shared/Can";
|
|
20
21
|
|
|
21
22
|
type Layouts = Record<
|
|
22
23
|
string,
|
|
@@ -66,7 +67,9 @@ const PostLoginLayout = ({
|
|
|
66
67
|
return (
|
|
67
68
|
<>
|
|
68
69
|
<GlobalLoading />
|
|
69
|
-
<
|
|
70
|
+
<Can I="VISUALIZAR_CHAT_ORBE_AI">
|
|
71
|
+
<OrbeAiWidget />
|
|
72
|
+
</Can>
|
|
70
73
|
<Suspense
|
|
71
74
|
fallback={
|
|
72
75
|
<div className="flex flex-auto flex-col h-[100vh]">
|
package/package.json
CHANGED