@merchi/sdk 1.42.14 → 1.42.15
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.
|
@@ -136,6 +136,10 @@ var VariationFieldsOption = /** @class */ (function (_super) {
|
|
|
136
136
|
VariationFieldsOption.property({ type: MerchiFile }),
|
|
137
137
|
__metadata("design:type", Object)
|
|
138
138
|
], VariationFieldsOption.prototype, "linkedFile", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
VariationFieldsOption.property({ type: MerchiFile }),
|
|
141
|
+
__metadata("design:type", Object)
|
|
142
|
+
], VariationFieldsOption.prototype, "linkedProductImage", void 0);
|
|
139
143
|
__decorate([
|
|
140
144
|
VariationFieldsOption.property({ arrayType: 'Variation' }),
|
|
141
145
|
__metadata("design:type", Array)
|
package/dist/entity.js
CHANGED
|
@@ -209,10 +209,12 @@ var Entity = /** @class */ (function () {
|
|
|
209
209
|
propertyInfo.currentValue = newValue;
|
|
210
210
|
}
|
|
211
211
|
else if (_this.isSingleEntityProperty(propertyInfo)) {
|
|
212
|
-
//
|
|
213
|
-
//
|
|
214
|
-
|
|
215
|
-
|
|
212
|
+
// null clears the link. An empty entity would omit the clear
|
|
213
|
+
// sentinel from toFormData, so the saved photo would stick.
|
|
214
|
+
if (value === null) {
|
|
215
|
+
propertyInfo.currentValue = null;
|
|
216
|
+
}
|
|
217
|
+
else if (propertyInfo.currentValue) {
|
|
216
218
|
propertyInfo.currentValue.fromJson(value, options);
|
|
217
219
|
}
|
|
218
220
|
else {
|
package/package.json
CHANGED
|
@@ -67,6 +67,9 @@ export class VariationFieldsOption extends Entity {
|
|
|
67
67
|
@VariationFieldsOption.property({type: MerchiFile})
|
|
68
68
|
public linkedFile?: MerchiFile | null;
|
|
69
69
|
|
|
70
|
+
@VariationFieldsOption.property({type: MerchiFile})
|
|
71
|
+
public linkedProductImage?: MerchiFile | null;
|
|
72
|
+
|
|
70
73
|
@VariationFieldsOption.property({arrayType: 'Variation'})
|
|
71
74
|
public selectedByVariations?: Variation[];
|
|
72
75
|
|
package/src/entity.ts
CHANGED
|
@@ -862,10 +862,11 @@ export class Entity {
|
|
|
862
862
|
});
|
|
863
863
|
propertyInfo.currentValue = newValue;
|
|
864
864
|
} else if (this.isSingleEntityProperty(propertyInfo)) {
|
|
865
|
-
//
|
|
866
|
-
//
|
|
867
|
-
|
|
868
|
-
|
|
865
|
+
// null clears the link. An empty entity would omit the clear
|
|
866
|
+
// sentinel from toFormData, so the saved photo would stick.
|
|
867
|
+
if (value === null) {
|
|
868
|
+
propertyInfo.currentValue = null;
|
|
869
|
+
} else if (propertyInfo.currentValue) {
|
|
869
870
|
propertyInfo.currentValue.fromJson(value, options);
|
|
870
871
|
} else {
|
|
871
872
|
const nested = new (propertyInfo.type as any)(this.merchi);
|