@fonixtree/magic-design 1.0.7 → 1.0.8

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.
@@ -228,8 +228,8 @@ function (_super) {
228
228
  this.setState({
229
229
  intelligentType: type,
230
230
  intelligentValue: []
231
- });
232
- this.getTypeData(type);
231
+ }); // this.getTypeData(type);
232
+
233
233
  this.props.onChange({
234
234
  intelligentType: type,
235
235
  intelligentValue: []
@@ -11,6 +11,8 @@ var _antd = require("antd");
11
11
 
12
12
  require("./index.less");
13
13
 
14
+ var _lodash = require("lodash");
15
+
14
16
  var _locale = require("../../../locale");
15
17
 
16
18
  var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/common/config-panels/SpacingConfig"));
@@ -104,11 +106,11 @@ function (_super) {
104
106
 
105
107
  _this.updateAttr(data, 'hover', {
106
108
  open: true,
107
- buttonBorder: data.buttonBorder,
108
- buttonIcon: data.buttonIcon,
109
- buttonText: data.buttonText,
109
+ buttonBorder: (0, _lodash.cloneDeep)(data.buttonBorder),
110
+ buttonIcon: (0, _lodash.cloneDeep)(data.buttonIcon),
111
+ buttonText: (0, _lodash.cloneDeep)(data.buttonText),
110
112
  content: {
111
- backgroundColor: data.content.backgroundColor
113
+ backgroundColor: (0, _lodash.cloneDeep)(data.content.backgroundColor)
112
114
  }
113
115
  }); // console.log('--ffd, button hover first click', data);
114
116
 
@@ -228,16 +230,16 @@ function (_super) {
228
230
  })));
229
231
  };
230
232
 
231
- var ButtonBorderSetting = function ButtonBorderSetting(data) {
233
+ var ButtonBorderSetting = function ButtonBorderSetting(_data) {
232
234
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
233
235
  split: true,
234
236
  title: (0, _locale.i18n)('BORDER_COLOR')
235
237
  }, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
236
238
  colorType: "rgba",
237
239
  onChange: function onChange(value) {
238
- _this.updateAttr(data, 'borderColor', value);
240
+ _this.updateAttr(_data, 'borderColor', value);
239
241
  },
240
- value: data.borderColor
242
+ value: _data.borderColor
241
243
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
242
244
  title: (0, _locale.i18n)('BORDER_RADIUS')
243
245
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
@@ -245,15 +247,15 @@ function (_super) {
245
247
  onChange: function onChange(_a) {
246
248
  var count = _a.count;
247
249
 
248
- _this.updateAttr(data, 'borderRadius', count);
250
+ _this.updateAttr(_data, 'borderRadius', count);
249
251
  },
250
252
  value: {
251
- count: data.borderRadius
253
+ count: _data.borderRadius
252
254
  }
253
255
  })));
254
256
  };
255
257
 
256
- var ButtonIconSetting = function ButtonIconSetting(data) {
258
+ var ButtonIconSetting = function ButtonIconSetting(_data) {
257
259
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
258
260
  title: (0, _locale.i18n)('ICON')
259
261
  }, /*#__PURE__*/_react["default"].createElement(_common.IconPicker, {
@@ -262,18 +264,18 @@ function (_super) {
262
264
  },
263
265
  onClick: function onClick() {
264
266
  _this.setState({
265
- isHover: data == _this.props.data.hover.buttonIcon
267
+ isHover: _data == _this.props._data.hover.buttonIcon
266
268
  });
267
269
  },
268
- value: data.iconUrl
269
- })), data.iconUrl && /*#__PURE__*/_react["default"].createElement(_common.Field, {
270
+ value: _data.iconUrl
271
+ })), _data.iconUrl && /*#__PURE__*/_react["default"].createElement(_common.Field, {
270
272
  title: (0, _locale.i18n)('ICON_PLACEMENT')
271
273
  }, /*#__PURE__*/_react["default"].createElement(_common.ButtonIconLayout, {
272
- icon: data.iconUrl,
274
+ icon: _data.iconUrl,
273
275
  onChange: function onChange(value) {
274
- return _this.updateAttr(data, 'layout', value);
276
+ return _this.updateAttr(_data, 'layout', value);
275
277
  },
276
- value: data.layout
278
+ value: _data.layout
277
279
  })));
278
280
  };
279
281
 
@@ -228,8 +228,8 @@ function (_super) {
228
228
  this.setState({
229
229
  intelligentType: type,
230
230
  intelligentValue: []
231
- });
232
- this.getTypeData(type);
231
+ }); // this.getTypeData(type);
232
+
233
233
  this.props.onChange({
234
234
  intelligentType: type,
235
235
  intelligentValue: []
@@ -11,6 +11,8 @@ var _antd = require("antd");
11
11
 
12
12
  require("./index.less");
13
13
 
14
+ var _lodash = require("lodash");
15
+
14
16
  var _locale = require("../../../locale");
15
17
 
16
18
  var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/common/config-panels/SpacingConfig"));
@@ -104,11 +106,11 @@ function (_super) {
104
106
 
105
107
  _this.updateAttr(data, 'hover', {
106
108
  open: true,
107
- buttonBorder: data.buttonBorder,
108
- buttonIcon: data.buttonIcon,
109
- buttonText: data.buttonText,
109
+ buttonBorder: (0, _lodash.cloneDeep)(data.buttonBorder),
110
+ buttonIcon: (0, _lodash.cloneDeep)(data.buttonIcon),
111
+ buttonText: (0, _lodash.cloneDeep)(data.buttonText),
110
112
  content: {
111
- backgroundColor: data.content.backgroundColor
113
+ backgroundColor: (0, _lodash.cloneDeep)(data.content.backgroundColor)
112
114
  }
113
115
  }); // console.log('--ffd, button hover first click', data);
114
116
 
@@ -228,16 +230,16 @@ function (_super) {
228
230
  })));
229
231
  };
230
232
 
231
- var ButtonBorderSetting = function ButtonBorderSetting(data) {
233
+ var ButtonBorderSetting = function ButtonBorderSetting(_data) {
232
234
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
233
235
  split: true,
234
236
  title: (0, _locale.i18n)('BORDER_COLOR')
235
237
  }, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
236
238
  colorType: "rgba",
237
239
  onChange: function onChange(value) {
238
- _this.updateAttr(data, 'borderColor', value);
240
+ _this.updateAttr(_data, 'borderColor', value);
239
241
  },
240
- value: data.borderColor
242
+ value: _data.borderColor
241
243
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
242
244
  title: (0, _locale.i18n)('BORDER_RADIUS')
243
245
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
@@ -245,15 +247,15 @@ function (_super) {
245
247
  onChange: function onChange(_a) {
246
248
  var count = _a.count;
247
249
 
248
- _this.updateAttr(data, 'borderRadius', count);
250
+ _this.updateAttr(_data, 'borderRadius', count);
249
251
  },
250
252
  value: {
251
- count: data.borderRadius
253
+ count: _data.borderRadius
252
254
  }
253
255
  })));
254
256
  };
255
257
 
256
- var ButtonIconSetting = function ButtonIconSetting(data) {
258
+ var ButtonIconSetting = function ButtonIconSetting(_data) {
257
259
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
258
260
  title: (0, _locale.i18n)('ICON')
259
261
  }, /*#__PURE__*/_react["default"].createElement(_common.IconPicker, {
@@ -262,18 +264,18 @@ function (_super) {
262
264
  },
263
265
  onClick: function onClick() {
264
266
  _this.setState({
265
- isHover: data == _this.props.data.hover.buttonIcon
267
+ isHover: _data == _this.props._data.hover.buttonIcon
266
268
  });
267
269
  },
268
- value: data.iconUrl
269
- })), data.iconUrl && /*#__PURE__*/_react["default"].createElement(_common.Field, {
270
+ value: _data.iconUrl
271
+ })), _data.iconUrl && /*#__PURE__*/_react["default"].createElement(_common.Field, {
270
272
  title: (0, _locale.i18n)('ICON_PLACEMENT')
271
273
  }, /*#__PURE__*/_react["default"].createElement(_common.ButtonIconLayout, {
272
- icon: data.iconUrl,
274
+ icon: _data.iconUrl,
273
275
  onChange: function onChange(value) {
274
- return _this.updateAttr(data, 'layout', value);
276
+ return _this.updateAttr(_data, 'layout', value);
275
277
  },
276
- value: data.layout
278
+ value: _data.layout
277
279
  })));
278
280
  };
279
281
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",