ywana-core8 0.0.542 → 0.0.545

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,
@@ -5440,7 +5443,8 @@ var CollectionTree = function CollectionTree(props) {
5440
5443
  key: item.id,
5441
5444
  id: item.id,
5442
5445
  label: item.name,
5443
- onSelect: select
5446
+ onSelect: select,
5447
+ selected: item.id === pageContext.selected
5444
5448
  }, "item");
5445
5449
  }));
5446
5450
  });
@@ -6019,6 +6023,8 @@ var TablePage = function TablePage(props) {
6019
6023
  url = props.url,
6020
6024
  field = props.field,
6021
6025
  host = props.host,
6026
+ _props$params = props.params,
6027
+ params = _props$params === void 0 ? "" : _props$params,
6022
6028
  _props$autosave = props.autosave,
6023
6029
  autosave = _props$autosave === void 0 ? true : _props$autosave,
6024
6030
  _props$delay = props.delay,
@@ -6057,7 +6063,7 @@ var TablePage = function TablePage(props) {
6057
6063
  pageContext = _useContext[0],
6058
6064
  setPageContext = _useContext[1];
6059
6065
 
6060
- var context = TableContext$1(url, field, host, urlQuery);
6066
+ var context = TableContext$1(url, field, host, urlQuery, params);
6061
6067
  var selected = pageContext.selected;
6062
6068
  var timer = React.useRef(null);
6063
6069
 
@@ -6710,8 +6716,8 @@ var TableEditor$1 = function TableEditor(props) {
6710
6716
  * Table Context
6711
6717
  */
6712
6718
 
6713
- var TableContext$1 = function TableContext(url, field, host, urlQuery) {
6714
- var API = TableAPI$1(url, host);
6719
+ var TableContext$1 = function TableContext(url, field, host, urlQuery, params) {
6720
+ var API = TableAPI$1(url, host, params);
6715
6721
  return {
6716
6722
  all: [],
6717
6723
  checked: new Set([]),
@@ -6889,11 +6895,15 @@ var TableContext$1 = function TableContext(url, field, host, urlQuery) {
6889
6895
  */
6890
6896
 
6891
6897
 
6892
- var TableAPI$1 = function TableAPI(url, host) {
6898
+ var TableAPI$1 = function TableAPI(url, host, params) {
6899
+ if (params === void 0) {
6900
+ params = "";
6901
+ }
6902
+
6893
6903
  var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
6894
6904
  return {
6895
6905
  all: function all(filters) {
6896
- var queryParams = "?";
6906
+ var queryParams = "?" + params;
6897
6907
 
6898
6908
  if (filters) {
6899
6909
  var filterQuery = Object.keys(filters).reduce(function (query, key) {