@fonixtree/magic-design 0.0.101 → 0.0.103

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.
@@ -217,7 +217,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
217
217
  storeName = _g[0],
218
218
  setStoreName = _g[1];
219
219
 
220
- var _h = (0, _react.useState)([]),
220
+ var _h = (0, _react.useState)(''),
221
221
  storeId = _h[0],
222
222
  setStoreId = _h[1];
223
223
 
@@ -293,27 +293,29 @@ var FilteredProductModal = function FilteredProductModal(props) {
293
293
 
294
294
  var columns = [{
295
295
  title: 'Image',
296
- dataIndex: 'productImageUrl',
297
- key: 'productImageUrl',
298
- render: function render(productImageUrl) {
296
+ dataIndex: 'imgUrl',
297
+ key: 'imgUrl',
298
+ width: 100,
299
+ render: function render(imgUrl, record) {
299
300
  return /*#__PURE__*/_react["default"].createElement("div", {
300
301
  className: "prodImage",
301
302
  style: {
302
- backgroundImage: "url(" + productImageUrl + ")"
303
+ backgroundImage: "url(\"" + (0, _commonUtil.convertImageUrl)(record.productImg || record.imgUrlContent || record.productImgContent) + "\")"
303
304
  }
304
305
  });
305
306
  }
306
307
  }, {
307
- title: 'Product Name',
308
- dataIndex: 'productName',
309
- key: 'productName',
308
+ title: 'Offer Name',
309
+ dataIndex: 'offerName',
310
+ key: 'offerName',
310
311
  ellipsis: true
311
- }, {
312
- title: 'SKU',
313
- dataIndex: 'attrValues',
314
- key: 'attrValues',
315
- ellipsis: true
316
- }, {
312
+ }, // {
313
+ // title: 'SKU',
314
+ // dataIndex: 'attrValues',
315
+ // key: 'attrValues',
316
+ // ellipsis: true,
317
+ // },
318
+ {
317
319
  title: 'Price',
318
320
  dataIndex: 'salesPrice',
319
321
  key: 'salesPrice',
@@ -453,7 +455,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
453
455
  return v.key;
454
456
  }).join(','),
455
457
  labelIds: labelId.key,
456
- productName: productName,
458
+ q: productName,
459
+ // productName,
457
460
  storeId: storeId,
458
461
  minPrice: minimum * precision || '',
459
462
  maxPrice: maximum * precision || '',
@@ -465,10 +468,11 @@ var FilteredProductModal = function FilteredProductModal(props) {
465
468
  };
466
469
  return [4
467
470
  /*yield*/
468
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/products", params, 'GET')];
471
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
469
472
 
470
473
  case 1:
471
- res = _a.sent();
474
+ res = _a.sent(); // const res = await commonFetch(`${window.magicDesign.MBaseUrl}/products`, params, 'GET');
475
+
472
476
  setLoading(false);
473
477
  paginationParams.total = res.total;
474
478
 
@@ -39,6 +39,5 @@
39
39
  float: left;
40
40
  height: 18px;
41
41
  margin-right: 5px;
42
- margin-top: 1px;
43
42
  }
44
43
  }
@@ -175,6 +175,8 @@ function PageCompList(_a) {
175
175
  };
176
176
 
177
177
  var renderCard = function renderCard(comp, index) {
178
+ var _a, _b;
179
+
178
180
  var menu = /*#__PURE__*/_react["default"].createElement(_antd.Menu, {
179
181
  onClick: function onClick(_a) {
180
182
  var item = _a.item;
@@ -222,7 +224,7 @@ function PageCompList(_a) {
222
224
  className: "comp-icon",
223
225
  color: active ? '#2F54EB' : '',
224
226
  size: "20px",
225
- type: _constants.compInfoMap[comp.type].icon
227
+ type: (_a = _constants.compInfoMap[comp.type]) === null || _a === void 0 ? void 0 : _a.icon
226
228
  }), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
227
229
  className: "drag-icon",
228
230
  color: "#2F54EB",
@@ -230,7 +232,7 @@ function PageCompList(_a) {
230
232
  type: "icon-drag"
231
233
  }), /*#__PURE__*/_react["default"].createElement("span", {
232
234
  className: "card-title ml16"
233
- }, index + 1, ". ", _constants.compInfoMap[comp.type].name)), /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
235
+ }, index + 1, ". ", (_b = _constants.compInfoMap[comp.type]) === null || _b === void 0 ? void 0 : _b.name)), /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
234
236
  overlay: menu,
235
237
  placement: "bottomRight",
236
238
  trigger: ['click']
@@ -217,7 +217,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
217
217
  storeName = _g[0],
218
218
  setStoreName = _g[1];
219
219
 
220
- var _h = (0, _react.useState)([]),
220
+ var _h = (0, _react.useState)(''),
221
221
  storeId = _h[0],
222
222
  setStoreId = _h[1];
223
223
 
@@ -293,27 +293,29 @@ var FilteredProductModal = function FilteredProductModal(props) {
293
293
 
294
294
  var columns = [{
295
295
  title: 'Image',
296
- dataIndex: 'productImageUrl',
297
- key: 'productImageUrl',
298
- render: function render(productImageUrl) {
296
+ dataIndex: 'imgUrl',
297
+ key: 'imgUrl',
298
+ width: 100,
299
+ render: function render(imgUrl, record) {
299
300
  return /*#__PURE__*/_react["default"].createElement("div", {
300
301
  className: "prodImage",
301
302
  style: {
302
- backgroundImage: "url(" + productImageUrl + ")"
303
+ backgroundImage: "url(\"" + (0, _commonUtil.convertImageUrl)(record.productImg || record.imgUrlContent || record.productImgContent) + "\")"
303
304
  }
304
305
  });
305
306
  }
306
307
  }, {
307
- title: 'Product Name',
308
- dataIndex: 'productName',
309
- key: 'productName',
308
+ title: 'Offer Name',
309
+ dataIndex: 'offerName',
310
+ key: 'offerName',
310
311
  ellipsis: true
311
- }, {
312
- title: 'SKU',
313
- dataIndex: 'attrValues',
314
- key: 'attrValues',
315
- ellipsis: true
316
- }, {
312
+ }, // {
313
+ // title: 'SKU',
314
+ // dataIndex: 'attrValues',
315
+ // key: 'attrValues',
316
+ // ellipsis: true,
317
+ // },
318
+ {
317
319
  title: 'Price',
318
320
  dataIndex: 'salesPrice',
319
321
  key: 'salesPrice',
@@ -453,7 +455,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
453
455
  return v.key;
454
456
  }).join(','),
455
457
  labelIds: labelId.key,
456
- productName: productName,
458
+ q: productName,
459
+ // productName,
457
460
  storeId: storeId,
458
461
  minPrice: minimum * precision || '',
459
462
  maxPrice: maximum * precision || '',
@@ -465,10 +468,11 @@ var FilteredProductModal = function FilteredProductModal(props) {
465
468
  };
466
469
  return [4
467
470
  /*yield*/
468
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/products", params, 'GET')];
471
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
469
472
 
470
473
  case 1:
471
- res = _a.sent();
474
+ res = _a.sent(); // const res = await commonFetch(`${window.magicDesign.MBaseUrl}/products`, params, 'GET');
475
+
472
476
  setLoading(false);
473
477
  paginationParams.total = res.total;
474
478
 
@@ -39,6 +39,5 @@
39
39
  float: left;
40
40
  height: 18px;
41
41
  margin-right: 5px;
42
- margin-top: 1px;
43
42
  }
44
43
  }
@@ -175,6 +175,8 @@ function PageCompList(_a) {
175
175
  };
176
176
 
177
177
  var renderCard = function renderCard(comp, index) {
178
+ var _a, _b;
179
+
178
180
  var menu = /*#__PURE__*/_react["default"].createElement(_antd.Menu, {
179
181
  onClick: function onClick(_a) {
180
182
  var item = _a.item;
@@ -222,7 +224,7 @@ function PageCompList(_a) {
222
224
  className: "comp-icon",
223
225
  color: active ? '#2F54EB' : '',
224
226
  size: "20px",
225
- type: _constants.compInfoMap[comp.type].icon
227
+ type: (_a = _constants.compInfoMap[comp.type]) === null || _a === void 0 ? void 0 : _a.icon
226
228
  }), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
227
229
  className: "drag-icon",
228
230
  color: "#2F54EB",
@@ -230,7 +232,7 @@ function PageCompList(_a) {
230
232
  type: "icon-drag"
231
233
  }), /*#__PURE__*/_react["default"].createElement("span", {
232
234
  className: "card-title ml16"
233
- }, index + 1, ". ", _constants.compInfoMap[comp.type].name)), /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
235
+ }, index + 1, ". ", (_b = _constants.compInfoMap[comp.type]) === null || _b === void 0 ? void 0 : _b.name)), /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
234
236
  overlay: menu,
235
237
  placement: "bottomRight",
236
238
  trigger: ['click']
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.101",
4
+ "version": "0.0.103",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",