@unbxd-ui/unbxd-react-components 0.2.131 → 0.2.133

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.
@@ -26,7 +26,9 @@ var NotificationComponent = function NotificationComponent(props) {
26
26
  messageId = props.messageId,
27
27
  fadeOut = props.fadeOut,
28
28
  fadeOutTime = props.fadeOutTime,
29
- className = props.className;
29
+ className = props.className,
30
+ _props$showClose = props.showClose,
31
+ showClose = _props$showClose === void 0 ? false : _props$showClose;
30
32
  var fadeOutMessage = typeof fadeOut !== "undefined" ? fadeOut : appearance === "success";
31
33
  var timerID;
32
34
  var clearMessage = function clearMessage() {
@@ -52,7 +54,14 @@ var NotificationComponent = function NotificationComponent(props) {
52
54
  } else {
53
55
  return /*#__PURE__*/_react["default"].createElement("div", {
54
56
  className: "RCB-notif RCB-notif-".concat(appearance, " ").concat(className)
55
- }, children);
57
+ }, showClose ? /*#__PURE__*/_react["default"].createElement("div", {
58
+ className: "notif-wrapper"
59
+ }, /*#__PURE__*/_react["default"].createElement("div", null, children), /*#__PURE__*/_react["default"].createElement("div", {
60
+ className: "".concat(appearance, "-cross-icon"),
61
+ onClick: function onClick() {
62
+ setHideMessage(true);
63
+ }
64
+ })) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children));
56
65
  }
57
66
  };
58
67
  NotificationComponent.propTypes = {
@@ -65,7 +74,9 @@ NotificationComponent.propTypes = {
65
74
  /* Should the message fadeout after (fadeOutTime)ms or not. Default true for success messages only. */
66
75
  fadeOut: _propTypes["default"].bool,
67
76
  /* fadeout timer, in milliseconds */
68
- fadeOutTime: _propTypes["default"].number
77
+ fadeOutTime: _propTypes["default"].number,
78
+ /* showClose to hide notification */
79
+ showClose: _propTypes["default"].bool
69
80
  };
70
81
  NotificationComponent.defaultProps = {
71
82
  className: "",
@@ -1 +1 @@
1
- .RCB-notif{padding:10px;border-radius:3px}.RCB-notif-success{color:#129274;border:solid 1px #2cb191;background-color:#edfffb}.RCB-notif-error{color:#d25b5b;border:solid 1px #e75178;background-color:#fff3f6}.RCB-notif-warning{color:#445870;border:solid 1px #efbf6a;background-color:#fffaf2}.RCB-notif-info{color:#509DB9;border:solid 1px #45b5c1;background-color:#f4fcff}
1
+ .RCB-notif{padding:10px;border-radius:3px}.RCB-notif-success{color:#6DB886;border:solid 1px #6DB886;background-color:#DEF9E7}.RCB-notif-error{color:#CA4646;border:solid 1px #CA4646;background-color:#FFE4E4}.RCB-notif-warning{color:#D5A555;border:solid 1px #D5A555;background-color:#FFF8EC}.RCB-notif-info{color:#3E71F2;border:solid 1px #3E71F2;background-color:#E7EDFF}.notif-wrapper{flex:1;display:flex;align-items:center;justify-content:space-between}
@@ -152,7 +152,7 @@ var DataLoader = /*#__PURE__*/function () {
152
152
  var requestUrl = typeof url === "function" ? url(urlParams) : url;
153
153
  var reqMethod = method.toLowerCase();
154
154
  var requestMetadata = {
155
- method: reqMethod === "form_post" || reqMethod === "upload" ? "post" : method,
155
+ method: reqMethod === "form_post" || reqMethod === "upload" ? "post" : reqMethod === "upload_put" ? "put" : method,
156
156
  headers: _objectSpread(_objectSpread({}, this._commonHeaders), headers),
157
157
  signal: this.abortController[requestId] ? this.abortController[requestId].signal : null
158
158
  };
@@ -167,7 +167,7 @@ var DataLoader = /*#__PURE__*/function () {
167
167
  requestUrl = "".concat(requestUrl, "?").concat(_utils["default"].getQueryParams(finalRequestParams));
168
168
  } else if (["post", "delete", "put", "patch"].indexOf(reqMethod) > -1) {
169
169
  requestMetadata.body = JSON.stringify(finalRequestParams);
170
- } else if (reqMethod === "form_post" || reqMethod === "upload") {
170
+ } else if (reqMethod === "form_post" || reqMethod === "upload" || reqMethod === "upload_put") {
171
171
  var formData = new FormData();
172
172
  for (var key in finalRequestParams) {
173
173
  formData.append(key, finalRequestParams[key]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbxd-ui/unbxd-react-components",
3
- "version": "0.2.131",
3
+ "version": "0.2.133",
4
4
  "description": "React components library",
5
5
  "keywords": [
6
6
  "react components",