@kizenapps/engine 1.3.1 → 1.4.0
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/{ThirdPartyScript-Bg-ZNlC4.d.ts → ThirdPartyScript-CoMDaLsq.d.ts} +1 -1
- package/dist/{routeScript-BExlCmGg.d.ts → automation-CWET9vfs.d.ts} +35 -2
- package/dist/{chunk-MQ2JWOOH.js → chunk-3B5P6QRP.js} +21 -5
- package/dist/chunk-3B5P6QRP.js.map +1 -0
- package/dist/{chunk-BOVB5YL3.js → chunk-6Q22X2IU.js} +4 -4
- package/dist/{chunk-BOVB5YL3.js.map → chunk-6Q22X2IU.js.map} +1 -1
- package/dist/{chunk-TYOXPK37.js → chunk-6V2UT4RS.js} +3 -3
- package/dist/{chunk-TYOXPK37.js.map → chunk-6V2UT4RS.js.map} +1 -1
- package/dist/{chunk-ZYR6AFEC.js → chunk-GOD2MD2O.js} +157 -8
- package/dist/chunk-GOD2MD2O.js.map +1 -0
- package/dist/{chunk-J3C7J6QZ.js → chunk-L2Z7F5W6.js} +5 -5
- package/dist/{chunk-J3C7J6QZ.js.map → chunk-L2Z7F5W6.js.map} +1 -1
- package/dist/{chunk-2CMHHDVB.js → chunk-LTOTDWXB.js} +3 -3
- package/dist/{chunk-2CMHHDVB.js.map → chunk-LTOTDWXB.js.map} +1 -1
- package/dist/{chunk-E6PKEJRU.js → chunk-LXBIPXUE.js} +3 -3
- package/dist/{chunk-E6PKEJRU.js.map → chunk-LXBIPXUE.js.map} +1 -1
- package/dist/{chunk-XCXET4AM.js → chunk-S2GWVVYT.js} +3 -3
- package/dist/{chunk-XCXET4AM.js.map → chunk-S2GWVVYT.js.map} +1 -1
- package/dist/{chunk-5PYHFCFW.js → chunk-TLWBUPHD.js} +3 -3
- package/dist/{chunk-5PYHFCFW.js.map → chunk-TLWBUPHD.js.map} +1 -1
- package/dist/communication.d.ts +2 -2
- package/dist/communication.js +2 -2
- package/dist/contexts/base.d.ts +1 -1
- package/dist/contexts/base.js +4 -5
- package/dist/contexts/floatingFrame.d.ts +1 -1
- package/dist/contexts/floatingFrame.js +5 -6
- package/dist/contexts/recordDetail.d.ts +1 -1
- package/dist/contexts/recordDetail.js +5 -6
- package/dist/{generic-B_BmEHix.d.ts → generic-CQyBACwP.d.ts} +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/index.js +4 -4
- package/dist/react.d.ts +12 -4
- package/dist/react.js +12 -12
- package/dist/react.js.map +1 -1
- package/dist/types.d.ts +5 -6
- package/dist/util.d.ts +5 -24
- package/dist/util.js +6 -133
- package/dist/util.js.map +1 -1
- package/dist/values-BwAd85Ee.d.ts +31 -0
- package/dist/workers/calendarSource.worker.js +6 -7
- package/dist/workers/calendarSource.worker.js.map +1 -1
- package/dist/workers/floatingFrame.worker.js +7 -8
- package/dist/workers/floatingFrame.worker.js.map +1 -1
- package/dist/workers/generic.worker.js +6 -7
- package/dist/workers/generic.worker.js.map +1 -1
- package/dist/workers/recordDetail.worker.js +7 -8
- package/dist/workers/recordDetail.worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/automation-nAOwIFAV.d.ts +0 -36
- package/dist/chunk-7ALAP3YN.js +0 -20
- package/dist/chunk-7ALAP3YN.js.map +0 -1
- package/dist/chunk-MQ2JWOOH.js.map +0 -1
- package/dist/chunk-ZYR6AFEC.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version } from './chunk-GOD2MD2O.js';
|
|
2
|
+
import './chunk-TLWBUPHD.js';
|
|
3
|
+
import './chunk-3B5P6QRP.js';
|
|
4
|
+
import './chunk-LTOTDWXB.js';
|
|
5
5
|
import './chunk-5WRI5ZAA.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/react.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { G as GenericPluginConfig, E as ExecuteGenericScript } from './generic-
|
|
1
|
+
import { f as CalendarDefinition, c as CalendarSourceConfig, h as CalendarSourceMap, i as CalendarSources, w as OnShowToastFn, o as ExecuteCalendarSourceScript, F as FloatingFrameConfig, p as ExecuteFloatingFrameScript, R as RoutablePageConfig, a4 as WindowPosition, q as FloatingFrameEmployeeConfig, v as OnNetworkRequestFn, l as CreateFileIdFn, P as PerformKizenFileUploadFn, G as GetPendingCacheCountFn, t as InvalidateCacheFn, b as RouteScriptConfig } from './automation-CWET9vfs.js';
|
|
2
|
+
import { q as AppPlugins, W as WorkerContextArgs, U as UnknownJSON, b as PartialUser, c as PartialTeamMember, d as PartialBusiness, e as PartialClientObject, al as ModalCancelEventSource, M as ModalConfig, aM as SetupAssistantConfig, r as AssistantConfigAction, s as AssistantField } from './ThirdPartyScript-CoMDaLsq.js';
|
|
3
|
+
import { G as GenericPluginConfig, E as ExecuteGenericScript } from './generic-CQyBACwP.js';
|
|
4
4
|
import { RefObject, JSX, ReactNode, FC, SetStateAction } from 'react';
|
|
5
|
+
import { R as RemovedHTML } from './values-BwAd85Ee.js';
|
|
5
6
|
import './floatingFrames-BzaoL7cq.js';
|
|
7
|
+
import 'dompurify';
|
|
6
8
|
|
|
7
9
|
declare const useCalendarOptions: (enabled: boolean, calendarSources: CalendarSources, plugins?: AppPlugins) => {
|
|
8
10
|
calendars: Record<string, {
|
|
@@ -176,6 +178,12 @@ interface UseFloatingFrameResult {
|
|
|
176
178
|
}
|
|
177
179
|
declare const useFloatingFrame: (params: UseFloatingFrameArgs) => UseFloatingFrameResult;
|
|
178
180
|
|
|
181
|
+
declare const usePluginSafeHTML: (html?: string) => {
|
|
182
|
+
html: string;
|
|
183
|
+
error: Error | null;
|
|
184
|
+
removed: RemovedHTML[];
|
|
185
|
+
};
|
|
186
|
+
|
|
179
187
|
interface AppStateWrapperProps {
|
|
180
188
|
bootstrapPlugins?: {
|
|
181
189
|
id: string;
|
|
@@ -364,4 +372,4 @@ interface TranslationContextValue {
|
|
|
364
372
|
declare const TranslationWrapper: FC<TranslationWrapperProps>;
|
|
365
373
|
declare const useTranslation: () => TranslationContextValue;
|
|
366
374
|
|
|
367
|
-
export { AppBootstrapSuccess, AppEngineProvider, RouteScriptRunner, SetupAssistantController, type TranslationFunction, TranslationWrapper, type TranslationWrapperProps, useAppCallback, useAppCustomHTML, useAppPage, useCalendarEvents, useCalendarOptions, useCalendarSourceCustomScript, useCalendarSourceReset, useFloatingFrame, useFloatingFrameCustomScript, useGenericAppCustomScript, useManualInteraction, useRecordDetailCustomScript, useSetupAssistant, useTranslation };
|
|
375
|
+
export { AppBootstrapSuccess, AppEngineProvider, RouteScriptRunner, SetupAssistantController, type TranslationFunction, TranslationWrapper, type TranslationWrapperProps, useAppCallback, useAppCustomHTML, useAppPage, useCalendarEvents, useCalendarOptions, useCalendarSourceCustomScript, useCalendarSourceReset, useFloatingFrame, useFloatingFrameCustomScript, useGenericAppCustomScript, useManualInteraction, usePluginSafeHTML, useRecordDetailCustomScript, useSetupAssistant, useTranslation };
|
package/dist/react.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { runScript, runExpression, getStableHash, isFlagEnabled } from './chunk-
|
|
1
|
+
import { runScript, getPluginSafeHTML, runExpression, getStableHash, isFlagEnabled } from './chunk-GOD2MD2O.js';
|
|
2
2
|
import './chunk-LGJYUPYZ.js';
|
|
3
|
-
import { generateExecutionKey } from './chunk-
|
|
4
|
-
import { getAllNestedInputsFromConfig, getFieldFromAction } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import {
|
|
7
|
-
import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-2CMHHDVB.js';
|
|
3
|
+
import { generateExecutionKey } from './chunk-TLWBUPHD.js';
|
|
4
|
+
import { getAllNestedInputsFromConfig, getFieldFromAction } from './chunk-3B5P6QRP.js';
|
|
5
|
+
import { runFrameScriptEventName } from './chunk-6V2UT4RS.js';
|
|
6
|
+
import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-LTOTDWXB.js';
|
|
8
7
|
import './chunk-5WRI5ZAA.js';
|
|
9
8
|
import { QueryClient, useQueries, useQueryClient, QueryClientContext, QueryClientProvider } from '@tanstack/react-query';
|
|
10
9
|
import { createContext, useContext, useState, useCallback, useMemo, useRef, useEffect } from 'react';
|
|
@@ -12,7 +11,6 @@ import { jsx, Fragment } from 'react/jsx-runtime';
|
|
|
12
11
|
import { formatInTimeZone } from 'date-fns-tz';
|
|
13
12
|
import { startOfDay, endOfDay } from 'date-fns';
|
|
14
13
|
import { flushSync } from 'react-dom';
|
|
15
|
-
import DOMPurify from 'dompurify';
|
|
16
14
|
|
|
17
15
|
var TerminatorsContext = createContext(null);
|
|
18
16
|
var TerminatorsWrapper = ({ children }) => {
|
|
@@ -1224,16 +1222,18 @@ var useRecordDetailCustomScript = ({
|
|
|
1224
1222
|
}
|
|
1225
1223
|
];
|
|
1226
1224
|
};
|
|
1225
|
+
var usePluginSafeHTML = (html) => {
|
|
1226
|
+
return useMemo(() => getPluginSafeHTML(html), [html]);
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
// src/react/hooks/useAppCustomHTML.ts
|
|
1227
1230
|
var useAppCustomHTML = (currentPage, args) => {
|
|
1228
1231
|
const { showToast } = useToast();
|
|
1229
1232
|
const { t } = useTranslation();
|
|
1230
1233
|
const outputUIRef = useRef(null);
|
|
1231
1234
|
const interactableScriptRef = useRef(null);
|
|
1232
1235
|
const css = currentPage?.css;
|
|
1233
|
-
const html =
|
|
1234
|
-
const rawHTML = currentPage?.html;
|
|
1235
|
-
return rawHTML ? DOMPurify.sanitize(rawHTML) : null;
|
|
1236
|
-
}, [currentPage]);
|
|
1236
|
+
const { html } = usePluginSafeHTML(currentPage?.html);
|
|
1237
1237
|
const interactableScripts = useMemo(() => {
|
|
1238
1238
|
return currentPage?.event_scripts ?? {};
|
|
1239
1239
|
}, [currentPage]);
|
|
@@ -2748,6 +2748,6 @@ var useSetupAssistant = () => {
|
|
|
2748
2748
|
return context;
|
|
2749
2749
|
};
|
|
2750
2750
|
|
|
2751
|
-
export { AppBootstrapSuccess, AppEngineProvider, RouteScriptRunner, SetupAssistantController, TranslationWrapper, useAppCallback, useAppCustomHTML, useAppPage, useCalendarEvents, useCalendarOptions, useCalendarSourceCustomScript, useCalendarSourceReset, useFloatingFrame, useFloatingFrameCustomScript, useGenericAppCustomScript, useManualInteraction, useRecordDetailCustomScript, useSetupAssistant, useTranslation };
|
|
2751
|
+
export { AppBootstrapSuccess, AppEngineProvider, RouteScriptRunner, SetupAssistantController, TranslationWrapper, useAppCallback, useAppCustomHTML, useAppPage, useCalendarEvents, useCalendarOptions, useCalendarSourceCustomScript, useCalendarSourceReset, useFloatingFrame, useFloatingFrameCustomScript, useGenericAppCustomScript, useManualInteraction, usePluginSafeHTML, useRecordDetailCustomScript, useSetupAssistant, useTranslation };
|
|
2752
2752
|
//# sourceMappingURL=react.js.map
|
|
2753
2753
|
//# sourceMappingURL=react.js.map
|