merchi_sdk_js 0.16.0 → 0.18.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merchi_sdk_js",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "main": "src/merchi.js",
6
6
  "module": "src/merchi.js",
@@ -14,3 +14,5 @@ fieldTypes.add("IMAGE_SELECT", 9);
14
14
  fieldTypes.add("COLOUR_PICKER", 10);
15
15
  fieldTypes.add("COLOUR_SELECT", 11);
16
16
  fieldTypes.add("TURNAROUND_TIME", 12);
17
+ fieldTypes.add("COLOUR_EXTRACT", 13);
18
+ fieldTypes.add("AREA", 14);
package/src/model.js CHANGED
@@ -496,6 +496,10 @@ export function getList(resource, success, error, parameters, withUpdates) {
496
496
  request.query().add('company_supplier_id',
497
497
  parameters.companySupplierId);
498
498
  }
499
+ if (notEmpty(parameters.senderCompanyId)) {
500
+ request.query().add('sender_company_id',
501
+ parameters.senderCompanyId);
502
+ }
499
503
  if (notEmpty(parameters.section)) {
500
504
  request.query().add('section', parameters.section);
501
505
  }
@@ -47,6 +47,23 @@ export function VariationField() {
47
47
  addPropertyTo(this, 'isHtml');
48
48
  addPropertyTo(this, 'considerBusinessHours');
49
49
  addPropertyTo(this, 'shippingTimeIncluded');
50
+ addPropertyTo(this, 'heightVariationCost');
51
+ addPropertyTo(this, 'heightVariationCostDiscountGroup', DiscountGroup);
52
+ addPropertyTo(this, 'heightVariationUnitCost');
53
+ addPropertyTo(this, 'heightVariationUnitCostDiscountGroup', DiscountGroup);
54
+ addPropertyTo(this, 'widthVariationCost');
55
+ addPropertyTo(this, 'widthVariationCostDiscountGroup', DiscountGroup);
56
+ addPropertyTo(this, 'widthVariationUnitCost');
57
+ addPropertyTo(this, 'widthVariationUnitCostDiscountGroup', DiscountGroup);
58
+ addPropertyTo(this, 'heightFieldMin');
59
+ addPropertyTo(this, 'heightFieldMax');
60
+ addPropertyTo(this, 'widthFieldMin');
61
+ addPropertyTo(this, 'widthFieldMax');
62
+ addPropertyTo(this, 'areaUnit');
63
+ addPropertyTo(this, 'areaInputType');
64
+ addPropertyTo(this, 'areaStep');
65
+ addPropertyTo(this, 'aspectRatioLock');
66
+ addPropertyTo(this, 'aspectRatio');
50
67
 
51
68
  this.isType = function (typeString) {
52
69
  return parseInt(this.fieldType(), 10) ===
@@ -222,7 +239,10 @@ export function VariationField() {
222
239
  onceOffCost = 0,
223
240
  selectableOptions = [],
224
241
  sellerProductEditable = this.sellerProductEditable();
225
- if (this.isSelectable()) {
242
+ if (this.isType('AREA')) {
243
+ variationBuilt.value(this.defaultValue());
244
+ variationBuilt.onceOffCost(0);
245
+ } else if (this.isSelectable()) {
226
246
  options = this.options();
227
247
  value = [];
228
248
  for (i = 0; i < options.length; i++) {