@fonixtree/magic-design 2.0.31 → 2.0.32
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/.DS_Store +0 -0
- package/es/assets/less/modal.less +1 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +7 -3
- package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/es/common/LinkModal/index.js +1 -1
- package/es/common/ProductModal/index.js +23 -30
- package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
- package/es/composite-comp/common/components/ProductItem/index.js +4 -2
- package/es/composite-comp/common/components/ProductItem/index.less +9 -0
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
- package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +32 -27
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
- package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
- package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/es/core/Designer/ToolBarModal/index.js +16 -4
- package/es/core/Designer/index.js +3 -0
- package/es/decorator/index.js +24 -1
- package/es/locale/en/en.json +1 -1
- package/es/locale/es/es.json +1 -1
- package/es/locale/id/id.json +1 -1
- package/es/meta-comp/components/Button/index.js +7 -0
- package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/es/meta-comp/components/Text/index.js +9 -0
- package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/es/utils/commonUtil.js +17 -3
- package/es/utils/currencyUtil.js +29 -10
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/less/modal.less +1 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +7 -3
- package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/lib/common/LinkModal/index.js +1 -1
- package/lib/common/ProductModal/index.js +23 -30
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
- package/lib/composite-comp/common/components/ProductItem/index.js +4 -2
- package/lib/composite-comp/common/components/ProductItem/index.less +9 -0
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
- package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +32 -27
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
- package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/lib/core/Designer/ToolBarModal/index.js +16 -4
- package/lib/core/Designer/index.js +3 -0
- package/lib/decorator/index.js +24 -1
- package/lib/locale/en/en.json +1 -1
- package/lib/locale/es/es.json +1 -1
- package/lib/locale/id/id.json +1 -1
- package/lib/meta-comp/components/Button/index.js +7 -0
- package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/lib/meta-comp/components/Text/index.js +9 -0
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/lib/utils/commonUtil.js +17 -3
- package/lib/utils/currencyUtil.js +29 -10
- package/package.json +1 -1
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
- package/es/core/Designer/TextEditModal/ToolBar/index.js +0 -219
- package/es/core/Designer/TextEditModal/ToolBar/index.less +0 -19
- package/es/core/Designer/TextEditModal/index.js +0 -100
- package/es/core/Designer/TextEditModal/index.less +0 -4
- package/es/core/Designer/TextEditModal_old/index.js +0 -142
- package/es/core/Designer/TextEditModal_old/index.less +0 -25
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
- package/lib/core/Designer/TextEditModal/ToolBar/index.js +0 -219
- package/lib/core/Designer/TextEditModal/ToolBar/index.less +0 -19
- package/lib/core/Designer/TextEditModal/index.js +0 -100
- package/lib/core/Designer/TextEditModal/index.less +0 -4
- package/lib/core/Designer/TextEditModal_old/index.js +0 -142
- package/lib/core/Designer/TextEditModal_old/index.less +0 -25
package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/conf
|
|
|
15
15
|
|
|
16
16
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
17
|
|
|
18
|
+
var _TextConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/TextConfig"));
|
|
19
|
+
|
|
18
20
|
var _locale = require("../../../../../locale");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -67,11 +69,9 @@ function (_super) {
|
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
SignBoardConfigContent.prototype.render = function () {
|
|
70
|
-
var _this = this;
|
|
71
|
-
|
|
72
72
|
var panelProps = this.props.panelProps;
|
|
73
73
|
var source = [{
|
|
74
|
-
key: '
|
|
74
|
+
key: 'logo',
|
|
75
75
|
name: (0, _locale.i18n)('LOGO'),
|
|
76
76
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
77
77
|
data: panelProps.logo
|
|
@@ -79,50 +79,12 @@ function (_super) {
|
|
|
79
79
|
metaOption: panelProps.logo,
|
|
80
80
|
toggleType: 'switch'
|
|
81
81
|
}, {
|
|
82
|
-
key: '
|
|
83
|
-
name: (0, _locale.i18n)('
|
|
84
|
-
value: /*#__PURE__*/_react["default"].createElement(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
title: (0, _locale.i18n)('COLOR')
|
|
89
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
90
|
-
colorType: "rgba",
|
|
91
|
-
onChange: function onChange(v) {
|
|
92
|
-
if ((0, _coreUtil.isPc)()) {
|
|
93
|
-
panelProps.box.color.pc = v;
|
|
94
|
-
} else {
|
|
95
|
-
panelProps.box.color.mobile = v;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
_this.selfRender();
|
|
99
|
-
},
|
|
100
|
-
value: (0, _coreUtil.isPc)() ? panelProps.box.color.pc : panelProps.box.color.mobile
|
|
101
|
-
})),
|
|
102
|
-
metaOption: panelProps.box,
|
|
103
|
-
toggleType: 'switch'
|
|
104
|
-
}, {
|
|
105
|
-
key: 'search3',
|
|
106
|
-
name: (0, _locale.i18n)('ICON'),
|
|
107
|
-
value: /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
108
|
-
style: {
|
|
109
|
-
marginTop: 20
|
|
110
|
-
},
|
|
111
|
-
title: (0, _locale.i18n)('COLOR')
|
|
112
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
113
|
-
colorType: "rgba",
|
|
114
|
-
onChange: function onChange(v) {
|
|
115
|
-
if ((0, _coreUtil.isPc)()) {
|
|
116
|
-
panelProps.icon.color.pc = v;
|
|
117
|
-
} else {
|
|
118
|
-
panelProps.icon.color.mobile = v;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
_this.selfRender();
|
|
122
|
-
},
|
|
123
|
-
value: (0, _coreUtil.isPc)() ? panelProps.icon.color.pc : panelProps.icon.color.mobile
|
|
124
|
-
})),
|
|
125
|
-
metaOption: panelProps.icon,
|
|
82
|
+
key: 'title',
|
|
83
|
+
name: (0, _locale.i18n)('TITLE'),
|
|
84
|
+
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
85
|
+
data: panelProps.title
|
|
86
|
+
}),
|
|
87
|
+
metaOption: panelProps.title,
|
|
126
88
|
toggleType: 'switch'
|
|
127
89
|
}];
|
|
128
90
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _SignBoardConfigContent = _interopRequireDefault(require("./SignBoardConfigContent"));
|
|
11
|
+
|
|
10
12
|
var _locale = require("../../../../locale");
|
|
11
13
|
|
|
12
14
|
var _common = require("../../../../common");
|
|
@@ -57,8 +59,13 @@ function (_super) {
|
|
|
57
59
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
58
60
|
divider: "bold",
|
|
59
61
|
headerSize: "large",
|
|
60
|
-
source: [
|
|
61
|
-
|
|
62
|
+
source: [{
|
|
63
|
+
key: 'signBoard1',
|
|
64
|
+
name: (0, _locale.i18n)('CONTENT'),
|
|
65
|
+
value: /*#__PURE__*/_react["default"].createElement(_SignBoardConfigContent["default"], {
|
|
66
|
+
panelProps: data.content
|
|
67
|
+
})
|
|
68
|
+
}, {
|
|
62
69
|
key: 'signBoard4',
|
|
63
70
|
name: (0, _locale.i18n)('SPACING'),
|
|
64
71
|
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -228,8 +228,8 @@ function (_super) {
|
|
|
228
228
|
this.setState({
|
|
229
229
|
intelligentType: type,
|
|
230
230
|
intelligentValue: []
|
|
231
|
-
});
|
|
232
|
-
|
|
231
|
+
}); // this.getTypeData(type);
|
|
232
|
+
|
|
233
233
|
this.props.onChange({
|
|
234
234
|
intelligentType: type,
|
|
235
235
|
intelligentValue: []
|
|
@@ -255,7 +255,7 @@ function (_super) {
|
|
|
255
255
|
];
|
|
256
256
|
return [4
|
|
257
257
|
/*yield*/
|
|
258
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offercatgs/list")];
|
|
258
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list")];
|
|
259
259
|
|
|
260
260
|
case 1:
|
|
261
261
|
res = _a.sent();
|
|
@@ -81,6 +81,18 @@ function (_super) {
|
|
|
81
81
|
|
|
82
82
|
_this.state = {};
|
|
83
83
|
|
|
84
|
+
_this.hasSource = function (type) {
|
|
85
|
+
if (!window.systemParams || !window.systemParams.recommendSource) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (window.systemParams.recommendSource && window.systemParams.recommendSource.includes(type)) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return false;
|
|
94
|
+
};
|
|
95
|
+
|
|
84
96
|
_this.getContentPanel = function () {
|
|
85
97
|
var panelProps = _this.props.panelProps;
|
|
86
98
|
|
|
@@ -95,9 +107,9 @@ function (_super) {
|
|
|
95
107
|
_this.selfRender();
|
|
96
108
|
},
|
|
97
109
|
value: panelProps.sourceType
|
|
98
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
110
|
+
}, _this.hasSource('P') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
99
111
|
value: "select"
|
|
100
|
-
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
112
|
+
}, (0, _locale.i18n)('SELECT_PRODUCT')), _this.hasSource('A') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
101
113
|
value: "recommend"
|
|
102
114
|
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
115
|
className: "greyBg"
|
|
@@ -146,18 +146,30 @@ function (_super) {
|
|
|
146
146
|
_this.props.quillRef.format('font', value);
|
|
147
147
|
} else if (type == 'font-weight') {
|
|
148
148
|
_this.props.quillRef.format('font-weight', value);
|
|
149
|
+
} else if (type == 'font-style') {
|
|
150
|
+
_this.props.quillRef.format('font-style', 'italic' === quillFormat['font-style'] ? '' : 'italic');
|
|
149
151
|
} else if (type == 'font-family') {
|
|
150
152
|
_this.props.quillRef.format('font-family', value);
|
|
151
153
|
} else if (type == 'text-decoration-style') {
|
|
154
|
+
_this.props.quillRef.format('underline', true);
|
|
155
|
+
|
|
152
156
|
_this.props.quillRef.format('text-decoration-style', value);
|
|
153
157
|
} else if (type == 'bullet') {
|
|
154
158
|
_this.props.quillRef.format('list-style-type', value);
|
|
155
159
|
|
|
156
|
-
|
|
160
|
+
if (value === quillFormat['list-style-type']) {
|
|
161
|
+
_this.props.quillRef.format('list', '');
|
|
162
|
+
} else {
|
|
163
|
+
_this.props.quillRef.format('list', 'bullet');
|
|
164
|
+
}
|
|
157
165
|
} else if (type == 'ordered') {
|
|
158
166
|
_this.props.quillRef.format('list-style-type', value);
|
|
159
167
|
|
|
160
|
-
|
|
168
|
+
if (value === quillFormat['list-style-type']) {
|
|
169
|
+
_this.props.quillRef.format('list', '');
|
|
170
|
+
} else {
|
|
171
|
+
_this.props.quillRef.format('list', 'ordered');
|
|
172
|
+
}
|
|
161
173
|
} else if (type == 'text-decoration-color') {
|
|
162
174
|
if (value) {
|
|
163
175
|
_this.props.quillRef.format('underline', true);
|
|
@@ -269,9 +281,9 @@ function (_super) {
|
|
|
269
281
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
282
|
className: "tool-item"
|
|
271
283
|
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
272
|
-
active: quillFormat['italic'
|
|
284
|
+
active: quillFormat['font-style'] === 'italic',
|
|
273
285
|
onChange: function onChange() {
|
|
274
|
-
_this.onToolBtnClick('
|
|
286
|
+
_this.onToolBtnClick('font-style');
|
|
275
287
|
},
|
|
276
288
|
type: "italic"
|
|
277
289
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
package/es/decorator/index.js
CHANGED
|
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "metaDecorator", {
|
|
|
27
27
|
return _metaDecorator["default"];
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
exports.shouldUpdate = shouldUpdate;
|
|
30
31
|
Object.defineProperty(exports, "updateConfigDecorator", {
|
|
31
32
|
enumerable: true,
|
|
32
33
|
get: function get() {
|
|
@@ -42,4 +43,26 @@ var _updateConfigDecorator = _interopRequireDefault(require("./updateConfigDecor
|
|
|
42
43
|
|
|
43
44
|
var _lazyLoadDecorator = require("./lazyLoadDecorator");
|
|
44
45
|
|
|
45
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
46
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
47
|
+
|
|
48
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
49
|
+
|
|
50
|
+
/** props 和 state 改变时才会render */
|
|
51
|
+
function shouldUpdate() {
|
|
52
|
+
return function (target, name, descriptor) {
|
|
53
|
+
var fn = descriptor.value;
|
|
54
|
+
|
|
55
|
+
descriptor.value = function (nextProps, nextState) {
|
|
56
|
+
var nowPropsJson = JSON.stringify(nextProps);
|
|
57
|
+
var nowStateJson = JSON.stringify(nextState);
|
|
58
|
+
var should1 = nowPropsJson != this.preProps;
|
|
59
|
+
var should2 = nowStateJson != this.preState;
|
|
60
|
+
this.preProps = nowPropsJson;
|
|
61
|
+
this.preState = nowStateJson;
|
|
62
|
+
var result = should1 || should2;
|
|
63
|
+
return result && fn.apply(this, {
|
|
64
|
+
nextProps: nextProps
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}
|
package/es/locale/en/en.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
55
55
|
"ADD_AREA": "Add Area",
|
|
56
56
|
"CLICKABLE_AREA": "Clickable Area",
|
|
57
|
-
"VOUCHER_SUCCESS": "
|
|
57
|
+
"VOUCHER_SUCCESS": "Coupon received successfully!",
|
|
58
58
|
"NAVIGATION_NAME": "Navigation Name",
|
|
59
59
|
"ADD_NAVIGATION": "Add Navigation",
|
|
60
60
|
"SAVE": "Save",
|
package/es/locale/es/es.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
55
55
|
"ADD_AREA": "Add Area",
|
|
56
56
|
"CLICKABLE_AREA": "Clickable Area",
|
|
57
|
-
"VOUCHER_SUCCESS": "
|
|
57
|
+
"VOUCHER_SUCCESS": "Coupon received successfully!",
|
|
58
58
|
"NAVIGATION_NAME": "Navigation Name",
|
|
59
59
|
"ADD_NAVIGATION": "Add Navigation",
|
|
60
60
|
"SAVE": "Guardar",
|
package/es/locale/id/id.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
55
55
|
"ADD_AREA": "Add Area",
|
|
56
56
|
"CLICKABLE_AREA": "Clickable Area",
|
|
57
|
-
"VOUCHER_SUCCESS": "
|
|
57
|
+
"VOUCHER_SUCCESS": "Coupon received successfully!",
|
|
58
58
|
"NAVIGATION_NAME": "Navigation Name",
|
|
59
59
|
"ADD_NAVIGATION": "Add Navigation",
|
|
60
60
|
"SAVE": "Save",
|
|
@@ -93,6 +93,10 @@ function (_super) {
|
|
|
93
93
|
return _this;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
Button.prototype.shouldComponentUpdate = function () {
|
|
97
|
+
return true;
|
|
98
|
+
};
|
|
99
|
+
|
|
96
100
|
Button.prototype.render = function () {
|
|
97
101
|
var _this = this;
|
|
98
102
|
|
|
@@ -168,6 +172,9 @@ function (_super) {
|
|
|
168
172
|
className: '',
|
|
169
173
|
readonly: false
|
|
170
174
|
};
|
|
175
|
+
|
|
176
|
+
__decorate([(0, _decorator.shouldUpdate)()], Button.prototype, "shouldComponentUpdate", null);
|
|
177
|
+
|
|
171
178
|
Button = __decorate([_decorator.metaDecorator], Button);
|
|
172
179
|
return Button;
|
|
173
180
|
}(_react.Component);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FontStyleAttributor = exports.FontStyle = void 0;
|
|
7
|
+
|
|
8
|
+
var _quill = _interopRequireDefault(require("quill"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
13
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
14
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
15
|
+
__proto__: []
|
|
16
|
+
} instanceof Array && function (d, b) {
|
|
17
|
+
d.__proto__ = b;
|
|
18
|
+
} || function (d, b) {
|
|
19
|
+
for (var p in b) {
|
|
20
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return _extendStatics(d, b);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return function (d, b) {
|
|
28
|
+
_extendStatics(d, b);
|
|
29
|
+
|
|
30
|
+
function __() {
|
|
31
|
+
this.constructor = d;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
35
|
+
};
|
|
36
|
+
}();
|
|
37
|
+
|
|
38
|
+
var Parchment = _quill["default"]["import"]('parchment');
|
|
39
|
+
|
|
40
|
+
var FontStyleAttributor =
|
|
41
|
+
/** @class */
|
|
42
|
+
function (_super) {
|
|
43
|
+
__extends(FontStyleAttributor, _super);
|
|
44
|
+
|
|
45
|
+
function FontStyleAttributor() {
|
|
46
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return FontStyleAttributor;
|
|
50
|
+
}(Parchment.Attributor.Style);
|
|
51
|
+
|
|
52
|
+
exports.FontStyleAttributor = FontStyleAttributor;
|
|
53
|
+
var FontStyle = new FontStyleAttributor('font-style', 'font-style', {
|
|
54
|
+
scope: Parchment.Scope.INLINE
|
|
55
|
+
});
|
|
56
|
+
exports.FontStyle = FontStyle;
|
|
57
|
+
|
|
58
|
+
_quill["default"].register('formats/font-style', FontStyle, true);
|
|
@@ -17,6 +17,8 @@ require("./formats/fontFamily");
|
|
|
17
17
|
|
|
18
18
|
require("./formats/textDecorationColor");
|
|
19
19
|
|
|
20
|
+
require("./formats/fontStyle");
|
|
21
|
+
|
|
20
22
|
require("./formats/listStyleTypeStyle");
|
|
21
23
|
|
|
22
24
|
require("./formats/textDecorationStyle");
|
|
@@ -203,6 +205,10 @@ function (_super) {
|
|
|
203
205
|
});
|
|
204
206
|
};
|
|
205
207
|
|
|
208
|
+
Text.prototype.shouldComponentUpdate = function () {
|
|
209
|
+
return true;
|
|
210
|
+
};
|
|
211
|
+
|
|
206
212
|
Text.prototype.render = function () {
|
|
207
213
|
var _a = this.props,
|
|
208
214
|
data = _a.data,
|
|
@@ -272,6 +278,9 @@ function (_super) {
|
|
|
272
278
|
readonly: false,
|
|
273
279
|
onTextInput: function onTextInput() {}
|
|
274
280
|
};
|
|
281
|
+
|
|
282
|
+
__decorate([(0, _decorator.shouldUpdate)()], Text.prototype, "shouldComponentUpdate", null);
|
|
283
|
+
|
|
275
284
|
Text = __decorate([_decorator.metaDecorator], Text);
|
|
276
285
|
return Text;
|
|
277
286
|
}(_react["default"].Component);
|
|
@@ -11,6 +11,8 @@ var _antd = require("antd");
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
+
var _lodash = require("lodash");
|
|
15
|
+
|
|
14
16
|
var _locale = require("../../../locale");
|
|
15
17
|
|
|
16
18
|
var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/common/config-panels/SpacingConfig"));
|
|
@@ -104,11 +106,11 @@ function (_super) {
|
|
|
104
106
|
|
|
105
107
|
_this.updateAttr(data, 'hover', {
|
|
106
108
|
open: true,
|
|
107
|
-
buttonBorder: data.buttonBorder,
|
|
108
|
-
buttonIcon: data.buttonIcon,
|
|
109
|
-
buttonText: data.buttonText,
|
|
109
|
+
buttonBorder: (0, _lodash.cloneDeep)(data.buttonBorder),
|
|
110
|
+
buttonIcon: (0, _lodash.cloneDeep)(data.buttonIcon),
|
|
111
|
+
buttonText: (0, _lodash.cloneDeep)(data.buttonText),
|
|
110
112
|
content: {
|
|
111
|
-
backgroundColor: data.content.backgroundColor
|
|
113
|
+
backgroundColor: (0, _lodash.cloneDeep)(data.content.backgroundColor)
|
|
112
114
|
}
|
|
113
115
|
}); // console.log('--ffd, button hover first click', data);
|
|
114
116
|
|
|
@@ -162,7 +164,7 @@ function (_super) {
|
|
|
162
164
|
|
|
163
165
|
var fontSizeKey = window.magicDesign.device == 'pc' ? 'pcFontSize' : 'fontSize';
|
|
164
166
|
|
|
165
|
-
var ButtonTextSetting = function ButtonTextSetting(
|
|
167
|
+
var ButtonTextSetting = function ButtonTextSetting(_data) {
|
|
166
168
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
167
169
|
title: (0, _locale.i18n)('FONT_STYLE')
|
|
168
170
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
@@ -171,24 +173,24 @@ function (_super) {
|
|
|
171
173
|
return t.key == v;
|
|
172
174
|
});
|
|
173
175
|
|
|
174
|
-
_extends(
|
|
176
|
+
_extends(_data, __assign(__assign({}, findOne), {
|
|
175
177
|
sizeType: findOne === null || findOne === void 0 ? void 0 : findOne.key
|
|
176
178
|
}));
|
|
177
179
|
|
|
178
180
|
_this.selfRender();
|
|
179
181
|
},
|
|
180
|
-
value:
|
|
182
|
+
value: _data.sizeType
|
|
181
183
|
}, _TextConfig.sizeTypeList.map(function (sizeType) {
|
|
182
184
|
return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
183
185
|
value: sizeType.key
|
|
184
186
|
}, sizeType.key);
|
|
185
|
-
}))),
|
|
187
|
+
}))), _data.sizeType == 'Customize font styles' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
186
188
|
title: (0, _locale.i18n)('FONT_FAMILY')
|
|
187
189
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
188
190
|
onChange: function onChange(v) {
|
|
189
|
-
_this.updateAttr(
|
|
191
|
+
_this.updateAttr(_data, 'fontFamily', v);
|
|
190
192
|
},
|
|
191
|
-
value:
|
|
193
|
+
value: _data.fontFamily
|
|
192
194
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
193
195
|
value: "Montserrat"
|
|
194
196
|
}, "Montserrat"), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
@@ -197,9 +199,9 @@ function (_super) {
|
|
|
197
199
|
title: (0, _locale.i18n)('FONT_WEIGHT')
|
|
198
200
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
199
201
|
onChange: function onChange(v) {
|
|
200
|
-
_this.updateAttr(
|
|
202
|
+
_this.updateAttr(_data, 'fontWeight', v);
|
|
201
203
|
},
|
|
202
|
-
value:
|
|
204
|
+
value: _data.fontWeight
|
|
203
205
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
204
206
|
value: 400
|
|
205
207
|
}, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
@@ -210,34 +212,34 @@ function (_super) {
|
|
|
210
212
|
onChange: function onChange(_a) {
|
|
211
213
|
var count = _a.count;
|
|
212
214
|
|
|
213
|
-
_this.updateAttr(
|
|
215
|
+
_this.updateAttr(_data, fontSizeKey, count);
|
|
214
216
|
},
|
|
215
217
|
unit: "px",
|
|
216
218
|
value: {
|
|
217
|
-
count:
|
|
219
|
+
count: _data[fontSizeKey]
|
|
218
220
|
}
|
|
219
221
|
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
220
222
|
title: ""
|
|
221
223
|
}, /*#__PURE__*/_react["default"].createElement(_common.FontStyles, {
|
|
222
224
|
onChange: function onChange(value) {
|
|
223
|
-
_extends(
|
|
225
|
+
_extends(_data, value);
|
|
224
226
|
|
|
225
227
|
_this.selfRender();
|
|
226
228
|
},
|
|
227
|
-
value:
|
|
229
|
+
value: _data
|
|
228
230
|
})));
|
|
229
231
|
};
|
|
230
232
|
|
|
231
|
-
var ButtonBorderSetting = function ButtonBorderSetting(
|
|
233
|
+
var ButtonBorderSetting = function ButtonBorderSetting(_data) {
|
|
232
234
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
233
235
|
split: true,
|
|
234
236
|
title: (0, _locale.i18n)('BORDER_COLOR')
|
|
235
237
|
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
236
238
|
colorType: "rgba",
|
|
237
239
|
onChange: function onChange(value) {
|
|
238
|
-
_this.updateAttr(
|
|
240
|
+
_this.updateAttr(_data, 'borderColor', value);
|
|
239
241
|
},
|
|
240
|
-
value:
|
|
242
|
+
value: _data.borderColor
|
|
241
243
|
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
242
244
|
title: (0, _locale.i18n)('BORDER_RADIUS')
|
|
243
245
|
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
@@ -245,15 +247,15 @@ function (_super) {
|
|
|
245
247
|
onChange: function onChange(_a) {
|
|
246
248
|
var count = _a.count;
|
|
247
249
|
|
|
248
|
-
_this.updateAttr(
|
|
250
|
+
_this.updateAttr(_data, 'borderRadius', count);
|
|
249
251
|
},
|
|
250
252
|
value: {
|
|
251
|
-
count:
|
|
253
|
+
count: _data.borderRadius
|
|
252
254
|
}
|
|
253
255
|
})));
|
|
254
256
|
};
|
|
255
257
|
|
|
256
|
-
var ButtonIconSetting = function ButtonIconSetting(
|
|
258
|
+
var ButtonIconSetting = function ButtonIconSetting(_data) {
|
|
257
259
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
258
260
|
title: (0, _locale.i18n)('ICON')
|
|
259
261
|
}, /*#__PURE__*/_react["default"].createElement(_common.IconPicker, {
|
|
@@ -262,18 +264,18 @@ function (_super) {
|
|
|
262
264
|
},
|
|
263
265
|
onClick: function onClick() {
|
|
264
266
|
_this.setState({
|
|
265
|
-
isHover:
|
|
267
|
+
isHover: _data == _this.props._data.hover.buttonIcon
|
|
266
268
|
});
|
|
267
269
|
},
|
|
268
|
-
value:
|
|
269
|
-
})),
|
|
270
|
+
value: _data.iconUrl
|
|
271
|
+
})), _data.iconUrl && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
270
272
|
title: (0, _locale.i18n)('ICON_PLACEMENT')
|
|
271
273
|
}, /*#__PURE__*/_react["default"].createElement(_common.ButtonIconLayout, {
|
|
272
|
-
icon:
|
|
274
|
+
icon: _data.iconUrl,
|
|
273
275
|
onChange: function onChange(value) {
|
|
274
|
-
return _this.updateAttr(
|
|
276
|
+
return _this.updateAttr(_data, 'layout', value);
|
|
275
277
|
},
|
|
276
|
-
value:
|
|
278
|
+
value: _data.layout
|
|
277
279
|
})));
|
|
278
280
|
};
|
|
279
281
|
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.addZero = exports.addUrlQuery = void 0;
|
|
|
7
7
|
exports.asyncDataURLtoImage = asyncDataURLtoImage;
|
|
8
8
|
exports.checkFileName = exports.calcLastTime = exports.asyncNextTick = void 0;
|
|
9
9
|
exports.commonFetch = commonFetch;
|
|
10
|
-
exports.compatibleNewPageData = void 0;
|
|
10
|
+
exports.convertCount = exports.compatibleNewPageData = void 0;
|
|
11
11
|
exports.convertImageUrl = convertImageUrl;
|
|
12
12
|
exports.convertToRem = void 0;
|
|
13
13
|
exports.copy2ClipBoard = copy2ClipBoard;
|
|
@@ -776,7 +776,7 @@ var pxToRem = function pxToRem(styleObj) {
|
|
|
776
776
|
if (typeof value === 'string' && value.endsWith('px')) {
|
|
777
777
|
remObj[key] = convertToRem(value.split('px')[0]);
|
|
778
778
|
} else if (typeof value === 'number') {
|
|
779
|
-
remObj[key] = ['opacity', 'lineHeight', 'zIndex'].includes(key) ? value : convertToRem(value);
|
|
779
|
+
remObj[key] = ['opacity', 'lineHeight', 'zIndex', 'fontWeight'].includes(key) ? value : convertToRem(value);
|
|
780
780
|
} else if ((key === 'padding' || key === 'margin') && typeof value === 'string') {
|
|
781
781
|
var paddingValues = value.split(' ');
|
|
782
782
|
var remPaddingValues = paddingValues.map(function (paddingValue) {
|
|
@@ -884,4 +884,18 @@ var downloadBase64Image = function downloadBase64Image(base64String, filename) {
|
|
|
884
884
|
link.click();
|
|
885
885
|
};
|
|
886
886
|
|
|
887
|
-
exports.downloadBase64Image = downloadBase64Image;
|
|
887
|
+
exports.downloadBase64Image = downloadBase64Image;
|
|
888
|
+
|
|
889
|
+
var convertCount = function convertCount(value) {
|
|
890
|
+
var newValue = value;
|
|
891
|
+
|
|
892
|
+
if (value >= 1000000) {
|
|
893
|
+
newValue = Number(value / 1000000).toFixed(1) + "M";
|
|
894
|
+
} else if (value >= 1000) {
|
|
895
|
+
newValue = Number(value / 1000).toFixed(1) + "K";
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
return newValue;
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
exports.convertCount = convertCount;
|