app-v3-scripts-editor 1.29.3 → 1.30.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/app-v3-scripts-editor.css +1 -1
- package/dist/app-v3-scripts-editor.es.js +26809 -26113
- package/dist/app-v3-scripts-editor.umd.js +176 -176
- package/dist/src/lib/components/Scripts/components/shortcut-settings/ShortcutSettingsModal.d.ts +9 -0
- package/dist/src/lib/components/Shared/Controls/CustomFlowControls.d.ts +16 -1
- package/dist/src/lib/constants/initial-script.d.ts +6 -3
- package/dist/src/lib/constants/intents.d.ts +7 -7
- package/dist/src/lib/hooks/use-keyboard-shortcuts/index.d.ts +12 -0
- package/dist/src/lib/hooks/use-keyboard-shortcuts/shortcuts.d.ts +40 -0
- package/dist/src/lib/utils/node-intent-condition.d.ts +2 -1
- package/dist/src/services/intent/useCreateIntent.d.ts +1 -1
- package/dist/src/services/intent/useGetInifiniteIntent.d.ts +10 -0
- package/dist/src/services/intent/useGetListIntent.d.ts +5 -6
- package/dist/src/services/intent/useUpdateIntent.d.ts +1 -1
- package/dist/src/services/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/src/lib/components/Scripts/components/shortcut-settings/ShortcutSettingsModal.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShortcutSettingsV1 } from '../../../../hooks/use-keyboard-shortcuts';
|
|
2
|
+
type ShortcutSettingsModalProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
value: ShortcutSettingsV1;
|
|
5
|
+
onSave: (settings: ShortcutSettingsV1) => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const ShortcutSettingsModal: ({ open, value, onSave, onCancel, }: ShortcutSettingsModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ShortcutSettingsModal;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { InteractionMode } from '../../../hooks/use-interaction-mode/interactionMode.store';
|
|
2
|
+
type CustomFlowControlsContainerProps = {
|
|
3
|
+
canUndo: boolean;
|
|
4
|
+
canRedo: boolean;
|
|
5
|
+
onUndo: () => void;
|
|
6
|
+
onRedo: () => void;
|
|
7
|
+
onLayout: () => void;
|
|
8
|
+
onFitView: () => void;
|
|
9
|
+
onZoomOut: () => void;
|
|
10
|
+
onZoomIn: () => void;
|
|
11
|
+
interactionMode: InteractionMode;
|
|
12
|
+
onToggleInteractionMode: () => void;
|
|
13
|
+
isReadOnly: boolean;
|
|
14
|
+
onOpenShortcutSettings: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const CustomFlowControlsContainer: import('react').MemoExoticComponent<(props: CustomFlowControlsContainerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
2
17
|
export default CustomFlowControlsContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Edge, Node } from '@xyflow/react';
|
|
2
|
-
import { SPEAK_TYPE, TRANSFER_TYPE } from './block-types';
|
|
2
|
+
import { BlockType, SPEAK_TYPE, TRANSFER_TYPE } from './block-types';
|
|
3
3
|
export declare const initialTitles: {
|
|
4
4
|
AGENT: string;
|
|
5
5
|
SPEAK: string;
|
|
@@ -26,10 +26,11 @@ export declare const initialTitles: {
|
|
|
26
26
|
export declare const initialData: {
|
|
27
27
|
AGENT: {
|
|
28
28
|
conditions: {
|
|
29
|
-
|
|
29
|
+
label: string;
|
|
30
30
|
description: string;
|
|
31
31
|
keywords: string;
|
|
32
32
|
id: string;
|
|
33
|
+
slug: string;
|
|
33
34
|
is_conversion: boolean;
|
|
34
35
|
}[];
|
|
35
36
|
};
|
|
@@ -55,10 +56,11 @@ export declare const initialData: {
|
|
|
55
56
|
};
|
|
56
57
|
LISTEN: {
|
|
57
58
|
conditions: {
|
|
58
|
-
|
|
59
|
+
label: string;
|
|
59
60
|
description: string;
|
|
60
61
|
keywords: string;
|
|
61
62
|
id: string;
|
|
63
|
+
slug: string;
|
|
62
64
|
is_conversion: boolean;
|
|
63
65
|
}[];
|
|
64
66
|
maximum_retry: number;
|
|
@@ -119,6 +121,7 @@ export declare const initialData: {
|
|
|
119
121
|
filter_type: string;
|
|
120
122
|
};
|
|
121
123
|
};
|
|
124
|
+
export declare const getInitialData: (blockType: BlockType) => any;
|
|
122
125
|
export declare const initialNodes: Node[];
|
|
123
126
|
export declare const initialEdges: Edge[];
|
|
124
127
|
export declare const initialNodeProps: {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
export declare const INTENTS: {
|
|
2
2
|
INTERESTED: {
|
|
3
|
-
|
|
3
|
+
label: string;
|
|
4
4
|
description: string;
|
|
5
5
|
keywords: string;
|
|
6
6
|
};
|
|
7
7
|
NOT_INTERESTED: {
|
|
8
|
-
|
|
8
|
+
label: string;
|
|
9
9
|
description: string;
|
|
10
10
|
keywords: string;
|
|
11
11
|
};
|
|
12
12
|
NOT_HEARD: {
|
|
13
|
-
|
|
13
|
+
label: string;
|
|
14
14
|
description: string;
|
|
15
15
|
keywords: string;
|
|
16
16
|
};
|
|
17
17
|
BUSY: {
|
|
18
|
-
|
|
18
|
+
label: string;
|
|
19
19
|
description: string;
|
|
20
20
|
keywords: string;
|
|
21
21
|
};
|
|
22
22
|
SILENT: {
|
|
23
|
-
|
|
23
|
+
label: string;
|
|
24
24
|
description: string;
|
|
25
25
|
keywords: string;
|
|
26
26
|
};
|
|
27
27
|
UNRECOGNIZED: {
|
|
28
|
-
|
|
28
|
+
label: string;
|
|
29
29
|
description: string;
|
|
30
30
|
keywords: string;
|
|
31
31
|
};
|
|
32
32
|
DEFAULT: {
|
|
33
|
-
|
|
33
|
+
label: string;
|
|
34
34
|
description: string;
|
|
35
35
|
keywords: string;
|
|
36
36
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InstanceContextProps } from '../../provider/instance-context';
|
|
2
|
+
import { ShortcutActionId, ShortcutBindings } from './shortcuts';
|
|
3
|
+
export type ShortcutActionHandlers = Partial<Record<ShortcutActionId, () => void>>;
|
|
4
|
+
type UseKeyboardShortcutsOptions = {
|
|
5
|
+
mode: InstanceContextProps["mode"];
|
|
6
|
+
bindings: ShortcutBindings;
|
|
7
|
+
handlers: ShortcutActionHandlers;
|
|
8
|
+
suspended?: boolean;
|
|
9
|
+
onReadonlyActionBlocked?: (actionId: ShortcutActionId) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const useKeyboardShortcuts: ({ mode, bindings, handlers, suspended, onReadonlyActionBlocked, }: UseKeyboardShortcutsOptions) => void;
|
|
12
|
+
export * from './shortcuts';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type ShortcutActionId = "undo" | "redo" | "zoomIn" | "zoomOut" | "fitView" | "autoLayout" | "deleteSelection" | "toggleInteractionMode";
|
|
2
|
+
export type ShortcutBindings = Record<ShortcutActionId, string>;
|
|
3
|
+
export type ShortcutSettingsV1 = {
|
|
4
|
+
version: 1;
|
|
5
|
+
bindings: ShortcutBindings;
|
|
6
|
+
};
|
|
7
|
+
export type ShortcutActionMeta = {
|
|
8
|
+
id: ShortcutActionId;
|
|
9
|
+
label: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
export type ParsedShortcutBinding = {
|
|
13
|
+
mod: boolean;
|
|
14
|
+
shift: boolean;
|
|
15
|
+
alt: boolean;
|
|
16
|
+
key: string;
|
|
17
|
+
};
|
|
18
|
+
export type ShortcutValidationResult = {
|
|
19
|
+
isValid: boolean;
|
|
20
|
+
errors: Partial<Record<ShortcutActionId, string>>;
|
|
21
|
+
normalizedBindings: ShortcutBindings;
|
|
22
|
+
};
|
|
23
|
+
export declare const SHORTCUT_STORAGE_KEY = "scripts-editor.shortcuts.v1";
|
|
24
|
+
export declare const SHORTCUT_ACTIONS: ShortcutActionMeta[];
|
|
25
|
+
export declare const DEFAULT_SHORTCUT_BINDINGS: ShortcutBindings;
|
|
26
|
+
export declare const REPEATABLE_SHORTCUT_ACTIONS: Set<ShortcutActionId>;
|
|
27
|
+
export declare const INPUT_ALLOWED_SHORTCUT_ACTIONS: Set<ShortcutActionId>;
|
|
28
|
+
export declare const READONLY_BLOCKED_SHORTCUT_ACTIONS: Set<ShortcutActionId>;
|
|
29
|
+
export declare const parseShortcutBinding: (binding: string) => ParsedShortcutBinding | null;
|
|
30
|
+
export declare const hasRequiredShortcutModifier: (parsed: ParsedShortcutBinding) => boolean;
|
|
31
|
+
export declare const serializeShortcutBinding: (parsed: ParsedShortcutBinding) => string;
|
|
32
|
+
export declare const normalizeShortcutBinding: (binding: string) => string | null;
|
|
33
|
+
export declare const buildShortcutBindingFromKeyboardEvent: (event: KeyboardEvent) => string | null;
|
|
34
|
+
export declare const isShortcutEventMatch: (event: KeyboardEvent, binding: ParsedShortcutBinding) => boolean;
|
|
35
|
+
export declare const formatShortcutBinding: (binding: string) => string;
|
|
36
|
+
export declare const normalizeShortcutBindings: (bindings?: Partial<Record<ShortcutActionId, string>>) => ShortcutBindings;
|
|
37
|
+
export declare const validateShortcutBindings: (bindings: Partial<Record<ShortcutActionId, string>>) => ShortcutValidationResult;
|
|
38
|
+
export declare const getDefaultShortcutSettings: () => ShortcutSettingsV1;
|
|
39
|
+
export declare const loadShortcutSettings: () => ShortcutSettingsV1;
|
|
40
|
+
export declare const saveShortcutSettings: (settings: ShortcutSettingsV1) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { IIntent } from '../../services';
|
|
2
|
-
export type NodeIntentCondition = Pick<IIntent, "id" | "
|
|
2
|
+
export type NodeIntentCondition = Pick<IIntent, "id" | "slug" | "label" | "description" | "keywords" | "is_conversion">;
|
|
3
3
|
export declare const pickNodeIntentCondition: (intent: IIntent) => NodeIntentCondition;
|
|
4
|
+
export declare const getNodeIntentConditionHandleId: (intent: Pick<IIntent, "id" | "slug">) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosError, AxiosResponse } from 'axios';
|
|
2
2
|
import { IIntent } from '../../lib';
|
|
3
|
-
type Variables = Pick<IIntent, "
|
|
3
|
+
type Variables = Pick<IIntent, "label" | "description" | "keywords" | "is_conversion"> & {
|
|
4
4
|
SCENARIO_ID: string;
|
|
5
5
|
};
|
|
6
6
|
declare function useCreateIntent(): import('@tanstack/react-query').UseMutationResult<AxiosResponse<IIntent, any>, AxiosError<unknown, any>, Variables, unknown>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AxiosError, AxiosResponse } from 'axios';
|
|
2
|
+
import { IIntent, IPagination } from '../../lib';
|
|
3
|
+
export declare const getInfiniteIntentQueryKey: (COMPANY_ID?: string, SCENARIO_ID?: string, pageSize?: number) => readonly (number | string | undefined)[];
|
|
4
|
+
type Props = {
|
|
5
|
+
SCENARIO_ID: string;
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
};
|
|
9
|
+
declare function useGetInfiniteIntent({ SCENARIO_ID, enabled, pageSize, }: Props): import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/react-query').InfiniteData<AxiosResponse<IPagination<IIntent>, any>, unknown>, AxiosError<unknown, any>>;
|
|
10
|
+
export default useGetInfiniteIntent;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { AxiosError, AxiosResponse } from 'axios';
|
|
2
|
-
import { IIntent } from '../../lib';
|
|
3
|
-
export declare const getListIntentQueryKey: (COMPANY_ID?: string, SCENARIO_ID?: string) => readonly [
|
|
4
|
-
|
|
5
|
-
SCENARIO_ID: string;
|
|
2
|
+
import { IIntent, IPagination, IPaginationInputs } from '../../lib';
|
|
3
|
+
export declare const getListIntentQueryKey: (COMPANY_ID?: string, SCENARIO_ID?: string, options?: Pick<IPaginationInputs, "pagination" | "currentFilters">) => readonly unknown[];
|
|
4
|
+
declare function useGetListIntent({ currentFilters, pagination, enabled, SCENARIO_ID, }: IPaginationInputs & {
|
|
6
5
|
enabled?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
SCENARIO_ID: string;
|
|
7
|
+
}): import('@tanstack/react-query').UseQueryResult<AxiosResponse<IPagination<IIntent>, any>, AxiosError<unknown, any>>;
|
|
9
8
|
export default useGetListIntent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosError, AxiosResponse } from 'axios';
|
|
2
2
|
import { IIntent } from '../types';
|
|
3
|
-
type Variables = Pick<IIntent, "
|
|
3
|
+
type Variables = Pick<IIntent, "label" | "description" | "keywords" | "is_conversion"> & {
|
|
4
4
|
SCENARIO_ID: string;
|
|
5
5
|
INTENT_ID: string;
|
|
6
6
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
2
|
import { BlockType } from '../lib';
|
|
3
3
|
import { AI_MODEL } from '../lib/constants/ai-model';
|
|
4
|
-
import { DATA_TYPE_PROPERTY, DATA_TYPE_PROPERTY_V2 } from '../lib/constants/common';
|
|
5
4
|
import { NODE_STATUS } from './../lib/constants/common';
|
|
5
|
+
import { DATA_TYPE_PROPERTY, DATA_TYPE_PROPERTY_V2 } from '../lib/constants/common';
|
|
6
6
|
export interface INodeBaseType {
|
|
7
7
|
output?: IOutput["outputs"];
|
|
8
8
|
variables?: {
|
|
@@ -366,7 +366,7 @@ export interface FilterFieldsCallCampaignType {
|
|
|
366
366
|
export interface IIntent {
|
|
367
367
|
id?: string | number;
|
|
368
368
|
slug?: string;
|
|
369
|
-
|
|
369
|
+
label?: string;
|
|
370
370
|
description?: string;
|
|
371
371
|
keywords?: string;
|
|
372
372
|
is_conversion?: boolean;
|