@fonixtree/magic-design 0.2.5 → 0.2.8

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 (67) hide show
  1. package/es/common/MyModal/index.less +12 -4
  2. package/es/composite-comp/ashita/components/WalletAshita/defaultJSON.js +250 -0
  3. package/es/composite-comp/ashita/components/WalletAshita/index.js +84 -0
  4. package/es/composite-comp/ashita/components/WalletAshita/mobile/index.js +613 -0
  5. package/es/composite-comp/ashita/components/WalletAshita/mobile/index.less +103 -0
  6. package/es/composite-comp/ashita/components/WalletAshita/pc/index.js +359 -0
  7. package/es/composite-comp/ashita/components/WalletAshita/pc/index.less +1 -0
  8. package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.js +93 -0
  9. package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.less +0 -0
  10. package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.js +145 -0
  11. package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less +0 -0
  12. package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigSetting/index.js +201 -0
  13. package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigSetting/index.less +9 -0
  14. package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/imgs/defaultImg.png +0 -0
  15. package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/index.js +77 -0
  16. package/es/composite-comp/ashita/second-config-panels/WalletAshitaSecondConfig/index.js +188 -0
  17. package/es/composite-comp/ashita/second-config-panels/WalletAshitaSecondConfig/index.less +9 -0
  18. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +3 -0
  19. package/es/composite-comp/public/components/Wallet/defaultJSON.js +145 -0
  20. package/es/composite-comp/public/components/Wallet/index.js +84 -0
  21. package/es/composite-comp/public/components/Wallet/mobile/index.js +350 -0
  22. package/es/composite-comp/public/components/Wallet/mobile/index.less +22 -0
  23. package/es/composite-comp/public/config-panels/WalletConfig/GroupList/defaultImg.png +0 -0
  24. package/es/composite-comp/public/config-panels/WalletConfig/GroupList/index.js +100 -0
  25. package/es/composite-comp/public/config-panels/WalletConfig/GroupList/index.less +72 -0
  26. package/es/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.js +123 -0
  27. package/es/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.less +0 -0
  28. package/es/composite-comp/public/config-panels/WalletConfig/imgs/defaultImg.png +0 -0
  29. package/es/composite-comp/public/config-panels/WalletConfig/index.js +61 -0
  30. package/es/composite-comp/public/second-config-panels/WalletSecondConfig/index.js +152 -0
  31. package/es/constants/component-types.js +15 -9
  32. package/es/constants/index.js +19 -9
  33. package/lib/common/MyModal/index.less +12 -4
  34. package/lib/composite-comp/ashita/components/WalletAshita/defaultJSON.js +250 -0
  35. package/lib/composite-comp/ashita/components/WalletAshita/index.js +84 -0
  36. package/lib/composite-comp/ashita/components/WalletAshita/mobile/index.js +613 -0
  37. package/lib/composite-comp/ashita/components/WalletAshita/mobile/index.less +103 -0
  38. package/lib/composite-comp/ashita/components/WalletAshita/pc/index.js +359 -0
  39. package/lib/composite-comp/ashita/components/WalletAshita/pc/index.less +1 -0
  40. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.js +93 -0
  41. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.less +0 -0
  42. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.js +145 -0
  43. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less +0 -0
  44. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigSetting/index.js +201 -0
  45. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigSetting/index.less +9 -0
  46. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/imgs/defaultImg.png +0 -0
  47. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/index.js +77 -0
  48. package/lib/composite-comp/ashita/second-config-panels/WalletAshitaSecondConfig/index.js +188 -0
  49. package/lib/composite-comp/ashita/second-config-panels/WalletAshitaSecondConfig/index.less +9 -0
  50. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +3 -0
  51. package/lib/composite-comp/public/components/Wallet/defaultJSON.js +145 -0
  52. package/lib/composite-comp/public/components/Wallet/index.js +84 -0
  53. package/lib/composite-comp/public/components/Wallet/mobile/index.js +350 -0
  54. package/lib/composite-comp/public/components/Wallet/mobile/index.less +22 -0
  55. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/defaultImg.png +0 -0
  56. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.js +100 -0
  57. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.less +72 -0
  58. package/lib/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.js +123 -0
  59. package/lib/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.less +0 -0
  60. package/lib/composite-comp/public/config-panels/WalletConfig/imgs/defaultImg.png +0 -0
  61. package/lib/composite-comp/public/config-panels/WalletConfig/index.js +61 -0
  62. package/lib/composite-comp/public/second-config-panels/WalletSecondConfig/index.js +152 -0
  63. package/lib/constants/component-types.js +15 -9
  64. package/lib/constants/index.js +19 -9
  65. package/package.json +1 -1
  66. package/es/assets/fonts/.DS_Store +0 -0
  67. package/lib/assets/fonts/.DS_Store +0 -0
@@ -5,11 +5,13 @@
5
5
  top: 0;
6
6
  left: 0;
7
7
  z-index: 9999;
8
+
8
9
  .tip-background {
9
10
  width: 100%;
10
11
  height: 100%;
11
12
  background-color: rgba(0, 0, 0, 0.7);
12
13
  }
14
+
13
15
  .tip-content {
14
16
  border-radius: 16px 16px 0px 0px;
15
17
  background-color: #fff;
@@ -19,7 +21,7 @@
19
21
  left: 0;
20
22
  width: 100%;
21
23
  transition: all 0.3s;
22
- transform: translateY(100%);
24
+ // transform: translateY(100%);
23
25
 
24
26
  .content-head {
25
27
  text-align: center;
@@ -31,6 +33,7 @@
31
33
  letter-spacing: 0px;
32
34
  position: relative;
33
35
  padding: 10px 0;
36
+
34
37
  // margin-bottom: 20px;
35
38
  .close-icon {
36
39
  position: absolute;
@@ -38,19 +41,23 @@
38
41
  top: 10px;
39
42
  }
40
43
  }
44
+
41
45
  .content-body {
42
46
  width: 100%;
43
47
  margin-bottom: 5px;
44
48
  max-height: 500px;
45
49
  overflow-y: auto;
46
- &> img {
50
+
51
+ &>img {
47
52
  width: 100%;
48
53
  // max-width: 300px;
49
54
  height: fit-content;
50
55
  }
51
56
  }
57
+
52
58
  .close-wrap {
53
59
  margin: 6px 2px;
60
+
54
61
  .close-btn {
55
62
  border-radius: 4px;
56
63
  background-color: #E65427;
@@ -61,14 +68,15 @@
61
68
  padding: 8px 0;
62
69
  color: #fff;
63
70
  flex: 1;
71
+
64
72
  &:nth-of-type(2) {
65
73
  margin-left: 10px;
66
74
  }
67
75
  }
68
76
  }
69
77
  }
78
+
70
79
  .scroll-animation {
71
80
  transform: translateY(0);
72
81
  }
73
- }
74
-
82
+ }
@@ -0,0 +1,250 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.imagesGroupSourceJSON = exports.getDefaultJSON = void 0;
7
+
8
+ var _uuid = require("uuid");
9
+
10
+ var imagesGroupSourceJSON = function imagesGroupSourceJSON(parentId) {
11
+ var groupId = (0, _uuid.v4)();
12
+ var defaultFontFamily = 'Open Sans';
13
+ return {
14
+ id: groupId,
15
+ parentId: parentId,
16
+ title: {
17
+ parentId: groupId,
18
+ id: (0, _uuid.v4)(),
19
+ open: true,
20
+ type: 'TEXT',
21
+ specialContent: [],
22
+ text: 'Cashback',
23
+ content: {
24
+ sizeType: 'Customize font styles',
25
+ fontFamily: defaultFontFamily,
26
+ fontWeight: 700,
27
+ fontSize: 18,
28
+ color: '#fff',
29
+ textAlign: 'center'
30
+ },
31
+ underline: {
32
+ open: false,
33
+ textDecorationColor: '',
34
+ textDecorationStyle: 'solid'
35
+ },
36
+ vertical: {}
37
+ },
38
+ amount: {
39
+ parentId: groupId,
40
+ id: (0, _uuid.v4)(),
41
+ open: true,
42
+ type: 'TEXT',
43
+ specialContent: [],
44
+ text: 'RM1000',
45
+ content: {
46
+ sizeType: 'Customize font styles',
47
+ fontFamily: defaultFontFamily,
48
+ fontWeight: 700,
49
+ fontSize: 38,
50
+ color: '#fff',
51
+ textAlign: 'center'
52
+ },
53
+ underline: {
54
+ open: false,
55
+ textDecorationColor: '',
56
+ textDecorationStyle: 'solid'
57
+ },
58
+ vertical: {}
59
+ },
60
+ sourceType: 'Cashback',
61
+ text: {
62
+ parentId: groupId,
63
+ id: (0, _uuid.v4)(),
64
+ open: true,
65
+ type: 'TEXT',
66
+ specialContent: [],
67
+ text: 'Make money and shop on Cendol!',
68
+ content: {
69
+ sizeType: 'Customize font styles',
70
+ fontFamily: defaultFontFamily,
71
+ fontWeight: 400,
72
+ fontSize: 14,
73
+ color: '#fff',
74
+ textAlign: 'center'
75
+ },
76
+ underline: {
77
+ open: false,
78
+ textDecorationColor: '',
79
+ textDecorationStyle: 'solid'
80
+ },
81
+ vertical: {}
82
+ },
83
+ button: {
84
+ parentId: groupId,
85
+ id: (0, _uuid.v4)(),
86
+ open: true,
87
+ type: 'BUTTON',
88
+ text: 'Button',
89
+ content: {
90
+ url: '',
91
+ backgroundColor: '#fff'
92
+ },
93
+ buttonText: {
94
+ sizeType: 'Customize font styles',
95
+ fontFamily: defaultFontFamily,
96
+ fontWeight: 700,
97
+ fontSize: 13,
98
+ fontStyle: 'normal',
99
+ color: '#F52D85'
100
+ },
101
+ buttonBorder: {
102
+ open: true,
103
+ borderColor: '',
104
+ borderRadius: 4
105
+ },
106
+ buttonIcon: {
107
+ iconUrl: '',
108
+ layout: 'right'
109
+ },
110
+ spacing: {
111
+ pc: {
112
+ paddingTop: 6,
113
+ paddingBottom: 6,
114
+ paddingLeft: 16,
115
+ paddingRight: 16
116
+ },
117
+ mobile: {
118
+ paddingTop: 6,
119
+ paddingBottom: 6,
120
+ paddingLeft: 16,
121
+ paddingRight: 16
122
+ }
123
+ }
124
+ },
125
+ peek: {
126
+ parentId: groupId,
127
+ id: (0, _uuid.v4)(),
128
+ open: true,
129
+ type: 'TEXT',
130
+ specialContent: [],
131
+ text: '',
132
+ content: {
133
+ sizeType: 'Customize font styles',
134
+ fontFamily: defaultFontFamily,
135
+ fontWeight: 400,
136
+ fontSize: 12,
137
+ color: '#fff',
138
+ textAlign: 'center'
139
+ },
140
+ underline: {
141
+ open: false,
142
+ textDecorationColor: '',
143
+ textDecorationStyle: 'solid'
144
+ },
145
+ vertical: {}
146
+ },
147
+ background: {
148
+ opacity: 100,
149
+ color: '#F52D85',
150
+ image: '',
151
+ bgType: 'color'
152
+ }
153
+ };
154
+ };
155
+
156
+ exports.imagesGroupSourceJSON = imagesGroupSourceJSON;
157
+
158
+ var getDefaultJSON = function getDefaultJSON() {
159
+ var groupId = (0, _uuid.v4)();
160
+ var defaultFontFamily = 'Open Sans';
161
+ return {
162
+ id: groupId,
163
+ type: 'WALLET',
164
+ title: {
165
+ headline: {
166
+ id: (0, _uuid.v4)(),
167
+ open: true,
168
+ type: 'TEXT',
169
+ specialContent: [],
170
+ text: 'Wallet',
171
+ content: {
172
+ sizeType: 'Customize font styles',
173
+ fontFamily: defaultFontFamily,
174
+ fontWeight: 600,
175
+ fontSize: 18,
176
+ pcFontSize: 38,
177
+ color: '#232F46',
178
+ textAlign: 'center'
179
+ },
180
+ underline: {
181
+ open: false,
182
+ textDecorationColor: '',
183
+ textDecorationStyle: 'solid'
184
+ },
185
+ vertical: {
186
+ open: false,
187
+ lineHeight: 18
188
+ }
189
+ }
190
+ },
191
+ groupSource: [imagesGroupSourceJSON(groupId)],
192
+ setting: {
193
+ // 自动轮播
194
+ autoplay: {
195
+ open: true,
196
+ interval: 3
197
+ },
198
+ // 切换按钮
199
+ navigation: {
200
+ open: true,
201
+ size: 16,
202
+ hoverSize: 16,
203
+ color: '#eee',
204
+ hoverColor: '#fff'
205
+ },
206
+ // 面板指示点
207
+ dots: {
208
+ open: true,
209
+ color: '#eee',
210
+ hoverColor: '#fff',
211
+ size: 8,
212
+ hoverSize: 8
213
+ }
214
+ },
215
+ spacing: {
216
+ pc: {
217
+ paddingTop: 48,
218
+ paddingBottom: 48,
219
+ paddingLeft: 80,
220
+ paddingRight: 80,
221
+ marginBottom: window.magicDesign.compSpacing * 1.5
222
+ },
223
+ mobile: {
224
+ paddingTop: 20,
225
+ paddingBottom: 20,
226
+ paddingLeft: 16,
227
+ paddingRight: 16,
228
+ marginBottom: window.magicDesign.compSpacing
229
+ }
230
+ },
231
+ customize: {
232
+ layout: 'layout1',
233
+ align: 'left',
234
+ pcRowNum: 2,
235
+ rowNum: 2,
236
+ mobileMinRowNum: 2,
237
+ mobileMaxRowNum: 3,
238
+ pcMinRowNum: 2,
239
+ pcMaxRowNum: 3
240
+ },
241
+ background: {
242
+ opacity: 100,
243
+ color: '#F2F2F2',
244
+ image: '',
245
+ bgType: 'color'
246
+ }
247
+ };
248
+ };
249
+
250
+ exports.getDefaultJSON = getDefaultJSON;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _mobile = _interopRequireDefault(require("./mobile"));
11
+
12
+ var _defaultJSON = require("./defaultJSON");
13
+
14
+ var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
23
+
24
+ var __extends = void 0 && (void 0).__extends || function () {
25
+ var _extendStatics = function extendStatics(d, b) {
26
+ _extendStatics = Object.setPrototypeOf || {
27
+ __proto__: []
28
+ } instanceof Array && function (d, b) {
29
+ d.__proto__ = b;
30
+ } || function (d, b) {
31
+ for (var p in b) {
32
+ if (b.hasOwnProperty(p)) d[p] = b[p];
33
+ }
34
+ };
35
+
36
+ return _extendStatics(d, b);
37
+ };
38
+
39
+ return function (d, b) {
40
+ _extendStatics(d, b);
41
+
42
+ function __() {
43
+ this.constructor = d;
44
+ }
45
+
46
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47
+ };
48
+ }();
49
+
50
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
51
+ var c = arguments.length,
52
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
53
+ d;
54
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
55
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
56
+ }
57
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
58
+ };
59
+
60
+ var Wallet =
61
+ /** @class */
62
+ function (_super) {
63
+ __extends(Wallet, _super);
64
+
65
+ function Wallet() {
66
+ return _super !== null && _super.apply(this, arguments) || this;
67
+ }
68
+
69
+ Wallet.prototype.render = function () {
70
+ var nodeData = this.props.nodeData;
71
+ return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
72
+ data: nodeData
73
+ }));
74
+ };
75
+
76
+ Wallet.defaultProps = {};
77
+ Wallet.type = 'WALLET';
78
+ Wallet.getDefaultJSON = _defaultJSON.getDefaultJSON;
79
+ Wallet = __decorate([_compositeDecorator["default"]], Wallet);
80
+ return Wallet;
81
+ }(_react.Component);
82
+
83
+ var _default = Wallet;
84
+ exports["default"] = _default;