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