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.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('material-design-icons-iconfont/dist/material-design-icons.css'), require('react'), require('react-switch'), require('moment'), require('moment-range'), require('react-notifications/lib/notifications.css'), require('deep-equal'), require('resumablejs')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'material-design-icons-iconfont/dist/material-design-icons.css', 'react', 'react-switch', 'moment', 'moment-range', 'react-notifications/lib/notifications.css', 'deep-equal', 'resumablejs'], factory) :
4
- (global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.reactSwitch, global.moment, global.momentRange, null, global.deepEqual, global.resumablejs));
5
- })(this, (function (exports, materialDesignIcons_css, React, RSwitch, moment, momentRange, notifications_css, equal, ResumableJS) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('material-design-icons-iconfont/dist/material-design-icons.css'), require('react'), require('react-switch'), require('moment'), require('moment-range'), require('react-notifications-component'), require('react-notifications-component/dist/theme.css'), require('deep-equal'), require('resumablejs')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'material-design-icons-iconfont/dist/material-design-icons.css', 'react', 'react-switch', 'moment', 'moment-range', 'react-notifications-component', 'react-notifications-component/dist/theme.css', 'deep-equal', 'resumablejs'], factory) :
4
+ (global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.reactSwitch, global.moment, global.momentRange, global.reactNotificationsComponent, null, global.deepEqual, global.resumablejs));
5
+ })(this, (function (exports, materialDesignIcons_css, React, RSwitch, moment, momentRange, reactNotificationsComponent, theme_css, equal, ResumableJS) {
6
6
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
7
 
8
8
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
@@ -223,7 +223,8 @@
223
223
 
224
224
  var Text$1 = function Text(_ref) {
225
225
  var format = _ref.format,
226
- children = _ref.children;
226
+ children = _ref.children,
227
+ className = _ref.className;
227
228
  var site = React.useContext(SiteContext);
228
229
  var value = children;
229
230
 
@@ -244,7 +245,9 @@
244
245
  break;
245
246
  }
246
247
 
247
- return children ? /*#__PURE__*/React__default["default"].createElement("span", null, value) : '';
248
+ return children ? /*#__PURE__*/React__default["default"].createElement("span", {
249
+ className: className
250
+ }, value) : '';
248
251
  };
249
252
 
250
253
  /**
@@ -2800,7 +2803,24 @@
2800
2803
  confirm: function confirm(message) {
2801
2804
  return window.confirm(message);
2802
2805
  },
2803
- notify: function notify(_ref2) {//NotificationManager.info(body, title)
2806
+ notify: function notify(_ref2) {
2807
+ var title = _ref2.title,
2808
+ body = _ref2.body,
2809
+ _ref2$type = _ref2.type,
2810
+ type = _ref2$type === void 0 ? "success" : _ref2$type;
2811
+ reactNotificationsComponent.Store.addNotification({
2812
+ title: title,
2813
+ message: body,
2814
+ type: type,
2815
+ insert: "top",
2816
+ container: "top-right",
2817
+ animationIn: ["animate__animated", "animate__fadeIn"],
2818
+ animationOut: ["animate__animated", "animate__fadeOut"],
2819
+ dismiss: {
2820
+ duration: 3000,
2821
+ onScreen: true
2822
+ }
2823
+ });
2804
2824
  }
2805
2825
  };
2806
2826
  return /*#__PURE__*/React__default["default"].createElement(SiteContext.Provider, {
@@ -2841,7 +2861,7 @@
2841
2861
  };
2842
2862
 
2843
2863
  var SiteNotifications = function SiteNotifications() {
2844
- return /*#__PURE__*/React__default["default"].createElement("div", null);
2864
+ return /*#__PURE__*/React__default["default"].createElement(reactNotificationsComponent.ReactNotifications, null);
2845
2865
  };
2846
2866
  /**
2847
2867
  * Site Header