@oneclick.dev/cms-kit 0.0.39 → 0.0.40
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/cms-kit.cjs +5 -5
- package/dist/cms-kit.js +14 -10
- package/dist/index.d.ts +26 -0
- package/package.json +1 -1
package/dist/cms-kit.js
CHANGED
|
@@ -54324,7 +54324,7 @@ function getCmsComposable(key) {
|
|
|
54324
54324
|
}
|
|
54325
54325
|
const useIntegrationActionBuilder = () => getCmsComposable("cms-useIntegrationActionBuilder")();
|
|
54326
54326
|
const useIntegrations = () => getCmsComposable("cms-useIntegrations")();
|
|
54327
|
-
const useIntegrationActions
|
|
54327
|
+
const useIntegrationActions = (integrationId) => getCmsComposable("cms-useIntegrationActions")(integrationId);
|
|
54328
54328
|
const useMediaLibrary = () => getCmsComposable("cms-useMediaLibrary")();
|
|
54329
54329
|
const useProjectService = () => getCmsComposable("cms-useProjectService")();
|
|
54330
54330
|
const useBreadcrumbs = () => getCmsComposable("cms-useBreadcrumbs")();
|
|
@@ -54336,9 +54336,11 @@ const useLogs = () => getCmsComposable("cms-useLogs")();
|
|
|
54336
54336
|
const useUtilsService = () => getCmsComposable("cms-useUtilsService")();
|
|
54337
54337
|
const useFormBuilder = () => getCmsComposable("cms-useFormBuilder")();
|
|
54338
54338
|
const useFlowBuilder = () => getCmsComposable("cms-useFlowBuilder")();
|
|
54339
|
-
const useConfirmation
|
|
54339
|
+
const useConfirmation = () => getCmsComposable("cms-useConfirmation")();
|
|
54340
54340
|
const useFirebaseIntegration = (projectId) => getCmsComposable("cms-useFirebaseIntegration")(projectId);
|
|
54341
54341
|
const useProjectSettings = () => getCmsComposable("cms-useProjectSettings")();
|
|
54342
|
+
const useCustomDialog$1 = () => getCmsComposable("cms-useCustomDialog")();
|
|
54343
|
+
const useModuleOverlay = () => getCmsComposable("cms-useModuleOverlay")();
|
|
54342
54344
|
const useOverlayStack = () => getCmsComposable("cms-useOverlayStack")();
|
|
54343
54345
|
function tryOnScopeDispose(fn2) {
|
|
54344
54346
|
if (getCurrentScope()) {
|
|
@@ -67946,7 +67948,7 @@ const taskHandlers = {
|
|
|
67946
67948
|
return { visited: true };
|
|
67947
67949
|
},
|
|
67948
67950
|
"show-dialog": async (input, { node }) => {
|
|
67949
|
-
const { openCustomDialog } = useCustomDialog();
|
|
67951
|
+
const { openCustomDialog } = useCustomDialog$1();
|
|
67950
67952
|
let variables = Object.keys(input).map((key) => ({ name: key, value: input[key] }));
|
|
67951
67953
|
const result = await openCustomDialog(node.data.layout, variables);
|
|
67952
67954
|
console.log("Dialog result", result);
|
|
@@ -80084,7 +80086,7 @@ const _sfc_main$2U = /* @__PURE__ */ defineComponent({
|
|
|
80084
80086
|
},
|
|
80085
80087
|
setup(__props, { expose: __expose }) {
|
|
80086
80088
|
const props = __props;
|
|
80087
|
-
const confirmation = useConfirmation
|
|
80089
|
+
const confirmation = useConfirmation();
|
|
80088
80090
|
const { nodes, edges, fitView, onEdgesChange, applyEdgeChanges, onNodesChange, applyNodeChanges, findNode, findEdge, addNodes, removeNodes, addEdges, removeEdges, setNodes, setEdges, toObject } = useVueFlow();
|
|
80089
80091
|
const overlayStack = useOverlayStack();
|
|
80090
80092
|
const randomId = crypto.randomUUID();
|
|
@@ -111668,7 +111670,7 @@ const _sfc_main$2q = /* @__PURE__ */ defineComponent({
|
|
|
111668
111670
|
watch$1(state.apiActions, (val) => {
|
|
111669
111671
|
if (val) {
|
|
111670
111672
|
async function loadData(action) {
|
|
111671
|
-
const { fireAction } = useIntegrationActions
|
|
111673
|
+
const { fireAction } = useIntegrationActions(action.integration);
|
|
111672
111674
|
let res = await fireAction(action, allAvailableVariables.value);
|
|
111673
111675
|
console.log("fireAction res", res);
|
|
111674
111676
|
}
|
|
@@ -111711,7 +111713,7 @@ const _sfc_main$2q = /* @__PURE__ */ defineComponent({
|
|
|
111711
111713
|
state.apiActions = state.apiActions.filter((a) => a.id !== action.id);
|
|
111712
111714
|
};
|
|
111713
111715
|
const executeAction = async (action) => {
|
|
111714
|
-
const { fireAction } = useIntegrationActions
|
|
111716
|
+
const { fireAction } = useIntegrationActions(action.action.integration);
|
|
111715
111717
|
let res = await fireAction(action.action, allAvailableVariables.value);
|
|
111716
111718
|
state.apiActions.find((a) => a.id === action.id).action.response = res;
|
|
111717
111719
|
};
|
|
@@ -117508,7 +117510,7 @@ const _hoisted_2$f = ["onClick"];
|
|
|
117508
117510
|
const _sfc_main$2i = /* @__PURE__ */ defineComponent({
|
|
117509
117511
|
__name: "CustomDashboard",
|
|
117510
117512
|
setup(__props) {
|
|
117511
|
-
const confirmation = useConfirmation
|
|
117513
|
+
const confirmation = useConfirmation();
|
|
117512
117514
|
const overlayStack = useOverlayStack();
|
|
117513
117515
|
const randomId = crypto.randomUUID();
|
|
117514
117516
|
const state = inject$1("state");
|
|
@@ -117973,7 +117975,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
117973
117975
|
};
|
|
117974
117976
|
const loadStartupActions = () => {
|
|
117975
117977
|
async function loadAction(action) {
|
|
117976
|
-
const { fireAction } = useIntegrationActions
|
|
117978
|
+
const { fireAction } = useIntegrationActions(action.action.integration);
|
|
117977
117979
|
let res = await fireAction(action.action, allAvailableVariables.value);
|
|
117978
117980
|
state.apiActions.find((a) => a.id === action.id).action.response = res;
|
|
117979
117981
|
}
|
|
@@ -142410,16 +142412,18 @@ export {
|
|
|
142410
142412
|
components,
|
|
142411
142413
|
useBreadcrumbs,
|
|
142412
142414
|
useCms,
|
|
142413
|
-
useConfirmation
|
|
142415
|
+
useConfirmation,
|
|
142416
|
+
useCustomDialog$1 as useCustomDialog,
|
|
142414
142417
|
useFirebaseIntegration,
|
|
142415
142418
|
useFlowBuilder,
|
|
142416
142419
|
useFormBuilder,
|
|
142417
142420
|
useIntegrationActionBuilder,
|
|
142418
|
-
useIntegrationActions
|
|
142421
|
+
useIntegrationActions,
|
|
142419
142422
|
useIntegrations,
|
|
142420
142423
|
useLayout,
|
|
142421
142424
|
useLogs,
|
|
142422
142425
|
useMediaLibrary,
|
|
142426
|
+
useModuleOverlay,
|
|
142423
142427
|
useModulePermissions,
|
|
142424
142428
|
useModuleRoute,
|
|
142425
142429
|
useModuleStorage,
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,14 @@ declare interface BuilderState {
|
|
|
11
11
|
|
|
12
12
|
export declare const components: {};
|
|
13
13
|
|
|
14
|
+
declare interface CustomDialogState {
|
|
15
|
+
id: number;
|
|
16
|
+
show: boolean;
|
|
17
|
+
layout: string;
|
|
18
|
+
variables: any;
|
|
19
|
+
resolve: ((result: any) => void) | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
declare interface FlowBuilderState {
|
|
15
23
|
id: number;
|
|
16
24
|
show: boolean;
|
|
@@ -33,6 +41,13 @@ declare interface MediaSourceUpdateParams {
|
|
|
33
41
|
allowUserFolders?: boolean;
|
|
34
42
|
}
|
|
35
43
|
|
|
44
|
+
declare interface OverlayState {
|
|
45
|
+
show: boolean;
|
|
46
|
+
projectId: string;
|
|
47
|
+
moduleId: string;
|
|
48
|
+
params: Record<string, string>;
|
|
49
|
+
}
|
|
50
|
+
|
|
36
51
|
export declare type test = {
|
|
37
52
|
hey: string;
|
|
38
53
|
};
|
|
@@ -54,6 +69,12 @@ declare type UseConfirmation = () => {
|
|
|
54
69
|
|
|
55
70
|
export declare const useConfirmation: () => ReturnType<UseConfirmation>;
|
|
56
71
|
|
|
72
|
+
export declare const useCustomDialog: () => {
|
|
73
|
+
customDialogStack: CustomDialogState[];
|
|
74
|
+
openCustomDialog: (layout: string, variables: Variable[]) => Promise<any>;
|
|
75
|
+
closeCustomDialog: (id: number, result: any) => void;
|
|
76
|
+
};
|
|
77
|
+
|
|
57
78
|
export declare const useFirebaseIntegration: (projectId: string) => {
|
|
58
79
|
add: (collection: string, data: Record<string, any>) => Promise<any>;
|
|
59
80
|
find: (collection: string, query?: Record<string, any>) => Promise<any>;
|
|
@@ -115,6 +136,11 @@ export declare const useMediaLibrary: () => {
|
|
|
115
136
|
getStorageContent: (sourceId: string, path?: string) => Promise<any>;
|
|
116
137
|
};
|
|
117
138
|
|
|
139
|
+
export declare const useModuleOverlay: () => {
|
|
140
|
+
openInOverlay: (moduleId: string, params?: Record<string, string>) => void;
|
|
141
|
+
overlayState: OverlayState;
|
|
142
|
+
};
|
|
143
|
+
|
|
118
144
|
declare type UseModulePermissions = () => {
|
|
119
145
|
isAdmin: () => boolean;
|
|
120
146
|
isSuperAdmin: () => boolean;
|