ywana-core8 0.0.286 → 0.0.289
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 +16 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +16 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +16 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/checkbox.js +2 -0
- package/src/html/table.js +4 -2
- package/src/html/table.test.js +31 -0
- package/src/widgets/planner/Planner.js +10 -1
- package/src/widgets/planner/Planner.test.js +16 -7
package/dist/index.cjs
CHANGED
@@ -267,6 +267,8 @@ var CheckBox = function CheckBox(props) {
|
|
267
267
|
onChange = props.onChange;
|
268
268
|
|
269
269
|
function change(event) {
|
270
|
+
event.stopPropagation();
|
271
|
+
event.preventDefault();
|
270
272
|
var value = event.target.checked;
|
271
273
|
if (onChange) onChange(id, value);
|
272
274
|
}
|
@@ -1447,7 +1449,9 @@ var DataTable = function DataTable(props) {
|
|
1447
1449
|
}
|
1448
1450
|
|
1449
1451
|
function select(row, event) {
|
1450
|
-
if (
|
1452
|
+
if (event.target.id !== "checked") {
|
1453
|
+
if (onRowSelection) onRowSelection(row, event);
|
1454
|
+
}
|
1451
1455
|
}
|
1452
1456
|
|
1453
1457
|
function sort(dragged, dropped) {
|
@@ -1478,6 +1482,7 @@ var DataTable = function DataTable(props) {
|
|
1478
1482
|
colspan = _ref2[1];
|
1479
1483
|
|
1480
1484
|
return /*#__PURE__*/React__default["default"].createElement("th", {
|
1485
|
+
key: id,
|
1481
1486
|
rowSpan: rowspan,
|
1482
1487
|
colSpan: colspan
|
1483
1488
|
}, id === "checked" ? /*#__PURE__*/React__default["default"].createElement(CheckBox, {
|
@@ -2422,7 +2427,8 @@ var Planner = function Planner(_ref) {
|
|
2422
2427
|
lanes = _ref$lanes === void 0 ? [] : _ref$lanes,
|
2423
2428
|
_ref$navigation = _ref.navigation,
|
2424
2429
|
navigation = _ref$navigation === void 0 ? true : _ref$navigation,
|
2425
|
-
onSelectCell = _ref.onSelectCell
|
2430
|
+
onSelectCell = _ref.onSelectCell,
|
2431
|
+
focusEvent = _ref.focusEvent;
|
2426
2432
|
|
2427
2433
|
var _useState = React.useState("month"),
|
2428
2434
|
dateRange = _useState[0],
|
@@ -2436,6 +2442,14 @@ var Planner = function Planner(_ref) {
|
|
2436
2442
|
to = _useState3[0],
|
2437
2443
|
setTo = _useState3[1];
|
2438
2444
|
|
2445
|
+
React.useEffect(function () {
|
2446
|
+
var element = document.getElementById(focusEvent);
|
2447
|
+
if (element) element.scrollIntoView({
|
2448
|
+
behavior: 'smooth',
|
2449
|
+
block: 'start',
|
2450
|
+
inline: 'center'
|
2451
|
+
});
|
2452
|
+
}, [focusEvent]);
|
2439
2453
|
React.useEffect(function () {
|
2440
2454
|
var today = moment__default["default"]();
|
2441
2455
|
var from_date = today.startOf(dateRange).format("YYYY-MM-DD");
|