@unbxd-ui/unbxd-react-components 0.2.133 → 0.2.135
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.
|
@@ -56,7 +56,7 @@ var NotificationComponent = function NotificationComponent(props) {
|
|
|
56
56
|
className: "RCB-notif RCB-notif-".concat(appearance, " ").concat(className)
|
|
57
57
|
}, showClose ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
58
|
className: "notif-wrapper"
|
|
59
|
-
},
|
|
59
|
+
}, children, /*#__PURE__*/_react["default"].createElement("div", {
|
|
60
60
|
className: "".concat(appearance, "-cross-icon"),
|
|
61
61
|
onClick: function onClick() {
|
|
62
62
|
setHideMessage(true);
|
|
@@ -194,7 +194,8 @@ var BaseTable = function BaseTable(props, ref) {
|
|
|
194
194
|
onRefreshTableData = props.onRefreshTableData,
|
|
195
195
|
isTableRefreshing = props.isTableRefreshing,
|
|
196
196
|
refreshIconClass = props.refreshIconClass,
|
|
197
|
-
spinnerIconClass = props.spinnerIconClass
|
|
197
|
+
spinnerIconClass = props.spinnerIconClass,
|
|
198
|
+
onRefreshCB = props.onRefreshCB;
|
|
198
199
|
var _DEFAULT_CHECKBOX_CON = _objectSpread(_objectSpread({}, DEFAULT_CHECKBOX_CONFIG), checkboxConfig || {}),
|
|
199
200
|
showCheckbox = _DEFAULT_CHECKBOX_CON.enabled,
|
|
200
201
|
showInHeader = _DEFAULT_CHECKBOX_CON.showInHeader;
|
|
@@ -229,6 +230,7 @@ var BaseTable = function BaseTable(props, ref) {
|
|
|
229
230
|
return selected;
|
|
230
231
|
};
|
|
231
232
|
var refreshTableData = function refreshTableData() {
|
|
233
|
+
if (onRefreshCB) onRefreshCB();
|
|
232
234
|
onRefreshTableData();
|
|
233
235
|
};
|
|
234
236
|
var updateCheckboxValue = function updateCheckboxValue(newValue) {
|
|
@@ -11,7 +11,7 @@ var _DataLoader = _interopRequireDefault(require("../DataLoader"));
|
|
|
11
11
|
var _PaginationComponent = _interopRequireDefault(require("./PaginationComponent"));
|
|
12
12
|
var _utils = _interopRequireDefault(require("../../core/utils"));
|
|
13
13
|
var _dataLoader = _interopRequireDefault(require("../../core/dataLoader"));
|
|
14
|
-
var _excluded = ["className", "wrapperClassName", "records", "columnConfigs", "idAttribute", "searchBy", "getRequestKeys", "showPaginateBar", "paginationPosition", "paginationType", "paginationBar", "requestId", "pageNoKey", "perPageKey", "pageSizeList", "isExpandableTable", "ExpandedRowComponent", "responseFormatter", "noDataComponent", "omitProps", "getUrlParams", "getRequestParams", "checkboxConfig", "tbodyClassName", "refreshFeature", "refreshIconClass", "spinnerIconClass"];
|
|
14
|
+
var _excluded = ["className", "wrapperClassName", "records", "columnConfigs", "idAttribute", "searchBy", "getRequestKeys", "showPaginateBar", "paginationPosition", "paginationType", "paginationBar", "requestId", "pageNoKey", "perPageKey", "pageSizeList", "isExpandableTable", "ExpandedRowComponent", "responseFormatter", "noDataComponent", "omitProps", "getUrlParams", "getRequestParams", "checkboxConfig", "tbodyClassName", "refreshFeature", "refreshIconClass", "spinnerIconClass", "onRefreshCB"];
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -128,6 +128,7 @@ var Table = function Table(props, ref) {
|
|
|
128
128
|
refreshFeature = _props$refreshFeature === void 0 ? false : _props$refreshFeature,
|
|
129
129
|
refreshIconClass = props.refreshIconClass,
|
|
130
130
|
spinnerIconClass = props.spinnerIconClass,
|
|
131
|
+
onRefreshCB = props.onRefreshCB,
|
|
131
132
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
132
133
|
/* variables for server data */
|
|
133
134
|
var _useState = (0, _react.useState)([]),
|
|
@@ -263,6 +264,7 @@ var Table = function Table(props, ref) {
|
|
|
263
264
|
isTableRefreshing: isTableRefreshing,
|
|
264
265
|
refreshFeature: refreshFeature,
|
|
265
266
|
refreshIconClass: refreshIconClass,
|
|
267
|
+
onRefreshCB: onRefreshCB,
|
|
266
268
|
spinnerIconClass: spinnerIconClass,
|
|
267
269
|
onRefreshTableData: onRefreshTableData,
|
|
268
270
|
sortByConfig: sortByConfig,
|
|
@@ -323,7 +325,15 @@ Table.propTypes = _objectSpread(_objectSpread({}, _BaseTable["default"].propType
|
|
|
323
325
|
/** If paginationType is "SERVER", function that is expected to return the URL Params object */
|
|
324
326
|
getUrlParams: _propTypes["default"].func,
|
|
325
327
|
/** If paginationType is "SERVER", function that is expected to return the Request Params object */
|
|
326
|
-
getRequestParams: _propTypes["default"].func
|
|
328
|
+
getRequestParams: _propTypes["default"].func,
|
|
329
|
+
/** If refreshFeature is true will have refresh option on table */
|
|
330
|
+
refreshFeature: _propTypes["default"].bool,
|
|
331
|
+
/** refresh icon class */
|
|
332
|
+
refreshIconClass: _propTypes["default"].string,
|
|
333
|
+
/** spinnerIcon is used when we have refreshFeature equal to true */
|
|
334
|
+
spinnerIconClass: _propTypes["default"].string,
|
|
335
|
+
/** If on table refresh we want to handle something we can add it in call back */
|
|
336
|
+
onRefreshCB: _propTypes["default"].func
|
|
327
337
|
});
|
|
328
338
|
Table.defaultProps = _objectSpread(_objectSpread({}, _BaseTable["default"].defaultProps), {}, {
|
|
329
339
|
pageSizeList: [{
|