@fonixtree/magic-design 0.0.28 → 0.0.29
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/common/ButtonIconLayout/index.js +4 -2
- package/es/common/ImageModal/index.js +5 -3
- package/es/common/ImagePicker/index.js +6 -4
- package/es/common/LinkModal/FilteredProductModal/index.js +12 -10
- package/es/common/LinkModal/ProductDetailPage/index.js +5 -3
- package/es/common/LinkModal/index.js +7 -5
- package/es/common/ProductModal/index.js +26 -24
- package/es/common/ProductSource/index.js +6 -2
- package/es/common/UrlPicker/index.js +3 -1
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +4 -6
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +11 -9
- package/es/composite-comp/bol/components/Carousel/pc/index.js +15 -24
- package/es/composite-comp/bol/components/Carousel/pc/index.less +0 -8
- package/es/composite-comp/bol/components/ImageText/mobile/index.js +3 -2
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -9
- package/es/composite-comp/bol/config-panels/BannerConfig/index.js +5 -3
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent/index.js +4 -2
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +6 -4
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.js +10 -8
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +7 -6
- package/es/composite-comp/bol/config-panels/DividerConfig/DividerConfigSetting/index.js +3 -1
- package/es/composite-comp/bol/config-panels/DividerConfig/DividerContentSetting/index.js +7 -5
- package/es/composite-comp/bol/config-panels/DividerConfig/DividerSpacingSetting/index.js +3 -1
- package/es/composite-comp/bol/config-panels/DividerConfig/index.js +6 -4
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +6 -4
- package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/ImageTextConfig/index.js +12 -12
- package/es/composite-comp/bol/config-panels/NewsletterConfig/InputField/index.js +9 -7
- package/es/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +5 -3
- package/es/composite-comp/bol/config-panels/NewsletterConfig/index.js +4 -4
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +3 -3
- package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +4 -4
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigContent/index.js +4 -2
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/TextCompConfig/index.js +7 -5
- package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +10 -8
- package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +9 -7
- package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +3 -3
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +9 -7
- package/es/composite-comp/bol/second-config-panels/TextSecondConfig/TextContentConfigContent/index.js +4 -2
- package/es/composite-comp/bol/second-config-panels/TextSecondConfig/index.js +3 -1
- package/es/composite-comp/common/components/ProductItem/index.js +1 -1
- package/es/composite-comp/common/config-panels/BackgroundConfig/index.js +5 -3
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +4 -2
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +6 -19
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +3 -1
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +10 -8
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigTitle/index.js +5 -3
- package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +6 -4
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +6 -4
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +3 -1
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +6 -4
- package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +8 -6
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +12 -10
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +11 -9
- package/es/constants/index.js +1 -1
- package/es/core/Designer/CompListPanel/index.js +4 -2
- package/es/core/Designer/ConfigPanel/index.js +3 -1
- package/es/core/Designer/PageCompList/index.js +4 -4
- package/es/core/Designer/QuickMenuBar/index.js +17 -61
- package/es/core/Designer/index.js +10 -14
- package/es/locale/en/en.json +121 -0
- package/es/locale/id/id.json +121 -0
- package/es/locale/index.js +12 -5
- package/es/meta-comp/components/Image/index.js +0 -5
- package/es/meta-comp/config-panels/ButtonConfig/index.js +23 -21
- package/es/meta-comp/config-panels/ImageConfig/index.js +8 -6
- package/es/meta-comp/config-panels/TextConfig/index.js +14 -12
- package/es/mobx/Store.js +2 -2
- package/lib/common/ButtonIconLayout/index.js +4 -2
- package/lib/common/ImageModal/index.js +5 -3
- package/lib/common/ImagePicker/index.js +6 -4
- package/lib/common/LinkModal/FilteredProductModal/index.js +12 -10
- package/lib/common/LinkModal/ProductDetailPage/index.js +5 -3
- package/lib/common/LinkModal/index.js +7 -5
- package/lib/common/ProductModal/index.js +26 -24
- package/lib/common/ProductSource/index.js +6 -2
- package/lib/common/UrlPicker/index.js +3 -1
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +4 -6
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +11 -9
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +15 -24
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +0 -8
- package/lib/composite-comp/bol/components/ImageText/mobile/index.js +3 -2
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -9
- package/lib/composite-comp/bol/config-panels/BannerConfig/index.js +5 -3
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent/index.js +4 -2
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +6 -4
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.js +10 -8
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +7 -6
- package/lib/composite-comp/bol/config-panels/DividerConfig/DividerConfigSetting/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/DividerConfig/DividerContentSetting/index.js +7 -5
- package/lib/composite-comp/bol/config-panels/DividerConfig/DividerSpacingSetting/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/DividerConfig/index.js +6 -4
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +6 -4
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/index.js +12 -12
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/InputField/index.js +9 -7
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +5 -3
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/index.js +4 -4
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +4 -4
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigContent/index.js +4 -2
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/TextCompConfig/index.js +7 -5
- package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +10 -8
- package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +9 -7
- package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +3 -3
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +9 -7
- package/lib/composite-comp/bol/second-config-panels/TextSecondConfig/TextContentConfigContent/index.js +4 -2
- package/lib/composite-comp/bol/second-config-panels/TextSecondConfig/index.js +3 -1
- package/lib/composite-comp/common/components/ProductItem/index.js +1 -1
- package/lib/composite-comp/common/config-panels/BackgroundConfig/index.js +5 -3
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +4 -2
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +6 -19
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +3 -1
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +10 -8
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigTitle/index.js +5 -3
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +6 -4
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +6 -4
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +3 -1
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +6 -4
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +8 -6
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +12 -10
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +11 -9
- package/lib/constants/index.js +1 -1
- package/lib/core/Designer/CompListPanel/index.js +4 -2
- package/lib/core/Designer/ConfigPanel/index.js +3 -1
- package/lib/core/Designer/PageCompList/index.js +4 -4
- package/lib/core/Designer/QuickMenuBar/index.js +17 -61
- package/lib/core/Designer/index.js +10 -14
- package/lib/locale/en/en.json +121 -0
- package/lib/locale/id/id.json +121 -0
- package/lib/locale/index.js +12 -5
- package/lib/meta-comp/components/Image/index.js +0 -5
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +23 -21
- package/lib/meta-comp/config-panels/ImageConfig/index.js +8 -6
- package/lib/meta-comp/config-panels/TextConfig/index.js +14 -12
- package/lib/mobx/Store.js +2 -2
- package/package.json +3 -80
- package/README.md +0 -311
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
|
@@ -183,16 +183,16 @@ function PageCompList(_a) {
|
|
|
183
183
|
}, index !== 0 && /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, {
|
|
184
184
|
className: "menu_item",
|
|
185
185
|
value: "1"
|
|
186
|
-
},
|
|
186
|
+
}, (0, _locale.i18n)('MOVE_UP')), index !== components.length - 1 && /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, {
|
|
187
187
|
className: "menu_item",
|
|
188
188
|
value: "2"
|
|
189
|
-
},
|
|
189
|
+
}, (0, _locale.i18n)('MOVE_DOWN')), /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, {
|
|
190
190
|
className: "menu_item",
|
|
191
191
|
value: "3"
|
|
192
|
-
},
|
|
192
|
+
}, (0, _locale.i18n)('COPY')), /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, {
|
|
193
193
|
className: "menu_item",
|
|
194
194
|
value: "4"
|
|
195
|
-
},
|
|
195
|
+
}, (0, _locale.i18n)('DELETE')));
|
|
196
196
|
|
|
197
197
|
var dragging = dragId === String(comp.id);
|
|
198
198
|
var active = clickedFloor === String(comp.id);
|
|
@@ -7,16 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = void 0;
|
|
9
9
|
|
|
10
|
-
var _antd = require("antd");
|
|
11
|
-
|
|
12
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
11
|
|
|
14
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
13
|
|
|
16
|
-
var _storeUtil = require("../../../utils/storeUtil");
|
|
17
|
-
|
|
18
|
-
var _mobx = require("../../../mobx");
|
|
19
|
-
|
|
20
14
|
var _Button = _interopRequireDefault(require("../../../common/Button"));
|
|
21
15
|
|
|
22
16
|
var _Iconfont = _interopRequireDefault(require("../../../common/Iconfont"));
|
|
@@ -25,6 +19,8 @@ var _constants = require("../../../constants");
|
|
|
25
19
|
|
|
26
20
|
require("./index.less");
|
|
27
21
|
|
|
22
|
+
var _locale = require("../../../locale");
|
|
23
|
+
|
|
28
24
|
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); }
|
|
29
25
|
|
|
30
26
|
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; }
|
|
@@ -58,15 +54,20 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
58
54
|
}();
|
|
59
55
|
|
|
60
56
|
var langBook = {
|
|
61
|
-
|
|
57
|
+
Indonesian: {
|
|
62
58
|
text: 'Indonesian',
|
|
63
59
|
color: '#FF8541',
|
|
64
60
|
backColor: '#FFF8F0'
|
|
65
61
|
},
|
|
66
|
-
|
|
62
|
+
English: {
|
|
67
63
|
text: 'English',
|
|
68
64
|
color: '#00AC5A',
|
|
69
65
|
backColor: '#DFF3EA'
|
|
66
|
+
},
|
|
67
|
+
Spain: {
|
|
68
|
+
text: 'Spain',
|
|
69
|
+
color: '#00AC50',
|
|
70
|
+
backColor: '#DFF3E0'
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
73
|
|
|
@@ -78,19 +79,9 @@ function (_super) {
|
|
|
78
79
|
function QuickMenuBar() {
|
|
79
80
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
80
81
|
|
|
81
|
-
_this.state = {
|
|
82
|
-
language: _mobx.store.language
|
|
83
|
-
};
|
|
84
|
-
|
|
85
82
|
_this.onBtnClick = function (event) {
|
|
86
83
|
var code = event.currentTarget.dataset.code;
|
|
87
84
|
|
|
88
|
-
if (code === _constants.quickMenuCode.SAVE || code === _constants.quickMenuCode.PUBLISH) {
|
|
89
|
-
_mobx.store.setState({
|
|
90
|
-
clickedFloor: ''
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
85
|
if (_this.props.device === _constants.deviceTypeMap.PC) {}
|
|
95
86
|
|
|
96
87
|
_this.props.onBtnClick(code);
|
|
@@ -99,29 +90,12 @@ function (_super) {
|
|
|
99
90
|
return _this;
|
|
100
91
|
}
|
|
101
92
|
|
|
102
|
-
QuickMenuBar.prototype.componentDidMount = function () {
|
|
103
|
-
var _this = this;
|
|
104
|
-
|
|
105
|
-
this.destory = (0, _mobx.autorun)(function () {
|
|
106
|
-
if (_this.state.language != _mobx.store.language) {
|
|
107
|
-
_this.setState({
|
|
108
|
-
language: _mobx.store.language
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
QuickMenuBar.prototype.componentWillUnmount = function () {
|
|
115
|
-
if (this.destory) this.destory();
|
|
116
|
-
};
|
|
117
|
-
|
|
118
93
|
QuickMenuBar.prototype.render = function () {
|
|
119
|
-
var language = this.state.language;
|
|
120
94
|
var _a = this.props,
|
|
121
95
|
device = _a.device,
|
|
122
96
|
undoDisable = _a.undoDisable,
|
|
123
|
-
redoDisable = _a.redoDisable
|
|
124
|
-
|
|
97
|
+
redoDisable = _a.redoDisable,
|
|
98
|
+
language = _a.language;
|
|
125
99
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
126
100
|
className: "quick_menu_wrap"
|
|
127
101
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -129,8 +103,8 @@ function (_super) {
|
|
|
129
103
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
130
104
|
className: "language",
|
|
131
105
|
style: {
|
|
132
|
-
color:
|
|
133
|
-
background:
|
|
106
|
+
color: langBook[language].color,
|
|
107
|
+
background: langBook[language].backColor
|
|
134
108
|
}
|
|
135
109
|
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
136
110
|
size: "20px",
|
|
@@ -138,25 +112,7 @@ function (_super) {
|
|
|
138
112
|
marginRight: '8px'
|
|
139
113
|
},
|
|
140
114
|
type: "icon-language"
|
|
141
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
142
|
-
overlay: /*#__PURE__*/_react["default"].createElement(_antd.Menu, {
|
|
143
|
-
items: Object.keys(langBook).map(function (key) {
|
|
144
|
-
return {
|
|
145
|
-
onClick: function onClick() {
|
|
146
|
-
/** 持久化国际化配置 */
|
|
147
|
-
(0, _storeUtil.setStore)(_constants.STORAGE_KEY.LANGUAGE, key);
|
|
148
|
-
|
|
149
|
-
_mobx.store.setState({
|
|
150
|
-
language: key
|
|
151
|
-
});
|
|
152
|
-
},
|
|
153
|
-
label: langBook[key].text,
|
|
154
|
-
key: key
|
|
155
|
-
};
|
|
156
|
-
})
|
|
157
|
-
}),
|
|
158
|
-
trigger: ['click']
|
|
159
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, selectLanguage.text)))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
115
|
+
}), langBook[language].text)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
160
116
|
className: "menu_center"
|
|
161
117
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
162
118
|
className: "device_group"
|
|
@@ -199,19 +155,19 @@ function (_super) {
|
|
|
199
155
|
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
200
156
|
"data-code": _constants.quickMenuCode.PREVIEW,
|
|
201
157
|
onClick: this.onBtnClick
|
|
202
|
-
},
|
|
158
|
+
}, (0, _locale.i18n)('PREVIEW')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
203
159
|
"data-code": _constants.quickMenuCode.SAVE,
|
|
204
160
|
disabled: window.magicDesign.readOnly,
|
|
205
161
|
onClick: this.onBtnClick,
|
|
206
162
|
tip: "The page is in use. Please copy or create a new page",
|
|
207
163
|
type: "light"
|
|
208
|
-
},
|
|
164
|
+
}, (0, _locale.i18n)('SAVE')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
209
165
|
"data-code": _constants.quickMenuCode.PUBLISH,
|
|
210
166
|
disabled: window.magicDesign.readOnly,
|
|
211
167
|
onClick: this.onBtnClick,
|
|
212
168
|
tip: "The page is in use. Please copy or create a new page",
|
|
213
169
|
type: "primary"
|
|
214
|
-
},
|
|
170
|
+
}, (0, _locale.i18n)('PUBLISH'))));
|
|
215
171
|
};
|
|
216
172
|
|
|
217
173
|
return QuickMenuBar;
|
|
@@ -342,6 +342,7 @@ function (_super) {
|
|
|
342
342
|
_this.renderHeader = function () {
|
|
343
343
|
return /*#__PURE__*/_react["default"].createElement(_QuickMenuBar["default"], {
|
|
344
344
|
device: _this.state.device,
|
|
345
|
+
language: _this.props.language,
|
|
345
346
|
onBtnClick: _this.onQuickMenuClick,
|
|
346
347
|
redoDisable: !_this.history.redoAble(),
|
|
347
348
|
undoDisable: !_this.history.undoAble()
|
|
@@ -350,20 +351,20 @@ function (_super) {
|
|
|
350
351
|
|
|
351
352
|
var pageData = props.pageData,
|
|
352
353
|
config = props.config,
|
|
353
|
-
|
|
354
|
+
locale = props.locale;
|
|
354
355
|
var MPageData = pageData.childNodes || [];
|
|
355
356
|
|
|
356
357
|
_mobx.store.setState({
|
|
357
358
|
MPageData: MPageData
|
|
358
359
|
});
|
|
359
|
-
/**
|
|
360
|
+
/** 使用默认国际化 */
|
|
361
|
+
// if (!store.locale) {
|
|
360
362
|
|
|
361
363
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
364
|
+
_mobx.store.setState({
|
|
365
|
+
locale: locale
|
|
366
|
+
}); // }
|
|
367
|
+
|
|
367
368
|
|
|
368
369
|
_this.configRef = /*#__PURE__*/_react["default"].createRef();
|
|
369
370
|
_this.viewAreaRef = /*#__PURE__*/_react["default"].createRef();
|
|
@@ -384,15 +385,10 @@ function (_super) {
|
|
|
384
385
|
window.document.addEventListener('component-click', this.componentClick); // 复合组件重新渲染事件
|
|
385
386
|
|
|
386
387
|
window.document.addEventListener('render-view', this.reRenderViewArea);
|
|
387
|
-
/** 晴雯定制 1分钟保存一次 以防晴雯忘记保存原地崩溃 */
|
|
388
|
-
// setTimeout(() => {
|
|
389
|
-
// this.onQuickMenuClick(quickMenuCode.SAVE);
|
|
390
|
-
// }, 60 * 1000);
|
|
391
|
-
|
|
392
388
|
this.destory = (0, _mobx.autorun)(function () {
|
|
393
|
-
if (_this.state.
|
|
389
|
+
if (_this.state.locale != _mobx.store.locale) {
|
|
394
390
|
_this.setState({
|
|
395
|
-
|
|
391
|
+
locale: _mobx.store.locale
|
|
396
392
|
});
|
|
397
393
|
}
|
|
398
394
|
});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SAVE": "Save",
|
|
3
|
+
"ADD_GROUP": "Add Group",
|
|
4
|
+
"CONTENT_WIDTH": "Content Width",
|
|
5
|
+
"MAGNIFICATION": "Magnification",
|
|
6
|
+
"RECOMMENDED_RULES": "Recommended Rules",
|
|
7
|
+
"PRODUCT_SORT_BY": "product sort by",
|
|
8
|
+
"PADDING": "Padding",
|
|
9
|
+
"COMPONENT_SPACING": "Component spacing",
|
|
10
|
+
"ALIGNMENT": "Alignment",
|
|
11
|
+
"LAYOUT": "Layout",
|
|
12
|
+
"BACKGROUND": "Background",
|
|
13
|
+
"PLACEHOLDER": "Placeholder",
|
|
14
|
+
"FONT_STYLE": "Font Style",
|
|
15
|
+
"FONT_FAMILY": "font Family",
|
|
16
|
+
"FONT_WEIGHT": "font Weight",
|
|
17
|
+
"FONT_SIZE": "Font Size",
|
|
18
|
+
"LINE_SPACING": "Line Spacing",
|
|
19
|
+
"LINE_COLOR": "Line Color",
|
|
20
|
+
"LINE_WEIGHT": "Line Weight",
|
|
21
|
+
"LINE_STYLE": "Line Style",
|
|
22
|
+
"LINE_WIDTH": "Line Width",
|
|
23
|
+
"HEIGHT_AND_COLOR": "Height And Color",
|
|
24
|
+
"HOW_LONG_BETWEEN_SLIDES(SECS)": "How long between slides(secs)",
|
|
25
|
+
"NAVIGATION_ARROW": "Navigation arrow",
|
|
26
|
+
"SELECTED_ARROW": "Selected arrow",
|
|
27
|
+
"SLIDE_BUTTON": "Slide button",
|
|
28
|
+
"SELECTED_BUTTON": "Selected button",
|
|
29
|
+
"BANNER_HEIGHT": "Banner Height",
|
|
30
|
+
"IMAGE": "Image",
|
|
31
|
+
"PRODUCT_NAME": "Product Name",
|
|
32
|
+
"PRODUCT_CODE": "Product Code",
|
|
33
|
+
"SKU": "SKU",
|
|
34
|
+
"PRICE": "Price",
|
|
35
|
+
"BRAND": "Brand",
|
|
36
|
+
"STORE": "Store",
|
|
37
|
+
"PRODUCT_SELECT": "Product Select",
|
|
38
|
+
"URL_SETUP": "URL Setup",
|
|
39
|
+
"NEW_IMAGE": "New image",
|
|
40
|
+
"ENLARGE": "Enlarge",
|
|
41
|
+
"PUBLISH": "Publish",
|
|
42
|
+
"PREVIEW": "Preview",
|
|
43
|
+
"MOVE_UP": "Move Up",
|
|
44
|
+
"MOVE_DOWN": "Move Down",
|
|
45
|
+
"COPY": "Copy",
|
|
46
|
+
"DELETE": "Delete",
|
|
47
|
+
"DONE": "Done",
|
|
48
|
+
"ADD_COMPONENT": "Add Component",
|
|
49
|
+
"ALL": "ALL",
|
|
50
|
+
"HOT": "Hot",
|
|
51
|
+
"GUESS_YOU_LIKE": "Guess you like",
|
|
52
|
+
"CATEGORY": "Category",
|
|
53
|
+
"LABEL": "Label",
|
|
54
|
+
"UNDERLINE_STYLE": "Underline Style",
|
|
55
|
+
"UNDERLINE_COLOR": "Underline Color",
|
|
56
|
+
"UNDERLINE_SETTING": "Underline Setting",
|
|
57
|
+
"BUTTON_COLOR": "Button Color",
|
|
58
|
+
"BORDER_RADIUS": "Border Radius",
|
|
59
|
+
"BORDER_COLOR": "Border Color",
|
|
60
|
+
"ICON_PLACEMENT": "Icon Placement",
|
|
61
|
+
"SOURCE_OF_PRODUCT": "Source Of Product",
|
|
62
|
+
"AI_RECOMMENDATION": "AI Recommendation",
|
|
63
|
+
"SELECT_PRODUCT": "Select Product",
|
|
64
|
+
"COLOR": "Color",
|
|
65
|
+
"AUTOPLAYS": "Autoplays",
|
|
66
|
+
"SHOW_NAVIGATION_ARROW": "Show navigation arrow",
|
|
67
|
+
"SHOW_SLIDE_BUTTON": "Show slide button",
|
|
68
|
+
"CONTENT": "Content",
|
|
69
|
+
"SPACING": "Spacing",
|
|
70
|
+
"CUSTOMIZE": "Customize",
|
|
71
|
+
"BUTTON": "Button",
|
|
72
|
+
"SECONDARY_BUTTON": "Secondary Button",
|
|
73
|
+
"SETTING": "Setting",
|
|
74
|
+
"SHOW_DIVIDER": "Show Divider",
|
|
75
|
+
"SUBTITLE": "Subtitle",
|
|
76
|
+
"HEADLINE": "Headline",
|
|
77
|
+
"GROUP": "Group",
|
|
78
|
+
"INPUT_FIELD": "Input Field",
|
|
79
|
+
"CONFIRMATION": "Confirmation",
|
|
80
|
+
"IMAGE_TAG": "Image Tag",
|
|
81
|
+
"BUTTON_TAG": "Button Tag",
|
|
82
|
+
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
83
|
+
"TITLE": "Title",
|
|
84
|
+
"HOVER": "Hover",
|
|
85
|
+
"ICON": "Icon",
|
|
86
|
+
"ACTIVITY_PRICE": "Activity Price",
|
|
87
|
+
"SALES_PRICE": "Sales Price",
|
|
88
|
+
"LOGO": "Logo",
|
|
89
|
+
"BUTTON_TEXT_SETTING": "Button Text Setting",
|
|
90
|
+
"BUTTON_BORDER_SETTING": "Button Border Setting",
|
|
91
|
+
"BUTTON_ICON_SETTING": "Button Icon Setting",
|
|
92
|
+
"SALES_PROGRESS": "Sales Progress",
|
|
93
|
+
"SALES": "Sales",
|
|
94
|
+
"NEXT": "Next",
|
|
95
|
+
"REGULAR": "Regular",
|
|
96
|
+
"MEDIUM": "Medium",
|
|
97
|
+
"ADD_IMAGE": "Add Image",
|
|
98
|
+
"ADD_BANNER": "Add Banner",
|
|
99
|
+
"TOTAL_PRODUCTS": "Total {count} products",
|
|
100
|
+
"SELECTED": "Selected",
|
|
101
|
+
"GROUP_BUY": "Group Buy",
|
|
102
|
+
"RESET": "Reset",
|
|
103
|
+
"QUERY": "Query",
|
|
104
|
+
"SEARCH": "Search",
|
|
105
|
+
"GROUP_BY": "Group By",
|
|
106
|
+
"FLASH_SALE": "Flash Sale",
|
|
107
|
+
"THE_PRODUCT_QUANTITY_WILL_BE_AUTOMATICALLY_UPDATED_WITH_THE_ITEMS_THAT_MEET_THE_CATEGORY_CONDITIONS": "The product quantity will be automatically updated with the items that meet the category conditions",
|
|
108
|
+
"OK": "OK",
|
|
109
|
+
"CANCEL": "Cancel",
|
|
110
|
+
"LINK_TYPE": "Link Type",
|
|
111
|
+
"LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_": "Looks like you do not have any images in your gallery. Choose images to feature on this page.",
|
|
112
|
+
"EDIT": "Edit",
|
|
113
|
+
"MINIMUM": "Minimum",
|
|
114
|
+
"MAXIMUM": "Maximum",
|
|
115
|
+
"PLEASE_ADD_A_LINK": "Please add a link",
|
|
116
|
+
"PLEASE_INPUT": "Please Input",
|
|
117
|
+
"PLEASE_SELECT": "Please select",
|
|
118
|
+
"PLEASE_SEARCH": "Please Search",
|
|
119
|
+
"KEYWRODS": "Keywrods",
|
|
120
|
+
"TEXT": "Text"
|
|
121
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SAVE": "Save",
|
|
3
|
+
"ADD_GROUP": "Add Group",
|
|
4
|
+
"CONTENT_WIDTH": "Content Width",
|
|
5
|
+
"MAGNIFICATION": "Magnification",
|
|
6
|
+
"RECOMMENDED_RULES": "Recommended Rules",
|
|
7
|
+
"PRODUCT_SORT_BY": "product sort by",
|
|
8
|
+
"PADDING": "Padding",
|
|
9
|
+
"COMPONENT_SPACING": "Component spacing",
|
|
10
|
+
"ALIGNMENT": "Alignment",
|
|
11
|
+
"LAYOUT": "Layout",
|
|
12
|
+
"BACKGROUND": "Background",
|
|
13
|
+
"PLACEHOLDER": "Placeholder",
|
|
14
|
+
"FONT_STYLE": "Font Style",
|
|
15
|
+
"FONT_FAMILY": "font Family",
|
|
16
|
+
"FONT_WEIGHT": "font Weight",
|
|
17
|
+
"FONT_SIZE": "Font Size",
|
|
18
|
+
"LINE_SPACING": "Line Spacing",
|
|
19
|
+
"LINE_COLOR": "Line Color",
|
|
20
|
+
"LINE_WEIGHT": "Line Weight",
|
|
21
|
+
"LINE_STYLE": "Line Style",
|
|
22
|
+
"LINE_WIDTH": "Line Width",
|
|
23
|
+
"HEIGHT_AND_COLOR": "Height And Color",
|
|
24
|
+
"HOW_LONG_BETWEEN_SLIDES(SECS)": "How long between slides(secs)",
|
|
25
|
+
"NAVIGATION_ARROW": "Navigation arrow",
|
|
26
|
+
"SELECTED_ARROW": "Selected arrow",
|
|
27
|
+
"SLIDE_BUTTON": "Slide button",
|
|
28
|
+
"SELECTED_BUTTON": "Selected button",
|
|
29
|
+
"BANNER_HEIGHT": "Banner Height",
|
|
30
|
+
"IMAGE": "Image",
|
|
31
|
+
"PRODUCT_NAME": "Product Name",
|
|
32
|
+
"PRODUCT_CODE": "Product Code",
|
|
33
|
+
"SKU": "SKU",
|
|
34
|
+
"PRICE": "Price",
|
|
35
|
+
"BRAND": "Brand",
|
|
36
|
+
"STORE": "Store",
|
|
37
|
+
"PRODUCT_SELECT": "Product Select",
|
|
38
|
+
"URL_SETUP": "URL Setup",
|
|
39
|
+
"NEW_IMAGE": "New image",
|
|
40
|
+
"ENLARGE": "Enlarge",
|
|
41
|
+
"PUBLISH": "Publish",
|
|
42
|
+
"PREVIEW": "Preview",
|
|
43
|
+
"MOVE_UP": "Move Up",
|
|
44
|
+
"MOVE_DOWN": "Move Down",
|
|
45
|
+
"COPY": "Copy",
|
|
46
|
+
"DELETE": "Delete",
|
|
47
|
+
"DONE": "Done",
|
|
48
|
+
"ADD_COMPONENT": "Add Component",
|
|
49
|
+
"ALL": "ALL",
|
|
50
|
+
"HOT": "Hot",
|
|
51
|
+
"GUESS_YOU_LIKE": "Guess you like",
|
|
52
|
+
"CATEGORY": "Category",
|
|
53
|
+
"LABEL": "Label",
|
|
54
|
+
"UNDERLINE_STYLE": "Underline Style",
|
|
55
|
+
"UNDERLINE_COLOR": "Underline Color",
|
|
56
|
+
"UNDERLINE_SETTING": "Underline Setting",
|
|
57
|
+
"BUTTON_COLOR": "Button Color",
|
|
58
|
+
"BORDER_RADIUS": "Border Radius",
|
|
59
|
+
"BORDER_COLOR": "Border Color",
|
|
60
|
+
"ICON_PLACEMENT": "Icon Placement",
|
|
61
|
+
"SOURCE_OF_PRODUCT": "Source Of Product",
|
|
62
|
+
"AI_RECOMMENDATION": "AI Recommendation",
|
|
63
|
+
"SELECT_PRODUCT": "Select Product",
|
|
64
|
+
"COLOR": "Color",
|
|
65
|
+
"AUTOPLAYS": "Autoplays",
|
|
66
|
+
"SHOW_NAVIGATION_ARROW": "Show navigation arrow",
|
|
67
|
+
"SHOW_SLIDE_BUTTON": "Show slide button",
|
|
68
|
+
"CONTENT": "Content",
|
|
69
|
+
"SPACING": "Spacing",
|
|
70
|
+
"CUSTOMIZE": "Customize",
|
|
71
|
+
"BUTTON": "Button",
|
|
72
|
+
"SECONDARY_BUTTON": "Secondary Button",
|
|
73
|
+
"SETTING": "Setting",
|
|
74
|
+
"SHOW_DIVIDER": "Show Divider",
|
|
75
|
+
"SUBTITLE": "Subtitle",
|
|
76
|
+
"HEADLINE": "Headline",
|
|
77
|
+
"GROUP": "Group",
|
|
78
|
+
"INPUT_FIELD": "Input Field",
|
|
79
|
+
"CONFIRMATION": "Confirmation",
|
|
80
|
+
"IMAGE_TAG": "Image Tag",
|
|
81
|
+
"BUTTON_TAG": "Button Tag",
|
|
82
|
+
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
83
|
+
"TITLE": "Title",
|
|
84
|
+
"HOVER": "Hover",
|
|
85
|
+
"ICON": "Icon",
|
|
86
|
+
"ACTIVITY_PRICE": "Activity Price",
|
|
87
|
+
"SALES_PRICE": "Sales Price",
|
|
88
|
+
"LOGO": "Logo",
|
|
89
|
+
"BUTTON_TEXT_SETTING": "Button Text Setting",
|
|
90
|
+
"BUTTON_BORDER_SETTING": "Button Border Setting",
|
|
91
|
+
"BUTTON_ICON_SETTING": "Button Icon Setting",
|
|
92
|
+
"SALES_PROGRESS": "Sales Progress",
|
|
93
|
+
"SALES": "Sales",
|
|
94
|
+
"NEXT": "Next",
|
|
95
|
+
"REGULAR": "Regular",
|
|
96
|
+
"MEDIUM": "Medium",
|
|
97
|
+
"ADD_IMAGE": "Add Image",
|
|
98
|
+
"ADD_BANNER": "Add Banner",
|
|
99
|
+
"TOTAL_PRODUCTS": "Total {count} products",
|
|
100
|
+
"SELECTED": "Selected",
|
|
101
|
+
"GROUP_BUY": "Group Buy",
|
|
102
|
+
"RESET": "Reset",
|
|
103
|
+
"QUERY": "Query",
|
|
104
|
+
"SEARCH": "Search",
|
|
105
|
+
"GROUP_BY": "Group By",
|
|
106
|
+
"FLASH_SALE": "Flash Sale",
|
|
107
|
+
"THE_PRODUCT_QUANTITY_WILL_BE_AUTOMATICALLY_UPDATED_WITH_THE_ITEMS_THAT_MEET_THE_CATEGORY_CONDITIONS": "The product quantity will be automatically updated with the items that meet the category conditions",
|
|
108
|
+
"OK": "OK",
|
|
109
|
+
"CANCEL": "Cancel",
|
|
110
|
+
"LINK_TYPE": "Link Type",
|
|
111
|
+
"LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_": "Looks like you do not have any images in your gallery. Choose images to feature on this page.",
|
|
112
|
+
"EDIT": "Edit",
|
|
113
|
+
"MINIMUM": "Minimum",
|
|
114
|
+
"MAXIMUM": "Maximum",
|
|
115
|
+
"PLEASE_ADD_A_LINK": "Please add a link",
|
|
116
|
+
"PLEASE_INPUT": "Please Input",
|
|
117
|
+
"PLEASE_SELECT": "Please select",
|
|
118
|
+
"PLEASE_SEARCH": "Please Search",
|
|
119
|
+
"KEYWRODS": "Keywrods",
|
|
120
|
+
"TEXT": "Text"
|
|
121
|
+
}
|
package/es/locale/index.js
CHANGED
|
@@ -24,10 +24,17 @@ function i18n(key, args) {
|
|
|
24
24
|
args = {};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
var tempString = localeMap[_mobx.store.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
var tempString = localeMap[_mobx.store.locale || 'en'][key];
|
|
28
|
+
|
|
29
|
+
if (tempString) {
|
|
30
|
+
Object.keys(args).map(function (key) {
|
|
31
|
+
var reg = new RegExp("{" + key + "}", 'g');
|
|
32
|
+
tempString.replace(reg, args[key]);
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
console.log('未找到国际化KEY:' + key);
|
|
36
|
+
return key;
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
return tempString;
|
|
33
40
|
}
|
|
@@ -74,7 +74,6 @@ function (_super) {
|
|
|
74
74
|
hoverState = _a.hoverState,
|
|
75
75
|
maxHeight = _a.maxHeight,
|
|
76
76
|
maxWidth = _a.maxWidth,
|
|
77
|
-
minWidth = _a.minWidth,
|
|
78
77
|
limitWidthHeight = _a.limitWidthHeight,
|
|
79
78
|
scale = _a.scale;
|
|
80
79
|
var hoverImgSrc = _this.state.hoverImgSrc;
|
|
@@ -93,10 +92,6 @@ function (_super) {
|
|
|
93
92
|
obj.maxWidth = maxWidth;
|
|
94
93
|
}
|
|
95
94
|
|
|
96
|
-
if (minWidth) {
|
|
97
|
-
obj.minWidth = minWidth;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
95
|
if (limitWidthHeight) {
|
|
101
96
|
if ((0, _coreUtil.isPc)()) {
|
|
102
97
|
if (data.content.pcImgWidth) obj.width = data.content.pcImgWidth * scale;
|