code7-leia 0.2.6 → 0.2.10

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 (57) hide show
  1. package/package.json +1 -1
  2. package/src/store/modules/sagas.ts +14 -6
  3. package/dist/Leia.d.ts +0 -3
  4. package/dist/code7-leia.cjs.development.js +0 -2331
  5. package/dist/code7-leia.cjs.development.js.map +0 -1
  6. package/dist/code7-leia.cjs.production.min.js +0 -2
  7. package/dist/code7-leia.cjs.production.min.js.map +0 -1
  8. package/dist/code7-leia.esm.js +0 -2323
  9. package/dist/code7-leia.esm.js.map +0 -1
  10. package/dist/components/CustomToast/index.d.ts +0 -13
  11. package/dist/components/CustomToast/styles.d.ts +0 -6
  12. package/dist/components/EmptyState/index.d.ts +0 -16
  13. package/dist/components/EmptyState/styles.d.ts +0 -8
  14. package/dist/components/FileArea/components/AreaUpload/index.d.ts +0 -24
  15. package/dist/components/FileArea/components/AreaUpload/styles.d.ts +0 -9
  16. package/dist/components/FileArea/components/Modal/ModalButtonClose.d.ts +0 -6
  17. package/dist/components/FileArea/components/Modal/ModalContent.d.ts +0 -8
  18. package/dist/components/FileArea/components/Modal/ModalFooter.d.ts +0 -6
  19. package/dist/components/FileArea/components/Modal/ModalHeader.d.ts +0 -6
  20. package/dist/components/FileArea/components/Modal/ModalTitle.d.ts +0 -6
  21. package/dist/components/FileArea/components/Modal/index.d.ts +0 -22
  22. package/dist/components/FileArea/components/Modal/styles.d.ts +0 -26
  23. package/dist/components/FileArea/components/Search/index.d.ts +0 -9
  24. package/dist/components/FileArea/components/Search/styles.d.ts +0 -4
  25. package/dist/components/FileArea/components/Spinner/index.d.ts +0 -4
  26. package/dist/components/FileArea/components/Spinner/styles.d.ts +0 -2
  27. package/dist/components/FileArea/components/Table/index.d.ts +0 -4
  28. package/dist/components/FileArea/components/Table/styles.d.ts +0 -4
  29. package/dist/components/FileArea/index.d.ts +0 -2
  30. package/dist/components/FileArea/styles.d.ts +0 -7
  31. package/dist/components/MultiSelect/index.d.ts +0 -17
  32. package/dist/components/MultiSelect/styles.d.ts +0 -8
  33. package/dist/components/Select/index.d.ts +0 -12
  34. package/dist/components/Select/styles.d.ts +0 -2
  35. package/dist/components/Tabs/index.d.ts +0 -35
  36. package/dist/components/Tabs/styles.d.ts +0 -13
  37. package/dist/components/TestArea/components/InputTest/index.d.ts +0 -7
  38. package/dist/components/TestArea/components/InputTest/styles.d.ts +0 -4
  39. package/dist/components/TestArea/index.d.ts +0 -2
  40. package/dist/components/TestArea/styles.d.ts +0 -9
  41. package/dist/contexts/SharedPropsProvider.d.ts +0 -17
  42. package/dist/index.d.ts +0 -10
  43. package/dist/index.js +0 -8
  44. package/dist/interface/FileData.d.ts +0 -10
  45. package/dist/interface/Language.d.ts +0 -89
  46. package/dist/interface/Table.d.ts +0 -12
  47. package/dist/service/Api.d.ts +0 -3
  48. package/dist/store/index.d.ts +0 -10
  49. package/dist/store/modules/actions.d.ts +0 -87
  50. package/dist/store/modules/reducer.d.ts +0 -13
  51. package/dist/store/modules/sagas.d.ts +0 -26
  52. package/dist/store/modules/types.d.ts +0 -18
  53. package/dist/utils/formatAxios.d.ts +0 -3
  54. package/dist/utils/getLanguage.d.ts +0 -2
  55. package/dist/utils/languages/en.d.ts +0 -2
  56. package/dist/utils/languages/es.d.ts +0 -2
  57. package/dist/utils/languages/pt-br.d.ts +0 -2
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { Language } from '../../interface/Language';
3
- interface Option {
4
- label: string;
5
- value: string;
6
- }
7
- interface MultiSelectProps {
8
- options: Option[];
9
- presset: string[];
10
- setPresset: React.Dispatch<React.SetStateAction<string[]>>;
11
- setOptions: React.Dispatch<React.SetStateAction<Option[]>>;
12
- modal: boolean;
13
- hasAddNewOptions: boolean;
14
- language: keyof Record<'en' | 'pt-br' | 'es', Language>;
15
- }
16
- declare const MultiSelect: React.FC<MultiSelectProps>;
17
- export default MultiSelect;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const MultiSelectWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
3
- export declare const SelectBox: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
4
- export declare const OverSelect: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
5
- export declare const Checkboxes: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
6
- export declare const CheckboxLabel: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>;
7
- export declare const SelectedValues: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
8
- export declare const SelectedValue: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- interface SelectOption {
3
- value: string | number;
4
- label: string;
5
- }
6
- interface SelectProps {
7
- options: SelectOption[];
8
- onSelect: (value: string) => void;
9
- placeholder?: string;
10
- }
11
- declare const CustomSelect: React.FC<SelectProps>;
12
- export default CustomSelect;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -1,35 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import PropTypes from 'prop-types';
3
- interface TabProps {
4
- children: ReactNode;
5
- active?: boolean;
6
- }
7
- interface ITabsProps {
8
- children: ReactNode;
9
- value: string | number;
10
- onChange: (e: any) => void;
11
- active?: boolean;
12
- }
13
- export declare const Tab: {
14
- ({ active, children, ...rest }: TabProps): React.JSX.Element;
15
- propTypes: {
16
- children: PropTypes.Validator<string | number | boolean | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
17
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
18
- value: PropTypes.Requireable<string>;
19
- active: PropTypes.Requireable<boolean>;
20
- };
21
- defaultProps: {
22
- onChange: () => void;
23
- value: string;
24
- active: boolean;
25
- };
26
- };
27
- export declare const Tabs: {
28
- ({ children: childrenProp, value, onChange, ...rest }: ITabsProps): React.JSX.Element;
29
- propTypes: {
30
- children: PropTypes.Validator<string | number | boolean | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
31
- value: PropTypes.Validator<string | number>;
32
- onChange: PropTypes.Validator<(...args: any[]) => any>;
33
- };
34
- };
35
- export {};
@@ -1,13 +0,0 @@
1
- import { ReactNode } from 'react';
2
- interface TabProps {
3
- children: ReactNode;
4
- }
5
- interface OptionProps {
6
- children: ReactNode;
7
- onClick: () => void;
8
- }
9
- export declare const TabsPane: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>>;
10
- export declare const Tab: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, TabProps>>;
11
- export declare const DropdownContainer: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
12
- export declare const Option: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, OptionProps>>;
13
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface InputTestProps {
3
- placeholder: string;
4
- onChange: (value: string) => void;
5
- }
6
- declare const InputTest: React.FC<InputTestProps>;
7
- export default InputTest;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
3
- export declare const StyledInput: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>>;
4
- export declare const RecordAudioButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const TestArea: () => React.JSX.Element;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- interface ContainerProps {
3
- isloading?: boolean;
4
- }
5
- export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ContainerProps>>;
6
- export declare const Header: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
7
- export declare const Inputs: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
8
- export declare const Result: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
9
- export {};
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- id: string;
4
- language: "en" | "pt-br" | "es";
5
- propTags: {
6
- tags: [];
7
- };
8
- personas: [{
9
- name: string;
10
- description: string;
11
- }];
12
- token: string;
13
- children?: React.ReactNode;
14
- }
15
- export declare const useSharedProps: () => Props;
16
- export declare const SharedPropsProvider: React.FC<Props>;
17
- export {};
package/dist/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { PropsWithChildren, ReactElement } from 'react';
2
- import React from 'react';
3
- export declare type Props = PropsWithChildren<{
4
- id: string;
5
- activeTab: string;
6
- language: "en" | "pt-br" | "es";
7
- loading: ReactElement;
8
- token: string;
9
- }>;
10
- export declare function Code7(props: Props): React.JSX.Element;
package/dist/index.js DELETED
@@ -1,8 +0,0 @@
1
-
2
- 'use strict'
3
-
4
- if (process.env.NODE_ENV === 'production') {
5
- module.exports = require('./code7-leia.cjs.production.min.js')
6
- } else {
7
- module.exports = require('./code7-leia.cjs.development.js')
8
- }
@@ -1,10 +0,0 @@
1
- export interface tag {
2
- name: string;
3
- trained: boolean;
4
- }
5
- export interface FileData {
6
- name: string;
7
- tags: [tag];
8
- trained: boolean;
9
- link: string;
10
- }
@@ -1,89 +0,0 @@
1
- declare type FileArea = {
2
- description: string;
3
- status: string;
4
- fileName: string;
5
- presset: string;
6
- actions: string;
7
- search: string;
8
- fileUpload: string;
9
- training: string;
10
- emptyState: {
11
- title: string;
12
- description: string;
13
- };
14
- modal: {
15
- descriptionUpload: string;
16
- chooseFile: string;
17
- uploadFile: string;
18
- deleteFileTitle: string;
19
- deleteFile: string;
20
- trainingTitle: string;
21
- trainingDescription: string;
22
- };
23
- };
24
- declare type Buttons = {
25
- cancel: string;
26
- send: string;
27
- delete: string;
28
- test: string;
29
- addNewPresset: string;
30
- addPresset: string;
31
- training: string;
32
- };
33
- declare type TestArea = {
34
- description: string;
35
- typeSentence: string;
36
- selectPersona: string;
37
- selectPresset: string;
38
- emptyState: {
39
- title: string;
40
- description: string;
41
- };
42
- };
43
- declare type Toast = {
44
- deleteFile: {
45
- success: {
46
- title: String;
47
- description: String;
48
- };
49
- fail: {
50
- title: String;
51
- description: String;
52
- };
53
- };
54
- uploadFile: {
55
- success: {
56
- title: String;
57
- description: String;
58
- };
59
- fail: {
60
- title: String;
61
- description: String;
62
- };
63
- };
64
- Test: {
65
- fail: {
66
- title: String;
67
- description: String;
68
- };
69
- };
70
- Train: {
71
- fail: {
72
- title: String;
73
- description: String;
74
- };
75
- success: {
76
- title: String;
77
- description: String;
78
- };
79
- };
80
- };
81
- export declare type Language = {
82
- files: string;
83
- test: string;
84
- fileArea: FileArea;
85
- buttons: Buttons;
86
- testArea: TestArea;
87
- toast: Toast;
88
- };
89
- export {};
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- export interface TableProps {
3
- children: React.ReactNode;
4
- className?: string;
5
- size?: 'small' | 'medium' | 'large';
6
- isloading?: boolean;
7
- }
8
- export interface SpinnerProps {
9
- color?: string;
10
- size?: 'sm' | 'md' | 'lg';
11
- className?: string;
12
- }
@@ -1,3 +0,0 @@
1
- export declare const API_TOKEN = "API_TOKEN";
2
- declare const _default: import("axios").AxiosInstance;
3
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const store: import("redux").Store<{
2
- files: never[];
3
- message: string;
4
- isLoading: boolean;
5
- isChanging: boolean;
6
- isOffline: boolean;
7
- }, any, unknown> & {
8
- dispatch: unknown;
9
- };
10
- export default store;
@@ -1,87 +0,0 @@
1
- export declare const getFilesAction: (id: string, token: string) => {
2
- type: string;
3
- payload: {
4
- id: string;
5
- token: string;
6
- };
7
- };
8
- export declare const getFilesActionSuccess: ({ files }: any) => {
9
- type: string;
10
- payload: {
11
- files: any;
12
- };
13
- };
14
- export declare const deleteFilesAction: (name: string, id: string, language: string, token: string) => {
15
- type: string;
16
- payload: {
17
- name: string;
18
- id: string;
19
- language: string;
20
- token: string;
21
- };
22
- };
23
- export declare const deleteFilesActionSuccess: ({ files }: any) => {
24
- type: string;
25
- payload: {
26
- files: any;
27
- };
28
- };
29
- export declare const uploadFilesAction: (file: any, id: string, pressets: string[], language: string, token: string) => {
30
- type: string;
31
- payload: {
32
- file: any;
33
- id: string;
34
- pressets: string[];
35
- language: string;
36
- token: string;
37
- };
38
- };
39
- export declare const uploadFilesActionSuccess: ({ files }: any) => {
40
- type: string;
41
- payload: {
42
- files: any;
43
- };
44
- };
45
- export declare const trainingAction: (id: string, pressets: string[], language: string, token: string) => {
46
- type: string;
47
- payload: {
48
- id: string;
49
- pressets: string[];
50
- language: string;
51
- token: string;
52
- };
53
- };
54
- export declare const testAction: (question: string, profile: string, presset: string, files_directory: string, token: string) => {
55
- type: string;
56
- payload: {
57
- question: string;
58
- profile: string;
59
- presset: string;
60
- files_directory: string;
61
- token: string;
62
- };
63
- };
64
- export declare const testActionSuccess: ({ message }: any) => {
65
- type: string;
66
- payload: {
67
- message: any;
68
- };
69
- };
70
- export declare const commonLoadingStart: () => {
71
- type: string;
72
- };
73
- export declare const commonLoadingFinish: () => {
74
- type: string;
75
- };
76
- export declare const commonChangingStart: () => {
77
- type: string;
78
- };
79
- export declare const commonChangingFinish: () => {
80
- type: string;
81
- };
82
- export declare const commonNetworkOnline: () => {
83
- type: string;
84
- };
85
- export declare const commonNetworkOffline: () => {
86
- type: string;
87
- };
@@ -1,13 +0,0 @@
1
- export default function filesReducer(state: {
2
- files: never[];
3
- message: string;
4
- isloading: boolean;
5
- isChanging: boolean;
6
- isOffline: boolean;
7
- } | undefined, action: any): {
8
- files: never[];
9
- message: string;
10
- isloading: boolean;
11
- isChanging: boolean;
12
- isOffline: boolean;
13
- };
@@ -1,26 +0,0 @@
1
- export declare function getFilesSaga(action: any): Generator<import("redux-saga/effects").PutEffect<{
2
- type: string;
3
- }> | import("redux-saga/effects").CallEffect<unknown>, void, {
4
- data: any;
5
- }>;
6
- export declare function deleteFilesSaga(action: any): Generator<import("redux-saga/effects").PutEffect<{
7
- type: string;
8
- }> | import("redux-saga/effects").CallEffect<unknown>, void, {
9
- data: any;
10
- }>;
11
- export declare function testSaga(action: any): Generator<import("redux-saga/effects").PutEffect<{
12
- type: string;
13
- }> | import("redux-saga/effects").CallEffect<unknown>, void, {
14
- data: any;
15
- }>;
16
- export declare function uploadFilesSaga(action: any): Generator<import("redux-saga/effects").PutEffect<{
17
- type: string;
18
- }> | import("redux-saga/effects").CallEffect<unknown>, void, {
19
- data: any;
20
- }>;
21
- export declare function TrainingSaga(action: any): Generator<import("redux-saga/effects").PutEffect<{
22
- type: string;
23
- }> | import("redux-saga/effects").CallEffect<unknown>, void, {
24
- data: any;
25
- }>;
26
- export default function filesSagas(): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>;
@@ -1,18 +0,0 @@
1
- declare const Types: {
2
- GET_FILES_REQUEST: string;
3
- GET_FILES_SUCCESS: string;
4
- DELETE_FILES_REQUEST: string;
5
- DELETE_FILES_SUCCESS: string;
6
- UPLOAD_FILES_REQUEST: string;
7
- UPLOAD_FILES_SUCCESS: string;
8
- TRAINING_REQUEST: string;
9
- TEST_REQUEST: string;
10
- TEST_SUCCESS: string;
11
- LOADING_START: string;
12
- LOADING_FINISH: string;
13
- CHANGING_START: string;
14
- CHANGING_FINISH: string;
15
- NETWORK_ONLINE: string;
16
- NETWORK_OFFLINE: string;
17
- };
18
- export default Types;
@@ -1,3 +0,0 @@
1
- declare type HttpServerMethod = 'get' | 'post' | 'delete' | 'put' | 'patch' | 'options';
2
- export declare function formatAxios(method: HttpServerMethod, url: string, hasBody: boolean, body: any): Promise<any>;
3
- export {};
@@ -1,2 +0,0 @@
1
- import { Language } from '../interface/Language';
2
- export declare const getLanguage: (language: keyof Record<'en' | 'pt-br' | 'es', Language>) => Language;
@@ -1,2 +0,0 @@
1
- import { Language } from "../../interface/Language";
2
- export declare const enTranslation: Language;
@@ -1,2 +0,0 @@
1
- import { Language } from "../../interface/Language";
2
- export declare const esTranslation: Language;
@@ -1,2 +0,0 @@
1
- import { Language } from "../../interface/Language";
2
- export declare const ptTranslation: Language;