ywana-core8 0.0.287 → 0.0.290

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 CHANGED
@@ -1449,7 +1449,9 @@ var DataTable = function DataTable(props) {
1449
1449
  }
1450
1450
 
1451
1451
  function select(row, event) {
1452
- if (onRowSelection) onRowSelection(row, event);
1452
+ if (event.target.id !== "checked") {
1453
+ if (onRowSelection) onRowSelection(row, event);
1454
+ }
1453
1455
  }
1454
1456
 
1455
1457
  function sort(dragged, dropped) {
@@ -1480,6 +1482,7 @@ var DataTable = function DataTable(props) {
1480
1482
  colspan = _ref2[1];
1481
1483
 
1482
1484
  return /*#__PURE__*/React__default["default"].createElement("th", {
1485
+ key: id,
1483
1486
  rowSpan: rowspan,
1484
1487
  colSpan: colspan
1485
1488
  }, id === "checked" ? /*#__PURE__*/React__default["default"].createElement(CheckBox, {
@@ -2424,7 +2427,8 @@ var Planner = function Planner(_ref) {
2424
2427
  lanes = _ref$lanes === void 0 ? [] : _ref$lanes,
2425
2428
  _ref$navigation = _ref.navigation,
2426
2429
  navigation = _ref$navigation === void 0 ? true : _ref$navigation,
2427
- onSelectCell = _ref.onSelectCell;
2430
+ onSelectCell = _ref.onSelectCell,
2431
+ focusEvent = _ref.focusEvent;
2428
2432
 
2429
2433
  var _useState = React.useState("month"),
2430
2434
  dateRange = _useState[0],
@@ -2438,6 +2442,14 @@ var Planner = function Planner(_ref) {
2438
2442
  to = _useState3[0],
2439
2443
  setTo = _useState3[1];
2440
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]);
2441
2453
  React.useEffect(function () {
2442
2454
  var today = moment__default["default"]();
2443
2455
  var from_date = today.startOf(dateRange).format("YYYY-MM-DD");
@@ -3122,7 +3134,8 @@ var SiteMenu = function SiteMenu(_ref5) {
3122
3134
  var children = _ref5.children,
3123
3135
  min = _ref5.min;
3124
3136
  var context = React.useContext(SiteContext);
3125
- var sideNav = context.sideNav,
3137
+ var page = context.page,
3138
+ sideNav = context.sideNav,
3126
3139
  setSideNav = context.setSideNav,
3127
3140
  showNav = context.showNav;
3128
3141
  React.useEffect(function () {
@@ -3165,8 +3178,9 @@ var SiteMenu = function SiteMenu(_ref5) {
3165
3178
  _ref6$icon = _ref6.icon,
3166
3179
  icon = _ref6$icon === void 0 ? 'info' : _ref6$icon,
3167
3180
  title = _ref6.title;
3181
+ var styleItem = id === page ? 'selected' : '';
3168
3182
  return /*#__PURE__*/React__default["default"].createElement("div", {
3169
- className: "site-menu-item",
3183
+ className: "site-menu-item " + styleItem,
3170
3184
  key: id,
3171
3185
  onClick: function onClick() {
3172
3186
  return _goto(id);
@@ -3175,7 +3189,6 @@ var SiteMenu = function SiteMenu(_ref5) {
3175
3189
  key: id,
3176
3190
  icon: icon,
3177
3191
  clickable: true,
3178
- checked: id === context.page,
3179
3192
  action: function action() {
3180
3193
  return _goto(id);
3181
3194
  }
@@ -5506,7 +5519,6 @@ var TableEditor = function TableEditor(props) {
5506
5519
  var option = options.find(function (option) {
5507
5520
  return option.value === groupName;
5508
5521
  });
5509
- console.log(groupName, options, option);
5510
5522
  return option ? option.label : groupName;
5511
5523
  } else {
5512
5524
  return groupName;