ywana-core8 0.0.271 → 0.0.272

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
@@ -3,7 +3,8 @@ var React = require('react');
3
3
  var RSwitch = require('react-switch');
4
4
  var moment = require('moment');
5
5
  var momentRange = require('moment-range');
6
- require('react-notifications/lib/notifications.css');
6
+ var reactNotificationsComponent = require('react-notifications-component');
7
+ require('react-notifications-component/dist/theme.css');
7
8
  var equal = require('deep-equal');
8
9
  var ResumableJS = require('resumablejs');
9
10
 
@@ -227,7 +228,8 @@ var TEXTFORMATS = {
227
228
 
228
229
  var Text$1 = function Text(_ref) {
229
230
  var format = _ref.format,
230
- children = _ref.children;
231
+ children = _ref.children,
232
+ className = _ref.className;
231
233
  var site = React.useContext(SiteContext);
232
234
  var value = children;
233
235
 
@@ -248,7 +250,9 @@ var Text$1 = function Text(_ref) {
248
250
  break;
249
251
  }
250
252
 
251
- return children ? /*#__PURE__*/React__default["default"].createElement("span", null, value) : '';
253
+ return children ? /*#__PURE__*/React__default["default"].createElement("span", {
254
+ className: className
255
+ }, value) : '';
252
256
  };
253
257
 
254
258
  /**
@@ -2804,7 +2808,24 @@ var SiteProvider = function SiteProvider(_ref) {
2804
2808
  confirm: function confirm(message) {
2805
2809
  return window.confirm(message);
2806
2810
  },
2807
- notify: function notify(_ref2) {//NotificationManager.info(body, title)
2811
+ notify: function notify(_ref2) {
2812
+ var title = _ref2.title,
2813
+ body = _ref2.body,
2814
+ _ref2$type = _ref2.type,
2815
+ type = _ref2$type === void 0 ? "success" : _ref2$type;
2816
+ reactNotificationsComponent.Store.addNotification({
2817
+ title: title,
2818
+ message: body,
2819
+ type: type,
2820
+ insert: "top",
2821
+ container: "top-right",
2822
+ animationIn: ["animate__animated", "animate__fadeIn"],
2823
+ animationOut: ["animate__animated", "animate__fadeOut"],
2824
+ dismiss: {
2825
+ duration: 3000,
2826
+ onScreen: true
2827
+ }
2828
+ });
2808
2829
  }
2809
2830
  };
2810
2831
  return /*#__PURE__*/React__default["default"].createElement(SiteContext.Provider, {
@@ -2845,7 +2866,7 @@ var Site = function Site(_ref3) {
2845
2866
  };
2846
2867
 
2847
2868
  var SiteNotifications = function SiteNotifications() {
2848
- return /*#__PURE__*/React__default["default"].createElement("div", null);
2869
+ return /*#__PURE__*/React__default["default"].createElement(reactNotificationsComponent.ReactNotifications, null);
2849
2870
  };
2850
2871
  /**
2851
2872
  * Site Header