@cakemail-org/ui-components-v2 2.1.51 → 2.1.52

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.
@@ -7,6 +7,7 @@ export * from "./contacts";
7
7
  export * from "./emailAPI";
8
8
  export * from "./forms";
9
9
  export * from "./lists";
10
+ export * from "./popups";
10
11
  export * from "./senders";
11
12
  export * from "./support";
12
13
  export * from "./suppressedEmails";
package/dist/cjs/index.js CHANGED
@@ -10544,6 +10544,127 @@ function downloadListLogExport(_a) {
10544
10544
  });
10545
10545
  }
10546
10546
 
10547
+ function listPopups(_a) {
10548
+ return __awaiter(this, void 0, void 0, function () {
10549
+ var options = __rest(_a, []);
10550
+ return __generator(this, function (_b) {
10551
+ return [2 /*return*/, callApi({
10552
+ url: uiKitConfig.GATEWAY_PROXY + "/popups",
10553
+ query: camelCase(options),
10554
+ fetchOptions: {
10555
+ method: exports.EMethods.get
10556
+ }
10557
+ })];
10558
+ });
10559
+ });
10560
+ }
10561
+ function createPopup(_a) {
10562
+ return __awaiter(this, void 0, void 0, function () {
10563
+ var popup = __rest(_a, []);
10564
+ return __generator(this, function (_b) {
10565
+ return [2 /*return*/, callApi({
10566
+ url: uiKitConfig.GATEWAY_PROXY + "/popups",
10567
+ fetchOptions: {
10568
+ body: popup,
10569
+ method: exports.EMethods.post
10570
+ }
10571
+ })];
10572
+ });
10573
+ });
10574
+ }
10575
+ function getPopup(_a) {
10576
+ return __awaiter(this, arguments, void 0, function (_b) {
10577
+ var id = _b.id;
10578
+ return __generator(this, function (_c) {
10579
+ return [2 /*return*/, callApi({
10580
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id),
10581
+ fetchOptions: {
10582
+ method: exports.EMethods.get
10583
+ }
10584
+ })];
10585
+ });
10586
+ });
10587
+ }
10588
+ function deletePopup(_a) {
10589
+ return __awaiter(this, arguments, void 0, function (_b) {
10590
+ var id = _b.id;
10591
+ return __generator(this, function (_c) {
10592
+ return [2 /*return*/, callApi({
10593
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id),
10594
+ fetchOptions: {
10595
+ method: exports.EMethods.get
10596
+ }
10597
+ })];
10598
+ });
10599
+ });
10600
+ }
10601
+ function updatePopup(_a) {
10602
+ return __awaiter(this, void 0, void 0, function () {
10603
+ var id = _a.id, popup = __rest(_a, ["id"]);
10604
+ return __generator(this, function (_b) {
10605
+ return [2 /*return*/, callApi({
10606
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id),
10607
+ fetchOptions: {
10608
+ method: exports.EMethods.patch,
10609
+ body: popup
10610
+ }
10611
+ })];
10612
+ });
10613
+ });
10614
+ }
10615
+ function enablePopup(_a) {
10616
+ return __awaiter(this, arguments, void 0, function (_b) {
10617
+ var id = _b.id;
10618
+ return __generator(this, function (_c) {
10619
+ return [2 /*return*/, callApi({
10620
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id, "/enable"),
10621
+ fetchOptions: {
10622
+ method: exports.EMethods.post,
10623
+ }
10624
+ })];
10625
+ });
10626
+ });
10627
+ }
10628
+ function disablePopup(_a) {
10629
+ return __awaiter(this, arguments, void 0, function (_b) {
10630
+ var id = _b.id;
10631
+ return __generator(this, function (_c) {
10632
+ return [2 /*return*/, callApi({
10633
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id, "/disable"),
10634
+ fetchOptions: {
10635
+ method: exports.EMethods.post,
10636
+ }
10637
+ })];
10638
+ });
10639
+ });
10640
+ }
10641
+ function publishPopup(_a) {
10642
+ return __awaiter(this, arguments, void 0, function (_b) {
10643
+ var id = _b.id;
10644
+ return __generator(this, function (_c) {
10645
+ return [2 /*return*/, callApi({
10646
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id, "/publish"),
10647
+ fetchOptions: {
10648
+ method: exports.EMethods.post,
10649
+ }
10650
+ })];
10651
+ });
10652
+ });
10653
+ }
10654
+ function renderPopup(_a) {
10655
+ return __awaiter(this, arguments, void 0, function (_b) {
10656
+ var id = _b.id;
10657
+ return __generator(this, function (_c) {
10658
+ return [2 /*return*/, callApi({
10659
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id, "/render"),
10660
+ fetchOptions: {
10661
+ method: exports.EMethods.get,
10662
+ }
10663
+ })];
10664
+ });
10665
+ });
10666
+ }
10667
+
10547
10668
  function listSenders(_a) {
10548
10669
  var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
10549
10670
  return callApi({
@@ -17642,6 +17763,112 @@ var ListModel = /** @class */ (function () {
17642
17763
  return ListModel;
17643
17764
  }());
17644
17765
 
17766
+ var ListPopupModel = /** @class */ (function () {
17767
+ function ListPopupModel(params) {
17768
+ this.id = params.id;
17769
+ this.account_id = params.account_id;
17770
+ this.name = params.name;
17771
+ this.description = params.description;
17772
+ this.enabled = params.enabled;
17773
+ this.created_on = params.created_on;
17774
+ this.updated_on = params.updated_on;
17775
+ this.published_on = params.published_on;
17776
+ this.branding = params.branding;
17777
+ this.tags = params.tags;
17778
+ this.edited_by = params.edited_by;
17779
+ this.content = params.content;
17780
+ this.trigger = params.trigger;
17781
+ this.targeting = params.targeting;
17782
+ this.display_frequency = params.display_frequency;
17783
+ this.published_content_url = params.published_content_url;
17784
+ this.thumbnail_url = params.thumbnail_url;
17785
+ }
17786
+ ListPopupModel.prototype.toJson = function () {
17787
+ return modelToJson(this);
17788
+ };
17789
+ ListPopupModel.prototype.set = function (property, value) {
17790
+ modelSet(this, property, value);
17791
+ };
17792
+ ListPopupModel.prototype.delete = function () {
17793
+ return __awaiter(this, void 0, void 0, function () {
17794
+ var _this = this;
17795
+ return __generator(this, function (_a) {
17796
+ return [2 /*return*/, deletePopup({ id: this.id }).then(function (data) {
17797
+ trackEvent(exports.EEvents.POPUP_DELETED, { id: _this.id });
17798
+ return data;
17799
+ })];
17800
+ });
17801
+ });
17802
+ };
17803
+ ListPopupModel.prototype.save = function (_a) {
17804
+ return __awaiter(this, void 0, void 0, function () {
17805
+ var _this = this;
17806
+ var popup = __rest(_a, []);
17807
+ return __generator(this, function (_b) {
17808
+ return [2 /*return*/, updatePopup({ id: this.id, popup: popup }).then(function (data) {
17809
+ trackEvent(exports.EEvents.POPUP_UPDATED, { id: _this.id });
17810
+ return new PopupModel(data.data);
17811
+ })];
17812
+ });
17813
+ });
17814
+ };
17815
+ ListPopupModel.prototype.enable = function () {
17816
+ return __awaiter(this, void 0, void 0, function () {
17817
+ var _this = this;
17818
+ return __generator(this, function (_a) {
17819
+ return [2 /*return*/, enablePopup({ id: this.id }).then(function (data) {
17820
+ trackEvent(exports.EEvents.POPUP_ENABLED, { id: _this.id });
17821
+ return new PopupModel(data.data);
17822
+ })];
17823
+ });
17824
+ });
17825
+ };
17826
+ ListPopupModel.prototype.disable = function () {
17827
+ return __awaiter(this, void 0, void 0, function () {
17828
+ var _this = this;
17829
+ return __generator(this, function (_a) {
17830
+ return [2 /*return*/, disablePopup({ id: this.id }).then(function (data) {
17831
+ trackEvent(exports.EEvents.POPUP_DISABLED, { id: _this.id });
17832
+ return new PopupModel(data.data);
17833
+ })];
17834
+ });
17835
+ });
17836
+ };
17837
+ ListPopupModel.prototype.publish = function () {
17838
+ return __awaiter(this, void 0, void 0, function () {
17839
+ var _this = this;
17840
+ return __generator(this, function (_a) {
17841
+ return [2 /*return*/, publishPopup({ id: this.id }).then(function (data) {
17842
+ trackEvent(exports.EEvents.POPUP_PUBLISHED, { id: _this.id });
17843
+ return new PopupModel(data.data);
17844
+ })];
17845
+ });
17846
+ });
17847
+ };
17848
+ ListPopupModel.prototype.render = function () {
17849
+ return __awaiter(this, void 0, void 0, function () {
17850
+ return __generator(this, function (_a) {
17851
+ return [2 /*return*/, renderPopup({ id: this.id }).then(function (data) {
17852
+ return data.data;
17853
+ })];
17854
+ });
17855
+ });
17856
+ };
17857
+ return ListPopupModel;
17858
+ }());
17859
+ var PopupModel = /** @class */ (function (_super) {
17860
+ __extends(PopupModel, _super);
17861
+ function PopupModel(params) {
17862
+ var _this = _super.call(this, params) || this;
17863
+ _this.content = params.content;
17864
+ return _this;
17865
+ }
17866
+ PopupModel.prototype.toJson = function () {
17867
+ return modelToJson(this);
17868
+ };
17869
+ return PopupModel;
17870
+ }(ListPopupModel));
17871
+
17645
17872
  var SenderModel = /** @class */ (function () {
17646
17873
  function SenderModel(_a) {
17647
17874
  var id = _a.id, name = _a.name, email = _a.email, confirmed = _a.confirmed, confirmed_on = _a.confirmed_on, language = _a.language, last_confirmation_sent_on = _a.last_confirmation_sent_on;
@@ -17967,6 +18194,45 @@ var ListsFactory = /** @class */ (function () {
17967
18194
  return ListsFactory;
17968
18195
  }());
17969
18196
 
18197
+ var PopupsFactory = /** @class */ (function () {
18198
+ function PopupsFactory() {
18199
+ }
18200
+ PopupsFactory.list = function (_a) {
18201
+ return __awaiter(this, void 0, void 0, function () {
18202
+ var params = __rest(_a, []);
18203
+ return __generator(this, function (_b) {
18204
+ return [2 /*return*/, listPopups(params).then(function (data) {
18205
+ return __assign(__assign({}, data), { data: data.data.map(function (popup) { return new ListPopupModel(popup); }) });
18206
+ })];
18207
+ });
18208
+ });
18209
+ };
18210
+ PopupsFactory.create = function (_a) {
18211
+ return __awaiter(this, void 0, void 0, function () {
18212
+ var popup = __rest(_a, []);
18213
+ return __generator(this, function (_b) {
18214
+ return [2 /*return*/, createPopup(popup).then(function (data) {
18215
+ trackEvent(exports.EEvents.POPUP_CREATED, {
18216
+ name: data.data.name
18217
+ });
18218
+ return new PopupModel(data.data);
18219
+ })];
18220
+ });
18221
+ });
18222
+ };
18223
+ PopupsFactory.get = function (_a) {
18224
+ return __awaiter(this, arguments, void 0, function (_b) {
18225
+ var id = _b.id;
18226
+ return __generator(this, function (_c) {
18227
+ return [2 /*return*/, getPopup({ id: id }).then(function (data) {
18228
+ return new PopupModel(data.data);
18229
+ })];
18230
+ });
18231
+ });
18232
+ };
18233
+ return PopupsFactory;
18234
+ }());
18235
+
17970
18236
  var SendersFactory = /** @class */ (function () {
17971
18237
  function SendersFactory() {
17972
18238
  }
@@ -18400,6 +18666,7 @@ exports.LinearProgress = LinearProgress;
18400
18666
  exports.Link = Link;
18401
18667
  exports.ListCampaignModel = ListCampaignModel;
18402
18668
  exports.ListModel = ListModel;
18669
+ exports.ListPopupModel = ListPopupModel;
18403
18670
  exports.ListTemplateModel = ListTemplateModel;
18404
18671
  exports.ListsFactory = ListsFactory;
18405
18672
  exports.LoadingContainer = LoadingContainer;
@@ -18412,6 +18679,8 @@ exports.ModalHandler = ModalHandler;
18412
18679
  exports.ModalHeading = ModalHeading;
18413
18680
  exports.OverlayHandler = OverlayHandler;
18414
18681
  exports.PhoneTextField = PhoneTextField;
18682
+ exports.PopupModel = PopupModel;
18683
+ exports.PopupsFactory = PopupsFactory;
18415
18684
  exports.Radio = Radio;
18416
18685
  exports.ResourceEdit = ResourceEdit;
18417
18686
  exports.Search = Search;
@@ -18462,6 +18731,7 @@ exports.createCampaign = createCampaign;
18462
18731
  exports.createCampaignLogsExports = createCampaignLogsExports;
18463
18732
  exports.createCampaignsReportsExport = createCampaignsReportsExport;
18464
18733
  exports.createForm = createForm;
18734
+ exports.createPopup = createPopup;
18465
18735
  exports.createSuppressedEmailExport = createSuppressedEmailExport;
18466
18736
  exports.createTemplate = createTemplate;
18467
18737
  exports.deepMergeObject = deepMergeObject;
@@ -18470,6 +18740,7 @@ exports.deleteCampaignsReportsExport = deleteCampaignsReportsExport;
18470
18740
  exports.deleteForm = deleteForm;
18471
18741
  exports.deleteList = deleteList;
18472
18742
  exports.deletePartialInformation = deletePartialInformation;
18743
+ exports.deletePopup = deletePopup;
18473
18744
  exports.deleteStorageItem = deleteStorageItem;
18474
18745
  exports.deleteSuppressedEmail = deleteSuppressedEmail;
18475
18746
  exports.deleteTaskService = deleteTaskService;
@@ -18477,6 +18748,7 @@ exports.deleteTemplate = deleteTemplate;
18477
18748
  exports.deleteUser = deleteUser;
18478
18749
  exports.descendingComparator = descendingComparator;
18479
18750
  exports.disableForm = disableForm;
18751
+ exports.disablePopup = disablePopup;
18480
18752
  exports.downloadCampaignLogExport = downloadCampaignLogExport;
18481
18753
  exports.downloadCampaignsReportsExport = downloadCampaignsReportsExport;
18482
18754
  exports.downloadContactsExport = downloadContactsExport;
@@ -18485,6 +18757,7 @@ exports.downloadSuppressedEmailExport = downloadSuppressedEmailExport;
18485
18757
  exports.emptyAccountAddress = emptyAccountAddress;
18486
18758
  exports.emptyAccountLimits = emptyAccountLimits;
18487
18759
  exports.enableForm = enableForm;
18760
+ exports.enablePopup = enablePopup;
18488
18761
  exports.enrichBrand = enrichBrand;
18489
18762
  exports.enrichOrganization = enrichOrganization;
18490
18763
  exports.enrichProfile = enrichProfile;
@@ -18529,6 +18802,7 @@ exports.getList = getList;
18529
18802
  exports.getListLogs = getListLogs;
18530
18803
  exports.getListReport = getListReport;
18531
18804
  exports.getNestedProperty = getNestedProperty;
18805
+ exports.getPopup = getPopup;
18532
18806
  exports.getPropertyValue = getPropertyValue;
18533
18807
  exports.getSender = getSender;
18534
18808
  exports.getStartOfDate = getStartOfDate;
@@ -18562,6 +18836,7 @@ exports.listForms = listForms;
18562
18836
  exports.listList = listList;
18563
18837
  exports.listListAttributes = listListAttributes;
18564
18838
  exports.listListInterests = listListInterests;
18839
+ exports.listPopups = listPopups;
18565
18840
  exports.listSenders = listSenders;
18566
18841
  exports.listSuppressedEmails = listSuppressedEmails;
18567
18842
  exports.listSystemEmails = listSystemEmails;
@@ -18578,12 +18853,14 @@ exports.patchForm = patchForm;
18578
18853
  exports.popImpersonificationTree = popImpersonificationTree;
18579
18854
  exports.postMessage = postMessage;
18580
18855
  exports.publishForm = publishForm;
18856
+ exports.publishPopup = publishPopup;
18581
18857
  exports.reScheduleCampaign = reScheduleCampaign;
18582
18858
  exports.removeEmptyProperties = removeEmptyProperties;
18583
18859
  exports.removeQueryParams = removeQueryParams;
18584
18860
  exports.removeTrailingChar = removeTrailingChar;
18585
18861
  exports.renderCampaign = renderCampaign;
18586
18862
  exports.renderForm = renderForm;
18863
+ exports.renderPopup = renderPopup;
18587
18864
  exports.renderPublicHtmlForm = renderPublicHtmlForm;
18588
18865
  exports.renderTemplate = renderTemplate;
18589
18866
  exports.requestSupportService = requestSupportService;
@@ -18611,6 +18888,7 @@ exports.unshareTemplate = unshareTemplate;
18611
18888
  exports.updateAccount = updateAccount;
18612
18889
  exports.updateAndClearUrlParams = updateAndClearUrlParams;
18613
18890
  exports.updateCampaign = updateCampaign;
18891
+ exports.updatePopup = updatePopup;
18614
18892
  exports.updateSystemEmails = updateSystemEmails;
18615
18893
  exports.updateTemplate = updateTemplate;
18616
18894
  exports.updateUser = updateUser;
@@ -5,6 +5,7 @@ export * from "./customer";
5
5
  export * from "./emailAPI";
6
6
  export * from "./form";
7
7
  export * from "./list";
8
+ export * from "./popups";
8
9
  export * from "./sender";
9
10
  export * from "./systemEmails";
10
11
  export * from "./tasks";
@@ -9,6 +9,7 @@ export * from "./emailAPI";
9
9
  export * from "./forms";
10
10
  export * from "./hidden";
11
11
  export * from "./lists";
12
+ export * from "./popups";
12
13
  export * from "./senders";
13
14
  export * from "./suppressedEmails";
14
15
  export * from "./systemEmails";
@@ -7,6 +7,7 @@ export * from "./contacts";
7
7
  export * from "./emailAPI";
8
8
  export * from "./forms";
9
9
  export * from "./lists";
10
+ export * from "./popups";
10
11
  export * from "./senders";
11
12
  export * from "./support";
12
13
  export * from "./suppressedEmails";
package/dist/esm/index.js CHANGED
@@ -10524,6 +10524,127 @@ function downloadListLogExport(_a) {
10524
10524
  });
10525
10525
  }
10526
10526
 
10527
+ function listPopups(_a) {
10528
+ return __awaiter(this, void 0, void 0, function () {
10529
+ var options = __rest(_a, []);
10530
+ return __generator(this, function (_b) {
10531
+ return [2 /*return*/, callApi({
10532
+ url: uiKitConfig.GATEWAY_PROXY + "/popups",
10533
+ query: camelCase(options),
10534
+ fetchOptions: {
10535
+ method: EMethods.get
10536
+ }
10537
+ })];
10538
+ });
10539
+ });
10540
+ }
10541
+ function createPopup(_a) {
10542
+ return __awaiter(this, void 0, void 0, function () {
10543
+ var popup = __rest(_a, []);
10544
+ return __generator(this, function (_b) {
10545
+ return [2 /*return*/, callApi({
10546
+ url: uiKitConfig.GATEWAY_PROXY + "/popups",
10547
+ fetchOptions: {
10548
+ body: popup,
10549
+ method: EMethods.post
10550
+ }
10551
+ })];
10552
+ });
10553
+ });
10554
+ }
10555
+ function getPopup(_a) {
10556
+ return __awaiter(this, arguments, void 0, function (_b) {
10557
+ var id = _b.id;
10558
+ return __generator(this, function (_c) {
10559
+ return [2 /*return*/, callApi({
10560
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id),
10561
+ fetchOptions: {
10562
+ method: EMethods.get
10563
+ }
10564
+ })];
10565
+ });
10566
+ });
10567
+ }
10568
+ function deletePopup(_a) {
10569
+ return __awaiter(this, arguments, void 0, function (_b) {
10570
+ var id = _b.id;
10571
+ return __generator(this, function (_c) {
10572
+ return [2 /*return*/, callApi({
10573
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id),
10574
+ fetchOptions: {
10575
+ method: EMethods.get
10576
+ }
10577
+ })];
10578
+ });
10579
+ });
10580
+ }
10581
+ function updatePopup(_a) {
10582
+ return __awaiter(this, void 0, void 0, function () {
10583
+ var id = _a.id, popup = __rest(_a, ["id"]);
10584
+ return __generator(this, function (_b) {
10585
+ return [2 /*return*/, callApi({
10586
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id),
10587
+ fetchOptions: {
10588
+ method: EMethods.patch,
10589
+ body: popup
10590
+ }
10591
+ })];
10592
+ });
10593
+ });
10594
+ }
10595
+ function enablePopup(_a) {
10596
+ return __awaiter(this, arguments, void 0, function (_b) {
10597
+ var id = _b.id;
10598
+ return __generator(this, function (_c) {
10599
+ return [2 /*return*/, callApi({
10600
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id, "/enable"),
10601
+ fetchOptions: {
10602
+ method: EMethods.post,
10603
+ }
10604
+ })];
10605
+ });
10606
+ });
10607
+ }
10608
+ function disablePopup(_a) {
10609
+ return __awaiter(this, arguments, void 0, function (_b) {
10610
+ var id = _b.id;
10611
+ return __generator(this, function (_c) {
10612
+ return [2 /*return*/, callApi({
10613
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id, "/disable"),
10614
+ fetchOptions: {
10615
+ method: EMethods.post,
10616
+ }
10617
+ })];
10618
+ });
10619
+ });
10620
+ }
10621
+ function publishPopup(_a) {
10622
+ return __awaiter(this, arguments, void 0, function (_b) {
10623
+ var id = _b.id;
10624
+ return __generator(this, function (_c) {
10625
+ return [2 /*return*/, callApi({
10626
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id, "/publish"),
10627
+ fetchOptions: {
10628
+ method: EMethods.post,
10629
+ }
10630
+ })];
10631
+ });
10632
+ });
10633
+ }
10634
+ function renderPopup(_a) {
10635
+ return __awaiter(this, arguments, void 0, function (_b) {
10636
+ var id = _b.id;
10637
+ return __generator(this, function (_c) {
10638
+ return [2 /*return*/, callApi({
10639
+ url: uiKitConfig.GATEWAY_PROXY + "/popups/".concat(id, "/render"),
10640
+ fetchOptions: {
10641
+ method: EMethods.get,
10642
+ }
10643
+ })];
10644
+ });
10645
+ });
10646
+ }
10647
+
10527
10648
  function listSenders(_a) {
10528
10649
  var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
10529
10650
  return callApi({
@@ -17622,6 +17743,112 @@ var ListModel = /** @class */ (function () {
17622
17743
  return ListModel;
17623
17744
  }());
17624
17745
 
17746
+ var ListPopupModel = /** @class */ (function () {
17747
+ function ListPopupModel(params) {
17748
+ this.id = params.id;
17749
+ this.account_id = params.account_id;
17750
+ this.name = params.name;
17751
+ this.description = params.description;
17752
+ this.enabled = params.enabled;
17753
+ this.created_on = params.created_on;
17754
+ this.updated_on = params.updated_on;
17755
+ this.published_on = params.published_on;
17756
+ this.branding = params.branding;
17757
+ this.tags = params.tags;
17758
+ this.edited_by = params.edited_by;
17759
+ this.content = params.content;
17760
+ this.trigger = params.trigger;
17761
+ this.targeting = params.targeting;
17762
+ this.display_frequency = params.display_frequency;
17763
+ this.published_content_url = params.published_content_url;
17764
+ this.thumbnail_url = params.thumbnail_url;
17765
+ }
17766
+ ListPopupModel.prototype.toJson = function () {
17767
+ return modelToJson(this);
17768
+ };
17769
+ ListPopupModel.prototype.set = function (property, value) {
17770
+ modelSet(this, property, value);
17771
+ };
17772
+ ListPopupModel.prototype.delete = function () {
17773
+ return __awaiter(this, void 0, void 0, function () {
17774
+ var _this = this;
17775
+ return __generator(this, function (_a) {
17776
+ return [2 /*return*/, deletePopup({ id: this.id }).then(function (data) {
17777
+ trackEvent(EEvents.POPUP_DELETED, { id: _this.id });
17778
+ return data;
17779
+ })];
17780
+ });
17781
+ });
17782
+ };
17783
+ ListPopupModel.prototype.save = function (_a) {
17784
+ return __awaiter(this, void 0, void 0, function () {
17785
+ var _this = this;
17786
+ var popup = __rest(_a, []);
17787
+ return __generator(this, function (_b) {
17788
+ return [2 /*return*/, updatePopup({ id: this.id, popup: popup }).then(function (data) {
17789
+ trackEvent(EEvents.POPUP_UPDATED, { id: _this.id });
17790
+ return new PopupModel(data.data);
17791
+ })];
17792
+ });
17793
+ });
17794
+ };
17795
+ ListPopupModel.prototype.enable = function () {
17796
+ return __awaiter(this, void 0, void 0, function () {
17797
+ var _this = this;
17798
+ return __generator(this, function (_a) {
17799
+ return [2 /*return*/, enablePopup({ id: this.id }).then(function (data) {
17800
+ trackEvent(EEvents.POPUP_ENABLED, { id: _this.id });
17801
+ return new PopupModel(data.data);
17802
+ })];
17803
+ });
17804
+ });
17805
+ };
17806
+ ListPopupModel.prototype.disable = function () {
17807
+ return __awaiter(this, void 0, void 0, function () {
17808
+ var _this = this;
17809
+ return __generator(this, function (_a) {
17810
+ return [2 /*return*/, disablePopup({ id: this.id }).then(function (data) {
17811
+ trackEvent(EEvents.POPUP_DISABLED, { id: _this.id });
17812
+ return new PopupModel(data.data);
17813
+ })];
17814
+ });
17815
+ });
17816
+ };
17817
+ ListPopupModel.prototype.publish = function () {
17818
+ return __awaiter(this, void 0, void 0, function () {
17819
+ var _this = this;
17820
+ return __generator(this, function (_a) {
17821
+ return [2 /*return*/, publishPopup({ id: this.id }).then(function (data) {
17822
+ trackEvent(EEvents.POPUP_PUBLISHED, { id: _this.id });
17823
+ return new PopupModel(data.data);
17824
+ })];
17825
+ });
17826
+ });
17827
+ };
17828
+ ListPopupModel.prototype.render = function () {
17829
+ return __awaiter(this, void 0, void 0, function () {
17830
+ return __generator(this, function (_a) {
17831
+ return [2 /*return*/, renderPopup({ id: this.id }).then(function (data) {
17832
+ return data.data;
17833
+ })];
17834
+ });
17835
+ });
17836
+ };
17837
+ return ListPopupModel;
17838
+ }());
17839
+ var PopupModel = /** @class */ (function (_super) {
17840
+ __extends(PopupModel, _super);
17841
+ function PopupModel(params) {
17842
+ var _this = _super.call(this, params) || this;
17843
+ _this.content = params.content;
17844
+ return _this;
17845
+ }
17846
+ PopupModel.prototype.toJson = function () {
17847
+ return modelToJson(this);
17848
+ };
17849
+ return PopupModel;
17850
+ }(ListPopupModel));
17851
+
17625
17852
  var SenderModel = /** @class */ (function () {
17626
17853
  function SenderModel(_a) {
17627
17854
  var id = _a.id, name = _a.name, email = _a.email, confirmed = _a.confirmed, confirmed_on = _a.confirmed_on, language = _a.language, last_confirmation_sent_on = _a.last_confirmation_sent_on;
@@ -17947,6 +18174,45 @@ var ListsFactory = /** @class */ (function () {
17947
18174
  return ListsFactory;
17948
18175
  }());
17949
18176
 
18177
+ var PopupsFactory = /** @class */ (function () {
18178
+ function PopupsFactory() {
18179
+ }
18180
+ PopupsFactory.list = function (_a) {
18181
+ return __awaiter(this, void 0, void 0, function () {
18182
+ var params = __rest(_a, []);
18183
+ return __generator(this, function (_b) {
18184
+ return [2 /*return*/, listPopups(params).then(function (data) {
18185
+ return __assign(__assign({}, data), { data: data.data.map(function (popup) { return new ListPopupModel(popup); }) });
18186
+ })];
18187
+ });
18188
+ });
18189
+ };
18190
+ PopupsFactory.create = function (_a) {
18191
+ return __awaiter(this, void 0, void 0, function () {
18192
+ var popup = __rest(_a, []);
18193
+ return __generator(this, function (_b) {
18194
+ return [2 /*return*/, createPopup(popup).then(function (data) {
18195
+ trackEvent(EEvents.POPUP_CREATED, {
18196
+ name: data.data.name
18197
+ });
18198
+ return new PopupModel(data.data);
18199
+ })];
18200
+ });
18201
+ });
18202
+ };
18203
+ PopupsFactory.get = function (_a) {
18204
+ return __awaiter(this, arguments, void 0, function (_b) {
18205
+ var id = _b.id;
18206
+ return __generator(this, function (_c) {
18207
+ return [2 /*return*/, getPopup({ id: id }).then(function (data) {
18208
+ return new PopupModel(data.data);
18209
+ })];
18210
+ });
18211
+ });
18212
+ };
18213
+ return PopupsFactory;
18214
+ }());
18215
+
17950
18216
  var SendersFactory = /** @class */ (function () {
17951
18217
  function SendersFactory() {
17952
18218
  }
@@ -18315,4 +18581,4 @@ var UsersFactory = /** @class */ (function () {
18315
18581
  return UsersFactory;
18316
18582
  }());
18317
18583
 
18318
- export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CopyToClipboard, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPartialInfoPool, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, PhoneTextField, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SupportFactory, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePartialInformation, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, descendingComparator, disableForm, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderForm, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateCampaign, updateSystemEmails, updateTemplate, updateUser, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
18584
+ export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CopyToClipboard, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPartialInfoPool, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SupportFactory, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePartialInformation, deletePopup, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, descendingComparator, disableForm, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPopup, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderForm, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateCampaign, updatePopup, updateSystemEmails, updateTemplate, updateUser, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
@@ -5,6 +5,7 @@ export * from "./customer";
5
5
  export * from "./emailAPI";
6
6
  export * from "./form";
7
7
  export * from "./list";
8
+ export * from "./popups";
8
9
  export * from "./sender";
9
10
  export * from "./systemEmails";
10
11
  export * from "./tasks";
@@ -9,6 +9,7 @@ export * from "./emailAPI";
9
9
  export * from "./forms";
10
10
  export * from "./hidden";
11
11
  export * from "./lists";
12
+ export * from "./popups";
12
13
  export * from "./senders";
13
14
  export * from "./suppressedEmails";
14
15
  export * from "./systemEmails";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.1.51",
3
+ "version": "2.1.52",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",