@fonixtree/magic-design 0.0.56 → 0.0.60

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 (176) hide show
  1. package/README.md +320 -0
  2. package/es/assets/fonts/magic-box-iconfont.css +24 -12
  3. package/es/assets/fonts/magic-box-iconfont.css.bak +24 -12
  4. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  6. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  8. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  9. package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  10. package/es/common/Button/index.js +2 -1
  11. package/es/common/Button/index.less +5 -0
  12. package/es/common/GroupList/index.js +2 -3
  13. package/es/common/LinkModal/index.less +1 -1
  14. package/es/composite-comp/bol/components/Banner/defaultJSON.js +2 -2
  15. package/es/composite-comp/bol/components/Button/defaultJSON.js +38 -68
  16. package/es/composite-comp/bol/components/Button/index.js +7 -9
  17. package/es/composite-comp/bol/components/Button/index.less +1 -0
  18. package/es/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
  19. package/es/composite-comp/bol/components/Carousel/pc/index.js +2 -2
  20. package/es/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
  21. package/es/composite-comp/bol/components/Tag/index.js +7 -9
  22. package/es/composite-comp/bol/components/Tag/index.less +1 -0
  23. package/es/composite-comp/bol/components/Text/defaultJSON.js +1 -1
  24. package/es/composite-comp/bol/components/Text/index.js +3 -3
  25. package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  26. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
  27. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  28. package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  29. package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
  30. package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
  31. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
  32. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
  33. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  34. package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
  35. package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
  36. package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
  37. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  38. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  39. package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  40. package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  41. package/es/composite-comp/common/components/ProductItem/index.less +3 -3
  42. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
  43. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
  44. package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +135 -0
  45. package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  46. package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
  47. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +484 -0
  48. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +98 -0
  49. package/es/composite-comp/dito/components/Recommend/mobile/index.less +1 -1
  50. package/es/composite-comp/dito/components/Recommend/pc/index.less +1 -1
  51. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -2
  52. package/es/composite-comp/dito/components/SearchBar/index.js +5 -1
  53. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +23 -24
  54. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +13 -3
  55. package/es/composite-comp/dito/components/SearchBar/pc/index.js +151 -0
  56. package/es/composite-comp/dito/components/SearchBar/pc/index.less +57 -0
  57. package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
  58. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +130 -0
  59. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
  60. package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  61. package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
  62. package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  63. package/es/constants/component-types.js +13 -3
  64. package/es/constants/index.js +20 -2
  65. package/es/constants/layout.js +10 -2
  66. package/es/core/Designer/CompListPanel/index.js +8 -33
  67. package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
  68. package/es/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
  69. package/es/core/Designer/ConfigPanel/index.js +70 -23
  70. package/es/core/Designer/ConfigPanel/index.less +4 -0
  71. package/es/core/Designer/History/index.js +34 -28
  72. package/es/core/Designer/PageCompList/index.js +9 -1
  73. package/es/core/Designer/ViewArea/index.js +20 -6
  74. package/es/core/Designer/index.js +36 -31
  75. package/es/core/Renderer/index.js +17 -2
  76. package/es/decorator/index.js +8 -0
  77. package/es/decorator/updateConfigDecorator.js +76 -0
  78. package/es/locale/en/en.json +10 -1
  79. package/es/locale/es/es.json +10 -1
  80. package/es/locale/id/id.json +10 -1
  81. package/es/meta-comp/components/Button/index.js +8 -8
  82. package/es/meta-comp/components/Button/index.less +5 -0
  83. package/es/meta-comp/components/Image/index.js +1 -1
  84. package/es/meta-comp/components/Text/index.js +18 -7
  85. package/es/meta-comp/config-panels/BaseConfig.js +8 -10
  86. package/es/meta-comp/config-panels/TextConfig/index.js +10 -3
  87. package/es/mobx/Store.js +5 -9
  88. package/es/utils/coreUtil.js +14 -2
  89. package/lib/assets/fonts/magic-box-iconfont.css +24 -12
  90. package/lib/assets/fonts/magic-box-iconfont.css.bak +24 -12
  91. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  92. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  93. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  94. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  95. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  96. package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  97. package/lib/common/Button/index.js +2 -1
  98. package/lib/common/Button/index.less +5 -0
  99. package/lib/common/GroupList/index.js +2 -3
  100. package/lib/common/LinkModal/index.less +1 -1
  101. package/lib/composite-comp/bol/components/Banner/defaultJSON.js +2 -2
  102. package/lib/composite-comp/bol/components/Button/defaultJSON.js +38 -68
  103. package/lib/composite-comp/bol/components/Button/index.js +7 -9
  104. package/lib/composite-comp/bol/components/Button/index.less +1 -0
  105. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
  106. package/lib/composite-comp/bol/components/Carousel/pc/index.js +2 -2
  107. package/lib/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
  108. package/lib/composite-comp/bol/components/Tag/index.js +7 -9
  109. package/lib/composite-comp/bol/components/Tag/index.less +1 -0
  110. package/lib/composite-comp/bol/components/Text/defaultJSON.js +1 -1
  111. package/lib/composite-comp/bol/components/Text/index.js +3 -3
  112. package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  113. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
  114. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  115. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  116. package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
  117. package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
  118. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
  119. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
  120. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  121. package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
  122. package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
  123. package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
  124. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  125. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  126. package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  127. package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  128. package/lib/composite-comp/common/components/ProductItem/index.less +3 -3
  129. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
  130. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
  131. package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +135 -0
  132. package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  133. package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
  134. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +484 -0
  135. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +98 -0
  136. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +1 -1
  137. package/lib/composite-comp/dito/components/Recommend/pc/index.less +1 -1
  138. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -2
  139. package/lib/composite-comp/dito/components/SearchBar/index.js +5 -1
  140. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +23 -24
  141. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +13 -3
  142. package/lib/composite-comp/dito/components/SearchBar/pc/index.js +151 -0
  143. package/lib/composite-comp/dito/components/SearchBar/pc/index.less +57 -0
  144. package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
  145. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +130 -0
  146. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
  147. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  148. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
  149. package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  150. package/lib/constants/component-types.js +13 -3
  151. package/lib/constants/index.js +20 -2
  152. package/lib/constants/layout.js +10 -2
  153. package/lib/core/Designer/CompListPanel/index.js +8 -33
  154. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
  155. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
  156. package/lib/core/Designer/ConfigPanel/index.js +70 -23
  157. package/lib/core/Designer/ConfigPanel/index.less +4 -0
  158. package/lib/core/Designer/History/index.js +34 -28
  159. package/lib/core/Designer/PageCompList/index.js +9 -1
  160. package/lib/core/Designer/ViewArea/index.js +20 -6
  161. package/lib/core/Designer/index.js +36 -31
  162. package/lib/core/Renderer/index.js +17 -2
  163. package/lib/decorator/index.js +8 -0
  164. package/lib/decorator/updateConfigDecorator.js +76 -0
  165. package/lib/locale/en/en.json +10 -1
  166. package/lib/locale/es/es.json +10 -1
  167. package/lib/locale/id/id.json +10 -1
  168. package/lib/meta-comp/components/Button/index.js +8 -8
  169. package/lib/meta-comp/components/Button/index.less +5 -0
  170. package/lib/meta-comp/components/Image/index.js +1 -1
  171. package/lib/meta-comp/components/Text/index.js +18 -7
  172. package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
  173. package/lib/meta-comp/config-panels/TextConfig/index.js +10 -3
  174. package/lib/mobx/Store.js +5 -9
  175. package/lib/utils/coreUtil.js +14 -2
  176. package/package.json +86 -1
@@ -163,7 +163,7 @@ function (_super) {
163
163
  autoplaySpeed: data.setting.autoplay.interval * 1000,
164
164
  speed: 500,
165
165
  slidesToShow: colNum,
166
- slidesToScroll: colNum,
166
+ slidesToScroll: 1,
167
167
  beforeChange: function beforeChange(oldIndex, newIndex) {
168
168
  _this.setState({
169
169
  sliderIndex: newIndex
@@ -220,7 +220,7 @@ function (_super) {
220
220
  }), item.secondButtonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
221
221
  data: item.secondButtonTag
222
222
  }))));
223
- })), data.setting.dots.open && /*#__PURE__*/_react["default"].createElement("div", {
223
+ })), data.setting.dots.open && Math.ceil(data.groupSource.length / colNum) > 1 && /*#__PURE__*/_react["default"].createElement("div", {
224
224
  className: "swiper-ban"
225
225
  }, data.groupSource.length > 1 && data.groupSource.map(function (item, i) {
226
226
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -3,60 +3,51 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getDefaultJSON = void 0;
6
+ exports.tagGroupSourceJSON = exports.getDefaultJSON = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
10
- var __assign = void 0 && (void 0).__assign || function () {
11
- __assign = Object.assign || function (t) {
12
- for (var s, i = 1, n = arguments.length; i < n; i++) {
13
- s = arguments[i];
14
-
15
- for (var p in s) {
16
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
17
- }
18
- }
19
-
20
- return t;
21
- };
22
-
23
- return __assign.apply(this, arguments);
24
- };
25
-
26
10
  /**
27
11
  * 获取 text 元组件json
28
12
  */
29
- var getDefaultMetaButtonJson = function getDefaultMetaButtonJson() {
13
+ var tagGroupSourceJSON = function tagGroupSourceJSON() {
14
+ var groupId = (0, _uuid.v4)();
30
15
  return {
31
- id: (0, _uuid.v4)(),
32
- open: true,
33
- content: {
34
- url: '',
35
- backgroundColor: '#e6eaf0'
36
- },
37
- buttonText: {
38
- sizeType: 'Customize font styles',
39
- fontFamily: 'Open Sans',
40
- fontWeight: 600,
41
- fontSize: 12,
42
- fontStyle: 'normal',
43
- color: '#8493AF',
44
- padding: '2px 8px'
45
- },
46
- buttonBorder: {
16
+ id: groupId,
17
+ button: {
18
+ parentId: groupId,
19
+ id: (0, _uuid.v4)(),
47
20
  open: true,
48
- borderColor: '',
49
- borderRadius: 4
50
- },
51
- buttonIcon: {
52
- iconUrl: '',
53
- layout: 'right'
54
- },
55
- text: 'Button Tag',
56
- hover: null
21
+ content: {
22
+ url: '',
23
+ backgroundColor: '#e6eaf0'
24
+ },
25
+ buttonText: {
26
+ sizeType: 'Customize font styles',
27
+ fontFamily: 'Open Sans',
28
+ fontWeight: 600,
29
+ fontSize: 12,
30
+ fontStyle: 'normal',
31
+ color: '#8493AF',
32
+ padding: '2px 8px'
33
+ },
34
+ buttonBorder: {
35
+ open: true,
36
+ borderColor: '',
37
+ borderRadius: 4
38
+ },
39
+ buttonIcon: {
40
+ iconUrl: '',
41
+ layout: 'right'
42
+ },
43
+ text: 'Button Tag',
44
+ hover: null
45
+ }
57
46
  };
58
47
  };
59
48
 
49
+ exports.tagGroupSourceJSON = tagGroupSourceJSON;
50
+
60
51
  var getDefaultJSON = function getDefaultJSON() {
61
52
  return {
62
53
  id: (0, _uuid.v4)(),
@@ -80,10 +71,9 @@ var getDefaultJSON = function getDefaultJSON() {
80
71
  pcImgHoverUrl: '',
81
72
  h5ImgHoverUrl: ''
82
73
  }
83
- },
84
- button: __assign({}, getDefaultMetaButtonJson()),
85
- secondaryButton: __assign({}, getDefaultMetaButtonJson())
74
+ }
86
75
  },
76
+ groupSource: [tagGroupSourceJSON()],
87
77
  spacing: {
88
78
  pc: {
89
79
  paddingTop: 10,
@@ -81,15 +81,13 @@ function (_super) {
81
81
  className: "tag-image"
82
82
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
83
83
  data: nodeData.content.image
84
- })), nodeData.content.button.open && /*#__PURE__*/_react["default"].createElement("div", {
85
- className: "first-button"
86
- }, /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
87
- data: nodeData.content.button
88
- })), nodeData.content.secondaryButton.open && /*#__PURE__*/_react["default"].createElement("div", {
89
- className: "secondary-button"
90
- }, /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
91
- data: nodeData.content.secondaryButton
92
- })));
84
+ })), nodeData.groupSource.map(function (m) {
85
+ return /*#__PURE__*/_react["default"].createElement("div", {
86
+ className: "first-button"
87
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
88
+ data: m.button
89
+ }));
90
+ }));
93
91
  };
94
92
 
95
93
  Tag.defaultProps = {};
@@ -1,6 +1,7 @@
1
1
  .tag-comp-wrap {
2
2
  display: flex;
3
3
  align-items: center;
4
+ flex-wrap: wrap;
4
5
 
5
6
  .tag-image {
6
7
  width: 26px;
@@ -141,7 +141,7 @@ var getDefaultJSON = function getDefaultJSON() {
141
141
  customize: {
142
142
  layout: 'left',
143
143
  align: 'left',
144
- rowNum: 3
144
+ pcRowNum: 3
145
145
  },
146
146
  background: {
147
147
  opacity: 100,
@@ -86,7 +86,7 @@ function (_super) {
86
86
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
87
87
  data: nodeData.title.subtitle
88
88
  })), /*#__PURE__*/_react["default"].createElement("div", {
89
- className: (0, _classnames["default"])('group-content-wrap', 'col-' + nodeData.customize.rowNum, (_a = {}, _a[window.magicDesign.device] = true, _a))
89
+ className: (0, _classnames["default"])('group-content-wrap', 'col-' + nodeData.customize.pcRowNum, (_a = {}, _a[window.magicDesign.device] = true, _a))
90
90
  }, nodeData.groupSource.map(function (group) {
91
91
  return /*#__PURE__*/_react["default"].createElement("div", {
92
92
  className: "group-wrap-container"
@@ -96,11 +96,11 @@ function (_super) {
96
96
  style: {
97
97
  textAlign: nodeData.customize.align
98
98
  }
99
- }, /*#__PURE__*/_react["default"].createElement("div", {
99
+ }, group.content.title.open && /*#__PURE__*/_react["default"].createElement("div", {
100
100
  className: "group-title"
101
101
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
102
102
  data: group.content.title
103
- })), /*#__PURE__*/_react["default"].createElement("div", {
103
+ })), group.content.text.open && /*#__PURE__*/_react["default"].createElement("div", {
104
104
  className: "group-content"
105
105
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
106
106
  data: group.content.text
@@ -21,6 +21,8 @@ require("./index.less");
21
21
 
22
22
  var _locale = require("../../../../../locale");
23
23
 
24
+ var _decorator = require("../../../../../decorator");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
27
 
26
28
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -120,7 +122,7 @@ function (_super) {
120
122
  AComponent.defaultProps = {
121
123
  source: []
122
124
  };
123
- AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
125
+ AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
124
126
  return AComponent;
125
127
  }(_react["default"].Component);
126
128
 
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _mobxReact = require("mobx-react");
11
+
12
+ var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
13
+
14
+ var _defaultJSON = require("../../../components/Button/defaultJSON");
15
+
16
+ var _coreUtil = require("../../../../../utils/coreUtil");
17
+
18
+ var _Button = _interopRequireDefault(require("../../../../../common/Button"));
19
+
20
+ require("./index.less");
21
+
22
+ var _locale = require("../../../../../locale");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
27
+
28
+ var __extends = void 0 && (void 0).__extends || function () {
29
+ var _extendStatics = function extendStatics(d, b) {
30
+ _extendStatics = Object.setPrototypeOf || {
31
+ __proto__: []
32
+ } instanceof Array && function (d, b) {
33
+ d.__proto__ = b;
34
+ } || function (d, b) {
35
+ for (var p in b) {
36
+ if (b.hasOwnProperty(p)) d[p] = b[p];
37
+ }
38
+ };
39
+
40
+ return _extendStatics(d, b);
41
+ };
42
+
43
+ return function (d, b) {
44
+ _extendStatics(d, b);
45
+
46
+ function __() {
47
+ this.constructor = d;
48
+ }
49
+
50
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51
+ };
52
+ }();
53
+
54
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
55
+ var c = arguments.length,
56
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
57
+ d;
58
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
59
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
60
+ }
61
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
62
+ };
63
+
64
+ var notice = '';
65
+
66
+ var AComponent =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(AComponent, _super);
70
+
71
+ function AComponent() {
72
+ var _this = _super !== null && _super.apply(this, arguments) || this;
73
+
74
+ _this.state = {};
75
+
76
+ _this.onClickItem = function (node) {
77
+ _this.props.store.setState({
78
+ clickedGroup: node.id
79
+ });
80
+ };
81
+
82
+ _this.onAddClick = function () {
83
+ var json = (0, _defaultJSON.buttonGroupSourceJSON)();
84
+
85
+ _this.props.source.push(json);
86
+
87
+ _this.setState({});
88
+
89
+ (0, _coreUtil.renderPreview)();
90
+ };
91
+
92
+ _this.reRender = function () {
93
+ _this.setState({});
94
+ };
95
+
96
+ _this.renderCard = function (src) {
97
+ return /*#__PURE__*/_react["default"].createElement("div", {
98
+ className: "card_wrap"
99
+ }, /*#__PURE__*/_react["default"].createElement("div", {
100
+ className: "name"
101
+ }, "Button Name"));
102
+ };
103
+
104
+ return _this;
105
+ }
106
+
107
+ AComponent.prototype.render = function () {
108
+ var _this = this;
109
+
110
+ var source = this.props.source;
111
+ return /*#__PURE__*/_react["default"].createElement("div", {
112
+ className: "button_group"
113
+ }, /*#__PURE__*/_react["default"].createElement("div", {
114
+ className: "node_list"
115
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
116
+ className: "notice"
117
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
118
+ onClickItem: this.onClickItem,
119
+ renderCard: function renderCard(v) {
120
+ return _this.renderCard(v);
121
+ },
122
+ reRender: this.reRender,
123
+ source: source
124
+ })), /*#__PURE__*/_react["default"].createElement("div", {
125
+ className: "btn_wrap"
126
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
127
+ icon: "icon-add",
128
+ onClick: this.onAddClick,
129
+ type: "primary"
130
+ }, (0, _locale.i18n)('ADD_BUTTON'))));
131
+ };
132
+
133
+ AComponent.defaultProps = {
134
+ source: []
135
+ };
136
+ AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
137
+ return AComponent;
138
+ }(_react["default"].Component);
139
+
140
+ var _default = AComponent;
141
+ exports["default"] = _default;
@@ -0,0 +1,16 @@
1
+ .button_group {
2
+ margin-bottom: 20px;
3
+
4
+ .node_list {
5
+ margin-bottom: 12px;
6
+
7
+ .notice {
8
+ font-family: 'Open Sans';
9
+ font-style: normal;
10
+ font-weight: 400;
11
+ font-size: 16px;
12
+ line-height: 24px;
13
+ color: #232F46;
14
+ }
15
+ }
16
+ }
@@ -7,7 +7,7 @@ exports["default"] = ButtonConfig;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _ButtonConfigContent = _interopRequireDefault(require("./ButtonConfigContent"));
10
+ var _ButtonConfigGroup = _interopRequireDefault(require("./ButtonConfigGroup"));
11
11
 
12
12
  var _layout = _interopRequireDefault(require("./imgs/layout1.png"));
13
13
 
@@ -33,8 +33,8 @@ function ButtonConfig(props) {
33
33
  source: [{
34
34
  key: '1',
35
35
  name: (0, _locale.i18n)('CONTENT'),
36
- value: /*#__PURE__*/_react["default"].createElement(_ButtonConfigContent["default"], {
37
- panelProps: data.content
36
+ value: /*#__PURE__*/_react["default"].createElement(_ButtonConfigGroup["default"], {
37
+ source: data.groupSource
38
38
  })
39
39
  }, {
40
40
  key: '2',
@@ -80,7 +80,7 @@ function (_super) {
80
80
  };
81
81
 
82
82
  _this.onAddClick = function () {
83
- var json = (0, _defaultJSON.imagesGroupSourceJSON)('', 'Tab');
83
+ var json = (0, _defaultJSON.imagesGroupSourceJSON)(_this.props.id);
84
84
 
85
85
  _this.props.source.push(json);
86
86
 
@@ -34,6 +34,7 @@ function CarouselConfig(props) {
34
34
  key: '1',
35
35
  name: (0, _locale.i18n)('IMAGE'),
36
36
  value: /*#__PURE__*/_react["default"].createElement(_CarouselConfigImageGroup["default"], {
37
+ id: data.id,
37
38
  source: data.groupSource
38
39
  })
39
40
  }, {
@@ -7,7 +7,7 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _ButtonConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ButtonConfig"));
10
+ var _TagConfigGroup = _interopRequireDefault(require("../TagConfigGroup"));
11
11
 
12
12
  var _coreUtil = require("../../../../../utils/coreUtil");
13
13
 
@@ -65,7 +65,9 @@ function (_super) {
65
65
  }
66
66
 
67
67
  AComponent.prototype.render = function () {
68
- var panelProps = this.props.panelProps;
68
+ var _a = this.props,
69
+ panelProps = _a.panelProps,
70
+ groupSource = _a.groupSource;
69
71
  return /*#__PURE__*/_react["default"].createElement("div", {
70
72
  className: "recommend_content"
71
73
  }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
@@ -78,22 +80,10 @@ function (_super) {
78
80
  data: panelProps.image
79
81
  }),
80
82
  metaOption: panelProps.image
81
- }, {
82
- key: '2',
83
- name: (0, _locale.i18n)('BUTTON_TAG'),
84
- value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
85
- data: panelProps.button
86
- }),
87
- metaOption: panelProps.button
88
- }, {
89
- key: '3',
90
- name: (0, _locale.i18n)('SECONDARY_BUTTON_TAG'),
91
- value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
92
- data: panelProps.secondaryButton
93
- }),
94
- metaOption: panelProps.secondaryButton
95
83
  }],
96
84
  type: "switch"
85
+ }), /*#__PURE__*/_react["default"].createElement(_TagConfigGroup["default"], {
86
+ source: groupSource
97
87
  }));
98
88
  };
99
89
 
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _mobxReact = require("mobx-react");
11
+
12
+ var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
13
+
14
+ var _defaultJSON = require("../../../components/Tag/defaultJSON");
15
+
16
+ var _coreUtil = require("../../../../../utils/coreUtil");
17
+
18
+ var _Button = _interopRequireDefault(require("../../../../../common/Button"));
19
+
20
+ require("./index.less");
21
+
22
+ var _locale = require("../../../../../locale");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
27
+
28
+ var __extends = void 0 && (void 0).__extends || function () {
29
+ var _extendStatics = function extendStatics(d, b) {
30
+ _extendStatics = Object.setPrototypeOf || {
31
+ __proto__: []
32
+ } instanceof Array && function (d, b) {
33
+ d.__proto__ = b;
34
+ } || function (d, b) {
35
+ for (var p in b) {
36
+ if (b.hasOwnProperty(p)) d[p] = b[p];
37
+ }
38
+ };
39
+
40
+ return _extendStatics(d, b);
41
+ };
42
+
43
+ return function (d, b) {
44
+ _extendStatics(d, b);
45
+
46
+ function __() {
47
+ this.constructor = d;
48
+ }
49
+
50
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51
+ };
52
+ }();
53
+
54
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
55
+ var c = arguments.length,
56
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
57
+ d;
58
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
59
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
60
+ }
61
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
62
+ };
63
+
64
+ var notice = '';
65
+
66
+ var AComponent =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(AComponent, _super);
70
+
71
+ function AComponent() {
72
+ var _this = _super !== null && _super.apply(this, arguments) || this;
73
+
74
+ _this.state = {};
75
+
76
+ _this.onClickItem = function (node) {
77
+ _this.props.store.setState({
78
+ clickedGroup: node.id
79
+ });
80
+ };
81
+
82
+ _this.onAddClick = function () {
83
+ var json = (0, _defaultJSON.tagGroupSourceJSON)();
84
+
85
+ _this.props.source.push(json);
86
+
87
+ _this.setState({});
88
+
89
+ (0, _coreUtil.renderPreview)();
90
+ };
91
+
92
+ _this.reRender = function () {
93
+ _this.setState({});
94
+ };
95
+
96
+ _this.renderCard = function (src) {
97
+ return /*#__PURE__*/_react["default"].createElement("div", {
98
+ className: "card_wrap"
99
+ }, /*#__PURE__*/_react["default"].createElement("div", {
100
+ className: "name"
101
+ }, "Button Tag"));
102
+ };
103
+
104
+ return _this;
105
+ }
106
+
107
+ AComponent.prototype.render = function () {
108
+ var _this = this;
109
+
110
+ var source = this.props.source;
111
+ return /*#__PURE__*/_react["default"].createElement("div", {
112
+ className: "tag_group"
113
+ }, /*#__PURE__*/_react["default"].createElement("div", {
114
+ className: "node_list"
115
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
116
+ className: "notice"
117
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
118
+ onClickItem: this.onClickItem,
119
+ renderCard: function renderCard(v) {
120
+ return _this.renderCard(v);
121
+ },
122
+ reRender: this.reRender,
123
+ source: source
124
+ })), /*#__PURE__*/_react["default"].createElement("div", {
125
+ className: "btn_wrap"
126
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
127
+ icon: "icon-add",
128
+ onClick: this.onAddClick,
129
+ type: "primary"
130
+ }, (0, _locale.i18n)('ADD_TAG'))));
131
+ };
132
+
133
+ AComponent.defaultProps = {
134
+ source: []
135
+ };
136
+ AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
137
+ return AComponent;
138
+ }(_react["default"].Component);
139
+
140
+ var _default = AComponent;
141
+ exports["default"] = _default;
@@ -0,0 +1,16 @@
1
+ .tag_group {
2
+ margin-bottom: 20px;
3
+
4
+ .node_list {
5
+ margin-bottom: 12px;
6
+
7
+ .notice {
8
+ font-family: 'Open Sans';
9
+ font-style: normal;
10
+ font-weight: 400;
11
+ font-size: 16px;
12
+ line-height: 24px;
13
+ color: #232F46;
14
+ }
15
+ }
16
+ }
@@ -32,6 +32,7 @@ function TagCompConfig(props) {
32
32
  key: '1',
33
33
  name: (0, _locale.i18n)('CONTENT'),
34
34
  value: /*#__PURE__*/_react["default"].createElement(_TagConfigContent["default"], {
35
+ groupSource: data.groupSource,
35
36
  panelProps: data.content
36
37
  })
37
38
  }, {
@@ -17,6 +17,8 @@ var _coreUtil = require("../../../../../utils/coreUtil");
17
17
 
18
18
  var _defaultJSON = require("../../../components/Text/defaultJSON");
19
19
 
20
+ var _decorator = require("../../../../../decorator");
21
+
20
22
  require("./index.less");
21
23
 
22
24
  var _locale = require("../../../../../locale");
@@ -132,7 +134,7 @@ function (_super) {
132
134
  default_1.defaultProps = {
133
135
  source: []
134
136
  };
135
- default_1 = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], default_1);
137
+ default_1 = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], default_1);
136
138
  return default_1;
137
139
  }(_react["default"].Component);
138
140
 
@@ -7,8 +7,6 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _coreUtil = require("../../../../utils/coreUtil");
11
-
12
10
  var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
13
11
 
14
12
  var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
@@ -102,10 +100,8 @@ function (_super) {
102
100
  metaOption: panelProps.secondButton
103
101
  }];
104
102
  return /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
105
- headerSize: "middle",
106
- onRefresh: function onRefresh() {
107
- return (0, _coreUtil.renderPreview)();
108
- },
103
+ headerSize: "middle" // onRefresh={() => renderPreview()}
104
+ ,
109
105
  showActiveColor: true,
110
106
  source: source,
111
107
  type: "switch"