@fonixtree/magic-design 1.0.175 → 1.0.178

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 (55) hide show
  1. package/es/composite-comp/dito/components/PersonalInformationSecond/defaultJSON.js +168 -0
  2. package/es/composite-comp/dito/components/PersonalInformationSecond/index.js +84 -0
  3. package/es/composite-comp/dito/components/PersonalInformationSecond/mobile/images/avatar.png +0 -0
  4. package/es/composite-comp/dito/components/PersonalInformationSecond/mobile/index.js +710 -0
  5. package/es/composite-comp/dito/components/PersonalInformationSecond/mobile/index.less +196 -0
  6. package/es/composite-comp/dito/components/SearchBanner/defaultJSON.js +4 -0
  7. package/es/composite-comp/dito/components/SearchBanner/mobile/index.js +17 -5
  8. package/es/composite-comp/dito/components/SearchBanner/mobile/index.less +0 -2
  9. package/es/composite-comp/dito/components/SlideImage/defaultJSON.js +22 -28
  10. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/ConfigDecoration/index.js +91 -0
  11. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/ConfigDecoration/index.less +9 -0
  12. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/OrdersConfigGroup/index.js +131 -0
  13. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/PersonInfoConfigGroup/index.js +131 -0
  14. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/index.js +127 -0
  15. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.js +21 -5
  16. package/es/composite-comp/dito/config-panels/SlideImageConfig/index.js +19 -1
  17. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondSecondConfig/index.js +206 -0
  18. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondSecondConfig/index.less +9 -0
  19. package/es/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +14 -0
  20. package/es/constants/component-types.js +10 -4
  21. package/es/constants/index.js +4 -0
  22. package/es/core/Designer/ConfigPanel/index.js +1 -0
  23. package/es/decorator/compositeDecorator.js +1 -1
  24. package/es/locale/en/en.json +1 -0
  25. package/es/locale/es/es.json +1 -0
  26. package/es/locale/id/id.json +1 -0
  27. package/es/meta-comp/config-panels/ImageConfig/index.js +24 -16
  28. package/lib/composite-comp/dito/components/PersonalInformationSecond/defaultJSON.js +168 -0
  29. package/lib/composite-comp/dito/components/PersonalInformationSecond/index.js +84 -0
  30. package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/images/avatar.png +0 -0
  31. package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/index.js +710 -0
  32. package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/index.less +196 -0
  33. package/lib/composite-comp/dito/components/SearchBanner/defaultJSON.js +4 -0
  34. package/lib/composite-comp/dito/components/SearchBanner/mobile/index.js +17 -5
  35. package/lib/composite-comp/dito/components/SearchBanner/mobile/index.less +0 -2
  36. package/lib/composite-comp/dito/components/SlideImage/defaultJSON.js +22 -28
  37. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/ConfigDecoration/index.js +91 -0
  38. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/ConfigDecoration/index.less +9 -0
  39. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/OrdersConfigGroup/index.js +131 -0
  40. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/PersonInfoConfigGroup/index.js +131 -0
  41. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/index.js +127 -0
  42. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.js +21 -5
  43. package/lib/composite-comp/dito/config-panels/SlideImageConfig/index.js +19 -1
  44. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondSecondConfig/index.js +206 -0
  45. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondSecondConfig/index.less +9 -0
  46. package/lib/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +14 -0
  47. package/lib/constants/component-types.js +10 -4
  48. package/lib/constants/index.js +4 -0
  49. package/lib/core/Designer/ConfigPanel/index.js +1 -0
  50. package/lib/decorator/compositeDecorator.js +1 -1
  51. package/lib/locale/en/en.json +1 -0
  52. package/lib/locale/es/es.json +1 -0
  53. package/lib/locale/id/id.json +1 -0
  54. package/lib/meta-comp/config-panels/ImageConfig/index.js +24 -16
  55. package/package.json +1 -1
@@ -0,0 +1,196 @@
1
+ .personal-information-second-mobile {
2
+ padding: 0.32rem 0.32rem;
3
+ box-sizing: border-box;
4
+ }
5
+ .personal-information-second-mobile .top {
6
+ display: flex;
7
+ justify-content: space-between;
8
+ align-items: center;
9
+ }
10
+ .personal-information-second-mobile .top .pInfoWrap {
11
+ display: flex;
12
+ align-items: center;
13
+ }
14
+ .personal-information-second-mobile .top .pInfoWrap .photoWrap {
15
+ position: relative;
16
+ display: inline-block;
17
+ vertical-align: middle;
18
+ margin-right: 0.32rem;
19
+ height: 0.88rem;
20
+ width: 0.88rem;
21
+ }
22
+ .personal-information-second-mobile .top .pInfoWrap .photoWrap > input {
23
+ position: absolute;
24
+ z-index: 1;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ opacity: 0;
30
+ }
31
+ .personal-information-second-mobile .top .pInfoWrap .photoWrap .decorationIcon {
32
+ position: absolute;
33
+ z-index: 1;
34
+ width: 1.4rem;
35
+ height: 1.4rem;
36
+ left: -0.26rem;
37
+ top: -0.26rem;
38
+ }
39
+ .personal-information-second-mobile .top .pInfoWrap .userInfo {
40
+ display: inline-block;
41
+ vertical-align: middle;
42
+ }
43
+ .personal-information-second-mobile .top .pInfoWrap .userInfo p {
44
+ margin: 0;
45
+ }
46
+ .personal-information-second-mobile .top .pInfoWrap .userInfo .name {
47
+ font-family: Montserrat;
48
+ font-size: 0.28rem;
49
+ font-weight: 600;
50
+ color: #3E3E3E;
51
+ max-width: 2.96rem;
52
+ white-space: nowrap;
53
+ text-overflow: ellipsis;
54
+ overflow: hidden;
55
+ word-break: break-all;
56
+ }
57
+ .personal-information-second-mobile .top .pInfoWrap .userInfo .wishlist,
58
+ .personal-information-second-mobile .top .pInfoWrap .userInfo .following {
59
+ color: #3E3E3E;
60
+ font-family: Montserrat;
61
+ font-size: 0.16rem;
62
+ font-style: normal;
63
+ font-weight: 600;
64
+ line-height: 0.36rem;
65
+ }
66
+ .personal-information-second-mobile .top .pInfoWrap .userInfo .wishlist span,
67
+ .personal-information-second-mobile .top .pInfoWrap .userInfo .following span {
68
+ font-size: 0.2rem;
69
+ }
70
+ .personal-information-second-mobile .top .pInfoWrap .userInfo .wishlist {
71
+ margin-right: 0.16rem;
72
+ }
73
+ .personal-information-second-mobile .top .pInfoWrap .userInfo .following {
74
+ margin-left: 0.16rem;
75
+ }
76
+ .personal-information-second-mobile .top .pInfoWrap .photo {
77
+ display: inline-block;
78
+ width: 0.88rem;
79
+ height: 0.88rem;
80
+ line-height: 1.2rem;
81
+ text-align: center;
82
+ border-radius: 50%;
83
+ }
84
+ .personal-information-second-mobile .top .pInfoWrap .btnLogin {
85
+ font-size: 0.32rem;
86
+ font-weight: 600;
87
+ color: #3E3E3E;
88
+ font-family: Montserrat;
89
+ }
90
+ .personal-information-second-mobile .top .btnGroup .iconWrap {
91
+ display: inline-block;
92
+ margin-left: 0.3rem;
93
+ position: relative;
94
+ }
95
+ .personal-information-second-mobile .top .btnGroup .num {
96
+ position: absolute;
97
+ top: -0.04rem;
98
+ left: 0.28rem;
99
+ display: inline-block;
100
+ padding: 0 0.08rem;
101
+ border-radius: 50%;
102
+ text-align: center;
103
+ min-width: 0.32rem;
104
+ height: 0.32rem;
105
+ line-height: 0.32rem;
106
+ background: #ce1126;
107
+ font-size: 0.12rem;
108
+ color: #ffffff;
109
+ }
110
+ .personal-information-second-mobile .orders {
111
+ margin-top: 0.32rem;
112
+ }
113
+ .personal-information-second-mobile .orders .fixed-wrap {
114
+ display: flex;
115
+ flex-direction: column;
116
+ background-color: #fff;
117
+ box-shadow: 0 0.06rem 0.12rem rgba(0, 0, 0, 0.16);
118
+ border-radius: 0.32rem;
119
+ width: auto;
120
+ padding: 0.24rem 0.32rem;
121
+ }
122
+ .personal-information-second-mobile .orders .fixed-wrap .top {
123
+ display: flex;
124
+ flex-direction: row;
125
+ justify-content: space-between;
126
+ font-weight: 600;
127
+ line-height: 0.36rem;
128
+ color: var(--font-color);
129
+ }
130
+ .personal-information-second-mobile .orders .fixed-wrap .top .title {
131
+ font-size: 0.28rem;
132
+ font-weight: 700;
133
+ color: #3E3E3E;
134
+ }
135
+ .personal-information-second-mobile .orders .fixed-wrap .top .btn-wrap {
136
+ display: flex;
137
+ flex-direction: row;
138
+ justify-content: center;
139
+ align-items: center;
140
+ }
141
+ .personal-information-second-mobile .orders .fixed-wrap .top .btn-wrap .text {
142
+ font-size: 0.2rem;
143
+ color: #0038A7;
144
+ font-weight: 600;
145
+ margin-right: 0.08rem;
146
+ }
147
+ .personal-information-second-mobile .orders .fixed-wrap .list {
148
+ display: flex;
149
+ flex-direction: row;
150
+ justify-content: space-between;
151
+ height: 1.04rem;
152
+ margin-top: 0.36rem;
153
+ margin-bottom: 0.02rem;
154
+ }
155
+ .personal-information-second-mobile .orders .fixed-wrap .list .item {
156
+ display: flex;
157
+ flex: 1 1;
158
+ }
159
+ .personal-information-second-mobile .orders .fixed-wrap .list .item .content-wrap {
160
+ width: 100%;
161
+ display: flex;
162
+ flex-direction: column;
163
+ justify-content: center;
164
+ align-items: center;
165
+ }
166
+ .personal-information-second-mobile .orders .fixed-wrap .list .item .img-wrap {
167
+ position: relative;
168
+ display: flex;
169
+ margin-bottom: 0.16rem;
170
+ width: 0.72rem;
171
+ height: 0.72rem;
172
+ }
173
+ .personal-information-second-mobile .orders .fixed-wrap .list .item .img-wrap .pot {
174
+ display: inline-block;
175
+ padding: 0 0.08rem;
176
+ background: #3360B9;
177
+ border: 0.02rem solid #fff;
178
+ font-size: 0.16rem;
179
+ text-align: center;
180
+ color: #fff;
181
+ position: absolute;
182
+ top: -0.04rem;
183
+ left: 0.4rem;
184
+ min-width: 0.32rem;
185
+ height: 0.32rem;
186
+ border-radius: 50%;
187
+ line-height: 0.28rem;
188
+ }
189
+ .personal-information-second-mobile .orders .fixed-wrap .list .item .title {
190
+ height: 0.44rem;
191
+ font-size: 0.2rem;
192
+ font-weight: 600;
193
+ line-height: 0.22rem;
194
+ color: #3E3E3E;
195
+ text-align: center;
196
+ }
@@ -73,6 +73,10 @@ var getDefaultJSON = function getDefaultJSON() {
73
73
  backgroundColor: {
74
74
  pc: 'transparent',
75
75
  mobile: 'transparent'
76
+ },
77
+ iconColor: {
78
+ pc: '#fff',
79
+ mobile: '#fff'
76
80
  }
77
81
  },
78
82
  cartIcon: {
@@ -167,18 +167,30 @@ function (_super) {
167
167
  backgroundColor: (_e = (_d = data.content.box) === null || _d === void 0 ? void 0 : _d.backgroundColor) === null || _e === void 0 ? void 0 : _e.mobile
168
168
  }
169
169
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
170
- color: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.color) === null || _g === void 0 ? void 0 : _g.mobile,
170
+ color: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.iconColor) === null || _g === void 0 ? void 0 : _g.mobile,
171
171
  size: (0, _commonUtil.convertToRem)(20),
172
172
  type: "icon-search2"
173
173
  })), data.content && ((_h = data.content.cartIcon) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
174
174
  className: "right-icon",
175
- data: data.content.cartIcon
175
+ data: data.content.cartIcon,
176
+ style: {
177
+ width: '25px',
178
+ height: '25px'
179
+ }
176
180
  }), data.content && ((_j = data.content.chatbotIcon) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
177
181
  className: "right-icon",
178
- data: data.content.chatbotIcon
182
+ data: data.content.chatbotIcon,
183
+ style: {
184
+ width: '32px',
185
+ height: '32px'
186
+ }
179
187
  }), data.content && ((_k = data.content.messageIcon) === null || _k === void 0 ? void 0 : _k.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
180
188
  className: "right-icon",
181
- data: data.content.messageIcon
189
+ data: data.content.messageIcon,
190
+ style: {
191
+ width: '25px',
192
+ height: '25px'
193
+ }
182
194
  })), data.content && ((_l = data.content.logo) === null || _l === void 0 ? void 0 : _l.open) && /*#__PURE__*/_react["default"].createElement("div", {
183
195
  className: "logo",
184
196
  onClick: function onClick() {
@@ -196,7 +208,7 @@ function (_super) {
196
208
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
197
209
  data: data.content.logo,
198
210
  style: {
199
- height: 20
211
+ height: 23
200
212
  }
201
213
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
202
214
  ref: this.carouselRef,
@@ -34,8 +34,6 @@
34
34
  .m-search-banner-mobile .search-bar .right .right-icon {
35
35
  margin-left: 0.2rem;
36
36
  display: inline-block;
37
- width: 0.5rem;
38
- height: 0.5rem;
39
37
  }
40
38
  .m-search-banner-mobile .search-bar .logo img {
41
39
  width: auto;
@@ -66,13 +66,7 @@ var groupSourceJSON = function groupSourceJSON(parentId) {
66
66
  },
67
67
  vertical: {}
68
68
  },
69
- clickUrl: '',
70
- background: {
71
- opacity: 100,
72
- color: '#fff',
73
- image: '',
74
- bgType: 'image'
75
- }
69
+ clickUrl: ''
76
70
  };
77
71
  };
78
72
 
@@ -83,27 +77,27 @@ var getDefaultJSON = function getDefaultJSON() {
83
77
  return {
84
78
  id: groupId,
85
79
  type: 'SLIDE_IMAGE',
86
- content: {
87
- moveIcon: {
88
- id: (0, _uuid.v4)(),
89
- open: true,
90
- type: 'IMAGE',
91
- content: {
92
- h5Name: 'Image Name',
93
- pcName: 'Image Name',
94
- h5ImgSrc: '',
95
- pcImgSrc: '',
96
- clickUrl: ''
97
- },
98
- hover: {
99
- open: false,
100
- backgroundType: 'enlarge',
101
- magnification: 1.5,
102
- pcImgHoverUrl: '',
103
- h5ImgHoverUrl: ''
104
- }
105
- }
106
- },
80
+ // content: {
81
+ // moveIcon: {
82
+ // id: uuidv4(),
83
+ // open: true,
84
+ // type: 'IMAGE',
85
+ // content: {
86
+ // h5Name: 'Image Name',
87
+ // pcName: 'Image Name',
88
+ // h5ImgSrc: '',
89
+ // pcImgSrc: '',
90
+ // clickUrl: '',
91
+ // },
92
+ // hover: {
93
+ // open: false,
94
+ // backgroundType: 'enlarge',
95
+ // magnification: 1.5,
96
+ // pcImgHoverUrl: '',
97
+ // h5ImgHoverUrl: '',
98
+ // },
99
+ // },
100
+ // },
107
101
  groupSource: [groupSourceJSON(groupId), groupSourceJSON(groupId), groupSourceJSON(groupId)],
108
102
  spacing: {
109
103
  pc: {
@@ -0,0 +1,91 @@
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 _common = require("../../../../../common");
11
+
12
+ require("./index.less");
13
+
14
+ var _coreUtil = require("../../../../../utils/coreUtil");
15
+
16
+ var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
17
+
18
+ var _locale = require("../../../../../locale");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ var __extends = void 0 && (void 0).__extends || function () {
23
+ var _extendStatics = function extendStatics(d, b) {
24
+ _extendStatics = Object.setPrototypeOf || {
25
+ __proto__: []
26
+ } instanceof Array && function (d, b) {
27
+ d.__proto__ = b;
28
+ } || function (d, b) {
29
+ for (var p in b) {
30
+ if (b.hasOwnProperty(p)) d[p] = b[p];
31
+ }
32
+ };
33
+
34
+ return _extendStatics(d, b);
35
+ };
36
+
37
+ return function (d, b) {
38
+ _extendStatics(d, b);
39
+
40
+ function __() {
41
+ this.constructor = d;
42
+ }
43
+
44
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
+ };
46
+ }();
47
+
48
+ var ConfigDecoration =
49
+ /** @class */
50
+ function (_super) {
51
+ __extends(ConfigDecoration, _super);
52
+
53
+ function ConfigDecoration() {
54
+ var _this = _super !== null && _super.apply(this, arguments) || this;
55
+
56
+ _this.reRender = function () {
57
+ (0, _coreUtil.renderPreview)();
58
+
59
+ _this.setState({});
60
+ };
61
+
62
+ return _this;
63
+ }
64
+
65
+ ConfigDecoration.prototype.render = function () {
66
+ var data = this.props.data;
67
+ return /*#__PURE__*/_react["default"].createElement("div", {
68
+ className: "config_decoration"
69
+ }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
70
+ headerSize: "middle",
71
+ onRefresh: this.reRender,
72
+ source: [{
73
+ key: data.id,
74
+ name: (0, _locale.i18n)('FESTIVAL_DECORATION'),
75
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
76
+ data: data
77
+ }),
78
+ metaOption: data
79
+ }],
80
+ type: "switch"
81
+ }));
82
+ };
83
+
84
+ ConfigDecoration.defaultProps = {
85
+ data: {}
86
+ };
87
+ return ConfigDecoration;
88
+ }(_react["default"].Component);
89
+
90
+ var _default = ConfigDecoration;
91
+ exports["default"] = _default;
@@ -0,0 +1,9 @@
1
+ .carousel_setting {
2
+
3
+ .collapse_wrap {
4
+ .header_wrap {
5
+ font-weight: 600 !important;
6
+ }
7
+ }
8
+
9
+ }
@@ -0,0 +1,131 @@
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 _coreUtil = require("../../../../../utils/coreUtil");
15
+
16
+ var _defaultJSON = require("../../../components/PersonalInformation/defaultJSON");
17
+
18
+ var _Button = _interopRequireDefault(require("../../../../../common/Button"));
19
+
20
+ var _locale = require("../../../../../locale");
21
+
22
+ var _decorator = require("../../../../../decorator");
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 = 'Please add some Item';
65
+
66
+ var ImageTextConfigGroup =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(ImageTextConfigGroup, _super);
70
+
71
+ function ImageTextConfigGroup() {
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.OrdersGroupSourceJSON)();
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
+ return _this;
97
+ }
98
+
99
+ ImageTextConfigGroup.prototype.render = function () {
100
+ var _a = this.props,
101
+ source = _a.source,
102
+ maxNum = _a.maxNum;
103
+ return /*#__PURE__*/_react["default"].createElement("div", {
104
+ className: "banner_group"
105
+ }, /*#__PURE__*/_react["default"].createElement("div", {
106
+ className: "node_list"
107
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
108
+ className: "notice"
109
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
110
+ onClickItem: this.onClickItem,
111
+ reRender: this.reRender,
112
+ source: source
113
+ })), /*#__PURE__*/_react["default"].createElement("div", {
114
+ className: "btn_wrap"
115
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
116
+ disabled: source.length >= maxNum,
117
+ icon: "icon-add",
118
+ onClick: this.onAddClick,
119
+ type: "primary"
120
+ }, (0, _locale.i18n)('ADD'))));
121
+ };
122
+
123
+ ImageTextConfigGroup.defaultProps = {
124
+ source: []
125
+ };
126
+ ImageTextConfigGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], ImageTextConfigGroup);
127
+ return ImageTextConfigGroup;
128
+ }(_react["default"].Component);
129
+
130
+ var _default = ImageTextConfigGroup;
131
+ exports["default"] = _default;
@@ -0,0 +1,131 @@
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 _coreUtil = require("../../../../../utils/coreUtil");
15
+
16
+ var _Button = _interopRequireDefault(require("../../../../../common/Button"));
17
+
18
+ var _defaultJSON = require("../../../components/PersonalInformation/defaultJSON");
19
+
20
+ var _locale = require("../../../../../locale");
21
+
22
+ var _decorator = require("../../../../../decorator");
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 = 'Please add some Item';
65
+
66
+ var ConfigGroup =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(ConfigGroup, _super);
70
+
71
+ function ConfigGroup() {
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.PersonalInfoGroupSourceJSON)();
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
+ return _this;
97
+ }
98
+
99
+ ConfigGroup.prototype.render = function () {
100
+ var _a = this.props,
101
+ source = _a.source,
102
+ maxNum = _a.maxNum;
103
+ return /*#__PURE__*/_react["default"].createElement("div", {
104
+ className: "banner_group"
105
+ }, /*#__PURE__*/_react["default"].createElement("div", {
106
+ className: "node_list"
107
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
108
+ className: "notice"
109
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
110
+ onClickItem: this.onClickItem,
111
+ reRender: this.reRender,
112
+ source: source
113
+ })), /*#__PURE__*/_react["default"].createElement("div", {
114
+ className: "btn_wrap"
115
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
116
+ disabled: source.length >= maxNum,
117
+ icon: "icon-add",
118
+ onClick: this.onAddClick,
119
+ type: "primary"
120
+ }, (0, _locale.i18n)('ADD'))));
121
+ };
122
+
123
+ ConfigGroup.defaultProps = {
124
+ source: []
125
+ };
126
+ ConfigGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], ConfigGroup);
127
+ return ConfigGroup;
128
+ }(_react["default"].Component);
129
+
130
+ var _default = ConfigGroup;
131
+ exports["default"] = _default;