code7-leia 0.1.176 → 0.1.177
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 +10 -1
- 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 +11 -2
- package/dist/code7-leia.esm.js.map +1 -1
- package/dist/interface/FileData.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/FileArea/index.tsx +10 -2
- package/src/interface/FileData.ts +1 -0
package/dist/code7-leia.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import cc from 'classcat';
|
|
6
6
|
import styled, { css } from 'styled-components';
|
|
7
7
|
import { renderToString } from 'react-dom/server';
|
|
8
|
-
import { FaSearch, FaUpload, FaList, FaPlus, FaCheck } from 'react-icons/fa';
|
|
8
|
+
import { FaSearch, FaUpload, FaList, FaPlus, FaCheck, FaFile } from 'react-icons/fa';
|
|
9
9
|
import { GiWeightLiftingUp } from 'react-icons/gi';
|
|
10
10
|
import { TiDelete } from 'react-icons/ti';
|
|
11
11
|
import unorm from 'unorm';
|
|
@@ -1555,6 +1555,15 @@ var FileArea = function FileArea() {
|
|
|
1555
1555
|
setModalTraining(false);
|
|
1556
1556
|
setPresset([]);
|
|
1557
1557
|
};
|
|
1558
|
+
var viewFile = function viewFile(link) {
|
|
1559
|
+
if (link) {
|
|
1560
|
+
var checkIcon = renderToString(React.createElement(FaFile, {
|
|
1561
|
+
size: 14
|
|
1562
|
+
}));
|
|
1563
|
+
return "<a href='" + link + "' target='_blank'>" + checkIcon + "</a>";
|
|
1564
|
+
}
|
|
1565
|
+
return null;
|
|
1566
|
+
};
|
|
1558
1567
|
var renderFiles = function renderFiles() {
|
|
1559
1568
|
return React.createElement(Container, {
|
|
1560
1569
|
isloading: isloading
|
|
@@ -1605,7 +1614,7 @@ var FileArea = function FileArea() {
|
|
|
1605
1614
|
key: "th_actions",
|
|
1606
1615
|
className: "th_actions"
|
|
1607
1616
|
}, t.fileArea.actions))), React.createElement("tbody", null, files.map(function (object) {
|
|
1608
|
-
return React.createElement("tr", null, React.createElement("td", null, object.name), React.createElement("td", null, object.trained ? React.createElement(FaCheck, {
|
|
1617
|
+
return React.createElement("tr", null, React.createElement("td", null, " ", viewFile(object.link), " ", object.name), React.createElement("td", null, object.trained ? React.createElement(FaCheck, {
|
|
1609
1618
|
size: 14,
|
|
1610
1619
|
style: {
|
|
1611
1620
|
color: 'green'
|