app-v3-scripts-editor 1.36.3 → 1.36.4

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.
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
- type TriggerContactSettingContainerProps = {};
2
+ type TriggerContactSettingContainerProps = Record<string, never>;
3
3
  declare const TriggerContactSettingContainer: React.FC<TriggerContactSettingContainerProps>;
4
4
  export default TriggerContactSettingContainer;
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
- type ContactTriggerSettingContainerProps = {};
2
+ type ContactTriggerSettingContainerProps = Record<string, never>;
3
3
  declare const ContactTriggerSettingContainer: React.FC<ContactTriggerSettingContainerProps>;
4
4
  export default ContactTriggerSettingContainer;
@@ -0,0 +1,2 @@
1
+ declare const UpdatedByConditionSettingContainer: () => import("react/jsx-runtime").JSX.Element;
2
+ export default UpdatedByConditionSettingContainer;
@@ -4,6 +4,7 @@ import { BlockTypeProps } from '../../../../constants';
4
4
  export declare enum CONTACT_TRIGGER_TYPE {
5
5
  CREATED = "created",
6
6
  UPDATED = "updated",
7
+ UPDATED_BY_CONDITION = "updated_by_condition",
7
8
  DELETED = "deleted",
8
9
  TIME = "TIME"
9
10
  }
@@ -21,12 +22,14 @@ export declare enum TRIGGER_TIME_OPTION {
21
22
  export declare const ContactTriggerTypeLabel: {
22
23
  created: string;
23
24
  updated: string;
25
+ updated_by_condition: string;
24
26
  deleted: string;
25
27
  TIME: string;
26
28
  };
27
29
  export declare const ContactTriggerTypeDescription: {
28
30
  created: string;
29
31
  updated: string;
32
+ updated_by_condition: string;
30
33
  deleted: string;
31
34
  TIME: string;
32
35
  };
@@ -57,7 +60,7 @@ export interface ContactTriggerNodeData extends INodeBaseType, Record<string, un
57
60
  time_config_fixed_time?: string;
58
61
  time_config_offset?: number;
59
62
  time_config_offset_unit?: "MINUTES" | "HOURS";
60
- change_field_id?: string;
63
+ change_field_ids?: string[];
61
64
  }
62
65
  export type BlockContactTriggerProps = BlockTypeProps<ContactTriggerNodeData>;
63
66
  export type ContactTriggerNodeProps = NodeProps<Node<ContactTriggerNodeData>>;
@@ -0,0 +1,72 @@
1
+ import { IFilterGroup } from '../../../../../services';
2
+ import { DATA_TYPE_PROPERTY_V2 } from '../../../../constants/common';
3
+ import { CONTACT_TRIGGER_TYPE, ContactTriggerNodeData, TRIGGER_DATE_OPTION, TRIGGER_TIME_OPTION } from './types';
4
+ export declare const buildInitialContactTriggerFormValues: (data: ContactTriggerNodeData) => {
5
+ condition: any;
6
+ change_field_ids: string[];
7
+ condition_values: import('../../../Shared/UpdatedByCondition/helpers').ConditionValueMap;
8
+ time_field: {
9
+ id: string;
10
+ name: string;
11
+ slug: string;
12
+ variant_config: DATA_TYPE_PROPERTY_V2;
13
+ };
14
+ date_config_value: TRIGGER_DATE_OPTION;
15
+ date_config_offset: number;
16
+ time_config_value: TRIGGER_TIME_OPTION;
17
+ time_config_fixed_time: string;
18
+ time_config_offset: number;
19
+ time_config_offset_unit: "MINUTES" | "HOURS";
20
+ filter_type: "AND" | "OR";
21
+ groups: IFilterGroup[];
22
+ title: string;
23
+ type: CONTACT_TRIGGER_TYPE;
24
+ object: string;
25
+ output?: import('../../../../../services').IOutput["outputs"];
26
+ variables?: {
27
+ node_id: string;
28
+ slugs: string[];
29
+ }[];
30
+ input_data?: Record<string, any>;
31
+ output_data?: Record<string, any>;
32
+ status?: import('../../../../constants/common').NODE_STATUS;
33
+ order?: number;
34
+ };
35
+ export declare const buildContactTriggerNodeData: (values: ContactTriggerNodeData) => {
36
+ groups: IFilterGroup[] | ({
37
+ filter_type: "AND" | "OR";
38
+ conditions: Pick<import('../../../../../services').IFilter, "value" | "title" | "name" | "type" | "id" | "slug" | "operator" | "dateType" | "type_date" | "propertyData">[];
39
+ id: string;
40
+ } | {
41
+ filter_type: "AND" | "OR";
42
+ conditions: Pick<import('../../../../../services').IFilter, "value" | "title" | "name" | "type" | "id" | "slug" | "operator" | "dateType" | "type_date" | "propertyData">[];
43
+ object: string;
44
+ })[];
45
+ change_field_ids: string[];
46
+ time_field: string;
47
+ time_field_type: DATA_TYPE_PROPERTY_V2;
48
+ time_field_slug: string;
49
+ time_field_name: string;
50
+ date_config: {
51
+ relative_type: TRIGGER_DATE_OPTION;
52
+ offset_value: number;
53
+ };
54
+ time_config: {
55
+ execution_mode: TRIGGER_TIME_OPTION;
56
+ fixed_time_value: string;
57
+ relative_value: number;
58
+ relative_unit: "MINUTES" | "HOURS";
59
+ };
60
+ title: string;
61
+ type: CONTACT_TRIGGER_TYPE;
62
+ object: string;
63
+ filter_type: "AND" | "OR";
64
+ variables?: {
65
+ node_id: string;
66
+ slugs: string[];
67
+ }[];
68
+ input_data?: Record<string, any>;
69
+ output_data?: Record<string, any>;
70
+ status?: import('../../../../constants/common').NODE_STATUS;
71
+ order?: number;
72
+ };
@@ -1,4 +1,2 @@
1
- import { default as React } from 'react';
2
- type TriggerOrderSettingContainerProps = {};
3
- declare const TriggerOrderSettingContainer: React.FC<TriggerOrderSettingContainerProps>;
1
+ declare const TriggerOrderSettingContainer: () => import("react/jsx-runtime").JSX.Element;
4
2
  export default TriggerOrderSettingContainer;
@@ -4,6 +4,7 @@ import { BlockTypeProps } from '../../../../constants';
4
4
  export declare enum ORDER_TRIGGER_TYPE {
5
5
  CREATED = "created",
6
6
  UPDATED = "updated",
7
+ UPDATED_BY_CONDITION = "updated_by_condition",
7
8
  DELETED = "deleted",
8
9
  TIME = "TIME"
9
10
  }
@@ -21,12 +22,14 @@ export declare enum TRIGGER_TIME_OPTION {
21
22
  export declare const OrderTriggerTypeLabel: {
22
23
  created: string;
23
24
  updated: string;
25
+ updated_by_condition: string;
24
26
  deleted: string;
25
27
  TIME: string;
26
28
  };
27
29
  export declare const OrderTriggerTypeDescription: {
28
30
  created: string;
29
31
  updated: string;
32
+ updated_by_condition: string;
30
33
  deleted: string;
31
34
  TIME: string;
32
35
  };
@@ -57,7 +60,11 @@ export interface OrderTriggerNodeData extends INodeBaseType, Record<string, unkn
57
60
  time_config_fixed_time?: string;
58
61
  time_config_offset?: number;
59
62
  time_config_offset_unit?: "MINUTES" | "HOURS";
60
- change_field_id?: string;
63
+ change_field_ids?: string[];
64
+ condition_values?: Record<string, {
65
+ operator?: string;
66
+ value?: unknown;
67
+ }>;
61
68
  }
62
69
  export type BlockOrderTriggerProps = BlockTypeProps<OrderTriggerNodeData>;
63
70
  export type OrderTriggerNodeProps = NodeProps<Node<OrderTriggerNodeData>>;
@@ -1,9 +1,12 @@
1
+ import { SelectProps } from 'antd';
1
2
  import { default as React } from 'react';
2
3
  import { IPropertyV2 } from '../../../../services';
3
4
  type InputByTypeProps = {
4
5
  property?: IPropertyV2;
5
6
  name: (string | number)[];
6
7
  required?: boolean;
8
+ operator?: string;
9
+ onValueChange?: SelectProps["onChange"];
7
10
  };
8
11
  declare const InputByType: React.FC<InputByTypeProps>;
9
12
  export default InputByType;
@@ -0,0 +1,19 @@
1
+ import { SelectProps } from 'antd';
2
+ import { IFilter, IFilterGroup, IPropertyV2 } from '../../../../services';
3
+ import { DATA_TYPE_PROPERTY, DATA_TYPE_PROPERTY_V2 } from '../../../constants/common';
4
+ export type ConditionValueMap = Record<string, {
5
+ operator?: string;
6
+ value?: unknown;
7
+ titleValue?: unknown;
8
+ }>;
9
+ export declare const getOperatorOptions: (type?: DATA_TYPE_PROPERTY | DATA_TYPE_PROPERTY_V2 | string) => SelectProps["options"];
10
+ export declare const normalizeSearchText: (value?: string) => string;
11
+ export declare const getConditionFieldId: (property: unknown) => string;
12
+ export declare const getConditionsFromGroups: (groups?: IFilterGroup[]) => IFilter[];
13
+ export declare const getConditionValuesFromConditions: (conditions?: NonNullable<IFilterGroup["conditions"]>) => ConditionValueMap;
14
+ export declare const getConditionValuesFromGroups: (groups?: IFilterGroup[]) => ConditionValueMap;
15
+ export declare const getChangeFieldIdsFromGroups: (groups?: IFilterGroup[]) => string[];
16
+ export declare const normalizeUpdatedByConditionGroups: (groups: IFilterGroup[] | undefined, object?: string) => IFilterGroup[];
17
+ export declare const hasFilterValue: (value: unknown) => boolean;
18
+ export declare const buildUpdatedByConditionGroups: (properties: IPropertyV2[], changeFieldIds: string[], conditionFieldIds: string[], conditionValues: ConditionValueMap, object?: string) => IFilterGroup[];
19
+ export declare const isValueDisabledOperator: (operator?: string) => operator is "VALUABLE" | "EMPTY";
@@ -0,0 +1,21 @@
1
+ import { ReactNode } from 'react';
2
+ type FieldNames = {
3
+ changeFieldIds?: string;
4
+ conditionValues?: string;
5
+ groups?: string;
6
+ condition?: string;
7
+ };
8
+ export type UpdatedByConditionProps = {
9
+ model: string;
10
+ object?: string;
11
+ title?: ReactNode;
12
+ searchPlaceholder?: string;
13
+ emptyText?: ReactNode;
14
+ conditionText?: ReactNode;
15
+ addConditionText?: ReactNode;
16
+ removeConditionText?: string;
17
+ fieldNames?: FieldNames;
18
+ };
19
+ declare const UpdatedByCondition: ({ model, object, title, searchPlaceholder, emptyText, conditionText, addConditionText, removeConditionText, fieldNames, }: UpdatedByConditionProps) => import("react/jsx-runtime").JSX.Element;
20
+ export default UpdatedByCondition;
21
+ export * from './helpers';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.36.3",
4
+ "version": "1.36.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"