@oneclick.dev/cms-kit 0.0.31 → 0.0.33
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 → cms-kit.cjs} +1 -1
- package/dist/{index.es.js → cms-kit.js} +3 -0
- package/dist/index.d.ts +174 -0
- package/package.json +7 -7
- package/dist/types/composables/index.d.ts +0 -2
- package/dist/types/composables/useCms.d.ts +0 -4
- package/dist/types/index.d.ts +0 -1
- package/dist/types/lib/composables.d.ts +0 -80
- package/dist/types/lib/interpolation.d.ts +0 -8
- package/dist/types/lib/utils.d.ts +0 -6
- package/dist/types/types/index.d.ts +0 -36
|
@@ -142409,7 +142409,9 @@ export {
|
|
|
142409
142409
|
components,
|
|
142410
142410
|
useBreadcrumbs$1 as useBreadcrumbs,
|
|
142411
142411
|
useCms,
|
|
142412
|
+
useConfirmation$1 as useConfirmation,
|
|
142412
142413
|
useFirebaseIntegration,
|
|
142414
|
+
useFlowBuilder,
|
|
142413
142415
|
useFormBuilder,
|
|
142414
142416
|
useIntegrationActionBuilder,
|
|
142415
142417
|
useIntegrationActions$1 as useIntegrationActions,
|
|
@@ -142420,6 +142422,7 @@ export {
|
|
|
142420
142422
|
useModulePermissions,
|
|
142421
142423
|
useModuleStorage,
|
|
142422
142424
|
useNavigateToModuleRoute,
|
|
142425
|
+
useOverlayStack,
|
|
142423
142426
|
useProjectService,
|
|
142424
142427
|
useQueryBuilder,
|
|
142425
142428
|
useRunProcess,
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { useLayout } from '../components/ui/flow-builder/composables/useLayout';
|
|
3
|
+
import { useRunProcess } from '../components/ui/flow-builder/composables/useRunProcess';
|
|
4
|
+
|
|
5
|
+
declare interface BuilderState {
|
|
6
|
+
show: boolean;
|
|
7
|
+
variableContext: Variable[];
|
|
8
|
+
resolve: ((value: Object | null) => void) | null;
|
|
9
|
+
action?: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export declare const components: {};
|
|
13
|
+
|
|
14
|
+
declare interface FlowBuilderState {
|
|
15
|
+
id: number;
|
|
16
|
+
show: boolean;
|
|
17
|
+
config: any;
|
|
18
|
+
workflow: any;
|
|
19
|
+
resolve: ((val: any) => void) | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare interface MediaSourceCreateParams {
|
|
23
|
+
name: string;
|
|
24
|
+
integrationId: string;
|
|
25
|
+
path: string;
|
|
26
|
+
allowUserFolders: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare interface MediaSourceUpdateParams {
|
|
30
|
+
name?: string;
|
|
31
|
+
integrationId?: string;
|
|
32
|
+
path?: string;
|
|
33
|
+
allowUserFolders?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare type test = {
|
|
37
|
+
hey: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export declare interface testje {
|
|
41
|
+
hey: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare const useBreadcrumbs: () => {};
|
|
45
|
+
|
|
46
|
+
export declare function useCms(): {
|
|
47
|
+
breadcrumbs: {};
|
|
48
|
+
project: {};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
declare type UseConfirmation = () => {
|
|
52
|
+
confirm: (message: string, title?: string, confirmText?: string) => Promise<boolean>;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export declare const useConfirmation: () => ReturnType<UseConfirmation>;
|
|
56
|
+
|
|
57
|
+
export declare const useFirebaseIntegration: (projectId: string) => {
|
|
58
|
+
add: (collection: string, data: Record<string, any>) => Promise<any>;
|
|
59
|
+
find: (collection: string, query?: Record<string, any>) => Promise<any>;
|
|
60
|
+
get: (collection: string, doc: string) => Promise<any>;
|
|
61
|
+
update: (collection: string, id: string, data: Record<string, any>) => Promise<any>;
|
|
62
|
+
remove: (collection: string, id: string) => Promise<any>;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
declare type UseFlowBuilder = () => {
|
|
66
|
+
flowBuilderStack: FlowBuilderState[];
|
|
67
|
+
openFlowBuilder: (workflow: any, config?: any) => Promise<any>;
|
|
68
|
+
closeFlowBuilder: (id: number, result: any) => void;
|
|
69
|
+
runFlow: (workflow: any, context: any) => Promise<any>;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export declare const useFlowBuilder: () => ReturnType<UseFlowBuilder>;
|
|
73
|
+
|
|
74
|
+
declare type UseFormBuilder = () => {
|
|
75
|
+
formBuilderStack: any[];
|
|
76
|
+
openFormBuilder: (config?: any) => Promise<any>;
|
|
77
|
+
closeFormBuilder: (id: number, result: any) => void;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export declare const useFormBuilder: () => ReturnType<UseFormBuilder>;
|
|
81
|
+
|
|
82
|
+
export declare const useIntegrationActionBuilder: () => {
|
|
83
|
+
showBuilder: (variableContext: Variable[], action?: any) => Promise<Object | null>;
|
|
84
|
+
onConfirm: (action: Object) => void;
|
|
85
|
+
onCancel: () => void;
|
|
86
|
+
builderState: Ref<BuilderState>;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export declare const useIntegrationActions: () => {
|
|
90
|
+
fireAction: (action: any, variableContext: Variable[]) => Promise<any>;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export declare const useIntegrations: () => {
|
|
94
|
+
getProjectIntegrations: (projectId: string) => Promise<any>;
|
|
95
|
+
getProjectIntegration: (projectId: string, integrationId: string) => Promise<any>;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export { useLayout }
|
|
99
|
+
|
|
100
|
+
declare type UseLogs = () => {
|
|
101
|
+
log: (message: string, data?: any) => void;
|
|
102
|
+
logWarning: (message: string, data?: any) => void;
|
|
103
|
+
logError: (message: string, data?: any) => void;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export declare const useLogs: () => ReturnType<UseLogs>;
|
|
107
|
+
|
|
108
|
+
export declare const useMediaLibrary: () => {
|
|
109
|
+
getMediaSources: (projectSlug: string) => Promise<any>;
|
|
110
|
+
getMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
|
|
111
|
+
createMediaSource: (projectSlug: string, params: MediaSourceCreateParams) => Promise<any>;
|
|
112
|
+
updateMediaSource: (projectSlug: string, sourceId: string, params: MediaSourceUpdateParams) => Promise<any>;
|
|
113
|
+
deleteMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
|
|
114
|
+
uploadFile: (sourceId: string, file: File, path?: string) => Promise<any>;
|
|
115
|
+
getStorageContent: (sourceId: string, path?: string) => Promise<any>;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
declare type UseModulePermissions = () => {
|
|
119
|
+
isAdmin: () => boolean;
|
|
120
|
+
isSuperAdmin: () => boolean;
|
|
121
|
+
hasPermission: (permission: string) => boolean;
|
|
122
|
+
hasPermissionOR: (...permissions: string[]) => boolean;
|
|
123
|
+
hasPermissionAND: (...permissions: string[]) => boolean;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export declare const useModulePermissions: () => ReturnType<UseModulePermissions>;
|
|
127
|
+
|
|
128
|
+
declare type UseModuleStorage = () => {
|
|
129
|
+
getModuleData: (key: string) => any;
|
|
130
|
+
setModuleData: (key: string, value: any) => void;
|
|
131
|
+
removeModuleData: (key: string) => void;
|
|
132
|
+
clearModuleData: () => void;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export declare const useModuleStorage: () => ReturnType<UseModuleStorage>;
|
|
136
|
+
|
|
137
|
+
declare type UseNavigateToModuleRoute = () => {
|
|
138
|
+
navigateTo: (path?: string | number) => void;
|
|
139
|
+
basePath: string;
|
|
140
|
+
params: Record<string, string>;
|
|
141
|
+
pageComponent: any;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export declare const useNavigateToModuleRoute: () => ReturnType<UseNavigateToModuleRoute>;
|
|
145
|
+
|
|
146
|
+
export declare const useOverlayStack: () => {
|
|
147
|
+
stack: string[];
|
|
148
|
+
push(id: string): void;
|
|
149
|
+
pop(id: string): void;
|
|
150
|
+
isTop(id: string): boolean;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export declare const useProjectService: () => {};
|
|
154
|
+
|
|
155
|
+
export declare const useQueryBuilder: () => {};
|
|
156
|
+
|
|
157
|
+
export { useRunProcess }
|
|
158
|
+
|
|
159
|
+
declare type UseUtilsService = () => {
|
|
160
|
+
urlToBase64: (url: string) => Promise<{
|
|
161
|
+
base64: string;
|
|
162
|
+
contentType: string;
|
|
163
|
+
}>;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export declare const useUtilsService: () => ReturnType<UseUtilsService>;
|
|
167
|
+
|
|
168
|
+
declare interface Variable {
|
|
169
|
+
name: string;
|
|
170
|
+
type: string;
|
|
171
|
+
value: any;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneclick.dev/cms-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "./dist/
|
|
6
|
-
"module": "./dist/
|
|
7
|
-
"types": "./dist/
|
|
5
|
+
"main": "./dist/cms-kit.cjs",
|
|
6
|
+
"module": "./dist/cms-kit.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/cms-kit.js",
|
|
12
|
+
"require": "./dist/cms-kit.cjs"
|
|
13
13
|
},
|
|
14
14
|
"./style.css": {
|
|
15
15
|
"default": "./dist/index.css"
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {}
|
|
@@ -1,80 +0,0 @@
|
|
|
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
|
-
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 useConfirmation: () => ReturnType<UseConfirmation>;
|
|
16
|
-
export declare const 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 useOverlayStack: () => {
|
|
24
|
-
stack: string[];
|
|
25
|
-
push(id: string): void;
|
|
26
|
-
pop(id: string): void;
|
|
27
|
-
isTop(id: string): boolean;
|
|
28
|
-
};
|
|
29
|
-
type UseModulePermissions = () => {
|
|
30
|
-
isAdmin: () => boolean;
|
|
31
|
-
isSuperAdmin: () => boolean;
|
|
32
|
-
hasPermission: (permission: string) => boolean;
|
|
33
|
-
hasPermissionOR: (...permissions: string[]) => boolean;
|
|
34
|
-
hasPermissionAND: (...permissions: string[]) => boolean;
|
|
35
|
-
};
|
|
36
|
-
type UseNavigateToModuleRoute = () => {
|
|
37
|
-
navigateTo: (path?: string | number) => void;
|
|
38
|
-
basePath: string;
|
|
39
|
-
params: Record<string, string>;
|
|
40
|
-
pageComponent: any;
|
|
41
|
-
};
|
|
42
|
-
type UseModuleStorage = () => {
|
|
43
|
-
getModuleData: (key: string) => any;
|
|
44
|
-
setModuleData: (key: string, value: any) => void;
|
|
45
|
-
removeModuleData: (key: string) => void;
|
|
46
|
-
clearModuleData: () => void;
|
|
47
|
-
};
|
|
48
|
-
type UseLogs = () => {
|
|
49
|
-
log: (message: string, data?: any) => void;
|
|
50
|
-
logWarning: (message: string, data?: any) => void;
|
|
51
|
-
logError: (message: string, data?: any) => void;
|
|
52
|
-
};
|
|
53
|
-
type UseUtilsService = () => {
|
|
54
|
-
urlToBase64: (url: string) => Promise<{
|
|
55
|
-
base64: string;
|
|
56
|
-
contentType: string;
|
|
57
|
-
}>;
|
|
58
|
-
};
|
|
59
|
-
type UseFormBuilder = () => {
|
|
60
|
-
formBuilderStack: any[];
|
|
61
|
-
openFormBuilder: (config?: any) => Promise<any>;
|
|
62
|
-
closeFormBuilder: (id: number, result: any) => void;
|
|
63
|
-
};
|
|
64
|
-
type UseFlowBuilder = () => {
|
|
65
|
-
flowBuilderStack: FlowBuilderState[];
|
|
66
|
-
openFlowBuilder: (workflow: any, config?: any) => Promise<any>;
|
|
67
|
-
closeFlowBuilder: (id: number, result: any) => void;
|
|
68
|
-
runFlow: (workflow: any, context: any) => Promise<any>;
|
|
69
|
-
};
|
|
70
|
-
type UseConfirmation = () => {
|
|
71
|
-
confirm: (message: string, title?: string, confirmText?: string) => Promise<boolean>;
|
|
72
|
-
};
|
|
73
|
-
interface FlowBuilderState {
|
|
74
|
-
id: number;
|
|
75
|
-
show: boolean;
|
|
76
|
-
config: any;
|
|
77
|
-
workflow: any;
|
|
78
|
-
resolve: ((val: any) => void) | null;
|
|
79
|
-
}
|
|
80
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function interpolateTemplateFromVariableContext(template: string, variableContext: Variable[]): string;
|
|
2
|
-
export declare function interpolateTemplateFromVariableObject(template: string, variableContext: Record<string, any>): string;
|
|
3
|
-
interface Variable {
|
|
4
|
-
name: string;
|
|
5
|
-
type: string;
|
|
6
|
-
value: any;
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Updater } from '@tanstack/vue-table';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
import { ClassValue } from 'clsx';
|
|
4
|
-
export declare function cn(...inputs: ClassValue[]): string;
|
|
5
|
-
export declare function valueUpdater<T extends Updater<any>>(updaterOrValue: T, ref: Ref): void;
|
|
6
|
-
export declare function formatFileSize(size: number): string;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export interface ModuleMetadata {
|
|
2
|
-
name: string;
|
|
3
|
-
icon?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
version?: string;
|
|
6
|
-
}
|
|
7
|
-
export type UseFirebaseIntegration = (projectId: string) => {
|
|
8
|
-
add: (collection: string, data: Record<string, any>) => Promise<any>;
|
|
9
|
-
find: (collection: string, query?: Record<string, any>) => Promise<any>;
|
|
10
|
-
get: (collection: string, doc: string) => Promise<any>;
|
|
11
|
-
update: (collection: string, id: string, data: Record<string, any>) => Promise<any>;
|
|
12
|
-
remove: (collection: string, id: string) => Promise<any>;
|
|
13
|
-
};
|
|
14
|
-
export type UseModulePermissions = () => {
|
|
15
|
-
isAdmin: () => boolean;
|
|
16
|
-
isSuperAdmin: () => boolean;
|
|
17
|
-
hasPermission: (permission: string) => boolean;
|
|
18
|
-
hasPermissionOR: (...permissions: string[]) => boolean;
|
|
19
|
-
hasPermissionAND: (...permissions: string[]) => boolean;
|
|
20
|
-
};
|
|
21
|
-
export type UseNavigateToModuleRoute = () => {
|
|
22
|
-
navigateTo: (path?: string | number) => void;
|
|
23
|
-
basePath: string;
|
|
24
|
-
params: Record<string, string>;
|
|
25
|
-
pageComponent: any;
|
|
26
|
-
};
|
|
27
|
-
export type UseModuleStorage = () => {
|
|
28
|
-
getModuleData: (key: string) => any;
|
|
29
|
-
setModuleData: (key: string, value: any) => void;
|
|
30
|
-
removeModuleData: (key: string) => void;
|
|
31
|
-
clearModuleData: () => void;
|
|
32
|
-
};
|
|
33
|
-
export interface NavigateToModuleRoute {
|
|
34
|
-
navigateTo: (path?: string | number) => void;
|
|
35
|
-
basePath: string;
|
|
36
|
-
}
|