@netgrif/components-core 6.4.2-rc.5 → 6.4.2

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.
@@ -1880,7 +1880,7 @@ var sk = {
1880
1880
  session: session$1,
1881
1881
  paginator: paginator$1,
1882
1882
  "export": {
1883
- errorExportDownload: "File failed to download!"
1883
+ errorExportDownload: "Stiahnutie súboru zlyhalo!"
1884
1884
  }
1885
1885
  };
1886
1886
 
@@ -15783,12 +15783,12 @@ class TaskContentService {
15783
15783
  let taskRefId = Object.values(fields).find(f => f instanceof TaskRefField && f.value.includes(taskId));
15784
15784
  if (!taskRefId) {
15785
15785
  const referencedTaskIds = Array.prototype.concat.apply([], Object.values(fields).filter(f => f instanceof TaskRefField).map(tr => tr.value));
15786
- referencedTaskIds.forEach(id => {
15786
+ for (const id of referencedTaskIds) {
15787
15787
  taskRefId = this.findTaskRefId(taskId, this.taskFieldsIndex[id].fields);
15788
15788
  if (!!taskRefId) {
15789
15789
  return taskRefId;
15790
15790
  }
15791
- });
15791
+ }
15792
15792
  }
15793
15793
  return taskRefId;
15794
15794
  }
@@ -16265,6 +16265,7 @@ class TaskDataService extends TaskHandlingService {
16265
16265
  this._fieldConverterService = _fieldConverterService;
16266
16266
  this._taskEvent = _taskEvent;
16267
16267
  this._taskOperations = _taskOperations;
16268
+ this._taskContentService = _taskContentService;
16268
16269
  this._afterActionFactory = _afterActionFactory;
16269
16270
  this._eventQueue = _eventQueue;
16270
16271
  this._userComparator = _userComparator;
@@ -16395,7 +16396,13 @@ class TaskDataService extends TaskHandlingService {
16395
16396
  this._taskContentService.taskFieldsIndex[parentTaskId].transitionId = parentTransitionId;
16396
16397
  this._taskContentService.taskFieldsIndex[parentTaskId].fields[field.stringId] = field;
16397
16398
  field.valueChanges().subscribe(() => {
16399
+ var _a, _b;
16398
16400
  if (this.wasFieldUpdated(field)) {
16401
+ if (field instanceof ButtonField && ((_b = (_a = field.component) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.validateData) === 'true' && !this._taskContentService.validateTaskData()) {
16402
+ field.waitingForResponse = false;
16403
+ field.changed = false;
16404
+ return;
16405
+ }
16399
16406
  if (field instanceof DynamicEnumerationField) {
16400
16407
  field.loading = true;
16401
16408
  this.updateTaskDataFields(this._afterActionFactory.create(bool => {
@@ -20688,7 +20695,7 @@ class SubjectTaskOperations {
20688
20695
  }
20689
20696
 
20690
20697
  class AbstractTaskPanelComponent extends AbstractPanelWithImmediateDataComponent {
20691
- constructor(_taskContentService, _log, _taskViewService, _paperView, _taskEventService, _assignTaskService, _delegateTaskService, _cancelTaskService, _finishTaskService, _taskState, _taskDataService, _assignPolicyService, _finishPolicyService, _callChain, _taskOperations, _disableFunctions, _translate, _currencyPipe, _changedFieldsService, _permissionService, overflowService, _taskForceOpen, injectedTabData) {
20698
+ constructor(_taskContentService, _log, _taskViewService, _paperView, _taskEventService, _assignTaskService, _delegateTaskService, _cancelTaskService, _finishTaskService, _taskState, _taskDataService, _assignPolicyService, _finishPolicyService, _callChain, _taskOperations, _disableFunctions, _translate, _currencyPipe, _changedFieldsService, _permissionService, _userComparator, overflowService, _taskForceOpen, injectedTabData) {
20692
20699
  super(_translate, _currencyPipe, overflowService);
20693
20700
  this._taskContentService = _taskContentService;
20694
20701
  this._log = _log;
@@ -20710,6 +20717,7 @@ class AbstractTaskPanelComponent extends AbstractPanelWithImmediateDataComponent
20710
20717
  this._currencyPipe = _currencyPipe;
20711
20718
  this._changedFieldsService = _changedFieldsService;
20712
20719
  this._permissionService = _permissionService;
20720
+ this._userComparator = _userComparator;
20713
20721
  this._taskForceOpen = _taskForceOpen;
20714
20722
  this._forceLoadDataOnOpen = false;
20715
20723
  this.responsiveBody = true;
@@ -20780,7 +20788,12 @@ class AbstractTaskPanelComponent extends AbstractPanelWithImmediateDataComponent
20780
20788
  if (injectedTabData !== null) {
20781
20789
  this._unsub = injectedTabData.tabSelected$.pipe(filter(bool => bool && this.isExpanded())).subscribe(() => {
20782
20790
  if (this._canReload) {
20783
- this._taskDataService.initializeTaskDataFields(new AfterAction(), true);
20791
+ this._taskDataService.initializeTaskDataFields(this._callChain.create(() => {
20792
+ const taskShouldBeBlocked = !this._taskContentService.task
20793
+ || this._taskContentService.task.user === undefined
20794
+ || !this._userComparator.compareUsers(this._taskContentService.task.user);
20795
+ this._taskContentService.blockFields(taskShouldBeBlocked);
20796
+ }), true);
20784
20797
  }
20785
20798
  else {
20786
20799
  this._canReload = true;
@@ -21001,7 +21014,7 @@ class AbstractTaskPanelComponent extends AbstractPanelWithImmediateDataComponent
21001
21014
  return ((_a = this.panelRef) === null || _a === void 0 ? void 0 : _a.expanded) && !((_b = this._taskContentService) === null || _b === void 0 ? void 0 : _b.isExpanding);
21002
21015
  }
21003
21016
  }
21004
- AbstractTaskPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AbstractTaskPanelComponent, deps: [{ token: TaskContentService }, { token: LoggerService }, { token: TaskViewService }, { token: PaperViewService }, { token: TaskEventService }, { token: AssignTaskService }, { token: DelegateTaskService }, { token: CancelTaskService }, { token: FinishTaskService }, { token: TaskRequestStateService }, { token: TaskDataService }, { token: AssignPolicyService }, { token: FinishPolicyService }, { token: CallChainService }, { token: SubjectTaskOperations }, { token: NAE_TASK_PANEL_DISABLE_BUTTON_FUNCTIONS, optional: true }, { token: i1$2.TranslateService }, { token: i5.CurrencyPipe }, { token: ChangedFieldsService }, { token: PermissionService }, { token: OverflowService, optional: true }, { token: NAE_TASK_FORCE_OPEN, optional: true }, { token: NAE_TAB_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component });
21017
+ AbstractTaskPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AbstractTaskPanelComponent, deps: [{ token: TaskContentService }, { token: LoggerService }, { token: TaskViewService }, { token: PaperViewService }, { token: TaskEventService }, { token: AssignTaskService }, { token: DelegateTaskService }, { token: CancelTaskService }, { token: FinishTaskService }, { token: TaskRequestStateService }, { token: TaskDataService }, { token: AssignPolicyService }, { token: FinishPolicyService }, { token: CallChainService }, { token: SubjectTaskOperations }, { token: NAE_TASK_PANEL_DISABLE_BUTTON_FUNCTIONS, optional: true }, { token: i1$2.TranslateService }, { token: i5.CurrencyPipe }, { token: ChangedFieldsService }, { token: PermissionService }, { token: UserComparatorService }, { token: OverflowService, optional: true }, { token: NAE_TASK_FORCE_OPEN, optional: true }, { token: NAE_TAB_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component });
21005
21018
  AbstractTaskPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: AbstractTaskPanelComponent, selector: "ncc-abstract-legal-notice", inputs: { taskListVirtualScroll: "taskListVirtualScroll", panelContentComponent: "panelContentComponent", selectedHeaders$: "selectedHeaders$", first: "first", last: "last", responsiveBody: "responsiveBody", preventCollapse: "preventCollapse", hidePanelHeader: "hidePanelHeader", hideActionRow: "hideActionRow", actionButtonTemplates: "actionButtonTemplates", actionRowJustifyContent: "actionRowJustifyContent", showMoreMenu: "showMoreMenu", forceLoadDataOnOpen: "forceLoadDataOnOpen", textEllipsis: "textEllipsis", taskPanelData: "taskPanelData" }, outputs: { taskEvent: "taskEvent", panelRefOutput: "panelRefOutput" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
21006
21019
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AbstractTaskPanelComponent, decorators: [{
21007
21020
  type: Component,
@@ -21015,7 +21028,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
21015
21028
  }, {
21016
21029
  type: Inject,
21017
21030
  args: [NAE_TASK_PANEL_DISABLE_BUTTON_FUNCTIONS]
21018
- }] }, { type: i1$2.TranslateService }, { type: i5.CurrencyPipe }, { type: ChangedFieldsService }, { type: PermissionService }, { type: OverflowService, decorators: [{
21031
+ }] }, { type: i1$2.TranslateService }, { type: i5.CurrencyPipe }, { type: ChangedFieldsService }, { type: PermissionService }, { type: UserComparatorService }, { type: OverflowService, decorators: [{
21019
21032
  type: Optional
21020
21033
  }] }, { type: undefined, decorators: [{
21021
21034
  type: Optional
@@ -34001,6 +34014,7 @@ function createMockTask(stringId = 'stringId', title = 'taskTitle', transitionId
34001
34014
  function createMockCase(stringId = 'stringId', processIdentifier = 'processIdentifier', title = 'title', petriNetId = 'petriNetId') {
34002
34015
  return {
34003
34016
  lastModified: [],
34017
+ lastModifiedDataSet: [],
34004
34018
  visualId: '',
34005
34019
  petriNetObjectId: {
34006
34020
  timestamp: 0,