@netgrif/components-core 6.2.2 → 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.
- package/esm2020/assets/i18n/de.json +2 -1
- package/esm2020/assets/i18n/en.json +2 -1
- package/esm2020/assets/i18n/sk.json +2 -1
- package/esm2020/lib/authentication/components/abstract-authentication-overlay.mjs +4 -1
- package/esm2020/lib/data-fields/file-field/abstract-file-field.component.mjs +2 -1
- package/esm2020/lib/data-fields/i18n-field/i18n-divider-field/abstract-i18n-divider-field.component.mjs +7 -1
- package/esm2020/lib/data-fields/i18n-field/models/i18n-field.mjs +5 -5
- package/esm2020/lib/data-fields/models/abstract-data-field.mjs +1 -1
- package/esm2020/lib/data-fields/multichoice-field/multichoice-autocomplete-field/abstract-multichoice-autocomplete-field-component.component.mjs +5 -2
- package/esm2020/lib/side-menu/content-components/new-case/abstract-new-case.component.mjs +13 -2
- package/fesm2015/netgrif-components-core.mjs +36 -9
- package/fesm2015/netgrif-components-core.mjs.map +1 -1
- package/fesm2020/netgrif-components-core.mjs +35 -9
- package/fesm2020/netgrif-components-core.mjs.map +1 -1
- package/lib/data-fields/i18n-field/i18n-divider-field/abstract-i18n-divider-field.component.d.ts +1 -0
- package/lib/data-fields/models/abstract-data-field.d.ts +1 -1
- package/lib/data-fields/multichoice-field/multichoice-autocomplete-field/abstract-multichoice-autocomplete-field-component.component.d.ts +1 -0
- package/lib/side-menu/content-components/new-case/abstract-new-case.component.d.ts +2 -0
- package/package.json +1 -1
- package/src/assets/i18n/de.json +2 -1
- package/src/assets/i18n/en.json +3 -1
- package/src/assets/i18n/sk.json +2 -1
|
@@ -1081,7 +1081,8 @@ var admin$2 = {
|
|
|
1081
1081
|
},
|
|
1082
1082
|
"ldapGroup-list": {
|
|
1083
1083
|
noLdapGroupsWereFound: "No LDAP group was found",
|
|
1084
|
-
listTitle: "
|
|
1084
|
+
listTitle: "LDAP groups",
|
|
1085
|
+
count: "Number of groups"
|
|
1085
1086
|
},
|
|
1086
1087
|
"process-list": {
|
|
1087
1088
|
newestVersion: "Newest version",
|
|
@@ -1560,7 +1561,8 @@ var admin$1 = {
|
|
|
1560
1561
|
},
|
|
1561
1562
|
"ldapGroup-list": {
|
|
1562
1563
|
noLdapGroupsWereFound: "Žiadna LDAP skupina nebola najdená",
|
|
1563
|
-
listTitle: "
|
|
1564
|
+
listTitle: "LDAP Skupiny",
|
|
1565
|
+
count: "Počet skupín"
|
|
1564
1566
|
},
|
|
1565
1567
|
"process-list": {
|
|
1566
1568
|
newestVersion: "Najnovšia verzia",
|
|
@@ -2039,7 +2041,8 @@ var admin = {
|
|
|
2039
2041
|
},
|
|
2040
2042
|
"ldapGroup-list": {
|
|
2041
2043
|
noLdapGroupsWereFound: "Keine LDAP Gruppe wurde gefunden",
|
|
2042
|
-
listTitle: "LDAP Gruppen"
|
|
2044
|
+
listTitle: "LDAP Gruppen",
|
|
2045
|
+
count: "Anzahl der Gruppen"
|
|
2043
2046
|
},
|
|
2044
2047
|
"process-list": {
|
|
2045
2048
|
newestVersion: "Neuste Version",
|
|
@@ -5593,8 +5596,8 @@ class I18nField extends DataField {
|
|
|
5593
5596
|
&& ((!a.translations && !!b.translations) || (!b.translations && !!a.translations)));
|
|
5594
5597
|
}
|
|
5595
5598
|
static translationsEquality(a, b) {
|
|
5596
|
-
const aKeys = Object.keys(a.translations).sort();
|
|
5597
|
-
const bKeys = Object.keys(b.translations).sort();
|
|
5599
|
+
const aKeys = !!a.translations ? Object.keys(a.translations).sort() : [];
|
|
5600
|
+
const bKeys = !!b.translations ? Object.keys(b.translations).sort() : [];
|
|
5598
5601
|
if (aKeys.length !== bKeys.length
|
|
5599
5602
|
|| !aKeys.every((element, index) => {
|
|
5600
5603
|
return element === bKeys[index];
|
|
@@ -5710,13 +5713,13 @@ class I18nField extends DataField {
|
|
|
5710
5713
|
validTranslationRequired(countries) {
|
|
5711
5714
|
return (fc) => {
|
|
5712
5715
|
return countries.every(languageCode => languageCode in fc.value.translations)
|
|
5713
|
-
?
|
|
5716
|
+
? null : ({ translationRequired: true });
|
|
5714
5717
|
};
|
|
5715
5718
|
}
|
|
5716
5719
|
validTranslationOnly(countries) {
|
|
5717
5720
|
return (fc) => {
|
|
5718
5721
|
return Object.keys(fc.value.translations).every(translation => countries.includes(translation))
|
|
5719
|
-
?
|
|
5722
|
+
? null : ({ translationOnly: true });
|
|
5720
5723
|
};
|
|
5721
5724
|
}
|
|
5722
5725
|
validRequiredI18n(fc) {
|
|
@@ -6443,6 +6446,7 @@ class AbstractFileFieldComponent extends AbstractDataFieldComponent {
|
|
|
6443
6446
|
}
|
|
6444
6447
|
}
|
|
6445
6448
|
this.updatedFieldSubscription = this.dataField.updated.subscribe(() => {
|
|
6449
|
+
this.previewSource = undefined;
|
|
6446
6450
|
if (!!this.filePreview
|
|
6447
6451
|
&& !!this.dataField.value
|
|
6448
6452
|
&& !!this.dataField.value.name) {
|
|
@@ -7134,7 +7138,7 @@ class AbstractMultichoiceAutocompleteFieldComponentComponent {
|
|
|
7134
7138
|
this.filteredOptions = undefined;
|
|
7135
7139
|
}
|
|
7136
7140
|
add(event) {
|
|
7137
|
-
const value = (event
|
|
7141
|
+
const value = (event['key'] || '').trim();
|
|
7138
7142
|
if (value) {
|
|
7139
7143
|
const choiceArray = [...this.multichoiceField.value];
|
|
7140
7144
|
choiceArray.push(value);
|
|
@@ -7169,6 +7173,9 @@ class AbstractMultichoiceAutocompleteFieldComponentComponent {
|
|
|
7169
7173
|
return this.multichoiceField.choices.filter(option => option.value.toLowerCase().normalize('NFD')
|
|
7170
7174
|
.replace(/[\u0300-\u036f]/g, '').indexOf(filterValue) === 0);
|
|
7171
7175
|
}
|
|
7176
|
+
getValueFromKey(key) {
|
|
7177
|
+
return this.multichoiceField.choices.find(choice => choice.key === key)?.value;
|
|
7178
|
+
}
|
|
7172
7179
|
}
|
|
7173
7180
|
AbstractMultichoiceAutocompleteFieldComponentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AbstractMultichoiceAutocompleteFieldComponentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7174
7181
|
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 });
|
|
@@ -13383,6 +13390,12 @@ class AbstractI18nDividerFieldComponent {
|
|
|
13383
13390
|
return this.dividerI18nField.component.properties.dividerColor;
|
|
13384
13391
|
}
|
|
13385
13392
|
}
|
|
13393
|
+
isDividerLGBTQ() {
|
|
13394
|
+
if (this.dividerPropertyEnabled('dividerLGBTQ')) {
|
|
13395
|
+
return this.dividerI18nField.component.properties.dividerLGBTQ === 'true';
|
|
13396
|
+
}
|
|
13397
|
+
return false;
|
|
13398
|
+
}
|
|
13386
13399
|
getDividerFontSize() {
|
|
13387
13400
|
if (this.dividerPropertyEnabled('fontSize')) {
|
|
13388
13401
|
return this.dividerI18nField.component.properties.fontSize + 'px';
|
|
@@ -13953,6 +13966,9 @@ class AbstractAuthenticationOverlayComponent {
|
|
|
13953
13966
|
if (!!user && !!user.id && user.id.length > 0) {
|
|
13954
13967
|
this.redirect(!active);
|
|
13955
13968
|
}
|
|
13969
|
+
else if (!active) {
|
|
13970
|
+
this._spinnerOverlay.spin$.next(false);
|
|
13971
|
+
}
|
|
13956
13972
|
});
|
|
13957
13973
|
});
|
|
13958
13974
|
}
|
|
@@ -19995,6 +20011,7 @@ class AbstractNewCaseComponent {
|
|
|
19995
20011
|
this._hasMultipleNets$ = new ReplaySubject(1);
|
|
19996
20012
|
this._notInitialized$ = new BehaviorSubject(true);
|
|
19997
20013
|
this._options$ = new ReplaySubject(1);
|
|
20014
|
+
this.loadingSubmit = new LoadingEmitter(false);
|
|
19998
20015
|
this._allowedNetsSubscription = this._injectedData.allowedNets$.pipe(map(nets => nets.map(petriNet => ({
|
|
19999
20016
|
value: petriNet.stringId,
|
|
20000
20017
|
viewValue: petriNet.title,
|
|
@@ -20031,6 +20048,7 @@ class AbstractNewCaseComponent {
|
|
|
20031
20048
|
}
|
|
20032
20049
|
ngOnDestroy() {
|
|
20033
20050
|
this._hasMultipleNets$.complete();
|
|
20051
|
+
this.loadingSubmit.complete();
|
|
20034
20052
|
this._allowedNetsSubscription.unsubscribe();
|
|
20035
20053
|
}
|
|
20036
20054
|
get hasMultipleNets$() {
|
|
@@ -20050,14 +20068,19 @@ class AbstractNewCaseComponent {
|
|
|
20050
20068
|
return process && process.viewValue ? process.viewValue : '';
|
|
20051
20069
|
}
|
|
20052
20070
|
createNewCase() {
|
|
20071
|
+
if (this.loadingSubmit.value) {
|
|
20072
|
+
return;
|
|
20073
|
+
}
|
|
20053
20074
|
if (this.titleFormControl.valid || !this.isCaseTitleRequired()) {
|
|
20054
20075
|
const newCase = {
|
|
20055
20076
|
title: this.titleFormControl.value === '' ? null : this.titleFormControl.value,
|
|
20056
20077
|
color: 'panel-primary-icon',
|
|
20057
20078
|
netId: this.options.length === 1 ? this.options[0].value : this.processFormControl.value.value
|
|
20058
20079
|
};
|
|
20080
|
+
this.loadingSubmit.on();
|
|
20059
20081
|
this._caseResourceService.createCase(newCase)
|
|
20060
20082
|
.subscribe((response) => {
|
|
20083
|
+
this.loadingSubmit.off();
|
|
20061
20084
|
if (!!response.outcome) {
|
|
20062
20085
|
this._snackBarService.openSuccessSnackBar(response.outcome.message === undefined
|
|
20063
20086
|
? this._translate.instant('side-menu.new-case.createCase') + ' ' + newCase.title
|
|
@@ -20079,7 +20102,10 @@ class AbstractNewCaseComponent {
|
|
|
20079
20102
|
: response.error
|
|
20080
20103
|
});
|
|
20081
20104
|
}
|
|
20082
|
-
}, error =>
|
|
20105
|
+
}, error => {
|
|
20106
|
+
this.loadingSubmit.off();
|
|
20107
|
+
this._snackBarService.openErrorSnackBar(error.message ? error.message : error);
|
|
20108
|
+
});
|
|
20083
20109
|
}
|
|
20084
20110
|
}
|
|
20085
20111
|
/**
|