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.cjs CHANGED
@@ -2161,14 +2161,17 @@ var TreeItem = function TreeItem(_ref3) {
2161
2161
  icon = _ref3$icon === void 0 ? 'description' : _ref3$icon,
2162
2162
  label = _ref3.label,
2163
2163
  actions = _ref3.actions,
2164
- onSelect = _ref3.onSelect;
2164
+ onSelect = _ref3.onSelect,
2165
+ _ref3$selected = _ref3.selected,
2166
+ selected = _ref3$selected === void 0 ? false : _ref3$selected;
2165
2167
 
2166
2168
  function select() {
2167
2169
  if (onSelect) onSelect(id);
2168
2170
  }
2169
2171
 
2172
+ var style = selected ? "selected" : "";
2170
2173
  return /*#__PURE__*/React__default["default"].createElement("div", {
2171
- className: "tree-item final",
2174
+ className: "tree-item final " + style,
2172
2175
  onClick: select
2173
2176
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
2174
2177
  icon: icon,
@@ -5435,12 +5438,14 @@ var CollectionTree = function CollectionTree(props) {
5435
5438
  label: title,
5436
5439
  open: true
5437
5440
  }, node.nodes ? renderNodes(node.nodes) : node.items.map(function (item) {
5441
+ var selected = pageContext.selected && item.id === pageContext.selected.id;
5438
5442
  return /*#__PURE__*/React__default["default"].createElement(TreeItem, {
5439
5443
  icon: icon,
5440
5444
  key: item.id,
5441
5445
  id: item.id,
5442
5446
  label: item.name,
5443
- onSelect: select
5447
+ onSelect: select,
5448
+ selected: selected
5444
5449
  }, "item");
5445
5450
  }));
5446
5451
  });
@@ -6019,7 +6024,8 @@ var TablePage = function TablePage(props) {
6019
6024
  url = props.url,
6020
6025
  field = props.field,
6021
6026
  host = props.host,
6022
- params = props.params,
6027
+ _props$params = props.params,
6028
+ params = _props$params === void 0 ? "" : _props$params,
6023
6029
  _props$autosave = props.autosave,
6024
6030
  autosave = _props$autosave === void 0 ? true : _props$autosave,
6025
6031
  _props$delay = props.delay,
@@ -6891,6 +6897,10 @@ var TableContext$1 = function TableContext(url, field, host, urlQuery, params) {
6891
6897
 
6892
6898
 
6893
6899
  var TableAPI$1 = function TableAPI(url, host, params) {
6900
+ if (params === void 0) {
6901
+ params = "";
6902
+ }
6903
+
6894
6904
  var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
6895
6905
  return {
6896
6906
  all: function all(filters) {