@adlfe/campaign-management-library 2.10.4 → 2.10.6

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.
@@ -671,11 +671,11 @@ else if (origin.includes('dashboard-qa')) {
671
671
  }
672
672
  // 4. Cek Demo Dev secara spesifik
673
673
  else if (origin.includes('demo-dev')) {
674
- API_CONST = 'https://apibsp-dev.adlsandbox.net';
674
+ API_CONST = 'https://api-staging.neuapix.com';
675
675
  }
676
676
  // 5. Default (Localhost atau lainnya)
677
677
  else {
678
- API_CONST = 'https://apibsp-dev.adlsandbox.net';
678
+ API_CONST = 'https://api-staging.neuapix.com';
679
679
  }
680
680
  var environment = {
681
681
  production: false,
@@ -1441,8 +1441,11 @@ var FilterInListOfCampaignComponent = /** @class */ (function () {
1441
1441
  function FilterInListOfCampaignComponent(apiAdapterService) {
1442
1442
  this.apiAdapterService = apiAdapterService;
1443
1443
  this.channelOption = PlatformOptionConst;
1444
+ this.filteredChannelOption = [];
1444
1445
  this.businessNameOption = [];
1446
+ this.filteredBusinessNameOption = [];
1445
1447
  this.statusOption = [];
1448
+ this.filteredStatusOption = [];
1446
1449
  this.templateOption = [];
1447
1450
  this.isHaveNextTemplateOption = true;
1448
1451
  this.isLoadingTemplateOption = false;
@@ -1453,6 +1456,8 @@ var FilterInListOfCampaignComponent = /** @class */ (function () {
1453
1456
  }
1454
1457
  FilterInListOfCampaignComponent.prototype.ngOnInit = function () {
1455
1458
  this.statusOption = generateEnumOption(StatusCampaignEnum);
1459
+ this.filteredStatusOption = __spread(this.statusOption);
1460
+ this.filteredChannelOption = __spread(this.channelOption);
1456
1461
  this.initForm();
1457
1462
  this.getBusinessNameOptionService();
1458
1463
  };
@@ -1477,6 +1482,7 @@ var FilterInListOfCampaignComponent = /** @class */ (function () {
1477
1482
  .executeApiRequest([], '/admin/client/all-with-child?pageNo=1&rowPerPage=1000', 'GET')
1478
1483
  .subscribe(function (res) {
1479
1484
  _this.businessNameOption = res.data;
1485
+ _this.filteredBusinessNameOption = __spread(_this.businessNameOption);
1480
1486
  });
1481
1487
  this.subscribers.push(subs);
1482
1488
  };
@@ -1525,6 +1531,24 @@ var FilterInListOfCampaignComponent = /** @class */ (function () {
1525
1531
  this.pageNoTemplateOption = 1;
1526
1532
  this.getTemplateOptionService(searchValue);
1527
1533
  };
1534
+ FilterInListOfCampaignComponent.prototype.businessNameSearch = function (searchValue) {
1535
+ var value = searchValue.toLowerCase();
1536
+ this.filteredBusinessNameOption = this.businessNameOption.filter(function (option) {
1537
+ return option.name.toLowerCase().includes(value);
1538
+ });
1539
+ };
1540
+ FilterInListOfCampaignComponent.prototype.channelSearch = function (searchValue) {
1541
+ var value = searchValue.toLowerCase();
1542
+ this.filteredChannelOption = this.channelOption.filter(function (option) {
1543
+ return option.label.toLowerCase().includes(value);
1544
+ });
1545
+ };
1546
+ FilterInListOfCampaignComponent.prototype.statusSearch = function (searchValue) {
1547
+ var value = searchValue.toLowerCase();
1548
+ this.filteredStatusOption = this.statusOption.filter(function (option) {
1549
+ return option.label.toLowerCase().includes(value);
1550
+ });
1551
+ };
1528
1552
  FilterInListOfCampaignComponent.prototype.clearDate = function () {
1529
1553
  this.form.get('startDate').setValue(null);
1530
1554
  this.form.get('endDate').setValue(null);
@@ -1563,8 +1587,8 @@ var FilterInListOfCampaignComponent = /** @class */ (function () {
1563
1587
  FilterInListOfCampaignComponent = __decorate([
1564
1588
  Component({
1565
1589
  selector: 'lib-filter-in-list-of-campaign',
1566
- template: "<p class=\"font-16px font-bold\">Filter</p>\r\n\r\n<form [formGroup]=\"form\"\r\n\tclass=\"contact-filter\">\r\n\t<div class=\"row\">\r\n\t\t<div class=\"col-md-12 col-12\">\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-70\">\r\n\t\t\t\t\t<mat-label>Business Name</mat-label>\r\n\r\n\t\t\t\t\t<mat-select placeholder=\"Select Business Name\"\r\n\t\t\t\t\t\tformControlName=\"businessName\">\r\n\t\t\t\t\t\t<mat-option value=\"\"> --- select none --- </mat-option>\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let option of businessNameOption\"\r\n\t\t\t\t\t\t\t[value]=\"option.id\">\r\n\t\t\t\t\t\t\t{{ option.name }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"col-md-12 col-12\">\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-70\">\r\n\t\t\t\t\t<mat-label>Channel</mat-label>\r\n\r\n\t\t\t\t\t<mat-select placeholder=\"Select the Channel\"\r\n\t\t\t\t\t\tformControlName=\"medium\">\r\n\t\t\t\t\t\t<mat-option value=\"\"> --- select none --- </mat-option>\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let option of channelOption\"\r\n\t\t\t\t\t\t\t[value]=\"option.value\"\r\n\t\t\t\t\t\t\t(click)=\"getTemplateOptionService()\">\r\n\t\t\t\t\t\t\t{{ option.label }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"col-md-12 col-12\">\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t<mat-label class=\"asterix--after\">Template Name</mat-label>\r\n\r\n\t\t\t\t\t<mat-select matSelectInfiniteScroll\r\n\t\t\t\t\t\tformControlName=\"templateName\"\r\n\t\t\t\t\t\tplaceholder=\"Select template\"\r\n\t\t\t\t\t\t[complete]=\"isHaveNextTemplateOption === false\"\r\n\t\t\t\t\t\t[compareWith]=\"templateSelectedDisplay\"\r\n\t\t\t\t\t\t(infiniteScroll)=\"getNextTemplateBatch()\">\r\n\t\t\t\t\t\t<div style=\"margin: 20px\">\r\n\t\t\t\t\t\t\t<lib-search [placeholder]=\"'Search'\"\r\n\t\t\t\t\t\t\t\t[currentValue]=\"form?.get('templateName').value?.name\"\r\n\t\t\t\t\t\t\t\t(searchRes)=\"templateSearch($event)\"></lib-search>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let option of templateOption\"\r\n\t\t\t\t\t\t\t[value]=\"option\">\r\n\t\t\t\t\t\t\t{{ option.name }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t<mat-option *ngIf=\"isLoadingTemplateOption\">Loading...</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"col-md-12 col-12\">\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-70\">\r\n\t\t\t\t\t<mat-label>Status</mat-label>\r\n\r\n\t\t\t\t\t<mat-select placeholder=\"Select the Status\"\r\n\t\t\t\t\t\tformControlName=\"status\">\r\n\t\t\t\t\t\t<mat-option value=\"\"> --- select none --- </mat-option>\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let option of statusOption\"\r\n\t\t\t\t\t\t\t[value]=\"option.value\">\r\n\t\t\t\t\t\t\t{{ option.label }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"col-md-12 col-12\">\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t<mat-label> Start Date </mat-label>\r\n\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\t[matDatepicker]=\"startDatePicker\"\r\n\t\t\t\t\t\tformControlName=\"startDate\"\r\n\t\t\t\t\t\tclass=\"mat-datepicker-input\"\r\n\t\t\t\t\t\t(dateChange)=\"validateBackDate()\" />\r\n\r\n\t\t\t\t\t<mat-datepicker-toggle matSuffix\r\n\t\t\t\t\t\t[for]=\"startDatePicker\"> </mat-datepicker-toggle>\r\n\t\t\t\t\t<mat-icon *ngIf=\"form.get('startDate').value\"\r\n\t\t\t\t\t\tmatDatepickerToggleIcon\r\n\t\t\t\t\t\t(click)=\"clearDate()\">clear</mat-icon>\r\n\t\t\t\t\t<mat-datepicker #startDatePicker></mat-datepicker>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"col-md-12 col-12\">\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t<mat-label> End Date </mat-label>\r\n\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\t[min]=\"form.get('startDate').value\"\r\n\t\t\t\t\t\t[matDatepicker]=\"endDatePicker\"\r\n\t\t\t\t\t\tformControlName=\"endDate\"\r\n\t\t\t\t\t\tclass=\"mat-datepicker-input\"\r\n\t\t\t\t\t\t(dateChange)=\"validateBackDate()\" />\r\n\r\n\t\t\t\t\t<mat-datepicker-toggle matSuffix\r\n\t\t\t\t\t\t[for]=\"endDatePicker\"> </mat-datepicker-toggle>\r\n\t\t\t\t\t<mat-icon *ngIf=\"form.get('endDate').value\"\r\n\t\t\t\t\t\tmatDatepickerToggleIcon\r\n\t\t\t\t\t\t(click)=\"clearDate()\">clear</mat-icon>\r\n\t\t\t\t\t<mat-datepicker #endDatePicker></mat-datepicker>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div style=\"display: flex; flex: 1; width: 100%\">\r\n\t\t\t<button mat-stroked-button\r\n\t\t\t\tcolor=\"primary-telin\"\r\n\t\t\t\tclass=\"telin-font-color w-48\"\r\n\t\t\t\tstyle=\"width: 100%; margin-bottom: 10px\"\r\n\t\t\t\t(click)=\"onReset()\">\r\n\t\t\t\tReset\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t\t<div class=\"d-flex justify-content-between\">\r\n\t\t\t<button mat-stroked-button\r\n\t\t\t\tcolor=\"secondary-telin\"\r\n\t\t\t\tclass=\"w-48\"\r\n\t\t\t\t(click)=\"onCancel()\">\r\n\t\t\t\tCancel\r\n\t\t\t</button>\r\n\r\n\t\t\t<button mat-flat-button\r\n\t\t\t\tcolor=\"primary-telin-blue2\"\r\n\t\t\t\tclass=\"w-48\"\r\n\t\t\t\t(click)=\"onApply()\">\r\n\t\t\t\tApply\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n",
1567
- styles: [".contact-filter .platform{display:grid;grid-gap:5px;grid-template-columns:auto 1fr auto}.button-row{margin:8px 8px 8px 0}.mat-datepicker-input{width:85%}.mat-icon{position:relative;float:right;top:-7px;cursor:pointer;color:rgba(0,0,0,.54)}"]
1590
+ template: "<p class=\"font-16px font-bold\">Filter</p>\r\n\r\n<form [formGroup]=\"form\" class=\"contact-filter\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-70\">\r\n <mat-label>Business Name</mat-label>\r\n <mat-select placeholder=\"Select Business Name\" formControlName=\"businessName\">\r\n <div class=\"select-search\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n (searchRes)=\"businessNameSearch($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option value=\"\"> --- select none --- </mat-option>\r\n <mat-option\r\n *ngFor=\"let option of filteredBusinessNameOption\"\r\n [value]=\"option.id\"\r\n >\r\n {{ option.name }}\r\n </mat-option>\r\n <mat-option *ngIf=\"!filteredBusinessNameOption.length\" disabled>\r\n No data found\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-70\">\r\n <mat-label>Channel</mat-label>\r\n\r\n <mat-select placeholder=\"Select the Channel\" formControlName=\"medium\">\r\n <mat-option value=\"\"> --- select none --- </mat-option>\r\n <mat-option\r\n *ngFor=\"let option of filteredChannelOption\"\r\n [value]=\"option.value\"\r\n (click)=\"getTemplateOptionService()\"\r\n >\r\n {{ option.label }}\r\n </mat-option>\r\n <mat-option *ngIf=\"!filteredChannelOption.length\" disabled>\r\n No data found\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Template Name</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"templateName\"\r\n placeholder=\"Select template\"\r\n [complete]=\"isHaveNextTemplateOption === false\"\r\n [compareWith]=\"templateSelectedDisplay\"\r\n (infiniteScroll)=\"getNextTemplateBatch()\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('templateName').value?.name\"\r\n (searchRes)=\"templateSearch($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of templateOption\" [value]=\"option\">\r\n {{ option.name }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingTemplateOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-70\">\r\n <mat-label>Status</mat-label>\r\n\r\n <mat-select placeholder=\"Select the Status\" formControlName=\"status\">\r\n <div class=\"select-search\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n (searchRes)=\"statusSearch($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option value=\"\"> --- select none --- </mat-option>\r\n <mat-option\r\n *ngFor=\"let option of filteredStatusOption\"\r\n [value]=\"option.value\"\r\n >\r\n {{ option.label }}\r\n </mat-option>\r\n <mat-option *ngIf=\"!filteredStatusOption.length\" disabled>\r\n No data found\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label> Start Date </mat-label>\r\n <input\r\n matInput\r\n [matDatepicker]=\"startDatePicker\"\r\n formControlName=\"startDate\"\r\n class=\"mat-datepicker-input\"\r\n (dateChange)=\"validateBackDate()\"\r\n />\r\n\r\n <mat-datepicker-toggle matSuffix [for]=\"startDatePicker\">\r\n </mat-datepicker-toggle>\r\n <mat-icon\r\n *ngIf=\"form.get('startDate').value\"\r\n matDatepickerToggleIcon\r\n (click)=\"clearDate()\"\r\n >clear</mat-icon\r\n >\r\n <mat-datepicker #startDatePicker></mat-datepicker>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label> End Date </mat-label>\r\n <input\r\n matInput\r\n [min]=\"form.get('startDate').value\"\r\n [matDatepicker]=\"endDatePicker\"\r\n formControlName=\"endDate\"\r\n class=\"mat-datepicker-input\"\r\n (dateChange)=\"validateBackDate()\"\r\n />\r\n\r\n <mat-datepicker-toggle matSuffix [for]=\"endDatePicker\"> </mat-datepicker-toggle>\r\n <mat-icon\r\n *ngIf=\"form.get('endDate').value\"\r\n matDatepickerToggleIcon\r\n (click)=\"clearDate()\"\r\n >clear</mat-icon\r\n >\r\n <mat-datepicker #endDatePicker></mat-datepicker>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div style=\"display: flex; flex: 1; width: 100%\">\r\n <button\r\n mat-stroked-button\r\n color=\"primary-telin\"\r\n class=\"telin-font-color w-48\"\r\n style=\"width: 100%; margin-bottom: 10px\"\r\n (click)=\"onReset()\"\r\n >\r\n Reset\r\n </button>\r\n </div>\r\n <div class=\"d-flex justify-content-between\">\r\n <button mat-stroked-button color=\"secondary-telin\" class=\"w-48\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n\r\n <button mat-flat-button color=\"primary-telin-blue2\" class=\"w-48\" (click)=\"onApply()\">\r\n Apply\r\n </button>\r\n </div>\r\n </div>\r\n</form>\r\n",
1591
+ styles: [".contact-filter .platform{display:grid;grid-gap:5px;grid-template-columns:auto 1fr auto}.button-row{margin:8px 8px 8px 0}.mat-datepicker-input{width:85%}.mat-icon{position:relative;float:right;top:-7px;cursor:pointer;color:rgba(0,0,0,.54)}.select-search{margin:20px}"]
1568
1592
  }),
1569
1593
  Injectable({
1570
1594
  providedIn: 'root',
@@ -5293,11 +5317,11 @@ var NewNumberBasesComponent = /** @class */ (function () {
5293
5317
  };
5294
5318
  NewNumberBasesComponent.prototype.onFileSelected = function (event) {
5295
5319
  var file = event.target.files;
5296
- var MAXIMUM_SIZE = 10 * 1024 * 1024;
5320
+ var MAXIMUM_SIZE = 30 * 1024 * 1024;
5297
5321
  if (file.length === 0)
5298
5322
  return;
5299
5323
  if (file[0].size > MAXIMUM_SIZE) {
5300
- this.toastr.error('Upload media failed, max size 10mb');
5324
+ this.toastr.error('Upload media failed, max size 30mb');
5301
5325
  return;
5302
5326
  }
5303
5327
  // this.uploadMediaService(file[0]);