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.
@@ -1711,7 +1711,9 @@ var DataTable = function DataTable(props) {
1711
1711
  outlined = props.outlined,
1712
1712
  _props$expanded = props.expanded,
1713
1713
  expanded = _props$expanded === void 0 ? false : _props$expanded,
1714
- className = props.className;
1714
+ className = props.className,
1715
+ _props$emptyMessage = props.emptyMessage,
1716
+ emptyMessage = _props$emptyMessage === void 0 ? "No Results Found" : _props$emptyMessage;
1715
1717
 
1716
1718
  var _useState = useState({}),
1717
1719
  sortDir = _useState[0],
@@ -1850,7 +1852,7 @@ var DataTable = function DataTable(props) {
1850
1852
  className: "empty-message"
1851
1853
  }, /*#__PURE__*/React.createElement(Icon, {
1852
1854
  icon: "search_off"
1853
- }), /*#__PURE__*/React.createElement(Text, null, "No Result Found")))))));
1855
+ }), /*#__PURE__*/React.createElement(Text, null, emptyMessage)))))));
1854
1856
  };
1855
1857
  /**
1856
1858
  * DataTable Row
@@ -1922,7 +1924,8 @@ var DataTableCell = function DataTableCell(_ref4) {
1922
1924
  max = column.max,
1923
1925
  _onChange = column.onChange,
1924
1926
  format = column.format,
1925
- options = column.options;
1927
+ options = column.options,
1928
+ action = column.action;
1926
1929
 
1927
1930
  if (id === "checked") {
1928
1931
  return /*#__PURE__*/React.createElement(CheckBox, {
@@ -2045,7 +2048,8 @@ var DataTableCell = function DataTableCell(_ref4) {
2045
2048
  id: id,
2046
2049
  value: cell,
2047
2050
  format: format,
2048
- options: options
2051
+ options: options,
2052
+ action: action
2049
2053
  });
2050
2054
 
2051
2055
  default:
@@ -2148,15 +2152,21 @@ var BooleanCellViewer = function BooleanCellViewer(_ref6) {
2148
2152
 
2149
2153
 
2150
2154
  var StringCellViewer = function StringCellViewer(_ref7) {
2151
- var value = _ref7.value,
2155
+ var id = _ref7.id,
2156
+ value = _ref7.value,
2152
2157
  format = _ref7.format,
2153
- options = _ref7.options;
2158
+ options = _ref7.options,
2159
+ action = _ref7.action;
2154
2160
 
2155
2161
  function buildOptions() {
2156
2162
  var opts = typeof options === 'function' ? options() : options;
2157
2163
  return opts;
2158
2164
  }
2159
2165
 
2166
+ function onClick() {
2167
+ if (action) action(id, value, format, options);
2168
+ }
2169
+
2160
2170
  var option = options ? buildOptions().find(function (o) {
2161
2171
  return o.value === value;
2162
2172
  }) : null;
@@ -2182,7 +2192,8 @@ var StringCellViewer = function StringCellViewer(_ref7) {
2182
2192
 
2183
2193
  case FORMATS$1.IMG:
2184
2194
  text = /*#__PURE__*/React.createElement("img", {
2185
- src: text
2195
+ src: text,
2196
+ onClick: onClick
2186
2197
  });
2187
2198
  break;
2188
2199