@netgrif/components-core 6.2.1 → 6.2.3

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.
Files changed (38) hide show
  1. package/commons/schema.d.ts +1 -0
  2. package/esm2020/assets/i18n/de.json +11 -9
  3. package/esm2020/assets/i18n/en.json +4 -2
  4. package/esm2020/assets/i18n/sk.json +4 -2
  5. package/esm2020/commons/schema.mjs +1 -1
  6. package/esm2020/lib/authentication/components/abstract-authentication-overlay.mjs +4 -1
  7. package/esm2020/lib/authorization/permission/access.service.mjs +2 -2
  8. package/esm2020/lib/authorization/role/role-guard.service.mjs +36 -11
  9. package/esm2020/lib/data-fields/file-field/abstract-file-field.component.mjs +7 -3
  10. package/esm2020/lib/data-fields/file-list-field/abstract-file-list-field.component.mjs +5 -2
  11. package/esm2020/lib/data-fields/i18n-field/i18n-divider-field/abstract-i18n-divider-field.component.mjs +7 -1
  12. package/esm2020/lib/data-fields/i18n-field/models/i18n-field.mjs +5 -5
  13. package/esm2020/lib/data-fields/models/abstract-data-field.mjs +1 -1
  14. package/esm2020/lib/data-fields/multichoice-field/multichoice-autocomplete-field/abstract-multichoice-autocomplete-field-component.component.mjs +5 -2
  15. package/esm2020/lib/data-fields/number-field/currency-number-field/abstract-currency-number-field.component.mjs +3 -2
  16. package/esm2020/lib/navigation/navigation-double-drawer/abstract-navigation-double-drawer.mjs +7 -4
  17. package/esm2020/lib/resources/engine-endpoint/task-resource.service.mjs +3 -3
  18. package/esm2020/lib/search/models/category/case/case-dataset.mjs +7 -4
  19. package/esm2020/lib/search/search-operand-input-component/abstract-search-operand-input.component.mjs +3 -3
  20. package/esm2020/lib/side-menu/content-components/new-case/abstract-new-case.component.mjs +34 -12
  21. package/esm2020/lib/task-content/field-component-resolver/abstract-field-component-resolver.component.mjs +2 -3
  22. package/fesm2015/netgrif-components-core.mjs +132 -56
  23. package/fesm2015/netgrif-components-core.mjs.map +1 -1
  24. package/fesm2020/netgrif-components-core.mjs +131 -56
  25. package/fesm2020/netgrif-components-core.mjs.map +1 -1
  26. package/lib/authorization/role/role-guard.service.d.ts +2 -1
  27. package/lib/data-fields/i18n-field/i18n-divider-field/abstract-i18n-divider-field.component.d.ts +1 -0
  28. package/lib/data-fields/models/abstract-data-field.d.ts +1 -1
  29. package/lib/data-fields/multichoice-field/multichoice-autocomplete-field/abstract-multichoice-autocomplete-field-component.component.d.ts +1 -0
  30. package/lib/data-fields/number-field/currency-number-field/abstract-currency-number-field.component.d.ts +1 -0
  31. package/lib/navigation/navigation-double-drawer/abstract-navigation-double-drawer.d.ts +1 -1
  32. package/lib/resources/engine-endpoint/task-resource.service.d.ts +2 -1
  33. package/lib/search/search-operand-input-component/abstract-search-operand-input.component.d.ts +1 -1
  34. package/lib/side-menu/content-components/new-case/abstract-new-case.component.d.ts +2 -0
  35. package/package.json +1 -1
  36. package/src/assets/i18n/de.json +11 -9
  37. package/src/assets/i18n/en.json +5 -2
  38. package/src/assets/i18n/sk.json +4 -2
@@ -1080,7 +1080,8 @@ var admin$2 = {
1080
1080
  },
1081
1081
  "ldapGroup-list": {
1082
1082
  noLdapGroupsWereFound: "No LDAP group was found",
1083
- listTitle: "Ldap Groups"
1083
+ listTitle: "LDAP groups",
1084
+ count: "Number of groups"
1084
1085
  },
1085
1086
  "process-list": {
1086
1087
  newestVersion: "Newest version",
@@ -1186,7 +1187,8 @@ var en = {
1186
1187
  errThird: "Color is required.",
1187
1188
  noNets: "No allowed Nets",
1188
1189
  createCase: "Successful create new case",
1189
- defaultCaseName: "with default case name"
1190
+ defaultCaseName: "with default case name",
1191
+ createCaseError: "A new case was created, but an error occurred while executing actions"
1190
1192
  },
1191
1193
  user: {
1192
1194
  assign: "User Assign",
@@ -1558,7 +1560,8 @@ var admin$1 = {
1558
1560
  },
1559
1561
  "ldapGroup-list": {
1560
1562
  noLdapGroupsWereFound: "Žiadna LDAP skupina nebola najdená",
1561
- listTitle: "Ldap Skupiny"
1563
+ listTitle: "LDAP Skupiny",
1564
+ count: "Počet skupín"
1562
1565
  },
1563
1566
  "process-list": {
1564
1567
  newestVersion: "Najnovšia verzia",
@@ -1664,7 +1667,8 @@ var sk = {
1664
1667
  errThird: "Farba je povinné pole.",
1665
1668
  noNets: "Žiadne povolené siete",
1666
1669
  createCase: "Úspešne vytvorený nový prípad",
1667
- defaultCaseName: "s prednastaveným názvom prípadu"
1670
+ defaultCaseName: "s prednastaveným názvom prípadu",
1671
+ createCaseError: "Nový prípad vytvorený, nastala však chyba pri vykonávaní akcií"
1668
1672
  },
1669
1673
  user: {
1670
1674
  assign: "Priradiť používateľa",
@@ -1942,8 +1946,8 @@ var forms = {
1942
1946
  enterEmail: "Ihre E-Mail Adresse eingeben"
1943
1947
  },
1944
1948
  login: {
1945
- length: "Das Benützername muss mindestens 4 Zeichen enthalten",
1946
- login: "Benützername",
1949
+ length: "Das Benutzername muss mindestens 4 Zeichen enthalten",
1950
+ login: "Benutzername",
1947
1951
  wrongCredentials: "Falsche Anmeldeinformationen!",
1948
1952
  loginButton: "Anmelden",
1949
1953
  reset: "Kennwort wiederherstellen",
@@ -2036,7 +2040,8 @@ var admin = {
2036
2040
  },
2037
2041
  "ldapGroup-list": {
2038
2042
  noLdapGroupsWereFound: "Keine LDAP Gruppe wurde gefunden",
2039
- listTitle: "LDAP Gruppen"
2043
+ listTitle: "LDAP Gruppen",
2044
+ count: "Anzahl der Gruppen"
2040
2045
  },
2041
2046
  "process-list": {
2042
2047
  newestVersion: "Neuste Version",
@@ -2142,14 +2147,15 @@ var de = {
2142
2147
  errThird: "Sie müssen eine Farbe auswählen.",
2143
2148
  noNets: "Es gibt keine erlaubte Netze",
2144
2149
  createCase: "Neuen Fall würde erfolgreich erzeugt",
2145
- defaultCaseName: "mit einem Standardfallnamen"
2150
+ defaultCaseName: "mit einem Standardfallnamen",
2151
+ createCaseError: "Neuer Fall wurde erstellt, aber beim Ausführen von Aktionen ist ein Fehler aufgetreten"
2146
2152
  },
2147
2153
  user: {
2148
- assign: "Benützer zuweisen",
2149
- choose: "Benützer auswählen",
2150
- noUser: "Es gibt keine Benützer",
2151
- err: "Beim laden der Benützer ist eine Fehler aufgetreten",
2152
- showcase: "Benützeransichtmodus ist nicht ausgewählt!"
2154
+ assign: "Benutzer zuweisen",
2155
+ choose: "Benutzer auswählen",
2156
+ noUser: "Es gibt keine Benutzer",
2157
+ err: "Beim laden der Benutzer ist eine Fehler aufgetreten",
2158
+ showcase: "Die Benutzeransicht ist nicht gesetzt!"
2153
2159
  },
2154
2160
  ldapGroup: {
2155
2161
  choose: "LDAP-Gruppe suchen",
@@ -5624,8 +5630,8 @@ class I18nField extends DataField {
5624
5630
  && ((!a.translations && !!b.translations) || (!b.translations && !!a.translations)));
5625
5631
  }
5626
5632
  static translationsEquality(a, b) {
5627
- const aKeys = Object.keys(a.translations).sort();
5628
- const bKeys = Object.keys(b.translations).sort();
5633
+ const aKeys = !!a.translations ? Object.keys(a.translations).sort() : [];
5634
+ const bKeys = !!b.translations ? Object.keys(b.translations).sort() : [];
5629
5635
  if (aKeys.length !== bKeys.length
5630
5636
  || !aKeys.every((element, index) => {
5631
5637
  return element === bKeys[index];
@@ -5741,13 +5747,13 @@ class I18nField extends DataField {
5741
5747
  validTranslationRequired(countries) {
5742
5748
  return (fc) => {
5743
5749
  return countries.every(languageCode => languageCode in fc.value.translations)
5744
- ? (null) : ({ translationRequired: true });
5750
+ ? null : ({ translationRequired: true });
5745
5751
  };
5746
5752
  }
5747
5753
  validTranslationOnly(countries) {
5748
5754
  return (fc) => {
5749
5755
  return Object.keys(fc.value.translations).every(translation => countries.includes(translation))
5750
- ? (null) : ({ translationOnly: true });
5756
+ ? null : ({ translationOnly: true });
5751
5757
  };
5752
5758
  }
5753
5759
  validRequiredI18n(fc) {
@@ -6319,9 +6325,9 @@ class TaskResourceService extends AbstractResourceService {
6319
6325
  * Delete file from the task
6320
6326
  * DELETE
6321
6327
  */
6322
- deleteFile(taskId, fieldId, name) {
6328
+ deleteFile(taskId, fieldId, name, param) {
6323
6329
  const url = !!name ? 'task/' + taskId + '/file/' + fieldId + '/' + name : 'task/' + taskId + '/file/' + fieldId;
6324
- return this._resourceProvider.delete$(url, this.SERVER_URL).pipe(map(r => this.changeType(r, undefined)));
6330
+ return this._resourceProvider.delete$(url, this.SERVER_URL, param).pipe(map(r => this.changeType(r, undefined)));
6325
6331
  }
6326
6332
  /**
6327
6333
  * Download task file preview for field value
@@ -6475,6 +6481,7 @@ class AbstractFileFieldComponent extends AbstractDataFieldComponent {
6475
6481
  }
6476
6482
  }
6477
6483
  this.updatedFieldSubscription = this.dataField.updated.subscribe(() => {
6484
+ this.previewSource = undefined;
6478
6485
  if (!!this.filePreview
6479
6486
  && !!this.dataField.value
6480
6487
  && !!this.dataField.value.name) {
@@ -6649,7 +6656,9 @@ class AbstractFileFieldComponent extends AbstractDataFieldComponent {
6649
6656
  this._log.error('File cannot be deleted. No task is set to the field.');
6650
6657
  return;
6651
6658
  }
6652
- this._taskResourceService.deleteFile(this.taskId, this.dataField.stringId).pipe(take(1)).subscribe(response => {
6659
+ let param = new HttpParams();
6660
+ param = param.set("parentTaskId", this.resolveParentTaskId());
6661
+ this._taskResourceService.deleteFile(this.taskId, this.dataField.stringId, undefined, param).pipe(take(1)).subscribe(response => {
6653
6662
  if (response.success) {
6654
6663
  const filename = this.dataField.value.name;
6655
6664
  this.dataField.value = {};
@@ -6733,7 +6742,7 @@ class AbstractFileFieldComponent extends AbstractDataFieldComponent {
6733
6742
  if (!this.checkFileBeforeDownload()) {
6734
6743
  return;
6735
6744
  }
6736
- this._taskResourceService.downloadFile(this.taskId, this.dataField.stringId).subscribe(response => {
6745
+ this._taskResourceService.downloadFile(this.resolveParentTaskId(), this.dataField.stringId).subscribe(response => {
6737
6746
  if (!response.type || response.type !== ProgressType.DOWNLOAD) {
6738
6747
  this._log.debug(`File [${this.dataField.stringId}] ${this.dataField.value.name} was successfully downloaded`);
6739
6748
  this.initDownloadFile(response);
@@ -7043,7 +7052,9 @@ class AbstractFileListFieldComponent extends AbstractDataFieldComponent {
7043
7052
  this._log.error('File cannot be deleted. No task is set to the field.');
7044
7053
  return;
7045
7054
  }
7046
- this._taskResourceService.deleteFile(this.taskId, this.dataField.stringId, fileName).pipe(take(1)).subscribe((response) => {
7055
+ let param = new HttpParams();
7056
+ param = param.set("parentTaskId", this.resolveParentTaskId());
7057
+ this._taskResourceService.deleteFile(this.taskId, this.dataField.stringId, fileName, param).pipe(take(1)).subscribe((response) => {
7047
7058
  if (response.success) {
7048
7059
  const changedFieldsMap = this._eventService.parseChangedFieldsFromOutcomeTree(response.outcome);
7049
7060
  this.dataField.emitChangedFields(changedFieldsMap);
@@ -7170,7 +7181,7 @@ class AbstractMultichoiceAutocompleteFieldComponentComponent {
7170
7181
  this.filteredOptions = undefined;
7171
7182
  }
7172
7183
  add(event) {
7173
- const value = (event.value || '').trim();
7184
+ const value = (event['key'] || '').trim();
7174
7185
  if (value) {
7175
7186
  const choiceArray = [...this.multichoiceField.value];
7176
7187
  choiceArray.push(value);
@@ -7205,6 +7216,10 @@ class AbstractMultichoiceAutocompleteFieldComponentComponent {
7205
7216
  return this.multichoiceField.choices.filter(option => option.value.toLowerCase().normalize('NFD')
7206
7217
  .replace(/[\u0300-\u036f]/g, '').indexOf(filterValue) === 0);
7207
7218
  }
7219
+ getValueFromKey(key) {
7220
+ var _a;
7221
+ return (_a = this.multichoiceField.choices.find(choice => choice.key === key)) === null || _a === void 0 ? void 0 : _a.value;
7222
+ }
7208
7223
  }
7209
7224
  AbstractMultichoiceAutocompleteFieldComponentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AbstractMultichoiceAutocompleteFieldComponentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7210
7225
  AbstractMultichoiceAutocompleteFieldComponentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AbstractMultichoiceAutocompleteFieldComponentComponent, selector: "ncc-abstract-multichoice-autocomplete-field", inputs: { multichoiceField: "multichoiceField", formControlRef: "formControlRef", showLargeLayout: "showLargeLayout" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: '', isInline: true });
@@ -7345,6 +7360,7 @@ class AbstractCurrencyNumberFieldComponent extends AbstractNumberErrorsComponent
7345
7360
  this._currencyPipe = _currencyPipe;
7346
7361
  this.NUMBER_TYPE = 'number';
7347
7362
  this.TEXT_TYPE = 'text';
7363
+ this.WHITESPACE = ' ';
7348
7364
  }
7349
7365
  ngAfterViewInit() {
7350
7366
  var _a;
@@ -7353,7 +7369,7 @@ class AbstractCurrencyNumberFieldComponent extends AbstractNumberErrorsComponent
7353
7369
  this.numberField.valueChanges().subscribe(value => {
7354
7370
  if (value !== undefined) {
7355
7371
  if (this.fieldType === this.TEXT_TYPE) {
7356
- this.transformedValue = this.transformCurrency(value.toString());
7372
+ this.transformedValue = this.transformCurrency(value.toString()) + this.WHITESPACE;
7357
7373
  }
7358
7374
  }
7359
7375
  else {
@@ -11142,14 +11158,17 @@ class CaseDataset extends Category {
11142
11158
  return resolver.getIndex(datafield.fieldId, SearchIndex.BOOLEAN);
11143
11159
  case 'file':
11144
11160
  case 'fileList':
11145
- return resolver.getIndex(datafield.fieldId, SearchIndex.FILE_NAME, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals) || this.isSelectedOperator(Substring));
11161
+ return resolver.getIndex(datafield.fieldId, SearchIndex.FILE_NAME, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals) || this.isSelectedOperator(Substring)
11162
+ || this.isSelectedOperator(IsNull));
11146
11163
  case 'user':
11147
11164
  case 'userList':
11148
11165
  return resolver.getIndex(datafield.fieldId, SearchIndex.USER_ID);
11149
11166
  case 'i18n':
11150
- return resolver.getIndex(datafield.fieldId, SearchIndex.TEXT, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals) || this.isSelectedOperator(Substring));
11167
+ return resolver.getIndex(datafield.fieldId, SearchIndex.TEXT, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals) || this.isSelectedOperator(Substring)
11168
+ || this.isSelectedOperator(IsNull));
11151
11169
  default:
11152
- return resolver.getIndex(datafield.fieldId, SearchIndex.FULLTEXT, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals) || this.isSelectedOperator(Substring));
11170
+ return resolver.getIndex(datafield.fieldId, SearchIndex.FULLTEXT, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals) || this.isSelectedOperator(Substring)
11171
+ || this.isSelectedOperator(IsNull));
11153
11172
  }
11154
11173
  }
11155
11174
  get inputPlaceholder() {
@@ -13436,6 +13455,12 @@ class AbstractI18nDividerFieldComponent {
13436
13455
  return this.dividerI18nField.component.properties.dividerColor;
13437
13456
  }
13438
13457
  }
13458
+ isDividerLGBTQ() {
13459
+ if (this.dividerPropertyEnabled('dividerLGBTQ')) {
13460
+ return this.dividerI18nField.component.properties.dividerLGBTQ === 'true';
13461
+ }
13462
+ return false;
13463
+ }
13439
13464
  getDividerFontSize() {
13440
13465
  if (this.dividerPropertyEnabled('fontSize')) {
13441
13466
  return this.dividerI18nField.component.properties.fontSize + 'px';
@@ -14009,6 +14034,9 @@ class AbstractAuthenticationOverlayComponent {
14009
14034
  if (!!user && !!user.id && user.id.length > 0) {
14010
14035
  this.redirect(!active);
14011
14036
  }
14037
+ else if (!active) {
14038
+ this._spinnerOverlay.spin$.next(false);
14039
+ }
14012
14040
  });
14013
14041
  });
14014
14042
  }
@@ -20100,6 +20128,7 @@ class AbstractNewCaseComponent {
20100
20128
  this._hasMultipleNets$ = new ReplaySubject(1);
20101
20129
  this._notInitialized$ = new BehaviorSubject(true);
20102
20130
  this._options$ = new ReplaySubject(1);
20131
+ this.loadingSubmit = new LoadingEmitter(false);
20103
20132
  this._allowedNetsSubscription = this._injectedData.allowedNets$.pipe(map(nets => nets.map(petriNet => ({
20104
20133
  value: petriNet.stringId,
20105
20134
  viewValue: petriNet.title,
@@ -20136,6 +20165,7 @@ class AbstractNewCaseComponent {
20136
20165
  }
20137
20166
  ngOnDestroy() {
20138
20167
  this._hasMultipleNets$.complete();
20168
+ this.loadingSubmit.complete();
20139
20169
  this._allowedNetsSubscription.unsubscribe();
20140
20170
  }
20141
20171
  get hasMultipleNets$() {
@@ -20155,25 +20185,44 @@ class AbstractNewCaseComponent {
20155
20185
  return process && process.viewValue ? process.viewValue : '';
20156
20186
  }
20157
20187
  createNewCase() {
20188
+ if (this.loadingSubmit.value) {
20189
+ return;
20190
+ }
20158
20191
  if (this.titleFormControl.valid || !this.isCaseTitleRequired()) {
20159
20192
  const newCase = {
20160
20193
  title: this.titleFormControl.value === '' ? null : this.titleFormControl.value,
20161
20194
  color: 'panel-primary-icon',
20162
20195
  netId: this.options.length === 1 ? this.options[0].value : this.processFormControl.value.value
20163
20196
  };
20197
+ this.loadingSubmit.on();
20164
20198
  this._caseResourceService.createCase(newCase)
20165
20199
  .subscribe((response) => {
20166
- this._snackBarService.openSuccessSnackBar(response.outcome.message === undefined
20167
- ? this._translate.instant('side-menu.new-case.createCase') + ' ' + newCase.title
20168
- : response.outcome.message);
20169
- this._sideMenuControl.close({
20170
- opened: false,
20171
- message: response.outcome.message === undefined
20172
- ? 'Confirm new case setup'
20173
- : response.outcome.message,
20174
- data: response.outcome.aCase
20175
- });
20176
- }, error => this._snackBarService.openErrorSnackBar(error.message ? error.message : error));
20200
+ this.loadingSubmit.off();
20201
+ if (!!response.outcome) {
20202
+ this._snackBarService.openSuccessSnackBar(response.outcome.message === undefined
20203
+ ? this._translate.instant('side-menu.new-case.createCase') + ' ' + newCase.title
20204
+ : response.outcome.message);
20205
+ this._sideMenuControl.close({
20206
+ opened: false,
20207
+ message: response.outcome.message === undefined
20208
+ ? 'Confirm new case setup'
20209
+ : response.outcome.message,
20210
+ data: response.outcome.aCase
20211
+ });
20212
+ }
20213
+ else if (!!response.error) {
20214
+ this._snackBarService.openWarningSnackBar(this._translate.instant('side-menu.new-case.createCaseError') + ' ' + newCase.title);
20215
+ this._sideMenuControl.close({
20216
+ opened: false,
20217
+ message: response.error === undefined
20218
+ ? 'Confirm new case setup'
20219
+ : response.error
20220
+ });
20221
+ }
20222
+ }, error => {
20223
+ this.loadingSubmit.off();
20224
+ this._snackBarService.openErrorSnackBar(error.message ? error.message : error);
20225
+ });
20177
20226
  }
20178
20227
  }
20179
20228
  /**
@@ -23544,16 +23593,35 @@ class RoleGuardService {
23544
23593
  return this.canAccessView(view, state.url.toString());
23545
23594
  }
23546
23595
  canAccessView(view, url) {
23547
- if (typeof view.access !== 'string' && view.access.hasOwnProperty('role')) {
23548
- const allowedRoles = this.parseRoleConstraints(view.access.role, url);
23549
- return allowedRoles.some(constraint => {
23550
- if (constraint.roleIdentifier) {
23551
- return this._userService.hasRoleByIdentifier(constraint.roleIdentifier, constraint.processIdentifier);
23596
+ if (typeof view.access !== 'string' && (view.access.hasOwnProperty('role') || view.access.hasOwnProperty('bannedRole'))) {
23597
+ if (view.access.hasOwnProperty('role') && view.access.hasOwnProperty('bannedRole')) {
23598
+ const bannedRoles = this.parseRoleConstraints(view.access.bannedRole, url);
23599
+ const allowedRoles = this.parseRoleConstraints(view.access.role, url);
23600
+ if (bannedRoles.some(role => this.decideAccessByRole(role))) {
23601
+ return false;
23552
23602
  }
23553
- else {
23554
- return this._userService.hasRoleByName(constraint.roleName, constraint.processIdentifier);
23603
+ if (allowedRoles.length === 0) {
23604
+ this._log.warn(`View at '${url}' defines role access constraint with an empty array!`
23605
+ + ` No users will be allowed to enter this view!`);
23555
23606
  }
23556
- });
23607
+ return allowedRoles.some(role => this.decideAccessByRole(role)); // user was not denied access by a banned role, they need at least one allowed role
23608
+ }
23609
+ if (view.access.hasOwnProperty('bannedRole')) {
23610
+ const bannedRoles = this.parseRoleConstraints(view.access.bannedRole, url);
23611
+ return !bannedRoles.some(constraint => {
23612
+ return this.decideAccessByRole(constraint);
23613
+ });
23614
+ }
23615
+ if (view.access.hasOwnProperty('role')) {
23616
+ const allowedRoles = this.parseRoleConstraints(view.access.role, url);
23617
+ if (allowedRoles.length === 0) {
23618
+ this._log.warn(`View at '${url}' defines role access constraint with an empty array!`
23619
+ + ` No users will be allowed to enter this view!`);
23620
+ }
23621
+ return allowedRoles.some(constraint => {
23622
+ return this.decideAccessByRole(constraint);
23623
+ });
23624
+ }
23557
23625
  }
23558
23626
  throw new Error('Role guard is declared for a view with no role guard configuration!'
23559
23627
  + ` Add role guard configuration for view at ${url}, or remove the guard.`);
@@ -23564,8 +23632,6 @@ class RoleGuardService {
23564
23632
  }
23565
23633
  if (Array.isArray(roleConstrains)) {
23566
23634
  if (roleConstrains.length === 0) {
23567
- this._log.warn(`View at '${viewUrl}' defines role access constraint with an empty array!`
23568
- + ` No users will be allowed to enter this view!`);
23569
23635
  return [];
23570
23636
  }
23571
23637
  if (typeof roleConstrains[0] === 'string') {
@@ -23603,6 +23669,14 @@ class RoleGuardService {
23603
23669
  return { processIdentifier: constraint.processId, roleIdentifier: constraint.roleId };
23604
23670
  });
23605
23671
  }
23672
+ decideAccessByRole(constraint) {
23673
+ if (constraint.roleIdentifier) {
23674
+ return this._userService.hasRoleByIdentifier(constraint.roleIdentifier, constraint.processIdentifier);
23675
+ }
23676
+ else {
23677
+ return this._userService.hasRoleByName(constraint.roleName, constraint.processIdentifier);
23678
+ }
23679
+ }
23606
23680
  }
23607
23681
  RoleGuardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: RoleGuardService, deps: [{ token: RedirectService }, { token: UserService }, { token: ConfigurationService }, { token: LoggerService }], target: i0.ɵɵFactoryTarget.Injectable });
23608
23682
  RoleGuardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: RoleGuardService, providedIn: AuthenticationModule });
@@ -23811,7 +23885,7 @@ class AccessService {
23811
23885
  * @returns whether the user passes the role guard condition for accessing the specified view
23812
23886
  */
23813
23887
  passesRoleGuard(view, url) {
23814
- return !view.access.hasOwnProperty('role') || this._roleGuard.canAccessView(view, url);
23888
+ return (!view.access.hasOwnProperty('role') && !view.access.hasOwnProperty('bannedRole')) || this._roleGuard.canAccessView(view, url);
23815
23889
  }
23816
23890
  /**
23817
23891
  * @param view the view whose access permissions we want to check
@@ -25285,16 +25359,19 @@ class AbstractNavigationDoubleDrawerComponent {
25285
25359
  id: filter.stringId,
25286
25360
  resource: filter
25287
25361
  };
25288
- const resolvedRoles = this.resolveAccessRoles(filter);
25362
+ const resolvedRoles = this.resolveAccessRoles(filter, 'allowed_roles');
25363
+ const resolvedBannedRoles = this.resolveAccessRoles(filter, 'banned_roles');
25289
25364
  if (!!resolvedRoles)
25290
25365
  item.access['role'] = resolvedRoles;
25366
+ if (!!resolvedBannedRoles)
25367
+ item.access['bannedRole'] = resolvedBannedRoles;
25291
25368
  if (!this._accessService.canAccessView(item, item.routingPath))
25292
25369
  return;
25293
25370
  return item;
25294
25371
  }
25295
- resolveAccessRoles(filter) {
25372
+ resolveAccessRoles(filter, roleType) {
25296
25373
  var _a;
25297
- const allowedRoles = (_a = filter.immediateData.find(f => f.stringId === 'allowed_roles')) === null || _a === void 0 ? void 0 : _a.options;
25374
+ const allowedRoles = (_a = filter.immediateData.find(f => f.stringId === roleType)) === null || _a === void 0 ? void 0 : _a.options;
25298
25375
  if (!allowedRoles || Object.keys(allowedRoles).length === 0)
25299
25376
  return undefined;
25300
25377
  const roles = [];
@@ -28598,7 +28675,7 @@ class AbstractSearchOperandInputComponent {
28598
28675
  }
28599
28676
  return this._filteredOptions$;
28600
28677
  }
28601
- get isInputFilled() {
28678
+ isInputFilled() {
28602
28679
  if (!this._inputConfirmed) {
28603
28680
  return false;
28604
28681
  }
@@ -28611,7 +28688,7 @@ class AbstractSearchOperandInputComponent {
28611
28688
  return;
28612
28689
  }
28613
28690
  this._initialExpansion = false;
28614
- if (!this.isInputFilled) {
28691
+ if (!this.isInputFilled()) {
28615
28692
  setTimeout(() => {
28616
28693
  input.nativeElement.focus();
28617
28694
  });
@@ -31720,8 +31797,7 @@ class AbstractFieldComponentResolverComponent {
31720
31797
  return this.gridElement.item;
31721
31798
  }
31722
31799
  getTaskId() {
31723
- const referencedTaskId = this.taskContentService.getReferencedFieldTask(this.getDataField().stringId);
31724
- return referencedTaskId !== null && referencedTaskId !== void 0 ? referencedTaskId : this.taskContentService.task.stringId;
31800
+ return this.taskContentService.task.stringId;
31725
31801
  }
31726
31802
  isField() {
31727
31803
  return this.gridElement.type !== TaskElementType.BLANK && this.gridElement.type !== TaskElementType.DATA_GROUP_TITLE;