app-v3-scripts-editor 1.22.2 → 1.23.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/app-v3-scripts-editor.css +1 -1
- package/dist/app-v3-scripts-editor.es.js +68105 -48420
- package/dist/app-v3-scripts-editor.umd.js +308 -161
- package/dist/src/lib/components/Blocks/AIAgent/types.d.ts +2 -7
- package/dist/src/lib/components/Blocks/Notification/types.d.ts +2 -5
- package/dist/src/lib/components/Blocks/Schedule/types.d.ts +3 -7
- package/dist/src/lib/components/Selector/Option/variable.d.ts +8 -0
- package/dist/src/lib/components/Selector/User/variable.d.ts +7 -0
- package/dist/src/lib/components/Shared/GroupCondition/ConditionPropertySelect.d.ts +3 -2
- package/dist/src/lib/components/Shared/GroupCondition/index.css.d.ts +3 -0
- package/dist/src/lib/components/Shared/NodeActionButton/index.d.ts +2 -0
- package/dist/src/lib/components/Shared/NodeOrderNumber/index.css.d.ts +1 -0
- package/dist/src/lib/components/Shared/NodeOrderNumber/index.d.ts +7 -0
- package/dist/src/lib/components/Shared/SuggestVariableNode/dropdownTypeList.d.ts +24 -0
- package/dist/src/lib/components/Shared/SuggestVariableNode/flatten.d.ts +1 -1
- package/dist/src/lib/components/Shared/SuggestVariableNode/index.css.d.ts +4 -0
- package/dist/src/lib/components/Shared/SuggestVariableNode/index.d.ts +1 -2
- package/dist/src/lib/components/Shared/SuggestVariableNode/type.d.ts +19 -1
- package/dist/src/lib/components/Shared/SuggestVariableNode/utils.d.ts +6 -0
- package/dist/src/lib/components/Shared/Tiptap/index.css.d.ts +4 -0
- package/dist/src/lib/components/Shared/Tiptap/index.d.ts +2 -0
- package/dist/src/lib/components/Shared/Tiptap/use-variable-suggest-tiptap.d.ts +15 -0
- package/dist/src/lib/components/Shared/Tiptap/variable-extension.d.ts +2 -0
- package/dist/src/lib/components/Shared/Tiptap/variableNodeView.d.ts +2 -0
- package/dist/src/lib/components/Shared/VariableSuggestSelect/VariableTabMenu.d.ts +8 -0
- package/dist/src/lib/components/Shared/VariableSuggestSelect/constants.d.ts +9 -0
- package/dist/src/lib/components/Shared/VariableSuggestSelect/helpers.d.ts +28 -0
- package/dist/src/lib/components/Shared/VariableSuggestSelect/index.css.d.ts +11 -0
- package/dist/src/lib/components/Shared/VariableSuggestSelect/index.d.ts +4 -0
- package/dist/src/lib/components/Shared/VariableSuggestSelect/types.d.ts +22 -0
- package/dist/src/lib/components/Shared/VariableTag/index.css.d.ts +1 -0
- package/dist/src/lib/components/Shared/VariableTag/index.d.ts +11 -0
- package/dist/src/lib/constants/block-types.d.ts +4 -0
- package/dist/src/lib/constants/common.d.ts +2 -0
- package/dist/src/lib/hooks/use-alerts/utils/check-block-speak.d.ts +2 -1
- package/dist/src/lib/hooks/use-alerts/utils/check-block-transfer.d.ts +2 -1
- package/dist/src/lib/hooks/use-alerts/utils/check-deleted-variables.d.ts +13 -0
- package/dist/src/lib/hooks/use-get-variable-tip-tap-editor/index.d.ts +3 -0
- package/dist/src/lib/hooks/use-up-stream-node/index.d.ts +5 -1
- package/dist/src/lib/hooks/use-variable-suggest/index.d.ts +5 -4
- package/dist/src/lib/provider/node-base/index.d.ts +11 -0
- package/dist/src/lib/provider/variable-suggest-checkbox/CheckboxItems.d.ts +9 -0
- package/dist/src/lib/provider/variable-suggest-checkbox/CheckedMapContext.d.ts +10 -0
- package/dist/src/services/types.d.ts +7 -2
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Node, NodeProps } from '@xyflow/react';
|
|
2
|
+
import { INodeBaseType } from '../../../../services';
|
|
2
3
|
import { BlockTypeProps } from '../../../constants';
|
|
3
4
|
export declare enum AI_AGENT_ACTION_TYPE {
|
|
4
5
|
AI_AGENT = "AI_AGENT"
|
|
@@ -10,7 +11,7 @@ export declare const AIAgentTypeDescription: {
|
|
|
10
11
|
AI_AGENT: string;
|
|
11
12
|
};
|
|
12
13
|
export declare const AIAgentTypeList: AI_AGENT_ACTION_TYPE[];
|
|
13
|
-
export interface AIAgentNodeData extends Record<string, unknown> {
|
|
14
|
+
export interface AIAgentNodeData extends INodeBaseType, Record<string, unknown> {
|
|
14
15
|
title: string;
|
|
15
16
|
type: AI_AGENT_ACTION_TYPE;
|
|
16
17
|
model?: string;
|
|
@@ -20,12 +21,6 @@ export interface AIAgentNodeData extends Record<string, unknown> {
|
|
|
20
21
|
remember_recent?: number;
|
|
21
22
|
knowledge?: boolean;
|
|
22
23
|
output_format?: boolean;
|
|
23
|
-
output?: {
|
|
24
|
-
object: string;
|
|
25
|
-
name: string;
|
|
26
|
-
slug: string;
|
|
27
|
-
type: string;
|
|
28
|
-
}[];
|
|
29
24
|
tool?: boolean;
|
|
30
25
|
tool_list?: {
|
|
31
26
|
name: string;
|
|
@@ -2,22 +2,19 @@ import { Node, NodeProps } from '@xyflow/react';
|
|
|
2
2
|
import { INodeBaseType } from '../../../../services';
|
|
3
3
|
import { BlockTypeProps } from '../../../constants';
|
|
4
4
|
export declare enum NOTIFICATION_ACTION_TYPE {
|
|
5
|
-
SEND_IN_APP_WEB = "SEND_IN_APP_WEB"
|
|
6
|
-
TELEGRAM = "TELEGRAM"
|
|
5
|
+
SEND_IN_APP_WEB = "SEND_IN_APP_WEB"
|
|
7
6
|
}
|
|
8
7
|
export declare const NotificationTypeLabel: {
|
|
9
8
|
SEND_IN_APP_WEB: string;
|
|
10
|
-
TELEGRAM: string;
|
|
11
9
|
};
|
|
12
10
|
export declare const NotificationTypeDescription: {
|
|
13
11
|
SEND_IN_APP_WEB: string;
|
|
14
|
-
TELEGRAM: string;
|
|
15
12
|
};
|
|
16
13
|
export declare const NotificationTypeList: NOTIFICATION_ACTION_TYPE[];
|
|
17
14
|
export interface NotificationNodeData extends INodeBaseType, Record<string, unknown> {
|
|
18
15
|
title: string;
|
|
19
16
|
type: NOTIFICATION_ACTION_TYPE;
|
|
20
|
-
to: string;
|
|
17
|
+
to: string[];
|
|
21
18
|
subject: string;
|
|
22
19
|
content: string;
|
|
23
20
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Node, NodeProps } from '@xyflow/react';
|
|
2
|
-
import { BlockTypeProps } from '../../../constants';
|
|
3
2
|
import { default as dayjs } from 'dayjs';
|
|
3
|
+
import { INodeBaseType } from '../../../../services';
|
|
4
|
+
import { BlockTypeProps } from '../../../constants';
|
|
4
5
|
export declare enum SCHEDULE_ACTION_TYPE {
|
|
5
6
|
DAILY = "DAILY",
|
|
6
7
|
WEEKLY = "WEEKLY",
|
|
@@ -70,7 +71,7 @@ export declare const IntervalUnitsLabel: {
|
|
|
70
71
|
DAY: string;
|
|
71
72
|
};
|
|
72
73
|
export declare const IntervalUnitsList: INTERVAL_UNITS[];
|
|
73
|
-
export interface ScheduleNodeData extends Record<string, unknown> {
|
|
74
|
+
export interface ScheduleNodeData extends INodeBaseType, Record<string, unknown> {
|
|
74
75
|
title: string;
|
|
75
76
|
type: SCHEDULE_ACTION_TYPE;
|
|
76
77
|
config: {
|
|
@@ -85,11 +86,6 @@ export interface ScheduleNodeData extends Record<string, unknown> {
|
|
|
85
86
|
validity_type: SCHEDULE_VALIDITY_TYPE;
|
|
86
87
|
validity_end_date?: string | dayjs.Dayjs;
|
|
87
88
|
};
|
|
88
|
-
output: {
|
|
89
|
-
object: string;
|
|
90
|
-
slug: string;
|
|
91
|
-
type: string;
|
|
92
|
-
}[];
|
|
93
89
|
}
|
|
94
90
|
export type BlockScheduleProps = BlockTypeProps<ScheduleNodeData>;
|
|
95
91
|
export type ScheduleNodeProps = NodeProps<Node<ScheduleNodeData>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectProps } from 'antd';
|
|
2
|
+
import { IOptionValue } from '../../../../services';
|
|
3
|
+
type OptionVariableSelectorProps = {
|
|
4
|
+
dataDefault?: IOptionValue | IOptionValue[];
|
|
5
|
+
propertyId?: string;
|
|
6
|
+
} & SelectProps;
|
|
7
|
+
declare const OptionVariableSelector: React.FC<OptionVariableSelectorProps>;
|
|
8
|
+
export default OptionVariableSelector;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IProfile } from '../../../../services';
|
|
2
|
+
import { VariableSuggestSelectProps } from '../../Shared/VariableSuggestSelect';
|
|
3
|
+
type UserVariableSelectorProps = {
|
|
4
|
+
dataDefault?: IProfile | IProfile[];
|
|
5
|
+
} & Omit<VariableSuggestSelectProps, "options" | "defaultOptions" | "onSearch" | "tagRender">;
|
|
6
|
+
declare const UserVariableSelector: React.FC<UserVariableSelectorProps>;
|
|
7
|
+
export default UserVariableSelector;
|
|
@@ -4,6 +4,7 @@ interface Props {
|
|
|
4
4
|
idOptionValue?: string;
|
|
5
5
|
formItemName: (string | number)[];
|
|
6
6
|
parentName?: string;
|
|
7
|
+
remove: (index: number | number[]) => void;
|
|
7
8
|
}
|
|
8
|
-
declare const
|
|
9
|
-
export default
|
|
9
|
+
declare const _default: import('react').NamedExoticComponent<Props>;
|
|
10
|
+
export default _default;
|
|
@@ -9,3 +9,6 @@ export declare const GroupHeader: string;
|
|
|
9
9
|
export declare const AddConditionButton: string;
|
|
10
10
|
export declare const AddConditionText: string;
|
|
11
11
|
export declare const TextCenter: string;
|
|
12
|
+
export declare const ColDeleteButton: string;
|
|
13
|
+
export declare const deleteButton: string;
|
|
14
|
+
export declare const filterRow: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { INodeBaseType } from '../../../../services';
|
|
2
3
|
type NodeActionButtonContainerProps = {
|
|
3
4
|
id: string;
|
|
5
|
+
data: INodeBaseType & Record<string, unknown>;
|
|
4
6
|
};
|
|
5
7
|
declare const NodeActionButtonContainer: React.FC<NodeActionButtonContainerProps>;
|
|
6
8
|
export default NodeActionButtonContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const orderWrapperStyle: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
type NodeOrderNumberContainerProps = {
|
|
3
|
+
order?: number;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
};
|
|
6
|
+
declare const NodeOrderNumberContainer: React.FC<NodeOrderNumberContainerProps>;
|
|
7
|
+
export default NodeOrderNumberContainer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VariableGroupOption } from './type';
|
|
2
|
+
export interface DropdownTypeListConfig {
|
|
3
|
+
enableBulkSelect?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const DropdownTypeList: (opt: VariableGroupOption, config?: DropdownTypeListConfig) => {
|
|
6
|
+
key: string;
|
|
7
|
+
popupClassName: string;
|
|
8
|
+
label: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
children: ({
|
|
10
|
+
key: string;
|
|
11
|
+
label: import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
children: import('antd/es/menu/interface').ItemType[] | {
|
|
13
|
+
key: string;
|
|
14
|
+
selectable: boolean;
|
|
15
|
+
label: import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
}[];
|
|
17
|
+
popupClassName: string;
|
|
18
|
+
} | {
|
|
19
|
+
key: string;
|
|
20
|
+
label: import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
children?: undefined;
|
|
22
|
+
popupClassName?: undefined;
|
|
23
|
+
})[];
|
|
24
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IOutput } from '../../../../services';
|
|
2
2
|
import { VariableAutoCompleteOption } from './type';
|
|
3
|
-
export declare function buildVariableAutoCompleteOptions(nodes: IOutput["outputs"]
|
|
3
|
+
export declare function buildVariableAutoCompleteOptions(nodes: IOutput["outputs"]): VariableAutoCompleteOption[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { AutoCompleteProps } from 'antd';
|
|
2
2
|
import { UseVariableSuggestOptions } from './type';
|
|
3
|
-
|
|
4
|
-
export default SuggestVariableNodeContainer;
|
|
3
|
+
export default function SuggestVariableNodeWithProvider(props: UseVariableSuggestOptions & AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockType } from '../../../constants';
|
|
2
|
+
import { DATA_TYPE_PROPERTY, OUTPUT_MODE } from '../../../constants/common';
|
|
2
3
|
export interface VariableLeaf {
|
|
3
4
|
object: string;
|
|
5
|
+
objectLabel?: string;
|
|
4
6
|
type: DATA_TYPE_PROPERTY;
|
|
5
7
|
slug: string;
|
|
6
8
|
name?: string;
|
|
7
9
|
fullPath: string;
|
|
8
10
|
value: string;
|
|
11
|
+
order?: number;
|
|
12
|
+
node_type?: BlockType;
|
|
13
|
+
mode?: (typeof OUTPUT_MODE)[number];
|
|
14
|
+
isDeleted?: boolean;
|
|
9
15
|
}
|
|
10
16
|
export interface VariableOption {
|
|
11
17
|
value: string;
|
|
12
18
|
data: VariableLeaf;
|
|
13
19
|
}
|
|
14
20
|
export interface UseVariableSuggestOptions {
|
|
21
|
+
value?: string;
|
|
22
|
+
onChange?: (value: string) => void;
|
|
15
23
|
isCheckPrefix?: boolean;
|
|
24
|
+
filterTypes?: DATA_TYPE_PROPERTY[];
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
rows?: number;
|
|
27
|
+
onMultiSelect?: (value: string[]) => void;
|
|
16
28
|
}
|
|
17
29
|
export interface VariableGroupOption {
|
|
18
30
|
label: string;
|
|
31
|
+
type: string;
|
|
32
|
+
node_type?: BlockType;
|
|
33
|
+
order?: number;
|
|
19
34
|
options: VariableLeafOption[];
|
|
35
|
+
output_mode?: string[];
|
|
36
|
+
value?: string;
|
|
20
37
|
}
|
|
21
38
|
export interface VariableLeafOption {
|
|
22
39
|
value: string;
|
|
23
40
|
data: VariableLeaf;
|
|
41
|
+
output_mode?: string[];
|
|
24
42
|
}
|
|
25
43
|
export type VariableAutoCompleteOption = VariableGroupOption | VariableLeafOption;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MenuProps } from 'antd';
|
|
2
|
+
import { DATA_TYPE_PROPERTY } from '../../../constants/common';
|
|
3
|
+
import { VariableAutoCompleteOption, VariableLeafOption } from './type';
|
|
4
|
+
export declare function filterOptionTree(opt: VariableAutoCompleteOption, filterTypes?: DATA_TYPE_PROPERTY[]): VariableAutoCompleteOption | null;
|
|
5
|
+
export declare const buildMenuItem: (opt: VariableAutoCompleteOption, parentKey?: string) => MenuProps["items"][number];
|
|
6
|
+
export declare function collectLeafOptions(opt: VariableAutoCompleteOption, map: Map<string, VariableLeafOption>): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SuggestionKeyDownProps } from '@tiptap/suggestion';
|
|
2
|
+
import { VariableAutoCompleteOption } from '../SuggestVariableNode/type';
|
|
3
|
+
export interface TiptapSuggestionState {
|
|
4
|
+
items: VariableAutoCompleteOption[];
|
|
5
|
+
clientRect: (() => DOMRect) | null;
|
|
6
|
+
command: ((item: VariableAutoCompleteOption) => void) | null;
|
|
7
|
+
query: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const tiptapSuggestionBridge: {
|
|
10
|
+
notify: (state: TiptapSuggestionState | null, editorId: string) => void;
|
|
11
|
+
setKeyDownHandler: (editorId: string, fn: (props: SuggestionKeyDownProps) => boolean) => void;
|
|
12
|
+
handleKeyDown: (props: SuggestionKeyDownProps, editorId: string) => boolean;
|
|
13
|
+
remove: (editorId: string) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function useTiptapVariableSuggest(editorId: string): TiptapSuggestionState;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MenuProps } from 'antd';
|
|
2
|
+
type VariableTabMenuProps = {
|
|
3
|
+
items?: MenuProps["items"];
|
|
4
|
+
onClick: MenuProps["onClick"];
|
|
5
|
+
onOpenChange: NonNullable<MenuProps["onOpenChange"]>;
|
|
6
|
+
};
|
|
7
|
+
export declare const VariableTabMenu: ({ items, onClick, onOpenChange, }: VariableTabMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownTypeListConfig } from '../SuggestVariableNode/dropdownTypeList';
|
|
2
|
+
import { TabLabels } from './types';
|
|
3
|
+
export declare const TAB_KEYS: {
|
|
4
|
+
readonly DEFAULT: "default";
|
|
5
|
+
readonly VARIABLES: "variables";
|
|
6
|
+
};
|
|
7
|
+
export declare const DEFAULT_TAB_LABELS: Required<TabLabels>;
|
|
8
|
+
export declare const SEARCH_INTERACTION_GUARD_MS = 200;
|
|
9
|
+
export declare const BulkDisabledConfig: DropdownTypeListConfig;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SelectProps } from 'antd';
|
|
2
|
+
import { DefaultOptionType } from 'antd/es/select';
|
|
3
|
+
import { DATA_TYPE_PROPERTY } from '../../../constants/common';
|
|
4
|
+
import { VariableAutoCompleteOption, VariableLeaf, VariableLeafOption } from '../SuggestVariableNode/type';
|
|
5
|
+
import { VariableSelectLabeledValue, VariableSelectValue } from './types';
|
|
6
|
+
export declare const isLabeledValue: (value: unknown) => value is VariableSelectLabeledValue;
|
|
7
|
+
export declare const extractValueString: (value: unknown) => string;
|
|
8
|
+
export declare const readDisplayTitle: (option?: DefaultOptionType | VariableSelectLabeledValue) => string;
|
|
9
|
+
export declare function filterOptionsByKeyword(opt: VariableAutoCompleteOption, keyword: string): VariableAutoCompleteOption | null;
|
|
10
|
+
export declare const normalizeValues: (value?: VariableSelectValue) => string[];
|
|
11
|
+
export declare const buildVariableValueString: (data: VariableLeaf, mode?: string) => string;
|
|
12
|
+
export declare const parseVariableValue: (value: string) => {
|
|
13
|
+
object: string;
|
|
14
|
+
mode: string;
|
|
15
|
+
fullPath: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const buildVariableMeta: (option: VariableLeafOption, value?: string, mode?: string) => VariableLeaf;
|
|
18
|
+
export declare const buildDeletedVariableMeta: (value: string) => {
|
|
19
|
+
object: string;
|
|
20
|
+
type: DATA_TYPE_PROPERTY.singlelineproperty;
|
|
21
|
+
slug: string;
|
|
22
|
+
name: string;
|
|
23
|
+
fullPath: string;
|
|
24
|
+
value: string;
|
|
25
|
+
mode: VariableLeaf["mode"];
|
|
26
|
+
isDeleted: true;
|
|
27
|
+
};
|
|
28
|
+
export declare const buildOptionMap: (options?: SelectProps["options"]) => Map<string, DefaultOptionType>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Wrapper: string;
|
|
2
|
+
export declare const DropdownContainer: string;
|
|
3
|
+
export declare const TabsWrapper: string;
|
|
4
|
+
export declare const SingleValueSelected: string;
|
|
5
|
+
export declare const SingleValueOverlay: string;
|
|
6
|
+
export declare const SearchInputWrapper: string;
|
|
7
|
+
export declare const SearchInput: string;
|
|
8
|
+
export declare const TabPaneInner: string;
|
|
9
|
+
export declare const TabDivider: string;
|
|
10
|
+
export declare const VariableMenu: string;
|
|
11
|
+
export declare const EmptyState: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VariableSuggestSelectProps } from './types';
|
|
2
|
+
export declare const VariableSuggestSelect: ({ defaultOptions, variableFilterTypes, tabLabels, onVariableInsert, dropdownClassName, options, open: controlledOpen, onDropdownVisibleChange, onSearch: externalOnSearch, onChange: externalOnChange, getPopupContainer, showSearch, children, value: controlledValue, defaultValue, mode: selectMode, tagRender, className, labelInValue, onClear, ...restProps }: VariableSuggestSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default function VariableSuggestSelectWithProvider(props: VariableSuggestSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export type { TabKey, TabLabels, VariableSuggestSelectProps } from './types';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SelectProps } from 'antd';
|
|
2
|
+
import { DefaultOptionType } from 'antd/es/select';
|
|
3
|
+
import { DATA_TYPE_PROPERTY } from '../../../constants/common';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
export type TabKey = "default" | "variables";
|
|
6
|
+
export type TabLabels = {
|
|
7
|
+
defaultTab?: string;
|
|
8
|
+
variableTab?: string;
|
|
9
|
+
};
|
|
10
|
+
export type VariableSelectLabeledValue = {
|
|
11
|
+
key?: string;
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
title?: string;
|
|
14
|
+
value: string;
|
|
15
|
+
};
|
|
16
|
+
export type VariableSelectValue = string | string[] | VariableSelectLabeledValue | VariableSelectLabeledValue[];
|
|
17
|
+
export interface VariableSuggestSelectProps extends SelectProps<VariableSelectValue, DefaultOptionType> {
|
|
18
|
+
defaultOptions?: SelectProps["options"];
|
|
19
|
+
variableFilterTypes?: DATA_TYPE_PROPERTY[];
|
|
20
|
+
tabLabels?: TabLabels;
|
|
21
|
+
onVariableInsert?: (value: string) => void;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TagProps } from 'antd';
|
|
2
|
+
import { VariableLeaf } from '../SuggestVariableNode/type';
|
|
3
|
+
interface VariableTagProps {
|
|
4
|
+
data: VariableLeaf;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
closable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function VariableTag({ data, showTooltip, ...p }: VariableTagProps & TagProps & {
|
|
9
|
+
showTooltip?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AntdIconProps } from '@ant-design/icons/lib/components/AntdIcon';
|
|
2
|
+
import { IconProps } from 'iconsax-reactjs';
|
|
1
3
|
export declare enum BlockType {
|
|
2
4
|
AGENT = "AGENT",
|
|
3
5
|
START = "START",
|
|
@@ -41,3 +43,5 @@ export interface BlockTypeProps<T> {
|
|
|
41
43
|
mini?: boolean;
|
|
42
44
|
group?: boolean;
|
|
43
45
|
}
|
|
46
|
+
export declare const BlockTypeLabels: Record<BlockType, string>;
|
|
47
|
+
export declare const BlockTypeIcons: Record<BlockType, React.ComponentType<IconProps | Omit<AntdIconProps, "ref">>>;
|
|
@@ -148,3 +148,5 @@ export declare const CAMPAIGN_TYPE_NAME: Record<string, string>;
|
|
|
148
148
|
export declare const DATE_FORMAT_BY_OPERATOR: Record<string, string>;
|
|
149
149
|
export declare const iconPropertyMap: Record<DATA_TYPE_PROPERTY | string, any>;
|
|
150
150
|
export declare const operatorMap: Record<string, string>;
|
|
151
|
+
export declare const OUTPUT_MODE: string[];
|
|
152
|
+
export declare const OutputModeLabel: Record<(typeof OUTPUT_MODE)[number], string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SpeakNodeData } from '../../../components/Blocks/Speak/types';
|
|
2
|
-
|
|
2
|
+
import { AlertCheckContext } from './check-deleted-variables';
|
|
3
|
+
declare const checkBlockSpeak: (data: SpeakNodeData, context: AlertCheckContext) => {
|
|
3
4
|
errors: any[];
|
|
4
5
|
infos: any[];
|
|
5
6
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TransferNodeData } from '../../../components/Blocks/Transfer/types';
|
|
2
|
-
|
|
2
|
+
import { AlertCheckContext } from './check-deleted-variables';
|
|
3
|
+
declare const checkBlockTransfer: (data: TransferNodeData, context: AlertCheckContext) => {
|
|
3
4
|
errors: any[];
|
|
4
5
|
infos: any[];
|
|
5
6
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Edge, Node } from '@xyflow/react';
|
|
2
|
+
type AlertItem = {
|
|
3
|
+
code: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
export type AlertCheckContext = {
|
|
8
|
+
nodeId: string;
|
|
9
|
+
nodes: Node[];
|
|
10
|
+
edges: Edge[];
|
|
11
|
+
};
|
|
12
|
+
export declare const checkDeletedVariablesInNodeData: (data: unknown, context: AlertCheckContext) => AlertItem[];
|
|
13
|
+
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { VariableLeafOption } from '../../components/Shared/SuggestVariableNode/type';
|
|
2
|
+
declare const useUpstreamNodes: (nodeId?: string) => {
|
|
3
|
+
optionsData: import('../../components/Shared/SuggestVariableNode/type').VariableAutoCompleteOption[];
|
|
4
|
+
optionMap: Map<string, VariableLeafOption>;
|
|
5
|
+
};
|
|
2
6
|
export default useUpstreamNodes;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AutoCompleteProps } from 'antd';
|
|
2
|
-
import { UseVariableSuggestOptions } from '../../components/Shared/SuggestVariableNode/type';
|
|
3
|
-
export declare function useVariableSuggest(
|
|
2
|
+
import { UseVariableSuggestOptions, VariableAutoCompleteOption } from '../../components/Shared/SuggestVariableNode/type';
|
|
3
|
+
export declare function useVariableSuggest(optionsData: VariableAutoCompleteOption[], options?: UseVariableSuggestOptions & AutoCompleteProps): {
|
|
4
4
|
value: any;
|
|
5
5
|
open: boolean;
|
|
6
|
-
options:
|
|
6
|
+
options: VariableAutoCompleteOption[];
|
|
7
7
|
bindInput: {
|
|
8
8
|
ref: import('react').RefObject<HTMLInputElement>;
|
|
9
9
|
value: any;
|
|
@@ -11,7 +11,8 @@ export declare function useVariableSuggest(upstreamNodes: any[], options?: UseVa
|
|
|
11
11
|
onClick: (e: any) => void;
|
|
12
12
|
status: "" | "warning" | "error";
|
|
13
13
|
onFocus: () => void;
|
|
14
|
-
onBlurCapture: () => void;
|
|
15
14
|
};
|
|
16
15
|
onSelect: (text: string, option: any) => void;
|
|
16
|
+
setOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
17
|
+
updateValue: (next: string) => void;
|
|
17
18
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface NodeBaseContextValue {
|
|
2
|
+
isHovered: boolean;
|
|
3
|
+
setIsHovered: React.Dispatch<React.SetStateAction<boolean>>;
|
|
4
|
+
isPopupDeleteOpen: boolean;
|
|
5
|
+
setIsPopupDeleteOption: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const NodeBaseProvider: ({ children, }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const useNodeBase: () => NodeBaseContextValue;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CheckAllCheckbox: ({ groupKey, allKeys, }: {
|
|
2
|
+
groupKey: string;
|
|
3
|
+
allKeys: string[];
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const CheckboxItem: ({ groupKey, uniqueKey, label, }: {
|
|
6
|
+
groupKey: string;
|
|
7
|
+
uniqueKey: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface CheckedMapContextValue {
|
|
2
|
+
checkedMap: Record<string, string[]>;
|
|
3
|
+
updateChecked: (groupKey: string, fn: (prev: string[]) => string[]) => void;
|
|
4
|
+
getCheckedKeys: (groupKey: string) => string[];
|
|
5
|
+
}
|
|
6
|
+
export declare const VariableSuggestCheckedProvider: ({ children, }: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const useCheckedMap: () => CheckedMapContextValue;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { BlockType } from '../lib';
|
|
2
3
|
import { AI_MODEL } from '../lib/constants/ai-model';
|
|
3
4
|
import { DATA_TYPE_PROPERTY, DATA_TYPE_PROPERTY_V2 } from '../lib/constants/common';
|
|
4
5
|
import { NODE_STATUS } from './../lib/constants/common';
|
|
@@ -11,6 +12,7 @@ export interface INodeBaseType {
|
|
|
11
12
|
input_data?: Record<string, any>;
|
|
12
13
|
output_data?: Record<string, any>;
|
|
13
14
|
status?: NODE_STATUS;
|
|
15
|
+
order?: number;
|
|
14
16
|
}
|
|
15
17
|
export interface IPaginationInputs {
|
|
16
18
|
pagination?: {
|
|
@@ -141,7 +143,7 @@ export interface IFilter {
|
|
|
141
143
|
type?: string;
|
|
142
144
|
slug?: string;
|
|
143
145
|
name?: string;
|
|
144
|
-
value?: string | string[] | Dayjs | {
|
|
146
|
+
value?: string | string[] | Dayjs | IFilterPropertyValueObj | IFilterPropertyValueObj[] | {
|
|
145
147
|
id: string;
|
|
146
148
|
name?: string;
|
|
147
149
|
slug: string;
|
|
@@ -265,8 +267,11 @@ export interface IOutput {
|
|
|
265
267
|
options: IOptionValue[];
|
|
266
268
|
structure?: IOutput["outputs"];
|
|
267
269
|
object?: string;
|
|
270
|
+
node_type?: BlockType;
|
|
271
|
+
order?: number;
|
|
272
|
+
output_mode?: string[];
|
|
268
273
|
}[];
|
|
269
|
-
|
|
274
|
+
output_mode?: string[];
|
|
270
275
|
}
|
|
271
276
|
export type IListTypeInputOption = {
|
|
272
277
|
value?: string;
|