@cakemail-org/ui-components-v2 2.1.17 → 2.1.18

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
@@ -17172,6 +17172,20 @@ var CommonFormModel = /** @class */ (function () {
17172
17172
  });
17173
17173
  });
17174
17174
  };
17175
+ CommonFormModel.prototype.save = function () {
17176
+ return __awaiter(this, void 0, void 0, function () {
17177
+ var _this = this;
17178
+ return __generator(this, function (_a) {
17179
+ if (!this.id) {
17180
+ throw new Error("Form was not initialized");
17181
+ }
17182
+ return [2 /*return*/, patchForm({ id: this.id.toString(), data: this.toJson() }).then(function (data) {
17183
+ trackEvent(exports.EEvents.FORM_UPDATED, { id: _this.id });
17184
+ return data.data;
17185
+ })];
17186
+ });
17187
+ });
17188
+ };
17175
17189
  return CommonFormModel;
17176
17190
  }());
17177
17191
  var FormModel = /** @class */ (function (_super) {
@@ -17276,20 +17290,6 @@ var SummaryEnhancedFormModel = /** @class */ (function (_super) {
17276
17290
  });
17277
17291
  });
17278
17292
  };
17279
- SummaryEnhancedFormModel.prototype.save = function () {
17280
- return __awaiter(this, void 0, void 0, function () {
17281
- var _this = this;
17282
- return __generator(this, function (_a) {
17283
- if (!this.id) {
17284
- throw new Error("Form was not initialized");
17285
- }
17286
- return [2 /*return*/, patchForm({ id: this.id.toString(), data: this.toJson() }).then(function (data) {
17287
- trackEvent(exports.EEvents.FORM_UPDATED, { id: _this.id });
17288
- return data.data;
17289
- })];
17290
- });
17291
- });
17292
- };
17293
17293
  SummaryEnhancedFormModel.prototype.toJson = function () {
17294
17294
  return modelToJson(this);
17295
17295
  };
@@ -14,6 +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(): Promise<EnhancedFormModel>;
17
18
  }
18
19
  export declare class FormModel extends CommonFormModel {
19
20
  readonly status: string;
@@ -59,7 +60,6 @@ export declare class SummaryEnhancedFormModel extends CommonFormModel {
59
60
  disable(): Promise<EnhancedFormModel>;
60
61
  publish(): Promise<EnhancedFormModel>;
61
62
  render(published?: boolean): Promise<string>;
62
- save(): Promise<EnhancedFormModel>;
63
63
  toJson(): any;
64
64
  set<T extends keyof this>(property: T, value: this[T]): void;
65
65
  }
package/dist/esm/index.js CHANGED
@@ -17152,6 +17152,20 @@ var CommonFormModel = /** @class */ (function () {
17152
17152
  });
17153
17153
  });
17154
17154
  };
17155
+ CommonFormModel.prototype.save = function () {
17156
+ return __awaiter(this, void 0, void 0, function () {
17157
+ var _this = this;
17158
+ return __generator(this, function (_a) {
17159
+ if (!this.id) {
17160
+ throw new Error("Form was not initialized");
17161
+ }
17162
+ return [2 /*return*/, patchForm({ id: this.id.toString(), data: this.toJson() }).then(function (data) {
17163
+ trackEvent(EEvents.FORM_UPDATED, { id: _this.id });
17164
+ return data.data;
17165
+ })];
17166
+ });
17167
+ });
17168
+ };
17155
17169
  return CommonFormModel;
17156
17170
  }());
17157
17171
  var FormModel = /** @class */ (function (_super) {
@@ -17256,20 +17270,6 @@ var SummaryEnhancedFormModel = /** @class */ (function (_super) {
17256
17270
  });
17257
17271
  });
17258
17272
  };
17259
- SummaryEnhancedFormModel.prototype.save = function () {
17260
- return __awaiter(this, void 0, void 0, function () {
17261
- var _this = this;
17262
- return __generator(this, function (_a) {
17263
- if (!this.id) {
17264
- throw new Error("Form was not initialized");
17265
- }
17266
- return [2 /*return*/, patchForm({ id: this.id.toString(), data: this.toJson() }).then(function (data) {
17267
- trackEvent(EEvents.FORM_UPDATED, { id: _this.id });
17268
- return data.data;
17269
- })];
17270
- });
17271
- });
17272
- };
17273
17273
  SummaryEnhancedFormModel.prototype.toJson = function () {
17274
17274
  return modelToJson(this);
17275
17275
  };
@@ -14,6 +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(): Promise<EnhancedFormModel>;
17
18
  }
18
19
  export declare class FormModel extends CommonFormModel {
19
20
  readonly status: string;
@@ -59,7 +60,6 @@ export declare class SummaryEnhancedFormModel extends CommonFormModel {
59
60
  disable(): Promise<EnhancedFormModel>;
60
61
  publish(): Promise<EnhancedFormModel>;
61
62
  render(published?: boolean): Promise<string>;
62
- save(): Promise<EnhancedFormModel>;
63
63
  toJson(): any;
64
64
  set<T extends keyof this>(property: T, value: this[T]): void;
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.1.17",
3
+ "version": "2.1.18",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",