app-v3-scripts-editor 1.5.4 → 1.5.6

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 (107) hide show
  1. package/dist/app-v3-scripts-editor.css +1 -1
  2. package/dist/app-v3-scripts-editor.es.js +23292 -21087
  3. package/dist/app-v3-scripts-editor.umd.js +213 -113
  4. package/dist/index.d.ts +1 -1
  5. package/dist/src/lib/components/Blocks/Speak/components/AudioPlayVoice.d.ts +7 -0
  6. package/dist/src/lib/components/Blocks/Speak/components/AutoTrimAndGenderSetting.d.ts +6 -0
  7. package/dist/src/lib/components/Blocks/Speak/components/HandmadeTrimAndGenderSetting.d.ts +5 -0
  8. package/dist/src/lib/components/Blocks/Speak/components/RevertAudioSettingButton.d.ts +4 -0
  9. package/dist/src/lib/components/Blocks/Speak/components/VolumeAndSpeedSetting.d.ts +6 -0
  10. package/dist/{lib → src/lib}/components/Blocks/Speak/index.css.d.ts +3 -0
  11. package/dist/src/lib/components/Blocks/Speak/settings/AudioSettingModal.d.ts +7 -0
  12. package/dist/{lib → src/lib}/components/Blocks/Speak/settings/UploadAudioButton.d.ts +2 -1
  13. package/dist/{lib → src/lib}/components/Blocks/Speak/types.d.ts +5 -0
  14. package/dist/{lib → src/lib}/components/Scripts/types.d.ts +4 -1
  15. package/dist/{lib → src/lib}/components/Shared/AudioRecorder/index.d.ts +2 -1
  16. package/dist/src/lib/components/Shared/Note/index.css.d.ts +1 -0
  17. package/dist/src/lib/components/Shared/Note/index.d.ts +6 -0
  18. package/dist/{lib → src/lib}/constants/block-types.d.ts +1 -2
  19. package/dist/{lib → src/lib}/index.d.ts +1 -0
  20. package/dist/{lib → src/lib}/styles/colors.d.ts +6 -0
  21. package/dist/src/lib/utils/ids.d.ts +4 -0
  22. package/dist/src/services/index.d.ts +1 -0
  23. package/dist/src/services/types.d.ts +18 -0
  24. package/dist/src/services/upload-audio/useUploadAudio.d.ts +7 -0
  25. package/package.json +1 -1
  26. package/dist/lib/utils/ids.d.ts +0 -3
  27. package/dist/services/upload-audio/useUploadAudio.d.ts +0 -5
  28. /package/dist/{lib → src/lib}/components/Blocks/Group/block.d.ts +0 -0
  29. /package/dist/{lib → src/lib}/components/Blocks/Group/hooks/use-check-rules.d.ts +0 -0
  30. /package/dist/{lib → src/lib}/components/Blocks/Group/index.css.d.ts +0 -0
  31. /package/dist/{lib → src/lib}/components/Blocks/Group/index.d.ts +0 -0
  32. /package/dist/{lib → src/lib}/components/Blocks/Group/node.d.ts +0 -0
  33. /package/dist/{lib → src/lib}/components/Blocks/Group/types.d.ts +0 -0
  34. /package/dist/{lib → src/lib}/components/Blocks/Listen/block.d.ts +0 -0
  35. /package/dist/{lib → src/lib}/components/Blocks/Listen/components/DraggableItem.d.ts +0 -0
  36. /package/dist/{lib → src/lib}/components/Blocks/Listen/components/DraggableList.d.ts +0 -0
  37. /package/dist/{lib → src/lib}/components/Blocks/Listen/components/index.css.d.ts +0 -0
  38. /package/dist/{lib → src/lib}/components/Blocks/Listen/index.css.d.ts +0 -0
  39. /package/dist/{lib → src/lib}/components/Blocks/Listen/index.d.ts +0 -0
  40. /package/dist/{lib → src/lib}/components/Blocks/Listen/index.settings.d.ts +0 -0
  41. /package/dist/{lib → src/lib}/components/Blocks/Listen/node.d.ts +0 -0
  42. /package/dist/{lib → src/lib}/components/Blocks/Listen/settings/AddConditionButton.d.ts +0 -0
  43. /package/dist/{lib → src/lib}/components/Blocks/Listen/settings/ListenIntent.d.ts +0 -0
  44. /package/dist/{lib → src/lib}/components/Blocks/Listen/settings/ListenIntentDropdown.d.ts +0 -0
  45. /package/dist/{lib → src/lib}/components/Blocks/Listen/settings/index.css.d.ts +0 -0
  46. /package/dist/{lib → src/lib}/components/Blocks/Listen/types.d.ts +0 -0
  47. /package/dist/{lib → src/lib}/components/Blocks/Speak/block.d.ts +0 -0
  48. /package/dist/{lib → src/lib}/components/Blocks/Speak/index.d.ts +0 -0
  49. /package/dist/{lib → src/lib}/components/Blocks/Speak/index.settings.d.ts +0 -0
  50. /package/dist/{lib → src/lib}/components/Blocks/Speak/node.d.ts +0 -0
  51. /package/dist/{lib → src/lib}/components/Blocks/Speak/settings/AudioPlayback.d.ts +0 -0
  52. /package/dist/{lib → src/lib}/components/Blocks/Speak/settings/MachineFields.d.ts +0 -0
  53. /package/dist/{lib → src/lib}/components/Blocks/Speak/settings/PersonalizeTranscriptField.d.ts +0 -0
  54. /package/dist/{lib → src/lib}/components/Blocks/Speak/settings/PromptFields.d.ts +0 -0
  55. /package/dist/{lib → src/lib}/components/Blocks/Speak/settings/RecordFields.d.ts +0 -0
  56. /package/dist/{lib → src/lib}/components/Blocks/Speak/settings/index.css.d.ts +0 -0
  57. /package/dist/{lib → src/lib}/components/Blocks/Start/block.d.ts +0 -0
  58. /package/dist/{lib → src/lib}/components/Blocks/Start/index.css.d.ts +0 -0
  59. /package/dist/{lib → src/lib}/components/Blocks/Start/index.d.ts +0 -0
  60. /package/dist/{lib → src/lib}/components/Blocks/Start/node.d.ts +0 -0
  61. /package/dist/{lib → src/lib}/components/Blocks/Transfer/block.d.ts +0 -0
  62. /package/dist/{lib → src/lib}/components/Blocks/Transfer/index.css.d.ts +0 -0
  63. /package/dist/{lib → src/lib}/components/Blocks/Transfer/index.d.ts +0 -0
  64. /package/dist/{lib → src/lib}/components/Blocks/Transfer/index.settings.d.ts +0 -0
  65. /package/dist/{lib → src/lib}/components/Blocks/Transfer/node.d.ts +0 -0
  66. /package/dist/{lib → src/lib}/components/Blocks/Transfer/settings/TransferExternalSettings.d.ts +0 -0
  67. /package/dist/{lib → src/lib}/components/Blocks/Transfer/settings/TransferInternalSettings.d.ts +0 -0
  68. /package/dist/{lib → src/lib}/components/Blocks/Transfer/types.d.ts +0 -0
  69. /package/dist/{lib → src/lib}/components/Scripts/index.d.ts +0 -0
  70. /package/dist/{lib → src/lib}/components/Scripts/scripts.css.d.ts +0 -0
  71. /package/dist/{lib → src/lib}/components/Shared/AudioRecorder/AudioVisualizer.d.ts +0 -0
  72. /package/dist/{lib → src/lib}/components/Shared/BlockRelationship/index.d.ts +0 -0
  73. /package/dist/{lib → src/lib}/components/Shared/ButtonEdge/index.css.d.ts +0 -0
  74. /package/dist/{lib → src/lib}/components/Shared/ButtonEdge/index.d.ts +0 -0
  75. /package/dist/{lib → src/lib}/components/Shared/ConfirmDeleteButton/index.d.ts +0 -0
  76. /package/dist/{lib → src/lib}/components/Shared/EditBlockTitleButton/index.d.ts +0 -0
  77. /package/dist/{lib → src/lib}/components/Shared/NodeBase/index.d.ts +0 -0
  78. /package/dist/{lib → src/lib}/components/Sidebar/index.d.ts +0 -0
  79. /package/dist/{lib → src/lib}/components/Sidebar/sidebar.css.d.ts +0 -0
  80. /package/dist/{lib → src/lib}/components/index.d.ts +0 -0
  81. /package/dist/{lib → src/lib}/constants/edge-types.d.ts +0 -0
  82. /package/dist/{lib → src/lib}/constants/index.d.ts +0 -0
  83. /package/dist/{lib → src/lib}/constants/initial-script.d.ts +0 -0
  84. /package/dist/{lib → src/lib}/constants/intents.d.ts +0 -0
  85. /package/dist/{lib → src/lib}/constants/node-types.d.ts +0 -0
  86. /package/dist/{lib → src/lib}/constants/sidebar-buttons.d.ts +0 -0
  87. /package/dist/{lib → src/lib}/hooks/index.d.ts +0 -0
  88. /package/dist/{lib → src/lib}/hooks/use-alerts/index.d.ts +0 -0
  89. /package/dist/{lib → src/lib}/hooks/use-alerts/utils/check-block-speak.d.ts +0 -0
  90. /package/dist/{lib → src/lib}/hooks/use-alerts/utils/check-block-transfer.d.ts +0 -0
  91. /package/dist/{lib → src/lib}/hooks/use-disclosure/index.d.ts +0 -0
  92. /package/dist/{lib → src/lib}/hooks/use-group-nodes/index.d.ts +0 -0
  93. /package/dist/{lib → src/lib}/hooks/use-is-valid-connection/index.d.ts +0 -0
  94. /package/dist/{lib → src/lib}/hooks/use-selected-node/index.d.ts +0 -0
  95. /package/dist/{lib → src/lib}/hooks/use-update-node/index.d.ts +0 -0
  96. /package/dist/{lib → src/lib}/provider/DnDContext.d.ts +0 -0
  97. /package/dist/{lib → src/lib}/provider/index.d.ts +0 -0
  98. /package/dist/{lib → src/lib}/provider/instance-context/index.d.ts +0 -0
  99. /package/dist/{lib → src/lib}/provider/message-context/index.d.ts +0 -0
  100. /package/dist/{lib → src/lib}/provider/settings-modal-provider/components/SettingsModal/index.css.d.ts +0 -0
  101. /package/dist/{lib → src/lib}/provider/settings-modal-provider/components/SettingsModal/index.d.ts +0 -0
  102. /package/dist/{lib → src/lib}/provider/settings-modal-provider/index.css.d.ts +0 -0
  103. /package/dist/{lib → src/lib}/provider/settings-modal-provider/index.d.ts +0 -0
  104. /package/dist/{lib → src/lib}/storybook-utils.d.ts +0 -0
  105. /package/dist/{lib → src/lib}/styles/borders.d.ts +0 -0
  106. /package/dist/{lib → src/lib}/styles/paddings.d.ts +0 -0
  107. /package/dist/{services → src/services}/client.d.ts +0 -0
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './lib/index'
1
+ export * from './src/lib/index'
2
2
  export {}
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ type AudioPlayVoiceContainerProps = {
3
+ content: string;
4
+ className?: string;
5
+ };
6
+ declare const AudioPlayVoiceContainer: React.FC<AudioPlayVoiceContainerProps>;
7
+ export default AudioPlayVoiceContainer;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ type AutoTrimAndGenderSettingContainerProps = {
3
+ prefixPaths?: string[];
4
+ };
5
+ declare const AutoTrimAndGenderSettingContainer: React.FC<AutoTrimAndGenderSettingContainerProps>;
6
+ export default AutoTrimAndGenderSettingContainer;
@@ -0,0 +1,5 @@
1
+ type HandmadeTrimAndGenderSettingContainerProps = {
2
+ prefixPaths?: string[];
3
+ };
4
+ declare const HandmadeTrimAndGenderSettingContainer: React.FC<HandmadeTrimAndGenderSettingContainerProps>;
5
+ export default HandmadeTrimAndGenderSettingContainer;
@@ -0,0 +1,4 @@
1
+ declare const RevertAudioSettingButton: ({ onConfirm }: {
2
+ onConfirm: () => void;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default RevertAudioSettingButton;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ type VolumeAndSpeedSettingContainerProps = {
3
+ prefixPaths?: string[];
4
+ };
5
+ declare const VolumeAndSpeedSettingContainer: React.FC<VolumeAndSpeedSettingContainerProps>;
6
+ export default VolumeAndSpeedSettingContainer;
@@ -10,3 +10,6 @@ export declare const alertContainer: string;
10
10
  export declare const messageBox: string;
11
11
  export declare const settingsContainer: string;
12
12
  export declare const alertGroup: string;
13
+ export declare const textAreaMachineContent: string;
14
+ export declare const tooltipTextArea: string;
15
+ export declare const playVoiceTextArea: string;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ type AudioSettingModalContainerProps = {
3
+ prefixPaths?: string[];
4
+ disabled?: boolean;
5
+ };
6
+ declare const AudioSettingModalContainer: React.FC<AudioSettingModalContainerProps>;
7
+ export default AudioSettingModalContainer;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
+ import { IUploadAudioResponse } from '../../../../../services/types';
2
3
  interface UploadAudioButtonProps {
3
- onUploadSuccess?: (audioUrl: string, transcript: string) => void;
4
+ onUploadSuccess?: (response: IUploadAudioResponse) => void;
4
5
  fieldName?: string;
5
6
  disabled?: boolean;
6
7
  }
@@ -9,6 +9,11 @@ export interface BotSpeakConfiguration {
9
9
  female_record?: string;
10
10
  transcript_original?: string;
11
11
  transcript_personalize?: string;
12
+ volume?: number;
13
+ speed?: number;
14
+ trim?: boolean;
15
+ autoGender?: boolean;
16
+ revert?: boolean;
12
17
  };
13
18
  machine: {
14
19
  content: string;
@@ -1,5 +1,8 @@
1
- import { EdgeProps, Node, ReactFlowJsonObject } from '@xyflow/react';
1
+ import { EdgeProps, Node, ReactFlowJsonObject as OriginalReactFlowJsonObject } from '@xyflow/react';
2
2
  import { UseErrorsAndInfosReturn } from '../../hooks/use-alerts';
3
+ type ReactFlowJsonObject = OriginalReactFlowJsonObject & {
4
+ version: string;
5
+ };
3
6
  export interface ScriptEditorInterface {
4
7
  getFlowJson: () => ReactFlowJsonObject | undefined;
5
8
  loadFlowJson: (flow: ReactFlowJsonObject) => void;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
+ import { IUploadAudioResponse } from '../../../../services';
2
3
  interface AudioRecorderProps {
3
- onFinishRecord?: (audioUrl: string, transcript?: string) => void;
4
+ onFinishRecord?: (response: IUploadAudioResponse) => void;
4
5
  }
5
6
  declare const AudioRecorder: React.FC<AudioRecorderProps>;
6
7
  export default AudioRecorder;
@@ -0,0 +1 @@
1
+ export declare const wrapper: string;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ type NoteContainerProps = {
3
+ content: React.ReactNode;
4
+ };
5
+ declare const NoteContainer: React.FC<NoteContainerProps>;
6
+ export default NoteContainer;
@@ -12,8 +12,7 @@ export declare enum BlockType {
12
12
  GROUP = "GROUP"
13
13
  }
14
14
  export declare enum SPEAK_TYPE {
15
- RECORD = "RECORD",
16
- MACHINE = "MACHINE",
15
+ MACHINE_AND_RECORD = "MACHINE_AND_RECORD",
17
16
  PROMPT = "PROMPT"
18
17
  }
19
18
  export declare enum TRANSFER_TYPE {
@@ -1,3 +1,4 @@
1
+ export * from '../services';
1
2
  export * from './components';
2
3
  export * from './constants';
3
4
  export * from './hooks';
@@ -53,5 +53,11 @@ declare const colors: {
53
53
  reactFlow: {
54
54
  boxShadow: string;
55
55
  };
56
+ collapseHeaderBg: {
57
+ background: string;
58
+ };
59
+ button: {
60
+ volcano: string;
61
+ };
56
62
  };
57
63
  export default colors;
@@ -0,0 +1,4 @@
1
+ declare const generateBlockId: () => string;
2
+ declare const generateConditionId: () => string;
3
+ declare const generateFileName: (fileName: string) => string;
4
+ export { generateBlockId, generateConditionId, generateFileName };
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,18 @@
1
+ export interface IUploadAudioResponse {
2
+ id: number;
3
+ scenario: string;
4
+ file_name: string;
5
+ file: string;
6
+ transcript: string;
7
+ transcript_text: string;
8
+ source?: string;
9
+ volume: number;
10
+ speed: number;
11
+ trim_audio: boolean;
12
+ trim_word?: string[];
13
+ created_at: string;
14
+ created_by: {
15
+ id: string;
16
+ email: string;
17
+ };
18
+ }
@@ -0,0 +1,7 @@
1
+ import { AxiosError } from 'axios';
2
+ import { IUploadAudioResponse } from '../types';
3
+ interface UploadAudioParams {
4
+ audio: File;
5
+ }
6
+ declare const useUploadAudio: () => import('@tanstack/react-query').UseMutationResult<IUploadAudioResponse, AxiosError<unknown, any>, UploadAudioParams, unknown>;
7
+ export default useUploadAudio;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.5.4",
4
+ "version": "1.5.6",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"
@@ -1,3 +0,0 @@
1
- declare const generateBlockId: () => string;
2
- declare const generateConditionId: () => string;
3
- export { generateBlockId, generateConditionId };
@@ -1,5 +0,0 @@
1
- interface UploadAudioParams {
2
- audio: File;
3
- }
4
- declare const useUploadAudio: () => import('@tanstack/react-query').UseMutationResult<string, Error, UploadAudioParams, unknown>;
5
- export default useUploadAudio;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes