merchi_sdk_js 0.31.3 → 0.31.5
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 +1 -1
- package/src/field_types.js +1 -0
- package/src/roles.js +1 -0
- package/src/variation_field.js +8 -0
package/package.json
CHANGED
package/src/field_types.js
CHANGED
package/src/roles.js
CHANGED
package/src/variation_field.js
CHANGED
|
@@ -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
|
};
|