@oneclick.dev/cms-kit 0.0.22 → 0.0.24

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/index.es.js CHANGED
@@ -77572,36 +77572,37 @@ const _sfc_main$3h = /* @__PURE__ */ defineComponent({
77572
77572
  const _cache = {};
77573
77573
  function getCmsComposable(key) {
77574
77574
  if (_cache[key]) return _cache[key];
77575
- const composable = inject$1(key, null);
77576
- if (!composable) {
77577
- console.warn(`[cms-kit] Missing injected composable: ${key}. Will retry on next call.`);
77578
- _cache[key] = (...args) => {
77579
- const retryComposable = inject$1(key, null);
77580
- if (!retryComposable) {
77581
- throw new Error(`[cms-kit] ${key} still not provided.`);
77582
- }
77583
- _cache[key] = retryComposable;
77584
- return retryComposable(...args);
77585
- };
77586
- return _cache[key];
77587
- }
77588
- _cache[key] = composable;
77589
- return composable;
77590
- }
77591
- const useIntegrationActionBuilder = () => getCmsComposable("cms-useIntegrationActionBuilder");
77592
- const useIntegrations = () => getCmsComposable("cms-useIntegrations");
77593
- const useIntegrationActions$1 = () => getCmsComposable("cms-useIntegrationActions");
77594
- const useMediaLibrary = () => getCmsComposable("cms-useMediaLibrary");
77595
- const useProjectService = () => getCmsComposable("cms-useProjectService");
77596
- const useBreadcrumbs$1 = () => getCmsComposable("cms-useBreadcrumbs");
77597
- const useQueryBuilder = () => getCmsComposable("cms-useQueryBuilder");
77598
- const useModulePermissions = () => getCmsComposable("cms-useModulePermissions");
77599
- const useFirebaseIntegration = () => getCmsComposable("cms-useFirebaseIntegration");
77600
- const useNavigateToModuleRoute = () => getCmsComposable("cms-useNavigateToModuleRoute");
77601
- const useModuleStorage = () => getCmsComposable("cms-useModuleStorage");
77602
- const useLogs = () => getCmsComposable("cms-useLogs");
77603
- const useUtilsService = () => getCmsComposable("cms-useUtilsService");
77604
- const useFormBuilder$1 = () => getCmsComposable("cms-useFormBuilder");
77575
+ const injectedFn = inject$1(key, null);
77576
+ if (!injectedFn) {
77577
+ console.warn(`[whitelabel-modules] Missing injected composable: ${key}. Will retry on next call.`);
77578
+ const fallback = (...args) => {
77579
+ const retryFn = inject$1(key, null);
77580
+ if (!retryFn) {
77581
+ throw new Error(`[whitelabel-modules] ${key} still not provided.`);
77582
+ }
77583
+ _cache[key] = retryFn;
77584
+ return retryFn(...args);
77585
+ };
77586
+ _cache[key] = fallback;
77587
+ return fallback;
77588
+ }
77589
+ _cache[key] = injectedFn;
77590
+ return injectedFn;
77591
+ }
77592
+ const useIntegrationActionBuilder = () => getCmsComposable("cms-useIntegrationActionBuilder")();
77593
+ const useIntegrations = () => getCmsComposable("cms-useIntegrations")();
77594
+ const useIntegrationActions$1 = () => getCmsComposable("cms-useIntegrationActions")();
77595
+ const useMediaLibrary = () => getCmsComposable("cms-useMediaLibrary")();
77596
+ const useProjectService = () => getCmsComposable("cms-useProjectService")();
77597
+ const useBreadcrumbs$1 = () => getCmsComposable("cms-useBreadcrumbs")();
77598
+ const useQueryBuilder = () => getCmsComposable("cms-useQueryBuilder")();
77599
+ const useModulePermissions = () => getCmsComposable("cms-useModulePermissions")();
77600
+ const useNavigateToModuleRoute = () => getCmsComposable("cms-useNavigateToModuleRoute")();
77601
+ const useModuleStorage = () => getCmsComposable("cms-useModuleStorage")();
77602
+ const useLogs = () => getCmsComposable("cms-useLogs")();
77603
+ const useUtilsService = () => getCmsComposable("cms-useUtilsService")();
77604
+ const useFormBuilder = () => getCmsComposable("cms-useFormBuilder")();
77605
+ const useFirebaseIntegration = getCmsComposable("cms-useFirebaseIntegration");
77605
77606
  const _sfc_main$3g = /* @__PURE__ */ defineComponent({
77606
77607
  __name: "InterpolationField",
77607
77608
  props: {
@@ -118031,7 +118032,7 @@ const _sfc_main$2f = /* @__PURE__ */ defineComponent({
118031
118032
  },
118032
118033
  setup(__props) {
118033
118034
  const props = __props;
118034
- const { closeFormBuilder } = useFormBuilder$1();
118035
+ const { closeFormBuilder } = useFormBuilder();
118035
118036
  const formBuilder = ref$1();
118036
118037
  watch$1(
118037
118038
  () => props.config,
@@ -142314,7 +142315,7 @@ export {
142314
142315
  useBreadcrumbs$1 as useBreadcrumbs,
142315
142316
  useCms,
142316
142317
  useFirebaseIntegration,
142317
- useFormBuilder$1 as useFormBuilder,
142318
+ useFormBuilder,
142318
142319
  useIntegrationActionBuilder,
142319
142320
  useIntegrationActions$1 as useIntegrationActions,
142320
142321
  useIntegrations,
@@ -1,57 +1 @@
1
- export declare const useIntegrationActionBuilder: () => any;
2
- export declare const useIntegrations: () => any;
3
- export declare const useIntegrationActions: () => any;
4
- export declare const useMediaLibrary: () => any;
5
- export declare const useProjectService: () => any;
6
- export declare const useBreadcrumbs: () => any;
7
- export declare const useQueryBuilder: () => any;
8
- type UseModulePermissions = () => {
9
- isAdmin: () => boolean;
10
- isSuperAdmin: () => boolean;
11
- hasPermission: (permission: string) => boolean;
12
- hasPermissionOR: (...permissions: string[]) => boolean;
13
- hasPermissionAND: (...permissions: string[]) => boolean;
14
- };
15
- export declare const useModulePermissions: () => UseModulePermissions;
16
- type UseFirebaseIntegration = (projectId: string) => {
17
- add: (collection: string, data: Record<string, any>) => Promise<any>;
18
- find: (collection: string, query?: Record<string, any>) => Promise<any>;
19
- get: (collection: string, doc: string) => Promise<any>;
20
- update: (collection: string, id: string, data: Record<string, any>) => Promise<any>;
21
- remove: (collection: string, id: string) => Promise<any>;
22
- };
23
- export declare const useFirebaseIntegration: () => UseFirebaseIntegration;
24
- type UseNavigateToModuleRoute = () => {
25
- navigateTo: (path?: string | number) => void;
26
- basePath: string;
27
- params: Record<string, string>;
28
- pageComponent: any;
29
- };
30
- export declare const useNavigateToModuleRoute: () => UseNavigateToModuleRoute;
31
- type UseModuleStorage = () => {
32
- getModuleData: (key: string) => any;
33
- setModuleData: (key: string, value: any) => void;
34
- removeModuleData: (key: string) => void;
35
- clearModuleData: () => void;
36
- };
37
- export declare const useModuleStorage: () => UseModuleStorage;
38
- type UseLogs = () => {
39
- log: (message: string, data?: any) => void;
40
- logWarning: (message: string, data?: any) => void;
41
- logError: (message: string, data?: any) => void;
42
- };
43
- export declare const useLogs: () => UseLogs;
44
- type UseUtilsService = () => {
45
- urlToBase64: (url: string) => Promise<{
46
- base64: string;
47
- contentType: string;
48
- }>;
49
- };
50
- export declare const useUtilsService: () => UseUtilsService;
51
- type UseFormBuilder = () => {
52
- formBuilderStack: any[];
53
- openFormBuilder: (config?: any) => Promise<any>;
54
- closeFormBuilder: (id: number, result: any) => void;
55
- };
56
- export declare const useFormBuilder: () => UseFormBuilder;
57
- export {};
1
+ export {}
@@ -5,6 +5,13 @@ export declare const useMediaLibrary: () => any;
5
5
  export declare const useProjectService: () => any;
6
6
  export declare const useBreadcrumbs: () => any;
7
7
  export declare const useQueryBuilder: () => any;
8
+ export declare const useModulePermissions: () => ReturnType<UseModulePermissions>;
9
+ export declare const useNavigateToModuleRoute: () => ReturnType<UseNavigateToModuleRoute>;
10
+ export declare const useModuleStorage: () => ReturnType<UseModuleStorage>;
11
+ export declare const useLogs: () => ReturnType<UseLogs>;
12
+ export declare const useUtilsService: () => ReturnType<UseUtilsService>;
13
+ export declare const useFormBuilder: () => ReturnType<UseFormBuilder>;
14
+ export declare const useFirebaseIntegration: UseFirebaseIntegration;
8
15
  type UseModulePermissions = () => {
9
16
  isAdmin: () => boolean;
10
17
  isSuperAdmin: () => boolean;
@@ -12,7 +19,6 @@ type UseModulePermissions = () => {
12
19
  hasPermissionOR: (...permissions: string[]) => boolean;
13
20
  hasPermissionAND: (...permissions: string[]) => boolean;
14
21
  };
15
- export declare const useModulePermissions: () => UseModulePermissions;
16
22
  type UseFirebaseIntegration = (projectId: string) => {
17
23
  add: (collection: string, data: Record<string, any>) => Promise<any>;
18
24
  find: (collection: string, query?: Record<string, any>) => Promise<any>;
@@ -20,38 +26,32 @@ type UseFirebaseIntegration = (projectId: string) => {
20
26
  update: (collection: string, id: string, data: Record<string, any>) => Promise<any>;
21
27
  remove: (collection: string, id: string) => Promise<any>;
22
28
  };
23
- export declare const useFirebaseIntegration: () => UseFirebaseIntegration;
24
29
  type UseNavigateToModuleRoute = () => {
25
30
  navigateTo: (path?: string | number) => void;
26
31
  basePath: string;
27
32
  params: Record<string, string>;
28
33
  pageComponent: any;
29
34
  };
30
- export declare const useNavigateToModuleRoute: () => UseNavigateToModuleRoute;
31
35
  type UseModuleStorage = () => {
32
36
  getModuleData: (key: string) => any;
33
37
  setModuleData: (key: string, value: any) => void;
34
38
  removeModuleData: (key: string) => void;
35
39
  clearModuleData: () => void;
36
40
  };
37
- export declare const useModuleStorage: () => UseModuleStorage;
38
41
  type UseLogs = () => {
39
42
  log: (message: string, data?: any) => void;
40
43
  logWarning: (message: string, data?: any) => void;
41
44
  logError: (message: string, data?: any) => void;
42
45
  };
43
- export declare const useLogs: () => UseLogs;
44
46
  type UseUtilsService = () => {
45
47
  urlToBase64: (url: string) => Promise<{
46
48
  base64: string;
47
49
  contentType: string;
48
50
  }>;
49
51
  };
50
- export declare const useUtilsService: () => UseUtilsService;
51
52
  type UseFormBuilder = () => {
52
53
  formBuilderStack: any[];
53
54
  openFormBuilder: (config?: any) => Promise<any>;
54
55
  closeFormBuilder: (id: number, result: any) => void;
55
56
  };
56
- export declare const useFormBuilder: () => UseFormBuilder;
57
57
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneclick.dev/cms-kit",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",