app-v3-scripts-editor 1.24.0 → 1.24.2

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.
@@ -6,14 +6,14 @@ export declare const NODE_MODE_OPTIONS: NodeOutputMode[];
6
6
  export declare const DEFAULT_NODE_MODE_FIELD_PATH = "id";
7
7
  export declare const isNodeMode: (mode: string) => mode is NodeOutputMode;
8
8
  export declare const isVariableGroupOption: (option: VariableAutoCompleteOption) => option is VariableGroupOption;
9
- export declare const buildNodeModeValue: (object: string, mode: NodeOutputMode, fieldPath?: string) => string;
9
+ export declare const buildNodeModeValue: (object: string, mode?: NodeOutputMode, fieldPath?: string) => string;
10
10
  export declare const parseNodeModeValue: (value: string) => {
11
11
  object: string;
12
12
  mode: NodeOutputMode;
13
13
  fieldPath: string;
14
14
  };
15
15
  export declare const normalizeNodeModeValue: (value?: string) => string;
16
- export declare const buildNodeModeMeta: (group: VariableGroupOption, mode: NodeOutputMode, value?: string) => {
16
+ export declare const buildNodeModeMeta: (group: VariableGroupOption, mode?: NodeOutputMode, value?: string) => {
17
17
  object: string;
18
18
  node_type: import('../../../constants').BlockType;
19
19
  order: number;
@@ -6,7 +6,7 @@ export interface NodeModeMeta {
6
6
  object: string;
7
7
  node_type?: BlockType;
8
8
  order?: number;
9
- mode: NodeOutputMode;
9
+ mode?: NodeOutputMode;
10
10
  value: string;
11
11
  fieldPath?: string;
12
12
  isDeleted?: boolean;
@@ -12,12 +12,12 @@ export declare enum BlockType {
12
12
  GROUP = "GROUP",
13
13
  TRIGGER_CONTACT = "TRIGGER_CONTACT",
14
14
  CALLBOT_TRIGGER = "CALLBOT_TRIGGER",
15
- TRIGGER_ORDER = "TRIGGER_ORDER",
15
+ TRIGGER_CRMORDER = "TRIGGER_CRMORDER",
16
16
  SCHEDULE_AT = "SCHEDULE_AT",
17
17
  CATCH_HOOK = "CATCH_HOOK",
18
18
  ACTION_CONTACT = "ACTION_CONTACT",
19
19
  CALLBOT_ACTION = "CALLBOT_ACTION",
20
- ACTION_ORDER = "ACTION_ORDER",
20
+ ACTION_CRMORDER = "ACTION_CRMORDER",
21
21
  EMAIL = "EMAIL",
22
22
  DELAY = "DELAY",
23
23
  BRANCH = "BRANCH",
@@ -7,12 +7,12 @@ 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
- TRIGGER_ORDER: import('react').FC<import('../components/Blocks/Order/trigger/types').BlockOrderTriggerProps>;
10
+ TRIGGER_CRMORDER: import('react').FC<import('../components/Blocks/Order/trigger/types').BlockOrderTriggerProps>;
11
11
  SCHEDULE_AT: import('react').FC<import('../components/Blocks/Schedule/types').BlockScheduleProps>;
12
12
  CATCH_HOOK: import('react').FC<import('../components/Blocks/CatchHook/types').BlockCatchHookProps>;
13
13
  ACTION_CONTACT: import('react').FC<import('../components/Blocks/Contact/action/types').BlockContactActionProps>;
14
14
  CONTACT_ASSIGN: import('react').FC<import('../components/Blocks/Contact/assign/types').BlockContactAssignProps>;
15
- ACTION_ORDER: import('react').FC<import('../components/Blocks/Order/action/types').BlockOrderActionProps>;
15
+ ACTION_CRMORDER: import('react').FC<import('../components/Blocks/Order/action/types').BlockOrderActionProps>;
16
16
  EMAIL: import('react').FC<import('../components/Blocks/Email/types').BlockEmailProps>;
17
17
  DELAY: import('react').FC<import('../components/Blocks/Delay/types').BlockDelayActionProps>;
18
18
  BRANCH: import('react').FC<import('../components/Blocks/Branch/types').BlockBranchProps>;
@@ -0,0 +1,17 @@
1
+ import { FormInstance } from 'antd';
2
+ type ResetFormOnTypeChangeOptions<T extends Record<string, unknown> & {
3
+ title?: unknown;
4
+ type?: unknown;
5
+ }> = {
6
+ form: FormInstance<T>;
7
+ type: T["type"] | undefined;
8
+ getResetValues?: (params: {
9
+ currentValues: Partial<T>;
10
+ nextType: T["type"];
11
+ }) => Record<string, unknown> | undefined;
12
+ };
13
+ export declare const useResetFormOnTypeChange: <T extends Record<string, unknown> & {
14
+ title?: unknown;
15
+ type?: unknown;
16
+ }>({ form, type, getResetValues, }: ResetFormOnTypeChangeOptions<T>) => void;
17
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.24.0",
4
+ "version": "1.24.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"