@chaibuilder/pages 0.1.18 → 0.1.20

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.
@@ -2017,7 +2017,7 @@ var gu = (e, t = !1) => {
2017
2017
  const t = kr(() => {
2018
2018
  const n = this, [s] = U(this, mt), [r] = U(this, gt), [i] = U(this, pt), [l] = U(this, yt), [o] = U(this, ht);
2019
2019
  let u;
2020
- return U(this, Et) ? u = U(this, Et) : (u = Ir(() => import("./HO4MOOFI-sdcsvWJW.js")), Y(this, Et, u)), Xr(U(this, $t), U(this, ft)), Pr(u, _r({
2020
+ return U(this, Et) ? u = U(this, Et) : (u = Ir(() => import("./HO4MOOFI-Do83nKZJ.js")), Y(this, Et, u)), Xr(U(this, $t), U(this, ft)), Pr(u, _r({
2021
2021
  get queryFlavor() {
2022
2022
  return U(n, Vt);
2023
2023
  },
@@ -2111,7 +2111,7 @@ var gu = (e, t = !1) => {
2111
2111
  const t = kr(() => {
2112
2112
  const n = this, [s] = U(this, wt), [r] = U(this, bt), [i] = U(this, Nt), [l] = U(this, At), [o] = U(this, vt), [u] = U(this, xt);
2113
2113
  let d;
2114
- return U(this, Tt) ? d = U(this, Tt) : (d = Ir(() => import("./HUY7CZI3-DDw0mu7q.js")), Y(this, Tt, d)), Xr(U(this, Qt), U(this, St)), Pr(d, _r({
2114
+ return U(this, Tt) ? d = U(this, Tt) : (d = Ir(() => import("./HUY7CZI3-DGYGXLtV.js")), Y(this, Tt, d)), Xr(U(this, Qt), U(this, St)), Pr(d, _r({
2115
2115
  get queryFlavor() {
2116
2116
  return U(n, zt);
2117
2117
  },
@@ -5941,8 +5941,7 @@ const Nc = () => {
5941
5941
  action: _.GET_ROLE_AND_PERMISSIONS,
5942
5942
  data: { userId: s }
5943
5943
  }),
5944
- enabled: !!s,
5945
- staleTime: 0
5944
+ enabled: !!s
5946
5945
  });
5947
5946
  }, ts = {}, Hs = (e, t) => {
5948
5947
  Tn(ts, e) && console.warn(`Panel ${e} already registered. Overriding...`), Ha(ts, e, { id: e, ...t });
@@ -6524,7 +6523,12 @@ const _c = "seo", Ic = {
6524
6523
  Pa();
6525
6524
  Lc();
6526
6525
  const kc = (e) => {
6527
- const t = yn([]), [n] = Ge(), s = n.get("page"), r = n.get("lang"), { data: i } = Oe(), { data: l = null } = Nc(), { data: o } = Io(), { data: u, isFetching: d } = na(), { blocks: f } = To(u), { data: m } = nn(), { data: w } = Te(), { mutateAsync: E } = ea(), p = No(), { getUILibraryBlock: b, getUILibraryBlocks: S, onSave: I } = Lo(), { getPartialBlocks: A, getPartialBlockBlocks: x } = ko(), { aiContext: v, setAiContext: C } = hs(), { mutateAsync: B } = _o(), [T, L] = M(!1), N = ae(
6526
+ const t = yn([]), [n] = Ge(), s = n.get("page"), r = n.get("lang"), { data: i } = Oe(), {
6527
+ data: l = {
6528
+ role: "",
6529
+ permissions: null
6530
+ }
6531
+ } = Nc(), { data: o } = Io(), { data: u, isFetching: d } = na(), { blocks: f } = To(u), { data: m } = nn(), { data: w } = Te(), { mutateAsync: E } = ea(), p = No(), { getUILibraryBlock: b, getUILibraryBlocks: S, onSave: I } = Lo(), { getPartialBlocks: A, getPartialBlockBlocks: x } = ko(), { aiContext: v, setAiContext: C } = hs(), { mutateAsync: B } = _o(), [T, L] = M(!1), N = ae(
6528
6532
  () => (m == null ? void 0 : m.fallbackLang) || "en",
6529
6533
  [m]
6530
6534
  ), { data: k } = sa({
@@ -6539,7 +6543,7 @@ const kc = (e) => {
6539
6543
  }, []), t.current = f;
6540
6544
  const V = ae(() => {
6541
6545
  const D = {};
6542
- return e.mediaManagerComponent && (D.mediaManagerComponent = e.mediaManagerComponent), l && (D.permissions = J(l, "permissions", []), D.role = J(l, "role", "")), D;
6546
+ return e.mediaManagerComponent && (D.mediaManagerComponent = e.mediaManagerComponent), l && (D.permissions = J(l, "permissions", null), D.role = J(l, "role", "user")), D;
6543
6547
  }, [e.mediaManagerComponent, l]), W = ae(() => Array.isArray(e == null ? void 0 : e.uiLibraries) ? [...o, ...e == null ? void 0 : e.uiLibraries] : o, [o, e == null ? void 0 : e.uiLibraries]), We = _e(
6544
6548
  async (D, Se) => await B({ pageType: D, query: Se }),
6545
6549
  [B]
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-Cof7sJuu.cjs");exports.PermissionChecker=e.PermissionChecker;exports.default=e.ChaiBuilderPages;exports.registerChaiPanel=e.registerChaiPanel;exports.useChaiUserInfo=e.useChaiUserInfo;exports.useCurrentPage=e.useCurrentPage;exports.useFetch=e.useFetch;exports.useFetchUpload=e.useFetchUpload;exports.useLanguagePages=e.useLanguagePages;exports.useUserPermissions=e.useUserRoleAndPermissions;exports.useWebsitePages=e.useWebsitePages;exports.useWebsiteSetting=e.useWebsiteSetting;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-B8chLUn1.cjs");exports.PermissionChecker=e.PermissionChecker;exports.default=e.ChaiBuilderPages;exports.registerChaiPanel=e.registerChaiPanel;exports.useChaiUserInfo=e.useChaiUserInfo;exports.useCurrentPage=e.useCurrentPage;exports.useFetch=e.useFetch;exports.useFetchUpload=e.useFetchUpload;exports.useLanguagePages=e.useLanguagePages;exports.useUserPermissions=e.useUserRoleAndPermissions;exports.useWebsitePages=e.useWebsitePages;exports.useWebsiteSetting=e.useWebsiteSetting;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { X as a, W as r, Y as u, a5 as i, Z as t, a3 as g, a4 as n, _ as o, a2 as P, a0 as h, a1 as C } from "./index-Ch7IAe-z.js";
1
+ import { X as a, W as r, Y as u, a5 as i, Z as t, a3 as g, a4 as n, _ as o, a2 as P, a0 as h, a1 as C } from "./index-filc7Z1g.js";
2
2
  export {
3
3
  a as PermissionChecker,
4
4
  r as default,
package/dist/server.d.ts CHANGED
@@ -77,11 +77,11 @@ export declare class ChaiBuilderPagesUserManagement implements ChaiBuilderPagesU
77
77
  id: string;
78
78
  name: string;
79
79
  email: string;
80
- }>;
80
+ } | null>;
81
81
  isUserActive(_userId: string): Promise<boolean>;
82
82
  getUserRoleAndPermissions(_userId: string): Promise<{
83
83
  role: string;
84
- permissions: string[];
84
+ permissions: string[] | null;
85
85
  }>;
86
86
  getUserInfo(_userId: string): Promise<{
87
87
  id: string;
@@ -95,13 +95,13 @@ export declare interface ChaiBuilderPagesUserManagementInterface {
95
95
  isUserActive(chaiUserId: string): Promise<boolean>;
96
96
  getUserRoleAndPermissions(chaiUserId: string): Promise<{
97
97
  role: string;
98
- permissions: string[];
98
+ permissions: string[] | null;
99
99
  }>;
100
100
  verifyTokenAndGetUser(token: string): Promise<{
101
101
  id: string;
102
102
  name: string;
103
103
  email: string;
104
- }>;
104
+ } | null>;
105
105
  getUserInfo(chaiUserId: string): Promise<ChaiBuilderUserInfo>;
106
106
  }
107
107
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Suraj Air",
4
4
  "license": "Private",
5
5
  "homepage": "https://chaibuilder.com",
6
- "version": "0.1.18",
6
+ "version": "0.1.20",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist"