@fonixtree/magic-design 0.0.56 → 0.0.58
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.
- package/es/assets/fonts/magic-box-iconfont.css +7 -7
- package/es/assets/fonts/magic-box-iconfont.css.bak +7 -7
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/es/common/GroupList/index.js +2 -3
- package/es/common/LinkModal/index.less +1 -1
- package/es/composite-comp/bol/components/Button/defaultJSON.js +38 -68
- package/es/composite-comp/bol/components/Button/index.js +7 -9
- package/es/composite-comp/bol/components/Button/index.less +1 -0
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
- package/es/composite-comp/bol/components/Carousel/pc/index.js +2 -2
- package/es/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
- package/es/composite-comp/bol/components/Tag/index.js +7 -9
- package/es/composite-comp/bol/components/Tag/index.less +1 -0
- package/es/composite-comp/bol/components/Text/defaultJSON.js +1 -1
- package/es/composite-comp/bol/components/Text/index.js +3 -3
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
- package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
- package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
- package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
- package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
- package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
- package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +452 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +95 -0
- package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +117 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
- package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
- package/es/constants/component-types.js +13 -3
- package/es/constants/index.js +20 -2
- package/es/constants/layout.js +10 -2
- package/es/core/Designer/ConfigPanel/index.js +48 -22
- package/es/core/Designer/History/index.js +36 -28
- package/es/core/Designer/index.js +17 -8
- package/es/decorator/compositeDecorator.js +1 -0
- package/es/decorator/index.js +8 -0
- package/es/decorator/updateConfigDecorator.js +76 -0
- package/es/locale/en/en.json +8 -1
- package/es/locale/es/es.json +8 -1
- package/es/locale/id/id.json +8 -1
- package/es/meta-comp/components/Button/index.js +7 -7
- package/es/meta-comp/components/Image/index.js +1 -1
- package/es/meta-comp/components/Text/index.js +18 -7
- package/es/meta-comp/config-panels/BaseConfig.js +8 -10
- package/es/meta-comp/config-panels/TextConfig/index.js +10 -3
- package/es/mobx/Store.js +1 -9
- package/es/utils/coreUtil.js +6 -1
- package/lib/assets/fonts/magic-box-iconfont.css +7 -7
- package/lib/assets/fonts/magic-box-iconfont.css.bak +7 -7
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/lib/common/GroupList/index.js +2 -3
- package/lib/common/LinkModal/index.less +1 -1
- package/lib/composite-comp/bol/components/Button/defaultJSON.js +38 -68
- package/lib/composite-comp/bol/components/Button/index.js +7 -9
- package/lib/composite-comp/bol/components/Button/index.less +1 -0
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +2 -2
- package/lib/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
- package/lib/composite-comp/bol/components/Tag/index.js +7 -9
- package/lib/composite-comp/bol/components/Tag/index.less +1 -0
- package/lib/composite-comp/bol/components/Text/defaultJSON.js +1 -1
- package/lib/composite-comp/bol/components/Text/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
- package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
- package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
- package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
- package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
- package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
- package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +452 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +95 -0
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +117 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
- package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
- package/lib/constants/component-types.js +13 -3
- package/lib/constants/index.js +20 -2
- package/lib/constants/layout.js +10 -2
- package/lib/core/Designer/ConfigPanel/index.js +48 -22
- package/lib/core/Designer/History/index.js +36 -28
- package/lib/core/Designer/index.js +17 -8
- package/lib/decorator/compositeDecorator.js +1 -0
- package/lib/decorator/index.js +8 -0
- package/lib/decorator/updateConfigDecorator.js +76 -0
- package/lib/locale/en/en.json +8 -1
- package/lib/locale/es/es.json +8 -1
- package/lib/locale/id/id.json +8 -1
- package/lib/meta-comp/components/Button/index.js +7 -7
- package/lib/meta-comp/components/Image/index.js +1 -1
- package/lib/meta-comp/components/Text/index.js +18 -7
- package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
- package/lib/meta-comp/config-panels/TextConfig/index.js +10 -3
- package/lib/mobx/Store.js +1 -9
- package/lib/utils/coreUtil.js +6 -1
- package/package.json +1 -1
|
@@ -48,14 +48,6 @@ function (_super) {
|
|
|
48
48
|
|
|
49
49
|
function BaseConfig() {
|
|
50
50
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
-
/**
|
|
52
|
-
*重新渲染展示区域
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
_this.reRenderViewArea = function () {
|
|
57
|
-
(0, _coreUtil.renderPreview)();
|
|
58
|
-
};
|
|
59
51
|
/**
|
|
60
52
|
* 重新渲染一级配置面板
|
|
61
53
|
*/
|
|
@@ -67,10 +59,16 @@ function (_super) {
|
|
|
67
59
|
*/
|
|
68
60
|
|
|
69
61
|
|
|
70
|
-
_this.selfRender = function () {
|
|
62
|
+
_this.selfRender = function (data) {
|
|
63
|
+
var changeHistory = true;
|
|
64
|
+
|
|
65
|
+
if (data && data.type === 'text-render') {
|
|
66
|
+
changeHistory = false;
|
|
67
|
+
}
|
|
68
|
+
|
|
71
69
|
_this.setState({});
|
|
72
70
|
|
|
73
|
-
|
|
71
|
+
(0, _coreUtil.renderPreview)(changeHistory);
|
|
74
72
|
};
|
|
75
73
|
|
|
76
74
|
return _this;
|
|
@@ -15,6 +15,8 @@ require("./index.less");
|
|
|
15
15
|
|
|
16
16
|
var _locale = require("../../../locale");
|
|
17
17
|
|
|
18
|
+
var _constants = require("../../../constants");
|
|
19
|
+
|
|
18
20
|
var _common = require("../../../common");
|
|
19
21
|
|
|
20
22
|
var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/common/config-panels/SpacingConfig"));
|
|
@@ -273,17 +275,22 @@ function (_super) {
|
|
|
273
275
|
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
274
276
|
title: (0, _locale.i18n)('CONTENT_WIDTH')
|
|
275
277
|
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
276
|
-
maxVal:
|
|
278
|
+
maxVal: _constants.deviceTypeWidthMap[window.magicDesign.device],
|
|
277
279
|
minVal: 0,
|
|
278
280
|
onChange: function onChange(_a) {
|
|
279
281
|
var count = _a.count;
|
|
280
|
-
|
|
282
|
+
|
|
283
|
+
if (window.magicDesign.device == 'pc') {
|
|
284
|
+
textData.pcWidth = count;
|
|
285
|
+
} else {
|
|
286
|
+
textData.width = count;
|
|
287
|
+
}
|
|
281
288
|
|
|
282
289
|
_this.selfRender();
|
|
283
290
|
},
|
|
284
291
|
unit: "px",
|
|
285
292
|
value: {
|
|
286
|
-
count: textData.width
|
|
293
|
+
count: window.magicDesign.device == 'pc' ? textData.pcWidth : textData.width
|
|
287
294
|
}
|
|
288
295
|
})))
|
|
289
296
|
}, {
|
package/lib/mobx/Store.js
CHANGED
|
@@ -34,6 +34,7 @@ function () {
|
|
|
34
34
|
this.CarouselStore = {}; // 轮播组件暂存数据
|
|
35
35
|
|
|
36
36
|
(0, _mobx.makeObservable)(this, {
|
|
37
|
+
MPageData: _mobx.observable,
|
|
37
38
|
locale: _mobx.observable,
|
|
38
39
|
hoveredMeta: _mobx.observable,
|
|
39
40
|
clickedMeta: _mobx.observable,
|
|
@@ -87,15 +88,6 @@ function () {
|
|
|
87
88
|
return componentFloor.id;
|
|
88
89
|
};
|
|
89
90
|
|
|
90
|
-
Store.prototype.getFloorInfo = function () {
|
|
91
|
-
var _this = this;
|
|
92
|
-
|
|
93
|
-
var componentFloor = this.MPageData.find(function (floor) {
|
|
94
|
-
return floor.id === _this.clickedFloor;
|
|
95
|
-
});
|
|
96
|
-
return componentFloor;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
91
|
return Store;
|
|
100
92
|
}();
|
|
101
93
|
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -53,10 +53,15 @@ var setMagicDesign = function setMagicDesign(magicDesignObj) {
|
|
|
53
53
|
|
|
54
54
|
exports.setMagicDesign = setMagicDesign;
|
|
55
55
|
|
|
56
|
-
var renderPreview = function renderPreview() {
|
|
56
|
+
var renderPreview = function renderPreview(changeHistory) {
|
|
57
|
+
if (changeHistory === void 0) {
|
|
58
|
+
changeHistory = true;
|
|
59
|
+
}
|
|
60
|
+
|
|
57
61
|
var evt = new Event('render-view', {
|
|
58
62
|
bubbles: false
|
|
59
63
|
});
|
|
64
|
+
evt.changeHistory = changeHistory;
|
|
60
65
|
window.document.dispatchEvent(evt);
|
|
61
66
|
};
|
|
62
67
|
|