@cakemail-org/ui-components-v2 2.1.30 → 2.1.31
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/dist/cjs/index.js
CHANGED
|
@@ -16698,16 +16698,15 @@ var ListCampaignModel = /** @class */ (function () {
|
|
|
16698
16698
|
});
|
|
16699
16699
|
});
|
|
16700
16700
|
};
|
|
16701
|
-
ListCampaignModel.prototype.save = function (
|
|
16701
|
+
ListCampaignModel.prototype.save = function (campaign) {
|
|
16702
16702
|
return __awaiter(this, void 0, void 0, function () {
|
|
16703
|
-
var campaign;
|
|
16704
16703
|
var _this = this;
|
|
16705
16704
|
return __generator(this, function (_a) {
|
|
16706
|
-
campaign = (params === null || params === void 0 ? void 0 : params.campaign) || this.toJson();
|
|
16707
16705
|
if (!this.id) {
|
|
16708
16706
|
throw new Error("Campaign was not initialized");
|
|
16709
16707
|
}
|
|
16710
|
-
if (!
|
|
16708
|
+
if (!campaign) {
|
|
16709
|
+
campaign = this.toJson();
|
|
16711
16710
|
campaign === null || campaign === void 0 ? true : delete campaign.sender;
|
|
16712
16711
|
}
|
|
16713
16712
|
return [2 /*return*/, updateCampaign({ campaign: campaign, id: this.id }).then(function (data) {
|
|
@@ -17218,14 +17217,14 @@ var CommonFormModel = /** @class */ (function () {
|
|
|
17218
17217
|
});
|
|
17219
17218
|
});
|
|
17220
17219
|
};
|
|
17221
|
-
CommonFormModel.prototype.save = function (
|
|
17220
|
+
CommonFormModel.prototype.save = function (form) {
|
|
17222
17221
|
return __awaiter(this, void 0, void 0, function () {
|
|
17223
17222
|
var _this = this;
|
|
17224
17223
|
return __generator(this, function (_a) {
|
|
17225
17224
|
if (!this.id) {
|
|
17226
17225
|
throw new Error("Form was not initialized");
|
|
17227
17226
|
}
|
|
17228
|
-
return [2 /*return*/, patchForm({ id: this.id.toString(), data:
|
|
17227
|
+
return [2 /*return*/, patchForm({ id: this.id.toString(), data: form || this.toJson() }).then(function (data) {
|
|
17229
17228
|
trackEvent(exports.EEvents.FORM_UPDATED, { id: _this.id });
|
|
17230
17229
|
return data.data;
|
|
17231
17230
|
})];
|
|
@@ -25,9 +25,7 @@ export declare class ListCampaignModel {
|
|
|
25
25
|
toJson(): any;
|
|
26
26
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
27
27
|
delete(): Promise<TDeleteApiResource>;
|
|
28
|
-
save(
|
|
29
|
-
campaign: Partial<TCampaignUpdate>;
|
|
30
|
-
}): Promise<CampaignModel>;
|
|
28
|
+
save(campaign?: Partial<TCampaignUpdate>): Promise<CampaignModel>;
|
|
31
29
|
render({ contactId }: {
|
|
32
30
|
contactId?: number;
|
|
33
31
|
}): Promise<string>;
|
|
@@ -14,9 +14,7 @@ export declare class CommonFormModel {
|
|
|
14
14
|
toJson(): any;
|
|
15
15
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
16
16
|
delete(): Promise<TDeleteApiResource>;
|
|
17
|
-
save(
|
|
18
|
-
form: Partial<TEnhancedFormModel>;
|
|
19
|
-
}): Promise<EnhancedFormModel>;
|
|
17
|
+
save(form?: Partial<TEnhancedFormModel>): Promise<EnhancedFormModel>;
|
|
20
18
|
}
|
|
21
19
|
export declare class FormModel extends CommonFormModel {
|
|
22
20
|
readonly status: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -16678,16 +16678,15 @@ var ListCampaignModel = /** @class */ (function () {
|
|
|
16678
16678
|
});
|
|
16679
16679
|
});
|
|
16680
16680
|
};
|
|
16681
|
-
ListCampaignModel.prototype.save = function (
|
|
16681
|
+
ListCampaignModel.prototype.save = function (campaign) {
|
|
16682
16682
|
return __awaiter(this, void 0, void 0, function () {
|
|
16683
|
-
var campaign;
|
|
16684
16683
|
var _this = this;
|
|
16685
16684
|
return __generator(this, function (_a) {
|
|
16686
|
-
campaign = (params === null || params === void 0 ? void 0 : params.campaign) || this.toJson();
|
|
16687
16685
|
if (!this.id) {
|
|
16688
16686
|
throw new Error("Campaign was not initialized");
|
|
16689
16687
|
}
|
|
16690
|
-
if (!
|
|
16688
|
+
if (!campaign) {
|
|
16689
|
+
campaign = this.toJson();
|
|
16691
16690
|
campaign === null || campaign === void 0 ? true : delete campaign.sender;
|
|
16692
16691
|
}
|
|
16693
16692
|
return [2 /*return*/, updateCampaign({ campaign: campaign, id: this.id }).then(function (data) {
|
|
@@ -17198,14 +17197,14 @@ var CommonFormModel = /** @class */ (function () {
|
|
|
17198
17197
|
});
|
|
17199
17198
|
});
|
|
17200
17199
|
};
|
|
17201
|
-
CommonFormModel.prototype.save = function (
|
|
17200
|
+
CommonFormModel.prototype.save = function (form) {
|
|
17202
17201
|
return __awaiter(this, void 0, void 0, function () {
|
|
17203
17202
|
var _this = this;
|
|
17204
17203
|
return __generator(this, function (_a) {
|
|
17205
17204
|
if (!this.id) {
|
|
17206
17205
|
throw new Error("Form was not initialized");
|
|
17207
17206
|
}
|
|
17208
|
-
return [2 /*return*/, patchForm({ id: this.id.toString(), data:
|
|
17207
|
+
return [2 /*return*/, patchForm({ id: this.id.toString(), data: form || this.toJson() }).then(function (data) {
|
|
17209
17208
|
trackEvent(EEvents.FORM_UPDATED, { id: _this.id });
|
|
17210
17209
|
return data.data;
|
|
17211
17210
|
})];
|
|
@@ -25,9 +25,7 @@ export declare class ListCampaignModel {
|
|
|
25
25
|
toJson(): any;
|
|
26
26
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
27
27
|
delete(): Promise<TDeleteApiResource>;
|
|
28
|
-
save(
|
|
29
|
-
campaign: Partial<TCampaignUpdate>;
|
|
30
|
-
}): Promise<CampaignModel>;
|
|
28
|
+
save(campaign?: Partial<TCampaignUpdate>): Promise<CampaignModel>;
|
|
31
29
|
render({ contactId }: {
|
|
32
30
|
contactId?: number;
|
|
33
31
|
}): Promise<string>;
|
|
@@ -14,9 +14,7 @@ export declare class CommonFormModel {
|
|
|
14
14
|
toJson(): any;
|
|
15
15
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
16
16
|
delete(): Promise<TDeleteApiResource>;
|
|
17
|
-
save(
|
|
18
|
-
form: Partial<TEnhancedFormModel>;
|
|
19
|
-
}): Promise<EnhancedFormModel>;
|
|
17
|
+
save(form?: Partial<TEnhancedFormModel>): Promise<EnhancedFormModel>;
|
|
20
18
|
}
|
|
21
19
|
export declare class FormModel extends CommonFormModel {
|
|
22
20
|
readonly status: string;
|