@merchi/sdk 1.42.11 → 1.42.13
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.
|
@@ -14,4 +14,5 @@ export var FieldType;
|
|
|
14
14
|
FieldType[FieldType["TURNAROUND_TIME"] = 12] = "TURNAROUND_TIME";
|
|
15
15
|
FieldType[FieldType["COLOUR_EXTRACT"] = 13] = "COLOUR_EXTRACT";
|
|
16
16
|
FieldType[FieldType["AREA"] = 14] = "AREA";
|
|
17
|
+
FieldType[FieldType["PANTONE_COLOUR_SELECT"] = 15] = "PANTONE_COLOUR_SELECT";
|
|
17
18
|
})(FieldType || (FieldType = {}));
|
package/dist/entities/product.js
CHANGED
|
@@ -242,6 +242,14 @@ var Product = /** @class */ (function (_super) {
|
|
|
242
242
|
Product.property(),
|
|
243
243
|
__metadata("design:type", Boolean)
|
|
244
244
|
], Product.prototype, "groupsFirst", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
Product.property(),
|
|
247
|
+
__metadata("design:type", Number)
|
|
248
|
+
], Product.prototype, "independentVariationColumns", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
Product.property(),
|
|
251
|
+
__metadata("design:type", Number)
|
|
252
|
+
], Product.prototype, "groupVariationColumns", void 0);
|
|
245
253
|
__decorate([
|
|
246
254
|
Product.property(),
|
|
247
255
|
__metadata("design:type", Number)
|
|
@@ -47,6 +47,9 @@ var VariationField = /** @class */ (function (_super) {
|
|
|
47
47
|
if (_this.fieldType === undefined) {
|
|
48
48
|
throw new Error('fieldType is undefined, did you forget to embed it?');
|
|
49
49
|
}
|
|
50
|
+
if (_this.fieldType === FieldType.PANTONE_COLOUR_SELECT) {
|
|
51
|
+
return !_this.allowAllPantones;
|
|
52
|
+
}
|
|
50
53
|
var selectable = new Set([FieldType.SELECT,
|
|
51
54
|
FieldType.CHECKBOX,
|
|
52
55
|
FieldType.RADIO,
|
|
@@ -74,6 +77,11 @@ var VariationField = /** @class */ (function (_super) {
|
|
|
74
77
|
result.onceOffCost = 0;
|
|
75
78
|
result.variationFiles = [];
|
|
76
79
|
}
|
|
80
|
+
else if (_this.fieldType === FieldType.PANTONE_COLOUR_SELECT &&
|
|
81
|
+
_this.allowAllPantones) {
|
|
82
|
+
result.value = _this.defaultValue;
|
|
83
|
+
result.onceOffCost = _this.variationCost;
|
|
84
|
+
}
|
|
77
85
|
else if (_this.fieldType === FieldType.AREA) {
|
|
78
86
|
result.value = _this.defaultValue;
|
|
79
87
|
result.onceOffCost = 0;
|
|
@@ -137,6 +145,10 @@ var VariationField = /** @class */ (function (_super) {
|
|
|
137
145
|
VariationField.property(),
|
|
138
146
|
__metadata("design:type", Number)
|
|
139
147
|
], VariationField.prototype, "position", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
VariationField.property({ type: Number }),
|
|
150
|
+
__metadata("design:type", Object)
|
|
151
|
+
], VariationField.prototype, "layoutSpan", void 0);
|
|
140
152
|
__decorate([
|
|
141
153
|
VariationField.property(),
|
|
142
154
|
__metadata("design:type", Boolean)
|
|
@@ -213,6 +225,10 @@ var VariationField = /** @class */ (function (_super) {
|
|
|
213
225
|
VariationField.property(),
|
|
214
226
|
__metadata("design:type", Boolean)
|
|
215
227
|
], VariationField.prototype, "allowDecimal", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
VariationField.property(),
|
|
230
|
+
__metadata("design:type", Boolean)
|
|
231
|
+
], VariationField.prototype, "allowAllPantones", void 0);
|
|
216
232
|
__decorate([
|
|
217
233
|
VariationField.property(),
|
|
218
234
|
__metadata("design:type", Boolean)
|
package/package.json
CHANGED
package/src/entities/product.ts
CHANGED
|
@@ -80,6 +80,12 @@ export class Product extends Entity {
|
|
|
80
80
|
@Product.property()
|
|
81
81
|
public groupsFirst?: boolean;
|
|
82
82
|
|
|
83
|
+
@Product.property()
|
|
84
|
+
public independentVariationColumns?: number;
|
|
85
|
+
|
|
86
|
+
@Product.property()
|
|
87
|
+
public groupVariationColumns?: number;
|
|
88
|
+
|
|
83
89
|
@Product.property()
|
|
84
90
|
public deliveryDaysNormal?: number;
|
|
85
91
|
|
|
@@ -23,6 +23,10 @@ export class VariationField extends Entity {
|
|
|
23
23
|
@VariationField.property()
|
|
24
24
|
public position?: number;
|
|
25
25
|
|
|
26
|
+
/** Columns this field spans. Null is the full width of its list. */
|
|
27
|
+
@VariationField.property({type: Number})
|
|
28
|
+
public layoutSpan?: number | null;
|
|
29
|
+
|
|
26
30
|
@VariationField.property()
|
|
27
31
|
public required?: boolean;
|
|
28
32
|
|
|
@@ -80,6 +84,9 @@ export class VariationField extends Entity {
|
|
|
80
84
|
@VariationField.property()
|
|
81
85
|
public allowDecimal?: boolean;
|
|
82
86
|
|
|
87
|
+
@VariationField.property()
|
|
88
|
+
public allowAllPantones?: boolean;
|
|
89
|
+
|
|
83
90
|
@VariationField.property()
|
|
84
91
|
public isHtml?: boolean;
|
|
85
92
|
|
|
@@ -207,6 +214,9 @@ export class VariationField extends Entity {
|
|
|
207
214
|
if (this.fieldType === undefined) {
|
|
208
215
|
throw new Error('fieldType is undefined, did you forget to embed it?');
|
|
209
216
|
}
|
|
217
|
+
if (this.fieldType === FieldType.PANTONE_COLOUR_SELECT) {
|
|
218
|
+
return !this.allowAllPantones;
|
|
219
|
+
}
|
|
210
220
|
const selectable = new Set([FieldType.SELECT,
|
|
211
221
|
FieldType.CHECKBOX,
|
|
212
222
|
FieldType.RADIO,
|
|
@@ -233,6 +243,12 @@ export class VariationField extends Entity {
|
|
|
233
243
|
result.value = this.defaultValue;
|
|
234
244
|
result.onceOffCost = 0;
|
|
235
245
|
result.variationFiles = [];
|
|
246
|
+
} else if (
|
|
247
|
+
this.fieldType === FieldType.PANTONE_COLOUR_SELECT &&
|
|
248
|
+
this.allowAllPantones
|
|
249
|
+
) {
|
|
250
|
+
result.value = this.defaultValue;
|
|
251
|
+
result.onceOffCost = this.variationCost;
|
|
236
252
|
} else if (this.fieldType === FieldType.AREA) {
|
|
237
253
|
result.value = this.defaultValue;
|
|
238
254
|
result.onceOffCost = 0;
|