app-v3-scripts-editor 1.12.0 → 1.12.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.
@@ -1,4 +1,5 @@
1
1
  import { Node, NodeProps } from '@xyflow/react';
2
+ import { IFilterGroup } from '../../../../services';
2
3
  import { BlockTypeProps } from '../../../constants';
3
4
  export declare enum BRANCH_TYPE {
4
5
  BRANCH = "BRANCH"
@@ -13,11 +14,7 @@ export declare const BranchTypeList: BRANCH_TYPE[];
13
14
  export interface BranchNodeData extends Record<string, unknown> {
14
15
  title: string;
15
16
  type: BRANCH_TYPE;
16
- groups: {
17
- id: string;
18
- filter_type: "AND" | "OR";
19
- conditions: any[];
20
- }[];
17
+ groups: IFilterGroup[];
21
18
  }
22
19
  export type BlockBranchProps = BlockTypeProps<BranchNodeData>;
23
20
  export type BranchNodeProps = NodeProps<Node<BranchNodeData>>;
@@ -6,3 +6,4 @@ export declare const sidebarIcon: string;
6
6
  export declare const sidebarLabel: string;
7
7
  export declare const buttonItemAutoFlow: string;
8
8
  export declare const buttonIconAutoFlow: string;
9
+ export declare const buttonIconAutoFlowDiffBgColor: string;
@@ -17,25 +17,80 @@ export declare const CrmObjectTypeLabel: {
17
17
  call: string;
18
18
  };
19
19
  export declare const CrmObjectTypeList: CRM_OBJECT_TYPE[];
20
- export declare const NUMBER_OPERATORS: {
21
- value: string;
20
+ export declare enum NUMBER_OPERATORS {
21
+ EQUAL = "EQUAL",
22
+ NOT_EQUAL = "NOT_EQUAL",
23
+ GREATER = "GREATER",
24
+ GREATER_EQUAL = "GREATER_EQUAL",
25
+ LESS = "LESS",
26
+ LESS_EQUAL = "LESS_EQUAL",
27
+ VALUABLE = "VALUABLE",
28
+ EMPTY = "EMPTY"
29
+ }
30
+ export declare const NumberOperatorLabel: Record<NUMBER_OPERATORS, string>;
31
+ export declare const NumberOperatorOptions: {
32
+ value: NUMBER_OPERATORS;
22
33
  label: string;
23
34
  }[];
24
35
  export declare const SELECT_FILTER_TYPES: string[];
25
- export declare const TEXT_OPERATORS: {
26
- value: string;
36
+ export declare enum TEXT_OPERATORS {
37
+ EQUAL = "EQUAL",
38
+ NOT_EQUAL = "NOT_EQUAL",
39
+ CONTAIN = "CONTAIN",
40
+ NOT_CONTAIN = "NOT_CONTAIN",
41
+ VALUABLE = "VALUABLE",
42
+ EMPTY = "EMPTY"
43
+ }
44
+ export declare const TextOperatorLabel: Record<TEXT_OPERATORS, string>;
45
+ export declare const TextOperatorOptions: {
46
+ value: TEXT_OPERATORS;
27
47
  label: string;
28
48
  }[];
29
- export declare const TIME_OPERATORS: {
30
- value: string;
49
+ export declare enum TIME_OPERATORS {
50
+ EQUAL = "EQUAL",
51
+ GREATER = "GREATER",
52
+ LESS = "LESS",
53
+ VALUABLE = "VALUABLE",
54
+ EMPTY = "EMPTY"
55
+ }
56
+ export declare const TimeOperatorLabel: Record<TIME_OPERATORS, string>;
57
+ export declare const TimeOperatorOptions: {
58
+ value: TIME_OPERATORS;
31
59
  label: string;
32
60
  }[];
33
- export declare const DATE_TYPE_OPTIONS: {
34
- value: string;
61
+ export declare enum DATE_TYPE_OPTIONS {
62
+ EXACT_DATE = "EXACT_DATE",
63
+ TODAY = "TODAY",
64
+ YESERDAY = "YESERDAY",
65
+ THIS_WEEK = "THIS_WEEK",
66
+ LAST_WEEK = "LAST_WEEK",
67
+ THIS_MONTH = "THIS_MONTH",
68
+ LAST_MONTH = "LAST_MONTH",
69
+ THIS_QUARTER = "THIS_QUARTER",
70
+ PREVIOUS_QUARTER = "PREVIOUS_QUARTER",
71
+ LAST_7_DAYS = "LAST_7_DAYS",
72
+ LAST_30_DAYS = "LAST_30_DAYS",
73
+ TOMMOROW = "TOMMOROW",
74
+ NEXT_MONTH = "NEXT_MONTH",
75
+ NEXT_QUARTER = "NEXT_QUARTER",
76
+ THIS_YEAR = "THIS_YEAR",
77
+ LAST_YEAR = "LAST_YEAR",
78
+ NEXT_YEAR = "NEXT_YEAR",
79
+ NEXT_7_DAYS = "NEXT_7_DAYS",
80
+ NEXT_30_DAYS = "NEXT_30_DAYS"
81
+ }
82
+ export declare const DateTypeLabel: Record<DATE_TYPE_OPTIONS, string>;
83
+ export declare const DateTypeOptions: {
84
+ value: DATE_TYPE_OPTIONS;
35
85
  label: string;
36
86
  }[];
37
- export declare const FILE_OPERATORS: {
38
- value: string;
87
+ export declare enum FILE_OPERATORS {
88
+ VALUABLE = "VALUABLE",
89
+ EMPTY = "EMPTY"
90
+ }
91
+ export declare const FileOperatorLabel: Record<FILE_OPERATORS, string>;
92
+ export declare const FileOperatorOptions: {
93
+ value: FILE_OPERATORS;
39
94
  label: string;
40
95
  }[];
41
96
  export declare enum DATA_TYPE_PROPERTY {
@@ -58,3 +113,4 @@ export declare enum DATA_TYPE_PROPERTY {
58
113
  export declare const CAMPAIGN_TYPE_NAME: Record<string, string>;
59
114
  export declare const DATE_FORMAT_BY_OPERATOR: Record<string, string>;
60
115
  export declare const iconPropertyMap: Record<DATA_TYPE_PROPERTY, any>;
116
+ export declare const operatorMap: Record<string, string>;
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { IconProps } from '../icons/types';
2
3
  import { BlockType } from './block-types';
3
4
  export interface AutoCallSidebarButton {
4
5
  key: BlockType;
@@ -11,7 +12,7 @@ export interface AutoFlowSidebarButton {
11
12
  key: string;
12
13
  label: string;
13
14
  description?: string;
14
- icon: React.ComponentType;
15
+ icon: React.FC<IconProps>;
15
16
  color?: string;
16
17
  group?: string | number;
17
18
  items?: AutoFlowSidebarButton[];
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../types';
2
+ declare const ApiIcon: React.FC<IconProps>;
3
+ export default ApiIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../types';
2
+ declare const BranchesIcon: React.FC<IconProps>;
3
+ export default BranchesIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../types';
2
+ declare const FlashIcon: React.FC<IconProps>;
3
+ export default FlashIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../types';
2
+ declare const Message3Icon: React.FC<IconProps>;
3
+ export default Message3Icon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../types';
2
+ declare const PersonalCardIcon: React.FC<IconProps>;
3
+ export default PersonalCardIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../types';
2
+ declare const SmsIcon: React.FC<IconProps>;
3
+ export default SmsIcon;
@@ -0,0 +1,7 @@
1
+ export interface IconProps {
2
+ width?: number;
3
+ height?: number;
4
+ fillColor?: string;
5
+ strokeColor?: string;
6
+ className?: string;
7
+ }
@@ -6,8 +6,36 @@ export declare const formatTitleCondition: (condition: IFilter) => {
6
6
  operator: string;
7
7
  value: string;
8
8
  };
9
- export declare const formatFilterGroups: (chartFilterGroups: IFilterGroup[]) => IFilterGroup[];
9
+ type FormatMode = "suggestion" | "default";
10
+ export declare const formatFilterCore: (groups: IFilterGroup[], mode: FormatMode) => ({
11
+ filter_type: "AND" | "OR";
12
+ conditions: Pick<IFilter, "value" | "name" | "type" | "id" | "title" | "slug" | "operator" | "dateType" | "type_date" | "propertyData">[];
13
+ id: string;
14
+ } | {
15
+ filter_type: "AND" | "OR";
16
+ conditions: Pick<IFilter, "value" | "name" | "type" | "id" | "title" | "slug" | "operator" | "dateType" | "type_date" | "propertyData">[];
17
+ object: string;
18
+ })[];
19
+ export declare const formatSuggestionProperty: (filters: IFilterGroup[]) => ({
20
+ filter_type: "AND" | "OR";
21
+ conditions: Pick<IFilter, "value" | "name" | "type" | "id" | "title" | "slug" | "operator" | "dateType" | "type_date" | "propertyData">[];
22
+ id: string;
23
+ } | {
24
+ filter_type: "AND" | "OR";
25
+ conditions: Pick<IFilter, "value" | "name" | "type" | "id" | "title" | "slug" | "operator" | "dateType" | "type_date" | "propertyData">[];
26
+ object: string;
27
+ })[];
28
+ export declare const formatFilterGroups: (chartFilterGroups: IFilterGroup[]) => ({
29
+ filter_type: "AND" | "OR";
30
+ conditions: Pick<IFilter, "value" | "name" | "type" | "id" | "title" | "slug" | "operator" | "dateType" | "type_date" | "propertyData">[];
31
+ id: string;
32
+ } | {
33
+ filter_type: "AND" | "OR";
34
+ conditions: Pick<IFilter, "value" | "name" | "type" | "id" | "title" | "slug" | "operator" | "dateType" | "type_date" | "propertyData">[];
35
+ object: string;
36
+ })[];
10
37
  export declare const formatFilterGroupsToForm: (object: string, chartFilterGroups: IFilterGroup[], filter_type: "AND" | "OR") => {
11
38
  filter_type: "AND" | "OR";
12
39
  groups: IFilterGroup[];
13
40
  };
41
+ export {};
@@ -144,8 +144,10 @@ export interface IFilter {
144
144
  operator?: string;
145
145
  value?: string;
146
146
  };
147
+ propertyData?: IProperty;
147
148
  }
148
149
  export interface IFilterGroup {
150
+ id?: string;
149
151
  object?: string;
150
152
  filter_type?: "AND" | "OR";
151
153
  conditions: IFilter[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.12.0",
4
+ "version": "1.12.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"