@kizenapps/engine 1.8.0 → 1.9.0-ccfe3f0

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.
Files changed (51) hide show
  1. package/dist/{ThirdPartyScript-DauYx3B5.d.ts → ThirdPartyScript-BkCjYWLd.d.ts} +10 -1
  2. package/dist/{automation-Dr26TnMo.d.ts → automation-BuZbZjRB.d.ts} +11 -3
  3. package/dist/{blocks-C0e9BCrR.d.ts → blocks-1HdzUin7.d.ts} +2 -2
  4. package/dist/{chunk-QYGHOK5P.js → chunk-4F3ZPLL7.js} +3 -3
  5. package/dist/{chunk-QYGHOK5P.js.map → chunk-4F3ZPLL7.js.map} +1 -1
  6. package/dist/{chunk-MY4MXCGX.js → chunk-5IUXBYZK.js} +4 -4
  7. package/dist/{chunk-MY4MXCGX.js.map → chunk-5IUXBYZK.js.map} +1 -1
  8. package/dist/{chunk-5M2LFHMD.js → chunk-6ZZ7U3AM.js} +26 -4
  9. package/dist/chunk-6ZZ7U3AM.js.map +1 -0
  10. package/dist/{chunk-IFLQXUV7.js → chunk-CMFPH7ZI.js} +39 -6
  11. package/dist/chunk-CMFPH7ZI.js.map +1 -0
  12. package/dist/{chunk-Y32HBIQ2.js → chunk-IWQF53YW.js} +24 -5
  13. package/dist/chunk-IWQF53YW.js.map +1 -0
  14. package/dist/{chunk-DW7EWU2Z.js → chunk-KCA5EK7O.js} +7 -5
  15. package/dist/chunk-KCA5EK7O.js.map +1 -0
  16. package/dist/{chunk-ANZLHJL2.js → chunk-LMH2CUPW.js} +3 -3
  17. package/dist/{chunk-ANZLHJL2.js.map → chunk-LMH2CUPW.js.map} +1 -1
  18. package/dist/{chunk-A3JR3VXF.js → chunk-OZGSC5IX.js} +3 -3
  19. package/dist/{chunk-A3JR3VXF.js.map → chunk-OZGSC5IX.js.map} +1 -1
  20. package/dist/{chunk-KVE4CAUJ.js → chunk-V2YSOGVX.js} +3 -3
  21. package/dist/{chunk-KVE4CAUJ.js.map → chunk-V2YSOGVX.js.map} +1 -1
  22. package/dist/communication.d.ts +2 -2
  23. package/dist/communication.js +2 -2
  24. package/dist/contexts/base.d.ts +4 -2
  25. package/dist/contexts/base.js +4 -4
  26. package/dist/contexts/floatingFrame.d.ts +1 -1
  27. package/dist/contexts/floatingFrame.js +5 -5
  28. package/dist/contexts/recordDetail.d.ts +1 -1
  29. package/dist/contexts/recordDetail.js +5 -5
  30. package/dist/index.d.ts +7 -7
  31. package/dist/index.js +4 -4
  32. package/dist/react.d.ts +5 -4
  33. package/dist/react.js +33 -16
  34. package/dist/react.js.map +1 -1
  35. package/dist/types.d.ts +11 -6
  36. package/dist/util.d.ts +3 -3
  37. package/dist/util.js +6 -6
  38. package/dist/{values-DCW2Il72.d.ts → values-08CsQDfa.d.ts} +2 -2
  39. package/dist/workers/calendarSource.worker.js +7 -6
  40. package/dist/workers/calendarSource.worker.js.map +1 -1
  41. package/dist/workers/floatingFrame.worker.js +8 -7
  42. package/dist/workers/floatingFrame.worker.js.map +1 -1
  43. package/dist/workers/generic.worker.js +7 -6
  44. package/dist/workers/generic.worker.js.map +1 -1
  45. package/dist/workers/recordDetail.worker.js +8 -7
  46. package/dist/workers/recordDetail.worker.js.map +1 -1
  47. package/package.json +1 -1
  48. package/dist/chunk-5M2LFHMD.js.map +0 -1
  49. package/dist/chunk-DW7EWU2Z.js.map +0 -1
  50. package/dist/chunk-IFLQXUV7.js.map +0 -1
  51. package/dist/chunk-Y32HBIQ2.js.map +0 -1
package/dist/react.js CHANGED
@@ -1,9 +1,9 @@
1
- import { runScript, getPluginSafeHTML, getStableHash, readNavigationContext, clearNavigationContext, runExpression, isFlagEnabled } from './chunk-IFLQXUV7.js';
1
+ import { runScript, getPluginSafeHTML, getStableHash, readNavigationContext, clearNavigationContext, runExpression, isFlagEnabled } from './chunk-CMFPH7ZI.js';
2
2
  import './chunk-LGJYUPYZ.js';
3
- import { generateExecutionKey } from './chunk-KVE4CAUJ.js';
4
- import { buildIframeURLWithProxy, unwrapProxyMessage, getAllNestedInputsFromConfig, getActionFieldKey, getFieldFromAction, getActionMenuFieldKey } from './chunk-5M2LFHMD.js';
5
- import { runFrameScriptEventName, runBlockScriptEventName } from './chunk-QYGHOK5P.js';
6
- import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-DW7EWU2Z.js';
3
+ import { generateExecutionKey } from './chunk-V2YSOGVX.js';
4
+ import { buildIframeURLWithProxy, unwrapProxyMessage, getAllNestedInputsFromConfig, getActionFieldKey, getFieldFromAction, getActionMenuFieldKey } from './chunk-6ZZ7U3AM.js';
5
+ import { runFrameScriptEventName, runBlockScriptEventName } from './chunk-4F3ZPLL7.js';
6
+ import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-KCA5EK7O.js';
7
7
  import './chunk-5WRI5ZAA.js';
8
8
  import { QueryClient, useQueries, useQueryClient, QueryClientContext, QueryClientProvider } from '@tanstack/react-query';
9
9
  import { createContext, useContext, useState, useCallback, useMemo, useRef, useEffect, useImperativeHandle } from 'react';
@@ -67,7 +67,8 @@ var AppStateWrapper = ({
67
67
  teamMember,
68
68
  business,
69
69
  clientObject,
70
- appPath
70
+ appPath,
71
+ onCompleteSetup
71
72
  }) => {
72
73
  const [hasFinishedBootstrapping, setHasFinishedBootstrapping] = useState(false);
73
74
  const [routeScriptRunState, setRouteScriptRunState] = useState({});
@@ -104,6 +105,7 @@ var AppStateWrapper = ({
104
105
  business,
105
106
  clientObject,
106
107
  appPath,
108
+ onCompleteSetup,
107
109
  onInitialBootstrap,
108
110
  setRouteScriptRunState
109
111
  },
@@ -846,7 +848,8 @@ var useFloatingFrameCustomScript = ({
846
848
  teamMember,
847
849
  business,
848
850
  clientObject,
849
- appPath
851
+ appPath,
852
+ onCompleteSetup
850
853
  } = useAppState();
851
854
  const { showModal, showCreateRecordModal, showCreateRelatedRecordModal, closeCurrentModal } = useModals();
852
855
  const { sendException } = useMonitoring();
@@ -942,7 +945,8 @@ var useFloatingFrameCustomScript = ({
942
945
  return;
943
946
  }
944
947
  void executeScript(body, eventArgs);
945
- }
948
+ },
949
+ onCompleteSetup: onCompleteSetup ? (payload, completeSetupOptions) => onCompleteSetup(plugin.plugin_api_name, payload, completeSetupOptions) : void 0
946
950
  });
947
951
  },
948
952
  [
@@ -973,7 +977,8 @@ var useFloatingFrameCustomScript = ({
973
977
  getPendingCacheCount,
974
978
  invalidateCache,
975
979
  t,
976
- closeCurrentModal
980
+ closeCurrentModal,
981
+ onCompleteSetup
977
982
  ]
978
983
  );
979
984
  return [
@@ -998,7 +1003,8 @@ var useGenericAppCustomScript = ({
998
1003
  teamMember,
999
1004
  business,
1000
1005
  clientObject,
1001
- appPath
1006
+ appPath,
1007
+ onCompleteSetup
1002
1008
  } = useAppState();
1003
1009
  const { getRunnerState, getRunnerStateUpdater } = useRunnerState();
1004
1010
  const { showModal, showCreateRecordModal, closeCurrentModal } = useModals();
@@ -1081,7 +1087,12 @@ var useGenericAppCustomScript = ({
1081
1087
  return;
1082
1088
  }
1083
1089
  void executeScript(body, eventArgs, executionPlugin);
1084
- }
1090
+ },
1091
+ onCompleteSetup: onCompleteSetup ? (payload, completeSetupOptions) => onCompleteSetup(
1092
+ plugin?.plugin_api_name ?? executionPlugin?.plugin_api_name ?? "",
1093
+ payload,
1094
+ completeSetupOptions
1095
+ ) : void 0
1085
1096
  });
1086
1097
  },
1087
1098
  [
@@ -1110,7 +1121,8 @@ var useGenericAppCustomScript = ({
1110
1121
  getPendingCacheCount,
1111
1122
  invalidateCache,
1112
1123
  t,
1113
- closeCurrentModal
1124
+ closeCurrentModal,
1125
+ onCompleteSetup
1114
1126
  ]
1115
1127
  );
1116
1128
  return [
@@ -1137,7 +1149,8 @@ var useRecordDetailCustomScript = ({
1137
1149
  teamMember,
1138
1150
  business,
1139
1151
  clientObject,
1140
- appPath
1152
+ appPath,
1153
+ onCompleteSetup
1141
1154
  } = useAppState();
1142
1155
  const { getRunnerState, getRunnerStateUpdater } = useRunnerState();
1143
1156
  const { showModal, showCreateRecordModal, showCreateRelatedRecordModal, closeCurrentModal } = useModals();
@@ -1219,7 +1232,8 @@ var useRecordDetailCustomScript = ({
1219
1232
  createFileId,
1220
1233
  performFileUpload,
1221
1234
  getPendingCacheCount,
1222
- invalidateCache
1235
+ invalidateCache,
1236
+ onCompleteSetup: onCompleteSetup ? (payload, completeSetupOptions) => onCompleteSetup(executionPlugin?.plugin_api_name ?? "", payload, completeSetupOptions) : void 0
1223
1237
  });
1224
1238
  },
1225
1239
  [
@@ -1251,7 +1265,8 @@ var useRecordDetailCustomScript = ({
1251
1265
  getPendingCacheCount,
1252
1266
  invalidateCache,
1253
1267
  t,
1254
- closeCurrentModal
1268
+ closeCurrentModal,
1269
+ onCompleteSetup
1255
1270
  ]
1256
1271
  );
1257
1272
  return [
@@ -2245,7 +2260,8 @@ var AppEngineProvider = (props) => {
2245
2260
  performFileUpload,
2246
2261
  t,
2247
2262
  invalidateCache,
2248
- getPendingCacheCount
2263
+ getPendingCacheCount,
2264
+ onCompleteSetup
2249
2265
  } = props;
2250
2266
  useLocationChange();
2251
2267
  return /* @__PURE__ */ jsx(MaybeQueryClientProvider, { children: /* @__PURE__ */ jsx(
@@ -2258,6 +2274,7 @@ var AppEngineProvider = (props) => {
2258
2274
  business,
2259
2275
  clientObject,
2260
2276
  appPath,
2277
+ onCompleteSetup,
2261
2278
  children: ({ hasFinishedBootstrapping, waitingOnRouteScript }) => {
2262
2279
  return /* @__PURE__ */ jsx(TranslationWrapper, { t, children: /* @__PURE__ */ jsx(RunnerStateWrapper, { children: (showLoadingIndicator) => {
2263
2280
  return /* @__PURE__ */ jsx(HistoryWrapper, { onNavigate, children: /* @__PURE__ */ jsx(ModalsWrapper, { ...modal, children: (modals) => {