ywana-core8 0.0.618 → 0.0.621
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 +47 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +47 -40
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +47 -40
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +10 -6
- package/src/html/button.js +2 -1
package/dist/index.umd.js
CHANGED
@@ -302,40 +302,6 @@
|
|
302
302
|
})), open ? /*#__PURE__*/React__default["default"].createElement("main", null, children) : '');
|
303
303
|
};
|
304
304
|
|
305
|
-
/**
|
306
|
-
* HTML Button
|
307
|
-
*/
|
308
|
-
|
309
|
-
var Button = function Button(_ref) {
|
310
|
-
var label = _ref.label,
|
311
|
-
icon = _ref.icon,
|
312
|
-
action = _ref.action,
|
313
|
-
_ref$disabled = _ref.disabled,
|
314
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
315
|
-
outlined = _ref.outlined,
|
316
|
-
raised = _ref.raised;
|
317
|
-
|
318
|
-
function click(event) {
|
319
|
-
if (!disabled) {
|
320
|
-
event.stopPropagation();
|
321
|
-
event.preventDefault();
|
322
|
-
if (action) action();
|
323
|
-
}
|
324
|
-
}
|
325
|
-
|
326
|
-
var style = raised ? 'raised' : outlined ? 'outlined' : 'normal';
|
327
|
-
if (disabled) style = style + " disabled";
|
328
|
-
return /*#__PURE__*/React__default["default"].createElement("button", {
|
329
|
-
className: "btn " + style,
|
330
|
-
onClick: click
|
331
|
-
}, icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
332
|
-
icon: icon,
|
333
|
-
size: "small",
|
334
|
-
clickable: true,
|
335
|
-
action: click
|
336
|
-
}) : null, /*#__PURE__*/React__default["default"].createElement("span", null, label));
|
337
|
-
};
|
338
|
-
|
339
305
|
/**
|
340
306
|
* Site Context
|
341
307
|
*/
|
@@ -384,6 +350,40 @@
|
|
384
350
|
}, value) : '';
|
385
351
|
};
|
386
352
|
|
353
|
+
/**
|
354
|
+
* HTML Button
|
355
|
+
*/
|
356
|
+
|
357
|
+
var Button = function Button(_ref) {
|
358
|
+
var label = _ref.label,
|
359
|
+
icon = _ref.icon,
|
360
|
+
action = _ref.action,
|
361
|
+
_ref$disabled = _ref.disabled,
|
362
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
363
|
+
outlined = _ref.outlined,
|
364
|
+
raised = _ref.raised;
|
365
|
+
|
366
|
+
function click(event) {
|
367
|
+
if (!disabled) {
|
368
|
+
event.stopPropagation();
|
369
|
+
event.preventDefault();
|
370
|
+
if (action) action();
|
371
|
+
}
|
372
|
+
}
|
373
|
+
|
374
|
+
var style = raised ? 'raised' : outlined ? 'outlined' : 'normal';
|
375
|
+
if (disabled) style = style + " disabled";
|
376
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
377
|
+
className: "btn " + style,
|
378
|
+
onClick: click
|
379
|
+
}, icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
380
|
+
icon: icon,
|
381
|
+
size: "small",
|
382
|
+
clickable: true,
|
383
|
+
action: click
|
384
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement(Text, null, label));
|
385
|
+
};
|
386
|
+
|
387
387
|
/**
|
388
388
|
* CheckBox
|
389
389
|
*/
|
@@ -5941,7 +5941,6 @@
|
|
5941
5941
|
}
|
5942
5942
|
|
5943
5943
|
function group(items, by) {
|
5944
|
-
console.log(schema, items, by);
|
5945
5944
|
var options = schema[by] ? schema[by].options : null;
|
5946
5945
|
return items.reduce(function (nodes, field) {
|
5947
5946
|
var node = nodes.find(function (n) {
|
@@ -5949,13 +5948,21 @@
|
|
5949
5948
|
});
|
5950
5949
|
|
5951
5950
|
if (!node) {
|
5952
|
-
var name =
|
5953
|
-
|
5954
|
-
|
5951
|
+
var name = field[by];
|
5952
|
+
var title = field[by];
|
5953
|
+
|
5954
|
+
if (options) {
|
5955
|
+
var opt = options.find(function (option) {
|
5956
|
+
return option.value === field[by];
|
5957
|
+
});
|
5958
|
+
if (opt) title = opt.label;
|
5959
|
+
}
|
5960
|
+
|
5955
5961
|
node = {
|
5956
5962
|
name: name,
|
5957
5963
|
items: [],
|
5958
|
-
field: by
|
5964
|
+
field: by,
|
5965
|
+
title: title
|
5959
5966
|
};
|
5960
5967
|
nodes.push(node);
|
5961
5968
|
}
|
@@ -5976,7 +5983,7 @@
|
|
5976
5983
|
|
5977
5984
|
function renderNodes(nodes) {
|
5978
5985
|
return nodes.map(function (node) {
|
5979
|
-
var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.
|
5986
|
+
var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.title;
|
5980
5987
|
return /*#__PURE__*/React__default["default"].createElement(TreeNode, {
|
5981
5988
|
key: node.name,
|
5982
5989
|
icon: null,
|