@kizenapps/engine 1.4.0 → 1.5.0-eea1ed9
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-CoMDaLsq.d.ts → ThirdPartyScript-CNJE0KCC.d.ts} +12 -2
- package/dist/{automation-CWET9vfs.d.ts → automation-Cq_ikix7.d.ts} +8 -3
- package/dist/{chunk-GOD2MD2O.js → chunk-654TQCTD.js} +37 -6
- package/dist/chunk-654TQCTD.js.map +1 -0
- package/dist/{chunk-TLWBUPHD.js → chunk-A7FXRONV.js} +3 -3
- package/dist/{chunk-TLWBUPHD.js.map → chunk-A7FXRONV.js.map} +1 -1
- package/dist/{chunk-6V2UT4RS.js → chunk-ADJCDTJV.js} +3 -3
- package/dist/{chunk-6V2UT4RS.js.map → chunk-ADJCDTJV.js.map} +1 -1
- package/dist/{chunk-L2Z7F5W6.js → chunk-AW2EBAZ5.js} +11 -5
- package/dist/chunk-AW2EBAZ5.js.map +1 -0
- package/dist/{chunk-6Q22X2IU.js → chunk-FGNDQDEF.js} +4 -4
- package/dist/{chunk-6Q22X2IU.js.map → chunk-FGNDQDEF.js.map} +1 -1
- package/dist/{chunk-LXBIPXUE.js → chunk-HPIHLZEX.js} +3 -3
- package/dist/{chunk-LXBIPXUE.js.map → chunk-HPIHLZEX.js.map} +1 -1
- package/dist/{chunk-S2GWVVYT.js → chunk-IC7MWYER.js} +3 -3
- package/dist/{chunk-S2GWVVYT.js.map → chunk-IC7MWYER.js.map} +1 -1
- package/dist/{chunk-3B5P6QRP.js → chunk-RLS4JXKI.js} +17 -4
- package/dist/chunk-RLS4JXKI.js.map +1 -0
- package/dist/{chunk-LTOTDWXB.js → chunk-S4MDBKRN.js} +5 -4
- package/dist/chunk-S4MDBKRN.js.map +1 -0
- package/dist/communication.d.ts +2 -2
- package/dist/communication.js +2 -2
- package/dist/contexts/base.d.ts +4 -2
- package/dist/contexts/base.js +4 -4
- package/dist/contexts/floatingFrame.d.ts +1 -1
- package/dist/contexts/floatingFrame.js +5 -5
- package/dist/contexts/recordDetail.d.ts +1 -1
- package/dist/contexts/recordDetail.js +5 -5
- package/dist/{generic-CQyBACwP.d.ts → generic-B0sTB6Bm.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/react.d.ts +4 -4
- package/dist/react.js +5 -5
- package/dist/types.d.ts +5 -5
- package/dist/util.d.ts +3 -3
- package/dist/util.js +5 -5
- package/dist/{values-BwAd85Ee.d.ts → values-BpeVADqG.d.ts} +2 -2
- package/dist/workers/calendarSource.worker.js +7 -6
- package/dist/workers/calendarSource.worker.js.map +1 -1
- package/dist/workers/floatingFrame.worker.js +8 -7
- package/dist/workers/floatingFrame.worker.js.map +1 -1
- package/dist/workers/generic.worker.js +7 -6
- package/dist/workers/generic.worker.js.map +1 -1
- package/dist/workers/recordDetail.worker.js +8 -7
- package/dist/workers/recordDetail.worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3B5P6QRP.js.map +0 -1
- package/dist/chunk-GOD2MD2O.js.map +0 -1
- package/dist/chunk-L2Z7F5W6.js.map +0 -1
- package/dist/chunk-LTOTDWXB.js.map +0 -1
|
@@ -153,6 +153,8 @@ interface ModalContainer {
|
|
|
153
153
|
type ModalBlock = ModalDescription | ModalTextInput | ModalSpacer | ModalDropdown | ModalContainer;
|
|
154
154
|
interface ModalConfig {
|
|
155
155
|
title?: string;
|
|
156
|
+
viewId?: string;
|
|
157
|
+
args?: UnknownJSON;
|
|
156
158
|
confirmButton?: ButtonConfig;
|
|
157
159
|
cancelButton?: ButtonConfig;
|
|
158
160
|
content?: ModalBlock[];
|
|
@@ -167,6 +169,12 @@ interface DynamicPromptConfig {
|
|
|
167
169
|
registerUtils?: Record<string, (...args: unknown[]) => unknown>;
|
|
168
170
|
}
|
|
169
171
|
type PromptState = Record<string, unknown>;
|
|
172
|
+
type ShowViewInModalFn = (id: string, args?: UnknownJSON) => Promise<{
|
|
173
|
+
canceled: boolean;
|
|
174
|
+
result?: unknown;
|
|
175
|
+
error?: unknown;
|
|
176
|
+
}>;
|
|
177
|
+
type CurriedShowViewInModalFn = (instance: Instance, promises: WorkerPromise) => ShowViewInModalFn;
|
|
170
178
|
type DynamicPromptFn = (config: DynamicPromptConfig) => Promise<{
|
|
171
179
|
values: Record<string, ValueStore>;
|
|
172
180
|
}>;
|
|
@@ -271,7 +279,7 @@ interface TextValueStore {
|
|
|
271
279
|
type ValueStore = BooleanValueStore | CustomObjectValueStore | FieldValueStore | NumberValueStore | SelectValueStore | TextValueStore;
|
|
272
280
|
type CleanValueStoreType = BooleanCleanValue | CustomObjectCleanValue | FieldCleanValue | NumberCleanValue | SelectCleanValue | TextCleanValue;
|
|
273
281
|
type CleanValueStore = Record<string, CleanValueStoreType>;
|
|
274
|
-
type OnShowModalFn = (config: ModalConfig, cb: () => void) => void;
|
|
282
|
+
type OnShowModalFn = (config: ModalConfig, cb: (result?: UnknownJSON) => void) => void;
|
|
275
283
|
type OnShowCreateRecordModalFn = (objectId: string, cb: (result: UnknownJSON) => void) => void;
|
|
276
284
|
type OnShowCreateRelatedRecordModalFn = (objectId: string, relatedEntityId: string, cb: (result: UnknownJSON) => void) => void;
|
|
277
285
|
type ModalQueue = {
|
|
@@ -368,6 +376,7 @@ declare const ACTIONS: {
|
|
|
368
376
|
RELEASE_BLOCKING_SCRIPT: string;
|
|
369
377
|
AUTHORIZE: string;
|
|
370
378
|
COPY_TO_CLIPBOARD: string;
|
|
379
|
+
SHOW_VIEW_IN_MODAL_REQUEST: string;
|
|
371
380
|
};
|
|
372
381
|
declare enum INDICATOR_TYPE {
|
|
373
382
|
NONE = "none",
|
|
@@ -455,6 +464,7 @@ interface WorkerContextArgs {
|
|
|
455
464
|
openCreateRelatedRecord: OpenCreateRelatedRecordFn;
|
|
456
465
|
pluginApiName: string;
|
|
457
466
|
location: PartialLocation;
|
|
467
|
+
showViewInModal: ShowViewInModalFn;
|
|
458
468
|
}
|
|
459
469
|
type KizenConfig = Record<string, unknown>;
|
|
460
470
|
interface KnownArgs {
|
|
@@ -486,4 +496,4 @@ declare class ThirdPartyScript {
|
|
|
486
496
|
call(...params: unknown[]): void;
|
|
487
497
|
}
|
|
488
498
|
|
|
489
|
-
export { type
|
|
499
|
+
export { type DataCacheEntry as $, type Args as A, type BaseAPI as B, type CurrentUser as C, type DataCache as D, type CreateRecordModalQueue as E, type CreateRelatedRecordModalQueue as F, type GetOptions as G, type CurriedDynamicPromptFn as H, type Instance as I, type CurriedInstallThirdPartyScriptFn as J, type CurriedKizenRequestFn as K, type CurriedOpenCreateRecordFn as L, type ModalConfig as M, type CurriedOpenCreateRelatedRecordFn as N, type CurriedPostFormDataFn as O, type PartialEntity as P, type CurriedPromptFn as Q, type RequestWithErrorsResponse as R, type StateChangePayload as S, ThirdPartyScript as T, type UnknownJSON as U, type CurriedRefreshEntityFn as V, type WorkerContextArgs as W, type CurriedShowViewInModalFn as X, type CurriedUploadFileFn as Y, type CustomObjectCleanValue as Z, type CustomObjectValueStore as _, type PartialCustomObject as a, type DeleteReturnValue as a0, type DynamicPromptFn as a1, type EmployeeConfig as a2, type ErrorHandler as a3, type ErrorResponse as a4, type FieldCleanValue as a5, type FieldValueStore as a6, type GetReturnValue as a7, type InstallThirdPartyScriptFn as a8, type JSONArray as a9, type PostReturnValue as aA, type Profile as aB, type PromiseMap as aC, type PromiseReject as aD, type PromiseResolve as aE, type PromiseState as aF, type PromptFn as aG, type PutReturnValue as aH, type RefreshEntityFn as aI, type ReleaseBlockingScriptHandler as aJ, type SelectCleanValue as aK, type SelectValueStore as aL, type SetInternalSessionDataFn as aM, type SetupAssistantConfig as aN, type ShowViewInModalFn as aO, type TextValueStore as aP, type UnknownFunction as aQ, type UploadFileData as aR, type UploadFileFn as aS, type UserConfig as aT, type ValueStore as aU, KizenRequestError as aV, ACTIONS as aW, ALLOWED_INTEGRATIONS as aX, IFRAME_PREFIX as aY, INDICATOR_TYPE as aZ, type JSONObject as aa, type JSONPrimitive as ab, type JSONValue as ac, type KizenConfig as ad, type KizenNetworkResponse as ae, type KizenProxySuccessResponse as af, type KizenRequestFn as ag, type KizenRequestFnHandler as ah, type KnownArgs as ai, type MatchSetupAssistantField as aj, type MaybeMessageError as ak, type ModalBlock as al, type ModalCancelEventSource as am, type ModalContainer as an, type ModalQueue as ao, type NumberCleanValue as ap, type NumberValueStore as aq, type OnNetworkErrorFn as ar, type OnShowCreateRecordModalFn as as, type OnShowCreateRelatedRecordModalFn as at, type OnShowModalFn as au, type OpenCreateRecordFn as av, type OpenCreateRelatedRecordFn as aw, type PartialRelatedObject as ax, type PatchReturnValue as ay, type PostFormDataPayload as az, type PartialUser as b, type PartialTeamMember as c, type PartialBusiness as d, type PartialClientObject as e, type PostFormDataFn as f, type PromptState as g, type InternalSessionData as h, type PartialLocation as i, type RequestOptions as j, type ShowToastOptions as k, type DynamicPromptConfig as l, type IncludeOption as m, type SetupAssistantField as n, type AppPlugin as o, type SelectOption as p, type AppPlugins as q, type AssistantConfigAction as r, type AssistantField as s, type AssistantLink as t, type BooleanCleanValue as u, type BooleanValueStore as v, type ButtonConfig as w, type CleanValueStore as x, type CleanValueStoreType as y, type ConfigService as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aW as ACTIONS, aX as ALLOWED_INTEGRATIONS, M as ModalConfig, U as UnknownJSON, S as StateChangePayload, k as ShowToastOptions, h as InternalSessionData, aM as SetInternalSessionDataFn, au as OnShowModalFn, as as OnShowCreateRecordModalFn, at as OnShowCreateRelatedRecordModalFn, ar as OnNetworkErrorFn, W as WorkerContextArgs, a2 as EmployeeConfig } from './ThirdPartyScript-CNJE0KCC.js';
|
|
2
2
|
import { H as HideConfig, S as ShowConfig } from './floatingFrames-BzaoL7cq.js';
|
|
3
3
|
|
|
4
4
|
interface CommonPluginDefinition {
|
|
@@ -172,7 +172,12 @@ interface AuthorizeEvent extends BaseEvent {
|
|
|
172
172
|
errorRedirectPath?: string;
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
interface ShowViewInModalRequestEvent extends BaseEvent {
|
|
176
|
+
id: string;
|
|
177
|
+
viewId: string;
|
|
178
|
+
args?: UnknownJSON;
|
|
179
|
+
}
|
|
180
|
+
type MessageEventData = QueryRequestEvent | UIOutputEvent | IframeOutputEvent | PostFormDataRequestEvent | UploadFileRequestEvent | SetStateEvent | DoneEvent | ErrorEvent | OpenWindowEvent | CommunicateEvent | HideEvent | ShowEvent | CopyToClipboardEvent | OpenCreateRecordModalRequestEvent | OpenCreateRelatedRecordModalRequestEvent | ShowToastEvent | RefreshTimelineEvent | RefreshEntityEvent | UpdateSessionDataEvent | InstallThirdPartyScriptRequestEvent | PromptRequestEvent | DynamicPromptRequestEvent | ShowViewInModalRequestEvent | AuthorizeEvent;
|
|
176
181
|
type InvalidateCacheFn = (category: 'timeline' | 'entity', entityId: string) => void;
|
|
177
182
|
type GetPendingCacheCountFn = (search: string) => number;
|
|
178
183
|
interface KizenFile extends File {
|
|
@@ -333,4 +338,4 @@ interface AutomationStepConfig<T = unknown> {
|
|
|
333
338
|
plugin_api_name?: string;
|
|
334
339
|
}
|
|
335
340
|
|
|
336
|
-
export type {
|
|
341
|
+
export type { TerminatorContent as $, AutomationStepConfig as A, BaseEvent as B, CommonExecutionPlugin as C, DataAdornmentConfig as D, ErrorEvent as E, FloatingFrameConfig as F, GetPendingCacheCountFn as G, HideEvent as H, IframeOutputEvent as I, PostFormDataRequestEvent as J, KizenFile as K, PromptRequestEvent as L, MessageEventData as M, RecipientConfig as N, OnClearToastsFn as O, PerformKizenFileUploadFn as P, QueryRequestEvent as Q, RoutablePageConfig as R, RefreshEntityEvent as S, ToolbarItemConfig as T, RefreshTimelineEvent as U, RequestableQueryMethods as V, SchemaValidation as W, SetStateEvent as X, ShowEvent as Y, ShowToastEvent as Z, ShowViewInModalRequestEvent as _, CommonPluginDefinition as a, Terminators as a0, UIOutputEvent as a1, UpdateSessionDataEvent as a2, UploadFilePayload as a3, UploadFileRequestEvent as a4, WindowPosition as a5, RouteScriptConfig as b, CalendarSourceConfig as c, RunScriptOptions as d, AuthorizeEvent as e, CalendarDefinition as f, CalendarScriptReturnData as g, CalendarSourceMap as h, CalendarSources as i, CommunicateEvent as j, CopyToClipboardEvent as k, CreateFileIdFn as l, DoneEvent as m, DynamicPromptRequestEvent as n, ExecuteCalendarSourceScript as o, ExecuteFloatingFrameScript as p, FloatingFrameEmployeeConfig as q, FrameQuadrant as r, InstallThirdPartyScriptRequestEvent as s, InvalidateCacheFn as t, MinimizedConfig as u, OnNetworkRequestFn as v, OnShowToastFn as w, OpenCreateRecordModalRequestEvent as x, OpenCreateRelatedRecordModalRequestEvent as y, OpenWindowEvent as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getPartialLocation, generateUUIDV4 } from './chunk-
|
|
2
|
-
import { getAllNestedInputsFromConfig, KizenRequestError } from './chunk-
|
|
3
|
-
import { IFRAME_PREFIX, ACTIONS, RESPONSES, COMMUNICATIONS, thirdPartyGlobalNames, getScriptIntegrationType, thirdPartySetupScripts, thirdPartyReadyPredicates } from './chunk-
|
|
1
|
+
import { getPartialLocation, generateUUIDV4 } from './chunk-A7FXRONV.js';
|
|
2
|
+
import { getAllNestedInputsFromConfig, KizenRequestError } from './chunk-RLS4JXKI.js';
|
|
3
|
+
import { IFRAME_PREFIX, ACTIONS, RESPONSES, COMMUNICATIONS, thirdPartyGlobalNames, getScriptIntegrationType, thirdPartySetupScripts, thirdPartyReadyPredicates } from './chunk-S4MDBKRN.js';
|
|
4
4
|
import { __commonJS, __toESM } from './chunk-5WRI5ZAA.js';
|
|
5
5
|
import DOMPurify from 'dompurify';
|
|
6
6
|
|
|
@@ -2045,6 +2045,15 @@ var WorkerManager = class {
|
|
|
2045
2045
|
this.handlePromptRequest(consideredEvent.id, consideredEvent.config, true);
|
|
2046
2046
|
return;
|
|
2047
2047
|
}
|
|
2048
|
+
case ACTIONS.SHOW_VIEW_IN_MODAL_REQUEST: {
|
|
2049
|
+
const consideredEvent = event;
|
|
2050
|
+
this.handleShowViewInModalRequest(
|
|
2051
|
+
consideredEvent.id,
|
|
2052
|
+
consideredEvent.viewId,
|
|
2053
|
+
consideredEvent.args
|
|
2054
|
+
);
|
|
2055
|
+
return;
|
|
2056
|
+
}
|
|
2048
2057
|
case ACTIONS.RELEASE_BLOCKING_SCRIPT: {
|
|
2049
2058
|
this.handleReleaseBlockingScript();
|
|
2050
2059
|
return;
|
|
@@ -2329,6 +2338,28 @@ var WorkerManager = class {
|
|
|
2329
2338
|
});
|
|
2330
2339
|
}
|
|
2331
2340
|
};
|
|
2341
|
+
handleShowViewInModalRequest = (id, viewId, args) => {
|
|
2342
|
+
if (this.onShowModal) {
|
|
2343
|
+
this.onShowModal(
|
|
2344
|
+
{
|
|
2345
|
+
viewId,
|
|
2346
|
+
...args !== void 0 && { args },
|
|
2347
|
+
pluginApiName: this.pluginApiName ?? ""
|
|
2348
|
+
},
|
|
2349
|
+
(result = {}) => {
|
|
2350
|
+
this.postMessage(RESPONSES.PROMPT_RESPONSE, {
|
|
2351
|
+
id,
|
|
2352
|
+
data: result
|
|
2353
|
+
});
|
|
2354
|
+
}
|
|
2355
|
+
);
|
|
2356
|
+
} else {
|
|
2357
|
+
this.postMessage(RESPONSES.PROMPT_RESPONSE, {
|
|
2358
|
+
id,
|
|
2359
|
+
data: { canceled: true }
|
|
2360
|
+
});
|
|
2361
|
+
}
|
|
2362
|
+
};
|
|
2332
2363
|
handleInstallThirdPartyScriptRequest = (id, url, args = {}) => {
|
|
2333
2364
|
const type = getScriptIntegrationType(url);
|
|
2334
2365
|
if (!type) {
|
|
@@ -2577,8 +2608,8 @@ var runObjectExpression = async (expression, values) => {
|
|
|
2577
2608
|
};
|
|
2578
2609
|
|
|
2579
2610
|
// src/index.ts
|
|
2580
|
-
var version = "1.
|
|
2611
|
+
var version = "1.5.0-eea1ed9";
|
|
2581
2612
|
|
|
2582
2613
|
export { forceQualifiedUrl, getDisabledValue, getEnabledState, getHash, getLinkValue, getPluginSafeHTML, getQrCodeValue, getStableHash, isFlagEnabled, mergeConfig, pluginMapper, reduceEnabledResults, replaceConfigValues, runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version };
|
|
2583
|
-
//# sourceMappingURL=chunk-
|
|
2584
|
-
//# sourceMappingURL=chunk-
|
|
2614
|
+
//# sourceMappingURL=chunk-654TQCTD.js.map
|
|
2615
|
+
//# sourceMappingURL=chunk-654TQCTD.js.map
|