app-v3-scripts-editor 1.15.1 → 1.16.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.
Files changed (26) hide show
  1. package/dist/app-v3-scripts-editor.css +1 -1
  2. package/dist/app-v3-scripts-editor.es.js +21191 -20564
  3. package/dist/app-v3-scripts-editor.umd.js +134 -134
  4. package/dist/src/lib/components/Blocks/AIAgent/setting/Output.d.ts +6 -0
  5. package/dist/src/lib/components/Blocks/AIAgent/types.d.ts +8 -2
  6. package/dist/src/lib/components/Blocks/Contact/trigger/setting/Setting.d.ts +4 -0
  7. package/dist/src/lib/components/Blocks/Notification/block.d.ts +3 -0
  8. package/dist/src/lib/components/Blocks/Notification/index.css.d.ts +16 -0
  9. package/dist/src/lib/components/Blocks/Notification/index.d.ts +4 -0
  10. package/dist/src/lib/components/Blocks/Notification/index.settings.d.ts +3 -0
  11. package/dist/src/lib/components/Blocks/Notification/node.d.ts +3 -0
  12. package/dist/src/lib/components/Blocks/Notification/setting/Action.d.ts +4 -0
  13. package/dist/src/lib/components/Blocks/Notification/setting/Output.d.ts +5 -0
  14. package/dist/src/lib/components/Blocks/Notification/setting/Setting.d.ts +4 -0
  15. package/dist/src/lib/components/Blocks/Notification/setting/Test.d.ts +4 -0
  16. package/dist/src/lib/components/Blocks/Notification/types.d.ts +29 -0
  17. package/dist/src/lib/components/Scripts/types.d.ts +1 -0
  18. package/dist/src/lib/components/Selector/ListTypeInput/index.d.ts +8 -0
  19. package/dist/src/lib/components/Selector/Property/index.d.ts +10 -0
  20. package/dist/src/lib/constants/block-types.d.ts +2 -1
  21. package/dist/src/lib/constants/initial-script.d.ts +1 -0
  22. package/dist/src/lib/constants/node-types.d.ts +1 -0
  23. package/dist/src/lib/utils/common.d.ts +4 -1
  24. package/dist/src/services/input-type/useListTypeInputOption.d.ts +4 -0
  25. package/dist/src/services/types.d.ts +4 -0
  26. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ type AIAgentOutputContainerProps = {
3
+ id: string;
4
+ };
5
+ declare const AIAgentOutputContainer: React.FC<AIAgentOutputContainerProps>;
6
+ export default AIAgentOutputContainer;
@@ -20,14 +20,20 @@ export interface AIAgentNodeData extends Record<string, unknown> {
20
20
  remember_recent?: number;
21
21
  knowledge?: boolean;
22
22
  output_format?: boolean;
23
- variable?: {
23
+ output?: {
24
+ object: string;
24
25
  name: string;
25
- data_type: string;
26
+ slug: string;
27
+ type: string;
26
28
  }[];
27
29
  tool?: boolean;
28
30
  tool_list?: {
29
31
  name: string;
30
32
  }[];
33
+ variable?: {
34
+ name: string;
35
+ data_type: string;
36
+ }[];
31
37
  }
32
38
  export type BlockAIAgentProps = BlockTypeProps<AIAgentNodeData>;
33
39
  export type AIAgentNodeProps = NodeProps<Node<AIAgentNodeData>>;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type TriggerContactSettingContainerProps = {};
3
+ declare const TriggerContactSettingContainer: React.FC<TriggerContactSettingContainerProps>;
4
+ export default TriggerContactSettingContainer;
@@ -0,0 +1,3 @@
1
+ import { BlockNotificationProps } from './types';
2
+ declare const BlockNotification: ({ id, data, mini }: BlockNotificationProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default BlockNotification;
@@ -0,0 +1,16 @@
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;
@@ -0,0 +1,4 @@
1
+ import { default as BlockNotification } from './block';
2
+ import { default as NotificationNode } from './node';
3
+ export default NotificationNode;
4
+ export { BlockNotification };
@@ -0,0 +1,3 @@
1
+ export declare const NotificationNodeSettings: ({ id }: {
2
+ id: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { BlockNotificationProps } from './types';
2
+ declare const NotificationNode: React.FC<BlockNotificationProps>;
3
+ export default NotificationNode;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type NotificationContainerProps = {};
3
+ declare const NotificationContainer: React.FC<NotificationContainerProps>;
4
+ export default NotificationContainer;
@@ -0,0 +1,5 @@
1
+ type NotificationOutputContainerProps = {
2
+ id: string;
3
+ };
4
+ declare const NotificationOutputContainer: React.FC<NotificationOutputContainerProps>;
5
+ export default NotificationOutputContainer;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type NotificationSettingContainerProps = {};
3
+ declare const NotificationSettingContainer: React.FC<NotificationSettingContainerProps>;
4
+ export default NotificationSettingContainer;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type NotificationTestContainerProps = {};
3
+ declare const NotificationTestContainer: React.FC<NotificationTestContainerProps>;
4
+ export default NotificationTestContainer;
@@ -0,0 +1,29 @@
1
+ import { Node, NodeProps } from '@xyflow/react';
2
+ import { BlockTypeProps } from '../../../constants';
3
+ export declare enum NOTIFICATION_ACTION_TYPE {
4
+ IN_APP = "IN_APP",
5
+ TELEGRAM = "TELEGRAM"
6
+ }
7
+ export declare const NotificationTypeLabel: {
8
+ IN_APP: string;
9
+ TELEGRAM: string;
10
+ };
11
+ export declare const NotificationTypeDescription: {
12
+ IN_APP: string;
13
+ TELEGRAM: string;
14
+ };
15
+ export declare const NotificationTypeList: NOTIFICATION_ACTION_TYPE[];
16
+ export interface NotificationNodeData extends Record<string, unknown> {
17
+ title: string;
18
+ type: NOTIFICATION_ACTION_TYPE;
19
+ to: string;
20
+ subject: string;
21
+ content: string;
22
+ output: {
23
+ object: string;
24
+ slug: string;
25
+ type: string;
26
+ }[];
27
+ }
28
+ export type BlockNotificationProps = BlockTypeProps<NotificationNodeData>;
29
+ export type NotificationNodeProps = NodeProps<Node<NotificationNodeData>>;
@@ -35,6 +35,7 @@ export interface ScriptEditorInterface {
35
35
  viewport: Viewport;
36
36
  }, globalSetting: GlobalSettingData) => void, enabled?: boolean) => void;
37
37
  instanceId: string;
38
+ resetHistory: (snap?: OriginalReactFlowJsonObject) => void;
38
39
  }
39
40
  export interface ScriptEditorProps {
40
41
  onAlertsChange?: (values: UseErrorsAndInfosReturn) => void;
@@ -0,0 +1,8 @@
1
+ import { SelectProps } from 'antd';
2
+ import { default as React } from 'react';
3
+ import { IListTypeInputOption } from '../../../../services';
4
+ type ListTypeInputSelectorProps = SelectProps & {
5
+ dataDefault?: IListTypeInputOption | IListTypeInputOption[];
6
+ };
7
+ declare const ListTypeInputSelector: React.FC<ListTypeInputSelectorProps>;
8
+ export default ListTypeInputSelector;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { IProperty } from '../../../../services';
3
+ import { DATA_TYPE_PROPERTY } from '../../../constants/common';
4
+ type PropertySelectorProps = {
5
+ dataDefault?: IProperty | IProperty[];
6
+ modal: string;
7
+ propertyType?: DATA_TYPE_PROPERTY[];
8
+ };
9
+ declare const PropertySelector: React.FC<PropertySelectorProps>;
10
+ export default PropertySelector;
@@ -17,7 +17,8 @@ export declare enum BlockType {
17
17
  EMAIL = "EMAIL",
18
18
  DELAY = "DELAY",
19
19
  BRANCH = "BRANCH",
20
- AI_AGENT = "AI_AGENT"
20
+ AI_AGENT = "AI_AGENT",
21
+ NOTIFICATION = "NOTIFICATION"
21
22
  }
22
23
  export declare enum SPEAK_TYPE {
23
24
  MACHINE_AND_RECORD = "MACHINE_AND_RECORD",
@@ -13,6 +13,7 @@ export declare const initialTitles: {
13
13
  BRANCH: string;
14
14
  AI_AGENT: string;
15
15
  CONDITION: string;
16
+ NOTIFICATION: string;
16
17
  };
17
18
  export declare const initialData: {
18
19
  AGENT: {
@@ -12,6 +12,7 @@ export declare const nodeTypes: {
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
+ NOTIFICATION: import('react').FC<import('../components/Blocks/Notification/types').BlockNotificationProps>;
15
16
  };
16
17
  export declare const getNodeColor: (node: any) => string;
17
18
  export default nodeTypes;
@@ -1,4 +1,5 @@
1
1
  import { IFilter, IFilterGroup } from '../../services';
2
+ import { BlockType } from '../constants';
2
3
  export declare function getInitialsAvatarName(name: string): string;
3
4
  export declare function getSuffixCount(name: string): number;
4
5
  export declare const formatTitleCondition: (condition: IFilter) => {
@@ -34,8 +35,10 @@ export declare const formatFilterGroups: (chartFilterGroups: IFilterGroup[]) =>
34
35
  conditions: Pick<IFilter, "value" | "name" | "type" | "id" | "title" | "operator" | "slug" | "dateType" | "type_date" | "propertyData">[];
35
36
  object: string;
36
37
  })[];
37
- export declare const formatFilterGroupsToForm: (object: string, chartFilterGroups: IFilterGroup[], filter_type: "AND" | "OR") => {
38
+ export declare const formatFilterGroupsToForm: (object?: string, chartFilterGroups?: IFilterGroup[], filter_type?: "AND" | "OR", mode?: FormatMode) => {
38
39
  filter_type: "AND" | "OR";
39
40
  groups: IFilterGroup[];
40
41
  };
42
+ export declare function slugifyUnderscore(str: string): string;
43
+ export declare function findIndexNodeById(id: string, type: BlockType): number;
41
44
  export {};
@@ -0,0 +1,4 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IListTypeInputOption } from '../types';
3
+ declare const useListTypeInputOption: () => import('@tanstack/react-query').UseQueryResult<AxiosResponse<IListTypeInputOption[], any>, AxiosError<unknown, any>>;
4
+ export default useListTypeInputOption;
@@ -249,3 +249,7 @@ export interface IOutput {
249
249
  outputs: IProperty[];
250
250
  unknown_types?: [];
251
251
  }
252
+ export type IListTypeInputOption = {
253
+ value?: string;
254
+ title?: string;
255
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.15.1",
4
+ "version": "1.16.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"