@longline/aqua-ui 1.0.227 → 1.0.229

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.
@@ -137,6 +137,6 @@ interface IListViewProps {
137
137
  * If `item` is false, the all items must be unchecked.
138
138
  * @param item Item to toggle.
139
139
  */
140
- onCheck?: (idx: number | boolean) => void;
140
+ onCheck?: (item: any | boolean) => void;
141
141
  }
142
142
  export { IListViewProps };
@@ -68,20 +68,22 @@ var ListViewBase = function (props) {
68
68
  setReverse((_a = column.reverse) !== null && _a !== void 0 ? _a : false);
69
69
  }
70
70
  };
71
- var handleCheck = function (index) {
71
+ var handleCheck = function (item) {
72
+ // Is there a handler for onCheck? If not, abort.
72
73
  if (!props.onCheck)
73
74
  return;
75
+ // Is the input data an array? If not, abort.
74
76
  if (!Array.isArray(data))
75
77
  return;
76
- var newData = data.map(function (d, idx) {
77
- if (index === true)
78
+ var newData = data.map(function (d) {
79
+ if (item === true)
78
80
  return __assign(__assign({}, d), { checked: true });
79
- if (index === false)
81
+ if (item === false)
80
82
  return __assign(__assign({}, d), { checked: false });
81
- return __assign(__assign({}, d), { checked: index === idx ? !d.checked : !!d.checked });
83
+ return __assign(__assign({}, d), { checked: item === d ? !d.checked : !!d.checked });
82
84
  });
83
85
  setData(newData);
84
- props.onCheck(index);
86
+ props.onCheck(item);
85
87
  };
86
88
  var handleColumns = function () {
87
89
  setColumnsMode(true);
@@ -77,7 +77,7 @@ var Body = React.forwardRef(function (props, ref) {
77
77
  (props.onClick || props.onDoubleClick) ? 'clickable' : null
78
78
  ].join(' '), onClick: props.onClick ? function () { return props.onClick(item); } : null, onDoubleClick: props.onDoubleClick ? function () { return props.onDoubleClick(item); } : null },
79
79
  props.onCheck && React.createElement("div", { className: "cell check" },
80
- React.createElement(Selector, { checked: !!item.checked, onChange: function () { return props.onCheck(i); } })),
80
+ React.createElement(Selector, { checked: !!item.checked, onChange: function () { return props.onCheck(props.data[i]); } })),
81
81
  props.columns.map(function (col, index) {
82
82
  return React.createElement("div", { className: "cell", key: index, style: { justifyContent: col.align == 'right' ? 'end' : 'start' } },
83
83
  index == 0 && props.decorator && props.decorator(item),
@@ -40,7 +40,7 @@ interface IIdwLayerProps {
40
40
  * slowing down the fragment shader.
41
41
  * @default 256
42
42
  */
43
- resolution: 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
43
+ resolution?: 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
44
44
  }
45
45
  /**
46
46
  * An `IdwLayer` takes a data array of points of the form
@@ -0,0 +1 @@
1
+ export * from './IdwLayer';
@@ -0,0 +1 @@
1
+ export * from './IdwLayer';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.227",
3
+ "version": "1.0.229",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",