merchi_sdk_js 0.31.3 → 0.31.4

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.31.3",
3
+ "version": "0.31.4",
4
4
  "type": "module",
5
5
  "main": "src/merchi.js",
6
6
  "module": "src/merchi.js",
@@ -16,3 +16,4 @@ fieldTypes.add("COLOUR_SELECT", 11);
16
16
  fieldTypes.add("TURNAROUND_TIME", 12);
17
17
  fieldTypes.add("COLOUR_EXTRACT", 13);
18
18
  fieldTypes.add("AREA", 14);
19
+ fieldTypes.add("PANTONE_COLOUR_SELECT", 15);
@@ -32,6 +32,7 @@ export function VariationField() {
32
32
  addPropertyTo(this, 'options', VariationFieldsOption);
33
33
  addPropertyTo(this, 'defaultOptions', VariationFieldsOption);
34
34
  addPropertyTo(this, 'multipleSelect');
35
+ addPropertyTo(this, 'allowAllPantones');
35
36
  addPropertyTo(this, 'rows');
36
37
  addPropertyTo(this, 'fieldMin');
37
38
  addPropertyTo(this, 'fieldMax');
@@ -122,10 +123,17 @@ export function VariationField() {
122
123
  return this.isType('COLOUR_SELECT');
123
124
  };
124
125
 
126
+ this.isPantoneSelectType = function () {
127
+ return this.isType('PANTONE_COLOUR_SELECT');
128
+ };
129
+
125
130
  this.isImageSelectType = function () {
126
131
  return this.isType('IMAGE_SELECT');
127
132
  };
128
133
  this.isSelectable = function () {
134
+ if (this.isPantoneSelectType()) {
135
+ return !this.allowAllPantones();
136
+ }
129
137
  return this.isSelectType() || this.isCheckboxOrRadio() ||
130
138
  this.isImageSelectType() || this.isColourSelectType();
131
139
  };