@fonixtree/magic-design 2.0.62 → 2.0.64

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 (141) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +18 -6
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +15 -12
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -5
  4. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -5
  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/base64/index.js +28 -2
  9. package/es/common/ImagePicker/index.js +0 -2
  10. package/es/common/LinkModal/FunctionTable/index.js +2 -1
  11. package/es/common/LinkModal/index.js +14 -2
  12. package/es/common/MyModal/index.less +1 -1
  13. package/es/common/UrlPicker/index.js +3 -1
  14. package/es/composite-comp/bol/components/ImageText/pc/index.js +2 -2
  15. package/es/composite-comp/bol/components/Video/index.js +1 -2
  16. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +8 -6
  17. package/es/composite-comp/common/components/AffiliateProductItem/index.less +1 -1
  18. package/es/composite-comp/common/components/ImageLabel/index.less +10 -3
  19. package/es/composite-comp/common/components/ProductItem/index.js +25 -17
  20. package/es/composite-comp/common/components/ProductItem/index.less +17 -8
  21. package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +1 -1
  22. package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -6
  23. package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +97 -0
  24. package/es/composite-comp/dito/components/HeadNavigation/index.js +84 -0
  25. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
  26. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
  27. package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
  28. package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
  29. package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
  30. package/es/composite-comp/dito/components/MenuNavigation/index.js +84 -0
  31. package/es/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
  32. package/es/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
  33. package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -4
  34. package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -6
  35. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
  36. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
  37. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
  38. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +123 -0
  39. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
  40. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
  41. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
  42. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
  43. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
  44. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
  45. package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
  46. package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
  47. package/es/constants/component-types.js +15 -3
  48. package/es/constants/index.js +8 -0
  49. package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +110 -0
  50. package/es/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
  51. package/es/core/Designer/ChatRobot/index.js +36 -14
  52. package/es/core/Designer/ChatRobot/index.less +69 -28
  53. package/es/core/Designer/History/index.js +2 -2
  54. package/es/core/Designer/PageCompList/index.js +5 -3
  55. package/es/core/Designer/RenderHtml/index.js +18 -15
  56. package/es/core/Designer/RenderHtml/index.less +1 -1
  57. package/es/core/Designer/ToolBarModal/index.js +8 -7
  58. package/es/core/Designer/index.js +8 -0
  59. package/es/core/Renderer/index.js +3 -1
  60. package/es/decorator/compositeDecorator.js +23 -0
  61. package/es/locale/en/en.json +3 -0
  62. package/es/locale/es/es.json +3 -0
  63. package/es/locale/id/id.json +3 -0
  64. package/es/meta-comp/components/Text/formats/textAlign.js +58 -0
  65. package/es/meta-comp/components/Text/index.js +2 -0
  66. package/es/meta-comp/config-panels/ButtonConfig/index.js +5 -5
  67. package/es/meta-comp/config-panels/ImageConfig/index.js +4 -2
  68. package/es/utils/businessUtil.js +3 -3
  69. package/es/utils/commonUtil.js +2 -2
  70. package/lib/assets/fonts/magic-box-iconfont.css +18 -6
  71. package/lib/assets/fonts/magic-box-iconfont.css.bak +15 -12
  72. package/lib/assets/fonts/magic-box-iconfont.js +1 -5
  73. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -5
  74. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  75. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  76. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  77. package/lib/assets/images/base64/index.js +28 -2
  78. package/lib/common/ImagePicker/index.js +0 -2
  79. package/lib/common/LinkModal/FunctionTable/index.js +2 -1
  80. package/lib/common/LinkModal/index.js +14 -2
  81. package/lib/common/MyModal/index.less +1 -1
  82. package/lib/common/UrlPicker/index.js +3 -1
  83. package/lib/composite-comp/bol/components/ImageText/pc/index.js +2 -2
  84. package/lib/composite-comp/bol/components/Video/index.js +1 -2
  85. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +8 -6
  86. package/lib/composite-comp/common/components/AffiliateProductItem/index.less +1 -1
  87. package/lib/composite-comp/common/components/ImageLabel/index.less +10 -3
  88. package/lib/composite-comp/common/components/ProductItem/index.js +25 -17
  89. package/lib/composite-comp/common/components/ProductItem/index.less +17 -8
  90. package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +1 -1
  91. package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -6
  92. package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +97 -0
  93. package/lib/composite-comp/dito/components/HeadNavigation/index.js +84 -0
  94. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
  95. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
  96. package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
  97. package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
  98. package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
  99. package/lib/composite-comp/dito/components/MenuNavigation/index.js +84 -0
  100. package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
  101. package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
  102. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -4
  103. package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -6
  104. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
  105. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
  106. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
  107. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +123 -0
  108. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
  109. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
  110. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
  111. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
  112. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
  113. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
  114. package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
  115. package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
  116. package/lib/constants/component-types.js +15 -3
  117. package/lib/constants/index.js +8 -0
  118. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +110 -0
  119. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
  120. package/lib/core/Designer/ChatRobot/index.js +36 -14
  121. package/lib/core/Designer/ChatRobot/index.less +69 -28
  122. package/lib/core/Designer/History/index.js +2 -2
  123. package/lib/core/Designer/PageCompList/index.js +5 -3
  124. package/lib/core/Designer/RenderHtml/index.js +18 -15
  125. package/lib/core/Designer/RenderHtml/index.less +1 -1
  126. package/lib/core/Designer/ToolBarModal/index.js +8 -7
  127. package/lib/core/Designer/index.js +8 -0
  128. package/lib/core/Renderer/index.js +3 -1
  129. package/lib/decorator/compositeDecorator.js +23 -0
  130. package/lib/locale/en/en.json +3 -0
  131. package/lib/locale/es/es.json +3 -0
  132. package/lib/locale/id/id.json +3 -0
  133. package/lib/meta-comp/components/Text/formats/textAlign.js +58 -0
  134. package/lib/meta-comp/components/Text/index.js +2 -0
  135. package/lib/meta-comp/config-panels/ButtonConfig/index.js +5 -5
  136. package/lib/meta-comp/config-panels/ImageConfig/index.js +4 -2
  137. package/lib/utils/businessUtil.js +3 -3
  138. package/lib/utils/commonUtil.js +2 -2
  139. package/package.json +1 -1
  140. package/es/assets/fonts/.DS_Store +0 -0
  141. package/lib/assets/fonts/.DS_Store +0 -0
@@ -0,0 +1,87 @@
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 _MenuNavMetaImage = _interopRequireDefault(require("../MenuNavMetaImage"));
11
+
12
+ var _commonUtil = require("../../../../../utils/commonUtil");
13
+
14
+ require("./index.less");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ var __extends = void 0 && (void 0).__extends || function () {
19
+ var _extendStatics = function extendStatics(d, b) {
20
+ _extendStatics = Object.setPrototypeOf || {
21
+ __proto__: []
22
+ } instanceof Array && function (d, b) {
23
+ d.__proto__ = b;
24
+ } || function (d, b) {
25
+ for (var p in b) {
26
+ if (b.hasOwnProperty(p)) d[p] = b[p];
27
+ }
28
+ };
29
+
30
+ return _extendStatics(d, b);
31
+ };
32
+
33
+ return function (d, b) {
34
+ _extendStatics(d, b);
35
+
36
+ function __() {
37
+ this.constructor = d;
38
+ }
39
+
40
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41
+ };
42
+ }();
43
+
44
+ var MenuNavigationMobile =
45
+ /** @class */
46
+ function (_super) {
47
+ __extends(MenuNavigationMobile, _super);
48
+
49
+ function MenuNavigationMobile() {
50
+ var _this = _super !== null && _super.apply(this, arguments) || this;
51
+
52
+ _this.carouselRef = /*#__PURE__*/_react["default"].createRef();
53
+ _this.state = {};
54
+ return _this;
55
+ }
56
+
57
+ MenuNavigationMobile.prototype.render = function () {
58
+ var _this = this;
59
+
60
+ var data = this.props.data;
61
+ var GAData = (0, _commonUtil.getGAData)(data);
62
+ return /*#__PURE__*/_react["default"].createElement("div", {
63
+ className: "m-menu-navigation"
64
+ }, data.groupSource.map(function (group) {
65
+ return /*#__PURE__*/_react["default"].createElement("div", {
66
+ key: group.id,
67
+ className: "menu-item",
68
+ onClick: function onClick() {
69
+ return _this.clickJump(group.title.text);
70
+ }
71
+ }, group.image.open && /*#__PURE__*/_react["default"].createElement(_MenuNavMetaImage["default"], {
72
+ data: group.image,
73
+ GAData: GAData
74
+ }));
75
+ }));
76
+ };
77
+
78
+ MenuNavigationMobile.defaultProps = {
79
+ data: {
80
+ groupSource: []
81
+ }
82
+ };
83
+ return MenuNavigationMobile;
84
+ }(_react["default"].Component);
85
+
86
+ var _default = MenuNavigationMobile;
87
+ exports["default"] = _default;
@@ -0,0 +1,8 @@
1
+ .m-menu-navigation {
2
+ width: 100%;
3
+ display: flex;
4
+ align-items: center;
5
+ }
6
+ .m-menu-navigation .menu-item {
7
+ flex: 1;
8
+ }
@@ -629,8 +629,8 @@ function (_super) {
629
629
  }, products.map(function (item) {
630
630
  return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
631
631
  key: item.productId,
632
- data: item,
633
- fixHeight: layout === 'layout3',
632
+ data: item // fixHeight={layout === 'layout3'}
633
+ ,
634
634
  imgHeight: imgHeight,
635
635
  imgWidth: imgWidth,
636
636
  layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
@@ -663,8 +663,8 @@ function (_super) {
663
663
  className: "productCard"
664
664
  }, /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
665
665
  key: "scroll_" + item.productId,
666
- data: item,
667
- fixHeight: true,
666
+ data: item // fixHeight
667
+ ,
668
668
  imgHeight: imgHeight,
669
669
  imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
670
670
  ,
@@ -13,9 +13,9 @@ require("./index.less");
13
13
 
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
- var _lodash = require("lodash");
16
+ var _debounce = _interopRequireDefault(require("lodash/debounce"));
17
17
 
18
- var _lodash2 = _interopRequireDefault(require("lodash.throttle"));
18
+ var _lodash = _interopRequireDefault(require("lodash.throttle"));
19
19
 
20
20
  var _mobx = require("../../../../../mobx");
21
21
 
@@ -480,7 +480,7 @@ function (_super) {
480
480
  if (scrollDom) {
481
481
  _this.setScrollDisabled(scrollDom);
482
482
 
483
- scrollDom.onscroll = (0, _lodash2["default"])(function () {
483
+ scrollDom.onscroll = (0, _lodash["default"])(function () {
484
484
  _this.setScrollDisabled(scrollDom);
485
485
  }, 500);
486
486
  }
@@ -528,13 +528,13 @@ function (_super) {
528
528
  if (scrollDom) {
529
529
  _this.setScrollDisabled(scrollDom);
530
530
 
531
- scrollDom.onscroll = (0, _lodash2["default"])(function () {
531
+ scrollDom.onscroll = (0, _lodash["default"])(function () {
532
532
  _this.setScrollDisabled(scrollDom);
533
533
  }, 500);
534
534
  }
535
535
  }, 0);
536
536
  this.listenWidth();
537
- window.addEventListener('resize', (0, _lodash.debounce)(this.listenWidth));
537
+ window.addEventListener('resize', (0, _debounce["default"])(this.listenWidth));
538
538
  };
539
539
 
540
540
  RecommendMobile.prototype.componentWillUnmount = function () {
@@ -590,7 +590,7 @@ function (_super) {
590
590
  if (scrollDom) {
591
591
  _this.setScrollDisabled(scrollDom);
592
592
 
593
- scrollDom.onscroll = (0, _lodash2["default"])(function () {
593
+ scrollDom.onscroll = (0, _lodash["default"])(function () {
594
594
  _this.setScrollDisabled(scrollDom);
595
595
  }, 500);
596
596
  }
@@ -0,0 +1,203 @@
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
+ require("./index.less");
11
+
12
+ var _common = require("../../../../../common");
13
+
14
+ var _commonUtil = require("../../../../../utils/commonUtil");
15
+
16
+ var _coreUtil = require("../../../../../utils/coreUtil");
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 GroupList =
47
+ /** @class */
48
+ function (_super) {
49
+ __extends(GroupList, _super);
50
+
51
+ function GroupList() {
52
+ var _this = _super !== null && _super.apply(this, arguments) || this;
53
+
54
+ _this.state = {
55
+ dragId: ''
56
+ };
57
+
58
+ _this.moveCard = function (dragNodeId, hoverNodeId) {
59
+ var source = _this.props.source;
60
+ var dragIndex = source.findIndex(function (obj) {
61
+ return obj.id === dragNodeId;
62
+ });
63
+ var hoverIndex = source.findIndex(function (obj) {
64
+ return obj.id === hoverNodeId;
65
+ });
66
+ (0, _commonUtil.dragSource)(source, dragIndex, hoverIndex);
67
+
68
+ _this.setState({});
69
+
70
+ (0, _coreUtil.renderPreview)();
71
+ };
72
+
73
+ _this.onDragStart = function (e) {
74
+ _this.setState({
75
+ dragId: e.currentTarget.dataset.nodeid
76
+ });
77
+ };
78
+
79
+ _this.onDragEnter = function (e) {
80
+ var dragId = _this.state.dragId;
81
+ var hoverNodeId = e.currentTarget.dataset.nodeid;
82
+
83
+ if (dragId === hoverNodeId) {
84
+ return;
85
+ } // renderPreview();
86
+
87
+
88
+ _this.moveCard(dragId, hoverNodeId);
89
+ };
90
+
91
+ _this.onDragEnd = function () {
92
+ _this.setState({
93
+ dragId: ''
94
+ });
95
+ };
96
+
97
+ _this.copyItem = function (e, item) {
98
+ var source = _this.props.source;
99
+ e.stopPropagation();
100
+ var index = source.findIndex(function (src) {
101
+ return src.id === item.id;
102
+ });
103
+ source.splice(index, 0, (0, _coreUtil.copyNode)(item));
104
+
105
+ _this.setState({});
106
+
107
+ (0, _coreUtil.renderPreview)();
108
+ };
109
+
110
+ _this.deleteItem = function (e, item) {
111
+ e.stopPropagation();
112
+ var source = _this.props.source;
113
+ var index = source.findIndex(function (src) {
114
+ return src.id === item.id;
115
+ });
116
+ source.splice(index, 1);
117
+
118
+ _this.setState({});
119
+
120
+ (0, _coreUtil.renderPreview)();
121
+
122
+ _this.props.reRender();
123
+ };
124
+
125
+ _this.renderCard = function (src) {
126
+ return /*#__PURE__*/_react["default"].createElement("div", {
127
+ className: "card_wrap"
128
+ }, /*#__PURE__*/_react["default"].createElement("div", {
129
+ className: "name"
130
+ }, src.type));
131
+ };
132
+
133
+ return _this;
134
+ }
135
+
136
+ GroupList.prototype.render = function () {
137
+ var _this = this;
138
+
139
+ var _a = this.props,
140
+ source = _a.source,
141
+ onClickItem = _a.onClickItem;
142
+ var dragId = this.state.dragId;
143
+ return /*#__PURE__*/_react["default"].createElement("div", {
144
+ className: "group_list"
145
+ }, source.length > 0 && source.map(function (src, index) {
146
+ return /*#__PURE__*/_react["default"].createElement("div", {
147
+ key: "card" + src.id,
148
+ className: "group_item",
149
+ "data-nodeid": src.id,
150
+ draggable: "true",
151
+ id: "card" + src.id,
152
+ onClick: function onClick() {
153
+ return onClickItem(src);
154
+ },
155
+ onDragEnd: _this.onDragEnd,
156
+ onDragEnter: _this.onDragEnter,
157
+ onDragOver: function onDragOver(e) {
158
+ e.preventDefault();
159
+ },
160
+ onDragStart: _this.onDragStart,
161
+ style: {
162
+ opacity: src.id === dragId ? '0.4' : '1'
163
+ }
164
+ }, /*#__PURE__*/_react["default"].createElement("div", {
165
+ className: "left"
166
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
167
+ className: "drag-icon",
168
+ color: "#C4C4C4",
169
+ size: "20px",
170
+ type: "icon-drag"
171
+ }), /*#__PURE__*/_react["default"].createElement("span", {
172
+ className: "middle_info ml8"
173
+ }, _this.renderCard(src, index))), /*#__PURE__*/_react["default"].createElement("div", {
174
+ className: "right"
175
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
176
+ className: "icon_copy",
177
+ color: "#232F46",
178
+ onClick: function onClick(e) {
179
+ return _this.copyItem(e, src);
180
+ },
181
+ size: "20px",
182
+ type: "icon-copy"
183
+ }), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
184
+ className: "icon_delete",
185
+ color: "#FF4141",
186
+ onClick: function onClick(e) {
187
+ return _this.deleteItem(e, src);
188
+ },
189
+ size: "20px",
190
+ type: "icon-delete1"
191
+ })));
192
+ }));
193
+ };
194
+
195
+ GroupList.defaultProps = {
196
+ source: [],
197
+ onClickItem: function onClickItem() {}
198
+ };
199
+ return GroupList;
200
+ }(_react["default"].Component);
201
+
202
+ var _default = GroupList;
203
+ exports["default"] = _default;
@@ -0,0 +1,72 @@
1
+ .group_list {
2
+ margin-bottom: 12px;
3
+
4
+ .group_item {
5
+ position: relative;
6
+ display: flex;
7
+ padding: 12px;
8
+ border-radius: 8px;
9
+ justify-content: space-between;
10
+ cursor: move;
11
+
12
+ &::after {
13
+ content: ' ';
14
+ position: absolute;
15
+ bottom: 0;
16
+ right: 0;
17
+ left: 0;
18
+ height: 1px;
19
+ background-color: #EDF0F4;
20
+ }
21
+
22
+ .left {
23
+ display: flex;
24
+ align-items: center;
25
+
26
+ .middle_info {
27
+ width: 260px;
28
+
29
+ .card_wrap {
30
+ display: flex;
31
+ align-items: center;
32
+ height: 40px;
33
+
34
+ img {
35
+ height: 40px;
36
+ width: 40px;
37
+ border-radius: 8px;
38
+ object-fit: cover;
39
+ background-color: #EDF0F4;
40
+ }
41
+
42
+ .name {
43
+ margin-left: 8px;
44
+ font-family: 'Open Sans';
45
+ font-style: normal;
46
+ font-weight: 600;
47
+ font-size: 16px;
48
+ line-height: 24px;
49
+ color: #232F46;
50
+ overflow: hidden;
51
+ text-overflow: ellipsis;
52
+ white-space: nowrap;
53
+ p {
54
+ margin-bottom: 0;
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+
62
+ &:hover {
63
+ background-color: #E9F0FF;
64
+
65
+ .left {
66
+ .middle_info {
67
+ width: 200px;
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,142 @@
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 _Button = _interopRequireDefault(require("../../../../../common/Button"));
13
+
14
+ var _coreUtil = require("../../../../../utils/coreUtil");
15
+
16
+ var _decorator = require("../../../../../decorator");
17
+
18
+ var _defaultJSON = require("../../../components/HeadNavigation/defaultJSON");
19
+
20
+ var _locale = require("../../../../../locale");
21
+
22
+ var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
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 = 'error';
65
+
66
+ var MenuNavConfigImageGroup =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(MenuNavConfigImageGroup, _super);
70
+
71
+ function MenuNavConfigImageGroup() {
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.reRender = function () {
83
+ (0, _coreUtil.renderPreview)();
84
+
85
+ _this.setState({});
86
+ };
87
+
88
+ _this.onAddClick = function () {
89
+ var json = (0, _defaultJSON.groupSourceHeadJSON)();
90
+
91
+ _this.props.source.push(json);
92
+
93
+ _this.setState({});
94
+
95
+ (0, _coreUtil.renderPreview)();
96
+ };
97
+
98
+ _this.renderCard = function (src) {
99
+ return /*#__PURE__*/_react["default"].createElement("div", {
100
+ className: "card_wrap"
101
+ }, /*#__PURE__*/_react["default"].createElement("div", {
102
+ className: "name"
103
+ }, src.type));
104
+ };
105
+
106
+ return _this;
107
+ }
108
+
109
+ MenuNavConfigImageGroup.prototype.render = function () {
110
+ var _this = this;
111
+
112
+ var _a = this.props.source,
113
+ source = _a === void 0 ? [] : _a;
114
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
115
+ className: "node_list"
116
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
117
+ className: "notice"
118
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
119
+ onClickItem: this.onClickItem,
120
+ renderCard: function renderCard(v) {
121
+ return _this.renderCard(v);
122
+ },
123
+ reRender: this.reRender,
124
+ source: source
125
+ })), /*#__PURE__*/_react["default"].createElement("div", {
126
+ className: "btn_wrap"
127
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
128
+ icon: "icon-add",
129
+ onClick: this.onAddClick,
130
+ type: "primary"
131
+ }, (0, _locale.i18n)('ADD_MENU'))));
132
+ };
133
+
134
+ MenuNavConfigImageGroup.defaultProps = {
135
+ source: []
136
+ };
137
+ MenuNavConfigImageGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], MenuNavConfigImageGroup);
138
+ return MenuNavConfigImageGroup;
139
+ }(_react["default"].Component);
140
+
141
+ var _default = MenuNavConfigImageGroup;
142
+ exports["default"] = _default;
@@ -0,0 +1,123 @@
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 _antd = require("antd");
11
+
12
+ var _HeadNavConfigImageGroup = _interopRequireDefault(require("./HeadNavConfigImageGroup"));
13
+
14
+ var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
15
+
16
+ var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
17
+
18
+ var _locale = require("../../../../locale");
19
+
20
+ var _coreUtil = require("../../../../utils/coreUtil");
21
+
22
+ var _common = require("../../../../common");
23
+
24
+ require("./index.less");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": 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 HeadNavConfigImageGroup =
55
+ /** @class */
56
+ function (_super) {
57
+ __extends(HeadNavConfigImageGroup, _super);
58
+
59
+ function HeadNavConfigImageGroup() {
60
+ var _this = _super !== null && _super.apply(this, arguments) || this;
61
+
62
+ _this.selfRender = function () {
63
+ (0, _coreUtil.renderPreview)();
64
+
65
+ _this.setState({});
66
+ };
67
+
68
+ _this.getDisplayPage = function () {
69
+ var data = _this.props.data;
70
+ return /*#__PURE__*/_react["default"].createElement(_common.Field, null, data.displayPage.map(function (one) {
71
+ return /*#__PURE__*/_react["default"].createElement("div", {
72
+ key: one.name,
73
+ className: "head-navigation-display-wrap"
74
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Checkbox, {
75
+ checked: one.state,
76
+ onChange: function onChange(e) {
77
+ one.state = e.target.checked;
78
+
79
+ _this.selfRender();
80
+ }
81
+ }, one.name));
82
+ }));
83
+ };
84
+
85
+ return _this;
86
+ }
87
+
88
+ HeadNavConfigImageGroup.prototype.render = function () {
89
+ var data = this.props.data;
90
+ return /*#__PURE__*/_react["default"].createElement("div", {
91
+ className: "head-navigation-config"
92
+ }, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
93
+ divider: "bold",
94
+ headerSize: "large",
95
+ source: [{
96
+ key: 'headNavigation1',
97
+ name: (0, _locale.i18n)('GROUP'),
98
+ value: /*#__PURE__*/_react["default"].createElement(_HeadNavConfigImageGroup["default"], {
99
+ source: data.groupSource
100
+ })
101
+ }, {
102
+ key: 'headNavigation3',
103
+ name: (0, _locale.i18n)('DISPLAY_PAGE'),
104
+ value: this.getDisplayPage()
105
+ }, {
106
+ key: 'headNavigation2',
107
+ name: (0, _locale.i18n)('BACKGROUND'),
108
+ value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
109
+ data: data.background
110
+ })
111
+ }],
112
+ type: "triangle"
113
+ }));
114
+ };
115
+
116
+ HeadNavConfigImageGroup.defaultProps = {
117
+ data: {}
118
+ };
119
+ return HeadNavConfigImageGroup;
120
+ }(_react["default"].Component);
121
+
122
+ var _default = HeadNavConfigImageGroup;
123
+ exports["default"] = _default;