@netgrif/components-core 6.2.5 → 6.2.7

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.
@@ -930,7 +930,8 @@ var dataField$2 = {
930
930
  min: "Entered number must be greater than {{length}}",
931
931
  translationRequired: "Translation for languages: <{{translation}}> must be entered",
932
932
  translationOnly: "Only translation for languages: <{{translation}}> is allowed",
933
- requiredI18n: "At least one value must be entered"
933
+ requiredI18n: "At least one value must be entered",
934
+ requiredUserList: "At least one value must be entered"
934
935
  },
935
936
  snackBar: {
936
937
  downloadFail: " failed to download",
@@ -1410,7 +1411,8 @@ var dataField$1 = {
1410
1411
  min: "Zadané číslo musí byť väčšie ako {{length}}",
1411
1412
  translationRequired: "Musí byť vyplnený preklad pre jazyky: <{{translation}}>",
1412
1413
  translationOnly: "Je povolený iba preklad pre jazyky: <{{translation}}>",
1413
- requiredI18n: "Aspoň jedna hodnota musí byť vyplnená"
1414
+ requiredI18n: "Aspoň jedna hodnota musí byť vyplnená",
1415
+ requiredUserList: "Aspoň jedna hodnota musí byť vyplnená"
1414
1416
  },
1415
1417
  snackBar: {
1416
1418
  downloadFail: " sťahovanie zlyhalo",
@@ -1890,7 +1892,8 @@ var dataField = {
1890
1892
  min: "Die eingegebene Nummer muss größer als {{length}} sein",
1891
1893
  translationRequired: "Übersetzung für Sprachen: <{{translation}}> muss eingegeben werden",
1892
1894
  translationOnly: "Nur die Übersetzung für Sprachen: <{{translation}}> ist erlaubt",
1893
- requiredI18n: "Es muss mindestens ein Wert eingegeben werden"
1895
+ requiredI18n: "Es muss mindestens ein Wert eingegeben werden",
1896
+ requiredUserList: "Es muss mindestens ein Wert eingegeben werden"
1894
1897
  },
1895
1898
  snackBar: {
1896
1899
  downloadFail: " könnte nicht heruntergeladen werden",
@@ -5775,6 +5778,42 @@ class UserListField extends DataField {
5775
5778
  return (!a && !b) ||
5776
5779
  (!!a && !!b && a.userValues.length === b.userValues.length);
5777
5780
  }
5781
+ calculateValidity(forValidRequired, formControl) {
5782
+ const isDisabled = formControl.disabled;
5783
+ if (forValidRequired) {
5784
+ formControl.enable();
5785
+ }
5786
+ formControl.clearValidators();
5787
+ if (forValidRequired) {
5788
+ formControl.setValidators(this.behavior.required ? [this.requiredTrue] : []);
5789
+ }
5790
+ else {
5791
+ formControl.setValidators(this.resolveFormControlValidators());
5792
+ }
5793
+ formControl.updateValueAndValidity();
5794
+ const validity = this._determineFormControlValidity(formControl);
5795
+ isDisabled ? formControl.disable() : formControl.enable();
5796
+ return validity;
5797
+ }
5798
+ resolveFormControlValidators() {
5799
+ const result = [];
5800
+ if (this.behavior.required) {
5801
+ result.push(this.requiredTrue);
5802
+ }
5803
+ if (this.validations) {
5804
+ if (this._validators) {
5805
+ result.push(...this._validators);
5806
+ }
5807
+ else {
5808
+ this._validators = this.resolveValidations();
5809
+ result.push(...this._validators);
5810
+ }
5811
+ }
5812
+ return result;
5813
+ }
5814
+ requiredTrue(control) {
5815
+ return !!control.value && !!control.value._userValues && control.value._userValues.length > 0 ? null : { requiredUserList: true };
5816
+ }
5778
5817
  }
5779
5818
 
5780
5819
  /**
@@ -22987,7 +23026,7 @@ class PublicPetriNetResourceService extends PetriNetResourceService {
22987
23026
  * **Request URL:** {{baseUrl}}/api/public/petrinet/{identifier}/{version}
22988
23027
  */
22989
23028
  getOne(identifier, version, params) {
22990
- return this.provider.get$('public/petrinet/' + identifier + '/' + version, this.SERVER_URL, params)
23029
+ return this.provider.get$('public/petrinet/' + btoa(identifier) + '/' + version, this.SERVER_URL, params)
22991
23030
  .pipe(map(r => this.changeType(r, 'petriNetReferences')));
22992
23031
  }
22993
23032
  /**
@@ -27544,7 +27583,6 @@ class AbstractSingleTaskViewComponent extends AbstractViewWithHeadersComponent {
27544
27583
  this.subRoute = this._activatedRoute.paramMap.subscribe(paramMap => {
27545
27584
  if (!!(paramMap?.['params']?.[TaskConst.TRANSITION_ID])) {
27546
27585
  this.transitionId = paramMap['params'][TaskConst.TRANSITION_ID];
27547
- this.subPanelData.unsubscribe();
27548
27586
  this.subPanelData = this.taskViewService.tasks$.subscribe(tasks => {
27549
27587
  if (!!tasks && tasks.length > 0) {
27550
27588
  this.taskPanelData.next(this.resolveTransitionTask(tasks));
@@ -27556,7 +27594,9 @@ class AbstractSingleTaskViewComponent extends AbstractViewWithHeadersComponent {
27556
27594
  }
27557
27595
  ngOnDestroy() {
27558
27596
  super.ngOnDestroy();
27559
- this.subRoute.unsubscribe();
27597
+ if (!!this.subRoute) {
27598
+ this.subRoute.unsubscribe();
27599
+ }
27560
27600
  if (!!this.subPanelData) {
27561
27601
  this.subPanelData.unsubscribe();
27562
27602
  }
@@ -31798,7 +31838,7 @@ const publicFactoryResolver = (userService, sessionService, authService, router,
31798
31838
  };
31799
31839
 
31800
31840
  const getNetAndCreateCase = (router, route, process, caseResourceService, snackBarService, translate, publicTaskLoadingService) => {
31801
- process.getNet(route.snapshot.paramMap.get('petriNetId')).pipe(mergeMap(net => {
31841
+ process.getNet(atob(route.snapshot.paramMap.get('petriNetId'))).pipe(mergeMap(net => {
31802
31842
  if (net) {
31803
31843
  publicTaskLoadingService.setLoading$(true);
31804
31844
  const newCase = {