@fonixtree/magic-design 0.0.37 → 0.0.39

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 (96) hide show
  1. package/README.md +320 -0
  2. package/es/assets/fonts/magic-box-iconfont.css +11 -3
  3. package/es/assets/fonts/magic-box-iconfont.css.bak +11 -3
  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-newline.png +0 -0
  10. package/es/assets/images/layout-icon/layout-navigation-tile.png +0 -0
  11. package/es/common/FontStyles/index.js +25 -6
  12. package/es/common/ProductSource/index.less +2 -0
  13. package/es/composite-comp/common/components/ProductItem/index.js +23 -5
  14. package/es/composite-comp/common/components/ProductItem/index.less +46 -11
  15. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +21 -4
  16. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +6 -0
  17. package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +94 -0
  18. package/es/composite-comp/dito/components/MobileNavigation/index.js +84 -0
  19. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +129 -0
  20. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +292 -0
  21. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +95 -15
  22. package/es/composite-comp/dito/components/Recommend/index.js +10 -1
  23. package/es/composite-comp/dito/components/Recommend/mobile/index.js +214 -77
  24. package/es/composite-comp/dito/components/Recommend/mobile/index.less +28 -27
  25. package/es/composite-comp/dito/components/Recommend/pc/imgs/defImg1.png +0 -0
  26. package/es/composite-comp/dito/components/Recommend/pc/imgs/defImg2.png +0 -0
  27. package/es/composite-comp/dito/components/Recommend/pc/imgs/defImg3.png +0 -0
  28. package/es/composite-comp/dito/components/Recommend/pc/index.js +653 -0
  29. package/es/composite-comp/dito/components/Recommend/pc/index.less +80 -0
  30. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +187 -4
  31. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +20 -20
  32. package/es/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +126 -0
  33. package/es/composite-comp/dito/config-panels/MobileNavigationConfig/index.js +184 -0
  34. package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +115 -44
  35. package/es/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +111 -0
  36. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -3
  37. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +89 -59
  38. package/es/constants/component-types.js +9 -3
  39. package/es/constants/index.js +5 -1
  40. package/es/constants/layout.js +31 -3
  41. package/es/core/Designer/ConfigPanel/index.js +5 -1
  42. package/es/locale/en/en.json +8 -1
  43. package/es/locale/es/es.json +12 -4
  44. package/es/locale/id/id.json +8 -1
  45. package/es/meta-comp/components/Button/index.less +1 -0
  46. package/es/meta-comp/components/Image/image/defalut-img.png +0 -0
  47. package/es/meta-comp/config-panels/TextConfig/index.js +1 -0
  48. package/lib/assets/fonts/magic-box-iconfont.css +11 -3
  49. package/lib/assets/fonts/magic-box-iconfont.css.bak +11 -3
  50. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  51. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  52. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  53. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  54. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  55. package/lib/assets/images/layout-icon/layout-navigation-newline.png +0 -0
  56. package/lib/assets/images/layout-icon/layout-navigation-tile.png +0 -0
  57. package/lib/common/FontStyles/index.js +25 -6
  58. package/lib/common/ProductSource/index.less +2 -0
  59. package/lib/composite-comp/common/components/ProductItem/index.js +23 -5
  60. package/lib/composite-comp/common/components/ProductItem/index.less +46 -11
  61. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +21 -4
  62. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +6 -0
  63. package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +94 -0
  64. package/lib/composite-comp/dito/components/MobileNavigation/index.js +84 -0
  65. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +129 -0
  66. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +292 -0
  67. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +95 -15
  68. package/lib/composite-comp/dito/components/Recommend/index.js +10 -1
  69. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +214 -77
  70. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +28 -27
  71. package/lib/composite-comp/dito/components/Recommend/pc/imgs/defImg1.png +0 -0
  72. package/lib/composite-comp/dito/components/Recommend/pc/imgs/defImg2.png +0 -0
  73. package/lib/composite-comp/dito/components/Recommend/pc/imgs/defImg3.png +0 -0
  74. package/lib/composite-comp/dito/components/Recommend/pc/index.js +653 -0
  75. package/lib/composite-comp/dito/components/Recommend/pc/index.less +80 -0
  76. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +187 -4
  77. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +20 -20
  78. package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +126 -0
  79. package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/index.js +184 -0
  80. package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +115 -44
  81. package/lib/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +111 -0
  82. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -3
  83. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +89 -59
  84. package/lib/constants/component-types.js +9 -3
  85. package/lib/constants/index.js +5 -1
  86. package/lib/constants/layout.js +31 -3
  87. package/lib/core/Designer/ConfigPanel/index.js +5 -1
  88. package/lib/locale/en/en.json +8 -1
  89. package/lib/locale/es/es.json +12 -4
  90. package/lib/locale/id/id.json +8 -1
  91. package/lib/meta-comp/components/Button/index.less +1 -0
  92. package/lib/meta-comp/components/Image/image/defalut-img.png +0 -0
  93. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -0
  94. package/package.json +86 -1
  95. package/es/composite-comp/dito/config-panels/RecommendConfig/imgs/layout1.png +0 -0
  96. package/lib/composite-comp/dito/config-panels/RecommendConfig/imgs/layout1.png +0 -0
@@ -0,0 +1,80 @@
1
+ .m-recommend-pc {
2
+ display: flex;
3
+ flex-direction: column;
4
+
5
+ .ant-tabs-nav-operations {
6
+ display: none !important;
7
+ }
8
+
9
+ ::-webkit-scrollbar {
10
+ width: 0;
11
+ height: 0;
12
+ display: none;
13
+ }
14
+
15
+
16
+ .tab-select-wrap {
17
+ display: flex;
18
+ align-items: center;
19
+ height: 50px;
20
+ background: rgb(255 255 255);
21
+ overflow: auto;
22
+ position: relative;
23
+ margin-bottom: 15px;
24
+
25
+ .tabTitle {
26
+ display: flex;
27
+ align-items: center;
28
+ padding: 0 24px;
29
+ height: 100%;
30
+ justify-content: center;
31
+ white-space: nowrap;
32
+ flex-direction: column;
33
+
34
+ img {
35
+ height: 16px;
36
+ width: 16px;
37
+ margin-bottom: 2px;
38
+ }
39
+ }
40
+
41
+ .active-line {
42
+ position: absolute;
43
+ bottom: 0;
44
+ width: 200px;
45
+ height: 3px;
46
+ background-color: #fff;
47
+ transition: .2s all linear;
48
+ border-radius: 1.5px;
49
+ }
50
+ }
51
+
52
+ .macyContainer {
53
+ display: flex;
54
+ margin: 0 16px;
55
+ }
56
+
57
+ .scrollContainer {
58
+ display: flex;
59
+ flex-direction: row;
60
+ align-items: center;
61
+ margin: 0 16px;
62
+ overflow-x: auto;
63
+ padding-bottom: 15px;
64
+
65
+ &.pl_100 {
66
+ padding-left: 100px;
67
+ }
68
+
69
+ .productCard {
70
+ margin-right: 12px;
71
+ }
72
+ }
73
+
74
+ .btnSeeAll {
75
+ display: block;
76
+ width: fit-content;
77
+ min-width: 80px;
78
+ margin: 0 auto;
79
+ }
80
+ }
@@ -15,6 +15,8 @@ var _common = require("../../../../../common");
15
15
 
16
16
  var _coreUtil = require("../../../../../utils/coreUtil");
17
17
 
18
+ var _commonUtil = require("../../../../../utils/commonUtil");
19
+
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
21
 
20
22
  var __extends = void 0 && (void 0).__extends || function () {
@@ -43,18 +45,195 @@ var __extends = void 0 && (void 0).__extends || function () {
43
45
  };
44
46
  }();
45
47
 
48
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
49
+ function adopt(value) {
50
+ return value instanceof P ? value : new P(function (resolve) {
51
+ resolve(value);
52
+ });
53
+ }
54
+
55
+ return new (P || (P = Promise))(function (resolve, reject) {
56
+ function fulfilled(value) {
57
+ try {
58
+ step(generator.next(value));
59
+ } catch (e) {
60
+ reject(e);
61
+ }
62
+ }
63
+
64
+ function rejected(value) {
65
+ try {
66
+ step(generator["throw"](value));
67
+ } catch (e) {
68
+ reject(e);
69
+ }
70
+ }
71
+
72
+ function step(result) {
73
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
74
+ }
75
+
76
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
77
+ });
78
+ };
79
+
80
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
81
+ var _ = {
82
+ label: 0,
83
+ sent: function sent() {
84
+ if (t[0] & 1) throw t[1];
85
+ return t[1];
86
+ },
87
+ trys: [],
88
+ ops: []
89
+ },
90
+ f,
91
+ y,
92
+ t,
93
+ g;
94
+ return g = {
95
+ next: verb(0),
96
+ "throw": verb(1),
97
+ "return": verb(2)
98
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
99
+ return this;
100
+ }), g;
101
+
102
+ function verb(n) {
103
+ return function (v) {
104
+ return step([n, v]);
105
+ };
106
+ }
107
+
108
+ function step(op) {
109
+ if (f) throw new TypeError("Generator is already executing.");
110
+
111
+ while (_) {
112
+ try {
113
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
114
+ if (y = 0, t) op = [op[0] & 2, t.value];
115
+
116
+ switch (op[0]) {
117
+ case 0:
118
+ case 1:
119
+ t = op;
120
+ break;
121
+
122
+ case 4:
123
+ _.label++;
124
+ return {
125
+ value: op[1],
126
+ done: false
127
+ };
128
+
129
+ case 5:
130
+ _.label++;
131
+ y = op[1];
132
+ op = [0];
133
+ continue;
134
+
135
+ case 7:
136
+ op = _.ops.pop();
137
+
138
+ _.trys.pop();
139
+
140
+ continue;
141
+
142
+ default:
143
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
144
+ _ = 0;
145
+ continue;
146
+ }
147
+
148
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
149
+ _.label = op[1];
150
+ break;
151
+ }
152
+
153
+ if (op[0] === 6 && _.label < t[1]) {
154
+ _.label = t[1];
155
+ t = op;
156
+ break;
157
+ }
158
+
159
+ if (t && _.label < t[2]) {
160
+ _.label = t[2];
161
+
162
+ _.ops.push(op);
163
+
164
+ break;
165
+ }
166
+
167
+ if (t[2]) _.ops.pop();
168
+
169
+ _.trys.pop();
170
+
171
+ continue;
172
+ }
173
+
174
+ op = body.call(thisArg, _);
175
+ } catch (e) {
176
+ op = [6, e];
177
+ y = 0;
178
+ } finally {
179
+ f = t = 0;
180
+ }
181
+ }
182
+
183
+ if (op[0] & 5) throw op[1];
184
+ return {
185
+ value: op[0] ? op[1] : void 0,
186
+ done: true
187
+ };
188
+ }
189
+ };
190
+
46
191
  var SearchMobile =
47
192
  /** @class */
48
193
  function (_super) {
49
194
  __extends(SearchMobile, _super);
50
195
 
51
196
  function SearchMobile() {
52
- return _super !== null && _super.apply(this, arguments) || this;
197
+ var _this = _super !== null && _super.apply(this, arguments) || this;
198
+
199
+ _this.state = {
200
+ messageNum: ''
201
+ };
202
+
203
+ _this.getMessageNum = function () {
204
+ return __awaiter(_this, void 0, void 0, function () {
205
+ var num;
206
+ return __generator(this, function (_a) {
207
+ switch (_a.label) {
208
+ case 0:
209
+ return [4
210
+ /*yield*/
211
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/h5/users/inbox/unread/num", {}, 'GET')];
212
+
213
+ case 1:
214
+ num = _a.sent();
215
+ if (num > 9) num = '9+';
216
+ this.setState({
217
+ messageNum: num
218
+ });
219
+ return [2
220
+ /*return*/
221
+ ];
222
+ }
223
+ });
224
+ });
225
+ };
226
+
227
+ return _this;
53
228
  }
54
229
 
230
+ SearchMobile.prototype.componentDidMount = function () {
231
+ this.getMessageNum();
232
+ };
233
+
55
234
  SearchMobile.prototype.render = function () {
56
235
  var data = this.props.data;
57
- console.log('---data', data);
236
+ var messageNum = this.state.messageNum;
58
237
  var styleWrap = {};
59
238
 
60
239
  if (data.background.bgType === 'color') {
@@ -83,14 +262,18 @@ function (_super) {
83
262
  },
84
263
  size: 24,
85
264
  type: "icon-search2"
86
- }), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
265
+ }), /*#__PURE__*/_react["default"].createElement("div", {
266
+ className: "message-wrap"
267
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
87
268
  color: "#2C2C2C",
88
269
  onClick: function onClick() {
89
270
  return (0, _coreUtil.clickUrl)('/message-center');
90
271
  },
91
272
  size: 24,
92
273
  type: "icon-message"
93
- })), data.logo.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
274
+ }), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
275
+ className: "num"
276
+ }, messageNum))), data.logo.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
94
277
  data: data.logo,
95
278
  style: {
96
279
  height: 20
@@ -13,26 +13,26 @@
13
13
  align-items: center;
14
14
  justify-content: space-between;
15
15
 
16
- // .message-wrap {
17
- // position: relative;
16
+ .message-wrap {
17
+ position: relative;
18
18
 
19
- // .num {
20
- // position: absolute;
21
- // top: -6px;
22
- // right: -6px;
23
- // display: inline-block;
24
- // padding: 2px 4px;
25
- // min-width: 18px;
26
- // text-align: center;
27
- // background-color: #CE1126;
28
- // border: 1px solid #fff;
29
- // border-radius: 8px;
30
- // font-family: 'Montserrat';
31
- // font-style: normal;
32
- // font-weight: 600;
33
- // font-size: 8px;
34
- // color: #FFFFFF;
35
- // }
36
- // }
19
+ .num {
20
+ position: absolute;
21
+ top: -6px;
22
+ right: -6px;
23
+ display: inline-block;
24
+ padding: 1px 2px;
25
+ min-width: 17px;
26
+ text-align: center;
27
+ background-color: #CE1126;
28
+ border: 1px solid #fff;
29
+ border-radius: 8px;
30
+ font-family: 'Montserrat';
31
+ font-style: normal;
32
+ font-weight: 600;
33
+ font-size: 8px;
34
+ color: #FFFFFF;
35
+ }
36
+ }
37
37
  }
38
38
  }
@@ -0,0 +1,126 @@
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/MobileNavigation/defaultJSON");
19
+
20
+ var _locale = require("../../../../../locale");
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
+
24
+ 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); }
25
+
26
+ var __extends = void 0 && (void 0).__extends || function () {
27
+ var _extendStatics = function extendStatics(d, b) {
28
+ _extendStatics = Object.setPrototypeOf || {
29
+ __proto__: []
30
+ } instanceof Array && function (d, b) {
31
+ d.__proto__ = b;
32
+ } || function (d, b) {
33
+ for (var p in b) {
34
+ if (b.hasOwnProperty(p)) d[p] = b[p];
35
+ }
36
+ };
37
+
38
+ return _extendStatics(d, b);
39
+ };
40
+
41
+ return function (d, b) {
42
+ _extendStatics(d, b);
43
+
44
+ function __() {
45
+ this.constructor = d;
46
+ }
47
+
48
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
+ };
50
+ }();
51
+
52
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
53
+ var c = arguments.length,
54
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
55
+ d;
56
+ 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--) {
57
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
58
+ }
59
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
60
+ };
61
+
62
+ var notice = 'Please add some Navigation';
63
+
64
+ var ImageTextConfigGroup =
65
+ /** @class */
66
+ function (_super) {
67
+ __extends(ImageTextConfigGroup, _super);
68
+
69
+ function ImageTextConfigGroup() {
70
+ var _this = _super !== null && _super.apply(this, arguments) || this;
71
+
72
+ _this.state = {};
73
+
74
+ _this.onClickItem = function (node) {
75
+ _this.props.store.setState({
76
+ clickedGroup: node.id
77
+ });
78
+ };
79
+
80
+ _this.onAddClick = function () {
81
+ var json = (0, _defaultJSON.MobileNavGroupSourceJSON)();
82
+
83
+ _this.props.source.push(json);
84
+
85
+ _this.setState({});
86
+
87
+ (0, _coreUtil.renderPreview)();
88
+ };
89
+
90
+ _this.reRender = function () {
91
+ _this.setState({});
92
+ };
93
+
94
+ return _this;
95
+ }
96
+
97
+ ImageTextConfigGroup.prototype.render = function () {
98
+ var source = this.props.source;
99
+ return /*#__PURE__*/_react["default"].createElement("div", {
100
+ className: "banner_group"
101
+ }, /*#__PURE__*/_react["default"].createElement("div", {
102
+ className: "node_list"
103
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
104
+ className: "notice"
105
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
106
+ onClickItem: this.onClickItem,
107
+ reRender: this.reRender,
108
+ source: source
109
+ })), /*#__PURE__*/_react["default"].createElement("div", {
110
+ className: "btn_wrap"
111
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
112
+ icon: "icon-add",
113
+ onClick: this.onAddClick,
114
+ type: "primary"
115
+ }, (0, _locale.i18n)('ADD_NAVIGATION'))));
116
+ };
117
+
118
+ ImageTextConfigGroup.defaultProps = {
119
+ source: []
120
+ };
121
+ ImageTextConfigGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], ImageTextConfigGroup);
122
+ return ImageTextConfigGroup;
123
+ }(_react["default"].Component);
124
+
125
+ var _default = ImageTextConfigGroup;
126
+ exports["default"] = _default;
@@ -0,0 +1,184 @@
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 _MobileNavigationConfigGroup = _interopRequireDefault(require("./MobileNavigationConfigGroup"));
11
+
12
+ var _locale = require("../../../../locale");
13
+
14
+ var _layout = require("../../../../constants/layout");
15
+
16
+ var _common = require("../../../../common");
17
+
18
+ var _TextConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/TextConfig"));
19
+
20
+ var _ButtonConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ButtonConfig"));
21
+
22
+ var _coreUtil = require("../../../../utils/coreUtil");
23
+
24
+ var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
25
+
26
+ var _CustomizeConfig = _interopRequireDefault(require("../../../common/config-panels/CustomizeConfig"));
27
+
28
+ var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
29
+
30
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
+
32
+ var __extends = void 0 && (void 0).__extends || function () {
33
+ var _extendStatics = function extendStatics(d, b) {
34
+ _extendStatics = Object.setPrototypeOf || {
35
+ __proto__: []
36
+ } instanceof Array && function (d, b) {
37
+ d.__proto__ = b;
38
+ } || function (d, b) {
39
+ for (var p in b) {
40
+ if (b.hasOwnProperty(p)) d[p] = b[p];
41
+ }
42
+ };
43
+
44
+ return _extendStatics(d, b);
45
+ };
46
+
47
+ return function (d, b) {
48
+ _extendStatics(d, b);
49
+
50
+ function __() {
51
+ this.constructor = d;
52
+ }
53
+
54
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55
+ };
56
+ }();
57
+
58
+ var MobileNavigationConfig =
59
+ /** @class */
60
+ function (_super) {
61
+ __extends(MobileNavigationConfig, _super);
62
+
63
+ function MobileNavigationConfig() {
64
+ var _this = _super !== null && _super.apply(this, arguments) || this; // state = {
65
+ // ready: false,
66
+ // }
67
+
68
+
69
+ _this.selfRender = function () {
70
+ (0, _coreUtil.renderPreview)();
71
+
72
+ _this.setState({});
73
+ };
74
+
75
+ _this.getTitlePanel = function () {
76
+ var data = _this.props.data;
77
+ var source = [{
78
+ key: 'imageTextTitle1',
79
+ name: (0, _locale.i18n)('HEADLINE'),
80
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
81
+ data: data.headline
82
+ }),
83
+ metaOption: data.headline,
84
+ toggleType: 'switch'
85
+ }, {
86
+ key: 'imageTextTitle2',
87
+ name: (0, _locale.i18n)('SUBTITLE'),
88
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
89
+ data: data.subtitle
90
+ }),
91
+ metaOption: data.subtitle,
92
+ toggleType: 'switch'
93
+ }];
94
+ return /*#__PURE__*/_react["default"].createElement(_common.Collapse // divider="dashed"
95
+ , {
96
+ headerSize: "middle",
97
+ onRefresh: function onRefresh() {
98
+ return (0, _coreUtil.renderPreview)();
99
+ },
100
+ source: source,
101
+ type: "switch"
102
+ });
103
+ };
104
+
105
+ _this.getButtonPanel = function () {
106
+ var data = _this.props.data;
107
+ var source = [{
108
+ key: 'imageTextButton1',
109
+ name: (0, _locale.i18n)('BUTTON'),
110
+ value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
111
+ data: data.button
112
+ }),
113
+ metaOption: data.button,
114
+ toggleType: 'switch'
115
+ }, {
116
+ key: 'imageTextButton2',
117
+ name: (0, _locale.i18n)('SECONDARY_BUTTON'),
118
+ value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
119
+ data: data.secondButton
120
+ }),
121
+ metaOption: data.secondButton,
122
+ toggleType: 'switch'
123
+ }];
124
+ return /*#__PURE__*/_react["default"].createElement(_common.Collapse // divider="dashed"
125
+ , {
126
+ headerSize: "middle",
127
+ onRefresh: function onRefresh() {
128
+ return (0, _coreUtil.renderPreview)();
129
+ },
130
+ source: source,
131
+ type: "switch"
132
+ });
133
+ };
134
+
135
+ return _this;
136
+ }
137
+
138
+ MobileNavigationConfig.prototype.render = function () {
139
+ var data = this.props.data;
140
+ return /*#__PURE__*/_react["default"].createElement("div", {
141
+ className: "container"
142
+ }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
143
+ divider: "bold",
144
+ headerSize: "large",
145
+ source: [{
146
+ key: 'mobileNavigation1',
147
+ name: (0, _locale.i18n)('GROUP'),
148
+ value: /*#__PURE__*/_react["default"].createElement(_MobileNavigationConfigGroup["default"], {
149
+ source: data.groupSource
150
+ }),
151
+ metaOption: data.groupSource
152
+ }, {
153
+ key: 'mobileNavigation2',
154
+ name: (0, _locale.i18n)('SPACING'),
155
+ value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
156
+ data: data.spacing
157
+ })
158
+ }, {
159
+ key: 'mobileNavigation3',
160
+ name: (0, _locale.i18n)('CUSTOMIZE'),
161
+ value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
162
+ component: "mobileNavigation",
163
+ data: data.customize,
164
+ isHideAlign: true,
165
+ layoutSource: _layout.mobileNavigationLayout
166
+ })
167
+ }, {
168
+ key: 'mobileNavigation4',
169
+ name: (0, _locale.i18n)('BACKGROUND'),
170
+ value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
171
+ data: data.background
172
+ })
173
+ }]
174
+ }));
175
+ };
176
+
177
+ MobileNavigationConfig.defaultProps = {
178
+ data: {}
179
+ };
180
+ return MobileNavigationConfig;
181
+ }(_react["default"].Component);
182
+
183
+ var _default = MobileNavigationConfig;
184
+ exports["default"] = _default;