@oneclick.dev/cms-kit 0.0.23 → 0.0.25
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.cjs.js +5 -5
- package/dist/index.es.js +32 -30
- package/dist/types/lib/composables.d.ts +27 -14
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -77572,36 +77572,38 @@ 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
|
|
77576
|
-
if (!
|
|
77577
|
-
console.warn(`[
|
|
77578
|
-
|
|
77579
|
-
const
|
|
77580
|
-
if (!
|
|
77581
|
-
throw new Error(`[
|
|
77582
|
-
}
|
|
77583
|
-
_cache[key] =
|
|
77584
|
-
return
|
|
77585
|
-
};
|
|
77586
|
-
|
|
77587
|
-
|
|
77588
|
-
|
|
77589
|
-
|
|
77590
|
-
|
|
77591
|
-
|
|
77592
|
-
const
|
|
77593
|
-
const
|
|
77594
|
-
const
|
|
77595
|
-
const
|
|
77596
|
-
const
|
|
77597
|
-
const
|
|
77598
|
-
const
|
|
77599
|
-
const
|
|
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");
|
|
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 useFlowBuilder = () => getCmsComposable("cms-useFlowBuilder")();
|
|
77606
|
+
const useFirebaseIntegration = (projectId) => getCmsComposable("cms-useFirebaseIntegration")(projectId);
|
|
77605
77607
|
const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
77606
77608
|
__name: "InterpolationField",
|
|
77607
77609
|
props: {
|
|
@@ -5,6 +5,20 @@ 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 useFlowBuilder: () => ReturnType<UseFlowBuilder>;
|
|
15
|
+
export declare const useFirebaseIntegration: (projectId: string) => {
|
|
16
|
+
add: (collection: string, data: Record<string, any>) => Promise<any>;
|
|
17
|
+
find: (collection: string, query?: Record<string, any>) => Promise<any>;
|
|
18
|
+
get: (collection: string, doc: string) => Promise<any>;
|
|
19
|
+
update: (collection: string, id: string, data: Record<string, any>) => Promise<any>;
|
|
20
|
+
remove: (collection: string, id: string) => Promise<any>;
|
|
21
|
+
};
|
|
8
22
|
type UseModulePermissions = () => {
|
|
9
23
|
isAdmin: () => boolean;
|
|
10
24
|
isSuperAdmin: () => boolean;
|
|
@@ -12,46 +26,45 @@ type UseModulePermissions = () => {
|
|
|
12
26
|
hasPermissionOR: (...permissions: string[]) => boolean;
|
|
13
27
|
hasPermissionAND: (...permissions: string[]) => boolean;
|
|
14
28
|
};
|
|
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
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
|
-
|
|
57
|
+
type UseFlowBuilder = () => {
|
|
58
|
+
flowBuilderStack: FlowBuilderState[];
|
|
59
|
+
openFlowBuilder: (workflow: any, config?: any) => Promise<any>;
|
|
60
|
+
closeFlowBuilder: (id: number, result: any) => void;
|
|
61
|
+
runFlow: (workflow: any, context: any) => Promise<any>;
|
|
62
|
+
};
|
|
63
|
+
interface FlowBuilderState {
|
|
64
|
+
id: number;
|
|
65
|
+
show: boolean;
|
|
66
|
+
config: any;
|
|
67
|
+
workflow: any;
|
|
68
|
+
resolve: ((val: any) => void) | null;
|
|
69
|
+
}
|
|
57
70
|
export {};
|