@merchi/sdk 1.42.41 → 1.42.43

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.
@@ -291,11 +291,11 @@ var VariationField = /** @class */ (function (_super) {
291
291
  __metadata("design:type", Boolean)
292
292
  ], VariationField.prototype, "allowFileAi", void 0);
293
293
  __decorate([
294
- VariationField.property(),
294
+ VariationField.property({ type: Number }),
295
295
  __metadata("design:type", Object)
296
296
  ], VariationField.prototype, "colourRepeatMin", void 0);
297
297
  __decorate([
298
- VariationField.property(),
298
+ VariationField.property({ type: Number }),
299
299
  __metadata("design:type", Object)
300
300
  ], VariationField.prototype, "colourRepeatMax", void 0);
301
301
  __decorate([
@@ -4,6 +4,13 @@ test('can make VariationField', function () {
4
4
  var variationField = new merchi.VariationField();
5
5
  expect(variationField).toBeTruthy();
6
6
  });
7
+ test('colour repeat limits stay numeric', function () {
8
+ var merchi = new Merchi();
9
+ var variationField = new merchi.VariationField();
10
+ variationField.fromJson({ id: 42, colourRepeatMin: 1, colourRepeatMax: 3 });
11
+ expect(variationField.colourRepeatMin).toBe(1);
12
+ expect(variationField.colourRepeatMax).toBe(3);
13
+ });
7
14
  test('isSelectable', function () {
8
15
  var merchi = new Merchi();
9
16
  var vf = new merchi.VariationField();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merchi/sdk",
3
- "version": "1.42.41",
3
+ "version": "1.42.43",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -6,6 +6,14 @@ test('can make VariationField', () => {
6
6
  expect(variationField).toBeTruthy();
7
7
  });
8
8
 
9
+ test('colour repeat limits stay numeric', () => {
10
+ const merchi = new Merchi();
11
+ const variationField = new merchi.VariationField();
12
+ variationField.fromJson({id: 42, colourRepeatMin: 1, colourRepeatMax: 3});
13
+ expect(variationField.colourRepeatMin).toBe(1);
14
+ expect(variationField.colourRepeatMax).toBe(3);
15
+ });
16
+
9
17
  test('isSelectable', () => {
10
18
  const merchi = new Merchi();
11
19
  const vf = new merchi.VariationField();
@@ -130,10 +130,10 @@ export class VariationField extends Entity {
130
130
  @VariationField.property()
131
131
  public allowFileAi?: boolean;
132
132
 
133
- @VariationField.property()
133
+ @VariationField.property({type: Number})
134
134
  public colourRepeatMin?: number | null;
135
135
 
136
- @VariationField.property()
136
+ @VariationField.property({type: Number})
137
137
  public colourRepeatMax?: number | null;
138
138
 
139
139
  @VariationField.property()