ywana-core8 0.0.543 → 0.0.546

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
@@ -2156,14 +2156,17 @@
2156
2156
  icon = _ref3$icon === void 0 ? 'description' : _ref3$icon,
2157
2157
  label = _ref3.label,
2158
2158
  actions = _ref3.actions,
2159
- onSelect = _ref3.onSelect;
2159
+ onSelect = _ref3.onSelect,
2160
+ _ref3$selected = _ref3.selected,
2161
+ selected = _ref3$selected === void 0 ? false : _ref3$selected;
2160
2162
 
2161
2163
  function select() {
2162
2164
  if (onSelect) onSelect(id);
2163
2165
  }
2164
2166
 
2167
+ var style = selected ? "selected" : "";
2165
2168
  return /*#__PURE__*/React__default["default"].createElement("div", {
2166
- className: "tree-item final",
2169
+ className: "tree-item final " + style,
2167
2170
  onClick: select
2168
2171
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
2169
2172
  icon: icon,
@@ -5430,12 +5433,14 @@
5430
5433
  label: title,
5431
5434
  open: true
5432
5435
  }, node.nodes ? renderNodes(node.nodes) : node.items.map(function (item) {
5436
+ var selected = pageContext.selected && item.id === pageContext.selected.id;
5433
5437
  return /*#__PURE__*/React__default["default"].createElement(TreeItem, {
5434
5438
  icon: icon,
5435
5439
  key: item.id,
5436
5440
  id: item.id,
5437
5441
  label: item.name,
5438
- onSelect: select
5442
+ onSelect: select,
5443
+ selected: selected
5439
5444
  }, "item");
5440
5445
  }));
5441
5446
  });
@@ -6014,7 +6019,8 @@
6014
6019
  url = props.url,
6015
6020
  field = props.field,
6016
6021
  host = props.host,
6017
- params = props.params,
6022
+ _props$params = props.params,
6023
+ params = _props$params === void 0 ? "" : _props$params,
6018
6024
  _props$autosave = props.autosave,
6019
6025
  autosave = _props$autosave === void 0 ? true : _props$autosave,
6020
6026
  _props$delay = props.delay,
@@ -6886,6 +6892,10 @@
6886
6892
 
6887
6893
 
6888
6894
  var TableAPI$1 = function TableAPI(url, host, params) {
6895
+ if (params === void 0) {
6896
+ params = "";
6897
+ }
6898
+
6889
6899
  var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
6890
6900
  return {
6891
6901
  all: function all(filters) {