@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
@@ -0,0 +1,103 @@
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 _coreUtil = require("../../../../utils/coreUtil");
11
+
12
+ var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
13
+
14
+ var _ButtonConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ButtonConfig"));
15
+
16
+ var _locale = require("../../../../locale");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ var __extends = void 0 && (void 0).__extends || function () {
21
+ var _extendStatics = function extendStatics(d, b) {
22
+ _extendStatics = Object.setPrototypeOf || {
23
+ __proto__: []
24
+ } instanceof Array && function (d, b) {
25
+ d.__proto__ = b;
26
+ } || function (d, b) {
27
+ for (var p in b) {
28
+ if (b.hasOwnProperty(p)) d[p] = b[p];
29
+ }
30
+ };
31
+
32
+ return _extendStatics(d, b);
33
+ };
34
+
35
+ return function (d, b) {
36
+ _extendStatics(d, b);
37
+
38
+ function __() {
39
+ this.constructor = d;
40
+ }
41
+
42
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43
+ };
44
+ }();
45
+
46
+ var debug = require('debug')('worker:ButtonSecondConfig');
47
+
48
+ var ButtonSecondConfig =
49
+ /** @class */
50
+ function (_super) {
51
+ __extends(ButtonSecondConfig, _super);
52
+
53
+ function ButtonSecondConfig() {
54
+ var _this = _super !== null && _super.apply(this, arguments) || this;
55
+
56
+ _this.state = {};
57
+
58
+ _this.getContentPanel = function () {
59
+ var panelProps = _this.props.panelProps;
60
+ var source = [{
61
+ key: '1',
62
+ name: (0, _locale.i18n)('BUTTON_TAG'),
63
+ value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
64
+ data: panelProps.button
65
+ }),
66
+ metaOption: panelProps.button
67
+ }];
68
+ return /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
69
+ headerSize: "middle",
70
+ onRefresh: function onRefresh() {
71
+ return (0, _coreUtil.renderPreview)();
72
+ },
73
+ showActiveColor: true,
74
+ source: source,
75
+ type: "switch"
76
+ });
77
+ };
78
+
79
+ return _this;
80
+ }
81
+
82
+ ButtonSecondConfig.prototype.render = function () {
83
+ return /*#__PURE__*/_react["default"].createElement("div", {
84
+ className: "button_second_conf_wrap"
85
+ }, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
86
+ divider: "bold",
87
+ headerSize: "large",
88
+ source: [{
89
+ key: '1',
90
+ name: (0, _locale.i18n)('CONTENT'),
91
+ value: this.getContentPanel()
92
+ }]
93
+ }));
94
+ };
95
+
96
+ ButtonSecondConfig.defaultProps = {
97
+ panelProps: {}
98
+ };
99
+ return ButtonSecondConfig;
100
+ }(_react["default"].Component);
101
+
102
+ var _default = ButtonSecondConfig;
103
+ exports["default"] = _default;
@@ -0,0 +1,3 @@
1
+ .button_second_conf_wrap {
2
+ width: 354px;
3
+ }
@@ -7,13 +7,13 @@ 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 _coreUtil = require("../../../../utils/coreUtil");
11
11
 
12
- var _coreUtil = require("../../../../../utils/coreUtil");
12
+ var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
13
13
 
14
- var _common = require("../../../../../common");
14
+ var _ButtonConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ButtonConfig"));
15
15
 
16
- var _locale = require("../../../../../locale");
16
+ var _locale = require("../../../../locale");
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
19
 
@@ -43,59 +43,61 @@ var __extends = void 0 && (void 0).__extends || function () {
43
43
  };
44
44
  }();
45
45
 
46
- var AComponent =
46
+ var debug = require('debug')('worker:TagSecondConfig');
47
+
48
+ var TagSecondConfig =
47
49
  /** @class */
48
50
  function (_super) {
49
- __extends(AComponent, _super);
51
+ __extends(TagSecondConfig, _super);
50
52
 
51
- function AComponent() {
53
+ function TagSecondConfig() {
52
54
  var _this = _super !== null && _super.apply(this, arguments) || this;
53
55
 
54
56
  _this.state = {};
55
57
 
56
- _this.reRender = function () {
57
- (0, _coreUtil.renderPreview)();
58
-
59
- _this.setState({});
58
+ _this.getContentPanel = function () {
59
+ var panelProps = _this.props.panelProps;
60
+ var source = [{
61
+ key: '1',
62
+ name: (0, _locale.i18n)('BUTTON_TAG'),
63
+ value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
64
+ data: panelProps.button
65
+ }),
66
+ metaOption: panelProps.button
67
+ }];
68
+ return /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
69
+ headerSize: "middle",
70
+ onRefresh: function onRefresh() {
71
+ return (0, _coreUtil.renderPreview)();
72
+ },
73
+ showActiveColor: true,
74
+ source: source,
75
+ type: "switch"
76
+ });
60
77
  };
61
78
 
62
79
  return _this;
63
80
  }
64
81
 
65
- AComponent.prototype.render = function () {
66
- var panelProps = this.props.panelProps;
82
+ TagSecondConfig.prototype.render = function () {
67
83
  return /*#__PURE__*/_react["default"].createElement("div", {
68
- className: "recommend_content"
69
- }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
70
- headerSize: "middle",
71
- onRefresh: this.reRender,
84
+ className: "tag_second_conf_wrap"
85
+ }, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
86
+ divider: "bold",
87
+ headerSize: "large",
72
88
  source: [{
73
89
  key: '1',
74
- name: (0, _locale.i18n)('BUTTON'),
75
- value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
76
- data: panelProps.button
77
- }),
78
- metaOption: panelProps.button
79
- }, {
80
- key: '2',
81
- name: (0, _locale.i18n)('SECONDARY_BUTTON'),
82
- value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
83
- data: panelProps.secondaryButton
84
- }),
85
- metaOption: panelProps.secondaryButton
86
- }],
87
- type: "switch"
90
+ name: (0, _locale.i18n)('CONTENT'),
91
+ value: this.getContentPanel()
92
+ }]
88
93
  }));
89
94
  };
90
95
 
91
- AComponent.defaultProps = {
92
- panelProps: {
93
- button: {},
94
- secondaryButton: {}
95
- }
96
+ TagSecondConfig.defaultProps = {
97
+ panelProps: {}
96
98
  };
97
- return AComponent;
99
+ return TagSecondConfig;
98
100
  }(_react["default"].Component);
99
101
 
100
- var _default = AComponent;
102
+ var _default = TagSecondConfig;
101
103
  exports["default"] = _default;
@@ -0,0 +1,3 @@
1
+ .tag_second_conf_wrap {
2
+ width: 354px;
3
+ }
@@ -21,10 +21,10 @@
21
21
  .promotions-wrap {
22
22
  display: flex;
23
23
  flex-wrap: wrap;
24
- margin-bottom: 5px;
25
24
 
26
25
  .promotion-item {
27
26
  margin-right: 5px;
27
+ margin-bottom: 5px;
28
28
 
29
29
  &:last-child {
30
30
  margin-right: 0;
@@ -130,11 +130,11 @@
130
130
 
131
131
  &.fixHeight {
132
132
  .promotions-wrap {
133
- height: 17px;
133
+ // height: 17px;
134
134
  }
135
135
 
136
136
  .product-name {
137
- height: 38px;
137
+ // height: 38px;
138
138
  }
139
139
  }
140
140
 
@@ -89,9 +89,9 @@ function (_super) {
89
89
  className: "padding-item"
90
90
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
91
91
  type: "icon-padding-top"
92
- }), /*#__PURE__*/_react["default"].createElement(_antd.Input, {
92
+ }), /*#__PURE__*/_react["default"].createElement(_antd.InputNumber, {
93
93
  onChange: function onChange(e) {
94
- obj.paddingTop = e.target.value;
94
+ obj.paddingTop = e;
95
95
 
96
96
  _this.selfRender();
97
97
  },
@@ -100,9 +100,9 @@ function (_super) {
100
100
  className: "padding-item"
101
101
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
102
102
  type: "icon-padding-bottom"
103
- }), /*#__PURE__*/_react["default"].createElement(_antd.Input, {
103
+ }), /*#__PURE__*/_react["default"].createElement(_antd.InputNumber, {
104
104
  onChange: function onChange(e) {
105
- obj.paddingBottom = e.target.value;
105
+ obj.paddingBottom = e;
106
106
 
107
107
  _this.selfRender();
108
108
  },
@@ -111,9 +111,9 @@ function (_super) {
111
111
  className: "padding-item"
112
112
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
113
113
  type: "icon-padding-left"
114
- }), /*#__PURE__*/_react["default"].createElement(_antd.Input, {
114
+ }), /*#__PURE__*/_react["default"].createElement(_antd.InputNumber, {
115
115
  onChange: function onChange(e) {
116
- obj.paddingLeft = e.target.value;
116
+ obj.paddingLeft = e;
117
117
 
118
118
  _this.selfRender();
119
119
  },
@@ -122,9 +122,9 @@ function (_super) {
122
122
  className: "padding-item"
123
123
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
124
124
  type: "icon-padding-right"
125
- }), /*#__PURE__*/_react["default"].createElement(_antd.Input, {
125
+ }), /*#__PURE__*/_react["default"].createElement(_antd.InputNumber, {
126
126
  onChange: function onChange(e) {
127
- obj.paddingRight = e.target.value;
127
+ obj.paddingRight = e;
128
128
 
129
129
  _this.selfRender();
130
130
  },
@@ -167,6 +167,22 @@ var getDefaultJSON = function getDefaultJSON() {
167
167
  open: true
168
168
  }
169
169
  },
170
+ spacing: {
171
+ pc: {
172
+ paddingTop: 0,
173
+ paddingBottom: 0,
174
+ paddingLeft: 0,
175
+ paddingRight: 0,
176
+ marginBottom: window.magicDesign.compSpacing * 1.5
177
+ },
178
+ mobile: {
179
+ paddingTop: 0,
180
+ paddingBottom: 0,
181
+ paddingLeft: 0,
182
+ paddingRight: 0,
183
+ marginBottom: window.magicDesign.compSpacing
184
+ }
185
+ },
170
186
  customize: {
171
187
  layout: 'layout1',
172
188
  align: 'left',
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDefaultJSON = exports.PcNavGroupSourceJSON = void 0;
7
+
8
+ var _uuid = require("uuid");
9
+
10
+ var PcNavGroupSourceJSON = function PcNavGroupSourceJSON() {
11
+ var groupId = (0, _uuid.v4)();
12
+ return {
13
+ id: groupId,
14
+ title: {
15
+ parentId: groupId,
16
+ id: (0, _uuid.v4)(),
17
+ open: true,
18
+ type: 'TEXT',
19
+ specialContent: [],
20
+ text: 'Navigation',
21
+ content: {
22
+ sizeType: 'Customize font styles',
23
+ fontFamily: 'Open Sans',
24
+ fontWeight: 400,
25
+ fontSize: 16,
26
+ pcFontSize: 16,
27
+ width: '100%',
28
+ color: '#232F46'
29
+ },
30
+ underline: {
31
+ open: false,
32
+ textDecorationColor: '',
33
+ textDecorationStyle: 'solid'
34
+ },
35
+ vertical: {}
36
+ }
37
+ };
38
+ };
39
+
40
+ exports.PcNavGroupSourceJSON = PcNavGroupSourceJSON;
41
+
42
+ var getDefaultJSON = function getDefaultJSON() {
43
+ return {
44
+ id: (0, _uuid.v4)(),
45
+ type: 'PC_NAVIGATION',
46
+ spacing: {
47
+ pc: {
48
+ paddingTop: 10,
49
+ paddingBottom: 10,
50
+ paddingLeft: 120,
51
+ paddingRight: 120,
52
+ marginBottom: window.magicDesign.compSpacing
53
+ },
54
+ mobile: {
55
+ paddingTop: 0,
56
+ paddingBottom: 0,
57
+ marginBottom: 0
58
+ }
59
+ },
60
+ customize: {
61
+ layout: 'normal'
62
+ },
63
+ background: {
64
+ opacity: 100,
65
+ color: '#FFFFFF',
66
+ image: '',
67
+ bgType: 'color'
68
+ },
69
+ home: {
70
+ allCategory: {
71
+ id: (0, _uuid.v4)(),
72
+ open: true,
73
+ type: 'TEXT',
74
+ text: 'All Category',
75
+ specialContent: [],
76
+ iconUrl: '',
77
+ content: {
78
+ backgroundColor: 'transparent',
79
+ sizeType: 'Customize font styles',
80
+ fontFamily: 'Open Sans',
81
+ fontWeight: 400,
82
+ fontSize: 16,
83
+ pcFontSize: 16,
84
+ width: '100%',
85
+ color: '#3A2E2E'
86
+ }
87
+ },
88
+ firstCategory: {
89
+ id: (0, _uuid.v4)(),
90
+ specialContent: [],
91
+ content: {
92
+ backgroundColor: 'transparent',
93
+ sizeType: 'Customize font styles',
94
+ fontFamily: 'Open Sans',
95
+ fontWeight: 400,
96
+ fontSize: 16,
97
+ pcFontSize: 16,
98
+ width: '100%',
99
+ color: '#232F46'
100
+ }
101
+ },
102
+ secondCategory: {
103
+ id: (0, _uuid.v4)(),
104
+ specialContent: [],
105
+ content: {
106
+ backgroundColor: 'transparent',
107
+ sizeType: 'Customize font styles',
108
+ fontFamily: 'Open Sans',
109
+ fontWeight: 400,
110
+ fontSize: 16,
111
+ pcFontSize: 16,
112
+ width: '100%',
113
+ color: '#232F46'
114
+ }
115
+ },
116
+ lastCategory: {
117
+ id: (0, _uuid.v4)(),
118
+ specialContent: [],
119
+ content: {
120
+ backgroundColor: 'transparent',
121
+ sizeType: 'Customize font styles',
122
+ fontFamily: 'Open Sans',
123
+ fontWeight: 400,
124
+ fontSize: 16,
125
+ pcFontSize: 16,
126
+ width: '100%',
127
+ color: '#232F46'
128
+ }
129
+ }
130
+ },
131
+ groupSource: [PcNavGroupSourceJSON()]
132
+ };
133
+ };
134
+
135
+ exports.getDefaultJSON = getDefaultJSON;
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="&#230;&#177;&#137;&#229;&#160;&#161;&#229;&#140;&#133;">
3
+ <rect id="Rectangle" opacity="0.01" width="16" height="16" fill="black"/>
4
+ <path id="Shape" fill-rule="evenodd" clip-rule="evenodd" d="M1.15 4.34978C0.688742 4.34978 0.313477 3.97452 0.313477 3.51328C0.313477 3.05202 0.688742 2.67676 1.15 2.67676H14.8503C15.3115 2.67676 15.6868 3.05202 15.6868 3.51328C15.6868 3.97452 15.3115 4.34978 14.8503 4.34978H1.15ZM1.15 9.25537C0.688742 9.25537 0.313477 8.88009 0.313477 8.41878C0.313477 7.95753 0.688742 7.58226 1.15 7.58226H14.8503C15.3115 7.58226 15.6868 7.95753 15.6868 8.41878C15.6868 8.88009 15.3115 9.25537 14.8503 9.25537H1.15ZM0.313477 13.2852C0.313477 13.7465 0.688742 14.1217 1.15 14.1217H14.8503C15.3115 14.1217 15.6868 13.7465 15.6868 13.2852C15.6868 12.8239 15.3115 12.4487 14.8503 12.4487H1.15C0.688742 12.4487 0.313477 12.8239 0.313477 13.2852Z" fill="#3A2E2E"/>
5
+ </g>
6
+ </svg>
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _pc = _interopRequireDefault(require("./pc"));
11
+
12
+ var _defaultJSON = require("./defaultJSON");
13
+
14
+ var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ 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); }
23
+
24
+ var __extends = void 0 && (void 0).__extends || function () {
25
+ var _extendStatics = function extendStatics(d, b) {
26
+ _extendStatics = Object.setPrototypeOf || {
27
+ __proto__: []
28
+ } instanceof Array && function (d, b) {
29
+ d.__proto__ = b;
30
+ } || function (d, b) {
31
+ for (var p in b) {
32
+ if (b.hasOwnProperty(p)) d[p] = b[p];
33
+ }
34
+ };
35
+
36
+ return _extendStatics(d, b);
37
+ };
38
+
39
+ return function (d, b) {
40
+ _extendStatics(d, b);
41
+
42
+ function __() {
43
+ this.constructor = d;
44
+ }
45
+
46
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47
+ };
48
+ }();
49
+
50
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
51
+ var c = arguments.length,
52
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
53
+ d;
54
+ 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--) {
55
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
56
+ }
57
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
58
+ };
59
+
60
+ var PcNavigation =
61
+ /** @class */
62
+ function (_super) {
63
+ __extends(PcNavigation, _super);
64
+
65
+ function PcNavigation() {
66
+ return _super !== null && _super.apply(this, arguments) || this;
67
+ }
68
+
69
+ PcNavigation.prototype.render = function () {
70
+ var nodeData = this.props.nodeData;
71
+ console.log('---PcNavigation', nodeData);
72
+ return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
73
+ data: nodeData
74
+ }) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null));
75
+ };
76
+
77
+ PcNavigation.defaultProps = {};
78
+ PcNavigation.type = 'PC_NAVIGATION';
79
+ PcNavigation.getDefaultJSON = _defaultJSON.getDefaultJSON;
80
+ PcNavigation = __decorate([_compositeDecorator["default"]], PcNavigation);
81
+ return PcNavigation;
82
+ }(_react.Component);
83
+
84
+ var _default = PcNavigation;
85
+ exports["default"] = _default;