ywana-core8 0.0.269 → 0.0.272
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/index.cjs +37 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +37 -10
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +39 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/html/table.js +4 -4
- package/src/html/text.js +2 -2
- package/src/site/site.js +19 -13
- package/src/site/site.test.js +23 -5
- package/src/widgets/kanban/Kanban.test.js +11 -10
- package/src/widgets/upload/Upload.test.js +35 -0
- package/src/widgets/upload/UploadArea.js +56 -0
- package/src/widgets/upload/UploadDialog.js +41 -0
- package/src/widgets/upload/UploadFile.js +24 -0
- package/src/widgets/upload/UploadProgress.js +21 -0
- package/src/widgets/upload/Uploader.css +77 -0
- package/src/widgets/upload/Uploader.js +73 -0
- package/src/widgets/upload/index.js +4 -0
package/dist/index.modern.js
CHANGED
@@ -3,7 +3,8 @@ import React, { useContext, useState, useEffect, Fragment, useRef, useMemo, Chil
|
|
3
3
|
import RSwitch from 'react-switch';
|
4
4
|
import moment from 'moment';
|
5
5
|
import { extendMoment } from 'moment-range';
|
6
|
-
import 'react-notifications
|
6
|
+
import { ReactNotifications, Store } from 'react-notifications-component';
|
7
|
+
import 'react-notifications-component/dist/theme.css';
|
7
8
|
import equal from 'deep-equal';
|
8
9
|
import ResumableJS from 'resumablejs';
|
9
10
|
|
@@ -219,7 +220,8 @@ var TEXTFORMATS = {
|
|
219
220
|
|
220
221
|
var Text$1 = function Text(_ref) {
|
221
222
|
var format = _ref.format,
|
222
|
-
children = _ref.children
|
223
|
+
children = _ref.children,
|
224
|
+
className = _ref.className;
|
223
225
|
var site = useContext(SiteContext);
|
224
226
|
var value = children;
|
225
227
|
|
@@ -240,7 +242,9 @@ var Text$1 = function Text(_ref) {
|
|
240
242
|
break;
|
241
243
|
}
|
242
244
|
|
243
|
-
return children ? /*#__PURE__*/React.createElement("span",
|
245
|
+
return children ? /*#__PURE__*/React.createElement("span", {
|
246
|
+
className: className
|
247
|
+
}, value) : '';
|
244
248
|
};
|
245
249
|
|
246
250
|
/**
|
@@ -1387,7 +1391,9 @@ var DataTable = function DataTable(props) {
|
|
1387
1391
|
onSort = props.onSort,
|
1388
1392
|
onCheckAll = props.onCheckAll,
|
1389
1393
|
editable = props.editable,
|
1390
|
-
outlined = props.outlined
|
1394
|
+
outlined = props.outlined,
|
1395
|
+
_props$expanded = props.expanded,
|
1396
|
+
expanded = _props$expanded === void 0 ? false : _props$expanded;
|
1391
1397
|
|
1392
1398
|
var _useState = useState({}),
|
1393
1399
|
sortDir = _useState[0];
|
@@ -1497,7 +1503,8 @@ var DataTable = function DataTable(props) {
|
|
1497
1503
|
columns: columns,
|
1498
1504
|
onSelect: select,
|
1499
1505
|
onDrop: sort,
|
1500
|
-
editable: editable
|
1506
|
+
editable: editable,
|
1507
|
+
expanded: expanded
|
1501
1508
|
});
|
1502
1509
|
}))));
|
1503
1510
|
};
|
@@ -1510,10 +1517,12 @@ var DataTableRow = function DataTableRow(props) {
|
|
1510
1517
|
_props$columns2 = props.columns,
|
1511
1518
|
columns = _props$columns2 === void 0 ? [] : _props$columns2,
|
1512
1519
|
onSelect = props.onSelect,
|
1513
|
-
editable = props.editable
|
1520
|
+
editable = props.editable,
|
1521
|
+
_props$expanded2 = props.expanded,
|
1522
|
+
expanded = _props$expanded2 === void 0 ? false : _props$expanded2;
|
1514
1523
|
var className = row.className;
|
1515
1524
|
|
1516
|
-
var _useState2 = useState(
|
1525
|
+
var _useState2 = useState(expanded),
|
1517
1526
|
isInfoOpen = _useState2[0],
|
1518
1527
|
toggleInfo = _useState2[1];
|
1519
1528
|
|
@@ -2791,7 +2800,24 @@ var SiteProvider = function SiteProvider(_ref) {
|
|
2791
2800
|
confirm: function confirm(message) {
|
2792
2801
|
return window.confirm(message);
|
2793
2802
|
},
|
2794
|
-
notify: function notify(_ref2) {
|
2803
|
+
notify: function notify(_ref2) {
|
2804
|
+
var title = _ref2.title,
|
2805
|
+
body = _ref2.body,
|
2806
|
+
_ref2$type = _ref2.type,
|
2807
|
+
type = _ref2$type === void 0 ? "success" : _ref2$type;
|
2808
|
+
Store.addNotification({
|
2809
|
+
title: title,
|
2810
|
+
message: body,
|
2811
|
+
type: type,
|
2812
|
+
insert: "top",
|
2813
|
+
container: "top-right",
|
2814
|
+
animationIn: ["animate__animated", "animate__fadeIn"],
|
2815
|
+
animationOut: ["animate__animated", "animate__fadeOut"],
|
2816
|
+
dismiss: {
|
2817
|
+
duration: 3000,
|
2818
|
+
onScreen: true
|
2819
|
+
}
|
2820
|
+
});
|
2795
2821
|
}
|
2796
2822
|
};
|
2797
2823
|
return /*#__PURE__*/React.createElement(SiteContext.Provider, {
|
@@ -2818,7 +2844,8 @@ var Site = function Site(_ref3) {
|
|
2818
2844
|
}, /*#__PURE__*/React.createElement("div", {
|
2819
2845
|
className: "site6"
|
2820
2846
|
}, /*#__PURE__*/React.createElement(SiteHeader, {
|
2821
|
-
icon: icon
|
2847
|
+
icon: icon,
|
2848
|
+
title: title
|
2822
2849
|
}), /*#__PURE__*/React.createElement(SiteToolBar, null, toolbar), /*#__PURE__*/React.createElement(SiteMenu, {
|
2823
2850
|
logo: logo,
|
2824
2851
|
title: title,
|
@@ -2831,7 +2858,7 @@ var Site = function Site(_ref3) {
|
|
2831
2858
|
};
|
2832
2859
|
|
2833
2860
|
var SiteNotifications = function SiteNotifications() {
|
2834
|
-
return /*#__PURE__*/React.createElement(
|
2861
|
+
return /*#__PURE__*/React.createElement(ReactNotifications, null);
|
2835
2862
|
};
|
2836
2863
|
/**
|
2837
2864
|
* Site Header
|