@fonixtree/magic-design 0.0.56 → 0.0.58

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.
Files changed (135) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +7 -7
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +7 -7
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  8. package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  9. package/es/common/GroupList/index.js +2 -3
  10. package/es/common/LinkModal/index.less +1 -1
  11. package/es/composite-comp/bol/components/Button/defaultJSON.js +38 -68
  12. package/es/composite-comp/bol/components/Button/index.js +7 -9
  13. package/es/composite-comp/bol/components/Button/index.less +1 -0
  14. package/es/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
  15. package/es/composite-comp/bol/components/Carousel/pc/index.js +2 -2
  16. package/es/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
  17. package/es/composite-comp/bol/components/Tag/index.js +7 -9
  18. package/es/composite-comp/bol/components/Tag/index.less +1 -0
  19. package/es/composite-comp/bol/components/Text/defaultJSON.js +1 -1
  20. package/es/composite-comp/bol/components/Text/index.js +3 -3
  21. package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  22. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
  23. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  24. package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  25. package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
  26. package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
  27. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
  28. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
  29. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  30. package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
  31. package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
  32. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  33. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  34. package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  35. package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  36. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
  37. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
  38. package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
  39. package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  40. package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
  41. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +452 -0
  42. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +95 -0
  43. package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
  44. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +117 -0
  45. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
  46. package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  47. package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
  48. package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  49. package/es/constants/component-types.js +13 -3
  50. package/es/constants/index.js +20 -2
  51. package/es/constants/layout.js +10 -2
  52. package/es/core/Designer/ConfigPanel/index.js +48 -22
  53. package/es/core/Designer/History/index.js +36 -28
  54. package/es/core/Designer/index.js +17 -8
  55. package/es/decorator/compositeDecorator.js +1 -0
  56. package/es/decorator/index.js +8 -0
  57. package/es/decorator/updateConfigDecorator.js +76 -0
  58. package/es/locale/en/en.json +8 -1
  59. package/es/locale/es/es.json +8 -1
  60. package/es/locale/id/id.json +8 -1
  61. package/es/meta-comp/components/Button/index.js +7 -7
  62. package/es/meta-comp/components/Image/index.js +1 -1
  63. package/es/meta-comp/components/Text/index.js +18 -7
  64. package/es/meta-comp/config-panels/BaseConfig.js +8 -10
  65. package/es/meta-comp/config-panels/TextConfig/index.js +10 -3
  66. package/es/mobx/Store.js +1 -9
  67. package/es/utils/coreUtil.js +6 -1
  68. package/lib/assets/fonts/magic-box-iconfont.css +7 -7
  69. package/lib/assets/fonts/magic-box-iconfont.css.bak +7 -7
  70. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  71. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  72. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  73. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  74. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  75. package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  76. package/lib/common/GroupList/index.js +2 -3
  77. package/lib/common/LinkModal/index.less +1 -1
  78. package/lib/composite-comp/bol/components/Button/defaultJSON.js +38 -68
  79. package/lib/composite-comp/bol/components/Button/index.js +7 -9
  80. package/lib/composite-comp/bol/components/Button/index.less +1 -0
  81. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
  82. package/lib/composite-comp/bol/components/Carousel/pc/index.js +2 -2
  83. package/lib/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
  84. package/lib/composite-comp/bol/components/Tag/index.js +7 -9
  85. package/lib/composite-comp/bol/components/Tag/index.less +1 -0
  86. package/lib/composite-comp/bol/components/Text/defaultJSON.js +1 -1
  87. package/lib/composite-comp/bol/components/Text/index.js +3 -3
  88. package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  89. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
  90. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  91. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  92. package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
  93. package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
  94. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
  95. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
  96. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  97. package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
  98. package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
  99. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  100. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  101. package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  102. package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  103. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
  104. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
  105. package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
  106. package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  107. package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
  108. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +452 -0
  109. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +95 -0
  110. package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
  111. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +117 -0
  112. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
  113. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  114. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
  115. package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  116. package/lib/constants/component-types.js +13 -3
  117. package/lib/constants/index.js +20 -2
  118. package/lib/constants/layout.js +10 -2
  119. package/lib/core/Designer/ConfigPanel/index.js +48 -22
  120. package/lib/core/Designer/History/index.js +36 -28
  121. package/lib/core/Designer/index.js +17 -8
  122. package/lib/decorator/compositeDecorator.js +1 -0
  123. package/lib/decorator/index.js +8 -0
  124. package/lib/decorator/updateConfigDecorator.js +76 -0
  125. package/lib/locale/en/en.json +8 -1
  126. package/lib/locale/es/es.json +8 -1
  127. package/lib/locale/id/id.json +8 -1
  128. package/lib/meta-comp/components/Button/index.js +7 -7
  129. package/lib/meta-comp/components/Image/index.js +1 -1
  130. package/lib/meta-comp/components/Text/index.js +18 -7
  131. package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
  132. package/lib/meta-comp/config-panels/TextConfig/index.js +10 -3
  133. package/lib/mobx/Store.js +1 -9
  134. package/lib/utils/coreUtil.js +6 -1
  135. package/package.json +1 -1
@@ -48,14 +48,6 @@ function (_super) {
48
48
 
49
49
  function BaseConfig() {
50
50
  var _this = _super !== null && _super.apply(this, arguments) || this;
51
- /**
52
- *重新渲染展示区域
53
- */
54
-
55
-
56
- _this.reRenderViewArea = function () {
57
- (0, _coreUtil.renderPreview)();
58
- };
59
51
  /**
60
52
  * 重新渲染一级配置面板
61
53
  */
@@ -67,10 +59,16 @@ function (_super) {
67
59
  */
68
60
 
69
61
 
70
- _this.selfRender = function () {
62
+ _this.selfRender = function (data) {
63
+ var changeHistory = true;
64
+
65
+ if (data && data.type === 'text-render') {
66
+ changeHistory = false;
67
+ }
68
+
71
69
  _this.setState({});
72
70
 
73
- _this.reRenderViewArea();
71
+ (0, _coreUtil.renderPreview)(changeHistory);
74
72
  };
75
73
 
76
74
  return _this;
@@ -15,6 +15,8 @@ require("./index.less");
15
15
 
16
16
  var _locale = require("../../../locale");
17
17
 
18
+ var _constants = require("../../../constants");
19
+
18
20
  var _common = require("../../../common");
19
21
 
20
22
  var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/common/config-panels/SpacingConfig"));
@@ -273,17 +275,22 @@ function (_super) {
273
275
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
274
276
  title: (0, _locale.i18n)('CONTENT_WIDTH')
275
277
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
276
- maxVal: 1760,
278
+ maxVal: _constants.deviceTypeWidthMap[window.magicDesign.device],
277
279
  minVal: 0,
278
280
  onChange: function onChange(_a) {
279
281
  var count = _a.count;
280
- textData.width = count;
282
+
283
+ if (window.magicDesign.device == 'pc') {
284
+ textData.pcWidth = count;
285
+ } else {
286
+ textData.width = count;
287
+ }
281
288
 
282
289
  _this.selfRender();
283
290
  },
284
291
  unit: "px",
285
292
  value: {
286
- count: textData.width
293
+ count: window.magicDesign.device == 'pc' ? textData.pcWidth : textData.width
287
294
  }
288
295
  })))
289
296
  }, {
package/lib/mobx/Store.js CHANGED
@@ -34,6 +34,7 @@ function () {
34
34
  this.CarouselStore = {}; // 轮播组件暂存数据
35
35
 
36
36
  (0, _mobx.makeObservable)(this, {
37
+ MPageData: _mobx.observable,
37
38
  locale: _mobx.observable,
38
39
  hoveredMeta: _mobx.observable,
39
40
  clickedMeta: _mobx.observable,
@@ -87,15 +88,6 @@ function () {
87
88
  return componentFloor.id;
88
89
  };
89
90
 
90
- Store.prototype.getFloorInfo = function () {
91
- var _this = this;
92
-
93
- var componentFloor = this.MPageData.find(function (floor) {
94
- return floor.id === _this.clickedFloor;
95
- });
96
- return componentFloor;
97
- };
98
-
99
91
  return Store;
100
92
  }();
101
93
 
@@ -53,10 +53,15 @@ var setMagicDesign = function setMagicDesign(magicDesignObj) {
53
53
 
54
54
  exports.setMagicDesign = setMagicDesign;
55
55
 
56
- var renderPreview = function renderPreview() {
56
+ var renderPreview = function renderPreview(changeHistory) {
57
+ if (changeHistory === void 0) {
58
+ changeHistory = true;
59
+ }
60
+
57
61
  var evt = new Event('render-view', {
58
62
  bubbles: false
59
63
  });
64
+ evt.changeHistory = changeHistory;
60
65
  window.document.dispatchEvent(evt);
61
66
  };
62
67
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.56",
4
+ "version": "0.0.58",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",