ywana-core8 0.0.619 → 0.0.622

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
@@ -308,40 +308,6 @@ var AccordionSection = function AccordionSection(props) {
308
308
  })), open ? /*#__PURE__*/React__default["default"].createElement("main", null, children) : '');
309
309
  };
310
310
 
311
- /**
312
- * HTML Button
313
- */
314
-
315
- var Button = function Button(_ref) {
316
- var label = _ref.label,
317
- icon = _ref.icon,
318
- action = _ref.action,
319
- _ref$disabled = _ref.disabled,
320
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
321
- outlined = _ref.outlined,
322
- raised = _ref.raised;
323
-
324
- function click(event) {
325
- if (!disabled) {
326
- event.stopPropagation();
327
- event.preventDefault();
328
- if (action) action();
329
- }
330
- }
331
-
332
- var style = raised ? 'raised' : outlined ? 'outlined' : 'normal';
333
- if (disabled) style = style + " disabled";
334
- return /*#__PURE__*/React__default["default"].createElement("button", {
335
- className: "btn " + style,
336
- onClick: click
337
- }, icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
338
- icon: icon,
339
- size: "small",
340
- clickable: true,
341
- action: click
342
- }) : null, /*#__PURE__*/React__default["default"].createElement("span", null, label));
343
- };
344
-
345
311
  /**
346
312
  * Site Context
347
313
  */
@@ -390,6 +356,40 @@ var Text = function Text(_ref) {
390
356
  }, value) : '';
391
357
  };
392
358
 
359
+ /**
360
+ * HTML Button
361
+ */
362
+
363
+ var Button = function Button(_ref) {
364
+ var label = _ref.label,
365
+ icon = _ref.icon,
366
+ action = _ref.action,
367
+ _ref$disabled = _ref.disabled,
368
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
369
+ outlined = _ref.outlined,
370
+ raised = _ref.raised;
371
+
372
+ function click(event) {
373
+ if (!disabled) {
374
+ event.stopPropagation();
375
+ event.preventDefault();
376
+ if (action) action();
377
+ }
378
+ }
379
+
380
+ var style = raised ? 'raised' : outlined ? 'outlined' : 'normal';
381
+ if (disabled) style = style + " disabled";
382
+ return /*#__PURE__*/React__default["default"].createElement("button", {
383
+ className: "btn " + style,
384
+ onClick: click
385
+ }, icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
386
+ icon: icon,
387
+ size: "small",
388
+ clickable: true,
389
+ action: click
390
+ }) : null, /*#__PURE__*/React__default["default"].createElement(Text, null, label));
391
+ };
392
+
393
393
  /**
394
394
  * CheckBox
395
395
  */
@@ -5647,6 +5647,7 @@ var CollectionPage = function CollectionPage(props) {
5647
5647
  levels = props.levels,
5648
5648
  sorter = props.sorter,
5649
5649
  editor = props.editor,
5650
+ footer = props.footer,
5650
5651
  children = props.children;
5651
5652
 
5652
5653
  var _useContext = React.useContext(PageContext),
@@ -5761,7 +5762,7 @@ var CollectionPage = function CollectionPage(props) {
5761
5762
  canDelete: canDelete,
5762
5763
  canEdit: canEdit,
5763
5764
  onReload: reloadSelection
5764
- }), children ? /*#__PURE__*/React__default["default"].createElement("article", null, children) : null));
5765
+ }), children ? /*#__PURE__*/React__default["default"].createElement("article", null, children) : null), /*#__PURE__*/React__default["default"].createElement("footer", null, footer));
5765
5766
  };
5766
5767
  var CollectionFilters = function CollectionFilters(props) {
5767
5768
  var change = function change(next) {
@@ -5955,18 +5956,20 @@ var CollectionTree = function CollectionTree(props) {
5955
5956
 
5956
5957
  if (!node) {
5957
5958
  var name = field[by];
5959
+ var title = field[by];
5958
5960
 
5959
5961
  if (options) {
5960
5962
  var opt = options.find(function (option) {
5961
5963
  return option.value === field[by];
5962
5964
  });
5963
- if (opt) name = opt.label;
5965
+ if (opt) title = opt.label;
5964
5966
  }
5965
5967
 
5966
5968
  node = {
5967
5969
  name: name,
5968
5970
  items: [],
5969
- field: by
5971
+ field: by,
5972
+ title: title
5970
5973
  };
5971
5974
  nodes.push(node);
5972
5975
  }
@@ -5987,7 +5990,7 @@ var CollectionTree = function CollectionTree(props) {
5987
5990
 
5988
5991
  function renderNodes(nodes) {
5989
5992
  return nodes.map(function (node) {
5990
- var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.name;
5993
+ var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.title;
5991
5994
  return /*#__PURE__*/React__default["default"].createElement(TreeNode, {
5992
5995
  key: node.name,
5993
5996
  icon: null,