@kizenapps/engine 1.9.3 → 1.10.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-BkCjYWLd.d.ts → ThirdPartyScript-DxPk6YJY.d.ts} +16 -4
- package/dist/{automation-BuZbZjRB.d.ts → automation-WGLB_R74.d.ts} +1 -1
- package/dist/{blocks-1HdzUin7.d.ts → blocks-BOnF4OcC.d.ts} +2 -2
- package/dist/{chunk-ZJEUSM6D.js → chunk-634UTGPV.js} +3 -3
- package/dist/{chunk-ZJEUSM6D.js.map → chunk-634UTGPV.js.map} +1 -1
- package/dist/{chunk-I6M7IOUN.js → chunk-A35SDJRQ.js} +31 -9
- package/dist/chunk-A35SDJRQ.js.map +1 -0
- package/dist/{chunk-Z5EJLAOV.js → chunk-IAFKDUUO.js} +3 -3
- package/dist/{chunk-Z5EJLAOV.js.map → chunk-IAFKDUUO.js.map} +1 -1
- package/dist/{chunk-KOHHWIU2.js → chunk-JWNY3CVG.js} +3 -3
- package/dist/{chunk-KOHHWIU2.js.map → chunk-JWNY3CVG.js.map} +1 -1
- package/dist/{chunk-QL5TKJNY.js → chunk-NY7WM2BO.js} +5 -5
- package/dist/{chunk-QL5TKJNY.js.map → chunk-NY7WM2BO.js.map} +1 -1
- package/dist/{chunk-3DIQOQD4.js → chunk-RK33JALB.js} +3 -3
- package/dist/{chunk-3DIQOQD4.js.map → chunk-RK33JALB.js.map} +1 -1
- package/dist/{chunk-LBQKIZYB.js → chunk-TXMNM4A6.js} +3 -3
- package/dist/{chunk-LBQKIZYB.js.map → chunk-TXMNM4A6.js.map} +1 -1
- package/dist/{chunk-DEQQUMNQ.js → chunk-XNFBWPQ7.js} +12 -3
- package/dist/chunk-XNFBWPQ7.js.map +1 -0
- package/dist/{chunk-CDGV5N5I.js → chunk-ZZ75DJI4.js} +4 -4
- package/dist/{chunk-CDGV5N5I.js.map → chunk-ZZ75DJI4.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 -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/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/react.d.ts +18 -16
- package/dist/react.js +28 -12
- package/dist/react.js.map +1 -1
- package/dist/types.d.ts +5 -5
- package/dist/util.d.ts +28 -6
- package/dist/util.js +62 -10
- package/dist/util.js.map +1 -1
- package/dist/{values-08CsQDfa.d.ts → values-ClHf3SXM.d.ts} +4 -3
- package/dist/workers/calendarSource.worker.js +6 -6
- 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-DEQQUMNQ.js.map +0 -1
- package/dist/chunk-I6M7IOUN.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { FloatingFrameWorkerContext } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { FloatingFrameWorkerContext } from '../chunk-ZZ75DJI4.js';
|
|
2
|
+
import '../chunk-NY7WM2BO.js';
|
|
3
|
+
import '../chunk-XNFBWPQ7.js';
|
|
4
|
+
import '../chunk-TXMNM4A6.js';
|
|
5
|
+
import '../chunk-634UTGPV.js';
|
|
6
6
|
import '../chunk-5WRI5ZAA.js';
|
|
7
7
|
//# sourceMappingURL=floatingFrame.js.map
|
|
8
8
|
//# sourceMappingURL=floatingFrame.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkerContextArgs, P as PartialEntity, a as PartialCustomObject } from '../ThirdPartyScript-
|
|
1
|
+
import { W as WorkerContextArgs, P as PartialEntity, a as PartialCustomObject } from '../ThirdPartyScript-DxPk6YJY.js';
|
|
2
2
|
import { BaseWorkerContext } from './base.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../communication.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { RecordDetailWorkerContext } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { RecordDetailWorkerContext } from '../chunk-RK33JALB.js';
|
|
2
|
+
import '../chunk-NY7WM2BO.js';
|
|
3
|
+
import '../chunk-XNFBWPQ7.js';
|
|
4
|
+
import '../chunk-TXMNM4A6.js';
|
|
5
|
+
import '../chunk-634UTGPV.js';
|
|
6
6
|
import '../chunk-5WRI5ZAA.js';
|
|
7
7
|
//# sourceMappingURL=recordDetail.js.map
|
|
8
8
|
//# sourceMappingURL=recordDetail.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { U as UnknownJSON, s as SelectOption } from './ThirdPartyScript-
|
|
2
|
-
export { r as AppPlugin,
|
|
3
|
-
import { d as RunScriptOptions } from './automation-
|
|
4
|
-
export { e as AuthorizeEvent, A as AutomationStepConfig, B as BaseEvent, f as CalendarDefinition, g as CalendarScriptReturnData, C as CalendarSourceConfig, h as CalendarSourceMap, i as CalendarSources, j as CloseModalRequestEvent, b as CommonExecutionPlugin, c as CommonPluginDefinition, k as CommunicateEvent, l as CompleteSetupRequestEvent, m as ConsoleLogEvent, n as CopyToClipboardEvent, o as CreateFileIdFn, D as DataAdornmentConfig, p as DoneEvent, q as DynamicPromptRequestEvent, E as ErrorEvent, r as ExecuteCalendarSourceScript, s as ExecuteFloatingFrameScript, F as FloatingFrameConfig, t as FloatingFrameEmployeeConfig, u as FrameQuadrant, G as GetPendingCacheCountFn, H as HideEvent, v as HostCompleteSetupFn, I as IframeOutputEvent, w as InstallThirdPartyScriptRequestEvent, x as InvalidateCacheFn, K as KizenFile, M as MessageEventData, y as MinimizedConfig, O as OnClearToastsFn, z as OnCompleteSetupFn, J as OnConsoleLogFn, L as OnNetworkRequestFn, N as OnRunEventScriptFn, P as OnShowToastFn, Q as OpenCreateRecordModalRequestEvent, S as OpenCreateRelatedRecordModalRequestEvent, U as OpenWindowEvent, V as PerformKizenFileUploadFn, W as PostFormDataRequestEvent, X as PromptRequestEvent, Y as QueryRequestEvent, Z as RecipientConfig, _ as RefreshEntityEvent, $ as RefreshTimelineEvent, a0 as RequestableQueryMethods, R as RoutablePageConfig, a as RouteScriptConfig, a1 as RunEventScriptEvent, a2 as SchemaValidation, a3 as SetStateEvent, a4 as ShowEvent, a5 as ShowToastEvent, a6 as ShowViewInModalRequestEvent, a7 as TerminatorContent, a8 as Terminators, T as ToolbarItemConfig, a9 as UIOutputEvent, aa as UpdateSessionDataEvent, ab as UploadFilePayload, ac as UploadFileRequestEvent, ad as WindowPosition } from './automation-
|
|
1
|
+
import { U as UnknownJSON, s as SelectOption } from './ThirdPartyScript-DxPk6YJY.js';
|
|
2
|
+
export { t as ApiKeyValueStore, r as AppPlugin, u as AppPlugins, A as Args, v as AssistantConfigAction, w as AssistantField, x as AssistantLink, B as BaseAPI, y as BooleanCleanValue, z as BooleanValueStore, E as ButtonConfig, F as CleanValueStore, H as CleanValueStoreType, K as CloseModalFn, L as CompleteSetupFn, N as CompleteSetupLevel, j as CompleteSetupOptions, O as ConfigService, o as ConsoleBridge, Q as ConsoleLogLevel, V as CreateRecordModalQueue, X as CreateRelatedRecordModalQueue, C as CurrentUser, Y as CurriedCloseModalFn, Z as CurriedCompleteSetupFn, _ as CurriedDynamicPromptFn, $ as CurriedInstallThirdPartyScriptFn, a0 as CurriedKizenRequestFn, a1 as CurriedOpenCreateRecordFn, a2 as CurriedOpenCreateRelatedRecordFn, a3 as CurriedPostFormDataFn, a4 as CurriedPromptFn, a5 as CurriedRefreshEntityFn, a6 as CurriedShowViewInModalFn, a7 as CurriedUploadFileFn, a8 as CustomObjectCleanValue, a9 as CustomObjectValueStore, D as DataCache, aa as DataCacheEntry, ab as DeleteReturnValue, n as DynamicPromptConfig, ac as DynamicPromptFn, ad as EmployeeConfig, ae as ErrorHandler, af as ErrorResponse, ag as FieldCleanValue, ah as FieldValueStore, G as GetOptions, ai as GetReturnValue, p as IncludeOption, aj as InstallThirdPartyScriptFn, I as Instance, h as InternalSessionData, ak as JSONArray, al as JSONObject, am as JSONPrimitive, J as JSONValue, an as KizenConfig, ao as KizenNetworkResponse, ap as KizenProxySuccessResponse, aq as KizenRequestFn, ar as KizenRequestFnHandler, as as KnownArgs, at as MatchSetupAssistantField, au as MaybeMessageError, av as ModalBlock, aw as ModalCancelEventSource, M as ModalConfig, ax as ModalContainer, ay as ModalQueue, az as ModalSize, aA as NumberCleanValue, aB as NumberValueStore, aC as OnCloseModalFn, aD as OnNetworkErrorFn, aE as OnShowCreateRecordModalFn, aF as OnShowCreateRelatedRecordModalFn, aG as OnShowModalFn, aH as OpenCreateRecordFn, aI as OpenCreateRelatedRecordFn, d as PartialBusiness, e as PartialClientObject, a as PartialCustomObject, P as PartialEntity, i as PartialLocation, aJ as PartialRelatedObject, c as PartialTeamMember, b as PartialUser, aK as PatchReturnValue, f as PostFormDataFn, aL as PostFormDataPayload, aM as PostReturnValue, aN as Profile, aO as PromiseMap, aP as PromiseReject, aQ as PromiseResolve, aR as PromiseState, aS as PromptFn, g as PromptState, aT as PutReturnValue, aU as RadioCleanValue, aV as RadioValueStore, aW as RefreshEntityFn, aX as ReleaseBlockingScriptHandler, k as RequestOptions, R as RequestWithErrorsResponse, aY as SelectCleanValue, aZ as SelectValueStore, a_ as SetInternalSessionDataFn, a$ as SetupAssistantConfig, q as SetupAssistantField, l as ShowToastOptions, b0 as ShowViewInModalFn, m as ShowViewInModalOptions, S as StateChangePayload, b1 as TextValueStore, b2 as UnknownFunction, b3 as UploadFileData, b4 as UploadFileFn, b5 as UserConfig, b6 as ValueStore, W as WorkerContextArgs, b7 as modalSize } from './ThirdPartyScript-DxPk6YJY.js';
|
|
3
|
+
import { d as RunScriptOptions } from './automation-WGLB_R74.js';
|
|
4
|
+
export { e as AuthorizeEvent, A as AutomationStepConfig, B as BaseEvent, f as CalendarDefinition, g as CalendarScriptReturnData, C as CalendarSourceConfig, h as CalendarSourceMap, i as CalendarSources, j as CloseModalRequestEvent, b as CommonExecutionPlugin, c as CommonPluginDefinition, k as CommunicateEvent, l as CompleteSetupRequestEvent, m as ConsoleLogEvent, n as CopyToClipboardEvent, o as CreateFileIdFn, D as DataAdornmentConfig, p as DoneEvent, q as DynamicPromptRequestEvent, E as ErrorEvent, r as ExecuteCalendarSourceScript, s as ExecuteFloatingFrameScript, F as FloatingFrameConfig, t as FloatingFrameEmployeeConfig, u as FrameQuadrant, G as GetPendingCacheCountFn, H as HideEvent, v as HostCompleteSetupFn, I as IframeOutputEvent, w as InstallThirdPartyScriptRequestEvent, x as InvalidateCacheFn, K as KizenFile, M as MessageEventData, y as MinimizedConfig, O as OnClearToastsFn, z as OnCompleteSetupFn, J as OnConsoleLogFn, L as OnNetworkRequestFn, N as OnRunEventScriptFn, P as OnShowToastFn, Q as OpenCreateRecordModalRequestEvent, S as OpenCreateRelatedRecordModalRequestEvent, U as OpenWindowEvent, V as PerformKizenFileUploadFn, W as PostFormDataRequestEvent, X as PromptRequestEvent, Y as QueryRequestEvent, Z as RecipientConfig, _ as RefreshEntityEvent, $ as RefreshTimelineEvent, a0 as RequestableQueryMethods, R as RoutablePageConfig, a as RouteScriptConfig, a1 as RunEventScriptEvent, a2 as SchemaValidation, a3 as SetStateEvent, a4 as ShowEvent, a5 as ShowToastEvent, a6 as ShowViewInModalRequestEvent, a7 as TerminatorContent, a8 as Terminators, T as ToolbarItemConfig, a9 as UIOutputEvent, aa as UpdateSessionDataEvent, ab as UploadFilePayload, ac as UploadFileRequestEvent, ad as WindowPosition } from './automation-WGLB_R74.js';
|
|
5
5
|
export { AsyncFunctionConstructor, BuiltAsyncFn, CompleteSetupResponsePayload, CreateRecordResponsePayload, CreateRelatedRecordResponsePayload, ExpressionPayload, FunctionWithReturn, InstallThirdPartyScriptResponsePayload, ObjectSettingsMenuItemConfig, PostFormDataResponsePayload, PromptResponsePayload, QueryResponsePayload, RefreshEntityResponsePayload, UploadFileResponsePayload, WorkerEvent, WorkerSetup } from './types.js';
|
|
6
6
|
export { H as HideConfig, S as ShowConfig } from './floatingFrames-BzaoL7cq.js';
|
|
7
|
-
export { B as BlockConfig, a as BlockType, E as ExecuteGenericScript, G as GenericPluginConfig } from './blocks-
|
|
7
|
+
export { B as BlockConfig, a as BlockType, E as ExecuteGenericScript, G as GenericPluginConfig } from './blocks-BOnF4OcC.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import './frames-AOHUyPDP.js';
|
|
10
10
|
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { clearNavigationContext, consumeNavigationContext, modalSize, readNavigationContext, runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { clearNavigationContext, consumeNavigationContext, modalSize, readNavigationContext, runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version } from './chunk-A35SDJRQ.js';
|
|
2
|
+
import './chunk-IAFKDUUO.js';
|
|
3
|
+
import './chunk-XNFBWPQ7.js';
|
|
4
|
+
import './chunk-634UTGPV.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,9 +1,9 @@
|
|
|
1
|
-
import { f as CalendarDefinition, C as CalendarSourceConfig, h as CalendarSourceMap, i as CalendarSources, P as OnShowToastFn, r as ExecuteCalendarSourceScript, F as FloatingFrameConfig, s as ExecuteFloatingFrameScript, R as RoutablePageConfig, ad as WindowPosition, t as FloatingFrameEmployeeConfig, v as HostCompleteSetupFn, L as OnNetworkRequestFn, o as CreateFileIdFn, V as PerformKizenFileUploadFn, G as GetPendingCacheCountFn, x as InvalidateCacheFn, a as RouteScriptConfig } from './automation-
|
|
2
|
-
import {
|
|
3
|
-
import { G as GenericPluginConfig, E as ExecuteGenericScript, B as BlockConfig } from './blocks-
|
|
1
|
+
import { f as CalendarDefinition, C as CalendarSourceConfig, h as CalendarSourceMap, i as CalendarSources, P as OnShowToastFn, r as ExecuteCalendarSourceScript, F as FloatingFrameConfig, s as ExecuteFloatingFrameScript, R as RoutablePageConfig, ad as WindowPosition, t as FloatingFrameEmployeeConfig, v as HostCompleteSetupFn, L as OnNetworkRequestFn, o as CreateFileIdFn, V as PerformKizenFileUploadFn, G as GetPendingCacheCountFn, x as InvalidateCacheFn, a as RouteScriptConfig } from './automation-WGLB_R74.js';
|
|
2
|
+
import { u as AppPlugins, W as WorkerContextArgs, bb as INDICATOR_TYPE, U as UnknownJSON, b as PartialUser, c as PartialTeamMember, d as PartialBusiness, e as PartialClientObject, aw as ModalCancelEventSource, M as ModalConfig, aC as OnCloseModalFn, a$ as SetupAssistantConfig, v as AssistantConfigAction, J as JSONValue, w as AssistantField } from './ThirdPartyScript-DxPk6YJY.js';
|
|
3
|
+
import { G as GenericPluginConfig, E as ExecuteGenericScript, B as BlockConfig } from './blocks-BOnF4OcC.js';
|
|
4
4
|
import { RefObject, JSX, ForwardedRef, ReactNode, FC, SetStateAction } from 'react';
|
|
5
5
|
import { B as BuildIframeURLWithProxyOptions } from './frames-AOHUyPDP.js';
|
|
6
|
-
import { R as RemovedHTML } from './values-
|
|
6
|
+
import { R as RemovedHTML } from './values-ClHf3SXM.js';
|
|
7
7
|
import './floatingFrames-BzaoL7cq.js';
|
|
8
8
|
import 'dompurify';
|
|
9
9
|
|
|
@@ -74,8 +74,8 @@ declare const useRecordDetailCustomScript: ({ entityId, objectId, onError, scrip
|
|
|
74
74
|
interface PluginCustomHTML {
|
|
75
75
|
scopedCss: string;
|
|
76
76
|
sanitizedHtml: string | null;
|
|
77
|
-
outputUIRef: RefObject<HTMLDivElement>;
|
|
78
|
-
interactableScriptRef: RefObject<HTMLDivElement>;
|
|
77
|
+
outputUIRef: RefObject<HTMLDivElement | null>;
|
|
78
|
+
interactableScriptRef: RefObject<HTMLDivElement | null>;
|
|
79
79
|
}
|
|
80
80
|
declare const useAppCustomHTML: (currentPage?: FloatingFrameConfig | RoutablePageConfig, args?: UnknownJSON, frameOptions?: BuildIframeURLWithProxyOptions) => PluginCustomHTML;
|
|
81
81
|
|
|
@@ -91,11 +91,11 @@ declare const useManualInteraction: (execute: ExecuteFloatingFrameScript | Execu
|
|
|
91
91
|
declare const useAppCallback: (search: string) => void;
|
|
92
92
|
|
|
93
93
|
interface UsePluginEngineReturn {
|
|
94
|
-
scriptUIRef: React.RefObject<HTMLDivElement>;
|
|
95
|
-
outputUIRef: React.RefObject<HTMLDivElement>;
|
|
94
|
+
scriptUIRef: React.RefObject<HTMLDivElement | null>;
|
|
95
|
+
outputUIRef: React.RefObject<HTMLDivElement | null>;
|
|
96
96
|
scopedCss: string;
|
|
97
97
|
sanitizedHtml: string | null;
|
|
98
|
-
interactableScriptRef: React.RefObject<HTMLDivElement>;
|
|
98
|
+
interactableScriptRef: React.RefObject<HTMLDivElement | null>;
|
|
99
99
|
iframeURL?: string | undefined;
|
|
100
100
|
pending: boolean;
|
|
101
101
|
collectFormData: () => CollectedFormDataResponse;
|
|
@@ -165,10 +165,10 @@ interface UseFloatingFrameResult {
|
|
|
165
165
|
hideHeader?: boolean | undefined;
|
|
166
166
|
isFixed: boolean;
|
|
167
167
|
isCircle: boolean;
|
|
168
|
-
outputUIRef: RefObject<HTMLDivElement>;
|
|
168
|
+
outputUIRef: RefObject<HTMLDivElement | null>;
|
|
169
169
|
scopedCss: string;
|
|
170
170
|
sanitizedHtml: string | null;
|
|
171
|
-
interactableScriptRef: RefObject<HTMLDivElement>;
|
|
171
|
+
interactableScriptRef: RefObject<HTMLDivElement | null>;
|
|
172
172
|
tooltipPosition: 'top' | 'left' | 'bottom';
|
|
173
173
|
currentPluginId?: string | undefined;
|
|
174
174
|
setMinimized: (minimized: boolean) => void;
|
|
@@ -177,7 +177,7 @@ interface UseFloatingFrameResult {
|
|
|
177
177
|
script: string | undefined;
|
|
178
178
|
dragging: boolean;
|
|
179
179
|
frameOffset: number;
|
|
180
|
-
scriptUIRef: RefObject<HTMLDivElement> | undefined;
|
|
180
|
+
scriptUIRef: RefObject<HTMLDivElement | null> | undefined;
|
|
181
181
|
}
|
|
182
182
|
declare const useFloatingFrame: (params: UseFloatingFrameArgs, options?: BuildIframeURLWithProxyOptions) => UseFloatingFrameResult;
|
|
183
183
|
|
|
@@ -189,9 +189,9 @@ interface UseCustomBlockArgs {
|
|
|
189
189
|
onError?: (error: unknown) => void;
|
|
190
190
|
}
|
|
191
191
|
interface UseCustomBlockResult {
|
|
192
|
-
scriptUIRef: RefObject<HTMLDivElement>;
|
|
193
|
-
outputUIRef: RefObject<HTMLDivElement>;
|
|
194
|
-
interactableScriptRef: RefObject<HTMLDivElement>;
|
|
192
|
+
scriptUIRef: RefObject<HTMLDivElement | null>;
|
|
193
|
+
outputUIRef: RefObject<HTMLDivElement | null>;
|
|
194
|
+
interactableScriptRef: RefObject<HTMLDivElement | null>;
|
|
195
195
|
scopedCss: string;
|
|
196
196
|
sanitizedHtml: string | null;
|
|
197
197
|
iframeURL?: string | undefined;
|
|
@@ -386,7 +386,7 @@ interface CustomObjectDetails {
|
|
|
386
386
|
displayName: string;
|
|
387
387
|
}[];
|
|
388
388
|
}
|
|
389
|
-
declare const SetupAssistantController: ({ children, config, value, onStateChange, disabledKeys, templateAssociationsByActionApiName, getObjectByAPIName, getCustomObjectDetails, }: {
|
|
389
|
+
declare const SetupAssistantController: ({ children, config, value, onStateChange, disabledKeys, templateAssociationsByActionApiName, getObjectByAPIName, getCustomObjectDetails, plan, entitlements, }: {
|
|
390
390
|
children: React.ReactNode;
|
|
391
391
|
config: SetupAssistantConfig;
|
|
392
392
|
value?: Record<string, UnknownJSON>;
|
|
@@ -398,6 +398,8 @@ declare const SetupAssistantController: ({ children, config, value, onStateChang
|
|
|
398
398
|
object_name: string;
|
|
399
399
|
}[] | undefined>;
|
|
400
400
|
getCustomObjectDetails: (objectId: string) => Promise<CustomObjectDetails>;
|
|
401
|
+
plan?: Record<string, Record<string, JSONValue>>;
|
|
402
|
+
entitlements?: Record<string, JSONValue>;
|
|
401
403
|
}) => ReactNode;
|
|
402
404
|
declare const useSetupAssistant: () => SetupAssistantContextValue;
|
|
403
405
|
|
package/dist/react.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { runScript, getPluginSafeHTML, getStableHash, readNavigationContext, clearNavigationContext, runExpression, isFlagEnabled } from './chunk-
|
|
1
|
+
import { runScript, getPluginSafeHTML, getStableHash, readNavigationContext, clearNavigationContext, flattenReservedState, runExpression, replaceConfigValues, isFlagEnabled } from './chunk-A35SDJRQ.js';
|
|
2
2
|
import './chunk-LGJYUPYZ.js';
|
|
3
|
-
import { generateExecutionKey } from './chunk-
|
|
4
|
-
import { buildIframeURLWithProxy, unwrapProxyMessage, getAllNestedInputsFromConfig, getActionFieldKey, getFieldFromAction, getActionMenuFieldKey } from './chunk-
|
|
5
|
-
import { runFrameScriptEventName, runBlockScriptEventName } from './chunk-
|
|
6
|
-
import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-
|
|
3
|
+
import { generateExecutionKey } from './chunk-IAFKDUUO.js';
|
|
4
|
+
import { buildIframeURLWithProxy, unwrapProxyMessage, getAllNestedInputsFromConfig, getActionFieldKey, getFieldFromAction, getActionMenuFieldKey } from './chunk-XNFBWPQ7.js';
|
|
5
|
+
import { runFrameScriptEventName, runBlockScriptEventName } from './chunk-TXMNM4A6.js';
|
|
6
|
+
import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-634UTGPV.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';
|
|
@@ -2487,6 +2487,14 @@ var doesValueExist = (field, value) => {
|
|
|
2487
2487
|
return consideredValue.length > 0;
|
|
2488
2488
|
}
|
|
2489
2489
|
return Boolean(value?.value?.value);
|
|
2490
|
+
} else if (field.type === "radio") {
|
|
2491
|
+
return Boolean(value?.value?.value);
|
|
2492
|
+
} else if (field.type === "api_key") {
|
|
2493
|
+
if (value?.hasValue) {
|
|
2494
|
+
return true;
|
|
2495
|
+
}
|
|
2496
|
+
const consideredValue = value?.value ?? "";
|
|
2497
|
+
return Boolean(consideredValue.trim());
|
|
2490
2498
|
} else if (field.type === "boolean") {
|
|
2491
2499
|
return Boolean(value?.value);
|
|
2492
2500
|
}
|
|
@@ -2546,9 +2554,15 @@ var SetupAssistantController = ({
|
|
|
2546
2554
|
disabledKeys,
|
|
2547
2555
|
templateAssociationsByActionApiName,
|
|
2548
2556
|
getObjectByAPIName,
|
|
2549
|
-
getCustomObjectDetails
|
|
2557
|
+
getCustomObjectDetails,
|
|
2558
|
+
plan,
|
|
2559
|
+
entitlements
|
|
2550
2560
|
}) => {
|
|
2551
2561
|
const [_rawState, _setState] = useState(value ?? {});
|
|
2562
|
+
const reservedState = useMemo(
|
|
2563
|
+
() => flattenReservedState(plan, entitlements),
|
|
2564
|
+
[plan, entitlements]
|
|
2565
|
+
);
|
|
2552
2566
|
const flattenedFields = useMemo(() => {
|
|
2553
2567
|
return getAllNestedInputsFromConfig(config);
|
|
2554
2568
|
}, [config]);
|
|
@@ -2813,9 +2827,10 @@ var SetupAssistantController = ({
|
|
|
2813
2827
|
resetIdleTimeout();
|
|
2814
2828
|
setWaitingExpressions((prev) => ({ ...prev, [key]: true }));
|
|
2815
2829
|
setExpressionsStarted(true);
|
|
2816
|
-
const result = await runExpression(expression, {
|
|
2830
|
+
const result = await runExpression(replaceConfigValues(expression), {
|
|
2817
2831
|
...defaultState,
|
|
2818
|
-
...state
|
|
2832
|
+
...state,
|
|
2833
|
+
...reservedState
|
|
2819
2834
|
});
|
|
2820
2835
|
setExpressionResults((prev) => {
|
|
2821
2836
|
if (prev[key] === false && typeof result === "boolean" && result) {
|
|
@@ -2828,7 +2843,7 @@ var SetupAssistantController = ({
|
|
|
2828
2843
|
setWaitingExpressions((prev) => ({ ...prev, [key]: false }));
|
|
2829
2844
|
return result;
|
|
2830
2845
|
},
|
|
2831
|
-
[state, resetIdleTimeout, handleReinferObjectByKey, defaultState]
|
|
2846
|
+
[state, resetIdleTimeout, handleReinferObjectByKey, defaultState, reservedState]
|
|
2832
2847
|
);
|
|
2833
2848
|
if (!hasRunInference.current) {
|
|
2834
2849
|
hasRunInference.current = true;
|
|
@@ -2925,9 +2940,10 @@ var SetupAssistantController = ({
|
|
|
2925
2940
|
if (!field.when) {
|
|
2926
2941
|
return field;
|
|
2927
2942
|
}
|
|
2928
|
-
const isVisible = await runExpression(field.when, {
|
|
2943
|
+
const isVisible = await runExpression(replaceConfigValues(field.when), {
|
|
2929
2944
|
...defaultState,
|
|
2930
|
-
...state
|
|
2945
|
+
...state,
|
|
2946
|
+
...reservedState
|
|
2931
2947
|
});
|
|
2932
2948
|
return isVisible ? field : null;
|
|
2933
2949
|
})
|
|
@@ -2965,7 +2981,7 @@ var SetupAssistantController = ({
|
|
|
2965
2981
|
isValid: errorCount === 0,
|
|
2966
2982
|
includedKeys: fieldsToCheck.map((f) => f?.key).filter((k) => Boolean(k))
|
|
2967
2983
|
};
|
|
2968
|
-
}, [state, flattenedFields, defaultState]);
|
|
2984
|
+
}, [state, flattenedFields, defaultState, reservedState]);
|
|
2969
2985
|
useEffect(() => {
|
|
2970
2986
|
resetIdleTimeout();
|
|
2971
2987
|
}, [resetIdleTimeout]);
|