ywana-core8 0.0.756 → 0.0.758

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
@@ -1719,7 +1719,9 @@ var DataTable = function DataTable(props) {
1719
1719
  outlined = props.outlined,
1720
1720
  _props$expanded = props.expanded,
1721
1721
  expanded = _props$expanded === void 0 ? false : _props$expanded,
1722
- className = props.className;
1722
+ className = props.className,
1723
+ _props$emptyMessage = props.emptyMessage,
1724
+ emptyMessage = _props$emptyMessage === void 0 ? "No Results Found" : _props$emptyMessage;
1723
1725
 
1724
1726
  var _useState = React.useState({}),
1725
1727
  sortDir = _useState[0],
@@ -1858,7 +1860,7 @@ var DataTable = function DataTable(props) {
1858
1860
  className: "empty-message"
1859
1861
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
1860
1862
  icon: "search_off"
1861
- }), /*#__PURE__*/React__default["default"].createElement(Text, null, "No Result Found")))))));
1863
+ }), /*#__PURE__*/React__default["default"].createElement(Text, null, emptyMessage)))))));
1862
1864
  };
1863
1865
  /**
1864
1866
  * DataTable Row
@@ -1930,7 +1932,8 @@ var DataTableCell = function DataTableCell(_ref4) {
1930
1932
  max = column.max,
1931
1933
  _onChange = column.onChange,
1932
1934
  format = column.format,
1933
- options = column.options;
1935
+ options = column.options,
1936
+ action = column.action;
1934
1937
 
1935
1938
  if (id === "checked") {
1936
1939
  return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
@@ -2053,7 +2056,8 @@ var DataTableCell = function DataTableCell(_ref4) {
2053
2056
  id: id,
2054
2057
  value: cell,
2055
2058
  format: format,
2056
- options: options
2059
+ options: options,
2060
+ action: action
2057
2061
  });
2058
2062
 
2059
2063
  default:
@@ -2156,15 +2160,21 @@ var BooleanCellViewer = function BooleanCellViewer(_ref6) {
2156
2160
 
2157
2161
 
2158
2162
  var StringCellViewer = function StringCellViewer(_ref7) {
2159
- var value = _ref7.value,
2163
+ var id = _ref7.id,
2164
+ value = _ref7.value,
2160
2165
  format = _ref7.format,
2161
- options = _ref7.options;
2166
+ options = _ref7.options,
2167
+ action = _ref7.action;
2162
2168
 
2163
2169
  function buildOptions() {
2164
2170
  var opts = typeof options === 'function' ? options() : options;
2165
2171
  return opts;
2166
2172
  }
2167
2173
 
2174
+ function onClick() {
2175
+ if (action) action(id, value, format, options);
2176
+ }
2177
+
2168
2178
  var option = options ? buildOptions().find(function (o) {
2169
2179
  return o.value === value;
2170
2180
  }) : null;
@@ -2190,7 +2200,8 @@ var StringCellViewer = function StringCellViewer(_ref7) {
2190
2200
 
2191
2201
  case FORMATS$1.IMG:
2192
2202
  text = /*#__PURE__*/React__default["default"].createElement("img", {
2193
- src: text
2203
+ src: text,
2204
+ onClick: onClick
2194
2205
  });
2195
2206
  break;
2196
2207