@golocalinteractive/golocal-cloud-wrapper 1.0.17 → 1.0.18
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/components/app-header.d.ts +5 -1
- package/dist/components/app-header.d.ts.map +1 -1
- package/dist/components/profile-dropdown.d.ts +5 -1
- package/dist/components/profile-dropdown.d.ts.map +1 -1
- package/dist/golocal-cloud-wrapper.es.js +24 -17
- package/dist/golocal-cloud-wrapper.umd.js +22 -22
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/providers/GLICloudProvider.d.ts +5 -2
- package/dist/providers/GLICloudProvider.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface AppHeaderProps {
|
|
2
|
+
onLogout?: () => void | Promise<void>;
|
|
3
|
+
}
|
|
4
|
+
export declare const AppHeader: ({ onLogout }: AppHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export {};
|
|
2
6
|
//# sourceMappingURL=app-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-header.d.ts","sourceRoot":"","sources":["../../src/components/app-header.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"app-header.d.ts","sourceRoot":"","sources":["../../src/components/app-header.tsx"],"names":[],"mappings":"AAKA,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,eAAO,MAAM,SAAS,GAAI,cAAc,cAAc,4CAcrD,CAAC"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface ProfileDropdownProps {
|
|
2
|
+
onLogout?: () => void | Promise<void>;
|
|
3
|
+
}
|
|
4
|
+
export declare const ProfileDropdown: ({ onLogout }: ProfileDropdownProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
export {};
|
|
2
6
|
//# sourceMappingURL=profile-dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dropdown.d.ts","sourceRoot":"","sources":["../../src/components/profile-dropdown.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"profile-dropdown.d.ts","sourceRoot":"","sources":["../../src/components/profile-dropdown.tsx"],"names":[],"mappings":"AAYA,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,eAAO,MAAM,eAAe,GAAI,cAAc,oBAAoB,mDA0EjE,CAAC"}
|
|
@@ -8866,25 +8866,29 @@ function A0({
|
|
|
8866
8866
|
}
|
|
8867
8867
|
);
|
|
8868
8868
|
}
|
|
8869
|
-
const M0 = () => {
|
|
8870
|
-
const { user:
|
|
8871
|
-
|
|
8869
|
+
const M0 = ({ onLogout: e }) => {
|
|
8870
|
+
const { user: t, error: n, isLoading: r } = nc(), o = async () => {
|
|
8871
|
+
try {
|
|
8872
|
+
e && await e(), window.location.href = "/auth/logout";
|
|
8873
|
+
} catch (s) {
|
|
8874
|
+
console.error("Error during logout:", s), window.location.href = "/auth/logout";
|
|
8875
|
+
}
|
|
8872
8876
|
};
|
|
8873
|
-
return
|
|
8877
|
+
return r ? /* @__PURE__ */ p.jsx("div", { className: "h-10 w-10 animate-pulse rounded-full bg-gray-200" }) : n ? /* @__PURE__ */ p.jsxs("div", { children: [
|
|
8874
8878
|
"Error: ",
|
|
8875
|
-
|
|
8876
|
-
] }) :
|
|
8879
|
+
n.message
|
|
8880
|
+
] }) : t ? /* @__PURE__ */ p.jsx("div", { className: "relative flex items-center gap-3", children: /* @__PURE__ */ p.jsxs(E0, { children: [
|
|
8877
8881
|
/* @__PURE__ */ p.jsx(S0, { asChild: !0, children: /* @__PURE__ */ p.jsx(
|
|
8878
8882
|
ir,
|
|
8879
8883
|
{
|
|
8880
8884
|
variant: "ghost",
|
|
8881
8885
|
size: "lg",
|
|
8882
8886
|
className: "rounded-full cursor-pointer p-0",
|
|
8883
|
-
children:
|
|
8887
|
+
children: t.picture ? /* @__PURE__ */ p.jsx(
|
|
8884
8888
|
"img",
|
|
8885
8889
|
{
|
|
8886
|
-
src:
|
|
8887
|
-
alt:
|
|
8890
|
+
src: t.picture,
|
|
8891
|
+
alt: t.name || "User profile",
|
|
8888
8892
|
width: 40,
|
|
8889
8893
|
height: 40,
|
|
8890
8894
|
className: "rounded-full"
|
|
@@ -8894,35 +8898,38 @@ const M0 = () => {
|
|
|
8894
8898
|
) }),
|
|
8895
8899
|
/* @__PURE__ */ p.jsxs(R0, { align: "end", className: "w-72", children: [
|
|
8896
8900
|
/* @__PURE__ */ p.jsx(_0, { children: /* @__PURE__ */ p.jsx("div", { className: "flex flex-col space-y-1", children: /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col space-y-1", children: [
|
|
8897
|
-
/* @__PURE__ */ p.jsx("p", { className: "text-xs text-gray-500", children:
|
|
8898
|
-
/* @__PURE__ */ p.jsx("p", { className: "truncate text-xs text-gray-500", children:
|
|
8901
|
+
/* @__PURE__ */ p.jsx("p", { className: "text-xs text-gray-500", children: t.name }),
|
|
8902
|
+
/* @__PURE__ */ p.jsx("p", { className: "truncate text-xs text-gray-500", children: t.email })
|
|
8899
8903
|
] }) }) }),
|
|
8900
8904
|
/* @__PURE__ */ p.jsx(A0, {}),
|
|
8901
8905
|
/* @__PURE__ */ p.jsx(Oo, { asChild: !0, children: /* @__PURE__ */ p.jsxs("a", { href: "/profile", className: "flex w-full cursor-default", children: [
|
|
8902
8906
|
/* @__PURE__ */ p.jsx(Zr, { className: "mr-2 h-4 w-4" }),
|
|
8903
8907
|
/* @__PURE__ */ p.jsx("span", { children: "Profile" })
|
|
8904
8908
|
] }) }),
|
|
8905
|
-
/* @__PURE__ */ p.jsxs(Oo, { onClick:
|
|
8909
|
+
/* @__PURE__ */ p.jsxs(Oo, { onClick: o, children: [
|
|
8906
8910
|
/* @__PURE__ */ p.jsx(yc, { className: "mr-2 h-4 w-4" }),
|
|
8907
8911
|
/* @__PURE__ */ p.jsx("span", { children: "Sign out" })
|
|
8908
8912
|
] })
|
|
8909
8913
|
] })
|
|
8910
8914
|
] }) }) : null;
|
|
8911
|
-
}, O0 = () => /* @__PURE__ */ p.jsx("div", { className: "sticky top-0 z-50", children: /* @__PURE__ */ p.jsxs("header", { className: "flex h-16 items-center justify-between border-b bg-white px-4", children: [
|
|
8915
|
+
}, O0 = ({ onLogout: e }) => /* @__PURE__ */ p.jsx("div", { className: "sticky top-0 z-50", children: /* @__PURE__ */ p.jsxs("header", { className: "flex h-16 items-center justify-between border-b bg-white px-4", children: [
|
|
8912
8916
|
/* @__PURE__ */ p.jsxs("div", { className: "flex h-full items-center gap-4 flex-1 min-w-0 overflow-hidden", children: [
|
|
8913
8917
|
/* @__PURE__ */ p.jsx(Pf, {}),
|
|
8914
8918
|
/* @__PURE__ */ p.jsx(us, { orientation: "vertical" })
|
|
8915
8919
|
] }),
|
|
8916
|
-
/* @__PURE__ */ p.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ p.jsx(M0, {}) })
|
|
8920
|
+
/* @__PURE__ */ p.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ p.jsx(M0, { onLogout: e }) })
|
|
8917
8921
|
] }) }), V0 = ({
|
|
8918
|
-
children: e
|
|
8922
|
+
children: e,
|
|
8923
|
+
onLogout: t
|
|
8919
8924
|
}) => /* @__PURE__ */ p.jsx(rc, { children: /* @__PURE__ */ p.jsx(Of, { children: /* @__PURE__ */ p.jsxs("div", { className: "flex h-screen w-full", children: [
|
|
8920
8925
|
/* @__PURE__ */ p.jsx(Gf, {}),
|
|
8921
8926
|
/* @__PURE__ */ p.jsxs(kf, { className: "flex-1 flex flex-col min-w-0", children: [
|
|
8922
|
-
/* @__PURE__ */ p.jsx(O0, {}),
|
|
8927
|
+
/* @__PURE__ */ p.jsx(O0, { onLogout: t }),
|
|
8923
8928
|
/* @__PURE__ */ p.jsx("main", { className: "flex-1 bg-white", id: "page-content", children: e })
|
|
8924
8929
|
] })
|
|
8925
8930
|
] }) }) });
|
|
8926
8931
|
export {
|
|
8927
|
-
|
|
8932
|
+
O0 as AppHeader,
|
|
8933
|
+
V0 as GLICloudProvider,
|
|
8934
|
+
M0 as ProfileDropdown
|
|
8928
8935
|
};
|