code7-leia 0.1.30 → 0.1.32
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.
- package/dist/code7-leia.cjs.development.js +76 -9
- package/dist/code7-leia.cjs.development.js.map +1 -1
- package/dist/code7-leia.cjs.production.min.js +1 -1
- package/dist/code7-leia.cjs.production.min.js.map +1 -1
- package/dist/code7-leia.esm.js +77 -10
- package/dist/code7-leia.esm.js.map +1 -1
- package/dist/components/FileArea/components/EmptyState/index.d.ts +16 -0
- package/dist/components/FileArea/components/EmptyState/styles.d.ts +8 -0
- package/package.json +1 -1
- package/src/components/FileArea/components/EmptyState/index.tsx +88 -0
- package/src/components/FileArea/components/EmptyState/styles.tsx +67 -0
- package/src/components/FileArea/components/Search/index.tsx +1 -7
- package/src/components/FileArea/index.tsx +45 -35
|
@@ -276,15 +276,11 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
276
276
|
var searchName = function searchName(e) {
|
|
277
277
|
var searchTerm = e.target.value.trim();
|
|
278
278
|
var normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();
|
|
279
|
-
console.log('searchTerm: ', searchTerm);
|
|
280
|
-
console.log('initialFiles: ', initialFiles);
|
|
281
279
|
var newFiles = initialFiles.filter(function (file) {
|
|
282
280
|
var normalizedFileName = unorm.nfkd(file.name).toLowerCase();
|
|
283
281
|
return normalizedFileName.includes(normalizedSearchTerm);
|
|
284
282
|
});
|
|
285
|
-
|
|
286
|
-
console.log('searchTerm !== "" ? newFiles : initialFiles: ', searchTerm !== '' ? newFiles : initialFiles);
|
|
287
|
-
setFiles(searchTerm !== '' && newFiles.length > 0 ? newFiles : initialFiles);
|
|
283
|
+
setFiles(searchTerm !== '' ? newFiles : initialFiles);
|
|
288
284
|
};
|
|
289
285
|
return React__default.createElement("div", {
|
|
290
286
|
style: {
|
|
@@ -314,6 +310,67 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
314
310
|
}, React__default.createElement(fa.FaSearch, null)));
|
|
315
311
|
};
|
|
316
312
|
|
|
313
|
+
var _templateObject$4;
|
|
314
|
+
var Container$1 = /*#__PURE__*/styled.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n justify-content: center;\n padding: 24px 0;\n height: 193px;\n\n background: ", ";\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 40px 1px, 1px 40px;\n background-color: ", ";\n\n & .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n & > .icon {\n background-color: ", ";\n border-radius: 16px;\n width: 145px;\n height: 145px;\n\n display: flex;\n justify-content: center;\n\n & img {\n width: 72px;\n }\n }\n\n & .description {\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px 0 8px 24px;\n\n .button-add {\n cursor: pointer;\n }\n\n .start-icon {\n display: flex;\n align-items: center;\n }\n }\n }\n"])), function (_ref) {
|
|
315
|
+
var hasBorder = _ref.hasBorder;
|
|
316
|
+
return hasBorder && "linear-gradient(\n to right,\n #dadce3 50%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)";
|
|
317
|
+
}, function (_ref2) {
|
|
318
|
+
var backgroundColor = _ref2.backgroundColor;
|
|
319
|
+
return backgroundColor;
|
|
320
|
+
}, function (_ref3) {
|
|
321
|
+
var backgroundIcon = _ref3.backgroundIcon;
|
|
322
|
+
return backgroundIcon;
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
var _excluded$2 = ["icon", "title", "description", "activeButton", "iconButton", "descriptionButton", "widthButton", "button", "backgroundIcon", "backgroundColor", "hasBorder"];
|
|
326
|
+
var EmptyState = function EmptyState(_ref) {
|
|
327
|
+
var icon = _ref.icon,
|
|
328
|
+
title = _ref.title,
|
|
329
|
+
description = _ref.description,
|
|
330
|
+
activeButton = _ref.activeButton,
|
|
331
|
+
descriptionButton = _ref.descriptionButton,
|
|
332
|
+
button = _ref.button,
|
|
333
|
+
backgroundIcon = _ref.backgroundIcon,
|
|
334
|
+
backgroundColor = _ref.backgroundColor,
|
|
335
|
+
hasBorder = _ref.hasBorder,
|
|
336
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
337
|
+
return React__default.createElement(Container$1, Object.assign({
|
|
338
|
+
backgroundIcon: backgroundIcon,
|
|
339
|
+
backgroundColor: backgroundColor,
|
|
340
|
+
hasBorder: hasBorder
|
|
341
|
+
}, rest), React__default.createElement("div", {
|
|
342
|
+
className: "content"
|
|
343
|
+
}, React__default.createElement("div", {
|
|
344
|
+
className: "icon"
|
|
345
|
+
}, icon), React__default.createElement("div", {
|
|
346
|
+
className: "description"
|
|
347
|
+
}, React__default.createElement("h5", null, " ", title), React__default.createElement("p", null, description), activeButton ? React__default.createElement("button", null, descriptionButton) : null, button)));
|
|
348
|
+
};
|
|
349
|
+
EmptyState.propTypes = {
|
|
350
|
+
icon: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
351
|
+
title: PropTypes.string,
|
|
352
|
+
description: PropTypes.string,
|
|
353
|
+
activeButton: PropTypes.bool,
|
|
354
|
+
iconButton: PropTypes.element,
|
|
355
|
+
descriptionButton: PropTypes.string,
|
|
356
|
+
widthButton: PropTypes.string,
|
|
357
|
+
button: PropTypes.element,
|
|
358
|
+
backgroundIcon: PropTypes.string,
|
|
359
|
+
backgroundColor: PropTypes.string,
|
|
360
|
+
hasBorder: PropTypes.bool
|
|
361
|
+
};
|
|
362
|
+
EmptyState.defaultProps = {
|
|
363
|
+
icon: '',
|
|
364
|
+
title: '',
|
|
365
|
+
description: '',
|
|
366
|
+
activeButton: false,
|
|
367
|
+
descriptionButton: '',
|
|
368
|
+
widthButton: '140px',
|
|
369
|
+
backgroundIcon: 'var(--neutral-0)',
|
|
370
|
+
backgroundColor: 'var(--absolute-white)',
|
|
371
|
+
hasBorder: true
|
|
372
|
+
};
|
|
373
|
+
|
|
317
374
|
var FileArea = function FileArea() {
|
|
318
375
|
var _useState = React.useState([]),
|
|
319
376
|
files = _useState[0],
|
|
@@ -365,9 +422,6 @@ var FileArea = function FileArea() {
|
|
|
365
422
|
return html;
|
|
366
423
|
};
|
|
367
424
|
var renderFiles = function renderFiles() {
|
|
368
|
-
if (files.length === 0) {
|
|
369
|
-
return null;
|
|
370
|
-
}
|
|
371
425
|
return React__default.createElement(Container, null, React__default.createElement(Header, null, React__default.createElement("div", {
|
|
372
426
|
className: 'infos'
|
|
373
427
|
}, React__default.createElement("h2", null, t.files), React__default.createElement("p", null, t.fileArea.description)), React__default.createElement("div", {
|
|
@@ -376,7 +430,20 @@ var FileArea = function FileArea() {
|
|
|
376
430
|
placeholder: t.fileArea.search,
|
|
377
431
|
setFiles: setFiles,
|
|
378
432
|
initialFiles: initialFiles
|
|
379
|
-
}), React__default.createElement("button", null, React__default.createElement(fa.FaUpload, null), " ", t.fileArea.fileUpload))),
|
|
433
|
+
}), React__default.createElement("button", null, React__default.createElement(fa.FaUpload, null), " ", t.fileArea.fileUpload))), files.length === 0 ? React__default.createElement(EmptyState, {
|
|
434
|
+
icon: React__default.createElement(fa.FaList, null),
|
|
435
|
+
title: t.fileArea.emptyState.title,
|
|
436
|
+
description: t.fileArea.emptyState.description,
|
|
437
|
+
activeButton: true,
|
|
438
|
+
iconButton: React__default.createElement(fa.FaPlus, {
|
|
439
|
+
style: {
|
|
440
|
+
width: '15px',
|
|
441
|
+
height: '15px'
|
|
442
|
+
}
|
|
443
|
+
}),
|
|
444
|
+
descriptionButton: t.fileArea.modal.chooseFile,
|
|
445
|
+
widthButton: "230px"
|
|
446
|
+
}) : React__default.createElement(Table$1, null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
|
|
380
447
|
className: "th_file_name"
|
|
381
448
|
}, t.fileArea.fileName), React__default.createElement("th", {
|
|
382
449
|
className: "th_pressets"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code7-leia.cjs.development.js","sources":["../src/components/Tabs/styles.tsx","../src/components/Tabs/index.tsx","../src/utils/getLanguage.tsx","../src/components/FileArea/styles.tsx","../src/components/FileArea/components/Table/styles.tsx","../src/components/FileArea/components/Spinner/styles.tsx","../src/components/FileArea/components/Spinner/index.tsx","../src/components/FileArea/components/Table/index.tsx","../src/components/FileArea/components/Search/index.tsx","../src/components/FileArea/index.tsx","../src/components/TestArea/index.tsx","../src/Leia.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { ReactNode } from 'react';\n\ninterface TabProps {\n children: ReactNode;\n}\n\ninterface OptionProps {\n children: ReactNode;\n onClick: () => void;\n}\n\nexport const TabsPane = styled.ul`\n width: max-content;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--neutral-1);\n`;\n\nexport const Tab = styled.li<TabProps>`\n padding: 12px;\n color: var(--neutral-3);\n font-size: 0.875rem;\n font-weight: normal;\n position: relative;\n cursor: pointer;\n\n svg {\n fill: var(--neutral-3) !important;\n margin-left: 8px;\n }\n\n &.active {\n color: var(--primary-700-light);\n\n svg {\n fill: var(--primary-700-light) !important;\n }\n\n ::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--primary-700-light);\n }\n }\n\n &:not(:last-child) {\n margin-right: 8px;\n }\n`;\n\nexport const DropdownContainer = styled.div`\n position: absolute;\n left: 0px;\n top: 40px;\n display: flex;\n flex-direction: column;\n\n background: #ffffff;\n\n border: 1px solid #979aa5;\n box-sizing: border-box;\n box-shadow: 0px 6px 12px -6px rgba(24, 39, 75, 0.12),\n 0px 8px 24px -4px rgba(24, 39, 75, 0.08);\n border-radius: 4px;\n padding: 8px;\n z-index: 2;\n`;\n\nexport const Option = styled.div<OptionProps>`\n padding: 8px;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &:hover {\n background-color: var(--primary-800-light);\n color: white;\n }\n`;\n","import React, { ReactNode } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\ninterface TabProps {\n children: ReactNode;\n active?: boolean;\n}\n\ninterface ITabsProps {\n children: ReactNode;\n value: string | number;\n onChange: (e: any) => void;\n active?: boolean;\n}\n\nexport const Tab = ({ active, children, ...rest }: TabProps) => {\n return (\n <S.Tab className={cc({ active })} {...rest}>\n {children}\n </S.Tab>\n );\n};\n\nTab.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n PropTypes.node,\n ]).isRequired,\n onChange: PropTypes.func,\n value: PropTypes.string,\n active: PropTypes.bool,\n};\n\nTab.defaultProps = {\n onChange: () => {},\n value: '',\n active: false,\n};\n\nexport const Tabs = ({ children: childrenProp, value, onChange, ...rest }: ITabsProps) => {\n const children = React.Children.map(childrenProp, (child) => {\n if (!React.isValidElement(child)) {\n return null;\n }\n\n if (Array.isArray(child.props?.children)) {\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n value,\n onChange,\n });\n }\n\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n onClick: () => onChange(child.props?.value),\n });\n });\n\n return <S.TabsPane {...rest}>{children}</S.TabsPane>;\n};\n\nTabs.propTypes = {\n children: PropTypes.node.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n onChange: PropTypes.func.isRequired,\n};\n","\nimport { Language } from '../interface/Language'\n\nconst defaultLanguage: Language = {\n files: 'Files',\n test: 'Test',\n fileArea: {\n description: 'bla bla bla bla bla',\n fileName: 'File name',\n presset: 'Presset',\n actions: 'Actions',\n search: 'Search',\n fileUpload: 'File upload',\n emptyState: {\n title: 'No data',\n description: 'bla bla bla bla bla',\n },\n modal: {\n descriptionUpload: 'Drag and drop files here or',\n chooseFile: 'Choose a file',\n },\n },\n buttons: {\n cancel: 'Cancel',\n send: 'Send',\n delete: 'Delete',\n test: 'Test',\n },\n testArea: {\n description: 'bla bla bla bla bla',\n typeSentence: 'Type a sentence',\n selectPersona: 'Select a Persona',\n selectPresset: 'Select a presset',\n emptyState: {\n title: 'No data for analysis',\n description: 'Do a search, click the \"Test\" button.',\n },\n },\n};\n\nexport const getLanguage = (language: keyof Record<'en' | 'pt-br' | 'es', Language>): Language => {\n const languages = {\n en: defaultLanguage,\n 'pt-br': {\n files: 'Arquivos',\n test: 'Teste',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nome do arquivo',\n presset: 'Presset',\n actions: 'Ações',\n search: 'Pesquisar',\n fileUpload: 'Upload de arquivo',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sem dados',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arraste e solte os arquivos aqui ou',\n chooseFile: 'Escolha um arquivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Excluir',\n test: 'Testar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Digite uma frase',\n selectPersona: 'Selecione uma Persona',\n selectPresset: 'Selecione uma predefinição',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sem dados para análise',\n description: 'Faça uma pesquisa, clique no botão \"Teste\".',\n },\n },\n },\n es: {\n ...defaultLanguage,\n files: 'Archivos',\n test: 'Prueba',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nombre del archivo',\n presset: 'Presset',\n actions: 'Acciones',\n search: 'Buscar',\n fileUpload: 'Carga de archivos',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sin datos',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arrastre y suelte los archivos aquí o',\n chooseFile: 'Elegir un archivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Eliminar',\n test: 'Probar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Escribe una oración',\n selectPersona: 'Seleccionar una Persona',\n selectPresset: 'Seleccionar una configuración preestablecida',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sin datos para el análisis',\n description: 'Realiza una búsqueda, haz clic en el botón \"Prueba\".',\n },\n },\n },\n };\n\n return languages[language] || defaultLanguage;\n};\n","import styled from 'styled-components';\n\nexport const Container = styled.div`\n .tag {\n padding: 4px 8px 4px 8px;\n background: #C7F9ED;\n border-radius: 4px;\n }\n\n .tags {\n display: flex;\n justify-content: left;\n gap: 4px;\n }\n\n .divDelete {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .buttonDelete {\n color: #5b0a1f;\n background: #fae0d2;\n padding: 12px 20px;\n border-radius: 4px;\n }\n\n .buttonDelete:hover {\n background: #f5bba7;\n }\n`;\n\nexport const Header = styled.div`\n display: flex;\n flex-direction: column;\n\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n padding-bottom: 14px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n }\n }\n\n`\n","import styled from 'styled-components';\n\nexport const TableWrapper = styled.div`\n width: 100%;\n height: max-content;\n min-height: 50px;\n position: relative;\n`;\n\nexport const Table = styled.table`\n font-size: 14px;\n line-height: 143%;\n color: black;\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n\n th {\n font-weight: 600;\n font-size: 14px;\n line-height: 143%;\n letter-spacing: 0.018em;\n color: #5A5D68;\n text-align: left;\n padding: 8px;\n border-radius: 4px;\n }\n\n thead tr {\n background: #dadce3;\n }\n\n tbody tr {\n border: 1px solid #dadce3;\n }\n\n &.small td {\n padding: 4px;\n }\n\n &.medium td {\n padding: 8px;\n }\n\n &.large td {\n padding: 16px;\n }\n`;\n\nexport const TableLoadingWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f3f5f961;\n`;\n","import styled from 'styled-components';\n\nexport const SpinnerWrapper = styled.span`\n display: inline-block;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.spinner--sm {\n width: 24px;\n height: 24px;\n }\n\n &.spinner--md {\n width: 32px;\n height: 32px;\n }\n\n &.spinner--lg {\n width: 60px;\n height: 60px;\n }\n\n span {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 8px;\n border: 4px solid #fff;\n border-radius: 50%;\n animation: rotateSpinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${(props) => `var(--${props.color})`} transparent transparent\n transparent;\n }\n\n & span:nth-child(1) {\n animation-delay: -0.45s;\n }\n\n & span:nth-child(2) {\n animation-delay: -0.3s;\n }\n\n & span:nth-child(3) {\n animation-delay: -0.15s;\n }\n\n @keyframes rotateSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n","import React from 'react';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\nimport { SpinnerProps } from '../../../../interface/Table'\n\nconst Spinner: React.FC<SpinnerProps> = ({ color = 'neutral-3', size = 'md', className }) => {\n return (\n <S.SpinnerWrapper\n color={color}\n className={cc([`spinner--${size}`, className])}\n >\n <span />\n <span />\n <span />\n <span />\n </S.SpinnerWrapper>\n );\n};\n\nexport default Spinner;\n","import React, { forwardRef, Ref } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\nimport Spinner from '../Spinner';\n\nimport { TableProps } from '../../../../interface/Table'\n\nconst Table = forwardRef(\n ({ size = 'medium', children, isLoading = false, className = '', ...props }: TableProps, ref: Ref<HTMLTableElement>) => {\n return (\n <S.TableWrapper className={className}>\n {isLoading ? (\n <S.TableLoadingWrapper>\n <Spinner />\n </S.TableLoadingWrapper>\n ) : null}\n <S.Table className={cc([size])} ref={ref} {...props}>\n {children}\n </S.Table>\n </S.TableWrapper>\n );\n }\n);\n\nTable.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n size: PropTypes.oneOf(['small', 'medium', 'large']),\n isLoading: PropTypes.bool,\n};\n\nexport default Table;\n","import React from 'react';\nimport unorm from 'unorm';\nimport { FaSearch } from 'react-icons/fa';\nimport type { FileData } from '../../../../interface/FileData'\n\ninterface SearchInputProps {\n placeholder: string;\n initialFiles: FileData[]\n setFiles: React.Dispatch<React.SetStateAction<FileData[]>>;\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ placeholder, setFiles, initialFiles }) => {\n\n const searchName = (e: React.ChangeEvent<HTMLInputElement>) => {\n const searchTerm = e.target.value.trim();\n const normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();\n\n console.log('searchTerm: ', searchTerm)\n console.log('initialFiles: ', initialFiles)\n \n const newFiles = initialFiles.filter(file => {\n const normalizedFileName = unorm.nfkd(file.name).toLowerCase();\n return normalizedFileName.includes(normalizedSearchTerm);\n });\n\n console.log('newFiles: ', newFiles)\n console.log('searchTerm !== \"\" ? newFiles : initialFiles: ', searchTerm !== '' ? newFiles : initialFiles)\n \n setFiles(searchTerm !== '' && newFiles.length > 0 ? newFiles : initialFiles);\n}\n \n\n return (\n <div style={{ position: 'relative', width: '300px' }}>\n <input\n type=\"text\"\n onChange={(e) => searchName(e)}\n placeholder={placeholder}\n style={{\n paddingLeft: '40px',\n borderRadius: '5px',\n border: '1px solid #ccc',\n height: '40px',\n width: '100%',\n }}\n />\n <div\n style={{\n position: 'absolute',\n top: '10px',\n left: '10px',\n pointerEvents: 'none', \n }}\n >\n <FaSearch />\n </div>\n </div>\n );\n};\n\nexport default SearchInput;\n","import React, { useEffect, useState} from 'react';\n\nimport { FaUpload } from 'react-icons/fa';\n\n// import { formatAxios } from '../../utils/formatAxios'\n\nimport { useLocation } from 'react-router-dom';\n\nimport type { FileData } from '../../interface/FileData'\n\nimport { getLanguage } from '../../utils/getLanguage'\n\nimport * as S from './styles';\nimport Table from './components/Table';\nimport Search from './components/Search';\n\nexport const FileArea = () => {\n const [files, setFiles] = useState<FileData[]>([]);\n const [initialFiles, setInitialFiles] = useState<FileData[]>([]);\n const { pathname } = useLocation();\n const id = pathname.split('/')[4]\n const t = getLanguage('pt-br')\n\n useEffect(() => {\n setFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n\n setInitialFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n }, [])\n\n useEffect(() => {\n console.log('files, id, t: ', files, id, t)\n }, [files])\n\n const presset = (tags: string) => {\n const tagsSplit = tags.split(',');\n let html = '';\n\n html += tagsSplit.map(tag => {\n return `<p class='tag'>${tag}</p>`;\n }).join('');\n\n return html;\n}\n\n const renderFiles = () => {\n if (files.length === 0) {\n return null;\n }\n \n return (\n <S.Container>\n <S.Header>\n <div className='infos'>\n <h2>{t.files}</h2>\n <p>{t.fileArea.description}</p>\n </div>\n <div className='actions'>\n <Search placeholder={t.fileArea.search} setFiles={setFiles} initialFiles={initialFiles}></Search>\n <button><FaUpload /> {t.fileArea.fileUpload}</button>\n </div>\n </S.Header>\n <Table>\n <thead>\n <tr>\n <th className=\"th_file_name\">\n {t.fileArea.fileName}\n </th>\n <th className=\"th_pressets\">\n {t.fileArea.presset}\n </th>\n <th className=\"th_actions\">\n {t.fileArea.actions}\n </th>\n </tr>\n </thead>\n\n <tbody>\n {files.map((object) => (\n <tr>\n <td>{object.name}</td>\n <td className='tags' dangerouslySetInnerHTML={{ __html: presset(object.tags) }} />\n <td>\n <div className='divDelete'>\n <button className='buttonDelete'>{t.buttons.delete}</button>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </Table>\n </S.Container>\n );\n }\n\n return (\n <S.Container>\n {renderFiles()}\n </S.Container>\n );\n};","import React from 'react';\n\nexport const TestArea = () => {\n return (\n <div>\n <p>Teste Area</p>\n \n </div>\n );\n};","import React, { useMemo, Suspense } from 'react';\n\nimport { Route, useLocation, useRouteMatch, useHistory, Switch as SwitchRoute } from 'react-router-dom';\n\nimport type { Props } from './index';\nimport { Tab, Tabs } from './components/Tabs'\n\nimport { getLanguage } from './utils/getLanguage'\n\nimport { FileArea } from './components/FileArea';\nimport { TestArea } from './components/TestArea';\n\nexport const Leia = (props: Props) => {\n const match = useRouteMatch();\n const { pathname } = useLocation();\n const history = useHistory();\n\n const t = getLanguage(props.language)\n\n const activeTab = useMemo(() => {\n return pathname.split('/')[5] || 'files';\n }, [pathname]);\n\n return (\n <>\n <Tabs\n value={activeTab}\n onChange={(value) => history.push(`${match.url}/${value}`)}\n >\n <Tab value=\"files\">{t.files}</Tab>\n <Tab value=\"test\">{t.test}</Tab>\n </Tabs>\n <Suspense fallback={props.loading}>\n <SwitchRoute>\n <Route path={`${match.path}`} exact component={FileArea} />\n <Route path={`${match.path}/files`} component={FileArea} />\n <Route path={`${match.path}/test`} component={TestArea} />\n </SwitchRoute>\n </Suspense>\n </>\n );\n};","import type { PropsWithChildren, ReactElement } from 'react';\nimport React from 'react';\nimport { Leia } from './Leia';\n\nexport type Props = PropsWithChildren<{\n id: string;\n activeTab: string;\n language: \"en\" | \"pt-br\" | \"es\";\n loading: ReactElement\n}>;\n\nexport function Code7(props: Props) {\n return <Leia {...props} />;\n}"],"names":["TabsPane","styled","ul","_templateObject","_taggedTemplateLiteralLoose","Tab","li","_templateObject2","_ref","active","children","rest","_objectWithoutPropertiesLoose","_excluded","React","S","className","cc","propTypes","PropTypes","oneOfType","string","element","node","isRequired","onChange","func","value","bool","defaultProps","Tabs","_ref2","childrenProp","_excluded2","Children","map","child","isValidElement","Array","isArray","_child$props","props","_child$props2","cloneElement","_child$props3","onClick","_child$props4","number","defaultLanguage","files","test","fileArea","description","fileName","presset","actions","search","fileUpload","emptyState","title","modal","descriptionUpload","chooseFile","buttons","cancel","send","testArea","typeSentence","selectPersona","selectPresset","getLanguage","language","languages","en","_extends","es","Container","div","Header","TableWrapper","Table","table","TableLoadingWrapper","_templateObject3","SpinnerWrapper","span","color","Spinner","_ref$color","_ref$size","size","forwardRef","ref","_ref$isLoading","isLoading","_ref$className","oneOf","SearchInput","placeholder","setFiles","initialFiles","searchName","e","searchTerm","target","trim","normalizedSearchTerm","unorm","nfkd","toLowerCase","console","log","newFiles","filter","file","normalizedFileName","name","includes","length","style","position","width","type","paddingLeft","borderRadius","border","height","top","left","pointerEvents","FaSearch","FileArea","_useState","useState","_useState2","setInitialFiles","_useLocation","useLocation","pathname","id","split","t","useEffect","tags","tagsSplit","html","tag","join","renderFiles","Search","FaUpload","object","dangerouslySetInnerHTML","__html","TestArea","Leia","match","useRouteMatch","history","useHistory","activeTab","useMemo","push","url","Suspense","fallback","loading","SwitchRoute","Route","path","exact","component","Code7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAMA,QAAQ,gBAAGC,MAAM,CAACC,EAAE,CAAAC,eAAA,KAAAA,eAAA,gBAAAC,2BAA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AC3F,IAAI,CAAO,CAC3B,EACPpC,6BAACsJ,cAAQ;IAACC,QAAQ,EAAE5H,KAAK,CAAC6H;KACxBxJ,6BAACyJ,qBAAW,QACVzJ,6BAAC0J,oBAAK;IAACC,IAAI,OAAKb,KAAK,CAACa,IAAM;IAAEC,KAAK;IAACC,SAAS,EAAExC;IAAY,EAC3DrH,6BAAC0J,oBAAK;IAACC,IAAI,EAAKb,KAAK,CAACa,IAAI,WAAQ;IAAEE,SAAS,EAAExC;IAAY,EAC3DrH,6BAAC0J,oBAAK;IAACC,IAAI,EAAKb,KAAK,CAACa,IAAI,UAAO;IAAEE,SAAS,EAAEjB;IAAY,CAC9C,CACL,CACV;AAEP,CAAC;;SC9BekB,KAAKA,CAACnI,KAAY;EAChC,OAAO3B,6BAAC6I,IAAI,oBAAKlH,KAAK,EAAI;AAC5B;;;;"}
|
|
1
|
+
{"version":3,"file":"code7-leia.cjs.development.js","sources":["../src/components/Tabs/styles.tsx","../src/components/Tabs/index.tsx","../src/utils/getLanguage.tsx","../src/components/FileArea/styles.tsx","../src/components/FileArea/components/Table/styles.tsx","../src/components/FileArea/components/Spinner/styles.tsx","../src/components/FileArea/components/Spinner/index.tsx","../src/components/FileArea/components/Table/index.tsx","../src/components/FileArea/components/Search/index.tsx","../src/components/FileArea/components/EmptyState/styles.tsx","../src/components/FileArea/components/EmptyState/index.tsx","../src/components/FileArea/index.tsx","../src/components/TestArea/index.tsx","../src/Leia.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { ReactNode } from 'react';\n\ninterface TabProps {\n children: ReactNode;\n}\n\ninterface OptionProps {\n children: ReactNode;\n onClick: () => void;\n}\n\nexport const TabsPane = styled.ul`\n width: max-content;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--neutral-1);\n`;\n\nexport const Tab = styled.li<TabProps>`\n padding: 12px;\n color: var(--neutral-3);\n font-size: 0.875rem;\n font-weight: normal;\n position: relative;\n cursor: pointer;\n\n svg {\n fill: var(--neutral-3) !important;\n margin-left: 8px;\n }\n\n &.active {\n color: var(--primary-700-light);\n\n svg {\n fill: var(--primary-700-light) !important;\n }\n\n ::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--primary-700-light);\n }\n }\n\n &:not(:last-child) {\n margin-right: 8px;\n }\n`;\n\nexport const DropdownContainer = styled.div`\n position: absolute;\n left: 0px;\n top: 40px;\n display: flex;\n flex-direction: column;\n\n background: #ffffff;\n\n border: 1px solid #979aa5;\n box-sizing: border-box;\n box-shadow: 0px 6px 12px -6px rgba(24, 39, 75, 0.12),\n 0px 8px 24px -4px rgba(24, 39, 75, 0.08);\n border-radius: 4px;\n padding: 8px;\n z-index: 2;\n`;\n\nexport const Option = styled.div<OptionProps>`\n padding: 8px;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &:hover {\n background-color: var(--primary-800-light);\n color: white;\n }\n`;\n","import React, { ReactNode } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\ninterface TabProps {\n children: ReactNode;\n active?: boolean;\n}\n\ninterface ITabsProps {\n children: ReactNode;\n value: string | number;\n onChange: (e: any) => void;\n active?: boolean;\n}\n\nexport const Tab = ({ active, children, ...rest }: TabProps) => {\n return (\n <S.Tab className={cc({ active })} {...rest}>\n {children}\n </S.Tab>\n );\n};\n\nTab.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n PropTypes.node,\n ]).isRequired,\n onChange: PropTypes.func,\n value: PropTypes.string,\n active: PropTypes.bool,\n};\n\nTab.defaultProps = {\n onChange: () => {},\n value: '',\n active: false,\n};\n\nexport const Tabs = ({ children: childrenProp, value, onChange, ...rest }: ITabsProps) => {\n const children = React.Children.map(childrenProp, (child) => {\n if (!React.isValidElement(child)) {\n return null;\n }\n\n if (Array.isArray(child.props?.children)) {\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n value,\n onChange,\n });\n }\n\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n onClick: () => onChange(child.props?.value),\n });\n });\n\n return <S.TabsPane {...rest}>{children}</S.TabsPane>;\n};\n\nTabs.propTypes = {\n children: PropTypes.node.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n onChange: PropTypes.func.isRequired,\n};\n","\nimport { Language } from '../interface/Language'\n\nconst defaultLanguage: Language = {\n files: 'Files',\n test: 'Test',\n fileArea: {\n description: 'bla bla bla bla bla',\n fileName: 'File name',\n presset: 'Presset',\n actions: 'Actions',\n search: 'Search',\n fileUpload: 'File upload',\n emptyState: {\n title: 'No data',\n description: 'bla bla bla bla bla',\n },\n modal: {\n descriptionUpload: 'Drag and drop files here or',\n chooseFile: 'Choose a file',\n },\n },\n buttons: {\n cancel: 'Cancel',\n send: 'Send',\n delete: 'Delete',\n test: 'Test',\n },\n testArea: {\n description: 'bla bla bla bla bla',\n typeSentence: 'Type a sentence',\n selectPersona: 'Select a Persona',\n selectPresset: 'Select a presset',\n emptyState: {\n title: 'No data for analysis',\n description: 'Do a search, click the \"Test\" button.',\n },\n },\n};\n\nexport const getLanguage = (language: keyof Record<'en' | 'pt-br' | 'es', Language>): Language => {\n const languages = {\n en: defaultLanguage,\n 'pt-br': {\n files: 'Arquivos',\n test: 'Teste',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nome do arquivo',\n presset: 'Presset',\n actions: 'Ações',\n search: 'Pesquisar',\n fileUpload: 'Upload de arquivo',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sem dados',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arraste e solte os arquivos aqui ou',\n chooseFile: 'Escolha um arquivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Excluir',\n test: 'Testar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Digite uma frase',\n selectPersona: 'Selecione uma Persona',\n selectPresset: 'Selecione uma predefinição',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sem dados para análise',\n description: 'Faça uma pesquisa, clique no botão \"Teste\".',\n },\n },\n },\n es: {\n ...defaultLanguage,\n files: 'Archivos',\n test: 'Prueba',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nombre del archivo',\n presset: 'Presset',\n actions: 'Acciones',\n search: 'Buscar',\n fileUpload: 'Carga de archivos',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sin datos',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arrastre y suelte los archivos aquí o',\n chooseFile: 'Elegir un archivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Eliminar',\n test: 'Probar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Escribe una oración',\n selectPersona: 'Seleccionar una Persona',\n selectPresset: 'Seleccionar una configuración preestablecida',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sin datos para el análisis',\n description: 'Realiza una búsqueda, haz clic en el botón \"Prueba\".',\n },\n },\n },\n };\n\n return languages[language] || defaultLanguage;\n};\n","import styled from 'styled-components';\n\nexport const Container = styled.div`\n .tag {\n padding: 4px 8px 4px 8px;\n background: #C7F9ED;\n border-radius: 4px;\n }\n\n .tags {\n display: flex;\n justify-content: left;\n gap: 4px;\n }\n\n .divDelete {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .buttonDelete {\n color: #5b0a1f;\n background: #fae0d2;\n padding: 12px 20px;\n border-radius: 4px;\n }\n\n .buttonDelete:hover {\n background: #f5bba7;\n }\n`;\n\nexport const Header = styled.div`\n display: flex;\n flex-direction: column;\n\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n padding-bottom: 14px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n }\n }\n\n`\n","import styled from 'styled-components';\n\nexport const TableWrapper = styled.div`\n width: 100%;\n height: max-content;\n min-height: 50px;\n position: relative;\n`;\n\nexport const Table = styled.table`\n font-size: 14px;\n line-height: 143%;\n color: black;\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n\n th {\n font-weight: 600;\n font-size: 14px;\n line-height: 143%;\n letter-spacing: 0.018em;\n color: #5A5D68;\n text-align: left;\n padding: 8px;\n border-radius: 4px;\n }\n\n thead tr {\n background: #dadce3;\n }\n\n tbody tr {\n border: 1px solid #dadce3;\n }\n\n &.small td {\n padding: 4px;\n }\n\n &.medium td {\n padding: 8px;\n }\n\n &.large td {\n padding: 16px;\n }\n`;\n\nexport const TableLoadingWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f3f5f961;\n`;\n","import styled from 'styled-components';\n\nexport const SpinnerWrapper = styled.span`\n display: inline-block;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.spinner--sm {\n width: 24px;\n height: 24px;\n }\n\n &.spinner--md {\n width: 32px;\n height: 32px;\n }\n\n &.spinner--lg {\n width: 60px;\n height: 60px;\n }\n\n span {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 8px;\n border: 4px solid #fff;\n border-radius: 50%;\n animation: rotateSpinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${(props) => `var(--${props.color})`} transparent transparent\n transparent;\n }\n\n & span:nth-child(1) {\n animation-delay: -0.45s;\n }\n\n & span:nth-child(2) {\n animation-delay: -0.3s;\n }\n\n & span:nth-child(3) {\n animation-delay: -0.15s;\n }\n\n @keyframes rotateSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n","import React from 'react';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\nimport { SpinnerProps } from '../../../../interface/Table'\n\nconst Spinner: React.FC<SpinnerProps> = ({ color = 'neutral-3', size = 'md', className }) => {\n return (\n <S.SpinnerWrapper\n color={color}\n className={cc([`spinner--${size}`, className])}\n >\n <span />\n <span />\n <span />\n <span />\n </S.SpinnerWrapper>\n );\n};\n\nexport default Spinner;\n","import React, { forwardRef, Ref } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\nimport Spinner from '../Spinner';\n\nimport { TableProps } from '../../../../interface/Table'\n\nconst Table = forwardRef(\n ({ size = 'medium', children, isLoading = false, className = '', ...props }: TableProps, ref: Ref<HTMLTableElement>) => {\n return (\n <S.TableWrapper className={className}>\n {isLoading ? (\n <S.TableLoadingWrapper>\n <Spinner />\n </S.TableLoadingWrapper>\n ) : null}\n <S.Table className={cc([size])} ref={ref} {...props}>\n {children}\n </S.Table>\n </S.TableWrapper>\n );\n }\n);\n\nTable.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n size: PropTypes.oneOf(['small', 'medium', 'large']),\n isLoading: PropTypes.bool,\n};\n\nexport default Table;\n","import React from 'react';\nimport unorm from 'unorm';\nimport { FaSearch } from 'react-icons/fa';\nimport type { FileData } from '../../../../interface/FileData'\n\ninterface SearchInputProps {\n placeholder: string;\n initialFiles: FileData[]\n setFiles: React.Dispatch<React.SetStateAction<FileData[]>>;\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ placeholder, setFiles, initialFiles }) => {\n\n const searchName = (e: React.ChangeEvent<HTMLInputElement>) => {\n const searchTerm = e.target.value.trim();\n const normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();\n \n const newFiles = initialFiles.filter(file => {\n const normalizedFileName = unorm.nfkd(file.name).toLowerCase();\n return normalizedFileName.includes(normalizedSearchTerm);\n });\n \n setFiles(searchTerm !== '' ? newFiles : initialFiles);\n}\n \n\n return (\n <div style={{ position: 'relative', width: '300px' }}>\n <input\n type=\"text\"\n onChange={(e) => searchName(e)}\n placeholder={placeholder}\n style={{\n paddingLeft: '40px',\n borderRadius: '5px',\n border: '1px solid #ccc',\n height: '40px',\n width: '100%',\n }}\n />\n <div\n style={{\n position: 'absolute',\n top: '10px',\n left: '10px',\n pointerEvents: 'none', \n }}\n >\n <FaSearch />\n </div>\n </div>\n );\n};\n\nexport default SearchInput;\n","import styled from 'styled-components';\n\ninterface ContainerProps {\n hasBorder?: boolean;\n backgroundColor?: string;\n backgroundIcon?: string;\n}\n\nexport const Container = styled.div<ContainerProps>`\n width: 100%;\n display: flex;\n justify-content: center;\n padding: 24px 0;\n height: 193px;\n\n background: ${({ hasBorder }) =>\n hasBorder &&\n `linear-gradient(\n to right,\n #dadce3 50%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)`};\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 40px 1px, 1px 40px;\n background-color: ${({ backgroundColor }) => backgroundColor};\n\n & .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n & > .icon {\n background-color: ${({ backgroundIcon }) => backgroundIcon};\n border-radius: 16px;\n width: 145px;\n height: 145px;\n\n display: flex;\n justify-content: center;\n\n & img {\n width: 72px;\n }\n }\n\n & .description {\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px 0 8px 24px;\n\n .button-add {\n cursor: pointer;\n }\n\n .start-icon {\n display: flex;\n align-items: center;\n }\n }\n }\n`;\n","import React, { FC, ReactElement } from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './styles';\n\ninterface EmptyStateProps {\n icon?: string | ReactElement;\n title?: string;\n description?: string;\n activeButton?: boolean;\n iconButton?: ReactElement;\n descriptionButton?: string;\n widthButton?: string;\n button?: ReactElement;\n backgroundIcon?: string;\n backgroundColor?: string;\n hasBorder?: boolean;\n}\n\nconst EmptyState: FC<EmptyStateProps> = ({\n icon,\n title,\n description,\n activeButton,\n iconButton,\n descriptionButton,\n widthButton,\n button,\n backgroundIcon,\n backgroundColor,\n hasBorder,\n ...rest\n}) => {\n return (\n <S.Container\n backgroundIcon={backgroundIcon}\n backgroundColor={backgroundColor}\n hasBorder={hasBorder}\n {...rest}\n >\n <div className=\"content\">\n <div className=\"icon\">\n {icon}\n </div>\n <div className=\"description\">\n <h5> {title}</h5>\n\n <p>{description}</p>\n\n {activeButton ? (\n <button>\n {descriptionButton}\n </button>\n ) : null}\n\n {button}\n </div>\n </div>\n </S.Container>\n );\n};\n\nEmptyState.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n title: PropTypes.string,\n description: PropTypes.string,\n activeButton: PropTypes.bool,\n iconButton: PropTypes.element,\n descriptionButton: PropTypes.string,\n widthButton: PropTypes.string,\n button: PropTypes.element,\n backgroundIcon: PropTypes.string,\n backgroundColor: PropTypes.string,\n hasBorder: PropTypes.bool,\n};\n\nEmptyState.defaultProps = {\n icon: '',\n title: '',\n description: '',\n activeButton: false,\n descriptionButton: '',\n widthButton: '140px',\n backgroundIcon: 'var(--neutral-0)',\n backgroundColor: 'var(--absolute-white)',\n hasBorder: true,\n};\n\nexport default EmptyState;\n","import React, { useEffect, useState} from 'react';\n\nimport { FaUpload, FaList, FaPlus } from 'react-icons/fa';\n\n// import { formatAxios } from '../../utils/formatAxios'\n\nimport { useLocation } from 'react-router-dom';\n\nimport type { FileData } from '../../interface/FileData'\n\nimport { getLanguage } from '../../utils/getLanguage'\n\nimport * as S from './styles';\nimport Table from './components/Table';\nimport Search from './components/Search';\nimport EmptyState from './components/EmptyState';\n\nexport const FileArea = () => {\n const [files, setFiles] = useState<FileData[]>([]);\n const [initialFiles, setInitialFiles] = useState<FileData[]>([]);\n const { pathname } = useLocation();\n const id = pathname.split('/')[4]\n const t = getLanguage('pt-br')\n\n useEffect(() => {\n setFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n\n setInitialFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n }, [])\n\n useEffect(() => {\n console.log('files, id, t: ', files, id, t)\n }, [files])\n\n const presset = (tags: string) => {\n const tagsSplit = tags.split(',');\n let html = '';\n\n html += tagsSplit.map(tag => {\n return `<p class='tag'>${tag}</p>`;\n }).join('');\n\n return html;\n}\n\n const renderFiles = () => { \n return (\n <S.Container>\n <S.Header>\n <div className='infos'>\n <h2>{t.files}</h2>\n <p>{t.fileArea.description}</p>\n </div>\n <div className='actions'>\n <Search placeholder={t.fileArea.search} setFiles={setFiles} initialFiles={initialFiles}></Search>\n <button><FaUpload /> {t.fileArea.fileUpload}</button>\n </div>\n </S.Header>\n {\n files.length === 0 ? (\n <EmptyState\n icon={<FaList></FaList>}\n title={t.fileArea.emptyState.title}\n description={t.fileArea.emptyState.description}\n activeButton\n iconButton={<FaPlus style={{ width: '15px', height: '15px' }} />}\n descriptionButton={t.fileArea.modal.chooseFile}\n widthButton=\"230px\"\n />\n ) : <Table>\n <thead>\n <tr>\n <th className=\"th_file_name\">\n {t.fileArea.fileName}\n </th>\n <th className=\"th_pressets\">\n {t.fileArea.presset}\n </th>\n <th className=\"th_actions\">\n {t.fileArea.actions}\n </th>\n </tr>\n </thead>\n\n <tbody>\n {files.map((object) => (\n <tr>\n <td>{object.name}</td>\n <td className='tags' dangerouslySetInnerHTML={{ __html: presset(object.tags) }} />\n <td>\n <div className='divDelete'>\n <button className='buttonDelete'>{t.buttons.delete}</button>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </Table>\n }\n \n </S.Container>\n );\n }\n\n return (\n <S.Container>\n {renderFiles()}\n </S.Container>\n );\n};","import React from 'react';\n\nexport const TestArea = () => {\n return (\n <div>\n <p>Teste Area</p>\n \n </div>\n );\n};","import React, { useMemo, Suspense } from 'react';\n\nimport { Route, useLocation, useRouteMatch, useHistory, Switch as SwitchRoute } from 'react-router-dom';\n\nimport type { Props } from './index';\nimport { Tab, Tabs } from './components/Tabs'\n\nimport { getLanguage } from './utils/getLanguage'\n\nimport { FileArea } from './components/FileArea';\nimport { TestArea } from './components/TestArea';\n\nexport const Leia = (props: Props) => {\n const match = useRouteMatch();\n const { pathname } = useLocation();\n const history = useHistory();\n\n const t = getLanguage(props.language)\n\n const activeTab = useMemo(() => {\n return pathname.split('/')[5] || 'files';\n }, [pathname]);\n\n return (\n <>\n <Tabs\n value={activeTab}\n onChange={(value) => history.push(`${match.url}/${value}`)}\n >\n <Tab value=\"files\">{t.files}</Tab>\n <Tab value=\"test\">{t.test}</Tab>\n </Tabs>\n <Suspense fallback={props.loading}>\n <SwitchRoute>\n <Route path={`${match.path}`} exact component={FileArea} />\n <Route path={`${match.path}/files`} component={FileArea} />\n <Route path={`${match.path}/test`} component={TestArea} />\n </SwitchRoute>\n </Suspense>\n </>\n );\n};","import type { PropsWithChildren, ReactElement } from 'react';\nimport React from 'react';\nimport { Leia } from './Leia';\n\nexport type Props = PropsWithChildren<{\n id: string;\n activeTab: string;\n language: \"en\" | \"pt-br\" | \"es\";\n loading: ReactElement\n}>;\n\nexport function Code7(props: Props) {\n return <Leia {...props} />;\n}"],"names":["TabsPane","styled","ul","_templateObject","_taggedTemplateLiteralLoose","Tab","li","_templateObject2","_ref","active","children","rest","_objectWithoutPropertiesLoose","_excluded","React","S","className","cc","propTypes","PropTypes","oneOfType","string","element","node","isRequired","onChange","func","value","bool","defaultProps","Tabs","_ref2","childrenProp","_excluded2","Children","map","child","isValidElement","Array","isArray","_child$props","props","_child$props2","cloneElement","_child$props3","onClick","_child$props4","number","defaultLanguage","files","test","fileArea","description","fileName","presset","actions","search","fileUpload","emptyState","title","modal","descriptionUpload","chooseFile","buttons","cancel","send","testArea","typeSentence","selectPersona","selectPresset","getLanguage","language","languages","en","_extends","es","Container","div","Header","TableWrapper","Table","table","TableLoadingWrapper","_templateObject3","SpinnerWrapper","span","color","Spinner","_ref$color","_ref$size","size","forwardRef","ref","_ref$isLoading","isLoading","_ref$className","oneOf","SearchInput","placeholder","setFiles","initialFiles","searchName","e","searchTerm","target","trim","normalizedSearchTerm","unorm","nfkd","toLowerCase","newFiles","filter","file","normalizedFileName","name","includes","style","position","width","type","paddingLeft","borderRadius","border","height","top","left","pointerEvents","FaSearch","hasBorder","backgroundColor","_ref3","backgroundIcon","EmptyState","icon","activeButton","iconButton","descriptionButton","widthButton","button","FileArea","_useState","useState","_useState2","setInitialFiles","_useLocation","useLocation","pathname","id","split","t","useEffect","console","log","tags","tagsSplit","html","tag","join","renderFiles","Search","FaUpload","length","FaList","FaPlus","object","dangerouslySetInnerHTML","__html","TestArea","Leia","match","useRouteMatch","history","useHistory","activeTab","useMemo","push","url","Suspense","fallback","loading","SwitchRoute","Route","path","exact","component","Code7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAMA,QAAQ,gBAAGC,MAAM,CAACC,EAAE,CAAAC,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KAAK,CAACa,IAAI,WAAQ;IAAEE,SAAS,EAAE7C;IAAY,EAC3D7H,6BAACuK,oBAAK;IAACC,IAAI,EAAKb,KAAK,CAACa,IAAI,UAAO;IAAEE,SAAS,EAAEjB;IAAY,CAC9C,CACL,CACV;AAEP,CAAC;;SC9BekB,KAAKA,CAAChJ,KAAY;EAChC,OAAO3B,6BAAC0J,IAAI,oBAAK/H,KAAK,EAAI;AAC5B;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n,t,a=require("react"),l=e(a),r=require("react-router-dom"),i=e(require("prop-types")),o=e(require("classcat")),s=e(require("styled-components")),c=require("react-icons/fa"),d=e(require("unorm"));function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function u(e,n){if(null==e)return{};var t,a,l={},r=Object.keys(e);for(a=0;a<r.length;a++)n.indexOf(t=r[a])>=0||(l[t]=e[t]);return l}function m(e,n){return n||(n=e.slice(0)),e.raw=n,e}var f=s.ul(n||(n=m(["\n width: max-content;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--neutral-1);\n"]))),h=s.li(t||(t=m(["\n padding: 12px;\n color: var(--neutral-3);\n font-size: 0.875rem;\n font-weight: normal;\n position: relative;\n cursor: pointer;\n\n svg {\n fill: var(--neutral-3) !important;\n margin-left: 8px;\n }\n\n &.active {\n color: var(--primary-700-light);\n\n svg {\n fill: var(--primary-700-light) !important;\n }\n\n ::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--primary-700-light);\n }\n }\n\n &:not(:last-child) {\n margin-right: 8px;\n }\n"]))),b=["active","children"],g=["children","value","onChange"],v=function(e){var n=e.active,t=e.children,a=u(e,b);return l.createElement(h,Object.assign({className:o({active:n})},a),t)};v.propTypes={children:i.oneOfType([i.string,i.element,i.node]).isRequired,onChange:i.func,value:i.string,active:i.bool},v.defaultProps={onChange:function(){},value:"",active:!1};var x=function(e){var n=e.children,t=e.value,a=e.onChange,r=u(e,g),i=l.Children.map(n,(function(e){var n,r,i;return l.isValidElement(e)?Array.isArray(null==(n=e.props)?void 0:n.children)?l.cloneElement(e,{active:(null==(i=e.props)?void 0:i.value)===t,value:t,onChange:a}):l.cloneElement(e,{active:(null==(r=e.props)?void 0:r.value)===t,onClick:function(){var n;return a(null==(n=e.props)?void 0:n.value)}}):null}));return l.createElement(f,Object.assign({},r),i)};x.propTypes={children:i.node.isRequired,value:i.oneOfType([i.string,i.number]).isRequired,onChange:i.func.isRequired};var E,y,A,S,C,P,N={files:"Files",test:"Test",fileArea:{description:"bla bla bla bla bla",fileName:"File name",presset:"Presset",actions:"Actions",search:"Search",fileUpload:"File upload",emptyState:{title:"No data",description:"bla bla bla bla bla"},modal:{descriptionUpload:"Drag and drop files here or",chooseFile:"Choose a file"}},buttons:{cancel:"Cancel",send:"Send",delete:"Delete",test:"Test"},testArea:{description:"bla bla bla bla bla",typeSentence:"Type a sentence",selectPersona:"Select a Persona",selectPresset:"Select a presset",emptyState:{title:"No data for analysis",description:'Do a search, click the "Test" button.'}}},k=function(e){return{en:N,"pt-br":{files:"Arquivos",test:"Teste",fileArea:p({},N.fileArea,{fileName:"Nome do arquivo",presset:"Presset",actions:"Ações",search:"Pesquisar",fileUpload:"Upload de arquivo",emptyState:p({},N.fileArea.emptyState,{title:"Sem dados"}),modal:p({},N.fileArea.modal,{descriptionUpload:"Arraste e solte os arquivos aqui ou",chooseFile:"Escolha um arquivo"})}),buttons:p({},N.buttons,{cancel:"Cancelar",send:"Enviar",delete:"Excluir",test:"Testar"}),testArea:p({},N.testArea,{description:"bla bla bla bla bla",typeSentence:"Digite uma frase",selectPersona:"Selecione uma Persona",selectPresset:"Selecione uma predefinição",emptyState:p({},N.testArea.emptyState,{title:"Sem dados para análise",description:'Faça uma pesquisa, clique no botão "Teste".'})})},es:p({},N,{files:"Archivos",test:"Prueba",fileArea:p({},N.fileArea,{fileName:"Nombre del archivo",presset:"Presset",actions:"Acciones",search:"Buscar",fileUpload:"Carga de archivos",emptyState:p({},N.fileArea.emptyState,{title:"Sin datos"}),modal:p({},N.fileArea.modal,{descriptionUpload:"Arrastre y suelte los archivos aquí o",chooseFile:"Elegir un archivo"})}),buttons:p({},N.buttons,{cancel:"Cancelar",send:"Enviar",delete:"Eliminar",test:"Probar"}),testArea:p({},N.testArea,{description:"bla bla bla bla bla",typeSentence:"Escribe una oración",selectPersona:"Seleccionar una Persona",selectPresset:"Seleccionar una configuración preestablecida",emptyState:p({},N.testArea.emptyState,{title:"Sin datos para el análisis",description:'Realiza una búsqueda, haz clic en el botón "Prueba".'})})})}[e]||N},q=s.div(E||(E=m(["\n .tag {\n padding: 4px 8px 4px 8px;\n background: #C7F9ED;\n border-radius: 4px;\n }\n\n .tags {\n display: flex;\n justify-content: left;\n gap: 4px;\n }\n\n .divDelete {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .buttonDelete {\n color: #5b0a1f;\n background: #fae0d2;\n padding: 12px 20px;\n border-radius: 4px;\n }\n\n .buttonDelete:hover {\n background: #f5bba7;\n }\n"]))),w=s.div(y||(y=m(["\n display: flex;\n flex-direction: column;\n\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n padding-bottom: 14px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n }\n }\n\n"]))),F=s.div(A||(A=m(["\n width: 100%;\n height: max-content;\n min-height: 50px;\n position: relative;\n"]))),T=s.table(S||(S=m(["\n font-size: 14px;\n line-height: 143%;\n color: black;\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n\n th {\n font-weight: 600;\n font-size: 14px;\n line-height: 143%;\n letter-spacing: 0.018em;\n color: #5A5D68;\n text-align: left;\n padding: 8px;\n border-radius: 4px;\n }\n\n thead tr {\n background: #dadce3;\n }\n\n tbody tr {\n border: 1px solid #dadce3;\n }\n\n &.small td {\n padding: 4px;\n }\n\n &.medium td {\n padding: 8px;\n }\n\n &.large td {\n padding: 16px;\n }\n"]))),_=s.div(C||(C=m(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f3f5f961;\n"]))),j=s.span(P||(P=m(["\n display: inline-block;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.spinner--sm {\n width: 24px;\n height: 24px;\n }\n\n &.spinner--md {\n width: 32px;\n height: 32px;\n }\n\n &.spinner--lg {\n width: 60px;\n height: 60px;\n }\n\n span {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 8px;\n border: 4px solid #fff;\n border-radius: 50%;\n animation: rotateSpinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: "," transparent transparent\n transparent;\n }\n\n & span:nth-child(1) {\n animation-delay: -0.45s;\n }\n\n & span:nth-child(2) {\n animation-delay: -0.3s;\n }\n\n & span:nth-child(3) {\n animation-delay: -0.15s;\n }\n\n @keyframes rotateSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])),(function(e){return"var(--"+e.color+")"})),O=function(e){var n=e.color,t=e.size;return l.createElement(j,{color:void 0===n?"neutral-3":n,className:o(["spinner--"+(void 0===t?"md":t),e.className])},l.createElement("span",null),l.createElement("span",null),l.createElement("span",null),l.createElement("span",null))},R=["size","children","isLoading","className"],z=a.forwardRef((function(e,n){var t=e.size,a=void 0===t?"medium":t,r=e.children,i=e.isLoading,s=void 0!==i&&i,c=e.className,d=void 0===c?"":c,p=u(e,R);return l.createElement(F,{className:d},s?l.createElement(_,null,l.createElement(O,null)):null,l.createElement(T,Object.assign({className:o([a]),ref:n},p),r))}));z.propTypes={children:i.node.isRequired,className:i.string,size:i.oneOf(["small","medium","large"]),isLoading:i.bool};var D=function(e){var n=e.setFiles,t=e.initialFiles;return l.createElement("div",{style:{position:"relative",width:"300px"}},l.createElement("input",{type:"text",onChange:function(e){return function(e){var a=e.target.value.trim(),l=d.nfkd(a).toLowerCase();console.log("searchTerm: ",a),console.log("initialFiles: ",t);var r=t.filter((function(e){return d.nfkd(e.name).toLowerCase().includes(l)}));console.log("newFiles: ",r),console.log('searchTerm !== "" ? newFiles : initialFiles: ',""!==a?r:t),n(""!==a&&r.length>0?r:t)}(e)},placeholder:e.placeholder,style:{paddingLeft:"40px",borderRadius:"5px",border:"1px solid #ccc",height:"40px",width:"100%"}}),l.createElement("div",{style:{position:"absolute",top:"10px",left:"10px",pointerEvents:"none"}},l.createElement(c.FaSearch,null)))},U=function(){var e=a.useState([]),n=e[0],t=e[1],i=a.useState([]),o=i[0],s=i[1],d=r.useLocation().pathname.split("/")[4],p=k("pt-br");return a.useEffect((function(){t([{name:"Documentação conceitual Code7_v3",tags:"boteria, code7"},{name:"PAE_Programa_Apoio_ao_Empregado",tags:"pae, vr"},{name:"Vidalink",tags:"vidalink, vr"},{name:"[GUIA PRÁTICO] Como criar o chatbot perfeito",tags:"ebook, code7"}]),s([{name:"Documentação conceitual Code7_v3",tags:"boteria, code7"},{name:"PAE_Programa_Apoio_ao_Empregado",tags:"pae, vr"},{name:"Vidalink",tags:"vidalink, vr"},{name:"[GUIA PRÁTICO] Como criar o chatbot perfeito",tags:"ebook, code7"}])}),[]),a.useEffect((function(){console.log("files, id, t: ",n,d,p)}),[n]),l.createElement(q,null,0===n.length?null:l.createElement(q,null,l.createElement(w,null,l.createElement("div",{className:"infos"},l.createElement("h2",null,p.files),l.createElement("p",null,p.fileArea.description)),l.createElement("div",{className:"actions"},l.createElement(D,{placeholder:p.fileArea.search,setFiles:t,initialFiles:o}),l.createElement("button",null,l.createElement(c.FaUpload,null)," ",p.fileArea.fileUpload))),l.createElement(z,null,l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",{className:"th_file_name"},p.fileArea.fileName),l.createElement("th",{className:"th_pressets"},p.fileArea.presset),l.createElement("th",{className:"th_actions"},p.fileArea.actions))),l.createElement("tbody",null,n.map((function(e){return l.createElement("tr",null,l.createElement("td",null,e.name),l.createElement("td",{className:"tags",dangerouslySetInnerHTML:{__html:(n=e.tags,t="",t+=n.split(",").map((function(e){return"<p class='tag'>"+e+"</p>"})).join(""))}}),l.createElement("td",null,l.createElement("div",{className:"divDelete"},l.createElement("button",{className:"buttonDelete"},p.buttons.delete))));var n,t}))))))},L=function(){return l.createElement("div",null,l.createElement("p",null,"Teste Area"))},I=function(e){var n=r.useRouteMatch(),t=r.useLocation().pathname,i=r.useHistory(),o=k(e.language),s=a.useMemo((function(){return t.split("/")[5]||"files"}),[t]);return l.createElement(l.Fragment,null,l.createElement(x,{value:s,onChange:function(e){return i.push(n.url+"/"+e)}},l.createElement(v,{value:"files"},o.files),l.createElement(v,{value:"test"},o.test)),l.createElement(a.Suspense,{fallback:e.loading},l.createElement(r.Switch,null,l.createElement(r.Route,{path:""+n.path,exact:!0,component:U}),l.createElement(r.Route,{path:n.path+"/files",component:U}),l.createElement(r.Route,{path:n.path+"/test",component:L}))))};exports.Code7=function(e){return l.createElement(I,Object.assign({},e))};
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n,t,a=require("react"),r=e(a),i=require("react-router-dom"),l=e(require("prop-types")),o=e(require("classcat")),s=e(require("styled-components")),c=require("react-icons/fa"),d=e(require("unorm"));function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function p(e,n){if(null==e)return{};var t,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n.indexOf(t=i[a])>=0||(r[t]=e[t]);return r}function m(e,n){return n||(n=e.slice(0)),e.raw=n,e}var f=s.ul(n||(n=m(["\n width: max-content;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--neutral-1);\n"]))),g=s.li(t||(t=m(["\n padding: 12px;\n color: var(--neutral-3);\n font-size: 0.875rem;\n font-weight: normal;\n position: relative;\n cursor: pointer;\n\n svg {\n fill: var(--neutral-3) !important;\n margin-left: 8px;\n }\n\n &.active {\n color: var(--primary-700-light);\n\n svg {\n fill: var(--primary-700-light) !important;\n }\n\n ::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--primary-700-light);\n }\n }\n\n &:not(:last-child) {\n margin-right: 8px;\n }\n"]))),b=["active","children"],h=["children","value","onChange"],v=function(e){var n=e.active,t=e.children,a=p(e,b);return r.createElement(g,Object.assign({className:o({active:n})},a),t)};v.propTypes={children:l.oneOfType([l.string,l.element,l.node]).isRequired,onChange:l.func,value:l.string,active:l.bool},v.defaultProps={onChange:function(){},value:"",active:!1};var x=function(e){var n=e.children,t=e.value,a=e.onChange,i=p(e,h),l=r.Children.map(n,(function(e){var n,i,l;return r.isValidElement(e)?Array.isArray(null==(n=e.props)?void 0:n.children)?r.cloneElement(e,{active:(null==(l=e.props)?void 0:l.value)===t,value:t,onChange:a}):r.cloneElement(e,{active:(null==(i=e.props)?void 0:i.value)===t,onClick:function(){var n;return a(null==(n=e.props)?void 0:n.value)}}):null}));return r.createElement(f,Object.assign({},i),l)};x.propTypes={children:l.node.isRequired,value:l.oneOfType([l.string,l.number]).isRequired,onChange:l.func.isRequired};var E,y,A,k,S,w,C={files:"Files",test:"Test",fileArea:{description:"bla bla bla bla bla",fileName:"File name",presset:"Presset",actions:"Actions",search:"Search",fileUpload:"File upload",emptyState:{title:"No data",description:"bla bla bla bla bla"},modal:{descriptionUpload:"Drag and drop files here or",chooseFile:"Choose a file"}},buttons:{cancel:"Cancel",send:"Send",delete:"Delete",test:"Test"},testArea:{description:"bla bla bla bla bla",typeSentence:"Type a sentence",selectPersona:"Select a Persona",selectPresset:"Select a presset",emptyState:{title:"No data for analysis",description:'Do a search, click the "Test" button.'}}},N=function(e){return{en:C,"pt-br":{files:"Arquivos",test:"Teste",fileArea:u({},C.fileArea,{fileName:"Nome do arquivo",presset:"Presset",actions:"Ações",search:"Pesquisar",fileUpload:"Upload de arquivo",emptyState:u({},C.fileArea.emptyState,{title:"Sem dados"}),modal:u({},C.fileArea.modal,{descriptionUpload:"Arraste e solte os arquivos aqui ou",chooseFile:"Escolha um arquivo"})}),buttons:u({},C.buttons,{cancel:"Cancelar",send:"Enviar",delete:"Excluir",test:"Testar"}),testArea:u({},C.testArea,{description:"bla bla bla bla bla",typeSentence:"Digite uma frase",selectPersona:"Selecione uma Persona",selectPresset:"Selecione uma predefinição",emptyState:u({},C.testArea.emptyState,{title:"Sem dados para análise",description:'Faça uma pesquisa, clique no botão "Teste".'})})},es:u({},C,{files:"Archivos",test:"Prueba",fileArea:u({},C.fileArea,{fileName:"Nombre del archivo",presset:"Presset",actions:"Acciones",search:"Buscar",fileUpload:"Carga de archivos",emptyState:u({},C.fileArea.emptyState,{title:"Sin datos"}),modal:u({},C.fileArea.modal,{descriptionUpload:"Arrastre y suelte los archivos aquí o",chooseFile:"Elegir un archivo"})}),buttons:u({},C.buttons,{cancel:"Cancelar",send:"Enviar",delete:"Eliminar",test:"Probar"}),testArea:u({},C.testArea,{description:"bla bla bla bla bla",typeSentence:"Escribe una oración",selectPersona:"Seleccionar una Persona",selectPresset:"Seleccionar una configuración preestablecida",emptyState:u({},C.testArea.emptyState,{title:"Sin datos para el análisis",description:'Realiza una búsqueda, haz clic en el botón "Prueba".'})})})}[e]||C},P=s.div(E||(E=m(["\n .tag {\n padding: 4px 8px 4px 8px;\n background: #C7F9ED;\n border-radius: 4px;\n }\n\n .tags {\n display: flex;\n justify-content: left;\n gap: 4px;\n }\n\n .divDelete {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .buttonDelete {\n color: #5b0a1f;\n background: #fae0d2;\n padding: 12px 20px;\n border-radius: 4px;\n }\n\n .buttonDelete:hover {\n background: #f5bba7;\n }\n"]))),B=s.div(y||(y=m(["\n display: flex;\n flex-direction: column;\n\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n padding-bottom: 14px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n }\n }\n\n"]))),q=s.div(A||(A=m(["\n width: 100%;\n height: max-content;\n min-height: 50px;\n position: relative;\n"]))),j=s.table(k||(k=m(["\n font-size: 14px;\n line-height: 143%;\n color: black;\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n\n th {\n font-weight: 600;\n font-size: 14px;\n line-height: 143%;\n letter-spacing: 0.018em;\n color: #5A5D68;\n text-align: left;\n padding: 8px;\n border-radius: 4px;\n }\n\n thead tr {\n background: #dadce3;\n }\n\n tbody tr {\n border: 1px solid #dadce3;\n }\n\n &.small td {\n padding: 4px;\n }\n\n &.medium td {\n padding: 8px;\n }\n\n &.large td {\n padding: 16px;\n }\n"]))),F=s.div(S||(S=m(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f3f5f961;\n"]))),O=s.span(w||(w=m(["\n display: inline-block;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.spinner--sm {\n width: 24px;\n height: 24px;\n }\n\n &.spinner--md {\n width: 32px;\n height: 32px;\n }\n\n &.spinner--lg {\n width: 60px;\n height: 60px;\n }\n\n span {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 8px;\n border: 4px solid #fff;\n border-radius: 50%;\n animation: rotateSpinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: "," transparent transparent\n transparent;\n }\n\n & span:nth-child(1) {\n animation-delay: -0.45s;\n }\n\n & span:nth-child(2) {\n animation-delay: -0.3s;\n }\n\n & span:nth-child(3) {\n animation-delay: -0.15s;\n }\n\n @keyframes rotateSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])),(function(e){return"var(--"+e.color+")"})),T=function(e){var n=e.color,t=e.size;return r.createElement(O,{color:void 0===n?"neutral-3":n,className:o(["spinner--"+(void 0===t?"md":t),e.className])},r.createElement("span",null),r.createElement("span",null),r.createElement("span",null),r.createElement("span",null))},_=["size","children","isLoading","className"],z=a.forwardRef((function(e,n){var t=e.size,a=void 0===t?"medium":t,i=e.children,l=e.isLoading,s=void 0!==l&&l,c=e.className,d=void 0===c?"":c,u=p(e,_);return r.createElement(q,{className:d},s?r.createElement(F,null,r.createElement(T,null)):null,r.createElement(j,Object.assign({className:o([a]),ref:n},u),i))}));z.propTypes={children:l.node.isRequired,className:l.string,size:l.oneOf(["small","medium","large"]),isLoading:l.bool};var R,D=function(e){var n=e.setFiles,t=e.initialFiles;return r.createElement("div",{style:{position:"relative",width:"300px"}},r.createElement("input",{type:"text",onChange:function(e){return function(e){var a=e.target.value.trim(),r=d.nfkd(a).toLowerCase(),i=t.filter((function(e){return d.nfkd(e.name).toLowerCase().includes(r)}));n(""!==a?i:t)}(e)},placeholder:e.placeholder,style:{paddingLeft:"40px",borderRadius:"5px",border:"1px solid #ccc",height:"40px",width:"100%"}}),r.createElement("div",{style:{position:"absolute",top:"10px",left:"10px",pointerEvents:"none"}},r.createElement(c.FaSearch,null)))},I=s.div(R||(R=m(["\n width: 100%;\n display: flex;\n justify-content: center;\n padding: 24px 0;\n height: 193px;\n\n background: ",";\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 40px 1px, 1px 40px;\n background-color: ",";\n\n & .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n & > .icon {\n background-color: ",";\n border-radius: 16px;\n width: 145px;\n height: 145px;\n\n display: flex;\n justify-content: center;\n\n & img {\n width: 72px;\n }\n }\n\n & .description {\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px 0 8px 24px;\n\n .button-add {\n cursor: pointer;\n }\n\n .start-icon {\n display: flex;\n align-items: center;\n }\n }\n }\n"])),(function(e){return e.hasBorder&&"linear-gradient(\n to right,\n #dadce3 50%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)"}),(function(e){return e.backgroundColor}),(function(e){return e.backgroundIcon})),U=["icon","title","description","activeButton","iconButton","descriptionButton","widthButton","button","backgroundIcon","backgroundColor","hasBorder"],L=function(e){var n=e.icon,t=e.title,a=e.description,i=e.activeButton,l=e.descriptionButton,o=e.button,s=e.backgroundIcon,c=e.backgroundColor,d=e.hasBorder,u=p(e,U);return r.createElement(I,Object.assign({backgroundIcon:s,backgroundColor:c,hasBorder:d},u),r.createElement("div",{className:"content"},r.createElement("div",{className:"icon"},n),r.createElement("div",{className:"description"},r.createElement("h5",null," ",t),r.createElement("p",null,a),i?r.createElement("button",null,l):null,o)))};L.propTypes={icon:l.oneOfType([l.string,l.element]),title:l.string,description:l.string,activeButton:l.bool,iconButton:l.element,descriptionButton:l.string,widthButton:l.string,button:l.element,backgroundIcon:l.string,backgroundColor:l.string,hasBorder:l.bool},L.defaultProps={icon:"",title:"",description:"",activeButton:!1,descriptionButton:"",widthButton:"140px",backgroundIcon:"var(--neutral-0)",backgroundColor:"var(--absolute-white)",hasBorder:!0};var M=function(){var e=a.useState([]),n=e[0],t=e[1],l=a.useState([]),o=l[0],s=l[1],d=i.useLocation().pathname.split("/")[4],u=N("pt-br");return a.useEffect((function(){t([{name:"Documentação conceitual Code7_v3",tags:"boteria, code7"},{name:"PAE_Programa_Apoio_ao_Empregado",tags:"pae, vr"},{name:"Vidalink",tags:"vidalink, vr"},{name:"[GUIA PRÁTICO] Como criar o chatbot perfeito",tags:"ebook, code7"}]),s([{name:"Documentação conceitual Code7_v3",tags:"boteria, code7"},{name:"PAE_Programa_Apoio_ao_Empregado",tags:"pae, vr"},{name:"Vidalink",tags:"vidalink, vr"},{name:"[GUIA PRÁTICO] Como criar o chatbot perfeito",tags:"ebook, code7"}])}),[]),a.useEffect((function(){console.log("files, id, t: ",n,d,u)}),[n]),r.createElement(P,null,r.createElement(P,null,r.createElement(B,null,r.createElement("div",{className:"infos"},r.createElement("h2",null,u.files),r.createElement("p",null,u.fileArea.description)),r.createElement("div",{className:"actions"},r.createElement(D,{placeholder:u.fileArea.search,setFiles:t,initialFiles:o}),r.createElement("button",null,r.createElement(c.FaUpload,null)," ",u.fileArea.fileUpload))),0===n.length?r.createElement(L,{icon:r.createElement(c.FaList,null),title:u.fileArea.emptyState.title,description:u.fileArea.emptyState.description,activeButton:!0,iconButton:r.createElement(c.FaPlus,{style:{width:"15px",height:"15px"}}),descriptionButton:u.fileArea.modal.chooseFile,widthButton:"230px"}):r.createElement(z,null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",{className:"th_file_name"},u.fileArea.fileName),r.createElement("th",{className:"th_pressets"},u.fileArea.presset),r.createElement("th",{className:"th_actions"},u.fileArea.actions))),r.createElement("tbody",null,n.map((function(e){return r.createElement("tr",null,r.createElement("td",null,e.name),r.createElement("td",{className:"tags",dangerouslySetInnerHTML:{__html:(n=e.tags,t="",t+=n.split(",").map((function(e){return"<p class='tag'>"+e+"</p>"})).join(""))}}),r.createElement("td",null,r.createElement("div",{className:"divDelete"},r.createElement("button",{className:"buttonDelete"},u.buttons.delete))));var n,t}))))))},V=function(){return r.createElement("div",null,r.createElement("p",null,"Teste Area"))},G=function(e){var n=i.useRouteMatch(),t=i.useLocation().pathname,l=i.useHistory(),o=N(e.language),s=a.useMemo((function(){return t.split("/")[5]||"files"}),[t]);return r.createElement(r.Fragment,null,r.createElement(x,{value:s,onChange:function(e){return l.push(n.url+"/"+e)}},r.createElement(v,{value:"files"},o.files),r.createElement(v,{value:"test"},o.test)),r.createElement(a.Suspense,{fallback:e.loading},r.createElement(i.Switch,null,r.createElement(i.Route,{path:""+n.path,exact:!0,component:M}),r.createElement(i.Route,{path:n.path+"/files",component:M}),r.createElement(i.Route,{path:n.path+"/test",component:V}))))};exports.Code7=function(e){return r.createElement(G,Object.assign({},e))};
|
|
2
2
|
//# sourceMappingURL=code7-leia.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code7-leia.cjs.production.min.js","sources":["../src/components/Tabs/styles.tsx","../src/components/Tabs/index.tsx","../src/utils/getLanguage.tsx","../src/components/FileArea/styles.tsx","../src/components/FileArea/components/Table/styles.tsx","../src/components/FileArea/components/Spinner/styles.tsx","../src/components/FileArea/components/Spinner/index.tsx","../src/components/FileArea/components/Table/index.tsx","../src/components/FileArea/components/Search/index.tsx","../src/components/FileArea/index.tsx","../src/components/TestArea/index.tsx","../src/Leia.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { ReactNode } from 'react';\n\ninterface TabProps {\n children: ReactNode;\n}\n\ninterface OptionProps {\n children: ReactNode;\n onClick: () => void;\n}\n\nexport const TabsPane = styled.ul`\n width: max-content;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--neutral-1);\n`;\n\nexport const Tab = styled.li<TabProps>`\n padding: 12px;\n color: var(--neutral-3);\n font-size: 0.875rem;\n font-weight: normal;\n position: relative;\n cursor: pointer;\n\n svg {\n fill: var(--neutral-3) !important;\n margin-left: 8px;\n }\n\n &.active {\n color: var(--primary-700-light);\n\n svg {\n fill: var(--primary-700-light) !important;\n }\n\n ::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--primary-700-light);\n }\n }\n\n &:not(:last-child) {\n margin-right: 8px;\n }\n`;\n\nexport const DropdownContainer = styled.div`\n position: absolute;\n left: 0px;\n top: 40px;\n display: flex;\n flex-direction: column;\n\n background: #ffffff;\n\n border: 1px solid #979aa5;\n box-sizing: border-box;\n box-shadow: 0px 6px 12px -6px rgba(24, 39, 75, 0.12),\n 0px 8px 24px -4px rgba(24, 39, 75, 0.08);\n border-radius: 4px;\n padding: 8px;\n z-index: 2;\n`;\n\nexport const Option = styled.div<OptionProps>`\n padding: 8px;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &:hover {\n background-color: var(--primary-800-light);\n color: white;\n }\n`;\n","import React, { ReactNode } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\ninterface TabProps {\n children: ReactNode;\n active?: boolean;\n}\n\ninterface ITabsProps {\n children: ReactNode;\n value: string | number;\n onChange: (e: any) => void;\n active?: boolean;\n}\n\nexport const Tab = ({ active, children, ...rest }: TabProps) => {\n return (\n <S.Tab className={cc({ active })} {...rest}>\n {children}\n </S.Tab>\n );\n};\n\nTab.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n PropTypes.node,\n ]).isRequired,\n onChange: PropTypes.func,\n value: PropTypes.string,\n active: PropTypes.bool,\n};\n\nTab.defaultProps = {\n onChange: () => {},\n value: '',\n active: false,\n};\n\nexport const Tabs = ({ children: childrenProp, value, onChange, ...rest }: ITabsProps) => {\n const children = React.Children.map(childrenProp, (child) => {\n if (!React.isValidElement(child)) {\n return null;\n }\n\n if (Array.isArray(child.props?.children)) {\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n value,\n onChange,\n });\n }\n\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n onClick: () => onChange(child.props?.value),\n });\n });\n\n return <S.TabsPane {...rest}>{children}</S.TabsPane>;\n};\n\nTabs.propTypes = {\n children: PropTypes.node.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n onChange: PropTypes.func.isRequired,\n};\n","\nimport { Language } from '../interface/Language'\n\nconst defaultLanguage: Language = {\n files: 'Files',\n test: 'Test',\n fileArea: {\n description: 'bla bla bla bla bla',\n fileName: 'File name',\n presset: 'Presset',\n actions: 'Actions',\n search: 'Search',\n fileUpload: 'File upload',\n emptyState: {\n title: 'No data',\n description: 'bla bla bla bla bla',\n },\n modal: {\n descriptionUpload: 'Drag and drop files here or',\n chooseFile: 'Choose a file',\n },\n },\n buttons: {\n cancel: 'Cancel',\n send: 'Send',\n delete: 'Delete',\n test: 'Test',\n },\n testArea: {\n description: 'bla bla bla bla bla',\n typeSentence: 'Type a sentence',\n selectPersona: 'Select a Persona',\n selectPresset: 'Select a presset',\n emptyState: {\n title: 'No data for analysis',\n description: 'Do a search, click the \"Test\" button.',\n },\n },\n};\n\nexport const getLanguage = (language: keyof Record<'en' | 'pt-br' | 'es', Language>): Language => {\n const languages = {\n en: defaultLanguage,\n 'pt-br': {\n files: 'Arquivos',\n test: 'Teste',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nome do arquivo',\n presset: 'Presset',\n actions: 'Ações',\n search: 'Pesquisar',\n fileUpload: 'Upload de arquivo',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sem dados',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arraste e solte os arquivos aqui ou',\n chooseFile: 'Escolha um arquivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Excluir',\n test: 'Testar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Digite uma frase',\n selectPersona: 'Selecione uma Persona',\n selectPresset: 'Selecione uma predefinição',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sem dados para análise',\n description: 'Faça uma pesquisa, clique no botão \"Teste\".',\n },\n },\n },\n es: {\n ...defaultLanguage,\n files: 'Archivos',\n test: 'Prueba',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nombre del archivo',\n presset: 'Presset',\n actions: 'Acciones',\n search: 'Buscar',\n fileUpload: 'Carga de archivos',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sin datos',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arrastre y suelte los archivos aquí o',\n chooseFile: 'Elegir un archivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Eliminar',\n test: 'Probar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Escribe una oración',\n selectPersona: 'Seleccionar una Persona',\n selectPresset: 'Seleccionar una configuración preestablecida',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sin datos para el análisis',\n description: 'Realiza una búsqueda, haz clic en el botón \"Prueba\".',\n },\n },\n },\n };\n\n return languages[language] || defaultLanguage;\n};\n","import styled from 'styled-components';\n\nexport const Container = styled.div`\n .tag {\n padding: 4px 8px 4px 8px;\n background: #C7F9ED;\n border-radius: 4px;\n }\n\n .tags {\n display: flex;\n justify-content: left;\n gap: 4px;\n }\n\n .divDelete {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .buttonDelete {\n color: #5b0a1f;\n background: #fae0d2;\n padding: 12px 20px;\n border-radius: 4px;\n }\n\n .buttonDelete:hover {\n background: #f5bba7;\n }\n`;\n\nexport const Header = styled.div`\n display: flex;\n flex-direction: column;\n\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n padding-bottom: 14px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n }\n }\n\n`\n","import styled from 'styled-components';\n\nexport const TableWrapper = styled.div`\n width: 100%;\n height: max-content;\n min-height: 50px;\n position: relative;\n`;\n\nexport const Table = styled.table`\n font-size: 14px;\n line-height: 143%;\n color: black;\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n\n th {\n font-weight: 600;\n font-size: 14px;\n line-height: 143%;\n letter-spacing: 0.018em;\n color: #5A5D68;\n text-align: left;\n padding: 8px;\n border-radius: 4px;\n }\n\n thead tr {\n background: #dadce3;\n }\n\n tbody tr {\n border: 1px solid #dadce3;\n }\n\n &.small td {\n padding: 4px;\n }\n\n &.medium td {\n padding: 8px;\n }\n\n &.large td {\n padding: 16px;\n }\n`;\n\nexport const TableLoadingWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f3f5f961;\n`;\n","import styled from 'styled-components';\n\nexport const SpinnerWrapper = styled.span`\n display: inline-block;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.spinner--sm {\n width: 24px;\n height: 24px;\n }\n\n &.spinner--md {\n width: 32px;\n height: 32px;\n }\n\n &.spinner--lg {\n width: 60px;\n height: 60px;\n }\n\n span {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 8px;\n border: 4px solid #fff;\n border-radius: 50%;\n animation: rotateSpinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${(props) => `var(--${props.color})`} transparent transparent\n transparent;\n }\n\n & span:nth-child(1) {\n animation-delay: -0.45s;\n }\n\n & span:nth-child(2) {\n animation-delay: -0.3s;\n }\n\n & span:nth-child(3) {\n animation-delay: -0.15s;\n }\n\n @keyframes rotateSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n","import React from 'react';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\nimport { SpinnerProps } from '../../../../interface/Table'\n\nconst Spinner: React.FC<SpinnerProps> = ({ color = 'neutral-3', size = 'md', className }) => {\n return (\n <S.SpinnerWrapper\n color={color}\n className={cc([`spinner--${size}`, className])}\n >\n <span />\n <span />\n <span />\n <span />\n </S.SpinnerWrapper>\n );\n};\n\nexport default Spinner;\n","import React, { forwardRef, Ref } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\nimport Spinner from '../Spinner';\n\nimport { TableProps } from '../../../../interface/Table'\n\nconst Table = forwardRef(\n ({ size = 'medium', children, isLoading = false, className = '', ...props }: TableProps, ref: Ref<HTMLTableElement>) => {\n return (\n <S.TableWrapper className={className}>\n {isLoading ? (\n <S.TableLoadingWrapper>\n <Spinner />\n </S.TableLoadingWrapper>\n ) : null}\n <S.Table className={cc([size])} ref={ref} {...props}>\n {children}\n </S.Table>\n </S.TableWrapper>\n );\n }\n);\n\nTable.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n size: PropTypes.oneOf(['small', 'medium', 'large']),\n isLoading: PropTypes.bool,\n};\n\nexport default Table;\n","import React from 'react';\nimport unorm from 'unorm';\nimport { FaSearch } from 'react-icons/fa';\nimport type { FileData } from '../../../../interface/FileData'\n\ninterface SearchInputProps {\n placeholder: string;\n initialFiles: FileData[]\n setFiles: React.Dispatch<React.SetStateAction<FileData[]>>;\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ placeholder, setFiles, initialFiles }) => {\n\n const searchName = (e: React.ChangeEvent<HTMLInputElement>) => {\n const searchTerm = e.target.value.trim();\n const normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();\n\n console.log('searchTerm: ', searchTerm)\n console.log('initialFiles: ', initialFiles)\n \n const newFiles = initialFiles.filter(file => {\n const normalizedFileName = unorm.nfkd(file.name).toLowerCase();\n return normalizedFileName.includes(normalizedSearchTerm);\n });\n\n console.log('newFiles: ', newFiles)\n console.log('searchTerm !== \"\" ? newFiles : initialFiles: ', searchTerm !== '' ? newFiles : initialFiles)\n \n setFiles(searchTerm !== '' && newFiles.length > 0 ? newFiles : initialFiles);\n}\n \n\n return (\n <div style={{ position: 'relative', width: '300px' }}>\n <input\n type=\"text\"\n onChange={(e) => searchName(e)}\n placeholder={placeholder}\n style={{\n paddingLeft: '40px',\n borderRadius: '5px',\n border: '1px solid #ccc',\n height: '40px',\n width: '100%',\n }}\n />\n <div\n style={{\n position: 'absolute',\n top: '10px',\n left: '10px',\n pointerEvents: 'none', \n }}\n >\n <FaSearch />\n </div>\n </div>\n );\n};\n\nexport default SearchInput;\n","import React, { useEffect, useState} from 'react';\n\nimport { FaUpload } from 'react-icons/fa';\n\n// import { formatAxios } from '../../utils/formatAxios'\n\nimport { useLocation } from 'react-router-dom';\n\nimport type { FileData } from '../../interface/FileData'\n\nimport { getLanguage } from '../../utils/getLanguage'\n\nimport * as S from './styles';\nimport Table from './components/Table';\nimport Search from './components/Search';\n\nexport const FileArea = () => {\n const [files, setFiles] = useState<FileData[]>([]);\n const [initialFiles, setInitialFiles] = useState<FileData[]>([]);\n const { pathname } = useLocation();\n const id = pathname.split('/')[4]\n const t = getLanguage('pt-br')\n\n useEffect(() => {\n setFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n\n setInitialFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n }, [])\n\n useEffect(() => {\n console.log('files, id, t: ', files, id, t)\n }, [files])\n\n const presset = (tags: string) => {\n const tagsSplit = tags.split(',');\n let html = '';\n\n html += tagsSplit.map(tag => {\n return `<p class='tag'>${tag}</p>`;\n }).join('');\n\n return html;\n}\n\n const renderFiles = () => {\n if (files.length === 0) {\n return null;\n }\n \n return (\n <S.Container>\n <S.Header>\n <div className='infos'>\n <h2>{t.files}</h2>\n <p>{t.fileArea.description}</p>\n </div>\n <div className='actions'>\n <Search placeholder={t.fileArea.search} setFiles={setFiles} initialFiles={initialFiles}></Search>\n <button><FaUpload /> {t.fileArea.fileUpload}</button>\n </div>\n </S.Header>\n <Table>\n <thead>\n <tr>\n <th className=\"th_file_name\">\n {t.fileArea.fileName}\n </th>\n <th className=\"th_pressets\">\n {t.fileArea.presset}\n </th>\n <th className=\"th_actions\">\n {t.fileArea.actions}\n </th>\n </tr>\n </thead>\n\n <tbody>\n {files.map((object) => (\n <tr>\n <td>{object.name}</td>\n <td className='tags' dangerouslySetInnerHTML={{ __html: presset(object.tags) }} />\n <td>\n <div className='divDelete'>\n <button className='buttonDelete'>{t.buttons.delete}</button>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </Table>\n </S.Container>\n );\n }\n\n return (\n <S.Container>\n {renderFiles()}\n </S.Container>\n );\n};","import React from 'react';\n\nexport const TestArea = () => {\n return (\n <div>\n <p>Teste Area</p>\n \n </div>\n );\n};","import React, { useMemo, Suspense } from 'react';\n\nimport { Route, useLocation, useRouteMatch, useHistory, Switch as SwitchRoute } from 'react-router-dom';\n\nimport type { Props } from './index';\nimport { Tab, Tabs } from './components/Tabs'\n\nimport { getLanguage } from './utils/getLanguage'\n\nimport { FileArea } from './components/FileArea';\nimport { TestArea } from './components/TestArea';\n\nexport const Leia = (props: Props) => {\n const match = useRouteMatch();\n const { pathname } = useLocation();\n const history = useHistory();\n\n const t = getLanguage(props.language)\n\n const activeTab = useMemo(() => {\n return pathname.split('/')[5] || 'files';\n }, [pathname]);\n\n return (\n <>\n <Tabs\n value={activeTab}\n onChange={(value) => history.push(`${match.url}/${value}`)}\n >\n <Tab value=\"files\">{t.files}</Tab>\n <Tab value=\"test\">{t.test}</Tab>\n </Tabs>\n <Suspense fallback={props.loading}>\n <SwitchRoute>\n <Route path={`${match.path}`} exact component={FileArea} />\n <Route path={`${match.path}/files`} component={FileArea} />\n <Route path={`${match.path}/test`} component={TestArea} />\n </SwitchRoute>\n </Suspense>\n </>\n );\n};","import type { PropsWithChildren, ReactElement } from 'react';\nimport React from 'react';\nimport { Leia } from './Leia';\n\nexport type Props = PropsWithChildren<{\n id: string;\n activeTab: string;\n language: \"en\" | \"pt-br\" | \"es\";\n loading: ReactElement\n}>;\n\nexport function Code7(props: Props) {\n return <Leia {...props} />;\n}"],"names":["TabsPane","styled","ul","_templateObject","_taggedTemplateLiteralLoose","Tab","li","_templateObject2","_ref","active","children","rest","_objectWithoutPropertiesLoose","_excluded","React","S","className","cc","propTypes","PropTypes","oneOfType","string","element","node","isRequired","onChange","func","value","bool","defaultProps","Tabs","_ref2","childrenProp","_excluded2","Children","map","child","_child$props2","isValidElement","Array","isArray","_child$props","props","cloneElement","_child$props3","onClick","_child$props4","number","defaultLanguage","files","test","fileArea","description","fileName","presset","actions","search","fileUpload","emptyState","title","modal","descriptionUpload","chooseFile","buttons","cancel","send","delete","testArea","typeSentence","selectPersona","selectPresset","getLanguage","language","en","pt-br","_extends","es","Container","div","Header","TableWrapper","Table","table","TableLoadingWrapper","_templateObject3","SpinnerWrapper","span","color","Spinner","_ref$size","size","_ref$color","forwardRef","ref","_ref$isLoading","isLoading","_ref$className","oneOf","SearchInput","setFiles","initialFiles","style","position","width","type","e","searchTerm","target","trim","normalizedSearchTerm","unorm","nfkd","toLowerCase","console","log","newFiles","filter","file","name","includes","length","searchName","placeholder","paddingLeft","borderRadius","border","height","top","left","pointerEvents","FaSearch","FileArea","_useState","useState","_useState2","setInitialFiles","id","useLocation","pathname","split","t","useEffect","tags","Search","FaUpload","object","dangerouslySetInnerHTML","__html","html","tag","join","TestArea","Leia","match","useRouteMatch","history","useHistory","activeTab","useMemo","push","url","Suspense","fallback","loading","SwitchRoute","Route","path","exact","component"],"mappings":"4uBAYO,IAAMA,EAAWC,EAAOC,GAAEC,IAAAA,EAAAC,2HAOpBC,EAAMJ,EAAOK,GAAEC,IAAAA,EAAAH,0pBCDfC,EAAM,SAAHG,OAAMC,EAAMD,EAANC,OAAQC,EAAQF,EAARE,SAAaC,EAAIC,EAAAJ,EAAAK,GAC7C,OACEC,gBAACC,iBAAMC,UAAWC,EAAG,CAAER,OAAAA,KAAeE,GACnCD,IAKPL,EAAIa,UAAY,CACdR,SAAUS,EAAUC,UAAU,CAC5BD,EAAUE,OACVF,EAAUG,QACVH,EAAUI,OACTC,WACHC,SAAUN,EAAUO,KACpBC,MAAOR,EAAUE,OACjBZ,OAAQU,EAAUS,MAGpBvB,EAAIwB,aAAe,CACjBJ,SAAU,aACVE,MAAO,GACPlB,QAAQ,GAGH,IAAMqB,EAAO,SAAHC,OAAgBC,EAAYD,EAAtBrB,SAAwBiB,EAAKI,EAALJ,MAAOF,EAAQM,EAARN,SAAad,EAAIC,EAAAmB,EAAAE,GAC/DvB,EAAWI,EAAMoB,SAASC,IAAIH,GAAc,SAACI,WAKPC,EAJ1C,OAAKvB,EAAMwB,eAAeF,GAItBG,MAAMC,eAAOC,EAACL,EAAMM,cAAND,EAAa/B,UACtBI,EAAM6B,aAAaP,EAAkC,CAC1D3B,eAAQ4B,EAAAD,EAAMM,cAANL,EAAaV,SAAUA,EAC/BA,MAAAA,EACAF,SAAAA,IAIGX,EAAM6B,aAAaP,EAAkC,CAC1D3B,eAAQmC,EAAAR,EAAMM,cAANE,EAAajB,SAAUA,EAC/BkB,QAAS,WAAA,IAAAC,EAAA,OAAMrB,SAAQqB,EAACV,EAAMM,cAANI,EAAanB,UAb9B,QAiBX,OAAOb,gB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EKG,EAAW,WACtB,OACEzI,2BACEA,yCCOO0I,EAAO,SAAC9G,GACnB,IAAM+G,EAAQC,kBACNhB,EAAaD,gBAAbC,SACFiB,EAAUC,eAEVhB,EAAIrE,EAAY7B,EAAM8B,UAEtBqF,EAAYC,WAAQ,WACxB,OAAOpB,EAASC,MAAM,KAAK,IAAM,UAChC,CAACD,IAEJ,OACE5H,gCACEA,gBAACgB,GACCH,MAAOkI,EACPpI,SAAU,SAACE,GAAK,OAAKgI,EAAQI,KAAQN,EAAMO,QAAOrI,KAElDb,gBAACT,GAAIsB,MAAM,SAASiH,EAAE3F,OACtBnC,gBAACT,GAAIsB,MAAM,QAAQiH,EAAE1F,OAEvBpC,gBAACmJ,YAASC,SAAUxH,EAAMyH,SACxBrJ,gBAACsJ,cACCtJ,gBAACuJ,SAAMC,QAASb,EAAMa,KAAQC,SAAMC,UAAWrC,IAC/CrH,gBAACuJ,SAAMC,KAASb,EAAMa,cAAcE,UAAWrC,IAC/CrH,gBAACuJ,SAAMC,KAASb,EAAMa,aAAaE,UAAWjB,+BCzBlC7G,GACpB,OAAO5B,gBAAC0I,mBAAS9G"}
|
|
1
|
+
{"version":3,"file":"code7-leia.cjs.production.min.js","sources":["../src/components/Tabs/styles.tsx","../src/components/Tabs/index.tsx","../src/utils/getLanguage.tsx","../src/components/FileArea/styles.tsx","../src/components/FileArea/components/Table/styles.tsx","../src/components/FileArea/components/Spinner/styles.tsx","../src/components/FileArea/components/Spinner/index.tsx","../src/components/FileArea/components/Table/index.tsx","../src/components/FileArea/components/Search/index.tsx","../src/components/FileArea/components/EmptyState/styles.tsx","../src/components/FileArea/components/EmptyState/index.tsx","../src/components/FileArea/index.tsx","../src/components/TestArea/index.tsx","../src/Leia.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { ReactNode } from 'react';\n\ninterface TabProps {\n children: ReactNode;\n}\n\ninterface OptionProps {\n children: ReactNode;\n onClick: () => void;\n}\n\nexport const TabsPane = styled.ul`\n width: max-content;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--neutral-1);\n`;\n\nexport const Tab = styled.li<TabProps>`\n padding: 12px;\n color: var(--neutral-3);\n font-size: 0.875rem;\n font-weight: normal;\n position: relative;\n cursor: pointer;\n\n svg {\n fill: var(--neutral-3) !important;\n margin-left: 8px;\n }\n\n &.active {\n color: var(--primary-700-light);\n\n svg {\n fill: var(--primary-700-light) !important;\n }\n\n ::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--primary-700-light);\n }\n }\n\n &:not(:last-child) {\n margin-right: 8px;\n }\n`;\n\nexport const DropdownContainer = styled.div`\n position: absolute;\n left: 0px;\n top: 40px;\n display: flex;\n flex-direction: column;\n\n background: #ffffff;\n\n border: 1px solid #979aa5;\n box-sizing: border-box;\n box-shadow: 0px 6px 12px -6px rgba(24, 39, 75, 0.12),\n 0px 8px 24px -4px rgba(24, 39, 75, 0.08);\n border-radius: 4px;\n padding: 8px;\n z-index: 2;\n`;\n\nexport const Option = styled.div<OptionProps>`\n padding: 8px;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &:hover {\n background-color: var(--primary-800-light);\n color: white;\n }\n`;\n","import React, { ReactNode } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\ninterface TabProps {\n children: ReactNode;\n active?: boolean;\n}\n\ninterface ITabsProps {\n children: ReactNode;\n value: string | number;\n onChange: (e: any) => void;\n active?: boolean;\n}\n\nexport const Tab = ({ active, children, ...rest }: TabProps) => {\n return (\n <S.Tab className={cc({ active })} {...rest}>\n {children}\n </S.Tab>\n );\n};\n\nTab.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n PropTypes.node,\n ]).isRequired,\n onChange: PropTypes.func,\n value: PropTypes.string,\n active: PropTypes.bool,\n};\n\nTab.defaultProps = {\n onChange: () => {},\n value: '',\n active: false,\n};\n\nexport const Tabs = ({ children: childrenProp, value, onChange, ...rest }: ITabsProps) => {\n const children = React.Children.map(childrenProp, (child) => {\n if (!React.isValidElement(child)) {\n return null;\n }\n\n if (Array.isArray(child.props?.children)) {\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n value,\n onChange,\n });\n }\n\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n onClick: () => onChange(child.props?.value),\n });\n });\n\n return <S.TabsPane {...rest}>{children}</S.TabsPane>;\n};\n\nTabs.propTypes = {\n children: PropTypes.node.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n onChange: PropTypes.func.isRequired,\n};\n","\nimport { Language } from '../interface/Language'\n\nconst defaultLanguage: Language = {\n files: 'Files',\n test: 'Test',\n fileArea: {\n description: 'bla bla bla bla bla',\n fileName: 'File name',\n presset: 'Presset',\n actions: 'Actions',\n search: 'Search',\n fileUpload: 'File upload',\n emptyState: {\n title: 'No data',\n description: 'bla bla bla bla bla',\n },\n modal: {\n descriptionUpload: 'Drag and drop files here or',\n chooseFile: 'Choose a file',\n },\n },\n buttons: {\n cancel: 'Cancel',\n send: 'Send',\n delete: 'Delete',\n test: 'Test',\n },\n testArea: {\n description: 'bla bla bla bla bla',\n typeSentence: 'Type a sentence',\n selectPersona: 'Select a Persona',\n selectPresset: 'Select a presset',\n emptyState: {\n title: 'No data for analysis',\n description: 'Do a search, click the \"Test\" button.',\n },\n },\n};\n\nexport const getLanguage = (language: keyof Record<'en' | 'pt-br' | 'es', Language>): Language => {\n const languages = {\n en: defaultLanguage,\n 'pt-br': {\n files: 'Arquivos',\n test: 'Teste',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nome do arquivo',\n presset: 'Presset',\n actions: 'Ações',\n search: 'Pesquisar',\n fileUpload: 'Upload de arquivo',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sem dados',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arraste e solte os arquivos aqui ou',\n chooseFile: 'Escolha um arquivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Excluir',\n test: 'Testar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Digite uma frase',\n selectPersona: 'Selecione uma Persona',\n selectPresset: 'Selecione uma predefinição',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sem dados para análise',\n description: 'Faça uma pesquisa, clique no botão \"Teste\".',\n },\n },\n },\n es: {\n ...defaultLanguage,\n files: 'Archivos',\n test: 'Prueba',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nombre del archivo',\n presset: 'Presset',\n actions: 'Acciones',\n search: 'Buscar',\n fileUpload: 'Carga de archivos',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sin datos',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arrastre y suelte los archivos aquí o',\n chooseFile: 'Elegir un archivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Eliminar',\n test: 'Probar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Escribe una oración',\n selectPersona: 'Seleccionar una Persona',\n selectPresset: 'Seleccionar una configuración preestablecida',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sin datos para el análisis',\n description: 'Realiza una búsqueda, haz clic en el botón \"Prueba\".',\n },\n },\n },\n };\n\n return languages[language] || defaultLanguage;\n};\n","import styled from 'styled-components';\n\nexport const Container = styled.div`\n .tag {\n padding: 4px 8px 4px 8px;\n background: #C7F9ED;\n border-radius: 4px;\n }\n\n .tags {\n display: flex;\n justify-content: left;\n gap: 4px;\n }\n\n .divDelete {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .buttonDelete {\n color: #5b0a1f;\n background: #fae0d2;\n padding: 12px 20px;\n border-radius: 4px;\n }\n\n .buttonDelete:hover {\n background: #f5bba7;\n }\n`;\n\nexport const Header = styled.div`\n display: flex;\n flex-direction: column;\n\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n padding-bottom: 14px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n }\n }\n\n`\n","import styled from 'styled-components';\n\nexport const TableWrapper = styled.div`\n width: 100%;\n height: max-content;\n min-height: 50px;\n position: relative;\n`;\n\nexport const Table = styled.table`\n font-size: 14px;\n line-height: 143%;\n color: black;\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n\n th {\n font-weight: 600;\n font-size: 14px;\n line-height: 143%;\n letter-spacing: 0.018em;\n color: #5A5D68;\n text-align: left;\n padding: 8px;\n border-radius: 4px;\n }\n\n thead tr {\n background: #dadce3;\n }\n\n tbody tr {\n border: 1px solid #dadce3;\n }\n\n &.small td {\n padding: 4px;\n }\n\n &.medium td {\n padding: 8px;\n }\n\n &.large td {\n padding: 16px;\n }\n`;\n\nexport const TableLoadingWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f3f5f961;\n`;\n","import styled from 'styled-components';\n\nexport const SpinnerWrapper = styled.span`\n display: inline-block;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.spinner--sm {\n width: 24px;\n height: 24px;\n }\n\n &.spinner--md {\n width: 32px;\n height: 32px;\n }\n\n &.spinner--lg {\n width: 60px;\n height: 60px;\n }\n\n span {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 8px;\n border: 4px solid #fff;\n border-radius: 50%;\n animation: rotateSpinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${(props) => `var(--${props.color})`} transparent transparent\n transparent;\n }\n\n & span:nth-child(1) {\n animation-delay: -0.45s;\n }\n\n & span:nth-child(2) {\n animation-delay: -0.3s;\n }\n\n & span:nth-child(3) {\n animation-delay: -0.15s;\n }\n\n @keyframes rotateSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n","import React from 'react';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\nimport { SpinnerProps } from '../../../../interface/Table'\n\nconst Spinner: React.FC<SpinnerProps> = ({ color = 'neutral-3', size = 'md', className }) => {\n return (\n <S.SpinnerWrapper\n color={color}\n className={cc([`spinner--${size}`, className])}\n >\n <span />\n <span />\n <span />\n <span />\n </S.SpinnerWrapper>\n );\n};\n\nexport default Spinner;\n","import React, { forwardRef, Ref } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\nimport Spinner from '../Spinner';\n\nimport { TableProps } from '../../../../interface/Table'\n\nconst Table = forwardRef(\n ({ size = 'medium', children, isLoading = false, className = '', ...props }: TableProps, ref: Ref<HTMLTableElement>) => {\n return (\n <S.TableWrapper className={className}>\n {isLoading ? (\n <S.TableLoadingWrapper>\n <Spinner />\n </S.TableLoadingWrapper>\n ) : null}\n <S.Table className={cc([size])} ref={ref} {...props}>\n {children}\n </S.Table>\n </S.TableWrapper>\n );\n }\n);\n\nTable.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n size: PropTypes.oneOf(['small', 'medium', 'large']),\n isLoading: PropTypes.bool,\n};\n\nexport default Table;\n","import React from 'react';\nimport unorm from 'unorm';\nimport { FaSearch } from 'react-icons/fa';\nimport type { FileData } from '../../../../interface/FileData'\n\ninterface SearchInputProps {\n placeholder: string;\n initialFiles: FileData[]\n setFiles: React.Dispatch<React.SetStateAction<FileData[]>>;\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ placeholder, setFiles, initialFiles }) => {\n\n const searchName = (e: React.ChangeEvent<HTMLInputElement>) => {\n const searchTerm = e.target.value.trim();\n const normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();\n \n const newFiles = initialFiles.filter(file => {\n const normalizedFileName = unorm.nfkd(file.name).toLowerCase();\n return normalizedFileName.includes(normalizedSearchTerm);\n });\n \n setFiles(searchTerm !== '' ? newFiles : initialFiles);\n}\n \n\n return (\n <div style={{ position: 'relative', width: '300px' }}>\n <input\n type=\"text\"\n onChange={(e) => searchName(e)}\n placeholder={placeholder}\n style={{\n paddingLeft: '40px',\n borderRadius: '5px',\n border: '1px solid #ccc',\n height: '40px',\n width: '100%',\n }}\n />\n <div\n style={{\n position: 'absolute',\n top: '10px',\n left: '10px',\n pointerEvents: 'none', \n }}\n >\n <FaSearch />\n </div>\n </div>\n );\n};\n\nexport default SearchInput;\n","import styled from 'styled-components';\n\ninterface ContainerProps {\n hasBorder?: boolean;\n backgroundColor?: string;\n backgroundIcon?: string;\n}\n\nexport const Container = styled.div<ContainerProps>`\n width: 100%;\n display: flex;\n justify-content: center;\n padding: 24px 0;\n height: 193px;\n\n background: ${({ hasBorder }) =>\n hasBorder &&\n `linear-gradient(\n to right,\n #dadce3 50%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)`};\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 40px 1px, 1px 40px;\n background-color: ${({ backgroundColor }) => backgroundColor};\n\n & .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n & > .icon {\n background-color: ${({ backgroundIcon }) => backgroundIcon};\n border-radius: 16px;\n width: 145px;\n height: 145px;\n\n display: flex;\n justify-content: center;\n\n & img {\n width: 72px;\n }\n }\n\n & .description {\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px 0 8px 24px;\n\n .button-add {\n cursor: pointer;\n }\n\n .start-icon {\n display: flex;\n align-items: center;\n }\n }\n }\n`;\n","import React, { FC, ReactElement } from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './styles';\n\ninterface EmptyStateProps {\n icon?: string | ReactElement;\n title?: string;\n description?: string;\n activeButton?: boolean;\n iconButton?: ReactElement;\n descriptionButton?: string;\n widthButton?: string;\n button?: ReactElement;\n backgroundIcon?: string;\n backgroundColor?: string;\n hasBorder?: boolean;\n}\n\nconst EmptyState: FC<EmptyStateProps> = ({\n icon,\n title,\n description,\n activeButton,\n iconButton,\n descriptionButton,\n widthButton,\n button,\n backgroundIcon,\n backgroundColor,\n hasBorder,\n ...rest\n}) => {\n return (\n <S.Container\n backgroundIcon={backgroundIcon}\n backgroundColor={backgroundColor}\n hasBorder={hasBorder}\n {...rest}\n >\n <div className=\"content\">\n <div className=\"icon\">\n {icon}\n </div>\n <div className=\"description\">\n <h5> {title}</h5>\n\n <p>{description}</p>\n\n {activeButton ? (\n <button>\n {descriptionButton}\n </button>\n ) : null}\n\n {button}\n </div>\n </div>\n </S.Container>\n );\n};\n\nEmptyState.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n title: PropTypes.string,\n description: PropTypes.string,\n activeButton: PropTypes.bool,\n iconButton: PropTypes.element,\n descriptionButton: PropTypes.string,\n widthButton: PropTypes.string,\n button: PropTypes.element,\n backgroundIcon: PropTypes.string,\n backgroundColor: PropTypes.string,\n hasBorder: PropTypes.bool,\n};\n\nEmptyState.defaultProps = {\n icon: '',\n title: '',\n description: '',\n activeButton: false,\n descriptionButton: '',\n widthButton: '140px',\n backgroundIcon: 'var(--neutral-0)',\n backgroundColor: 'var(--absolute-white)',\n hasBorder: true,\n};\n\nexport default EmptyState;\n","import React, { useEffect, useState} from 'react';\n\nimport { FaUpload, FaList, FaPlus } from 'react-icons/fa';\n\n// import { formatAxios } from '../../utils/formatAxios'\n\nimport { useLocation } from 'react-router-dom';\n\nimport type { FileData } from '../../interface/FileData'\n\nimport { getLanguage } from '../../utils/getLanguage'\n\nimport * as S from './styles';\nimport Table from './components/Table';\nimport Search from './components/Search';\nimport EmptyState from './components/EmptyState';\n\nexport const FileArea = () => {\n const [files, setFiles] = useState<FileData[]>([]);\n const [initialFiles, setInitialFiles] = useState<FileData[]>([]);\n const { pathname } = useLocation();\n const id = pathname.split('/')[4]\n const t = getLanguage('pt-br')\n\n useEffect(() => {\n setFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n\n setInitialFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n }, [])\n\n useEffect(() => {\n console.log('files, id, t: ', files, id, t)\n }, [files])\n\n const presset = (tags: string) => {\n const tagsSplit = tags.split(',');\n let html = '';\n\n html += tagsSplit.map(tag => {\n return `<p class='tag'>${tag}</p>`;\n }).join('');\n\n return html;\n}\n\n const renderFiles = () => { \n return (\n <S.Container>\n <S.Header>\n <div className='infos'>\n <h2>{t.files}</h2>\n <p>{t.fileArea.description}</p>\n </div>\n <div className='actions'>\n <Search placeholder={t.fileArea.search} setFiles={setFiles} initialFiles={initialFiles}></Search>\n <button><FaUpload /> {t.fileArea.fileUpload}</button>\n </div>\n </S.Header>\n {\n files.length === 0 ? (\n <EmptyState\n icon={<FaList></FaList>}\n title={t.fileArea.emptyState.title}\n description={t.fileArea.emptyState.description}\n activeButton\n iconButton={<FaPlus style={{ width: '15px', height: '15px' }} />}\n descriptionButton={t.fileArea.modal.chooseFile}\n widthButton=\"230px\"\n />\n ) : <Table>\n <thead>\n <tr>\n <th className=\"th_file_name\">\n {t.fileArea.fileName}\n </th>\n <th className=\"th_pressets\">\n {t.fileArea.presset}\n </th>\n <th className=\"th_actions\">\n {t.fileArea.actions}\n </th>\n </tr>\n </thead>\n\n <tbody>\n {files.map((object) => (\n <tr>\n <td>{object.name}</td>\n <td className='tags' dangerouslySetInnerHTML={{ __html: presset(object.tags) }} />\n <td>\n <div className='divDelete'>\n <button className='buttonDelete'>{t.buttons.delete}</button>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </Table>\n }\n \n </S.Container>\n );\n }\n\n return (\n <S.Container>\n {renderFiles()}\n </S.Container>\n );\n};","import React from 'react';\n\nexport const TestArea = () => {\n return (\n <div>\n <p>Teste Area</p>\n \n </div>\n );\n};","import React, { useMemo, Suspense } from 'react';\n\nimport { Route, useLocation, useRouteMatch, useHistory, Switch as SwitchRoute } from 'react-router-dom';\n\nimport type { Props } from './index';\nimport { Tab, Tabs } from './components/Tabs'\n\nimport { getLanguage } from './utils/getLanguage'\n\nimport { FileArea } from './components/FileArea';\nimport { TestArea } from './components/TestArea';\n\nexport const Leia = (props: Props) => {\n const match = useRouteMatch();\n const { pathname } = useLocation();\n const history = useHistory();\n\n const t = getLanguage(props.language)\n\n const activeTab = useMemo(() => {\n return pathname.split('/')[5] || 'files';\n }, [pathname]);\n\n return (\n <>\n <Tabs\n value={activeTab}\n onChange={(value) => history.push(`${match.url}/${value}`)}\n >\n <Tab value=\"files\">{t.files}</Tab>\n <Tab value=\"test\">{t.test}</Tab>\n </Tabs>\n <Suspense fallback={props.loading}>\n <SwitchRoute>\n <Route path={`${match.path}`} exact component={FileArea} />\n <Route path={`${match.path}/files`} component={FileArea} />\n <Route path={`${match.path}/test`} component={TestArea} />\n </SwitchRoute>\n </Suspense>\n </>\n );\n};","import type { PropsWithChildren, ReactElement } from 'react';\nimport React from 'react';\nimport { Leia } from './Leia';\n\nexport type Props = PropsWithChildren<{\n id: string;\n activeTab: string;\n language: \"en\" | \"pt-br\" | \"es\";\n loading: ReactElement\n}>;\n\nexport function Code7(props: Props) {\n return <Leia {...props} />;\n}"],"names":["TabsPane","styled","ul","_templateObject","_taggedTemplateLiteralLoose","Tab","li","_templateObject2","_ref","active","children","rest","_objectWithoutPropertiesLoose","_excluded","React","S","className","cc","propTypes","PropTypes","oneOfType","string","element","node","isRequired","onChange","func","value","bool","defaultProps","Tabs","_ref2","childrenProp","_excluded2","Children","map","child","_child$props2","isValidElement","Array","isArray","_child$props","props","cloneElement","_child$props3","onClick","_child$props4","number","defaultLanguage","files","test","fileArea","description","fileName","presset","actions","search","fileUpload","emptyState","title","modal","descriptionUpload","chooseFile","buttons","cancel","send","delete","testArea","typeSentence","selectPersona","selectPresset","getLanguage","language","en","pt-br","_extends","es","Container","div","Header","TableWrapper","Table","table","TableLoadingWrapper","_templateObject3","SpinnerWrapper","span","color","Spinner","_ref$size","size","_ref$color","forwardRef","ref","_ref$isLoading","isLoading","_ref$className","oneOf","SearchInput","setFiles","initialFiles","style","position","width","type","e","searchTerm","target","trim","normalizedSearchTerm","unorm","nfkd","toLowerCase","newFiles","filter","file","name","includes","searchName","placeholder","paddingLeft","borderRadius","border","height","top","left","pointerEvents","FaSearch","hasBorder","backgroundColor","_ref3","backgroundIcon","EmptyState","icon","activeButton","iconButton","descriptionButton","widthButton","button","FileArea","_useState","useState","_useState2","setInitialFiles","id","useLocation","pathname","split","t","useEffect","tags","console","log","Search","FaUpload","length","FaList","FaPlus","object","dangerouslySetInnerHTML","__html","html","tag","join","TestArea","Leia","match","useRouteMatch","history","useHistory","activeTab","useMemo","push","url","Suspense","fallback","loading","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MAAM,KAAK,IAAM,UAChC,CAACD,IAEJ,OACEpI,gCACEA,gBAACgB,GACCH,MAAO+I,EACPjJ,SAAU,SAACE,GAAK,OAAK6I,EAAQI,KAAQN,EAAMO,QAAOlJ,KAElDb,gBAACT,GAAIsB,MAAM,SAASyH,EAAEnG,OACtBnC,gBAACT,GAAIsB,MAAM,QAAQyH,EAAElG,OAEvBpC,gBAACgK,YAASC,SAAUrI,EAAMsI,SACxBlK,gBAACmK,cACCnK,gBAACoK,SAAMC,QAASb,EAAMa,KAAQC,SAAMC,UAAW1C,IAC/C7H,gBAACoK,SAAMC,KAASb,EAAMa,cAAcE,UAAW1C,IAC/C7H,gBAACoK,SAAMC,KAASb,EAAMa,aAAaE,UAAWjB,+BCzBlC1H,GACpB,OAAO5B,gBAACuJ,mBAAS3H"}
|
package/dist/code7-leia.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useLocation, useRouteMatch, useHistory, Switch, Route } from 'react-rou
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import cc from 'classcat';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
import { FaSearch, FaUpload } from 'react-icons/fa';
|
|
6
|
+
import { FaSearch, FaUpload, FaList, FaPlus } from 'react-icons/fa';
|
|
7
7
|
import unorm from 'unorm';
|
|
8
8
|
|
|
9
9
|
function _extends() {
|
|
@@ -269,15 +269,11 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
269
269
|
var searchName = function searchName(e) {
|
|
270
270
|
var searchTerm = e.target.value.trim();
|
|
271
271
|
var normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();
|
|
272
|
-
console.log('searchTerm: ', searchTerm);
|
|
273
|
-
console.log('initialFiles: ', initialFiles);
|
|
274
272
|
var newFiles = initialFiles.filter(function (file) {
|
|
275
273
|
var normalizedFileName = unorm.nfkd(file.name).toLowerCase();
|
|
276
274
|
return normalizedFileName.includes(normalizedSearchTerm);
|
|
277
275
|
});
|
|
278
|
-
|
|
279
|
-
console.log('searchTerm !== "" ? newFiles : initialFiles: ', searchTerm !== '' ? newFiles : initialFiles);
|
|
280
|
-
setFiles(searchTerm !== '' && newFiles.length > 0 ? newFiles : initialFiles);
|
|
276
|
+
setFiles(searchTerm !== '' ? newFiles : initialFiles);
|
|
281
277
|
};
|
|
282
278
|
return React.createElement("div", {
|
|
283
279
|
style: {
|
|
@@ -307,6 +303,67 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
307
303
|
}, React.createElement(FaSearch, null)));
|
|
308
304
|
};
|
|
309
305
|
|
|
306
|
+
var _templateObject$4;
|
|
307
|
+
var Container$1 = /*#__PURE__*/styled.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n justify-content: center;\n padding: 24px 0;\n height: 193px;\n\n background: ", ";\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 40px 1px, 1px 40px;\n background-color: ", ";\n\n & .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n & > .icon {\n background-color: ", ";\n border-radius: 16px;\n width: 145px;\n height: 145px;\n\n display: flex;\n justify-content: center;\n\n & img {\n width: 72px;\n }\n }\n\n & .description {\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px 0 8px 24px;\n\n .button-add {\n cursor: pointer;\n }\n\n .start-icon {\n display: flex;\n align-items: center;\n }\n }\n }\n"])), function (_ref) {
|
|
308
|
+
var hasBorder = _ref.hasBorder;
|
|
309
|
+
return hasBorder && "linear-gradient(\n to right,\n #dadce3 50%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)";
|
|
310
|
+
}, function (_ref2) {
|
|
311
|
+
var backgroundColor = _ref2.backgroundColor;
|
|
312
|
+
return backgroundColor;
|
|
313
|
+
}, function (_ref3) {
|
|
314
|
+
var backgroundIcon = _ref3.backgroundIcon;
|
|
315
|
+
return backgroundIcon;
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
var _excluded$2 = ["icon", "title", "description", "activeButton", "iconButton", "descriptionButton", "widthButton", "button", "backgroundIcon", "backgroundColor", "hasBorder"];
|
|
319
|
+
var EmptyState = function EmptyState(_ref) {
|
|
320
|
+
var icon = _ref.icon,
|
|
321
|
+
title = _ref.title,
|
|
322
|
+
description = _ref.description,
|
|
323
|
+
activeButton = _ref.activeButton,
|
|
324
|
+
descriptionButton = _ref.descriptionButton,
|
|
325
|
+
button = _ref.button,
|
|
326
|
+
backgroundIcon = _ref.backgroundIcon,
|
|
327
|
+
backgroundColor = _ref.backgroundColor,
|
|
328
|
+
hasBorder = _ref.hasBorder,
|
|
329
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
330
|
+
return React.createElement(Container$1, Object.assign({
|
|
331
|
+
backgroundIcon: backgroundIcon,
|
|
332
|
+
backgroundColor: backgroundColor,
|
|
333
|
+
hasBorder: hasBorder
|
|
334
|
+
}, rest), React.createElement("div", {
|
|
335
|
+
className: "content"
|
|
336
|
+
}, React.createElement("div", {
|
|
337
|
+
className: "icon"
|
|
338
|
+
}, icon), React.createElement("div", {
|
|
339
|
+
className: "description"
|
|
340
|
+
}, React.createElement("h5", null, " ", title), React.createElement("p", null, description), activeButton ? React.createElement("button", null, descriptionButton) : null, button)));
|
|
341
|
+
};
|
|
342
|
+
EmptyState.propTypes = {
|
|
343
|
+
icon: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
344
|
+
title: PropTypes.string,
|
|
345
|
+
description: PropTypes.string,
|
|
346
|
+
activeButton: PropTypes.bool,
|
|
347
|
+
iconButton: PropTypes.element,
|
|
348
|
+
descriptionButton: PropTypes.string,
|
|
349
|
+
widthButton: PropTypes.string,
|
|
350
|
+
button: PropTypes.element,
|
|
351
|
+
backgroundIcon: PropTypes.string,
|
|
352
|
+
backgroundColor: PropTypes.string,
|
|
353
|
+
hasBorder: PropTypes.bool
|
|
354
|
+
};
|
|
355
|
+
EmptyState.defaultProps = {
|
|
356
|
+
icon: '',
|
|
357
|
+
title: '',
|
|
358
|
+
description: '',
|
|
359
|
+
activeButton: false,
|
|
360
|
+
descriptionButton: '',
|
|
361
|
+
widthButton: '140px',
|
|
362
|
+
backgroundIcon: 'var(--neutral-0)',
|
|
363
|
+
backgroundColor: 'var(--absolute-white)',
|
|
364
|
+
hasBorder: true
|
|
365
|
+
};
|
|
366
|
+
|
|
310
367
|
var FileArea = function FileArea() {
|
|
311
368
|
var _useState = useState([]),
|
|
312
369
|
files = _useState[0],
|
|
@@ -358,9 +415,6 @@ var FileArea = function FileArea() {
|
|
|
358
415
|
return html;
|
|
359
416
|
};
|
|
360
417
|
var renderFiles = function renderFiles() {
|
|
361
|
-
if (files.length === 0) {
|
|
362
|
-
return null;
|
|
363
|
-
}
|
|
364
418
|
return React.createElement(Container, null, React.createElement(Header, null, React.createElement("div", {
|
|
365
419
|
className: 'infos'
|
|
366
420
|
}, React.createElement("h2", null, t.files), React.createElement("p", null, t.fileArea.description)), React.createElement("div", {
|
|
@@ -369,7 +423,20 @@ var FileArea = function FileArea() {
|
|
|
369
423
|
placeholder: t.fileArea.search,
|
|
370
424
|
setFiles: setFiles,
|
|
371
425
|
initialFiles: initialFiles
|
|
372
|
-
}), React.createElement("button", null, React.createElement(FaUpload, null), " ", t.fileArea.fileUpload))),
|
|
426
|
+
}), React.createElement("button", null, React.createElement(FaUpload, null), " ", t.fileArea.fileUpload))), files.length === 0 ? React.createElement(EmptyState, {
|
|
427
|
+
icon: React.createElement(FaList, null),
|
|
428
|
+
title: t.fileArea.emptyState.title,
|
|
429
|
+
description: t.fileArea.emptyState.description,
|
|
430
|
+
activeButton: true,
|
|
431
|
+
iconButton: React.createElement(FaPlus, {
|
|
432
|
+
style: {
|
|
433
|
+
width: '15px',
|
|
434
|
+
height: '15px'
|
|
435
|
+
}
|
|
436
|
+
}),
|
|
437
|
+
descriptionButton: t.fileArea.modal.chooseFile,
|
|
438
|
+
widthButton: "230px"
|
|
439
|
+
}) : React.createElement(Table$1, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
|
|
373
440
|
className: "th_file_name"
|
|
374
441
|
}, t.fileArea.fileName), React.createElement("th", {
|
|
375
442
|
className: "th_pressets"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code7-leia.esm.js","sources":["../src/components/Tabs/styles.tsx","../src/components/Tabs/index.tsx","../src/utils/getLanguage.tsx","../src/components/FileArea/styles.tsx","../src/components/FileArea/components/Table/styles.tsx","../src/components/FileArea/components/Spinner/styles.tsx","../src/components/FileArea/components/Spinner/index.tsx","../src/components/FileArea/components/Table/index.tsx","../src/components/FileArea/components/Search/index.tsx","../src/components/FileArea/index.tsx","../src/components/TestArea/index.tsx","../src/Leia.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { ReactNode } from 'react';\n\ninterface TabProps {\n children: ReactNode;\n}\n\ninterface OptionProps {\n children: ReactNode;\n onClick: () => void;\n}\n\nexport const TabsPane = styled.ul`\n width: max-content;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--neutral-1);\n`;\n\nexport const Tab = styled.li<TabProps>`\n padding: 12px;\n color: var(--neutral-3);\n font-size: 0.875rem;\n font-weight: normal;\n position: relative;\n cursor: pointer;\n\n svg {\n fill: var(--neutral-3) !important;\n margin-left: 8px;\n }\n\n &.active {\n color: var(--primary-700-light);\n\n svg {\n fill: var(--primary-700-light) !important;\n }\n\n ::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--primary-700-light);\n }\n }\n\n &:not(:last-child) {\n margin-right: 8px;\n }\n`;\n\nexport const DropdownContainer = styled.div`\n position: absolute;\n left: 0px;\n top: 40px;\n display: flex;\n flex-direction: column;\n\n background: #ffffff;\n\n border: 1px solid #979aa5;\n box-sizing: border-box;\n box-shadow: 0px 6px 12px -6px rgba(24, 39, 75, 0.12),\n 0px 8px 24px -4px rgba(24, 39, 75, 0.08);\n border-radius: 4px;\n padding: 8px;\n z-index: 2;\n`;\n\nexport const Option = styled.div<OptionProps>`\n padding: 8px;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &:hover {\n background-color: var(--primary-800-light);\n color: white;\n }\n`;\n","import React, { ReactNode } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\ninterface TabProps {\n children: ReactNode;\n active?: boolean;\n}\n\ninterface ITabsProps {\n children: ReactNode;\n value: string | number;\n onChange: (e: any) => void;\n active?: boolean;\n}\n\nexport const Tab = ({ active, children, ...rest }: TabProps) => {\n return (\n <S.Tab className={cc({ active })} {...rest}>\n {children}\n </S.Tab>\n );\n};\n\nTab.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n PropTypes.node,\n ]).isRequired,\n onChange: PropTypes.func,\n value: PropTypes.string,\n active: PropTypes.bool,\n};\n\nTab.defaultProps = {\n onChange: () => {},\n value: '',\n active: false,\n};\n\nexport const Tabs = ({ children: childrenProp, value, onChange, ...rest }: ITabsProps) => {\n const children = React.Children.map(childrenProp, (child) => {\n if (!React.isValidElement(child)) {\n return null;\n }\n\n if (Array.isArray(child.props?.children)) {\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n value,\n onChange,\n });\n }\n\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n onClick: () => onChange(child.props?.value),\n });\n });\n\n return <S.TabsPane {...rest}>{children}</S.TabsPane>;\n};\n\nTabs.propTypes = {\n children: PropTypes.node.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n onChange: PropTypes.func.isRequired,\n};\n","\nimport { Language } from '../interface/Language'\n\nconst defaultLanguage: Language = {\n files: 'Files',\n test: 'Test',\n fileArea: {\n description: 'bla bla bla bla bla',\n fileName: 'File name',\n presset: 'Presset',\n actions: 'Actions',\n search: 'Search',\n fileUpload: 'File upload',\n emptyState: {\n title: 'No data',\n description: 'bla bla bla bla bla',\n },\n modal: {\n descriptionUpload: 'Drag and drop files here or',\n chooseFile: 'Choose a file',\n },\n },\n buttons: {\n cancel: 'Cancel',\n send: 'Send',\n delete: 'Delete',\n test: 'Test',\n },\n testArea: {\n description: 'bla bla bla bla bla',\n typeSentence: 'Type a sentence',\n selectPersona: 'Select a Persona',\n selectPresset: 'Select a presset',\n emptyState: {\n title: 'No data for analysis',\n description: 'Do a search, click the \"Test\" button.',\n },\n },\n};\n\nexport const getLanguage = (language: keyof Record<'en' | 'pt-br' | 'es', Language>): Language => {\n const languages = {\n en: defaultLanguage,\n 'pt-br': {\n files: 'Arquivos',\n test: 'Teste',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nome do arquivo',\n presset: 'Presset',\n actions: 'Ações',\n search: 'Pesquisar',\n fileUpload: 'Upload de arquivo',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sem dados',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arraste e solte os arquivos aqui ou',\n chooseFile: 'Escolha um arquivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Excluir',\n test: 'Testar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Digite uma frase',\n selectPersona: 'Selecione uma Persona',\n selectPresset: 'Selecione uma predefinição',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sem dados para análise',\n description: 'Faça uma pesquisa, clique no botão \"Teste\".',\n },\n },\n },\n es: {\n ...defaultLanguage,\n files: 'Archivos',\n test: 'Prueba',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nombre del archivo',\n presset: 'Presset',\n actions: 'Acciones',\n search: 'Buscar',\n fileUpload: 'Carga de archivos',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sin datos',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arrastre y suelte los archivos aquí o',\n chooseFile: 'Elegir un archivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Eliminar',\n test: 'Probar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Escribe una oración',\n selectPersona: 'Seleccionar una Persona',\n selectPresset: 'Seleccionar una configuración preestablecida',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sin datos para el análisis',\n description: 'Realiza una búsqueda, haz clic en el botón \"Prueba\".',\n },\n },\n },\n };\n\n return languages[language] || defaultLanguage;\n};\n","import styled from 'styled-components';\n\nexport const Container = styled.div`\n .tag {\n padding: 4px 8px 4px 8px;\n background: #C7F9ED;\n border-radius: 4px;\n }\n\n .tags {\n display: flex;\n justify-content: left;\n gap: 4px;\n }\n\n .divDelete {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .buttonDelete {\n color: #5b0a1f;\n background: #fae0d2;\n padding: 12px 20px;\n border-radius: 4px;\n }\n\n .buttonDelete:hover {\n background: #f5bba7;\n }\n`;\n\nexport const Header = styled.div`\n display: flex;\n flex-direction: column;\n\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n padding-bottom: 14px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n }\n }\n\n`\n","import styled from 'styled-components';\n\nexport const TableWrapper = styled.div`\n width: 100%;\n height: max-content;\n min-height: 50px;\n position: relative;\n`;\n\nexport const Table = styled.table`\n font-size: 14px;\n line-height: 143%;\n color: black;\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n\n th {\n font-weight: 600;\n font-size: 14px;\n line-height: 143%;\n letter-spacing: 0.018em;\n color: #5A5D68;\n text-align: left;\n padding: 8px;\n border-radius: 4px;\n }\n\n thead tr {\n background: #dadce3;\n }\n\n tbody tr {\n border: 1px solid #dadce3;\n }\n\n &.small td {\n padding: 4px;\n }\n\n &.medium td {\n padding: 8px;\n }\n\n &.large td {\n padding: 16px;\n }\n`;\n\nexport const TableLoadingWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f3f5f961;\n`;\n","import styled from 'styled-components';\n\nexport const SpinnerWrapper = styled.span`\n display: inline-block;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.spinner--sm {\n width: 24px;\n height: 24px;\n }\n\n &.spinner--md {\n width: 32px;\n height: 32px;\n }\n\n &.spinner--lg {\n width: 60px;\n height: 60px;\n }\n\n span {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 8px;\n border: 4px solid #fff;\n border-radius: 50%;\n animation: rotateSpinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${(props) => `var(--${props.color})`} transparent transparent\n transparent;\n }\n\n & span:nth-child(1) {\n animation-delay: -0.45s;\n }\n\n & span:nth-child(2) {\n animation-delay: -0.3s;\n }\n\n & span:nth-child(3) {\n animation-delay: -0.15s;\n }\n\n @keyframes rotateSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n","import React from 'react';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\nimport { SpinnerProps } from '../../../../interface/Table'\n\nconst Spinner: React.FC<SpinnerProps> = ({ color = 'neutral-3', size = 'md', className }) => {\n return (\n <S.SpinnerWrapper\n color={color}\n className={cc([`spinner--${size}`, className])}\n >\n <span />\n <span />\n <span />\n <span />\n </S.SpinnerWrapper>\n );\n};\n\nexport default Spinner;\n","import React, { forwardRef, Ref } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\nimport Spinner from '../Spinner';\n\nimport { TableProps } from '../../../../interface/Table'\n\nconst Table = forwardRef(\n ({ size = 'medium', children, isLoading = false, className = '', ...props }: TableProps, ref: Ref<HTMLTableElement>) => {\n return (\n <S.TableWrapper className={className}>\n {isLoading ? (\n <S.TableLoadingWrapper>\n <Spinner />\n </S.TableLoadingWrapper>\n ) : null}\n <S.Table className={cc([size])} ref={ref} {...props}>\n {children}\n </S.Table>\n </S.TableWrapper>\n );\n }\n);\n\nTable.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n size: PropTypes.oneOf(['small', 'medium', 'large']),\n isLoading: PropTypes.bool,\n};\n\nexport default Table;\n","import React from 'react';\nimport unorm from 'unorm';\nimport { FaSearch } from 'react-icons/fa';\nimport type { FileData } from '../../../../interface/FileData'\n\ninterface SearchInputProps {\n placeholder: string;\n initialFiles: FileData[]\n setFiles: React.Dispatch<React.SetStateAction<FileData[]>>;\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ placeholder, setFiles, initialFiles }) => {\n\n const searchName = (e: React.ChangeEvent<HTMLInputElement>) => {\n const searchTerm = e.target.value.trim();\n const normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();\n\n console.log('searchTerm: ', searchTerm)\n console.log('initialFiles: ', initialFiles)\n \n const newFiles = initialFiles.filter(file => {\n const normalizedFileName = unorm.nfkd(file.name).toLowerCase();\n return normalizedFileName.includes(normalizedSearchTerm);\n });\n\n console.log('newFiles: ', newFiles)\n console.log('searchTerm !== \"\" ? newFiles : initialFiles: ', searchTerm !== '' ? newFiles : initialFiles)\n \n setFiles(searchTerm !== '' && newFiles.length > 0 ? newFiles : initialFiles);\n}\n \n\n return (\n <div style={{ position: 'relative', width: '300px' }}>\n <input\n type=\"text\"\n onChange={(e) => searchName(e)}\n placeholder={placeholder}\n style={{\n paddingLeft: '40px',\n borderRadius: '5px',\n border: '1px solid #ccc',\n height: '40px',\n width: '100%',\n }}\n />\n <div\n style={{\n position: 'absolute',\n top: '10px',\n left: '10px',\n pointerEvents: 'none', \n }}\n >\n <FaSearch />\n </div>\n </div>\n );\n};\n\nexport default SearchInput;\n","import React, { useEffect, useState} from 'react';\n\nimport { FaUpload } from 'react-icons/fa';\n\n// import { formatAxios } from '../../utils/formatAxios'\n\nimport { useLocation } from 'react-router-dom';\n\nimport type { FileData } from '../../interface/FileData'\n\nimport { getLanguage } from '../../utils/getLanguage'\n\nimport * as S from './styles';\nimport Table from './components/Table';\nimport Search from './components/Search';\n\nexport const FileArea = () => {\n const [files, setFiles] = useState<FileData[]>([]);\n const [initialFiles, setInitialFiles] = useState<FileData[]>([]);\n const { pathname } = useLocation();\n const id = pathname.split('/')[4]\n const t = getLanguage('pt-br')\n\n useEffect(() => {\n setFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n\n setInitialFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n }, [])\n\n useEffect(() => {\n console.log('files, id, t: ', files, id, t)\n }, [files])\n\n const presset = (tags: string) => {\n const tagsSplit = tags.split(',');\n let html = '';\n\n html += tagsSplit.map(tag => {\n return `<p class='tag'>${tag}</p>`;\n }).join('');\n\n return html;\n}\n\n const renderFiles = () => {\n if (files.length === 0) {\n return null;\n }\n \n return (\n <S.Container>\n <S.Header>\n <div className='infos'>\n <h2>{t.files}</h2>\n <p>{t.fileArea.description}</p>\n </div>\n <div className='actions'>\n <Search placeholder={t.fileArea.search} setFiles={setFiles} initialFiles={initialFiles}></Search>\n <button><FaUpload /> {t.fileArea.fileUpload}</button>\n </div>\n </S.Header>\n <Table>\n <thead>\n <tr>\n <th className=\"th_file_name\">\n {t.fileArea.fileName}\n </th>\n <th className=\"th_pressets\">\n {t.fileArea.presset}\n </th>\n <th className=\"th_actions\">\n {t.fileArea.actions}\n </th>\n </tr>\n </thead>\n\n <tbody>\n {files.map((object) => (\n <tr>\n <td>{object.name}</td>\n <td className='tags' dangerouslySetInnerHTML={{ __html: presset(object.tags) }} />\n <td>\n <div className='divDelete'>\n <button className='buttonDelete'>{t.buttons.delete}</button>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </Table>\n </S.Container>\n );\n }\n\n return (\n <S.Container>\n {renderFiles()}\n </S.Container>\n );\n};","import React from 'react';\n\nexport const TestArea = () => {\n return (\n <div>\n <p>Teste Area</p>\n \n </div>\n );\n};","import React, { useMemo, Suspense } from 'react';\n\nimport { Route, useLocation, useRouteMatch, useHistory, Switch as SwitchRoute } from 'react-router-dom';\n\nimport type { Props } from './index';\nimport { Tab, Tabs } from './components/Tabs'\n\nimport { getLanguage } from './utils/getLanguage'\n\nimport { FileArea } from './components/FileArea';\nimport { TestArea } from './components/TestArea';\n\nexport const Leia = (props: Props) => {\n const match = useRouteMatch();\n const { pathname } = useLocation();\n const history = useHistory();\n\n const t = getLanguage(props.language)\n\n const activeTab = useMemo(() => {\n return pathname.split('/')[5] || 'files';\n }, [pathname]);\n\n return (\n <>\n <Tabs\n value={activeTab}\n onChange={(value) => history.push(`${match.url}/${value}`)}\n >\n <Tab value=\"files\">{t.files}</Tab>\n <Tab value=\"test\">{t.test}</Tab>\n </Tabs>\n <Suspense fallback={props.loading}>\n <SwitchRoute>\n <Route path={`${match.path}`} exact component={FileArea} />\n <Route path={`${match.path}/files`} component={FileArea} />\n <Route path={`${match.path}/test`} component={TestArea} />\n </SwitchRoute>\n </Suspense>\n </>\n );\n};","import type { PropsWithChildren, ReactElement } from 'react';\nimport React from 'react';\nimport { Leia } from './Leia';\n\nexport type Props = PropsWithChildren<{\n id: string;\n activeTab: string;\n language: \"en\" | \"pt-br\" | \"es\";\n loading: ReactElement\n}>;\n\nexport function Code7(props: Props) {\n return <Leia {...props} />;\n}"],"names":["TabsPane","styled","ul","_templateObject","_taggedTemplateLiteralLoose","Tab","li","_templateObject2","_ref","active","children","rest","_objectWithoutPropertiesLoose","_excluded","React","S","className","cc","propTypes","PropTypes","oneOfType","string","element","node","isRequired","onChange","func","value","bool","defaultProps","Tabs","_ref2","childrenProp","_excluded2","Children","map","child","isValidElement","Array","isArray","_child$props","props","_child$props2","cloneElement","_child$props3","onClick","_child$props4","number","defaultLanguage","files","test","fileArea","description","fileName","presset","actions","search","fileUpload","emptyState","title","modal","descriptionUpload","chooseFile","buttons","cancel","send","testArea","typeSentence","selectPersona","selectPresset","getLanguage","language","languages","en","_extends","es","Container","div","Header","TableWrapper","Table","table","TableLoadingWrapper","_templateObject3","SpinnerWrapper","span","color","Spinner","_ref$color","_ref$size","size","forwardRef","ref","_ref$isLoading","isLoading","_ref$className","oneOf","SearchInput","placeholder","setFiles","initialFiles","searchName","e","searchTerm","target","trim","normalizedSearchTerm","unorm","nfkd","toLowerCase","console","log","newFiles","filter","file","normalizedFileName","name","includes","length","style","position","width","type","paddingLeft","borderRadius","border","height","top","left","pointerEvents","FaSearch","FileArea","_useState","useState","_useState2","setInitialFiles","_useLocation","useLocation","pathname","id","split","t","useEffect","tags","tagsSplit","html","tag","join","renderFiles","Search","FaUpload","object","dangerouslySetInnerHTML","__html","TestArea","Leia","match","useRouteMatch","history","useHistory","activeTab","useMemo","push","url","Suspense","fallback","loading","SwitchRoute","Route","path","exact","component","Code7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAMA,QAAQ,gBAAGC,MAAM,CAACC,EAAE,CAAAC,eAAA,KAAAA,eAAA,gBAAAC,2BAAA,yHAKhC;AAEM,IAAMC,GAAG,gBAAGJ,MAAM,CAACK,EAAE,CAAAC,gBAAA,KAAAA,gBAAA,gBAAAH,2BAAA,8lBAkC3B;;;;ACrDD,AAkBO,IAAMC,KAAG,GAAG,SAANA,KAAGA,CAAAG,IAAA;MAAMC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAKC,IAAI,GAAAC,6BAAA,CAAAJ,IAAA,EAAAK,SAAA;EAC7C,OACEC,oBAACC,GAAK;IAACC,SAAS,EAAEC,EAAE,CAAC;MAAER,MAAM,EAANA;KAAQ;KAAOE,IAAI,GACvCD,QAAQ,CACH;AAEZ,CAAC;AAEDL,KAAG,CAACa,SAAS,GAAG;EACdR,QAAQ,eAAES,SAAS,CAACC,SAAS,CAAC,CAC5BD,SAAS,CAACE,MAAM,EAChBF,SAAS,CAACG,OAAO,EACjBH,SAAS,CAACI,IAAI,CACf,CAAC,CAACC,UAAU;EACbC,QAAQ,EAAEN,SAAS,CAACO,IAAI;EACxBC,KAAK,EAAER,SAAS,CAACE,MAAM;EACvBZ,MAAM,EAAEU,SAAS,CAACS;CACnB;AAEDvB,KAAG,CAACwB,YAAY,GAAG;EACjBJ,QAAQ,EAAE,SAAAA,aAAQ;EAClBE,KAAK,EAAE,EAAE;EACTlB,MAAM,EAAE;CACT;AAED,AAAO,IAAMqB,IAAI,GAAG,SAAPA,IAAIA,CAAAC,KAAA;MAAgBC,YAAY,GAAAD,KAAA,CAAtBrB,QAAQ;IAAgBiB,KAAK,GAAAI,KAAA,CAALJ,KAAK;IAAEF,QAAQ,GAA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;MAAA,OAAKmI,OAAO,CAACI,IAAI,CAAIN,KAAK,CAACO,GAAG,SAAIxI,KAAO,CAAC;;KAE1Db,oBAACT,KAAG;IAACsB,KAAK,EAAC;KAASkH,CAAC,CAAC5F,KAAK,CAAO,EAClCnC,oBAACT,KAAG;IAACsB,KAAK,EAAC;KAAQkH,CAAC,CAAC3F,IAAI,CAAO,CAC3B,EACPpC,oBAACsJ,QAAQ;IAACC,QAAQ,EAAE5H,KAAK,CAAC6H;KACxBxJ,oBAACyJ,MAAW,QACVzJ,oBAAC0J,KAAK;IAACC,IAAI,OAAKb,KAAK,CAACa,IAAM;IAAEC,KAAK;IAACC,SAAS,EAAExC;IAAY,EAC3DrH,oBAAC0J,KAAK;IAACC,IAAI,EAAKb,KAAK,CAACa,IAAI,WAAQ;IAAEE,SAAS,EAAExC;IAAY,EAC3DrH,oBAAC0J,KAAK;IAACC,IAAI,EAAKb,KAAK,CAACa,IAAI,UAAO;IAAEE,SAAS,EAAEjB;IAAY,CAC9C,CACL,CACV;AAEP,CAAC;;SC9BekB,KAAKA,CAACnI,KAAY;EAChC,OAAO3B,oBAAC6I,IAAI,oBAAKlH,KAAK,EAAI;AAC5B;;;;"}
|
|
1
|
+
{"version":3,"file":"code7-leia.esm.js","sources":["../src/components/Tabs/styles.tsx","../src/components/Tabs/index.tsx","../src/utils/getLanguage.tsx","../src/components/FileArea/styles.tsx","../src/components/FileArea/components/Table/styles.tsx","../src/components/FileArea/components/Spinner/styles.tsx","../src/components/FileArea/components/Spinner/index.tsx","../src/components/FileArea/components/Table/index.tsx","../src/components/FileArea/components/Search/index.tsx","../src/components/FileArea/components/EmptyState/styles.tsx","../src/components/FileArea/components/EmptyState/index.tsx","../src/components/FileArea/index.tsx","../src/components/TestArea/index.tsx","../src/Leia.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { ReactNode } from 'react';\n\ninterface TabProps {\n children: ReactNode;\n}\n\ninterface OptionProps {\n children: ReactNode;\n onClick: () => void;\n}\n\nexport const TabsPane = styled.ul`\n width: max-content;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--neutral-1);\n`;\n\nexport const Tab = styled.li<TabProps>`\n padding: 12px;\n color: var(--neutral-3);\n font-size: 0.875rem;\n font-weight: normal;\n position: relative;\n cursor: pointer;\n\n svg {\n fill: var(--neutral-3) !important;\n margin-left: 8px;\n }\n\n &.active {\n color: var(--primary-700-light);\n\n svg {\n fill: var(--primary-700-light) !important;\n }\n\n ::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--primary-700-light);\n }\n }\n\n &:not(:last-child) {\n margin-right: 8px;\n }\n`;\n\nexport const DropdownContainer = styled.div`\n position: absolute;\n left: 0px;\n top: 40px;\n display: flex;\n flex-direction: column;\n\n background: #ffffff;\n\n border: 1px solid #979aa5;\n box-sizing: border-box;\n box-shadow: 0px 6px 12px -6px rgba(24, 39, 75, 0.12),\n 0px 8px 24px -4px rgba(24, 39, 75, 0.08);\n border-radius: 4px;\n padding: 8px;\n z-index: 2;\n`;\n\nexport const Option = styled.div<OptionProps>`\n padding: 8px;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &:hover {\n background-color: var(--primary-800-light);\n color: white;\n }\n`;\n","import React, { ReactNode } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\ninterface TabProps {\n children: ReactNode;\n active?: boolean;\n}\n\ninterface ITabsProps {\n children: ReactNode;\n value: string | number;\n onChange: (e: any) => void;\n active?: boolean;\n}\n\nexport const Tab = ({ active, children, ...rest }: TabProps) => {\n return (\n <S.Tab className={cc({ active })} {...rest}>\n {children}\n </S.Tab>\n );\n};\n\nTab.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n PropTypes.node,\n ]).isRequired,\n onChange: PropTypes.func,\n value: PropTypes.string,\n active: PropTypes.bool,\n};\n\nTab.defaultProps = {\n onChange: () => {},\n value: '',\n active: false,\n};\n\nexport const Tabs = ({ children: childrenProp, value, onChange, ...rest }: ITabsProps) => {\n const children = React.Children.map(childrenProp, (child) => {\n if (!React.isValidElement(child)) {\n return null;\n }\n\n if (Array.isArray(child.props?.children)) {\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n value,\n onChange,\n });\n }\n\n return React.cloneElement(child as React.ReactElement<any>, {\n active: child.props?.value === value,\n onClick: () => onChange(child.props?.value),\n });\n });\n\n return <S.TabsPane {...rest}>{children}</S.TabsPane>;\n};\n\nTabs.propTypes = {\n children: PropTypes.node.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n onChange: PropTypes.func.isRequired,\n};\n","\nimport { Language } from '../interface/Language'\n\nconst defaultLanguage: Language = {\n files: 'Files',\n test: 'Test',\n fileArea: {\n description: 'bla bla bla bla bla',\n fileName: 'File name',\n presset: 'Presset',\n actions: 'Actions',\n search: 'Search',\n fileUpload: 'File upload',\n emptyState: {\n title: 'No data',\n description: 'bla bla bla bla bla',\n },\n modal: {\n descriptionUpload: 'Drag and drop files here or',\n chooseFile: 'Choose a file',\n },\n },\n buttons: {\n cancel: 'Cancel',\n send: 'Send',\n delete: 'Delete',\n test: 'Test',\n },\n testArea: {\n description: 'bla bla bla bla bla',\n typeSentence: 'Type a sentence',\n selectPersona: 'Select a Persona',\n selectPresset: 'Select a presset',\n emptyState: {\n title: 'No data for analysis',\n description: 'Do a search, click the \"Test\" button.',\n },\n },\n};\n\nexport const getLanguage = (language: keyof Record<'en' | 'pt-br' | 'es', Language>): Language => {\n const languages = {\n en: defaultLanguage,\n 'pt-br': {\n files: 'Arquivos',\n test: 'Teste',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nome do arquivo',\n presset: 'Presset',\n actions: 'Ações',\n search: 'Pesquisar',\n fileUpload: 'Upload de arquivo',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sem dados',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arraste e solte os arquivos aqui ou',\n chooseFile: 'Escolha um arquivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Excluir',\n test: 'Testar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Digite uma frase',\n selectPersona: 'Selecione uma Persona',\n selectPresset: 'Selecione uma predefinição',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sem dados para análise',\n description: 'Faça uma pesquisa, clique no botão \"Teste\".',\n },\n },\n },\n es: {\n ...defaultLanguage,\n files: 'Archivos',\n test: 'Prueba',\n fileArea: {\n ...defaultLanguage.fileArea,\n fileName: 'Nombre del archivo',\n presset: 'Presset',\n actions: 'Acciones',\n search: 'Buscar',\n fileUpload: 'Carga de archivos',\n emptyState: {\n ...defaultLanguage.fileArea.emptyState,\n title: 'Sin datos',\n },\n modal: {\n ...defaultLanguage.fileArea.modal,\n descriptionUpload: 'Arrastre y suelte los archivos aquí o',\n chooseFile: 'Elegir un archivo',\n },\n },\n buttons: {\n ...defaultLanguage.buttons,\n cancel: 'Cancelar',\n send: 'Enviar',\n delete: 'Eliminar',\n test: 'Probar',\n },\n testArea: {\n ...defaultLanguage.testArea,\n description: 'bla bla bla bla bla',\n typeSentence: 'Escribe una oración',\n selectPersona: 'Seleccionar una Persona',\n selectPresset: 'Seleccionar una configuración preestablecida',\n emptyState: {\n ...defaultLanguage.testArea.emptyState,\n title: 'Sin datos para el análisis',\n description: 'Realiza una búsqueda, haz clic en el botón \"Prueba\".',\n },\n },\n },\n };\n\n return languages[language] || defaultLanguage;\n};\n","import styled from 'styled-components';\n\nexport const Container = styled.div`\n .tag {\n padding: 4px 8px 4px 8px;\n background: #C7F9ED;\n border-radius: 4px;\n }\n\n .tags {\n display: flex;\n justify-content: left;\n gap: 4px;\n }\n\n .divDelete {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .buttonDelete {\n color: #5b0a1f;\n background: #fae0d2;\n padding: 12px 20px;\n border-radius: 4px;\n }\n\n .buttonDelete:hover {\n background: #f5bba7;\n }\n`;\n\nexport const Header = styled.div`\n display: flex;\n flex-direction: column;\n\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n padding-bottom: 14px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n }\n }\n\n`\n","import styled from 'styled-components';\n\nexport const TableWrapper = styled.div`\n width: 100%;\n height: max-content;\n min-height: 50px;\n position: relative;\n`;\n\nexport const Table = styled.table`\n font-size: 14px;\n line-height: 143%;\n color: black;\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n\n th {\n font-weight: 600;\n font-size: 14px;\n line-height: 143%;\n letter-spacing: 0.018em;\n color: #5A5D68;\n text-align: left;\n padding: 8px;\n border-radius: 4px;\n }\n\n thead tr {\n background: #dadce3;\n }\n\n tbody tr {\n border: 1px solid #dadce3;\n }\n\n &.small td {\n padding: 4px;\n }\n\n &.medium td {\n padding: 8px;\n }\n\n &.large td {\n padding: 16px;\n }\n`;\n\nexport const TableLoadingWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f3f5f961;\n`;\n","import styled from 'styled-components';\n\nexport const SpinnerWrapper = styled.span`\n display: inline-block;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.spinner--sm {\n width: 24px;\n height: 24px;\n }\n\n &.spinner--md {\n width: 32px;\n height: 32px;\n }\n\n &.spinner--lg {\n width: 60px;\n height: 60px;\n }\n\n span {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 8px;\n border: 4px solid #fff;\n border-radius: 50%;\n animation: rotateSpinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${(props) => `var(--${props.color})`} transparent transparent\n transparent;\n }\n\n & span:nth-child(1) {\n animation-delay: -0.45s;\n }\n\n & span:nth-child(2) {\n animation-delay: -0.3s;\n }\n\n & span:nth-child(3) {\n animation-delay: -0.15s;\n }\n\n @keyframes rotateSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n","import React from 'react';\nimport cc from 'classcat';\n\nimport * as S from './styles';\n\nimport { SpinnerProps } from '../../../../interface/Table'\n\nconst Spinner: React.FC<SpinnerProps> = ({ color = 'neutral-3', size = 'md', className }) => {\n return (\n <S.SpinnerWrapper\n color={color}\n className={cc([`spinner--${size}`, className])}\n >\n <span />\n <span />\n <span />\n <span />\n </S.SpinnerWrapper>\n );\n};\n\nexport default Spinner;\n","import React, { forwardRef, Ref } from 'react';\nimport PropTypes from 'prop-types';\nimport cc from 'classcat';\n\nimport * as S from './styles';\nimport Spinner from '../Spinner';\n\nimport { TableProps } from '../../../../interface/Table'\n\nconst Table = forwardRef(\n ({ size = 'medium', children, isLoading = false, className = '', ...props }: TableProps, ref: Ref<HTMLTableElement>) => {\n return (\n <S.TableWrapper className={className}>\n {isLoading ? (\n <S.TableLoadingWrapper>\n <Spinner />\n </S.TableLoadingWrapper>\n ) : null}\n <S.Table className={cc([size])} ref={ref} {...props}>\n {children}\n </S.Table>\n </S.TableWrapper>\n );\n }\n);\n\nTable.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n size: PropTypes.oneOf(['small', 'medium', 'large']),\n isLoading: PropTypes.bool,\n};\n\nexport default Table;\n","import React from 'react';\nimport unorm from 'unorm';\nimport { FaSearch } from 'react-icons/fa';\nimport type { FileData } from '../../../../interface/FileData'\n\ninterface SearchInputProps {\n placeholder: string;\n initialFiles: FileData[]\n setFiles: React.Dispatch<React.SetStateAction<FileData[]>>;\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ placeholder, setFiles, initialFiles }) => {\n\n const searchName = (e: React.ChangeEvent<HTMLInputElement>) => {\n const searchTerm = e.target.value.trim();\n const normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();\n \n const newFiles = initialFiles.filter(file => {\n const normalizedFileName = unorm.nfkd(file.name).toLowerCase();\n return normalizedFileName.includes(normalizedSearchTerm);\n });\n \n setFiles(searchTerm !== '' ? newFiles : initialFiles);\n}\n \n\n return (\n <div style={{ position: 'relative', width: '300px' }}>\n <input\n type=\"text\"\n onChange={(e) => searchName(e)}\n placeholder={placeholder}\n style={{\n paddingLeft: '40px',\n borderRadius: '5px',\n border: '1px solid #ccc',\n height: '40px',\n width: '100%',\n }}\n />\n <div\n style={{\n position: 'absolute',\n top: '10px',\n left: '10px',\n pointerEvents: 'none', \n }}\n >\n <FaSearch />\n </div>\n </div>\n );\n};\n\nexport default SearchInput;\n","import styled from 'styled-components';\n\ninterface ContainerProps {\n hasBorder?: boolean;\n backgroundColor?: string;\n backgroundIcon?: string;\n}\n\nexport const Container = styled.div<ContainerProps>`\n width: 100%;\n display: flex;\n justify-content: center;\n padding: 24px 0;\n height: 193px;\n\n background: ${({ hasBorder }) =>\n hasBorder &&\n `linear-gradient(\n to right,\n #dadce3 50%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)`};\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 40px 1px, 1px 40px;\n background-color: ${({ backgroundColor }) => backgroundColor};\n\n & .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n & > .icon {\n background-color: ${({ backgroundIcon }) => backgroundIcon};\n border-radius: 16px;\n width: 145px;\n height: 145px;\n\n display: flex;\n justify-content: center;\n\n & img {\n width: 72px;\n }\n }\n\n & .description {\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px 0 8px 24px;\n\n .button-add {\n cursor: pointer;\n }\n\n .start-icon {\n display: flex;\n align-items: center;\n }\n }\n }\n`;\n","import React, { FC, ReactElement } from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './styles';\n\ninterface EmptyStateProps {\n icon?: string | ReactElement;\n title?: string;\n description?: string;\n activeButton?: boolean;\n iconButton?: ReactElement;\n descriptionButton?: string;\n widthButton?: string;\n button?: ReactElement;\n backgroundIcon?: string;\n backgroundColor?: string;\n hasBorder?: boolean;\n}\n\nconst EmptyState: FC<EmptyStateProps> = ({\n icon,\n title,\n description,\n activeButton,\n iconButton,\n descriptionButton,\n widthButton,\n button,\n backgroundIcon,\n backgroundColor,\n hasBorder,\n ...rest\n}) => {\n return (\n <S.Container\n backgroundIcon={backgroundIcon}\n backgroundColor={backgroundColor}\n hasBorder={hasBorder}\n {...rest}\n >\n <div className=\"content\">\n <div className=\"icon\">\n {icon}\n </div>\n <div className=\"description\">\n <h5> {title}</h5>\n\n <p>{description}</p>\n\n {activeButton ? (\n <button>\n {descriptionButton}\n </button>\n ) : null}\n\n {button}\n </div>\n </div>\n </S.Container>\n );\n};\n\nEmptyState.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n title: PropTypes.string,\n description: PropTypes.string,\n activeButton: PropTypes.bool,\n iconButton: PropTypes.element,\n descriptionButton: PropTypes.string,\n widthButton: PropTypes.string,\n button: PropTypes.element,\n backgroundIcon: PropTypes.string,\n backgroundColor: PropTypes.string,\n hasBorder: PropTypes.bool,\n};\n\nEmptyState.defaultProps = {\n icon: '',\n title: '',\n description: '',\n activeButton: false,\n descriptionButton: '',\n widthButton: '140px',\n backgroundIcon: 'var(--neutral-0)',\n backgroundColor: 'var(--absolute-white)',\n hasBorder: true,\n};\n\nexport default EmptyState;\n","import React, { useEffect, useState} from 'react';\n\nimport { FaUpload, FaList, FaPlus } from 'react-icons/fa';\n\n// import { formatAxios } from '../../utils/formatAxios'\n\nimport { useLocation } from 'react-router-dom';\n\nimport type { FileData } from '../../interface/FileData'\n\nimport { getLanguage } from '../../utils/getLanguage'\n\nimport * as S from './styles';\nimport Table from './components/Table';\nimport Search from './components/Search';\nimport EmptyState from './components/EmptyState';\n\nexport const FileArea = () => {\n const [files, setFiles] = useState<FileData[]>([]);\n const [initialFiles, setInitialFiles] = useState<FileData[]>([]);\n const { pathname } = useLocation();\n const id = pathname.split('/')[4]\n const t = getLanguage('pt-br')\n\n useEffect(() => {\n setFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n\n setInitialFiles([\n {\n \"name\": \"Documentação conceitual Code7_v3\",\n \"tags\": \"boteria, code7\"\n },\n {\n \"name\": \"PAE_Programa_Apoio_ao_Empregado\",\n \"tags\": \"pae, vr\"\n },\n {\n \"name\": \"Vidalink\",\n \"tags\": \"vidalink, vr\"\n },\n {\n \"name\": \"[GUIA PRÁTICO] Como criar o chatbot perfeito\",\n \"tags\": \"ebook, code7\"\n }\n ])\n }, [])\n\n useEffect(() => {\n console.log('files, id, t: ', files, id, t)\n }, [files])\n\n const presset = (tags: string) => {\n const tagsSplit = tags.split(',');\n let html = '';\n\n html += tagsSplit.map(tag => {\n return `<p class='tag'>${tag}</p>`;\n }).join('');\n\n return html;\n}\n\n const renderFiles = () => { \n return (\n <S.Container>\n <S.Header>\n <div className='infos'>\n <h2>{t.files}</h2>\n <p>{t.fileArea.description}</p>\n </div>\n <div className='actions'>\n <Search placeholder={t.fileArea.search} setFiles={setFiles} initialFiles={initialFiles}></Search>\n <button><FaUpload /> {t.fileArea.fileUpload}</button>\n </div>\n </S.Header>\n {\n files.length === 0 ? (\n <EmptyState\n icon={<FaList></FaList>}\n title={t.fileArea.emptyState.title}\n description={t.fileArea.emptyState.description}\n activeButton\n iconButton={<FaPlus style={{ width: '15px', height: '15px' }} />}\n descriptionButton={t.fileArea.modal.chooseFile}\n widthButton=\"230px\"\n />\n ) : <Table>\n <thead>\n <tr>\n <th className=\"th_file_name\">\n {t.fileArea.fileName}\n </th>\n <th className=\"th_pressets\">\n {t.fileArea.presset}\n </th>\n <th className=\"th_actions\">\n {t.fileArea.actions}\n </th>\n </tr>\n </thead>\n\n <tbody>\n {files.map((object) => (\n <tr>\n <td>{object.name}</td>\n <td className='tags' dangerouslySetInnerHTML={{ __html: presset(object.tags) }} />\n <td>\n <div className='divDelete'>\n <button className='buttonDelete'>{t.buttons.delete}</button>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </Table>\n }\n \n </S.Container>\n );\n }\n\n return (\n <S.Container>\n {renderFiles()}\n </S.Container>\n );\n};","import React from 'react';\n\nexport const TestArea = () => {\n return (\n <div>\n <p>Teste Area</p>\n \n </div>\n );\n};","import React, { useMemo, Suspense } from 'react';\n\nimport { Route, useLocation, useRouteMatch, useHistory, Switch as SwitchRoute } from 'react-router-dom';\n\nimport type { Props } from './index';\nimport { Tab, Tabs } from './components/Tabs'\n\nimport { getLanguage } from './utils/getLanguage'\n\nimport { FileArea } from './components/FileArea';\nimport { TestArea } from './components/TestArea';\n\nexport const Leia = (props: Props) => {\n const match = useRouteMatch();\n const { pathname } = useLocation();\n const history = useHistory();\n\n const t = getLanguage(props.language)\n\n const activeTab = useMemo(() => {\n return pathname.split('/')[5] || 'files';\n }, [pathname]);\n\n return (\n <>\n <Tabs\n value={activeTab}\n onChange={(value) => history.push(`${match.url}/${value}`)}\n >\n <Tab value=\"files\">{t.files}</Tab>\n <Tab value=\"test\">{t.test}</Tab>\n </Tabs>\n <Suspense fallback={props.loading}>\n <SwitchRoute>\n <Route path={`${match.path}`} exact component={FileArea} />\n <Route path={`${match.path}/files`} component={FileArea} />\n <Route path={`${match.path}/test`} component={TestArea} />\n </SwitchRoute>\n </Suspense>\n </>\n );\n};","import type { PropsWithChildren, ReactElement } from 'react';\nimport React from 'react';\nimport { Leia } from './Leia';\n\nexport type Props = PropsWithChildren<{\n id: string;\n activeTab: string;\n language: \"en\" | \"pt-br\" | \"es\";\n loading: ReactElement\n}>;\n\nexport function Code7(props: Props) {\n return <Leia {...props} />;\n}"],"names":["TabsPane","styled","ul","_templateObject","_taggedTemplateLiteralLoose","Tab","li","_templateObject2","_ref","active","children","rest","_objectWithoutPropertiesLoose","_excluded","React","S","className","cc","propTypes","PropTypes","oneOfType","string","element","node","isRequired","onChange","func","value","bool","defaultProps","Tabs","_ref2","childrenProp","_excluded2","Children","map","child","isValidElement","Array","isArray","_child$props","props","_child$props2","cloneElement","_child$props3","onClick","_child$props4","number","defaultLanguage","files","test","fileArea","description","fileName","presset","actions","search","fileUpload","emptyState","title","modal","descriptionUpload","chooseFile","buttons","cancel","send","testArea","typeSentence","selectPersona","selectPresset","getLanguage","language","languages","en","_extends","es","Container","div","Header","TableWrapper","Table","table","TableLoadingWrapper","_templateObject3","SpinnerWrapper","span","color","Spinner","_ref$color","_ref$size","size","forwardRef","ref","_ref$isLoading","isLoading","_ref$className","oneOf","SearchInput","placeholder","setFiles","initialFiles","searchName","e","searchTerm","target","trim","normalizedSearchTerm","unorm","nfkd","toLowerCase","newFiles","filter","file","normalizedFileName","name","includes","style","position","width","type","paddingLeft","borderRadius","border","height","top","left","pointerEvents","FaSearch","hasBorder","backgroundColor","_ref3","backgroundIcon","EmptyState","icon","activeButton","iconButton","descriptionButton","widthButton","button","FileArea","_useState","useState","_useState2","setInitialFiles","_useLocation","useLocation","pathname","id","split","t","useEffect","console","log","tags","tagsSplit","html","tag","join","renderFiles","Search","FaUpload","length","FaList","FaPlus","object","dangerouslySetInnerHTML","__html","TestArea","Leia","match","useRouteMatch","history","useHistory","activeTab","useMemo","push","url","Suspense","fallback","loading","SwitchRoute","Route","path","exact","component","Code7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAMA,QAAQ,gBAAGC,MAAM,CAACC,EAAE,CAAAC,eAAA,KAAAA,eAAA,gBAAAC,2BAAA,yHAKhC;AAEM,IAAMC,GAAG,gBAAGJ,MAAM,CAACK,EAAE,CAAAC,gBAAA,KAAAA,gBAAA,gBAAAH,2BAAA,8lBAkC3B;;;;ACrDD,AAkBO,IAAMC,KAAG,GAAG,SAANA,KAAGA,CAAAG,IAAA;MAAMC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAKC,IAAI,GAAAC,6BAAA,CAAAJ,IAAA,EAAAK,SAAA;EAC7C,OACEC,oBAACC,GAAK;IAACC,SAAS,EAAEC,EAAE,CAAC;MAAER,MAAM,EAANA;KAAQ;KAAOE,IAAI,GACvCD,QAAQ,CACH;AAEZ,CAAC;AAEDL,KAAG,CAACa,SAAS,GAAG;EACdR,QAAQ,eAAES,SAAS,CAACC,SAAS,CAAC,CAC5BD,SAAS,CAACE,MAAM,EAChBF,SAAS,CAACG,OAAO,EACjBH,SAAS,CAACI,IAAI,CACf,CAAC,CAACC,UAAU;EACbC,QAAQ,EAAEN,SAAS,CAACO,IAAI;EACxBC,KAAK,EAAER,SAAS,CAACE,MAAM;EACvBZ,MAAM,EAAEU,SAAS,CAACS;CACnB;AAEDvB,KAAG,CAACwB,YAAY,GAAG;EACjBJ,QAAQ,EAAE,SAAAA,aAAQ;EAClBE,KAAK,EAAE,EAAE;EACTlB,MAAM,EAAE;CACT;AAED,AAAO,IAAMqB,IAAI,GAAG,SAAPA,IAAIA,CAAAC,KAAA;MAAgBC,YAAY,GAAAD,KAAA,CAAtBrB,QAAQ;IAAgBiB,KAAK,GAAAI,KAAA,CAALJ,KAAK;IAAEF,Q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AAEzI,KAAK,CAAC0I;KACxBrK,oBAACsK,MAAW,QACVtK,oBAACuK,KAAK;IAACC,IAAI,OAAKb,KAAK,CAACa,IAAM;IAAEC,KAAK;IAACC,SAAS,EAAE7C;IAAY,EAC3D7H,oBAACuK,KAAK;IAACC,IAAI,EAAKb,KAAK,CAACa,IAAI,WAAQ;IAAEE,SAAS,EAAE7C;IAAY,EAC3D7H,oBAACuK,KAAK;IAACC,IAAI,EAAKb,KAAK,CAACa,IAAI,UAAO;IAAEE,SAAS,EAAEjB;IAAY,CAC9C,CACL,CACV;AAEP,CAAC;;SC9BekB,KAAKA,CAAChJ,KAAY;EAChC,OAAO3B,oBAAC0J,IAAI,oBAAK/H,KAAK,EAAI;AAC5B;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC, ReactElement } from 'react';
|
|
2
|
+
interface EmptyStateProps {
|
|
3
|
+
icon?: string | ReactElement;
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
activeButton?: boolean;
|
|
7
|
+
iconButton?: ReactElement;
|
|
8
|
+
descriptionButton?: string;
|
|
9
|
+
widthButton?: string;
|
|
10
|
+
button?: ReactElement;
|
|
11
|
+
backgroundIcon?: string;
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
hasBorder?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const EmptyState: FC<EmptyStateProps>;
|
|
16
|
+
export default EmptyState;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ContainerProps {
|
|
3
|
+
hasBorder?: boolean;
|
|
4
|
+
backgroundColor?: string;
|
|
5
|
+
backgroundIcon?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ContainerProps>>;
|
|
8
|
+
export {};
|
package/package.json
CHANGED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React, { FC, ReactElement } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import * as S from './styles';
|
|
4
|
+
|
|
5
|
+
interface EmptyStateProps {
|
|
6
|
+
icon?: string | ReactElement;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
activeButton?: boolean;
|
|
10
|
+
iconButton?: ReactElement;
|
|
11
|
+
descriptionButton?: string;
|
|
12
|
+
widthButton?: string;
|
|
13
|
+
button?: ReactElement;
|
|
14
|
+
backgroundIcon?: string;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
hasBorder?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const EmptyState: FC<EmptyStateProps> = ({
|
|
20
|
+
icon,
|
|
21
|
+
title,
|
|
22
|
+
description,
|
|
23
|
+
activeButton,
|
|
24
|
+
iconButton,
|
|
25
|
+
descriptionButton,
|
|
26
|
+
widthButton,
|
|
27
|
+
button,
|
|
28
|
+
backgroundIcon,
|
|
29
|
+
backgroundColor,
|
|
30
|
+
hasBorder,
|
|
31
|
+
...rest
|
|
32
|
+
}) => {
|
|
33
|
+
return (
|
|
34
|
+
<S.Container
|
|
35
|
+
backgroundIcon={backgroundIcon}
|
|
36
|
+
backgroundColor={backgroundColor}
|
|
37
|
+
hasBorder={hasBorder}
|
|
38
|
+
{...rest}
|
|
39
|
+
>
|
|
40
|
+
<div className="content">
|
|
41
|
+
<div className="icon">
|
|
42
|
+
{icon}
|
|
43
|
+
</div>
|
|
44
|
+
<div className="description">
|
|
45
|
+
<h5> {title}</h5>
|
|
46
|
+
|
|
47
|
+
<p>{description}</p>
|
|
48
|
+
|
|
49
|
+
{activeButton ? (
|
|
50
|
+
<button>
|
|
51
|
+
{descriptionButton}
|
|
52
|
+
</button>
|
|
53
|
+
) : null}
|
|
54
|
+
|
|
55
|
+
{button}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</S.Container>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
EmptyState.propTypes = {
|
|
63
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
64
|
+
title: PropTypes.string,
|
|
65
|
+
description: PropTypes.string,
|
|
66
|
+
activeButton: PropTypes.bool,
|
|
67
|
+
iconButton: PropTypes.element,
|
|
68
|
+
descriptionButton: PropTypes.string,
|
|
69
|
+
widthButton: PropTypes.string,
|
|
70
|
+
button: PropTypes.element,
|
|
71
|
+
backgroundIcon: PropTypes.string,
|
|
72
|
+
backgroundColor: PropTypes.string,
|
|
73
|
+
hasBorder: PropTypes.bool,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
EmptyState.defaultProps = {
|
|
77
|
+
icon: '',
|
|
78
|
+
title: '',
|
|
79
|
+
description: '',
|
|
80
|
+
activeButton: false,
|
|
81
|
+
descriptionButton: '',
|
|
82
|
+
widthButton: '140px',
|
|
83
|
+
backgroundIcon: 'var(--neutral-0)',
|
|
84
|
+
backgroundColor: 'var(--absolute-white)',
|
|
85
|
+
hasBorder: true,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default EmptyState;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
interface ContainerProps {
|
|
4
|
+
hasBorder?: boolean;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
backgroundIcon?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const Container = styled.div<ContainerProps>`
|
|
10
|
+
width: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
padding: 24px 0;
|
|
14
|
+
height: 193px;
|
|
15
|
+
|
|
16
|
+
background: ${({ hasBorder }) =>
|
|
17
|
+
hasBorder &&
|
|
18
|
+
`linear-gradient(
|
|
19
|
+
to right,
|
|
20
|
+
#dadce3 50%,
|
|
21
|
+
rgba(255, 255, 255, 0) 0%
|
|
22
|
+
),
|
|
23
|
+
linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),
|
|
24
|
+
linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),
|
|
25
|
+
linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)`};
|
|
26
|
+
background-position: top, right, bottom, left;
|
|
27
|
+
background-repeat: repeat-x, repeat-y;
|
|
28
|
+
background-size: 40px 1px, 1px 40px;
|
|
29
|
+
background-color: ${({ backgroundColor }) => backgroundColor};
|
|
30
|
+
|
|
31
|
+
& .content {
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
align-items: center;
|
|
35
|
+
|
|
36
|
+
& > .icon {
|
|
37
|
+
background-color: ${({ backgroundIcon }) => backgroundIcon};
|
|
38
|
+
border-radius: 16px;
|
|
39
|
+
width: 145px;
|
|
40
|
+
height: 145px;
|
|
41
|
+
|
|
42
|
+
display: flex;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
|
|
45
|
+
& img {
|
|
46
|
+
width: 72px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
& .description {
|
|
51
|
+
max-width: 600px;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
padding: 8px 0 8px 24px;
|
|
56
|
+
|
|
57
|
+
.button-add {
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.start-icon {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
@@ -14,19 +14,13 @@ const SearchInput: React.FC<SearchInputProps> = ({ placeholder, setFiles, initia
|
|
|
14
14
|
const searchName = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
15
15
|
const searchTerm = e.target.value.trim();
|
|
16
16
|
const normalizedSearchTerm = unorm.nfkd(searchTerm).toLowerCase();
|
|
17
|
-
|
|
18
|
-
console.log('searchTerm: ', searchTerm)
|
|
19
|
-
console.log('initialFiles: ', initialFiles)
|
|
20
17
|
|
|
21
18
|
const newFiles = initialFiles.filter(file => {
|
|
22
19
|
const normalizedFileName = unorm.nfkd(file.name).toLowerCase();
|
|
23
20
|
return normalizedFileName.includes(normalizedSearchTerm);
|
|
24
21
|
});
|
|
25
|
-
|
|
26
|
-
console.log('newFiles: ', newFiles)
|
|
27
|
-
console.log('searchTerm !== "" ? newFiles : initialFiles: ', searchTerm !== '' ? newFiles : initialFiles)
|
|
28
22
|
|
|
29
|
-
setFiles(searchTerm !== ''
|
|
23
|
+
setFiles(searchTerm !== '' ? newFiles : initialFiles);
|
|
30
24
|
}
|
|
31
25
|
|
|
32
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState} from 'react';
|
|
2
2
|
|
|
3
|
-
import { FaUpload } from 'react-icons/fa';
|
|
3
|
+
import { FaUpload, FaList, FaPlus } from 'react-icons/fa';
|
|
4
4
|
|
|
5
5
|
// import { formatAxios } from '../../utils/formatAxios'
|
|
6
6
|
|
|
@@ -13,6 +13,7 @@ import { getLanguage } from '../../utils/getLanguage'
|
|
|
13
13
|
import * as S from './styles';
|
|
14
14
|
import Table from './components/Table';
|
|
15
15
|
import Search from './components/Search';
|
|
16
|
+
import EmptyState from './components/EmptyState';
|
|
16
17
|
|
|
17
18
|
export const FileArea = () => {
|
|
18
19
|
const [files, setFiles] = useState<FileData[]>([]);
|
|
@@ -76,11 +77,7 @@ export const FileArea = () => {
|
|
|
76
77
|
return html;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
const renderFiles = () => {
|
|
80
|
-
if (files.length === 0) {
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
|
|
80
|
+
const renderFiles = () => {
|
|
84
81
|
return (
|
|
85
82
|
<S.Container>
|
|
86
83
|
<S.Header>
|
|
@@ -93,35 +90,48 @@ export const FileArea = () => {
|
|
|
93
90
|
<button><FaUpload /> {t.fileArea.fileUpload}</button>
|
|
94
91
|
</div>
|
|
95
92
|
</S.Header>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</
|
|
120
|
-
</
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
93
|
+
{
|
|
94
|
+
files.length === 0 ? (
|
|
95
|
+
<EmptyState
|
|
96
|
+
icon={<FaList></FaList>}
|
|
97
|
+
title={t.fileArea.emptyState.title}
|
|
98
|
+
description={t.fileArea.emptyState.description}
|
|
99
|
+
activeButton
|
|
100
|
+
iconButton={<FaPlus style={{ width: '15px', height: '15px' }} />}
|
|
101
|
+
descriptionButton={t.fileArea.modal.chooseFile}
|
|
102
|
+
widthButton="230px"
|
|
103
|
+
/>
|
|
104
|
+
) : <Table>
|
|
105
|
+
<thead>
|
|
106
|
+
<tr>
|
|
107
|
+
<th className="th_file_name">
|
|
108
|
+
{t.fileArea.fileName}
|
|
109
|
+
</th>
|
|
110
|
+
<th className="th_pressets">
|
|
111
|
+
{t.fileArea.presset}
|
|
112
|
+
</th>
|
|
113
|
+
<th className="th_actions">
|
|
114
|
+
{t.fileArea.actions}
|
|
115
|
+
</th>
|
|
116
|
+
</tr>
|
|
117
|
+
</thead>
|
|
118
|
+
|
|
119
|
+
<tbody>
|
|
120
|
+
{files.map((object) => (
|
|
121
|
+
<tr>
|
|
122
|
+
<td>{object.name}</td>
|
|
123
|
+
<td className='tags' dangerouslySetInnerHTML={{ __html: presset(object.tags) }} />
|
|
124
|
+
<td>
|
|
125
|
+
<div className='divDelete'>
|
|
126
|
+
<button className='buttonDelete'>{t.buttons.delete}</button>
|
|
127
|
+
</div>
|
|
128
|
+
</td>
|
|
129
|
+
</tr>
|
|
130
|
+
))}
|
|
131
|
+
</tbody>
|
|
132
|
+
</Table>
|
|
133
|
+
}
|
|
134
|
+
|
|
125
135
|
</S.Container>
|
|
126
136
|
);
|
|
127
137
|
}
|