@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,23 @@
1
+ .head-navigation-config {
2
+ .head-navigation-display-wrap {
3
+ &+ .head-navigation-display-wrap {
4
+ margin-top: 20px;
5
+ }
6
+ .cylon-checkbox-wrapper {
7
+ display: flex;
8
+ flex-direction: row-reverse;
9
+ justify-content: space-between;
10
+ .cylon-checkbox-checked .cylon-checkbox-inner {
11
+ background-color: #2F54EB;
12
+ border-color: #2F54EB;
13
+ }
14
+ .cylon-checkbox + span {
15
+ flex: 1;
16
+ padding-left: 0;
17
+ color: #232F46;
18
+ font-size: 16px;
19
+ font-weight: 600;
20
+ }
21
+ }
22
+ }
23
+ }
@@ -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
+ }, source.length < 5 && /*#__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,137 @@
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 _GroupList = _interopRequireDefault(require("../GroupList"));
19
+
20
+ var _defaultJSON = require("../../../components/MenuNavigation/defaultJSON");
21
+
22
+ var _locale = require("../../../../../locale");
23
+
24
+ require("./index.less");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
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); }
29
+
30
+ var __extends = void 0 && (void 0).__extends || function () {
31
+ var _extendStatics = function extendStatics(d, b) {
32
+ _extendStatics = Object.setPrototypeOf || {
33
+ __proto__: []
34
+ } instanceof Array && function (d, b) {
35
+ d.__proto__ = b;
36
+ } || function (d, b) {
37
+ for (var p in b) {
38
+ if (b.hasOwnProperty(p)) d[p] = b[p];
39
+ }
40
+ };
41
+
42
+ return _extendStatics(d, b);
43
+ };
44
+
45
+ return function (d, b) {
46
+ _extendStatics(d, b);
47
+
48
+ function __() {
49
+ this.constructor = d;
50
+ }
51
+
52
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53
+ };
54
+ }();
55
+
56
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
57
+ var c = arguments.length,
58
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
59
+ d;
60
+ 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--) {
61
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
62
+ }
63
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
64
+ };
65
+
66
+ var notice = 'error';
67
+
68
+ var MenuNavConfigImageGroup =
69
+ /** @class */
70
+ function (_super) {
71
+ __extends(MenuNavConfigImageGroup, _super);
72
+
73
+ function MenuNavConfigImageGroup() {
74
+ var _this = _super !== null && _super.apply(this, arguments) || this;
75
+
76
+ _this.state = {};
77
+
78
+ _this.onClickItem = function (node) {
79
+ _this.props.store.setState({
80
+ clickedGroup: node.id
81
+ });
82
+ };
83
+
84
+ _this.reRender = function () {
85
+ (0, _coreUtil.renderPreview)();
86
+
87
+ _this.setState({});
88
+ };
89
+
90
+ _this.onAddClick = function () {
91
+ var _a = _this.props.source,
92
+ source = _a === void 0 ? [] : _a;
93
+ if (source.length > 4) return;
94
+ var json = (0, _defaultJSON.groupSourceMenuJSON)();
95
+
96
+ _this.props.source.push(json);
97
+
98
+ _this.setState({});
99
+
100
+ (0, _coreUtil.renderPreview)();
101
+ };
102
+
103
+ return _this;
104
+ }
105
+
106
+ MenuNavConfigImageGroup.prototype.render = function () {
107
+ var _a = this.props.source,
108
+ source = _a === void 0 ? [] : _a;
109
+ return /*#__PURE__*/_react["default"].createElement("div", {
110
+ className: "menu_navigation_source"
111
+ }, /*#__PURE__*/_react["default"].createElement("div", {
112
+ className: "node_list"
113
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
114
+ className: "notice"
115
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
116
+ onClickItem: this.onClickItem,
117
+ reRender: this.reRender,
118
+ source: source
119
+ })), /*#__PURE__*/_react["default"].createElement("div", {
120
+ className: "btn_wrap"
121
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
122
+ className: source.length === 5 ? 'unable-btn' : '',
123
+ icon: "icon-add",
124
+ onClick: this.onAddClick,
125
+ type: "primary"
126
+ }, (0, _locale.i18n)('ADD_MENU'))));
127
+ };
128
+
129
+ MenuNavConfigImageGroup.defaultProps = {
130
+ source: []
131
+ };
132
+ MenuNavConfigImageGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], MenuNavConfigImageGroup);
133
+ return MenuNavConfigImageGroup;
134
+ }(_react["default"].Component);
135
+
136
+ var _default = MenuNavConfigImageGroup;
137
+ exports["default"] = _default;
@@ -0,0 +1,6 @@
1
+ .menu_navigation_source .btn_wrap {
2
+ .unable-btn {
3
+ background: #EDF0F4;
4
+ color: #8493AF;
5
+ }
6
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = MenuNavigationConfig;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _MenuNavConfigImageGroup = _interopRequireDefault(require("./MenuNavConfigImageGroup"));
11
+
12
+ var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
13
+
14
+ var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
15
+
16
+ var _locale = require("../../../../locale");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ function MenuNavigationConfig(props) {
21
+ var data = props.data;
22
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
23
+ divider: "bold",
24
+ headerSize: "large",
25
+ source: [{
26
+ key: 'menuNavigation1',
27
+ name: (0, _locale.i18n)('GROUP'),
28
+ value: /*#__PURE__*/_react["default"].createElement(_MenuNavConfigImageGroup["default"], {
29
+ source: data.groupSource
30
+ })
31
+ }, {
32
+ key: 'menuNavigation2',
33
+ name: (0, _locale.i18n)('BACKGROUND'),
34
+ value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
35
+ data: data.background
36
+ })
37
+ }],
38
+ type: "triangle"
39
+ }));
40
+ }
@@ -0,0 +1,127 @@
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 _locale = require("../../../../locale");
13
+
14
+ var _common = require("../../../../common");
15
+
16
+ var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
17
+
18
+ var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/BaseConfig"));
19
+
20
+ var _coreUtil = require("../../../../utils/coreUtil");
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": 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 WalletSecondConfig =
51
+ /** @class */
52
+ function (_super) {
53
+ __extends(WalletSecondConfig, _super);
54
+
55
+ function WalletSecondConfig() {
56
+ var _this = _super !== null && _super.apply(this, arguments) || this;
57
+
58
+ _this.state = {};
59
+
60
+ _this.reRender = function () {
61
+ (0, _coreUtil.renderPreview)();
62
+
63
+ _this.setState({});
64
+ };
65
+
66
+ _this.getContentPanel = function () {
67
+ var panelProps = _this.props.panelProps;
68
+ var defaultSource = [{
69
+ key: panelProps.image.id,
70
+ name: (0, _locale.i18n)('IMAGE'),
71
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
72
+ data: panelProps.image,
73
+ needHover: false,
74
+ onlySpecificCode: "FunctionPage"
75
+ }),
76
+ metaOption: panelProps.image
77
+ }];
78
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
79
+ title: (0, _locale.i18n)('NAME')
80
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
81
+ className: "inputStyle",
82
+ onChange: function onChange(e) {
83
+ panelProps.type = e.target.value;
84
+
85
+ _this.setState({});
86
+ },
87
+ placeholder: (0, _locale.i18n)('PLEASE_INPUT'),
88
+ size: "middle",
89
+ value: panelProps.type
90
+ })), /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
91
+ divider: "dashed",
92
+ headerSize: "middle",
93
+ onRefresh: function onRefresh() {
94
+ return (0, _coreUtil.renderPreview)();
95
+ },
96
+ showActiveColor: true,
97
+ source: defaultSource,
98
+ type: "switch"
99
+ }));
100
+ };
101
+
102
+ return _this;
103
+ }
104
+
105
+ WalletSecondConfig.prototype.render = function () {
106
+ var panelProps = this.props.panelProps;
107
+ return /*#__PURE__*/_react["default"].createElement("div", {
108
+ className: "Wallet_second_conf_wrap"
109
+ }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
110
+ divider: "bold",
111
+ headerSize: "large",
112
+ source: [{
113
+ key: panelProps.id || 'walletNuriContent',
114
+ name: (0, _locale.i18n)('CONTENT'),
115
+ value: this.getContentPanel()
116
+ }]
117
+ }));
118
+ };
119
+
120
+ WalletSecondConfig.defaultProps = {
121
+ panelProps: {}
122
+ };
123
+ return WalletSecondConfig;
124
+ }(_BaseConfig["default"]);
125
+
126
+ var _default = WalletSecondConfig;
127
+ exports["default"] = _default;