@fonixtree/magic-design 2.0.63 → 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 (111) hide show
  1. package/es/assets/images/base64/index.js +28 -2
  2. package/es/common/ImagePicker/index.js +0 -2
  3. package/es/common/LinkModal/FunctionTable/index.js +2 -1
  4. package/es/common/LinkModal/index.js +14 -2
  5. package/es/common/MyModal/index.less +1 -1
  6. package/es/common/UrlPicker/index.js +3 -1
  7. package/es/composite-comp/bol/components/ImageText/pc/index.js +2 -2
  8. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +8 -6
  9. package/es/composite-comp/common/components/ImageLabel/index.less +10 -3
  10. package/es/composite-comp/common/components/ProductItem/index.js +25 -17
  11. package/es/composite-comp/common/components/ProductItem/index.less +13 -7
  12. package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -6
  13. package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +76 -66
  14. package/es/composite-comp/dito/components/HeadNavigation/index.js +84 -0
  15. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
  16. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
  17. package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
  18. package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
  19. package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +70 -42
  20. package/es/composite-comp/dito/components/MenuNavigation/index.js +84 -0
  21. package/es/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
  22. package/es/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
  23. package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -4
  24. package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -6
  25. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
  26. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
  27. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
  28. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +123 -0
  29. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
  30. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
  31. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
  32. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
  33. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
  34. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
  35. package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
  36. package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
  37. package/es/constants/component-types.js +15 -3
  38. package/es/constants/index.js +8 -0
  39. package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +110 -0
  40. package/es/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
  41. package/es/core/Designer/ChatRobot/index.js +23 -5
  42. package/es/core/Designer/ChatRobot/index.less +40 -20
  43. package/es/core/Designer/History/index.js +2 -2
  44. package/es/core/Designer/PageCompList/index.js +5 -3
  45. package/es/core/Designer/index.js +1 -0
  46. package/es/core/Renderer/index.js +3 -1
  47. package/es/decorator/compositeDecorator.js +23 -0
  48. package/es/locale/en/en.json +3 -0
  49. package/es/locale/es/es.json +3 -0
  50. package/es/locale/id/id.json +3 -0
  51. package/es/meta-comp/config-panels/ButtonConfig/index.js +5 -5
  52. package/es/meta-comp/config-panels/ImageConfig/index.js +4 -2
  53. package/es/utils/businessUtil.js +3 -3
  54. package/es/utils/commonUtil.js +2 -2
  55. package/lib/assets/images/base64/index.js +28 -2
  56. package/lib/common/ImagePicker/index.js +0 -2
  57. package/lib/common/LinkModal/FunctionTable/index.js +2 -1
  58. package/lib/common/LinkModal/index.js +14 -2
  59. package/lib/common/MyModal/index.less +1 -1
  60. package/lib/common/UrlPicker/index.js +3 -1
  61. package/lib/composite-comp/bol/components/ImageText/pc/index.js +2 -2
  62. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +8 -6
  63. package/lib/composite-comp/common/components/ImageLabel/index.less +10 -3
  64. package/lib/composite-comp/common/components/ProductItem/index.js +25 -17
  65. package/lib/composite-comp/common/components/ProductItem/index.less +13 -7
  66. package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -6
  67. package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +76 -66
  68. package/lib/composite-comp/dito/components/HeadNavigation/index.js +84 -0
  69. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
  70. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
  71. package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
  72. package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
  73. package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +70 -42
  74. package/lib/composite-comp/dito/components/MenuNavigation/index.js +84 -0
  75. package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
  76. package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
  77. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -4
  78. package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -6
  79. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
  80. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
  81. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
  82. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +123 -0
  83. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
  84. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
  85. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
  86. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
  87. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
  88. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
  89. package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
  90. package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
  91. package/lib/constants/component-types.js +15 -3
  92. package/lib/constants/index.js +8 -0
  93. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +110 -0
  94. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
  95. package/lib/core/Designer/ChatRobot/index.js +23 -5
  96. package/lib/core/Designer/ChatRobot/index.less +40 -20
  97. package/lib/core/Designer/History/index.js +2 -2
  98. package/lib/core/Designer/PageCompList/index.js +5 -3
  99. package/lib/core/Designer/index.js +1 -0
  100. package/lib/core/Renderer/index.js +3 -1
  101. package/lib/decorator/compositeDecorator.js +23 -0
  102. package/lib/locale/en/en.json +3 -0
  103. package/lib/locale/es/es.json +3 -0
  104. package/lib/locale/id/id.json +3 -0
  105. package/lib/meta-comp/config-panels/ButtonConfig/index.js +5 -5
  106. package/lib/meta-comp/config-panels/ImageConfig/index.js +4 -2
  107. package/lib/utils/businessUtil.js +3 -3
  108. package/lib/utils/commonUtil.js +2 -2
  109. package/package.json +1 -1
  110. package/es/assets/fonts/.DS_Store +0 -0
  111. package/lib/assets/fonts/.DS_Store +0 -0
@@ -32,12 +32,15 @@
32
32
  }
33
33
  }
34
34
  .chat_content_wrap {
35
+ display: flex;
36
+ flex-direction: column;
35
37
  position: relative;
36
- padding-bottom: 40px;
37
38
  height: 100%;
38
39
  .content_wrap {
40
+ background: #F5F6F7;
41
+ flex: 1;
39
42
  padding: 16px;
40
- height: 100%;
43
+ // height: 100%;
41
44
  overflow: scroll;
42
45
  font-family: 'Open Sans';
43
46
  font-size: 14px;
@@ -78,16 +81,18 @@
78
81
  display: flex;
79
82
  justify-content: flex-end;
80
83
  .messageWrap {
84
+ border: 1px solid #E6EAF0;
81
85
  border-radius: 4px;
82
- background: #E9F0FF;
83
- color: #2F54EB;
86
+ background: #FFF;
87
+ color: #232F46;
84
88
  }
85
89
  }
86
90
  .assistantMessage {
87
91
  .messageWrap {
88
92
  border-radius: 4px;
89
- background: #F5F6F7;
90
- color: #232F46;
93
+ background: #E9F0FF;
94
+ color: #2F54EB;
95
+ border: 1px solid #D6E4FF;
91
96
  }
92
97
  }
93
98
  .recent_response {
@@ -101,21 +106,36 @@
101
106
  }
102
107
  }
103
108
  }
104
- .regenerate_btn {
109
+
110
+ .regenerate_btn_wrap {
111
+ background: #F5F6F7;
105
112
  display: flex;
106
113
  align-items: center;
107
- position: absolute;
108
- bottom: 10px;
109
- border: 1px solid #E6EAF0;
110
- border-radius: 4px;
111
- padding: 4px 12px;
112
- left: 50%;
113
- transform: translateX(-50%);
114
- cursor: pointer;
115
- font-family: 'Open Sans';
116
- font-style: normal;
117
- font-weight: 400;
118
- font-size: 13px;
114
+ justify-content: center;
115
+ padding-bottom: 12px;
116
+ .regenerate_btn {
117
+ background-color: #FFF;
118
+ bottom: 10px;
119
+ border: 1px solid #E6EAF0;
120
+ border-radius: 4px;
121
+ padding: 4px 12px;
122
+ cursor: pointer;
123
+ font-family: 'Open Sans';
124
+ font-style: normal;
125
+ font-weight: 400;
126
+ font-size: 13px;
127
+ }
128
+ }
129
+
130
+ .more_condition {
131
+ transition: all 0.4s;
132
+ max-height: 400px;
133
+ overflow: hidden;
134
+ box-shadow: 3px 3px 8px 0px #2D304008;
135
+ box-shadow: -3px -3px 8px 0px #2D304008;
136
+ }
137
+ .more_condition_hide {
138
+ max-height: 0;
119
139
  }
120
140
  }
121
141
  .dialog_bottom {
@@ -130,7 +150,7 @@
130
150
  }
131
151
  .image_btn {
132
152
  position: absolute;
133
- right: 10px;
153
+ right: 40px;
134
154
  top: 6px;
135
155
  }
136
156
  .toggle_btn {
@@ -7,7 +7,7 @@ exports["default"] = void 0;
7
7
 
8
8
  var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
9
9
 
10
- var _lodash = require("lodash");
10
+ var _debounce = _interopRequireDefault(require("lodash/debounce"));
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
13
 
@@ -79,7 +79,7 @@ function () {
79
79
  _this.doAction(callback);
80
80
  };
81
81
 
82
- this.doAction = (0, _lodash.debounce)(function (callback) {
82
+ this.doAction = (0, _debounce["default"])(function (callback) {
83
83
  var newCursor = _this.cursor + _this.step;
84
84
  _this.cursor = newCursor;
85
85
  var newData = (0, _cloneDeep["default"])(_this.list[newCursor]);
@@ -15,7 +15,9 @@ var _immutabilityHelper = _interopRequireDefault(require("immutability-helper"))
15
15
 
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
 
18
- var _lodash = require("lodash");
18
+ var _findIndex = _interopRequireDefault(require("lodash/findIndex"));
19
+
20
+ var _findLastIndex = _interopRequireDefault(require("lodash/findLastIndex"));
19
21
 
20
22
  var _common = require("../../../common");
21
23
 
@@ -139,7 +141,7 @@ function PageCompList(_a) {
139
141
 
140
142
  var getLastSameIndex = function getLastSameIndex(comps, index) {
141
143
  var lastComps = comps.slice(0, index);
142
- var newIndex = (0, _lodash.findLastIndex)(lastComps, function (comp) {
144
+ var newIndex = (0, _findLastIndex["default"])(lastComps, function (comp) {
143
145
  return (0, _coreUtil.isActiveFloor)(comp.activeTerminal);
144
146
  });
145
147
  return newIndex;
@@ -147,7 +149,7 @@ function PageCompList(_a) {
147
149
 
148
150
  var getNextSameIndex = function getNextSameIndex(comps, index) {
149
151
  var nextComps = comps.slice(index + 1);
150
- var newIndex = (0, _lodash.findIndex)(nextComps, function (comp) {
152
+ var newIndex = (0, _findIndex["default"])(nextComps, function (comp) {
151
153
  return (0, _coreUtil.isActiveFloor)(comp.activeTerminal);
152
154
  });
153
155
  return newIndex + index + 1;
@@ -263,6 +263,7 @@ window.magicDesign = {
263
263
 
264
264
  var setDesignConfig = function setDesignConfig(data) {
265
265
  window.magicDesign = __assign(__assign(__assign({}, window.magicDesign), data), {
266
+ designMode: true,
266
267
  compWidth: Number(data.compWidth),
267
268
  compSpacing: Number(data.compSpacing),
268
269
  MBaseUrl: data.MBaseUrl || 'operation/v1',
@@ -43,11 +43,13 @@ var __assign = void 0 && (void 0).__assign || function () {
43
43
 
44
44
  var setDesignConfig = function setDesignConfig(props) {
45
45
  var config = props.config,
46
- device = props.device;
46
+ device = props.device,
47
+ isPreview = props.isPreview;
47
48
  window.magicDesign = __assign(__assign({
48
49
  pageBackground: '#f2f2f2',
49
50
  mode: 'renderer',
50
51
  device: device,
52
+ designMode: isPreview,
51
53
  navigatePreUrl: ''
52
54
  }, config), {
53
55
  compSpacing: Number(config.compSpacing),
@@ -153,6 +153,19 @@ function compositeDecorator(WrappedComponent) {
153
153
 
154
154
  if (device === _constants.deviceTypeMap.PC && compWidth && !((_a = spacing === null || spacing === void 0 ? void 0 : spacing.pc) === null || _a === void 0 ? void 0 : _a.fillUp)) {
155
155
  wrapStyle.width = compWidth;
156
+ } // 如果是菜单 则需要设为fixed
157
+
158
+
159
+ if (nodeData.type === 'HEAD_NAVIGATION' || nodeData.type === 'MENU_NAVIGATION') {
160
+ wrapStyle.position = 'absolute';
161
+ wrapStyle.left = 0;
162
+ wrapStyle.width = '100%';
163
+
164
+ if (nodeData.type === 'HEAD_NAVIGATION') {
165
+ wrapStyle.top = 0;
166
+ } else {
167
+ wrapStyle.bottom = 0;
168
+ }
156
169
  }
157
170
 
158
171
  return wrapStyle;
@@ -228,6 +241,15 @@ function compositeDecorator(WrappedComponent) {
228
241
  });
229
242
  };
230
243
 
244
+ _this.getOuterWrapStyle = function () {
245
+ var nodeData = _this.props.nodeData;
246
+
247
+ if (window.magicDesign.designMode && (nodeData.type === 'HEAD_NAVIGATION' || nodeData.type === 'MENU_NAVIGATION')) {
248
+ var element = document.querySelector('.phone_view_area .device_border') || document.querySelector('#root .render_wrap');
249
+ element.style.position = 'relative';
250
+ }
251
+ };
252
+
231
253
  return _this;
232
254
  }
233
255
 
@@ -240,6 +262,7 @@ function compositeDecorator(WrappedComponent) {
240
262
  hoveredFloor: _mobx.store.hoveredFloor
241
263
  });
242
264
  });
265
+ this.getOuterWrapStyle();
243
266
  };
244
267
 
245
268
  Wrapper.prototype.componentWillUnmount = function () {
@@ -1,4 +1,7 @@
1
1
  {
2
+ "DISPLAY_PAGE": "Display page",
3
+ "NAME": "Name",
4
+ "ADD_MENU": "Add Menu",
2
5
  "TIPS": "Tips",
3
6
  "AL": "AL",
4
7
  "PEEK": "Peek",
@@ -1,4 +1,7 @@
1
1
  {
2
+ "DISPLAY_PAGE": "Display page",
3
+ "NAME": "Name",
4
+ "ADD_MENU": "Add Menu",
2
5
  "TIPS": "Tips",
3
6
  "AL": "AL",
4
7
  "PEEK": "Peek",
@@ -1,4 +1,7 @@
1
1
  {
2
+ "DISPLAY_PAGE": "Display page",
3
+ "NAME": "Name",
4
+ "ADD_MENU": "Add Menu",
2
5
  "TIPS": "Tips",
3
6
  "AL": "AL",
4
7
  "PEEK": "Peek",
@@ -11,7 +11,7 @@ var _antd = require("antd");
11
11
 
12
12
  require("./index.less");
13
13
 
14
- var _lodash = require("lodash");
14
+ var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
15
15
 
16
16
  var _locale = require("../../../locale");
17
17
 
@@ -106,11 +106,11 @@ function (_super) {
106
106
 
107
107
  _this.updateAttr(data, 'hover', {
108
108
  open: true,
109
- buttonBorder: (0, _lodash.cloneDeep)(data.buttonBorder),
110
- buttonIcon: (0, _lodash.cloneDeep)(data.buttonIcon),
111
- buttonText: (0, _lodash.cloneDeep)(data.buttonText),
109
+ buttonBorder: (0, _cloneDeep["default"])(data.buttonBorder),
110
+ buttonIcon: (0, _cloneDeep["default"])(data.buttonIcon),
111
+ buttonText: (0, _cloneDeep["default"])(data.buttonText),
112
112
  content: {
113
- backgroundColor: (0, _lodash.cloneDeep)(data.content.backgroundColor)
113
+ backgroundColor: (0, _cloneDeep["default"])(data.content.backgroundColor)
114
114
  }
115
115
  }); // console.log('--ffd, button hover first click', data);
116
116
 
@@ -202,7 +202,7 @@ function (_super) {
202
202
  function ImageConfig() {
203
203
  var _this = _super !== null && _super.apply(this, arguments) || this;
204
204
 
205
- _this.onClick = function (event) {// console.log(event);
205
+ _this.onClick = function () {// console.log(event);
206
206
  };
207
207
 
208
208
  _this.getImg = function (v, way) {
@@ -320,7 +320,8 @@ function (_super) {
320
320
  needHover = _a.needHover,
321
321
  needClickArea = _a.needClickArea,
322
322
  needURL = _a.needURL,
323
- recommendImgSize = _a.recommendImgSize;
323
+ recommendImgSize = _a.recommendImgSize,
324
+ onlySpecificCode = _a.onlySpecificCode;
324
325
  var selectImg = this.getSelectedImg(data);
325
326
 
326
327
  var ContentSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.ImagePicker, {
@@ -348,6 +349,7 @@ function (_super) {
348
349
 
349
350
  _this.selfRender();
350
351
  },
352
+ onlySpecificCode: onlySpecificCode,
351
353
  value: data.content.clickUrl
352
354
  })));
353
355
 
@@ -7,7 +7,7 @@ exports.renderPreview = exports.parseUrl = exports.newParseUrl = exports.listToT
7
7
 
8
8
  var _qs = _interopRequireDefault(require("qs"));
9
9
 
10
- var _lodash = require("lodash");
10
+ var _pickBy = _interopRequireDefault(require("lodash/pickBy"));
11
11
 
12
12
  var _commonUtil = require("./commonUtil");
13
13
 
@@ -92,7 +92,7 @@ var newParseUrl = function newParseUrl(urlObj) {
92
92
  action: 'jump',
93
93
  params: {
94
94
  type: 'PRODUCT_LIST',
95
- params: (0, _lodash.pickBy)(_qs["default"].parse(value), function (value) {
95
+ params: (0, _pickBy["default"])(_qs["default"].parse(value), function (value) {
96
96
  return value;
97
97
  })
98
98
  }
@@ -266,7 +266,7 @@ var parseUrl = function parseUrl(url) {
266
266
  action: 'jump',
267
267
  params: {
268
268
  type: 'PRODUCT_LIST',
269
- params: (0, _lodash.pickBy)(_qs["default"].parse(arg1), function (value) {
269
+ params: (0, _pickBy["default"])(_qs["default"].parse(arg1), function (value) {
270
270
  return value;
271
271
  })
272
272
  }
@@ -27,7 +27,7 @@ exports.styleStringify = void 0;
27
27
 
28
28
  var _axios = _interopRequireDefault(require("axios"));
29
29
 
30
- var _lodash = require("lodash");
30
+ var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
31
31
 
32
32
  var _uuid = require("uuid");
33
33
 
@@ -640,7 +640,7 @@ function pushGA(data, eventName) {
640
640
 
641
641
 
642
642
  function covertKey(data, func) {
643
- var newData = (0, _lodash.cloneDeep)(data);
643
+ var newData = (0, _cloneDeep["default"])(data);
644
644
  func(newData);
645
645
  return JSON.stringify(newData);
646
646
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.63",
4
+ "version": "2.0.64",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
Binary file
Binary file