nuxeo-development-framework 5.9.9 → 6.0.1

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.
@@ -1538,7 +1538,15 @@
1538
1538
  }, this.keycloak);
1539
1539
  };
1540
1540
  NuxeoService.prototype.getToken = function () {
1541
- return this.keycloak.getToken();
1541
+ return __awaiter(this, void 0, void 0, function () {
1542
+ return __generator(this, function (_a) {
1543
+ return [2 /*return*/, this.keycloak.getToken()];
1544
+ });
1545
+ });
1546
+ };
1547
+ NuxeoService.prototype.decriptFormating = function (formate) {
1548
+ var newFormate = formate.substring(3, (formate.length - 5));
1549
+ return JSON.parse(atob(newFormate));
1542
1550
  };
1543
1551
  NuxeoService.prototype.doLogout = function () {
1544
1552
  this.keycloak.logout(window.location.origin + this.baseHref);
@@ -6319,7 +6327,7 @@
6319
6327
  type: i0.Output
6320
6328
  }] } });
6321
6329
 
6322
- var VocabularyApiService = /** @class */ (function (_super) {
6330
+ var VocabularyApiService$1 = /** @class */ (function (_super) {
6323
6331
  __extends(VocabularyApiService, _super);
6324
6332
  function VocabularyApiService(nuxeoService, injector) {
6325
6333
  var _this = _super.call(this, injector) || this;
@@ -6365,9 +6373,9 @@
6365
6373
  };
6366
6374
  return VocabularyApiService;
6367
6375
  }(BaseService));
6368
- VocabularyApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, deps: [{ token: NuxeoService }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
6369
- VocabularyApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, providedIn: 'root' });
6370
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, decorators: [{
6376
+ VocabularyApiService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService$1, deps: [{ token: NuxeoService }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
6377
+ VocabularyApiService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService$1, providedIn: 'root' });
6378
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService$1, decorators: [{
6371
6379
  type: i0.Injectable,
6372
6380
  args: [{
6373
6381
  providedIn: 'root',
@@ -6532,7 +6540,7 @@
6532
6540
  };
6533
6541
  return DynamicFormVocabularyItemComponent;
6534
6542
  }());
6535
- DynamicFormVocabularyItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicFormVocabularyItemComponent, deps: [{ token: VocabularyApiService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$4.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
6543
+ DynamicFormVocabularyItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicFormVocabularyItemComponent, deps: [{ token: VocabularyApiService$1 }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$4.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
6536
6544
  DynamicFormVocabularyItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: { onlyIds: "onlyIds", bindValue: "bindValue", bindLabel: "bindLabel", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", closeOnSelect: "closeOnSelect", hideSelectedItems: "hideSelectedItems", disabled: "disabled", vocabularyType: "vocabularyType", label: "label", cacheable: "cacheable", shwoAllValues: "shwoAllValues", emitVocabulryRecordOnSelect: "emitVocabulryRecordOnSelect" }, outputs: { onSelecting: "onSelecting", onFetchingOptions: "onFetchingOptions" }, viewQueries: [{ propertyName: "DynamicFormSelectItemComponent", first: true, predicate: DynamicFormSelectItemComponent, descendants: true }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"label\">\r\n <div>\r\n <label class=\"select-label\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger mx-1\">*</span></label\r\n >\r\n </div>\r\n</ng-container>\r\n<app-dynamic-form-selectitem\r\n [voc]=\"true\"\r\n [vocId]=\"vocabularyType\"\r\n [data]=\"data\"\r\n [bindLabel]=\"bindLabel\"\r\n [bindValue]=\"bindValue\"\r\n [placeholder]=\"placeholder\"\r\n [multiple]=\"multiple\"\r\n [searchable]=\"searchable\"\r\n [closeOnSelect]=\"closeOnSelect\"\r\n [disabled]=\"disabled\"\r\n [hideSelectedItems]=\"hideSelectedItems\"\r\n [loading]=\"loading\"\r\n (onSelectItems)=\"getSelecteditems($event)\"\r\n [(ngModel)]=\"selection\"\r\n></app-dynamic-form-selectitem>\r\n<mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n>\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ label | translate }} {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n </ul>\r\n</mat-error>\r\n", styles: [""], components: [{ type: DynamicFormSelectItemComponent, selector: "app-dynamic-form-selectitem", inputs: ["label", "bindValue", "bindLabel", "data", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "disabled", "clear", "voc", "vocId", "loading"], outputs: ["onSelectItems"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace$7.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
6537
6545
  __decorate([
6538
6546
  tsCacheable.Cacheable({
@@ -6550,7 +6558,7 @@
6550
6558
  encapsulation: i0.ViewEncapsulation.None
6551
6559
  }]
6552
6560
  }], ctorParameters: function () {
6553
- return [{ type: VocabularyApiService }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$4.NgControl, decorators: [{
6561
+ return [{ type: VocabularyApiService$1 }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$4.NgControl, decorators: [{
6554
6562
  type: i0.Self
6555
6563
  }, {
6556
6564
  type: i0.Optional
@@ -30474,7 +30482,7 @@
30474
30482
  };
30475
30483
  return TranslatedVocabularySelectComponent;
30476
30484
  }());
30477
- TranslatedVocabularySelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TranslatedVocabularySelectComponent, deps: [{ token: i1__namespace.TranslateService }, { token: TranslationService }, { token: VocabularyApiService }, { token: i2__namespace$4.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
30485
+ TranslatedVocabularySelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TranslatedVocabularySelectComponent, deps: [{ token: i1__namespace.TranslateService }, { token: TranslationService }, { token: VocabularyApiService$1 }, { token: i2__namespace$4.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
30478
30486
  TranslatedVocabularySelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TranslatedVocabularySelectComponent, selector: "app-translated-vocabulary-select", inputs: { label: "label", bindValue: "bindValue", arbBindLabel: "arbBindLabel", engBindLabel: "engBindLabel", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", closeOnSelect: "closeOnSelect", hideSelectedItems: "hideSelectedItems", disabled: "disabled", clear: "clear", filter: "filter", useFilter: "useFilter", vocbularyId: "vocbularyId", mapingResponse: "mapingResponse", params: "params", getByDirectorySuggestion: "getByDirectorySuggestion" }, outputs: { onSelectItems: "onSelectItems" }, viewQueries: [{ propertyName: "ngSelectComponent", first: true, predicate: i5.NgSelectComponent, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"translated-vocbulary-wrapper\" [ngClass]=\"{'rtl-translated-vocbulary-wrapper' : isArabic === true}\">\r\n <div class=\"vocabulary-title text-base font-bold text-accent-900 mb-0\">\r\n {{label | translate}}\r\n <span *ngIf=\"isRequired()\" class=\"required-flage\">*</span>\r\n </div>\r\n <ng-select\r\n [bindLabel]=\"bindLabel\"\r\n [bindValue]=\"bindValue\"\r\n [placeholder]=\"placeholder\"\r\n [multiple]=\"multiple\"\r\n [clearable]=\"clear\"\r\n [searchable]=\"searchable\"\r\n [closeOnSelect]=\"closeOnSelect\"\r\n [hideSelected]=\"hideSelectedItems\"\r\n [loading]=\"loading\"\r\n (scrollToEnd)=\"onScrollToEnd()\"\r\n (change)=\"emitSelection($event)\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"selection\"\r\n >\r\n <ng-option *ngFor=\"let option of buffer\" [value]=\"option[bindValue]\">{{isArabic ? option[bindLabel] : option[bindLabel]}}</ng-option>\r\n </ng-select>\r\n</div>\r\n", styles: [".translated-vocbulary-wrapper .vocabulary-title .required-flage{color:#ef4444}.rtl-translated-vocbulary-wrapper{direction:rtl}\n"], components: [{ type: i5__namespace.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: i5__namespace.ɵr, selector: "ng-option", inputs: ["disabled", "value"] }], directives: [{ type: i4__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
30479
30487
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TranslatedVocabularySelectComponent, decorators: [{
30480
30488
  type: i0.Component,
@@ -30484,7 +30492,7 @@
30484
30492
  styleUrls: ['./translated-vocabulary-select.component.scss'],
30485
30493
  }]
30486
30494
  }], ctorParameters: function () {
30487
- return [{ type: i1__namespace.TranslateService }, { type: TranslationService }, { type: VocabularyApiService }, { type: i2__namespace$4.NgControl, decorators: [{
30495
+ return [{ type: i1__namespace.TranslateService }, { type: TranslationService }, { type: VocabularyApiService$1 }, { type: i2__namespace$4.NgControl, decorators: [{
30488
30496
  type: i0.Self
30489
30497
  }, {
30490
30498
  type: i0.Optional
@@ -36773,7 +36781,7 @@
36773
36781
  };
36774
36782
  return VocabularyComponent;
36775
36783
  }());
36776
- VocabularyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyComponent, deps: [{ token: VocabularyApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
36784
+ VocabularyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyComponent, deps: [{ token: VocabularyApiService$1 }], target: i0__namespace.ɵɵFactoryTarget.Component });
36777
36785
  VocabularyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VocabularyComponent, selector: "cts-vocabulary", inputs: { bindValue: "bindValue", bindLabel: "bindLabel", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", closeOnSelect: "closeOnSelect", hideSelectedItems: "hideSelectedItems", isAsync: "isAsync", attachSource: "attachSource", source$: "source$", hideLoaded: "hideLoaded", vocabularyType: "vocabularyType" }, outputs: { onSelecting: "onSelecting" }, providers: [
36778
36786
  {
36779
36787
  provide: i2.NG_VALUE_ACCESSOR,
@@ -36795,7 +36803,7 @@
36795
36803
  }
36796
36804
  ]
36797
36805
  }]
36798
- }], ctorParameters: function () { return [{ type: VocabularyApiService }]; }, propDecorators: { bindValue: [{
36806
+ }], ctorParameters: function () { return [{ type: VocabularyApiService$1 }]; }, propDecorators: { bindValue: [{
36799
36807
  type: i0.Input
36800
36808
  }], bindLabel: [{
36801
36809
  type: i0.Input
@@ -41595,12 +41603,40 @@
41595
41603
  }] }, { type: NuxeoService }];
41596
41604
  } });
41597
41605
 
41606
+ var VocabularyApiService = /** @class */ (function () {
41607
+ function VocabularyApiService(nuxeoService, translate) {
41608
+ this.nuxeoService = nuxeoService;
41609
+ this.translate = translate;
41610
+ }
41611
+ VocabularyApiService.prototype.getVocabularyList = function (listName) {
41612
+ return rxjs.from(this.nuxeoService.nuxeoClient
41613
+ .operation('Directory.SuggestEntries', {})
41614
+ .params({
41615
+ directoryName: listName,
41616
+ dbl10n: false,
41617
+ localize: true,
41618
+ lang: this.translate.currentLang,
41619
+ searchTerm: '',
41620
+ })
41621
+ .execute());
41622
+ };
41623
+ return VocabularyApiService;
41624
+ }());
41625
+ VocabularyApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, deps: [{ token: NuxeoService }, { token: i1__namespace.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
41626
+ VocabularyApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, providedIn: 'root' });
41627
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, decorators: [{
41628
+ type: i0.Injectable,
41629
+ args: [{
41630
+ providedIn: 'root',
41631
+ }]
41632
+ }], ctorParameters: function () { return [{ type: NuxeoService }, { type: i1__namespace.TranslateService }]; } });
41633
+
41598
41634
  var NotificationsService = /** @class */ (function (_super) {
41599
41635
  __extends(NotificationsService, _super);
41600
41636
  /**
41601
41637
  *
41602
41638
  */
41603
- function NotificationsService(_environment, _nuxeoService, _callApi, _http) {
41639
+ function NotificationsService(_environment, _nuxeoService, _callApi, _http, vocabularyApi) {
41604
41640
  var _this = this;
41605
41641
  var _a, _b, _c;
41606
41642
  _this = _super.call(this, _environment, _nuxeoService) || this;
@@ -41608,6 +41644,7 @@
41608
41644
  _this._nuxeoService = _nuxeoService;
41609
41645
  _this._callApi = _callApi;
41610
41646
  _this._http = _http;
41647
+ _this.vocabularyApi = vocabularyApi;
41611
41648
  _this.listenerObserver = new rxjs.Subject();
41612
41649
  if (((_b = (_a = _this._nuxeoService.nuxeoClient) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.id) && ((_c = _this._environment) === null || _c === void 0 ? void 0 : _c.socketUrl)) {
41613
41650
  _this.socketConnect()
@@ -41674,6 +41711,11 @@
41674
41711
  NotificationsService.prototype.unsubscribe = function (id) {
41675
41712
  return this._operation(id, 'unsubscribe');
41676
41713
  };
41714
+ NotificationsService.prototype.callUnSubscribeForNoSubscription = function (id) {
41715
+ return this._operation(id, 'unSubscripFromSelectByDefultSubscitp', {
41716
+ companyName: "" + this._tenantId
41717
+ });
41718
+ };
41677
41719
  NotificationsService.prototype.subscribe = function (id) {
41678
41720
  return this._operation(id, 'subscribe', {
41679
41721
  companyName: "" + this._tenantId
@@ -41691,10 +41733,19 @@
41691
41733
  .execute());
41692
41734
  };
41693
41735
  NotificationsService.prototype.getSourceTypes = function () {
41694
- return this._getVocabulary("" + this._environment.nuxeo + NotificationsService.sourceType);
41736
+ var _this = this;
41737
+ return this._getVocabulary('VOC_Notf_SourceTypes').pipe(operators.map(function (items) {
41738
+ var defaults = _this._environment.notificationDefaultSourceTypes;
41739
+ if (defaults === null || defaults === void 0 ? void 0 : defaults.length) {
41740
+ return items.filter(function (item) { return defaults.includes(item.id); });
41741
+ }
41742
+ return items;
41743
+ }));
41744
+ // return this._getVocabulary(`${this._environment.nuxeo}${NotificationsService.sourceType}`);
41695
41745
  };
41696
41746
  NotificationsService.prototype.getChannels = function () {
41697
- return this._getVocabulary("" + this._environment.nuxeo + NotificationsService.channels);
41747
+ return this._getVocabulary('VOC_Notf_NotificationChannels');
41748
+ // return this._getVocabulary(`${this._environment.nuxeo}${NotificationsService.channels}`);
41698
41749
  };
41699
41750
  NotificationsService.prototype.getDefinitions = function (payload) {
41700
41751
  if (payload === void 0) { payload = {}; }
@@ -41727,12 +41778,17 @@
41727
41778
  .pipe(operators.map(function (data) { return mapNotificationsToPagingResponse(data); }));
41728
41779
  };
41729
41780
  NotificationsService.prototype._getVocabulary = function (url) {
41730
- var _this = this;
41731
- return rxjs.from(this._nuxeoService.getToken()).pipe(operators.map(function (token) {
41732
- var bearerToken = "Bearer " + token;
41733
- var headers = new i1$2.HttpHeaders().set('Authorization', bearerToken);
41734
- return headers;
41735
- }), operators.switchMap(function (headers) { return _this._http.get(url, { headers: headers }); }), operators.map(function (response) { return response.entries; }), operators.map(function (data) { return data.sort(function (a, b) { return (b.properties['ordering'] < a.properties['ordering'] ? 1 : -1); }); }));
41781
+ return this.vocabularyApi.getVocabularyList(url);
41782
+ // return from(this._nuxeoService.getToken()).pipe(
41783
+ // map((token) => {
41784
+ // const bearerToken = `Bearer ${token}`;
41785
+ // const headers = new HttpHeaders().set('Authorization', bearerToken);
41786
+ // return headers;
41787
+ // }),
41788
+ // switchMap((headers) => this._http.get<ApiResponseModel<VocabularyType>>(url, { headers })),
41789
+ // map((response) => response.entries),
41790
+ // map((data) => data.sort((a, b) => (b.properties['ordering'] < a.properties['ordering'] ? 1 : -1)))
41791
+ // );
41736
41792
  };
41737
41793
  NotificationsService.prototype._operation = function (id, option, params) {
41738
41794
  if (params === void 0) { params = {}; }
@@ -41772,9 +41828,10 @@
41772
41828
  unsubscribe: 'AC_UA_NotfNotification_Unsubscribe',
41773
41829
  subscribe: 'AC_UA_NotfNotification_Subscribe',
41774
41830
  reset: 'AC_UA_NotfNotification_ResetSubscription',
41775
- markAllAsUnread: 'AC_UA_NotfNotification_UnreadAll'
41831
+ markAllAsUnread: 'AC_UA_NotfNotification_UnreadAll',
41832
+ unSubscripFromSelectByDefultSubscitp: 'AC_UA_NotfNotification_UnSubscribe'
41776
41833
  };
41777
- NotificationsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService, deps: [{ token: 'environment' }, { token: NuxeoService }, { token: CallApiService }, { token: i1__namespace$2.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
41834
+ NotificationsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService, deps: [{ token: 'environment' }, { token: NuxeoService }, { token: CallApiService }, { token: i1__namespace$2.HttpClient }, { token: VocabularyApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
41778
41835
  NotificationsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService });
41779
41836
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService, decorators: [{
41780
41837
  type: i0.Injectable
@@ -41782,7 +41839,7 @@
41782
41839
  return [{ type: undefined, decorators: [{
41783
41840
  type: i0.Inject,
41784
41841
  args: ['environment']
41785
- }] }, { type: NuxeoService }, { type: CallApiService }, { type: i1__namespace$2.HttpClient }];
41842
+ }] }, { type: NuxeoService }, { type: CallApiService }, { type: i1__namespace$2.HttpClient }, { type: VocabularyApiService }];
41786
41843
  } });
41787
41844
 
41788
41845
  var BaseNotification = /** @class */ (function (_super) {
@@ -43027,13 +43084,17 @@
43027
43084
  var _this = this;
43028
43085
  var subscriptions = this._subscriptionsSub.getValue();
43029
43086
  var _subscription = this._findSubscription(subscriptions, definition);
43030
- if (!_subscription) {
43031
- return;
43087
+ var _apiCall;
43088
+ // no subsc and sent by defult then call api
43089
+ if (!_subscription && definition.sentByDefault) {
43090
+ _apiCall = this.notificationsService.callUnSubscribeForNoSubscription(definition.uid);
43091
+ }
43092
+ else {
43093
+ _apiCall = this.notificationsService
43094
+ .unsubscribe(_subscription.uid);
43032
43095
  }
43033
43096
  this.changingItemId = definition.uid;
43034
- this.notificationsService
43035
- .unsubscribe(_subscription.uid)
43036
- .pipe(operators.switchMap(function () { return _this.getSubscriptionsByChannel(_this._channel.id).pipe(operators.finalize(function () {
43097
+ _apiCall.pipe(operators.switchMap(function () { return _this.getSubscriptionsByChannel(_this._channel.id).pipe(operators.finalize(function () {
43037
43098
  _this.changingItemId = null;
43038
43099
  _this._cdr.detectChanges();
43039
43100
  })); }), operators.finalize(function () {
@@ -51213,7 +51274,7 @@
51213
51274
  exports.ViewerFilesService = ViewerFilesService;
51214
51275
  exports.ViewerLogComponent = ViewerLogComponent;
51215
51276
  exports.ViewerLogModule = ViewerLogModule;
51216
- exports.VocabularyApiService = VocabularyApiService;
51277
+ exports.VocabularyApiService = VocabularyApiService$1;
51217
51278
  exports.VocabularyComponent = VocabularyComponent;
51218
51279
  exports.VocabularyModule = VocabularyModule;
51219
51280
  exports.WorkflowService = WorkflowService;