app-v3-scripts-editor 1.16.1 → 1.17.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.
Files changed (40) hide show
  1. package/dist/app-v3-scripts-editor.css +1 -1
  2. package/dist/app-v3-scripts-editor.es.js +26972 -25703
  3. package/dist/app-v3-scripts-editor.umd.js +144 -145
  4. package/dist/src/lib/components/Blocks/Contact/action/setting/Output.d.ts +5 -0
  5. package/dist/src/lib/components/Blocks/Contact/action/types.d.ts +25 -10
  6. package/dist/src/lib/components/Blocks/Contact/trigger/types.d.ts +3 -3
  7. package/dist/src/lib/components/Blocks/Email/types.d.ts +3 -3
  8. package/dist/src/lib/components/Blocks/Notification/types.d.ts +3 -3
  9. package/dist/src/lib/components/Blocks/Schedule/block.d.ts +3 -0
  10. package/dist/src/lib/components/Blocks/Schedule/index.css.d.ts +17 -0
  11. package/dist/src/lib/components/Blocks/Schedule/index.d.ts +4 -0
  12. package/dist/src/lib/components/Blocks/Schedule/index.settings.d.ts +3 -0
  13. package/dist/src/lib/components/Blocks/Schedule/node.d.ts +3 -0
  14. package/dist/src/lib/components/Blocks/Schedule/setting/Action.d.ts +4 -0
  15. package/dist/src/lib/components/Blocks/Schedule/setting/Output.d.ts +5 -0
  16. package/dist/src/lib/components/Blocks/Schedule/setting/Setting.d.ts +4 -0
  17. package/dist/src/lib/components/Blocks/Schedule/types.d.ts +91 -0
  18. package/dist/src/lib/components/Scripts/types.d.ts +1 -0
  19. package/dist/src/lib/components/Selector/Option/v2.d.ts +8 -0
  20. package/dist/src/lib/components/Shared/FieldSetting/index.d.ts +1 -0
  21. package/dist/src/lib/components/Shared/FieldSetting/inputByType.d.ts +8 -0
  22. package/dist/src/lib/components/Shared/FieldSetting/item.d.ts +12 -0
  23. package/dist/src/lib/components/Shared/FilterColorOption/index.d.ts +6 -0
  24. package/dist/src/lib/components/Shared/SuggestVariableNode/flatten.d.ts +3 -0
  25. package/dist/src/lib/components/Shared/SuggestVariableNode/index.d.ts +2 -5
  26. package/dist/src/lib/components/Shared/SuggestVariableNode/type.d.ts +25 -0
  27. package/dist/src/lib/constants/block-types.d.ts +2 -1
  28. package/dist/src/lib/constants/common.d.ts +31 -2
  29. package/dist/src/lib/constants/date-time.d.ts +3 -0
  30. package/dist/src/lib/constants/initial-script.d.ts +2 -0
  31. package/dist/src/lib/constants/node-types.d.ts +2 -1
  32. package/dist/src/lib/constants/sidebar-buttons.d.ts +2 -1
  33. package/dist/src/lib/hooks/use-variable-suggest/index.d.ts +17 -0
  34. package/dist/src/lib/provider/instance-context/index.d.ts +1 -0
  35. package/dist/src/lib/utils/common.d.ts +8 -3
  36. package/dist/src/services/option/useInfiniteOptionV2.d.ts +9 -0
  37. package/dist/src/services/output/useGetOutput.d.ts +5 -1
  38. package/dist/src/services/property/useGetAllPropertyV2.d.ts +5 -0
  39. package/dist/src/services/types.d.ts +66 -1
  40. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ type ContactActionOutputContainerProps = {
2
+ id: string;
3
+ };
4
+ declare const ContactActionOutputContainer: React.FC<ContactActionOutputContainerProps>;
5
+ export default ContactActionOutputContainer;
@@ -1,22 +1,23 @@
1
1
  import { Node, NodeProps } from '@xyflow/react';
2
2
  import { IFilter } from '../../../../../services';
3
3
  import { BlockTypeProps } from '../../../../constants';
4
- export declare enum CONTACT_ACTION_TYPE {
4
+ import { DATA_TYPE_PROPERTY_V2 } from '../../../../constants/common';
5
+ export declare enum ACTION_CONTACT_TYPE {
5
6
  CREATE = "CREATE",
6
- READ = "READ",
7
+ GET = "GET",
7
8
  UPDATE = "UPDATE"
8
9
  }
9
10
  export declare const ContactActionTypeLabel: {
10
11
  CREATE: string;
11
12
  UPDATE: string;
12
- READ: string;
13
+ GET: string;
13
14
  };
14
15
  export declare const ContactActionTypeDescription: {
15
16
  CREATE: string;
16
17
  UPDATE: string;
17
- READ: string;
18
+ GET: string;
18
19
  };
19
- export declare const ContactActionTypeList: CONTACT_ACTION_TYPE[];
20
+ export declare const ContactActionTypeList: ACTION_CONTACT_TYPE[];
20
21
  interface ContactActionGroup {
21
22
  object?: string;
22
23
  filter_type?: "AND" | "OR";
@@ -24,11 +25,25 @@ interface ContactActionGroup {
24
25
  }
25
26
  export interface ContactActionNodeData extends Record<string, unknown> {
26
27
  title: string;
27
- type: CONTACT_ACTION_TYPE;
28
- setting: {
29
- filter_type?: "AND" | "OR";
30
- groups?: ContactActionGroup[];
31
- };
28
+ type: ACTION_CONTACT_TYPE;
29
+ filter_type?: "AND" | "OR";
30
+ groups?: ContactActionGroup[];
31
+ object?: string;
32
+ update_fields?: {
33
+ id?: string;
34
+ slug?: string;
35
+ name?: string;
36
+ value?: any;
37
+ type?: DATA_TYPE_PROPERTY_V2;
38
+ reference_type?: boolean;
39
+ }[];
40
+ output?: {
41
+ id: string;
42
+ name: string;
43
+ slug: string;
44
+ type: string;
45
+ object?: string;
46
+ }[];
32
47
  }
33
48
  export type BlockContactActionProps = BlockTypeProps<ContactActionNodeData>;
34
49
  export type ContactActionNodeProps = NodeProps<Node<ContactActionNodeData>>;
@@ -2,9 +2,9 @@ import { Node, NodeProps } from '@xyflow/react';
2
2
  import { IFilterGroup } from '../../../../../services';
3
3
  import { BlockTypeProps } from '../../../../constants';
4
4
  export declare enum CONTACT_TRIGGER_TYPE {
5
- CREATE = "created",
6
- UPDATE = "updated",
7
- DELETE = "deleted",
5
+ CREATED = "created",
6
+ UPDATED = "updated",
7
+ DELETED = "deleted",
8
8
  TIME = "TIME"
9
9
  }
10
10
  export declare const ContactTriggerTypeLabel: {
@@ -1,13 +1,13 @@
1
1
  import { Node, NodeProps } from '@xyflow/react';
2
2
  import { BlockTypeProps } from '../../../constants';
3
3
  export declare enum EMAIL_ACTION_TYPE {
4
- SEND = "SEND"
4
+ SEND_MAIL = "SEND_MAIL"
5
5
  }
6
6
  export declare const EmailTypeLabel: {
7
- SEND: string;
7
+ SEND_MAIL: string;
8
8
  };
9
9
  export declare const EmailTypeDescription: {
10
- SEND: string;
10
+ SEND_MAIL: string;
11
11
  };
12
12
  export declare const EmailTypeList: EMAIL_ACTION_TYPE[];
13
13
  export interface EmailNodeData extends Record<string, unknown> {
@@ -1,15 +1,15 @@
1
1
  import { Node, NodeProps } from '@xyflow/react';
2
2
  import { BlockTypeProps } from '../../../constants';
3
3
  export declare enum NOTIFICATION_ACTION_TYPE {
4
- IN_APP = "IN_APP",
4
+ SEND_IN_APP_WEB = "SEND_IN_APP_WEB",
5
5
  TELEGRAM = "TELEGRAM"
6
6
  }
7
7
  export declare const NotificationTypeLabel: {
8
- IN_APP: string;
8
+ SEND_IN_APP_WEB: string;
9
9
  TELEGRAM: string;
10
10
  };
11
11
  export declare const NotificationTypeDescription: {
12
- IN_APP: string;
12
+ SEND_IN_APP_WEB: string;
13
13
  TELEGRAM: string;
14
14
  };
15
15
  export declare const NotificationTypeList: NOTIFICATION_ACTION_TYPE[];
@@ -0,0 +1,3 @@
1
+ import { BlockScheduleProps } from './types';
2
+ declare const BlockSchedule: ({ id, data, mini }: BlockScheduleProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default BlockSchedule;
@@ -0,0 +1,17 @@
1
+ export declare const wrapper: string;
2
+ export declare const container: string;
3
+ export declare const iconWrapper: string;
4
+ export declare const iconPrimaryStyle: string;
5
+ export declare const iconAbsoluteStyle: string;
6
+ export declare const settingsContainer: string;
7
+ export declare const alertGroup: string;
8
+ export declare const radioGroup: string;
9
+ export declare const radioSpace: string;
10
+ export declare const radioItem: string;
11
+ export declare const radioContent: string;
12
+ export declare const checkIconWrapper: string;
13
+ export declare const triangle: string;
14
+ export declare const checkIcon: string;
15
+ export declare const emailTypeGroup: string;
16
+ export declare const radioButton: string;
17
+ export declare const radioCol: string;
@@ -0,0 +1,4 @@
1
+ import { default as BlockSchedule } from './block';
2
+ import { default as ScheduleNode } from './node';
3
+ export default ScheduleNode;
4
+ export { BlockSchedule };
@@ -0,0 +1,3 @@
1
+ export declare const ScheduleNodeSettings: ({ id }: {
2
+ id: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { BlockScheduleProps } from './types';
2
+ declare const ScheduleNode: React.FC<BlockScheduleProps>;
3
+ export default ScheduleNode;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type ScheduleActionContainerProps = {};
3
+ declare const ScheduleActionContainer: React.FC<ScheduleActionContainerProps>;
4
+ export default ScheduleActionContainer;
@@ -0,0 +1,5 @@
1
+ type ScheduleOutputContainerProps = {
2
+ id: string;
3
+ };
4
+ declare const ScheduleOutputContainer: React.FC<ScheduleOutputContainerProps>;
5
+ export default ScheduleOutputContainer;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type ScheduleSettingContainerProps = {};
3
+ declare const ScheduleSettingContainer: React.FC<ScheduleSettingContainerProps>;
4
+ export default ScheduleSettingContainer;
@@ -0,0 +1,91 @@
1
+ import { Node, NodeProps } from '@xyflow/react';
2
+ import { BlockTypeProps } from '../../../constants';
3
+ import { default as dayjs } from 'dayjs';
4
+ export declare enum SCHEDULE_ACTION_TYPE {
5
+ DAILY = "DAILY",
6
+ WEEKLY = "WEEKLY",
7
+ MONTHLY = "MONTHLY",
8
+ PERIODIC = "PERIODIC"
9
+ }
10
+ export declare enum SCHEDULE_VALIDITY_TYPE {
11
+ DEFAULT_2_YEARS = "DEFAULT_2_YEARS",
12
+ CUSTOM = "CUSTOM"
13
+ }
14
+ export declare enum DAYS_OF_WEEK {
15
+ MON = "MON",
16
+ TUE = "TUE",
17
+ WED = "WED",
18
+ THU = "THU",
19
+ FRI = "FRI",
20
+ SAT = "SAT",
21
+ SUN = "SUN"
22
+ }
23
+ export declare enum MONTHLY_DAY_TYPES {
24
+ FIRST_DAY = "FIRST_DAY",
25
+ LAST_DAY = "LAST_DAY",
26
+ CUSTOM = "CUSTOM"
27
+ }
28
+ export declare enum INTERVAL_UNITS {
29
+ MINUTES = "MINUTES",
30
+ HOURS = "HOURS",
31
+ DAYS = "DAYS"
32
+ }
33
+ export declare const ScheduleTypeLabel: {
34
+ DAILY: string;
35
+ WEEKLY: string;
36
+ MONTHLY: string;
37
+ PERIODIC: string;
38
+ };
39
+ export declare const ScheduleTypeDescription: {
40
+ DAILY: string;
41
+ WEEKLY: string;
42
+ MONTHLY: string;
43
+ PERIODIC: string;
44
+ };
45
+ export declare const ScheduleTypeList: SCHEDULE_ACTION_TYPE[];
46
+ export declare const ScheduleValidityTypeLabel: {
47
+ DEFAULT_2_YEARS: string;
48
+ CUSTOM: string;
49
+ };
50
+ export declare const ScheduleValidityTypeList: SCHEDULE_VALIDITY_TYPE[];
51
+ export declare const DayOfWeekLabel: {
52
+ MON: string;
53
+ FRI: string;
54
+ TUE: string;
55
+ SAT: string;
56
+ WED: string;
57
+ SUN: string;
58
+ THU: string;
59
+ };
60
+ export declare const DayOfWeekList: DAYS_OF_WEEK[];
61
+ export declare const MonthlyDayTypesLabel: {
62
+ FIRST_DAY: string;
63
+ LAST_DAY: string;
64
+ CUSTOM: string;
65
+ };
66
+ export declare const MonthlyDayTypesList: MONTHLY_DAY_TYPES[];
67
+ export declare const IntervalUnitsLabel: {
68
+ MINUTES: string;
69
+ HOURS: string;
70
+ DAYS: string;
71
+ };
72
+ export declare const IntervalUnitsList: INTERVAL_UNITS[];
73
+ export interface ScheduleNodeData extends Record<string, unknown> {
74
+ title: string;
75
+ type: SCHEDULE_ACTION_TYPE;
76
+ trigger_time?: string | dayjs.Dayjs;
77
+ validity_type: SCHEDULE_VALIDITY_TYPE;
78
+ validity_end_date?: string | dayjs.Dayjs;
79
+ days_of_week?: DAYS_OF_WEEK[];
80
+ month_day_type: MONTHLY_DAY_TYPES;
81
+ specific_day?: number;
82
+ interval_value?: number;
83
+ interval_unit?: INTERVAL_UNITS;
84
+ output: {
85
+ object: string;
86
+ slug: string;
87
+ type: string;
88
+ }[];
89
+ }
90
+ export type BlockScheduleProps = BlockTypeProps<ScheduleNodeData>;
91
+ export type ScheduleNodeProps = NodeProps<Node<ScheduleNodeData>>;
@@ -39,5 +39,6 @@ export interface ScriptEditorInterface {
39
39
  export interface ScriptEditorProps {
40
40
  onAlertsChange?: (values: UseErrorsAndInfosReturn) => void;
41
41
  type: "autocall" | "autoflow";
42
+ onReady?: (ready: boolean) => void;
42
43
  }
43
44
  export type { EdgeProps, GlobalSettingData, Node, ReactFlowJsonObject };
@@ -0,0 +1,8 @@
1
+ import { SelectProps } from 'antd';
2
+ import { IOptionValue } from '../../../../services';
3
+ type OptionSelectorV2Props = {
4
+ dataDefault?: IOptionValue | IOptionValue[];
5
+ propertyId?: string;
6
+ } & SelectProps;
7
+ declare const OptionSelectorV2: React.FC<OptionSelectorV2Props>;
8
+ export default OptionSelectorV2;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  type FieldSettingContainerProps = {
3
3
  title: string;
4
+ formListName: string;
4
5
  model: "contact" | "enterprise" | "crmdeal" | "crmorder" | "crmproduct" | "ticket";
5
6
  };
6
7
  declare const FieldSettingContainer: React.FC<FieldSettingContainerProps>;
@@ -0,0 +1,8 @@
1
+ import { FormItemProps } from 'antd/es/form';
2
+ import { default as React } from 'react';
3
+ import { IPropertyV2 } from '../../../../services';
4
+ type InputByTypeContainerProps = {
5
+ property: IPropertyV2;
6
+ } & FormItemProps;
7
+ declare const InputByTypeContainer: React.FC<InputByTypeContainerProps>;
8
+ export default InputByTypeContainer;
@@ -0,0 +1,12 @@
1
+ import { FormListFieldData, FormListOperation } from 'antd';
2
+ import { default as React } from 'react';
3
+ import { IPropertyV2 } from '../../../../services';
4
+ type FieldSettingItemContainerProps = {
5
+ field: FormListFieldData;
6
+ index: number;
7
+ remove: FormListOperation["remove"];
8
+ allProperty: IPropertyV2[];
9
+ formListName: string;
10
+ };
11
+ declare const FieldSettingItemContainer: React.FC<FieldSettingItemContainerProps>;
12
+ export default FieldSettingItemContainer;
@@ -0,0 +1,6 @@
1
+ import { IOptionValue } from '../../../../services';
2
+ declare const useFilterColorOptionV2: (optionValue: IOptionValue[]) => {
3
+ value: string;
4
+ label: import("react/jsx-runtime").JSX.Element;
5
+ }[];
6
+ export default useFilterColorOptionV2;
@@ -0,0 +1,3 @@
1
+ import { IOutput } from '../../../../services';
2
+ import { VariableAutoCompleteOption } from './type';
3
+ export declare function buildVariableAutoCompleteOptions(nodes: IOutput["outputs"], parentObject?: string, parentPath?: string[]): VariableAutoCompleteOption[];
@@ -1,7 +1,4 @@
1
1
  import { AutoCompleteProps } from 'antd';
2
- import { default as React } from 'react';
3
- type SuggestVariableNodeContainerProps = {
4
- isCheckPrefix?: boolean;
5
- } & AutoCompleteProps;
6
- declare const SuggestVariableNodeContainer: React.FC<SuggestVariableNodeContainerProps>;
2
+ import { UseVariableSuggestOptions } from './type';
3
+ declare const SuggestVariableNodeContainer: (props: UseVariableSuggestOptions & AutoCompleteProps) => import("react/jsx-runtime").JSX.Element;
7
4
  export default SuggestVariableNodeContainer;
@@ -0,0 +1,25 @@
1
+ import { DATA_TYPE_PROPERTY } from '../../../constants/common';
2
+ export interface VariableLeaf {
3
+ object: string;
4
+ type: DATA_TYPE_PROPERTY;
5
+ slug: string;
6
+ name?: string;
7
+ fullPath: string;
8
+ value: string;
9
+ }
10
+ export interface VariableOption {
11
+ value: string;
12
+ data: VariableLeaf;
13
+ }
14
+ export interface UseVariableSuggestOptions {
15
+ isCheckPrefix?: boolean;
16
+ }
17
+ export interface VariableGroupOption {
18
+ label: string;
19
+ options: VariableLeafOption[];
20
+ }
21
+ export interface VariableLeafOption {
22
+ value: string;
23
+ data: VariableLeaf;
24
+ }
25
+ export type VariableAutoCompleteOption = VariableGroupOption | VariableLeafOption;
@@ -11,7 +11,8 @@ export declare enum BlockType {
11
11
  TRIGGER_CONTACT = "TRIGGER_CONTACT",
12
12
  CALLBOT_TRIGGER = "CALLBOT_TRIGGER",
13
13
  ORDER_TRIGGER = "ORDER_TRIGGER",
14
- CONTACT_ACTION = "CONTACT_ACTION",
14
+ ACTION_CONTACT = "ACTION_CONTACT",
15
+ SCHEDULE_AT = "SCHEDULE_AT",
15
16
  CALLBOT_ACTION = "CALLBOT_ACTION",
16
17
  ORDER_ACTION = "ORDER_ACTION",
17
18
  EMAIL = "EMAIL",
@@ -108,9 +108,38 @@ export declare enum DATA_TYPE_PROPERTY {
108
108
  associateproperty = "associateproperty",
109
109
  phoneproperty = "phoneproperty",
110
110
  fileproperty = "fileproperty",
111
- singleassociateproperty = "singleassociateproperty"
111
+ singleassociateproperty = "singleassociateproperty",
112
+ multiemailproperty = "multiemailproperty",
113
+ multiphoneproperty = "multiphoneproperty"
114
+ }
115
+ export declare enum DATA_TYPE_PROPERTY_V2 {
116
+ singleline = "singleline",
117
+ multiline = "multiline",
118
+ richtext = "richtext",
119
+ email = "email",
120
+ phone = "phone",
121
+ url = "url",
122
+ boolean = "boolean",
123
+ file = "file",
124
+ integer = "integer",
125
+ float = "float",
126
+ percentage = "percentage",
127
+ date = "date",
128
+ datetime = "datetime",
129
+ duration = "duration",
130
+ singleoption = "singleoption",
131
+ multioption = "multioption",
132
+ optiongroup = "optiongroup",
133
+ singleuser = "singleuser",
134
+ multiuser = "multiuser",
135
+ singleassociate = "singleassociate",
136
+ multiassociate = "multiassociate",
137
+ formula = "formula",
138
+ multiphone = "multiphone",
139
+ multiemail = "multiemail",
140
+ array = "array"
112
141
  }
113
142
  export declare const CAMPAIGN_TYPE_NAME: Record<string, string>;
114
143
  export declare const DATE_FORMAT_BY_OPERATOR: Record<string, string>;
115
- export declare const iconPropertyMap: Record<DATA_TYPE_PROPERTY, any>;
144
+ export declare const iconPropertyMap: Record<DATA_TYPE_PROPERTY | string, any>;
116
145
  export declare const operatorMap: Record<string, string>;
@@ -1,3 +1,6 @@
1
1
  export declare const DD_MM_YYYY = "DD/MM/YYYY";
2
+ export declare const YYYY_MM_DD = "YYYY-MM-DD";
2
3
  export declare const DD_MM_YYYY_HH_mm = "DD/MM/YYYY HH:mm";
3
4
  export declare const YYYY_MM_DD_HH_mm_ss = "YYYY-MM-DD HH:mm:ss";
5
+ export declare const HH_mm_ss = "HH:mm:ss";
6
+ export declare const HH_mm = "HH:mm";
@@ -14,6 +14,8 @@ export declare const initialTitles: {
14
14
  AI_AGENT: string;
15
15
  CONDITION: string;
16
16
  NOTIFICATION: string;
17
+ SCHEDULE_AT: string;
18
+ ACTION_CONTACT: string;
17
19
  };
18
20
  export declare const initialData: {
19
21
  AGENT: {
@@ -7,12 +7,13 @@ export declare const nodeTypes: {
7
7
  GROUP: import('react').FC<import('../components/Blocks/Group/types').GroupNodeProps>;
8
8
  CONDITION: import('react').FC<import('../components/Blocks/Condition/types').ConditionNodeProps>;
9
9
  TRIGGER_CONTACT: import('react').FC<import('../components/Blocks/Contact/trigger/types').BlockContactTriggerProps>;
10
- CONTACT_ACTION: import('react').FC<import('../components/Blocks/Contact/action/types').BlockContactActionProps>;
10
+ ACTION_CONTACT: import('react').FC<import('../components/Blocks/Contact/action/types').BlockContactActionProps>;
11
11
  EMAIL: import('react').FC<import('../components/Blocks/Email/types').BlockEmailProps>;
12
12
  DELAY: import('react').FC<import('../components/Blocks/Delay/types').BlockDelayActionProps>;
13
13
  BRANCH: import('react').FC<import('../components/Blocks/Branch/types').BlockBranchProps>;
14
14
  AI_AGENT: import('react').FC<import('../components/Blocks/AIAgent/types').BlockAIAgentProps>;
15
15
  NOTIFICATION: import('react').FC<import('../components/Blocks/Notification/types').BlockNotificationProps>;
16
+ SCHEDULE_AT: import('react').FC<import('../components/Blocks/Schedule/types').BlockScheduleProps>;
16
17
  };
17
18
  export declare const getNodeColor: (node: any) => string;
18
19
  export default nodeTypes;
@@ -20,7 +20,8 @@ export interface AutoFlowSidebarButton {
20
20
  group?: string | number;
21
21
  items?: AutoFlowSidebarButton[];
22
22
  }
23
- export declare const DEFAULT_SIDEBAR_BUTTONS: BlockType[];
23
+ export declare const DEFAULT_CALLBOT_SIDEBAR_BUTTONS: BlockType[];
24
+ export declare const DEFAULT_AUTOFLOW_SIDEBAR_BUTTONS: BlockType[];
24
25
  export declare const autoCallSidebarButtons: AutoCallSidebarButton[];
25
26
  export declare const autoFlowSidebarButtons: AutoFlowSidebarButton[];
26
27
  export declare const iconColors: Record<BlockType, string>;
@@ -0,0 +1,17 @@
1
+ import { AutoCompleteProps } from 'antd';
2
+ import { UseVariableSuggestOptions } from '../../components/Shared/SuggestVariableNode/type';
3
+ export declare function useVariableSuggest(upstreamNodes: any[], options?: UseVariableSuggestOptions & AutoCompleteProps): {
4
+ value: any;
5
+ open: boolean;
6
+ options: import('../../components/Shared/SuggestVariableNode/type').VariableAutoCompleteOption[];
7
+ bindInput: {
8
+ ref: import('react').RefObject<HTMLInputElement>;
9
+ value: any;
10
+ onChange: (e: any) => void;
11
+ onClick: (e: any) => void;
12
+ status: "" | "warning" | "error";
13
+ onFocus: () => void;
14
+ onBlurCapture: () => void;
15
+ };
16
+ onSelect: (text: string, option: any) => void;
17
+ };
@@ -25,6 +25,7 @@ export interface InstanceScriptEditorProps {
25
25
  onAlertsChange?: (values: UseErrorsAndInfosReturn) => void;
26
26
  instanceId?: string;
27
27
  mode: "view" | "edit";
28
+ onReady?: (ready: boolean) => void;
28
29
  }
29
30
  interface InstanceContextProviderProps extends InstanceScriptEditorProps {
30
31
  children: ReactNode;
@@ -1,5 +1,6 @@
1
- import { IFilter, IFilterGroup } from '../../services';
2
- import { BlockType } from '../constants';
1
+ import { TreeDataNode } from 'antd';
2
+ import { IFilter, IFilterGroup, IOutput } from '../../services';
3
+ import { DATA_TYPE_PROPERTY } from '../constants/common';
3
4
  export declare function getInitialsAvatarName(name: string): string;
4
5
  export declare function getSuffixCount(name: string): number;
5
6
  export declare const formatTitleCondition: (condition: IFilter) => {
@@ -40,5 +41,9 @@ export declare const formatFilterGroupsToForm: (object?: string, chartFilterGrou
40
41
  groups: IFilterGroup[];
41
42
  };
42
43
  export declare function slugifyUnderscore(str: string): string;
43
- export declare function findIndexNodeById(id: string, type: BlockType): number;
44
+ export declare function buildOutPutTreeNodes(outputs: IOutput["outputs"]): (TreeDataNode & {
45
+ meta?: {
46
+ iconType?: DATA_TYPE_PROPERTY;
47
+ };
48
+ })[];
44
49
  export {};
@@ -0,0 +1,9 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IOptionValue, IPagination } from '../../lib';
3
+ export declare const filterInfiniteOptionKey = "filter-infinite-option-v2";
4
+ declare const useInfiniteFilterOptionV2: ({ property_id, currentFilters, pageSize, }: {
5
+ property_id: string;
6
+ currentFilters: Record<string, unknown>;
7
+ pageSize?: number;
8
+ }) => import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/react-query').InfiniteData<AxiosResponse<IPagination<IOptionValue>, any>, unknown>, AxiosError<unknown, any>>;
9
+ export default useInfiniteFilterOptionV2;
@@ -1,5 +1,9 @@
1
1
  import { AxiosError, AxiosResponse } from 'axios';
2
2
  import { IOutput } from '../types';
3
3
  export declare const getOutput = "output";
4
- declare function useGetOutput(type: string, enabled?: boolean): import('@tanstack/react-query').UseQueryResult<AxiosResponse<IOutput, any>, AxiosError<unknown, any>>;
4
+ declare function useGetOutput({ type, action, enabled, }: {
5
+ type: string;
6
+ action: string;
7
+ enabled?: boolean;
8
+ }): import('@tanstack/react-query').UseQueryResult<AxiosResponse<IOutput, any>, AxiosError<unknown, any>>;
5
9
  export default useGetOutput;
@@ -0,0 +1,5 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IPropertyV2, PaginationInputs } from '../types';
3
+ export declare const useGetAllPropertyV2Key = "get_all_property_v2";
4
+ declare const useGetAllPropertyV2: ({ currentFilters, pagination, }: PaginationInputs) => import('@tanstack/react-query').UseQueryResult<AxiosResponse<IPropertyV2[], any>, AxiosError<unknown, any>>;
5
+ export default useGetAllPropertyV2;
@@ -246,10 +246,75 @@ export interface IMailTemplate {
246
246
  params: any;
247
247
  }
248
248
  export interface IOutput {
249
- outputs: IProperty[];
249
+ outputs: {
250
+ id: string;
251
+ type: DATA_TYPE_PROPERTY;
252
+ slug: string;
253
+ name: string;
254
+ options: IOptionValue[];
255
+ structure?: IOutput["outputs"];
256
+ object?: string;
257
+ }[];
250
258
  unknown_types?: [];
251
259
  }
252
260
  export type IListTypeInputOption = {
253
261
  value?: string;
254
262
  title?: string;
255
263
  };
264
+ export type IPropertyGroupType = {
265
+ id: string;
266
+ name: string;
267
+ slug: string;
268
+ app_model?: string;
269
+ description?: string;
270
+ order?: number;
271
+ is_default?: boolean;
272
+ created_at?: string;
273
+ updated_at?: string;
274
+ created_by?: string | null;
275
+ changed_by?: string | null;
276
+ };
277
+ export interface PaginationInputs {
278
+ pagination?: {
279
+ page: number;
280
+ page_size: number;
281
+ };
282
+ currentFilters?: any;
283
+ is_color?: boolean;
284
+ }
285
+ export type IPropertyV2 = {
286
+ id: string;
287
+ name: string;
288
+ slug: string;
289
+ description: string;
290
+ order_default?: number;
291
+ can_delete?: boolean;
292
+ is_auto?: boolean;
293
+ is_must_fill?: boolean;
294
+ is_unique?: boolean;
295
+ default_in_form?: boolean;
296
+ allow_in_form?: boolean;
297
+ default_in_kanban?: boolean;
298
+ default_in_summary?: boolean;
299
+ default_in_table?: boolean;
300
+ group_name?: string;
301
+ can_edit_in_list_view?: boolean;
302
+ variant_config: string;
303
+ property_group?: IPropertyGroupType;
304
+ settings?: {
305
+ option_type?: string;
306
+ options?: IOptionValue[];
307
+ min_character_limit?: number | null;
308
+ max_character_limit?: number | null;
309
+ optionGroup?: {
310
+ name?: string;
311
+ };
312
+ };
313
+ changed_by?: string | null;
314
+ created_at?: string;
315
+ created_by?: string | null;
316
+ updated_at?: string;
317
+ app_model?: "contact" | "enterprise" | "crmproduct" | "crmdeal" | "crmorder" | "ticket";
318
+ label?: string;
319
+ variant?: string;
320
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.16.1",
4
+ "version": "1.17.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"