@oneclick.dev/cms-kit 0.0.46 → 0.0.47
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 +7 -7
- package/dist/cms-kit.js +37 -43
- package/package.json +1 -1
package/dist/cms-kit.js
CHANGED
|
@@ -54303,43 +54303,33 @@ const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
54303
54303
|
const _cache = {};
|
|
54304
54304
|
function getCmsComposable(key) {
|
|
54305
54305
|
if (_cache[key]) return _cache[key];
|
|
54306
|
-
const
|
|
54307
|
-
if (!
|
|
54308
|
-
|
|
54309
|
-
|
|
54310
|
-
|
|
54311
|
-
|
|
54312
|
-
|
|
54313
|
-
|
|
54314
|
-
|
|
54315
|
-
|
|
54316
|
-
|
|
54317
|
-
|
|
54318
|
-
|
|
54319
|
-
|
|
54320
|
-
|
|
54321
|
-
|
|
54322
|
-
|
|
54323
|
-
const
|
|
54324
|
-
const
|
|
54325
|
-
const
|
|
54326
|
-
const
|
|
54327
|
-
const
|
|
54328
|
-
const
|
|
54329
|
-
const
|
|
54330
|
-
const
|
|
54331
|
-
const
|
|
54332
|
-
const
|
|
54333
|
-
const useLogs = () => getCmsComposable("cms-useLogs")();
|
|
54334
|
-
const useUtilsService = () => getCmsComposable("cms-useUtilsService")();
|
|
54335
|
-
const useFormBuilder = () => getCmsComposable("cms-useFormBuilder")();
|
|
54336
|
-
const useFlowBuilder = () => getCmsComposable("cms-useFlowBuilder")();
|
|
54337
|
-
const useConfirmation = () => getCmsComposable("cms-useConfirmation")();
|
|
54338
|
-
const useFirebaseIntegration = (projectId) => getCmsComposable("cms-useFirebaseIntegration")(projectId);
|
|
54339
|
-
const useProjectSettings = () => getCmsComposable("cms-useProjectSettings")();
|
|
54340
|
-
const useCustomDialog$1 = () => getCmsComposable("cms-useCustomDialog")();
|
|
54341
|
-
const useModuleOverlay = () => getCmsComposable("cms-useModuleOverlay")();
|
|
54342
|
-
const useOverlayStack = () => getCmsComposable("cms-useOverlayStack")();
|
|
54306
|
+
const composable = useNuxtApp()[key];
|
|
54307
|
+
if (!composable) {
|
|
54308
|
+
throw new Error(`[whitelabel-modules] ${key} not provided in Nuxt app.`);
|
|
54309
|
+
}
|
|
54310
|
+
_cache[key] = composable;
|
|
54311
|
+
return composable;
|
|
54312
|
+
}
|
|
54313
|
+
const useIntegrationActionBuilder = () => getCmsComposable("useIntegrationActionBuilder")();
|
|
54314
|
+
const useIntegrations = () => getCmsComposable("useIntegrations")();
|
|
54315
|
+
const useIntegrationActions = (integrationId) => getCmsComposable("useIntegrationActions")(integrationId);
|
|
54316
|
+
const useMediaLibrary = () => getCmsComposable("useMediaLibrary")();
|
|
54317
|
+
const useProjectService = () => getCmsComposable("useProjectService")();
|
|
54318
|
+
const useBreadcrumbs = () => getCmsComposable("useBreadcrumbs")();
|
|
54319
|
+
const useQueryBuilder = () => getCmsComposable("useQueryBuilder")();
|
|
54320
|
+
const useModulePermissions = () => getCmsComposable("useModulePermissions")();
|
|
54321
|
+
const useModuleRoute = () => getCmsComposable("useModuleRoute")();
|
|
54322
|
+
const useModuleStorage = () => getCmsComposable("useModuleStorage")();
|
|
54323
|
+
const useLogs = () => getCmsComposable("useLogs")();
|
|
54324
|
+
const useUtilsService = () => getCmsComposable("useUtilsService")();
|
|
54325
|
+
const useFormBuilder = () => getCmsComposable("useFormBuilder")();
|
|
54326
|
+
const useFlowBuilder = () => getCmsComposable("useFlowBuilder")();
|
|
54327
|
+
const useConfirmation = () => getCmsComposable("useConfirmation")();
|
|
54328
|
+
const useFirebaseIntegration = (projectId) => getCmsComposable("useFirebaseIntegration")(projectId);
|
|
54329
|
+
const useProjectSettings = () => getCmsComposable("useProjectSettings")();
|
|
54330
|
+
const useCustomDialog$1 = () => getCmsComposable("useCustomDialog")();
|
|
54331
|
+
const useModuleOverlay = () => getCmsComposable("useModuleOverlay")();
|
|
54332
|
+
const useOverlayStack = () => getCmsComposable("useOverlayStack")();
|
|
54343
54333
|
function tryOnScopeDispose(fn2) {
|
|
54344
54334
|
if (getCurrentScope()) {
|
|
54345
54335
|
onScopeDispose(fn2);
|
|
@@ -67881,13 +67871,14 @@ const taskHandlers = {
|
|
|
67881
67871
|
}
|
|
67882
67872
|
},
|
|
67883
67873
|
"integration-action": async (input, { node }) => {
|
|
67884
|
-
|
|
67885
|
-
|
|
67886
|
-
const { fireAction } = useIntegrationActions(node.data.action.integration);
|
|
67874
|
+
console.log("apppp", useNuxtApp());
|
|
67875
|
+
const { $useIntegrationActions } = useNuxtApp();
|
|
67876
|
+
const { fireAction } = $useIntegrationActions(node.data.action.integration);
|
|
67887
67877
|
let res = await fireAction(node.data.action, input);
|
|
67888
67878
|
return { result: res };
|
|
67889
67879
|
},
|
|
67890
67880
|
"show-toast": async (input, { node }) => {
|
|
67881
|
+
console.log("Show toast", input, node);
|
|
67891
67882
|
let variables = Object.keys(input).map((key) => ({ name: key, value: input[key] }));
|
|
67892
67883
|
let title = interpolateTemplateFromVariableContext(node.data.title, variables);
|
|
67893
67884
|
let description = interpolateTemplateFromVariableContext(node.data.message, variables);
|
|
@@ -67909,7 +67900,8 @@ const taskHandlers = {
|
|
|
67909
67900
|
return { confetti: true };
|
|
67910
67901
|
},
|
|
67911
67902
|
"confirm": async (input, { node }) => {
|
|
67912
|
-
const {
|
|
67903
|
+
const { $useConfirmation } = useNuxtApp();
|
|
67904
|
+
const { confirm } = $useConfirmation();
|
|
67913
67905
|
if (confirm) {
|
|
67914
67906
|
let variables = Object.keys(input).map((key) => ({ name: key, value: input[key] }));
|
|
67915
67907
|
let title = interpolateTemplateFromVariableContext(node.data.title, variables);
|
|
@@ -67946,15 +67938,17 @@ const taskHandlers = {
|
|
|
67946
67938
|
return { visited: true };
|
|
67947
67939
|
},
|
|
67948
67940
|
"show-dialog": async (input, { node }) => {
|
|
67949
|
-
const {
|
|
67941
|
+
const { $useCustomDialog } = useNuxtApp();
|
|
67942
|
+
const { openCustomDialog } = $useCustomDialog();
|
|
67950
67943
|
let variables = Object.keys(input).map((key) => ({ name: key, value: input[key] }));
|
|
67951
67944
|
const result = await openCustomDialog(node.data.layout, variables);
|
|
67952
67945
|
console.log("Dialog result", result);
|
|
67953
67946
|
return result;
|
|
67954
67947
|
},
|
|
67955
67948
|
"show-module": async (input, { node }) => {
|
|
67949
|
+
const { $useModuleOverlay } = useNuxtApp();
|
|
67956
67950
|
console.log("Show module", input, node);
|
|
67957
|
-
const { openInOverlay } = useModuleOverlay();
|
|
67951
|
+
const { openInOverlay } = $useModuleOverlay();
|
|
67958
67952
|
let variables = Object.keys(input).map((key) => ({ name: key, value: input[key] }));
|
|
67959
67953
|
const params = {};
|
|
67960
67954
|
node.data.moduleData?.forEach((d) => {
|