app-v3-scripts-editor 1.36.0 → 1.36.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.
Files changed (29) hide show
  1. package/dist/app-v3-scripts-editor.css +1 -1
  2. package/dist/app-v3-scripts-editor.es.js +31502 -30749
  3. package/dist/app-v3-scripts-editor.umd.js +179 -179
  4. package/dist/src/lib/components/Blocks/Callbot/action/setting/CreateAction.d.ts +1 -1
  5. package/dist/src/lib/components/Blocks/Callbot/action/setting/UpdateByFilterAction.d.ts +3 -0
  6. package/dist/src/lib/components/Blocks/Callbot/action/setting/UpdateByPreviousAction.d.ts +4 -0
  7. package/dist/src/lib/components/Blocks/Callbot/action/types.d.ts +18 -16
  8. package/dist/src/lib/components/Blocks/Speak/settings/AudioPlayback.d.ts +1 -0
  9. package/dist/src/lib/components/Blocks/Speak/settings/PersonalizeTranscriptField.d.ts +1 -0
  10. package/dist/src/lib/components/Selector/Campaign/index.d.ts +2 -1
  11. package/dist/src/lib/components/Shared/AudioRecorder/index.d.ts +1 -0
  12. package/dist/src/lib/components/Shared/CallbotFieldSetting/index.d.ts +17 -0
  13. package/dist/src/lib/components/Shared/CallbotGroupCondition/ConditionPropertySelect.d.ts +11 -0
  14. package/dist/src/lib/components/Shared/CallbotGroupCondition/index.css.d.ts +15 -0
  15. package/dist/src/lib/components/Shared/CallbotGroupCondition/index.d.ts +16 -0
  16. package/dist/src/lib/components/Shared/FieldSetting/index.d.ts +8 -1
  17. package/dist/src/lib/components/Shared/FieldSetting/inputByType.d.ts +1 -0
  18. package/dist/src/lib/components/Shared/FieldSetting/item.d.ts +1 -0
  19. package/dist/src/lib/components/Shared/NodeModeSelect/index.d.ts +1 -1
  20. package/dist/src/lib/hooks/use-sync-callbot-previous-node-campaign/index.d.ts +2 -0
  21. package/dist/src/lib/provider/node-base/index.d.ts +3 -1
  22. package/dist/src/lib/provider/settings-modal-provider/components/SettingsModal/index.css.d.ts +1 -0
  23. package/dist/src/lib/provider/settings-modal-provider/components/SettingsModal/index.d.ts +1 -0
  24. package/dist/src/lib/provider/settings-modal-provider/index.d.ts +1 -0
  25. package/dist/src/services/output/useGetOutput.d.ts +2 -1
  26. package/dist/src/services/property/useListPropertyCallCampaignCustomer.d.ts +11 -0
  27. package/dist/src/services/types.d.ts +13 -0
  28. package/package.json +1 -1
  29. package/dist/src/lib/components/Blocks/Callbot/action/setting/UpdateAction.d.ts +0 -4
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
- type CreateCallbotActionSettingContainerProps = {};
2
+ type CreateCallbotActionSettingContainerProps = Record<string, never>;
3
3
  declare const CreateCallbotActionSettingContainer: React.FC<CreateCallbotActionSettingContainerProps>;
4
4
  export default CreateCallbotActionSettingContainer;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const UpdateCallbotActionSettingContainer: React.FC;
3
+ export default UpdateCallbotActionSettingContainer;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type UpdateContactCallbotActionSettingContainerProps = Record<string, never>;
3
+ declare const UpdateContactCallbotActionSettingContainer: React.FC<UpdateContactCallbotActionSettingContainerProps>;
4
+ export default UpdateContactCallbotActionSettingContainer;
@@ -3,25 +3,25 @@ import { IFilter, INodeBaseType } from '../../../../../services';
3
3
  import { BlockTypeProps } from '../../../../constants';
4
4
  import { DATA_TYPE_PROPERTY_V2 } from '../../../../constants/common';
5
5
  export declare enum ACTION_CALLBOT_TYPE {
6
- CREATE = "CREATE",
7
- GET = "GET",
8
- UPDATE = "UPDATE",
9
- TOGGLE = "TOGGLE",
10
- CALL = "CALL"
6
+ ADD_CUSTOMER = "ADD_CUSTOMER",
7
+ GET_CUSTOMER = "GET_CUSTOMER",
8
+ UPDATE_CUSTOMERS_BY_FILTER = "UPDATE_CUSTOMERS_BY_FILTER",
9
+ UPDATE_CUSTOMERS_FROM_PREVIOUS_NODE = "UPDATE_CUSTOMERS_FROM_PREVIOUS_NODE",
10
+ TOGGLE_CAMPAIGN = "TOGGLE_CAMPAIGN"
11
11
  }
12
12
  export declare const CallbotActionTypeLabel: {
13
- CREATE: string;
14
- UPDATE: string;
15
- GET: string;
16
- TOGGLE: string;
17
- CALL: string;
13
+ ADD_CUSTOMER: string;
14
+ UPDATE_CUSTOMERS_BY_FILTER: string;
15
+ UPDATE_CUSTOMERS_FROM_PREVIOUS_NODE: string;
16
+ GET_CUSTOMER: string;
17
+ TOGGLE_CAMPAIGN: string;
18
18
  };
19
19
  export declare const CallbotActionTypeDescription: {
20
- CREATE: string;
21
- UPDATE: string;
22
- GET: string;
23
- TOGGLE: string;
24
- CALL: string;
20
+ ADD_CUSTOMER: string;
21
+ UPDATE_CUSTOMERS_BY_FILTER: string;
22
+ UPDATE_CUSTOMERS_FROM_PREVIOUS_NODE: string;
23
+ GET_CUSTOMER: string;
24
+ TOGGLE_CAMPAIGN: string;
25
25
  };
26
26
  export declare const CallbotActionTypeList: ACTION_CALLBOT_TYPE[];
27
27
  interface CallbotActionGroup {
@@ -35,7 +35,8 @@ export interface CallbotActionNodeData extends INodeBaseType, Record<string, unk
35
35
  filter_type?: "AND" | "OR";
36
36
  groups?: CallbotActionGroup[];
37
37
  object?: string;
38
- contact?: string[];
38
+ campaign_id?: string;
39
+ call_campaign_customer?: string[];
39
40
  update_fields?: {
40
41
  id?: string;
41
42
  slug?: string;
@@ -62,6 +63,7 @@ export interface CallbotActionNodeData extends INodeBaseType, Record<string, unk
62
63
  order_number?: number;
63
64
  }[];
64
65
  };
66
+ skip_if_duplicate_phone?: boolean;
65
67
  }
66
68
  export type BlockCallbotActionProps = BlockTypeProps<CallbotActionNodeData>;
67
69
  export type CallbotActionNodeProps = NodeProps<Node<CallbotActionNodeData>>;
@@ -5,6 +5,7 @@ interface AudioPlaybackProps {
5
5
  formPath?: string[][];
6
6
  onDelete?: () => void;
7
7
  style?: React.CSSProperties;
8
+ disabled?: boolean;
8
9
  }
9
10
  declare const AudioPlayback: React.FC<AudioPlaybackProps>;
10
11
  export default AudioPlayback;
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  interface PersonalizeTranscriptFieldProps {
3
3
  placeholder?: string;
4
4
  rows?: number;
5
+ disabled?: boolean;
5
6
  }
6
7
  declare const PersonalizeTranscriptField: React.FC<PersonalizeTranscriptFieldProps>;
7
8
  export default PersonalizeTranscriptField;
@@ -3,6 +3,7 @@ import { CampaignType } from '../../../../services/campaign/useGetListCampaign';
3
3
  type OptionFilterProps = {
4
4
  types?: CampaignType[];
5
5
  pageSize?: number;
6
+ valueRender?: "default" | "custom";
6
7
  } & SelectProps;
7
- export declare const CampaignSelector: ({ types, pageSize, onPopupScroll: externalOnPopupScroll, onSearch: externalOnSearch, onChange: externalOnChange, value: controlledValue, defaultValue: uncontrolledDefaultValue, labelInValue, mode, ...restProps }: OptionFilterProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const CampaignSelector: ({ types, pageSize, onPopupScroll: externalOnPopupScroll, onSearch: externalOnSearch, onChange: externalOnChange, value: controlledValue, defaultValue: uncontrolledDefaultValue, labelInValue, mode, valueRender, ...restProps }: OptionFilterProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export default CampaignSelector;
@@ -3,6 +3,7 @@ import { IUploadAudioResponse } from '../../../../services';
3
3
  interface AudioRecorderProps {
4
4
  onFinishRecord?: (response: IUploadAudioResponse) => void;
5
5
  onStartRecord?: () => void;
6
+ disabled?: boolean;
6
7
  }
7
8
  declare const AudioRecorder: React.FC<AudioRecorderProps>;
8
9
  export default AudioRecorder;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ type DefaultField = {
3
+ slug: string;
4
+ value?: unknown;
5
+ };
6
+ type CallbotFieldSettingContainerProps = {
7
+ title: React.ReactNode;
8
+ formListName: string;
9
+ defaultFields?: DefaultField[];
10
+ disabledFieldSlugs?: string[];
11
+ lockedFieldSlugs?: string[];
12
+ id?: string | string[];
13
+ type: string;
14
+ action: string;
15
+ };
16
+ declare const CallbotFieldSettingContainer: React.FC<CallbotFieldSettingContainerProps>;
17
+ export default CallbotFieldSettingContainer;
@@ -0,0 +1,11 @@
1
+ interface Props {
2
+ groupIndex: number;
3
+ name: number;
4
+ campaignId?: string;
5
+ idOptionValue?: string;
6
+ formItemName: (string | number)[];
7
+ parentName?: string;
8
+ remove: (index: number | number[]) => void;
9
+ }
10
+ declare const _default: import('react').NamedExoticComponent<Props>;
11
+ export default _default;
@@ -0,0 +1,15 @@
1
+ export declare const Container: string;
2
+ export declare const Header: string;
3
+ export declare const Title: string;
4
+ export declare const AddGroupButton: string;
5
+ export declare const GroupFilterRow: string;
6
+ export declare const ErrorText: string;
7
+ export declare const GroupCard: string;
8
+ export declare const GroupCardHover: string;
9
+ export declare const GroupHeader: string;
10
+ export declare const AddConditionButton: string;
11
+ export declare const AddConditionText: string;
12
+ export declare const TextCenter: string;
13
+ export declare const ColDeleteButton: string;
14
+ export declare const deleteButton: string;
15
+ export declare const filterRow: string;
@@ -0,0 +1,16 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ export type CallbotGroupConditionModel = "contact" | "callcampaigncustomer";
3
+ export type CallbotGroupConditionProps = {
4
+ model: CallbotGroupConditionModel;
5
+ id?: string | string[];
6
+ title?: ReactNode;
7
+ extra?: ReactNode;
8
+ className?: string;
9
+ style?: React.CSSProperties;
10
+ idOptionValue?: string;
11
+ name?: number;
12
+ parentName?: string;
13
+ required?: boolean;
14
+ };
15
+ export declare const CallbotGroupConditionContainer: React.NamedExoticComponent<CallbotGroupConditionProps>;
16
+ export default CallbotGroupConditionContainer;
@@ -1,7 +1,14 @@
1
1
  import { default as React } from 'react';
2
+ type DefaultField = {
3
+ slug: string;
4
+ value?: unknown;
5
+ };
2
6
  type FieldSettingContainerProps = {
3
- title: string;
7
+ title: React.ReactNode;
4
8
  formListName: string;
9
+ defaultFields?: DefaultField[];
10
+ disabledFieldSlugs?: string[];
11
+ lockedFieldSlugs?: string[];
5
12
  model: "contact" | "enterprise" | "crmdeal" | "crmorder" | "crmtask" | "crmmeeting" | "crmproduct" | "ticket";
6
13
  };
7
14
  declare const FieldSettingContainer: React.FC<FieldSettingContainerProps>;
@@ -3,6 +3,7 @@ import { IPropertyV2 } from '../../../../services';
3
3
  type InputByTypeProps = {
4
4
  property?: IPropertyV2;
5
5
  name: (string | number)[];
6
+ required?: boolean;
6
7
  };
7
8
  declare const InputByType: React.FC<InputByTypeProps>;
8
9
  export default InputByType;
@@ -7,6 +7,7 @@ type FieldSettingItemContainerProps = {
7
7
  remove: FormListOperation["remove"];
8
8
  allProperty: IPropertyV2[];
9
9
  formListName: string;
10
+ locked?: boolean;
10
11
  };
11
12
  declare const FieldSettingItemContainer: React.FC<FieldSettingItemContainerProps>;
12
13
  export default FieldSettingItemContainer;
@@ -1,4 +1,4 @@
1
1
  import { NodeModeSelectProps } from './types';
2
- export declare const NodeModeSelect: ({ className, mode, disabledModes, dropdownClassName, getPopupContainer, nodeFilter, onChange: externalOnChange, onClear, onDropdownVisibleChange, open: controlledOpen, value: controlledValue, defaultValue, classNames: selectClassNames, ...restProps }: NodeModeSelectProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const NodeModeSelect: ({ className, mode, disabledModes, dropdownClassName, getPopupContainer, nodeFilter, onChange: externalOnChange, onClear, onDropdownVisibleChange, open: controlledOpen, value: controlledValue, defaultValue, classNames: selectClassNames, maxCount, ...restProps }: NodeModeSelectProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default function NodeModeSelectWithProvider(props: NodeModeSelectProps): import("react/jsx-runtime").JSX.Element;
4
4
  export type { NodeModeMeta, NodeModeSelectProps } from './types';
@@ -0,0 +1,2 @@
1
+ export declare function useSyncCallbotPreviousNodeCampaign(): void;
2
+ export default useSyncCallbotPreviousNodeCampaign;
@@ -3,9 +3,11 @@ interface NodeBaseContextValue {
3
3
  setIsHovered: React.Dispatch<React.SetStateAction<boolean>>;
4
4
  isPopupDeleteOpen: boolean;
5
5
  setIsPopupDeleteOption: React.Dispatch<React.SetStateAction<boolean>>;
6
+ isReadOnly: boolean;
6
7
  }
7
- export declare const NodeBaseProvider: ({ children, }: {
8
+ export declare const NodeBaseProvider: ({ children, isReadOnly, }: {
8
9
  children: React.ReactNode;
10
+ isReadOnly?: boolean;
9
11
  }) => import("react/jsx-runtime").JSX.Element;
10
12
  export declare const useNodeBase: () => NodeBaseContextValue;
11
13
  export {};
@@ -2,3 +2,4 @@ export declare const header: string;
2
2
  export declare const dragHandle: string;
3
3
  export declare const title: string;
4
4
  export declare const content: string;
5
+ export declare const readOnlyContent: string;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  interface SettingsModalProps {
3
3
  isOpen: boolean;
4
+ isReadOnly: boolean;
4
5
  title: string;
5
6
  onClose: () => void;
6
7
  children: React.ReactNode;
@@ -1,6 +1,7 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  interface SettingsModalContextType {
3
3
  isOpen: boolean;
4
+ isReadOnly: boolean;
4
5
  currentComponent: ReactNode | null;
5
6
  currentTitle: string;
6
7
  displayComponent: (component: ReactNode, title?: string, onClose?: () => void, id?: string) => void;
@@ -1,9 +1,10 @@
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, action, enabled, }: {
4
+ declare function useGetOutput({ type, action, enabled, otherParams, }: {
5
5
  type: string;
6
6
  action: string;
7
7
  enabled?: boolean;
8
+ otherParams?: Record<string, unknown>;
8
9
  }): import('@tanstack/react-query').UseQueryResult<AxiosResponse<IOutput, any>, AxiosError<unknown, any>>;
9
10
  export default useGetOutput;
@@ -0,0 +1,11 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IProperty, IPropertyCallCampaignCustomer } from '../../lib';
3
+ export declare const useListPropertyCallCampaignCustomerKey = "list-property-call-campaign";
4
+ type PropertyCallCampaignCustomerModelName = "callcampaigncustomer" | "contact";
5
+ type PropertyCallCampaignCustomerResponseMap = {
6
+ callcampaigncustomer: IPropertyCallCampaignCustomer[];
7
+ contact: IProperty[];
8
+ };
9
+ type PropertyCallCampaignCustomerResponse<TModelName extends PropertyCallCampaignCustomerModelName | undefined> = TModelName extends PropertyCallCampaignCustomerModelName ? PropertyCallCampaignCustomerResponseMap[TModelName] : IPropertyCallCampaignCustomer[] | IProperty[];
10
+ declare function useListPropertyCallCampaignCustomer<TModelName extends PropertyCallCampaignCustomerModelName | undefined>(CALL_CAMPAIGN_ID?: string, model_name?: TModelName, enabled?: boolean): import('@tanstack/react-query').UseQueryResult<AxiosResponse<PropertyCallCampaignCustomerResponse<TModelName>, any>, AxiosError<unknown, any>>;
11
+ export default useListPropertyCallCampaignCustomer;
@@ -425,3 +425,16 @@ export interface IBlock {
425
425
  updated_by?: string;
426
426
  created_by?: string;
427
427
  }
428
+ export type IPropertyCallCampaignCustomer = {
429
+ app_model?: string;
430
+ name?: string;
431
+ options?: {
432
+ id?: string;
433
+ value?: string;
434
+ }[];
435
+ settings?: {
436
+ type?: string;
437
+ };
438
+ slug?: string;
439
+ type?: DATA_TYPE_PROPERTY;
440
+ };
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.0",
4
+ "version": "1.36.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- type UpdateCallbotActionSettingContainerProps = {};
3
- declare const UpdateCallbotActionSettingContainer: React.FC<UpdateCallbotActionSettingContainerProps>;
4
- export default UpdateCallbotActionSettingContainer;