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.umd.js CHANGED
@@ -1444,7 +1444,9 @@
1444
1444
  }
1445
1445
 
1446
1446
  function select(row, event) {
1447
- if (onRowSelection) onRowSelection(row, event);
1447
+ if (event.target.id !== "checked") {
1448
+ if (onRowSelection) onRowSelection(row, event);
1449
+ }
1448
1450
  }
1449
1451
 
1450
1452
  function sort(dragged, dropped) {
@@ -1475,6 +1477,7 @@
1475
1477
  colspan = _ref2[1];
1476
1478
 
1477
1479
  return /*#__PURE__*/React__default["default"].createElement("th", {
1480
+ key: id,
1478
1481
  rowSpan: rowspan,
1479
1482
  colSpan: colspan
1480
1483
  }, id === "checked" ? /*#__PURE__*/React__default["default"].createElement(CheckBox, {
@@ -2419,7 +2422,8 @@
2419
2422
  lanes = _ref$lanes === void 0 ? [] : _ref$lanes,
2420
2423
  _ref$navigation = _ref.navigation,
2421
2424
  navigation = _ref$navigation === void 0 ? true : _ref$navigation,
2422
- onSelectCell = _ref.onSelectCell;
2425
+ onSelectCell = _ref.onSelectCell,
2426
+ focusEvent = _ref.focusEvent;
2423
2427
 
2424
2428
  var _useState = React.useState("month"),
2425
2429
  dateRange = _useState[0],
@@ -2433,6 +2437,14 @@
2433
2437
  to = _useState3[0],
2434
2438
  setTo = _useState3[1];
2435
2439
 
2440
+ React.useEffect(function () {
2441
+ var element = document.getElementById(focusEvent);
2442
+ if (element) element.scrollIntoView({
2443
+ behavior: 'smooth',
2444
+ block: 'start',
2445
+ inline: 'center'
2446
+ });
2447
+ }, [focusEvent]);
2436
2448
  React.useEffect(function () {
2437
2449
  var today = moment__default["default"]();
2438
2450
  var from_date = today.startOf(dateRange).format("YYYY-MM-DD");
@@ -3117,7 +3129,8 @@
3117
3129
  var children = _ref5.children,
3118
3130
  min = _ref5.min;
3119
3131
  var context = React.useContext(SiteContext);
3120
- var sideNav = context.sideNav,
3132
+ var page = context.page,
3133
+ sideNav = context.sideNav,
3121
3134
  setSideNav = context.setSideNav,
3122
3135
  showNav = context.showNav;
3123
3136
  React.useEffect(function () {
@@ -3160,8 +3173,9 @@
3160
3173
  _ref6$icon = _ref6.icon,
3161
3174
  icon = _ref6$icon === void 0 ? 'info' : _ref6$icon,
3162
3175
  title = _ref6.title;
3176
+ var styleItem = id === page ? 'selected' : '';
3163
3177
  return /*#__PURE__*/React__default["default"].createElement("div", {
3164
- className: "site-menu-item",
3178
+ className: "site-menu-item " + styleItem,
3165
3179
  key: id,
3166
3180
  onClick: function onClick() {
3167
3181
  return _goto(id);
@@ -3170,7 +3184,6 @@
3170
3184
  key: id,
3171
3185
  icon: icon,
3172
3186
  clickable: true,
3173
- checked: id === context.page,
3174
3187
  action: function action() {
3175
3188
  return _goto(id);
3176
3189
  }
@@ -5501,7 +5514,6 @@
5501
5514
  var option = options.find(function (option) {
5502
5515
  return option.value === groupName;
5503
5516
  });
5504
- console.log(groupName, options, option);
5505
5517
  return option ? option.label : groupName;
5506
5518
  } else {
5507
5519
  return groupName;