@kizenapps/engine 1.11.0 → 1.11.1
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/{chunk-WNOKZ4X3.js → chunk-6Z6FQRKC.js} +59 -15
- package/dist/chunk-6Z6FQRKC.js.map +1 -0
- package/dist/{chunk-3MOVWXNZ.js → chunk-G2NKNYIW.js} +3 -3
- package/dist/{chunk-3MOVWXNZ.js.map → chunk-G2NKNYIW.js.map} +1 -1
- package/dist/{chunk-F2SE2B4O.js → chunk-GQ7WYSE4.js} +3 -3
- package/dist/{chunk-F2SE2B4O.js.map → chunk-GQ7WYSE4.js.map} +1 -1
- package/dist/{chunk-MP7VEXDT.js → chunk-KHXC4SGQ.js} +3 -3
- package/dist/{chunk-MP7VEXDT.js.map → chunk-KHXC4SGQ.js.map} +1 -1
- package/dist/{chunk-4RYL6BUM.js → chunk-LSM2NTKZ.js} +3 -3
- package/dist/{chunk-4RYL6BUM.js.map → chunk-LSM2NTKZ.js.map} +1 -1
- package/dist/{chunk-PZEO6NPB.js → chunk-LYKZHCPQ.js} +4 -4
- package/dist/{chunk-PZEO6NPB.js.map → chunk-LYKZHCPQ.js.map} +1 -1
- package/dist/{chunk-MGKXLESC.js → chunk-Q7FEQQWE.js} +3 -3
- package/dist/{chunk-MGKXLESC.js.map → chunk-Q7FEQQWE.js.map} +1 -1
- package/dist/{chunk-OVZXLUFD.js → chunk-UWIG4AB5.js} +5 -5
- package/dist/{chunk-OVZXLUFD.js.map → chunk-UWIG4AB5.js.map} +1 -1
- package/dist/{chunk-WM7HHYBQ.js → chunk-WV77RVUT.js} +3 -3
- package/dist/{chunk-WM7HHYBQ.js.map → chunk-WV77RVUT.js.map} +1 -1
- package/dist/communication.js +2 -2
- package/dist/contexts/base.js +4 -4
- package/dist/contexts/floatingFrame.js +5 -5
- package/dist/contexts/recordDetail.js +5 -5
- package/dist/index.js +4 -4
- package/dist/react.js +5 -5
- package/dist/util.js +6 -6
- package/dist/workers/calendarSource.worker.js +6 -6
- package/dist/workers/expression.worker.js +74 -11
- package/dist/workers/expression.worker.js.map +1 -1
- package/dist/workers/floatingFrame.worker.js +7 -7
- package/dist/workers/generic.worker.js +6 -6
- package/dist/workers/recordDetail.worker.js +7 -7
- package/package.json +1 -1
- package/dist/chunk-WNOKZ4X3.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getPartialLocation, generateUUIDV4 } from './chunk-
|
|
2
|
-
import { getAllNestedInputsFromConfig, buildIframeURLWithProxy, getParentFrameAllowParam, deserializeConsoleArg, KizenRequestError, filterSandboxList, filterAllowList } from './chunk-
|
|
3
|
-
import { IFRAME_PREFIX, ACTIONS, RESPONSES, COMMUNICATIONS, thirdPartyGlobalNames, getScriptIntegrationType, thirdPartySetupScripts, thirdPartyReadyPredicates } from './chunk-
|
|
1
|
+
import { getPartialLocation, generateUUIDV4 } from './chunk-KHXC4SGQ.js';
|
|
2
|
+
import { getAllNestedInputsFromConfig, buildIframeURLWithProxy, getParentFrameAllowParam, deserializeConsoleArg, KizenRequestError, filterSandboxList, filterAllowList } from './chunk-Q7FEQQWE.js';
|
|
3
|
+
import { IFRAME_PREFIX, ACTIONS, RESPONSES, COMMUNICATIONS, thirdPartyGlobalNames, getScriptIntegrationType, thirdPartySetupScripts, thirdPartyReadyPredicates } from './chunk-GQ7WYSE4.js';
|
|
4
4
|
import { __commonJS, __toESM } from './chunk-5WRI5ZAA.js';
|
|
5
5
|
import DOMPurify from 'dompurify';
|
|
6
6
|
|
|
@@ -2799,18 +2799,62 @@ var runScript = async ({
|
|
|
2799
2799
|
);
|
|
2800
2800
|
});
|
|
2801
2801
|
};
|
|
2802
|
+
var EXPRESSION_TIMEOUT_MS = 2e4;
|
|
2802
2803
|
var runUnknownExpression = (expression, values) => {
|
|
2803
|
-
const worker = new Worker(new URL("./workers/expression.worker.js", import.meta.url), {
|
|
2804
|
-
type: "module"
|
|
2805
|
-
});
|
|
2806
2804
|
return new Promise((resolve) => {
|
|
2807
|
-
worker
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2805
|
+
let worker;
|
|
2806
|
+
let settled = false;
|
|
2807
|
+
const settle = (result, warning) => {
|
|
2808
|
+
if (settled) {
|
|
2809
|
+
return;
|
|
2810
|
+
}
|
|
2811
|
+
settled = true;
|
|
2812
|
+
clearTimeout(timeoutId);
|
|
2813
|
+
worker?.terminate();
|
|
2814
|
+
if (warning) {
|
|
2815
|
+
console.warn(`Plugin expression failed: ${warning}
|
|
2816
|
+
Expression: ${expression}`);
|
|
2817
|
+
}
|
|
2818
|
+
resolve(result);
|
|
2811
2819
|
};
|
|
2812
|
-
const
|
|
2813
|
-
|
|
2820
|
+
const timeoutId = setTimeout(() => {
|
|
2821
|
+
settle(null, `timed out after ${String(EXPRESSION_TIMEOUT_MS)}ms`);
|
|
2822
|
+
}, EXPRESSION_TIMEOUT_MS);
|
|
2823
|
+
try {
|
|
2824
|
+
worker = new Worker(new URL("./workers/expression.worker.js", import.meta.url), {
|
|
2825
|
+
type: "module"
|
|
2826
|
+
});
|
|
2827
|
+
worker.onmessage = (e) => {
|
|
2828
|
+
let parsed;
|
|
2829
|
+
try {
|
|
2830
|
+
parsed = JSON.parse(e.data);
|
|
2831
|
+
} catch {
|
|
2832
|
+
settle(null, "malformed response from expression worker");
|
|
2833
|
+
return;
|
|
2834
|
+
}
|
|
2835
|
+
if (parsed === null || typeof parsed !== "object") {
|
|
2836
|
+
settle(null, "malformed response from expression worker");
|
|
2837
|
+
return;
|
|
2838
|
+
}
|
|
2839
|
+
const data = parsed;
|
|
2840
|
+
if (typeof data.error === "string") {
|
|
2841
|
+
settle(null, data.error);
|
|
2842
|
+
return;
|
|
2843
|
+
}
|
|
2844
|
+
settle(data.result);
|
|
2845
|
+
};
|
|
2846
|
+
worker.onerror = (e) => {
|
|
2847
|
+
e.preventDefault();
|
|
2848
|
+
settle(null, "uncaught error in expression worker");
|
|
2849
|
+
};
|
|
2850
|
+
worker.onmessageerror = () => {
|
|
2851
|
+
settle(null, "worker message could not be deserialized");
|
|
2852
|
+
};
|
|
2853
|
+
const isDebug = isFlagEnabled("script-runner-logging");
|
|
2854
|
+
worker.postMessage(JSON.stringify({ expression, args: values, isDebug }));
|
|
2855
|
+
} catch {
|
|
2856
|
+
settle(null, "could not start expression worker");
|
|
2857
|
+
}
|
|
2814
2858
|
});
|
|
2815
2859
|
};
|
|
2816
2860
|
var runExpression = async (expression, values) => {
|
|
@@ -2838,8 +2882,8 @@ var modalSize = {
|
|
|
2838
2882
|
};
|
|
2839
2883
|
|
|
2840
2884
|
// src/index.ts
|
|
2841
|
-
var version = "1.11.
|
|
2885
|
+
var version = "1.11.1";
|
|
2842
2886
|
|
|
2843
2887
|
export { clearNavigationContext, consumeNavigationContext, flattenReservedState, forceQualifiedUrl, getDisabledValue, getEnabledState, getHash, getLinkValue, getPluginSafeHTML, getQrCodeValue, getStableHash, isFlagEnabled, mergeConfig, modalSize, pluginMapper, readNavigationContext, reduceEnabledResults, replaceConfigValues, runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version };
|
|
2844
|
-
//# sourceMappingURL=chunk-
|
|
2845
|
-
//# sourceMappingURL=chunk-
|
|
2888
|
+
//# sourceMappingURL=chunk-6Z6FQRKC.js.map
|
|
2889
|
+
//# sourceMappingURL=chunk-6Z6FQRKC.js.map
|