@fonixtree/magic-design 2.0.161 → 2.0.163

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.
Binary file
@@ -7,6 +7,13 @@ exports.getDefaultJSON = exports.bannerGroupSourceJSON = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
10
+ var _constants = require("../../../../constants");
11
+
12
+ var _a;
13
+
14
+ var defaultFontFamily = _constants.projectFontFamily[(_a = window.systemParams) === null || _a === void 0 ? void 0 : _a.projectCode] || 'Open Sans1';
15
+ console.log('window.systemParams', window.systemParams);
16
+
10
17
  var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
11
18
  var groupId = (0, _uuid.v4)();
12
19
  return {
@@ -40,7 +47,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
40
47
  specialContent: [],
41
48
  content: {
42
49
  sizeType: 'Customize font styles',
43
- fontFamily: 'Open Sans',
50
+ fontFamily: defaultFontFamily,
44
51
  fontWeight: 700,
45
52
  fontSize: 28,
46
53
  color: '#FFFFFF',
@@ -62,7 +69,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
62
69
  text: 'For the text area, you can enter a subtitle or description, the default width is the same as title.',
63
70
  content: {
64
71
  sizeType: 'Customize font styles',
65
- fontFamily: 'Open Sans',
72
+ fontFamily: defaultFontFamily,
66
73
  fontWeight: 400,
67
74
  fontSize: 18,
68
75
  color: '#FFFFFF',
@@ -83,7 +90,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
83
90
  },
84
91
  buttonText: {
85
92
  sizeType: 'Customize font styles',
86
- fontFamily: 'Open Sans',
93
+ fontFamily: defaultFontFamily,
87
94
  fontWeight: 600,
88
95
  fontSize: 14,
89
96
  fontStyle: 'normal',
@@ -119,7 +126,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
119
126
  },
120
127
  buttonText: {
121
128
  sizeType: 'Customize font styles',
122
- fontFamily: 'Open Sans',
129
+ fontFamily: defaultFontFamily,
123
130
  fontWeight: 600,
124
131
  fontSize: 14,
125
132
  fontStyle: 'normal',
@@ -148,7 +155,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
148
155
  },
149
156
  buttonText: {
150
157
  sizeType: 'Customize font styles',
151
- fontFamily: 'Open Sans',
158
+ fontFamily: defaultFontFamily,
152
159
  fontWeight: 600,
153
160
  fontSize: 14,
154
161
  fontStyle: 'normal',
@@ -184,7 +191,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
184
191
  },
185
192
  buttonText: {
186
193
  sizeType: 'Customize font styles',
187
- fontFamily: 'Open Sans',
194
+ fontFamily: defaultFontFamily,
188
195
  fontWeight: 600,
189
196
  fontSize: 14,
190
197
  fontStyle: 'normal',
@@ -19,6 +19,8 @@ var _TextConfig = require("../../../../meta-comp/config-panels/TextConfig");
19
19
 
20
20
  var _locale = require("../../../../locale");
21
21
 
22
+ var _constants = require("../../../../constants");
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
25
 
24
26
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -91,6 +93,9 @@ function (_super) {
91
93
  data = _a.data,
92
94
  inputLabel = _a.inputLabel;
93
95
  var textData = data.content;
96
+
97
+ var _fontWeightList = textData.fontFamily === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
98
+
94
99
  return /*#__PURE__*/_react["default"].createElement("div", {
95
100
  className: "m-text-config"
96
101
  }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
@@ -135,13 +140,12 @@ function (_super) {
135
140
  _this.selfRender();
136
141
  },
137
142
  value: textData.fontFamily
138
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
139
- value: "Montserrat"
140
- }, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
141
- value: "Open Sans"
142
- }, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
143
- value: "Inter"
144
- }, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
143
+ }, _constants.fontFamilyList.map(function (v) {
144
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
145
+ label: v.name,
146
+ value: v.value
147
+ }, v.name);
148
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
145
149
  title: (0, _locale.i18n)('FONT_WEIGHT')
146
150
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
147
151
  onChange: function onChange(v) {
@@ -150,11 +154,12 @@ function (_super) {
150
154
  _this.selfRender();
151
155
  },
152
156
  value: textData.fontWeight
153
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
154
- value: 400
155
- }, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
156
- value: 600
157
- }, (0, _locale.i18n)('MEDIUM')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
157
+ }, _fontWeightList.map(function (v) {
158
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
159
+ label: v.name,
160
+ value: v.value
161
+ }, v.name);
162
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
158
163
  title: (0, _locale.i18n)('FONT_SIZE')
159
164
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
160
165
  onChange: function onChange(_a) {
@@ -21,6 +21,8 @@ var _BaseConfig = _interopRequireDefault(require("../../../../../meta-comp/confi
21
21
 
22
22
  var _locale = require("../../../../../locale");
23
23
 
24
+ var _constants = require("../../../../../constants");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
27
 
26
28
  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); }
@@ -71,20 +73,13 @@ var __assign = void 0 && (void 0).__assign || function () {
71
73
  return __assign.apply(this, arguments);
72
74
  };
73
75
 
74
- // type PageOwnState = {
75
- // /** 是否选择 Button Hover Icon */
76
- // isHover: boolean;
77
- // }
78
76
  var TextOnlyFontConfig =
79
77
  /** @class */
80
78
  function (_super) {
81
79
  __extends(TextOnlyFontConfig, _super);
82
80
 
83
81
  function TextOnlyFontConfig() {
84
- var _this = _super !== null && _super.apply(this, arguments) || this; // state: PageOwnState = {
85
- // isHover: false,
86
- // }
87
-
82
+ var _this = _super !== null && _super.apply(this, arguments) || this;
88
83
 
89
84
  _this.onChangeButtonIcon = function (icon) {
90
85
  var data = _this.props.data;
@@ -94,21 +89,14 @@ function (_super) {
94
89
  };
95
90
 
96
91
  return _this;
97
- } // componentDidMount() {
98
- // window.document.addEventListener('text-render', this.selfRender);
99
- // }
100
- // componentWillUnmount() {
101
- // window.document.removeEventListener('text-render', this.selfRender);
102
- // }
103
-
92
+ }
104
93
 
105
94
  TextOnlyFontConfig.prototype.render = function () {
106
95
  var _this = this;
107
96
 
108
97
  var _a = this.props,
109
98
  data = _a.data,
110
- needIcon = _a.needIcon; // console.log('-----text data', data);
111
-
99
+ needIcon = _a.needIcon;
112
100
  var textData = _mobx.store.textSelection ? _mobx.store.textSelection : data.content;
113
101
 
114
102
  if (!data.spacing) {
@@ -116,8 +104,9 @@ function (_super) {
116
104
  pc: {},
117
105
  mobile: {}
118
106
  };
119
- } // const textData = data.content;
107
+ }
120
108
 
109
+ var _fontWeightList = textData.fontFamily === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
121
110
 
122
111
  return /*#__PURE__*/_react["default"].createElement("div", {
123
112
  className: "m-text-config"
@@ -126,8 +115,7 @@ function (_super) {
126
115
  }, /*#__PURE__*/_react["default"].createElement(_common.IconPicker, {
127
116
  onChange: function onChange(icon) {
128
117
  return _this.onChangeButtonIcon(icon);
129
- } // onClick={() => { this.setState({ isHover: data == this.props.data.hover.buttonIcon }); }}
130
- ,
118
+ },
131
119
  value: data.iconUrl
132
120
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
133
121
  title: (0, _locale.i18n)('FONT_STYLE')
@@ -162,13 +150,12 @@ function (_super) {
162
150
  _this.selfRender();
163
151
  },
164
152
  value: textData.fontFamily
165
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
166
- value: "Montserrat"
167
- }, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
168
- value: "Open Sans"
169
- }, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
170
- value: "Inter"
171
- }, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
153
+ }, _constants.fontFamilyList.map(function (v) {
154
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
155
+ label: v.name,
156
+ value: v.value
157
+ }, v.name);
158
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
172
159
  title: (0, _locale.i18n)('FONT_WEIGHT')
173
160
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
174
161
  onChange: function onChange(v) {
@@ -177,11 +164,12 @@ function (_super) {
177
164
  _this.selfRender();
178
165
  },
179
166
  value: textData.fontWeight
180
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
181
- value: 400
182
- }, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
183
- value: 600
184
- }, (0, _locale.i18n)('MEDIUM')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
167
+ }, _fontWeightList.map(function (v) {
168
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
169
+ label: v.name,
170
+ value: v.value
171
+ }, v.name);
172
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
185
173
  title: (0, _locale.i18n)('FONT_SIZE')
186
174
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
187
175
  onChange: function onChange(_a) {
@@ -3,7 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.walletType = exports.urlTypeMap = exports.urlType = exports.tempTypeMap = exports.respCodeMap = exports.quickMenuCode = exports.projectCodes = exports.personalInfoType = exports.partyTypeMap = exports.pageStateMap = exports.orderStatusType = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.campaignTypes = exports.baseUrlMap = exports.STORE_KEY = exports.STORAGE_KEY = exports.ORDER_TYPE = exports.CREDIT_STATE = void 0;
6
+ exports.walletType = exports.urlTypeMap = exports.urlType = exports.tempTypeMap = exports.respCodeMap = exports.quickMenuCode = exports.projectFontFamily = exports.projectCodes = exports.personalInfoType = exports.partyTypeMap = exports.pageStateMap = exports.otherFontWeightList = exports.orderStatusType = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.fontWeightList = exports.fontFamilyList = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.campaignTypes = exports.baseUrlMap = exports.STORE_KEY = exports.STORAGE_KEY = exports.ORDER_TYPE = exports.CREDIT_STATE = void 0;
7
+
8
+ var _locale = require("../locale");
9
+
7
10
  var STORAGE_KEY = {
8
11
  FISHX_LOCALE: 'fishx_locale',
9
12
  LOCALE: 'ZSMART_LOCALE',
@@ -61,11 +64,54 @@ var personalInfoType = {
61
64
  VIEWED: 'Recently Viewed'
62
65
  };
63
66
  exports.personalInfoType = personalInfoType;
67
+ var fontFamilyList = [{
68
+ name: (0, _locale.i18n)('MONTSERRAT'),
69
+ value: 'Montserrat'
70
+ }, {
71
+ name: (0, _locale.i18n)('OPEN_SANS'),
72
+ value: 'Open Sans'
73
+ }, {
74
+ name: (0, _locale.i18n)('INTER'),
75
+ value: 'Inter'
76
+ }];
77
+ exports.fontFamilyList = fontFamilyList;
78
+ var fontWeightList = [{
79
+ name: (0, _locale.i18n)('REGULAR'),
80
+ value: 400
81
+ }, {
82
+ name: (0, _locale.i18n)('MEDIUM'),
83
+ value: 500
84
+ }, {
85
+ name: (0, _locale.i18n)('SEMIBOLD'),
86
+ value: 600
87
+ }, {
88
+ name: (0, _locale.i18n)('BOLD'),
89
+ value: 700
90
+ }];
91
+ exports.fontWeightList = fontWeightList;
92
+ var otherFontWeightList = [{
93
+ name: (0, _locale.i18n)('REGULAR'),
94
+ value: 400
95
+ }, {
96
+ name: (0, _locale.i18n)('SEMIBOLD'),
97
+ value: 600
98
+ }, {
99
+ name: (0, _locale.i18n)('BOLD'),
100
+ value: 700
101
+ }];
102
+ exports.otherFontWeightList = otherFontWeightList;
64
103
  var projectCodes = {
65
104
  MONPAY: 'MN',
66
- PTO: 'pto'
105
+ PTO: 'pto',
106
+ ASHITA: 'Ashita'
67
107
  };
68
108
  exports.projectCodes = projectCodes;
109
+ var projectFontFamily = {
110
+ MN: 'Inter',
111
+ Ashita: 'Montserrat',
112
+ pto: 'Open Sans'
113
+ };
114
+ exports.projectFontFamily = projectFontFamily;
69
115
  var campaignTypes = {
70
116
  FLASH_SALE: {
71
117
  KEY: 2,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.fontWeightList = exports.fontSizeList = exports.fontFamilyList = exports["default"] = exports.OpenSansFontWeightList = void 0;
6
+ exports.fontSizeList = exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -13,6 +13,10 @@ var _ToolBtn = _interopRequireDefault(require("./ToolBtn"));
13
13
 
14
14
  var _coreUtil = require("../../../utils/coreUtil");
15
15
 
16
+ var _locale = require("../../../locale");
17
+
18
+ var _constants = require("../../../constants");
19
+
16
20
  require("./index.less");
17
21
 
18
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -45,39 +49,6 @@ var __extends = void 0 && (void 0).__extends || function () {
45
49
 
46
50
  var fontSizeList = [12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48];
47
51
  exports.fontSizeList = fontSizeList;
48
- var fontFamilyList = [{
49
- name: 'Montserrat',
50
- value: 'Montserrat'
51
- }, {
52
- name: 'Open Sans',
53
- value: 'OpenSans'
54
- }];
55
- exports.fontFamilyList = fontFamilyList;
56
- var fontWeightList = [{
57
- name: 'Regular',
58
- value: '400'
59
- }, {
60
- name: 'Medium',
61
- value: '500'
62
- }, {
63
- name: 'Semibold',
64
- value: '600'
65
- }, {
66
- name: 'Bold',
67
- value: '700'
68
- }];
69
- exports.fontWeightList = fontWeightList;
70
- var OpenSansFontWeightList = [{
71
- name: 'Regular',
72
- value: '400'
73
- }, {
74
- name: 'Semibold',
75
- value: '600'
76
- }, {
77
- name: 'Bold',
78
- value: '700'
79
- }];
80
- exports.OpenSansFontWeightList = OpenSansFontWeightList;
81
52
 
82
53
  var ToolBarModal =
83
54
  /** @class */
@@ -238,7 +209,7 @@ function (_super) {
238
209
 
239
210
  var quillFormat = this.state.quillFormat;
240
211
 
241
- var _fontWeightList = quillFormat['font-family'] === 'OpenSans' ? OpenSansFontWeightList : fontWeightList;
212
+ var _fontWeightList = quillFormat['font-family'] === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
242
213
 
243
214
  return /*#__PURE__*/_react["default"].createElement("div", {
244
215
  ref: this.toolBarRef,
@@ -251,13 +222,13 @@ function (_super) {
251
222
  onChange: function onChange(v) {
252
223
  _this.onToolBtnClick('font-family', v);
253
224
  },
254
- placeholder: "Font Family",
225
+ placeholder: (0, _locale.i18n)('FONT_FAMILY'),
255
226
  size: "small",
256
227
  style: {
257
228
  width: '150px'
258
229
  },
259
230
  value: quillFormat['font-family']
260
- }, fontFamilyList.map(function (v) {
231
+ }, _constants.fontFamilyList.map(function (v) {
261
232
  return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
262
233
  label: v.name,
263
234
  value: v.value
@@ -268,7 +239,7 @@ function (_super) {
268
239
  onChange: function onChange(v) {
269
240
  _this.onToolBtnClick('font-weight', v);
270
241
  },
271
- placeholder: "Font Weight",
242
+ placeholder: (0, _locale.i18n)('FONT_WEIGHT'),
272
243
  size: "small",
273
244
  style: {
274
245
  width: '150px'
@@ -277,7 +248,7 @@ function (_super) {
277
248
  }, _fontWeightList.map(function (v) {
278
249
  return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
279
250
  label: v.name,
280
- value: v.value
251
+ value: "" + v.value
281
252
  }, v.name);
282
253
  }))), /*#__PURE__*/_react["default"].createElement("div", {
283
254
  className: "tool-item"
@@ -285,7 +256,7 @@ function (_super) {
285
256
  onChange: function onChange(v) {
286
257
  _this.onToolBtnClick('size', v);
287
258
  },
288
- placeholder: "Font Size",
259
+ placeholder: (0, _locale.i18n)('FONT_SIZE'),
289
260
  size: "small",
290
261
  style: {
291
262
  width: '120px'
@@ -1,4 +1,8 @@
1
1
  {
2
+ "BOLD": "Bold",
3
+ "SEMIBOLD": "Semibold",
4
+ "MEDIUM": "Medium",
5
+ "REGULAR": "Regular",
2
6
  "OFF": "off",
3
7
  "ON_GOING": "On Going",
4
8
  "COMING_SOON": "Coming soon",
@@ -192,8 +196,6 @@
192
196
  "MESSAGE_ICON": "Message icon",
193
197
  "CART_ICON": "Cart icon",
194
198
  "RECOMMENDED_SIZE": "Recommended Size",
195
- "BOLD": "Bold",
196
- "SEMIBOLD": "Semibold",
197
199
  "DARK": "Dark",
198
200
  "LIGHT": "Light",
199
201
  "URL_IMAGE": "url image",
@@ -321,8 +323,6 @@
321
323
  "BUTTON_ICON_SETTING": "Button Icon Setting",
322
324
  "SALES_PROGRESS": "Sales Progress",
323
325
  "NEXT": "Next",
324
- "REGULAR": "Regular",
325
- "MEDIUM": "Medium",
326
326
  "ADD_IMAGE": "Add Image",
327
327
  "ADD_BANNER": "Add Banner",
328
328
  "TOTAL_PRODUCTS": "Total {count} products",
@@ -1,4 +1,8 @@
1
1
  {
2
+ "BOLD": "Bold",
3
+ "SEMIBOLD": "Semibold",
4
+ "MEDIUM": "Medio",
5
+ "REGULAR": "Normal",
2
6
  "OFF": "off",
3
7
  "ON_GOING": "On Going",
4
8
  "COMING_SOON": "Coming soon",
@@ -192,8 +196,6 @@
192
196
  "MESSAGE_ICON": "Message icon",
193
197
  "CART_ICON": "Cart icon",
194
198
  "RECOMMENDED_SIZE": "Recommended Size",
195
- "BOLD": "Bold",
196
- "SEMIBOLD": "Semibold",
197
199
  "DARK": "Dark",
198
200
  "LIGHT": "Light",
199
201
  "URL_IMAGE": "url image",
@@ -321,8 +323,6 @@
321
323
  "BUTTON_ICON_SETTING": "Configuración de icono de botón",
322
324
  "SALES_PROGRESS": "Progreso de Ventas",
323
325
  "NEXT": "Siguiente",
324
- "REGULAR": "Normal",
325
- "MEDIUM": "Medio",
326
326
  "ADD_IMAGE": "Añadir Imagen",
327
327
  "ADD_BANNER": "Agregar Banner",
328
328
  "TOTAL_PRODUCTS": "Total {count} productos",
@@ -1,4 +1,8 @@
1
1
  {
2
+ "BOLD": "Зоригтой",
3
+ "SEMIBOLD": "Хагас хол",
4
+ "MEDIUM": "Дунд",
5
+ "REGULAR": "Тогтмол",
2
6
  "OFF": "off",
3
7
  "ON_GOING": "Явж байна",
4
8
  "COMING_SOON": "Тун удахгүй",
@@ -192,8 +196,6 @@
192
196
  "MESSAGE_ICON": "Мессежийн дүрс тэмдэг",
193
197
  "CART_ICON": "Сагсны дүрс",
194
198
  "RECOMMENDED_SIZE": "Санал болгож буй хэмжээ",
195
- "BOLD": "Зоригтой",
196
- "SEMIBOLD": "Хагас хол",
197
199
  "DARK": "Харанхуй",
198
200
  "LIGHT": "Гэрэл",
199
201
  "URL_IMAGE": "url зураг",
@@ -321,8 +323,6 @@
321
323
  "BUTTON_ICON_SETTING": "Товчлуурын дүрсний тохиргоо",
322
324
  "SALES_PROGRESS": "Борлуулалтын явц",
323
325
  "NEXT": "Дараачийн",
324
- "REGULAR": "Тогтмол",
325
- "MEDIUM": "Дунд",
326
326
  "ADD_IMAGE": "Зураг нэмэх",
327
327
  "ADD_BANNER": "Баннер нэмэх",
328
328
  "TOTAL_PRODUCTS": "Нийт {count} бүтээгдэхүүн",
@@ -23,6 +23,8 @@ var _TextConfig = require("../TextConfig");
23
23
 
24
24
  var _BaseConfig = _interopRequireDefault(require("../BaseConfig"));
25
25
 
26
+ var _constants = require("../../../constants");
27
+
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
29
 
28
30
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -130,9 +132,11 @@ function (_super) {
130
132
  ButtonConfig.prototype.render = function () {
131
133
  var _this = this;
132
134
 
133
- var _a = this.props,
134
- data = _a.data,
135
- needHover = _a.needHover;
135
+ var _a;
136
+
137
+ var _b = this.props,
138
+ data = _b.data,
139
+ needHover = _b.needHover;
136
140
 
137
141
  if (!data.hover) {
138
142
  data.hover = {
@@ -165,6 +169,8 @@ function (_super) {
165
169
 
166
170
  var fontSizeKey = window.magicDesign.device == 'pc' ? 'pcFontSize' : 'fontSize';
167
171
 
172
+ var _fontWeightList = ((_a = data === null || data === void 0 ? void 0 : data.buttonText) === null || _a === void 0 ? void 0 : _a.fontFamily) === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
173
+
168
174
  var ButtonTextSetting = function ButtonTextSetting(_data) {
169
175
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
170
176
  title: (0, _locale.i18n)('FONT_STYLE')
@@ -192,24 +198,24 @@ function (_super) {
192
198
  _this.updateAttr(_data, 'fontFamily', v);
193
199
  },
194
200
  value: _data.fontFamily
195
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
196
- value: "Montserrat"
197
- }, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
198
- value: "Open Sans"
199
- }, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
200
- value: "Inter"
201
- }, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
201
+ }, _constants.fontFamilyList.map(function (v) {
202
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
203
+ label: v.name,
204
+ value: v.value
205
+ }, v.name);
206
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
202
207
  title: (0, _locale.i18n)('FONT_WEIGHT')
203
208
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
204
209
  onChange: function onChange(v) {
205
210
  _this.updateAttr(_data, 'fontWeight', v);
206
211
  },
207
212
  value: _data.fontWeight
208
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
209
- value: 400
210
- }, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
211
- value: 600
212
- }, (0, _locale.i18n)('MEDIUM')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
213
+ }, _fontWeightList.map(function (v) {
214
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
215
+ label: v.name,
216
+ value: v.value
217
+ }, v.name);
218
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
213
219
  title: (0, _locale.i18n)('FONT_SIZE')
214
220
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
215
221
  onChange: function onChange(_a) {
@@ -25,6 +25,8 @@ var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/com
25
25
 
26
26
  var _mobx = require("../../../mobx");
27
27
 
28
+ var _constants = require("../../../constants");
29
+
28
30
  var _BaseConfig = _interopRequireDefault(require("../BaseConfig"));
29
31
 
30
32
  require("./index.less");
@@ -183,8 +185,9 @@ function (_super) {
183
185
  pc: {},
184
186
  mobile: {}
185
187
  };
186
- } // const textData = data.content;
188
+ }
187
189
 
190
+ var _fontWeightList = textData.fontFamily === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
188
191
 
189
192
  var source = [{
190
193
  key: '1',
@@ -228,13 +231,12 @@ function (_super) {
228
231
  _this.selfRender();
229
232
  },
230
233
  value: textData.fontFamily
231
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
232
- value: "Montserrat"
233
- }, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
234
- value: "Open Sans"
235
- }, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
236
- value: "Inter"
237
- }, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
234
+ }, _constants.fontFamilyList.map(function (v) {
235
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
236
+ label: v.name,
237
+ value: v.value
238
+ }, v.name);
239
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
238
240
  title: (0, _locale.i18n)('FONT_WEIGHT')
239
241
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
240
242
  onChange: function onChange(v) {
@@ -243,15 +245,12 @@ function (_super) {
243
245
  _this.selfRender();
244
246
  },
245
247
  value: textData.fontWeight
246
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
247
- value: 400
248
- }, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
249
- value: 500
250
- }, (0, _locale.i18n)('MEDIUM')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
251
- value: 600
252
- }, (0, _locale.i18n)('SEMIBOLD')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
253
- value: 700
254
- }, (0, _locale.i18n)('BOLD')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
248
+ }, _fontWeightList.map(function (v) {
249
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
250
+ label: v.name,
251
+ value: v.value
252
+ }, v.name);
253
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
255
254
  title: (0, _locale.i18n)('FONT_SIZE')
256
255
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
257
256
  onChange: function onChange(_a) {
Binary file
@@ -7,6 +7,13 @@ exports.getDefaultJSON = exports.bannerGroupSourceJSON = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
10
+ var _constants = require("../../../../constants");
11
+
12
+ var _a;
13
+
14
+ var defaultFontFamily = _constants.projectFontFamily[(_a = window.systemParams) === null || _a === void 0 ? void 0 : _a.projectCode] || 'Open Sans1';
15
+ console.log('window.systemParams', window.systemParams);
16
+
10
17
  var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
11
18
  var groupId = (0, _uuid.v4)();
12
19
  return {
@@ -40,7 +47,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
40
47
  specialContent: [],
41
48
  content: {
42
49
  sizeType: 'Customize font styles',
43
- fontFamily: 'Open Sans',
50
+ fontFamily: defaultFontFamily,
44
51
  fontWeight: 700,
45
52
  fontSize: 28,
46
53
  color: '#FFFFFF',
@@ -62,7 +69,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
62
69
  text: 'For the text area, you can enter a subtitle or description, the default width is the same as title.',
63
70
  content: {
64
71
  sizeType: 'Customize font styles',
65
- fontFamily: 'Open Sans',
72
+ fontFamily: defaultFontFamily,
66
73
  fontWeight: 400,
67
74
  fontSize: 18,
68
75
  color: '#FFFFFF',
@@ -83,7 +90,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
83
90
  },
84
91
  buttonText: {
85
92
  sizeType: 'Customize font styles',
86
- fontFamily: 'Open Sans',
93
+ fontFamily: defaultFontFamily,
87
94
  fontWeight: 600,
88
95
  fontSize: 14,
89
96
  fontStyle: 'normal',
@@ -119,7 +126,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
119
126
  },
120
127
  buttonText: {
121
128
  sizeType: 'Customize font styles',
122
- fontFamily: 'Open Sans',
129
+ fontFamily: defaultFontFamily,
123
130
  fontWeight: 600,
124
131
  fontSize: 14,
125
132
  fontStyle: 'normal',
@@ -148,7 +155,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
148
155
  },
149
156
  buttonText: {
150
157
  sizeType: 'Customize font styles',
151
- fontFamily: 'Open Sans',
158
+ fontFamily: defaultFontFamily,
152
159
  fontWeight: 600,
153
160
  fontSize: 14,
154
161
  fontStyle: 'normal',
@@ -184,7 +191,7 @@ var bannerGroupSourceJSON = function bannerGroupSourceJSON() {
184
191
  },
185
192
  buttonText: {
186
193
  sizeType: 'Customize font styles',
187
- fontFamily: 'Open Sans',
194
+ fontFamily: defaultFontFamily,
188
195
  fontWeight: 600,
189
196
  fontSize: 14,
190
197
  fontStyle: 'normal',
@@ -19,6 +19,8 @@ var _TextConfig = require("../../../../meta-comp/config-panels/TextConfig");
19
19
 
20
20
  var _locale = require("../../../../locale");
21
21
 
22
+ var _constants = require("../../../../constants");
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
25
 
24
26
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -91,6 +93,9 @@ function (_super) {
91
93
  data = _a.data,
92
94
  inputLabel = _a.inputLabel;
93
95
  var textData = data.content;
96
+
97
+ var _fontWeightList = textData.fontFamily === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
98
+
94
99
  return /*#__PURE__*/_react["default"].createElement("div", {
95
100
  className: "m-text-config"
96
101
  }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
@@ -135,13 +140,12 @@ function (_super) {
135
140
  _this.selfRender();
136
141
  },
137
142
  value: textData.fontFamily
138
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
139
- value: "Montserrat"
140
- }, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
141
- value: "Open Sans"
142
- }, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
143
- value: "Inter"
144
- }, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
143
+ }, _constants.fontFamilyList.map(function (v) {
144
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
145
+ label: v.name,
146
+ value: v.value
147
+ }, v.name);
148
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
145
149
  title: (0, _locale.i18n)('FONT_WEIGHT')
146
150
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
147
151
  onChange: function onChange(v) {
@@ -150,11 +154,12 @@ function (_super) {
150
154
  _this.selfRender();
151
155
  },
152
156
  value: textData.fontWeight
153
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
154
- value: 400
155
- }, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
156
- value: 600
157
- }, (0, _locale.i18n)('MEDIUM')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
157
+ }, _fontWeightList.map(function (v) {
158
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
159
+ label: v.name,
160
+ value: v.value
161
+ }, v.name);
162
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
158
163
  title: (0, _locale.i18n)('FONT_SIZE')
159
164
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
160
165
  onChange: function onChange(_a) {
@@ -21,6 +21,8 @@ var _BaseConfig = _interopRequireDefault(require("../../../../../meta-comp/confi
21
21
 
22
22
  var _locale = require("../../../../../locale");
23
23
 
24
+ var _constants = require("../../../../../constants");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
27
 
26
28
  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); }
@@ -71,20 +73,13 @@ var __assign = void 0 && (void 0).__assign || function () {
71
73
  return __assign.apply(this, arguments);
72
74
  };
73
75
 
74
- // type PageOwnState = {
75
- // /** 是否选择 Button Hover Icon */
76
- // isHover: boolean;
77
- // }
78
76
  var TextOnlyFontConfig =
79
77
  /** @class */
80
78
  function (_super) {
81
79
  __extends(TextOnlyFontConfig, _super);
82
80
 
83
81
  function TextOnlyFontConfig() {
84
- var _this = _super !== null && _super.apply(this, arguments) || this; // state: PageOwnState = {
85
- // isHover: false,
86
- // }
87
-
82
+ var _this = _super !== null && _super.apply(this, arguments) || this;
88
83
 
89
84
  _this.onChangeButtonIcon = function (icon) {
90
85
  var data = _this.props.data;
@@ -94,21 +89,14 @@ function (_super) {
94
89
  };
95
90
 
96
91
  return _this;
97
- } // componentDidMount() {
98
- // window.document.addEventListener('text-render', this.selfRender);
99
- // }
100
- // componentWillUnmount() {
101
- // window.document.removeEventListener('text-render', this.selfRender);
102
- // }
103
-
92
+ }
104
93
 
105
94
  TextOnlyFontConfig.prototype.render = function () {
106
95
  var _this = this;
107
96
 
108
97
  var _a = this.props,
109
98
  data = _a.data,
110
- needIcon = _a.needIcon; // console.log('-----text data', data);
111
-
99
+ needIcon = _a.needIcon;
112
100
  var textData = _mobx.store.textSelection ? _mobx.store.textSelection : data.content;
113
101
 
114
102
  if (!data.spacing) {
@@ -116,8 +104,9 @@ function (_super) {
116
104
  pc: {},
117
105
  mobile: {}
118
106
  };
119
- } // const textData = data.content;
107
+ }
120
108
 
109
+ var _fontWeightList = textData.fontFamily === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
121
110
 
122
111
  return /*#__PURE__*/_react["default"].createElement("div", {
123
112
  className: "m-text-config"
@@ -126,8 +115,7 @@ function (_super) {
126
115
  }, /*#__PURE__*/_react["default"].createElement(_common.IconPicker, {
127
116
  onChange: function onChange(icon) {
128
117
  return _this.onChangeButtonIcon(icon);
129
- } // onClick={() => { this.setState({ isHover: data == this.props.data.hover.buttonIcon }); }}
130
- ,
118
+ },
131
119
  value: data.iconUrl
132
120
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
133
121
  title: (0, _locale.i18n)('FONT_STYLE')
@@ -162,13 +150,12 @@ function (_super) {
162
150
  _this.selfRender();
163
151
  },
164
152
  value: textData.fontFamily
165
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
166
- value: "Montserrat"
167
- }, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
168
- value: "Open Sans"
169
- }, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
170
- value: "Inter"
171
- }, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
153
+ }, _constants.fontFamilyList.map(function (v) {
154
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
155
+ label: v.name,
156
+ value: v.value
157
+ }, v.name);
158
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
172
159
  title: (0, _locale.i18n)('FONT_WEIGHT')
173
160
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
174
161
  onChange: function onChange(v) {
@@ -177,11 +164,12 @@ function (_super) {
177
164
  _this.selfRender();
178
165
  },
179
166
  value: textData.fontWeight
180
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
181
- value: 400
182
- }, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
183
- value: 600
184
- }, (0, _locale.i18n)('MEDIUM')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
167
+ }, _fontWeightList.map(function (v) {
168
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
169
+ label: v.name,
170
+ value: v.value
171
+ }, v.name);
172
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
185
173
  title: (0, _locale.i18n)('FONT_SIZE')
186
174
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
187
175
  onChange: function onChange(_a) {
@@ -3,7 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.walletType = exports.urlTypeMap = exports.urlType = exports.tempTypeMap = exports.respCodeMap = exports.quickMenuCode = exports.projectCodes = exports.personalInfoType = exports.partyTypeMap = exports.pageStateMap = exports.orderStatusType = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.campaignTypes = exports.baseUrlMap = exports.STORE_KEY = exports.STORAGE_KEY = exports.ORDER_TYPE = exports.CREDIT_STATE = void 0;
6
+ exports.walletType = exports.urlTypeMap = exports.urlType = exports.tempTypeMap = exports.respCodeMap = exports.quickMenuCode = exports.projectFontFamily = exports.projectCodes = exports.personalInfoType = exports.partyTypeMap = exports.pageStateMap = exports.otherFontWeightList = exports.orderStatusType = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.fontWeightList = exports.fontFamilyList = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.campaignTypes = exports.baseUrlMap = exports.STORE_KEY = exports.STORAGE_KEY = exports.ORDER_TYPE = exports.CREDIT_STATE = void 0;
7
+
8
+ var _locale = require("../locale");
9
+
7
10
  var STORAGE_KEY = {
8
11
  FISHX_LOCALE: 'fishx_locale',
9
12
  LOCALE: 'ZSMART_LOCALE',
@@ -61,11 +64,54 @@ var personalInfoType = {
61
64
  VIEWED: 'Recently Viewed'
62
65
  };
63
66
  exports.personalInfoType = personalInfoType;
67
+ var fontFamilyList = [{
68
+ name: (0, _locale.i18n)('MONTSERRAT'),
69
+ value: 'Montserrat'
70
+ }, {
71
+ name: (0, _locale.i18n)('OPEN_SANS'),
72
+ value: 'Open Sans'
73
+ }, {
74
+ name: (0, _locale.i18n)('INTER'),
75
+ value: 'Inter'
76
+ }];
77
+ exports.fontFamilyList = fontFamilyList;
78
+ var fontWeightList = [{
79
+ name: (0, _locale.i18n)('REGULAR'),
80
+ value: 400
81
+ }, {
82
+ name: (0, _locale.i18n)('MEDIUM'),
83
+ value: 500
84
+ }, {
85
+ name: (0, _locale.i18n)('SEMIBOLD'),
86
+ value: 600
87
+ }, {
88
+ name: (0, _locale.i18n)('BOLD'),
89
+ value: 700
90
+ }];
91
+ exports.fontWeightList = fontWeightList;
92
+ var otherFontWeightList = [{
93
+ name: (0, _locale.i18n)('REGULAR'),
94
+ value: 400
95
+ }, {
96
+ name: (0, _locale.i18n)('SEMIBOLD'),
97
+ value: 600
98
+ }, {
99
+ name: (0, _locale.i18n)('BOLD'),
100
+ value: 700
101
+ }];
102
+ exports.otherFontWeightList = otherFontWeightList;
64
103
  var projectCodes = {
65
104
  MONPAY: 'MN',
66
- PTO: 'pto'
105
+ PTO: 'pto',
106
+ ASHITA: 'Ashita'
67
107
  };
68
108
  exports.projectCodes = projectCodes;
109
+ var projectFontFamily = {
110
+ MN: 'Inter',
111
+ Ashita: 'Montserrat',
112
+ pto: 'Open Sans'
113
+ };
114
+ exports.projectFontFamily = projectFontFamily;
69
115
  var campaignTypes = {
70
116
  FLASH_SALE: {
71
117
  KEY: 2,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.fontWeightList = exports.fontSizeList = exports.fontFamilyList = exports["default"] = exports.OpenSansFontWeightList = void 0;
6
+ exports.fontSizeList = exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -13,6 +13,10 @@ var _ToolBtn = _interopRequireDefault(require("./ToolBtn"));
13
13
 
14
14
  var _coreUtil = require("../../../utils/coreUtil");
15
15
 
16
+ var _locale = require("../../../locale");
17
+
18
+ var _constants = require("../../../constants");
19
+
16
20
  require("./index.less");
17
21
 
18
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -45,39 +49,6 @@ var __extends = void 0 && (void 0).__extends || function () {
45
49
 
46
50
  var fontSizeList = [12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48];
47
51
  exports.fontSizeList = fontSizeList;
48
- var fontFamilyList = [{
49
- name: 'Montserrat',
50
- value: 'Montserrat'
51
- }, {
52
- name: 'Open Sans',
53
- value: 'OpenSans'
54
- }];
55
- exports.fontFamilyList = fontFamilyList;
56
- var fontWeightList = [{
57
- name: 'Regular',
58
- value: '400'
59
- }, {
60
- name: 'Medium',
61
- value: '500'
62
- }, {
63
- name: 'Semibold',
64
- value: '600'
65
- }, {
66
- name: 'Bold',
67
- value: '700'
68
- }];
69
- exports.fontWeightList = fontWeightList;
70
- var OpenSansFontWeightList = [{
71
- name: 'Regular',
72
- value: '400'
73
- }, {
74
- name: 'Semibold',
75
- value: '600'
76
- }, {
77
- name: 'Bold',
78
- value: '700'
79
- }];
80
- exports.OpenSansFontWeightList = OpenSansFontWeightList;
81
52
 
82
53
  var ToolBarModal =
83
54
  /** @class */
@@ -238,7 +209,7 @@ function (_super) {
238
209
 
239
210
  var quillFormat = this.state.quillFormat;
240
211
 
241
- var _fontWeightList = quillFormat['font-family'] === 'OpenSans' ? OpenSansFontWeightList : fontWeightList;
212
+ var _fontWeightList = quillFormat['font-family'] === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
242
213
 
243
214
  return /*#__PURE__*/_react["default"].createElement("div", {
244
215
  ref: this.toolBarRef,
@@ -251,13 +222,13 @@ function (_super) {
251
222
  onChange: function onChange(v) {
252
223
  _this.onToolBtnClick('font-family', v);
253
224
  },
254
- placeholder: "Font Family",
225
+ placeholder: (0, _locale.i18n)('FONT_FAMILY'),
255
226
  size: "small",
256
227
  style: {
257
228
  width: '150px'
258
229
  },
259
230
  value: quillFormat['font-family']
260
- }, fontFamilyList.map(function (v) {
231
+ }, _constants.fontFamilyList.map(function (v) {
261
232
  return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
262
233
  label: v.name,
263
234
  value: v.value
@@ -268,7 +239,7 @@ function (_super) {
268
239
  onChange: function onChange(v) {
269
240
  _this.onToolBtnClick('font-weight', v);
270
241
  },
271
- placeholder: "Font Weight",
242
+ placeholder: (0, _locale.i18n)('FONT_WEIGHT'),
272
243
  size: "small",
273
244
  style: {
274
245
  width: '150px'
@@ -277,7 +248,7 @@ function (_super) {
277
248
  }, _fontWeightList.map(function (v) {
278
249
  return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
279
250
  label: v.name,
280
- value: v.value
251
+ value: "" + v.value
281
252
  }, v.name);
282
253
  }))), /*#__PURE__*/_react["default"].createElement("div", {
283
254
  className: "tool-item"
@@ -285,7 +256,7 @@ function (_super) {
285
256
  onChange: function onChange(v) {
286
257
  _this.onToolBtnClick('size', v);
287
258
  },
288
- placeholder: "Font Size",
259
+ placeholder: (0, _locale.i18n)('FONT_SIZE'),
289
260
  size: "small",
290
261
  style: {
291
262
  width: '120px'
@@ -1,4 +1,8 @@
1
1
  {
2
+ "BOLD": "Bold",
3
+ "SEMIBOLD": "Semibold",
4
+ "MEDIUM": "Medium",
5
+ "REGULAR": "Regular",
2
6
  "OFF": "off",
3
7
  "ON_GOING": "On Going",
4
8
  "COMING_SOON": "Coming soon",
@@ -192,8 +196,6 @@
192
196
  "MESSAGE_ICON": "Message icon",
193
197
  "CART_ICON": "Cart icon",
194
198
  "RECOMMENDED_SIZE": "Recommended Size",
195
- "BOLD": "Bold",
196
- "SEMIBOLD": "Semibold",
197
199
  "DARK": "Dark",
198
200
  "LIGHT": "Light",
199
201
  "URL_IMAGE": "url image",
@@ -321,8 +323,6 @@
321
323
  "BUTTON_ICON_SETTING": "Button Icon Setting",
322
324
  "SALES_PROGRESS": "Sales Progress",
323
325
  "NEXT": "Next",
324
- "REGULAR": "Regular",
325
- "MEDIUM": "Medium",
326
326
  "ADD_IMAGE": "Add Image",
327
327
  "ADD_BANNER": "Add Banner",
328
328
  "TOTAL_PRODUCTS": "Total {count} products",
@@ -1,4 +1,8 @@
1
1
  {
2
+ "BOLD": "Bold",
3
+ "SEMIBOLD": "Semibold",
4
+ "MEDIUM": "Medio",
5
+ "REGULAR": "Normal",
2
6
  "OFF": "off",
3
7
  "ON_GOING": "On Going",
4
8
  "COMING_SOON": "Coming soon",
@@ -192,8 +196,6 @@
192
196
  "MESSAGE_ICON": "Message icon",
193
197
  "CART_ICON": "Cart icon",
194
198
  "RECOMMENDED_SIZE": "Recommended Size",
195
- "BOLD": "Bold",
196
- "SEMIBOLD": "Semibold",
197
199
  "DARK": "Dark",
198
200
  "LIGHT": "Light",
199
201
  "URL_IMAGE": "url image",
@@ -321,8 +323,6 @@
321
323
  "BUTTON_ICON_SETTING": "Configuración de icono de botón",
322
324
  "SALES_PROGRESS": "Progreso de Ventas",
323
325
  "NEXT": "Siguiente",
324
- "REGULAR": "Normal",
325
- "MEDIUM": "Medio",
326
326
  "ADD_IMAGE": "Añadir Imagen",
327
327
  "ADD_BANNER": "Agregar Banner",
328
328
  "TOTAL_PRODUCTS": "Total {count} productos",
@@ -1,4 +1,8 @@
1
1
  {
2
+ "BOLD": "Зоригтой",
3
+ "SEMIBOLD": "Хагас хол",
4
+ "MEDIUM": "Дунд",
5
+ "REGULAR": "Тогтмол",
2
6
  "OFF": "off",
3
7
  "ON_GOING": "Явж байна",
4
8
  "COMING_SOON": "Тун удахгүй",
@@ -192,8 +196,6 @@
192
196
  "MESSAGE_ICON": "Мессежийн дүрс тэмдэг",
193
197
  "CART_ICON": "Сагсны дүрс",
194
198
  "RECOMMENDED_SIZE": "Санал болгож буй хэмжээ",
195
- "BOLD": "Зоригтой",
196
- "SEMIBOLD": "Хагас хол",
197
199
  "DARK": "Харанхуй",
198
200
  "LIGHT": "Гэрэл",
199
201
  "URL_IMAGE": "url зураг",
@@ -321,8 +323,6 @@
321
323
  "BUTTON_ICON_SETTING": "Товчлуурын дүрсний тохиргоо",
322
324
  "SALES_PROGRESS": "Борлуулалтын явц",
323
325
  "NEXT": "Дараачийн",
324
- "REGULAR": "Тогтмол",
325
- "MEDIUM": "Дунд",
326
326
  "ADD_IMAGE": "Зураг нэмэх",
327
327
  "ADD_BANNER": "Баннер нэмэх",
328
328
  "TOTAL_PRODUCTS": "Нийт {count} бүтээгдэхүүн",
@@ -23,6 +23,8 @@ var _TextConfig = require("../TextConfig");
23
23
 
24
24
  var _BaseConfig = _interopRequireDefault(require("../BaseConfig"));
25
25
 
26
+ var _constants = require("../../../constants");
27
+
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
29
 
28
30
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -130,9 +132,11 @@ function (_super) {
130
132
  ButtonConfig.prototype.render = function () {
131
133
  var _this = this;
132
134
 
133
- var _a = this.props,
134
- data = _a.data,
135
- needHover = _a.needHover;
135
+ var _a;
136
+
137
+ var _b = this.props,
138
+ data = _b.data,
139
+ needHover = _b.needHover;
136
140
 
137
141
  if (!data.hover) {
138
142
  data.hover = {
@@ -165,6 +169,8 @@ function (_super) {
165
169
 
166
170
  var fontSizeKey = window.magicDesign.device == 'pc' ? 'pcFontSize' : 'fontSize';
167
171
 
172
+ var _fontWeightList = ((_a = data === null || data === void 0 ? void 0 : data.buttonText) === null || _a === void 0 ? void 0 : _a.fontFamily) === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
173
+
168
174
  var ButtonTextSetting = function ButtonTextSetting(_data) {
169
175
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
170
176
  title: (0, _locale.i18n)('FONT_STYLE')
@@ -192,24 +198,24 @@ function (_super) {
192
198
  _this.updateAttr(_data, 'fontFamily', v);
193
199
  },
194
200
  value: _data.fontFamily
195
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
196
- value: "Montserrat"
197
- }, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
198
- value: "Open Sans"
199
- }, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
200
- value: "Inter"
201
- }, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
201
+ }, _constants.fontFamilyList.map(function (v) {
202
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
203
+ label: v.name,
204
+ value: v.value
205
+ }, v.name);
206
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
202
207
  title: (0, _locale.i18n)('FONT_WEIGHT')
203
208
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
204
209
  onChange: function onChange(v) {
205
210
  _this.updateAttr(_data, 'fontWeight', v);
206
211
  },
207
212
  value: _data.fontWeight
208
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
209
- value: 400
210
- }, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
211
- value: 600
212
- }, (0, _locale.i18n)('MEDIUM')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
213
+ }, _fontWeightList.map(function (v) {
214
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
215
+ label: v.name,
216
+ value: v.value
217
+ }, v.name);
218
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
213
219
  title: (0, _locale.i18n)('FONT_SIZE')
214
220
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
215
221
  onChange: function onChange(_a) {
@@ -25,6 +25,8 @@ var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/com
25
25
 
26
26
  var _mobx = require("../../../mobx");
27
27
 
28
+ var _constants = require("../../../constants");
29
+
28
30
  var _BaseConfig = _interopRequireDefault(require("../BaseConfig"));
29
31
 
30
32
  require("./index.less");
@@ -183,8 +185,9 @@ function (_super) {
183
185
  pc: {},
184
186
  mobile: {}
185
187
  };
186
- } // const textData = data.content;
188
+ }
187
189
 
190
+ var _fontWeightList = textData.fontFamily === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
188
191
 
189
192
  var source = [{
190
193
  key: '1',
@@ -228,13 +231,12 @@ function (_super) {
228
231
  _this.selfRender();
229
232
  },
230
233
  value: textData.fontFamily
231
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
232
- value: "Montserrat"
233
- }, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
234
- value: "Open Sans"
235
- }, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
236
- value: "Inter"
237
- }, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
234
+ }, _constants.fontFamilyList.map(function (v) {
235
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
236
+ label: v.name,
237
+ value: v.value
238
+ }, v.name);
239
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
238
240
  title: (0, _locale.i18n)('FONT_WEIGHT')
239
241
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
240
242
  onChange: function onChange(v) {
@@ -243,15 +245,12 @@ function (_super) {
243
245
  _this.selfRender();
244
246
  },
245
247
  value: textData.fontWeight
246
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
247
- value: 400
248
- }, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
249
- value: 500
250
- }, (0, _locale.i18n)('MEDIUM')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
251
- value: 600
252
- }, (0, _locale.i18n)('SEMIBOLD')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
253
- value: 700
254
- }, (0, _locale.i18n)('BOLD')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
248
+ }, _fontWeightList.map(function (v) {
249
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
250
+ label: v.name,
251
+ value: v.value
252
+ }, v.name);
253
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
255
254
  title: (0, _locale.i18n)('FONT_SIZE')
256
255
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
257
256
  onChange: function onChange(_a) {
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.161",
4
+ "version": "2.0.163",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",