@yuuvis/client-framework 2.5.2 → 2.6.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.
- package/actions/lib/components/contextmenu/contextmenu.component.d.ts +2 -0
- package/common/index.d.ts +1 -0
- package/common/lib/components/halo-focus/halo-focus.component.d.ts +5 -0
- package/datepicker/lib/calendar/calendar.component.d.ts +1 -2
- package/fesm2022/yuuvis-client-framework-actions.mjs +6 -4
- package/fesm2022/yuuvis-client-framework-actions.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-autocomplete.mjs +3 -2
- package/fesm2022/yuuvis-client-framework-autocomplete.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-common.mjs +10 -1
- package/fesm2022/yuuvis-client-framework-common.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-datepicker.mjs +10 -19
- package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +33 -15
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-list.mjs +12 -0
- package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs +198 -198
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-simple-search.mjs +92 -58
- package/fesm2022/yuuvis-client-framework-simple-search.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-split-view.mjs +55 -4
- package/fesm2022/yuuvis-client-framework-split-view.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +4 -4
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework.mjs +231 -2
- package/fesm2022/yuuvis-client-framework.mjs.map +1 -1
- package/forms/lib/elements/datetime/datetime.component.d.ts +1 -0
- package/index.d.ts +2 -2
- package/lib/providers/halo-focus/provide-halo-focus.d.ts +10 -0
- package/lib/providers/index.d.ts +1 -0
- package/lib/services/halo-focus/halo-focus.service.d.ts +7 -0
- package/lib/services/index.d.ts +3 -0
- package/list/lib/list-item.directive.d.ts +7 -1
- package/package.json +20 -20
- package/simple-search/lib/models/index.d.ts +1 -0
- package/simple-search/lib/models/object-type-aggregation.model.d.ts +14 -0
- package/simple-search/lib/simple-search/simple-search.component.d.ts +13 -23
- package/split-view/lib/split-area-cover.directive.d.ts +15 -0
|
@@ -441,6 +441,9 @@ class DatetimeComponent extends AbstractMatFormField {
|
|
|
441
441
|
}
|
|
442
442
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
443
443
|
registerOnTouched() { }
|
|
444
|
+
setDisabledState(isDisabled) {
|
|
445
|
+
this.disabled = isDisabled;
|
|
446
|
+
}
|
|
444
447
|
onValueChange(e) {
|
|
445
448
|
this.#propagate(e);
|
|
446
449
|
}
|
|
@@ -722,6 +725,7 @@ class NumberComponent extends AbstractMatFormField {
|
|
|
722
725
|
else {
|
|
723
726
|
this.innerCtrl.enable();
|
|
724
727
|
}
|
|
728
|
+
this.disabled = isDisabled;
|
|
725
729
|
}
|
|
726
730
|
// called when the input looses focus
|
|
727
731
|
format() {
|
|
@@ -1110,19 +1114,19 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1110
1114
|
#organizationType;
|
|
1111
1115
|
#filterRoles;
|
|
1112
1116
|
writeValue(value) {
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
+
this.value = value;
|
|
1118
|
+
if (value) {
|
|
1119
|
+
if (typeof value === 'string' && this.#isMetadataString(value)) {
|
|
1120
|
+
const parsedMetadata = JSON.parse(value);
|
|
1121
|
+
this.#updateAutocompleteControl(Array.isArray(parsedMetadata) ? parsedMetadata : [parsedMetadata]);
|
|
1117
1122
|
}
|
|
1118
1123
|
else {
|
|
1119
|
-
this.value
|
|
1120
|
-
this.innerValue = [];
|
|
1124
|
+
this.resolveFn(Array.isArray(value) ? value : [value]);
|
|
1121
1125
|
}
|
|
1122
1126
|
}
|
|
1123
1127
|
else {
|
|
1124
|
-
this.value =
|
|
1125
|
-
this.
|
|
1128
|
+
this.value = null;
|
|
1129
|
+
this.innerValue = [];
|
|
1126
1130
|
}
|
|
1127
1131
|
}
|
|
1128
1132
|
registerOnChange(fn) {
|
|
@@ -1141,6 +1145,7 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1141
1145
|
else {
|
|
1142
1146
|
this.acFormControl.enable();
|
|
1143
1147
|
}
|
|
1148
|
+
this.disabled = isDisabled;
|
|
1144
1149
|
}
|
|
1145
1150
|
#getPropagateValue() {
|
|
1146
1151
|
const value = this.innerValue.map((v) => (this.withMetadata() ? { id: v.id, title: v.title } : v.id));
|
|
@@ -1170,21 +1175,33 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1170
1175
|
type: 'role'
|
|
1171
1176
|
}));
|
|
1172
1177
|
forkJoin(tasks).subscribe((data) => {
|
|
1173
|
-
this
|
|
1174
|
-
const mapped = this.innerValue.map((n) => ({
|
|
1175
|
-
label: n.title,
|
|
1176
|
-
value: n
|
|
1177
|
-
}));
|
|
1178
|
-
this.acFormControl.setValue(this.multiselect() ? mapped : [mapped[0]], { emitEvent: false });
|
|
1179
|
-
this.acFormControl.updateValueAndValidity({ emitEvent: false });
|
|
1178
|
+
this.#updateAutocompleteControl(data);
|
|
1180
1179
|
});
|
|
1181
1180
|
}
|
|
1181
|
+
#updateAutocompleteControl(data) {
|
|
1182
|
+
this.innerValue = data;
|
|
1183
|
+
const mapped = this.innerValue.map((n) => ({
|
|
1184
|
+
label: n.title,
|
|
1185
|
+
value: n
|
|
1186
|
+
}));
|
|
1187
|
+
this.acFormControl.setValue(this.multiselect() ? mapped : [mapped[0]], { emitEvent: false });
|
|
1188
|
+
this.acFormControl.updateValueAndValidity({ emitEvent: false });
|
|
1189
|
+
}
|
|
1182
1190
|
#resolveOrganization(query, excludeMe, filterRoles) {
|
|
1183
1191
|
return this.#userService.queryUser(query, excludeMe, filterRoles).pipe(mapOrganizationNode(this.innerValue), catchError(() => of([])));
|
|
1184
1192
|
}
|
|
1185
1193
|
#resolveOrganizationSet(query, filterRoles) {
|
|
1186
1194
|
return this.#idmService.queryOrganizationEntity(query, filterRoles).pipe(mapOrganizationNode(this.innerValue), catchError(() => of([])));
|
|
1187
1195
|
}
|
|
1196
|
+
#isMetadataString(value) {
|
|
1197
|
+
try {
|
|
1198
|
+
JSON.parse(value);
|
|
1199
|
+
return true;
|
|
1200
|
+
}
|
|
1201
|
+
catch (e) {
|
|
1202
|
+
return false;
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1188
1205
|
autocompleteFn(query) {
|
|
1189
1206
|
if (query.length >= this.minLength) {
|
|
1190
1207
|
this.busy.set(true);
|
|
@@ -1777,6 +1794,7 @@ class StringComponent extends AbstractMatFormField {
|
|
|
1777
1794
|
else {
|
|
1778
1795
|
this.fc.enable();
|
|
1779
1796
|
}
|
|
1797
|
+
this.disabled = isDisabled;
|
|
1780
1798
|
}
|
|
1781
1799
|
#onValueChange(val) {
|
|
1782
1800
|
this.value = val;
|