ywana-core8 0.0.180 → 0.0.184

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('react-notifications'), 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', 'react-notifications', 'react-notifications/lib/notifications.css', 'deep-equal', 'resumablejs'], factory) :
4
- (global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.reactSwitch, global.reactNotifications, null, global.deepEqual, global.resumablejs));
5
- })(this, (function (exports, materialDesignIcons_css, React, RSwitch, reactNotifications, 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('@reactpreview/config'), require('react-switch'), require('react-notifications'), 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', '@reactpreview/config', 'react-switch', 'react-notifications', 'react-notifications/lib/notifications.css', 'deep-equal', 'resumablejs'], factory) :
4
+ (global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.config, global.reactSwitch, global.reactNotifications, null, global.deepEqual, global.resumablejs));
5
+ })(this, (function (exports, materialDesignIcons_css, React, config, RSwitch, reactNotifications, notifications_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);
@@ -200,6 +200,22 @@
200
200
  action: click
201
201
  }) : null, /*#__PURE__*/React__default["default"].createElement("span", null, label));
202
202
  };
203
+ config.preview(Button$1, {
204
+ example1: {
205
+ label: "OK",
206
+ raised: true,
207
+ action: function action() {
208
+ return alert('click');
209
+ }
210
+ },
211
+ example2: {
212
+ label: "CANCEL",
213
+ outlined: true,
214
+ action: function action() {
215
+ return alert('click');
216
+ }
217
+ }
218
+ });
203
219
 
204
220
  /**
205
221
  * Site Context
@@ -2285,7 +2301,8 @@
2285
2301
  var FORMATS = {
2286
2302
  NONE: '',
2287
2303
  DATE: 'date',
2288
- EMAIL: 'email'
2304
+ EMAIL: 'email',
2305
+ HTML: 'HTML'
2289
2306
  };
2290
2307
  /**
2291
2308
  * CHECK
@@ -2970,7 +2987,8 @@
2970
2987
  _field$editable = field.editable,
2971
2988
  editable = _field$editable === void 0 ? true : _field$editable,
2972
2989
  _field$predictive = field.predictive,
2973
- predictive = _field$predictive === void 0 ? false : _field$predictive;
2990
+ predictive = _field$predictive === void 0 ? false : _field$predictive,
2991
+ Editor = field.Editor;
2974
2992
 
2975
2993
  function change(id, value) {
2976
2994
  if (onChange) onChange(id, value);
@@ -2983,7 +3001,9 @@
2983
3001
 
2984
3002
  return /*#__PURE__*/React__default["default"].createElement("div", {
2985
3003
  className: "field-editor string-editor"
2986
- }, format === FORMATS.DATE ? /*#__PURE__*/React__default["default"].createElement(TextField, {
3004
+ }, format === FORMATS.HTML ? /*#__PURE__*/React__default["default"].createElement(Editor, {
3005
+ value: value
3006
+ }) : null, format === FORMATS.DATE ? /*#__PURE__*/React__default["default"].createElement(TextField, {
2987
3007
  outlined: outlined,
2988
3008
  id: id,
2989
3009
  type: "date",
@@ -3028,7 +3048,7 @@
3028
3048
  if (onChange) onChange(id, value);
3029
3049
  }
3030
3050
 
3031
- var val = value || field["default"];
3051
+ var val = value || value === "" ? value : field["default"];
3032
3052
  var min = field.min;
3033
3053
  var max = field.max;
3034
3054
  var disabled = !editable;