@yuuvis/client-framework 3.14.0 → 3.14.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.
|
@@ -2144,7 +2144,7 @@ function escapeCmis(value) {
|
|
|
2144
2144
|
/**
|
|
2145
2145
|
* Form input for references to other dms objects. As the user types, a CMIS
|
|
2146
2146
|
* fulltext search (narrowed to the allowed target types from the field's
|
|
2147
|
-
* `
|
|
2147
|
+
* `object:reference[...]` classification) provides suggestions. The selected object
|
|
2148
2148
|
* id(s) are stored; on load they are resolved back to display chips.
|
|
2149
2149
|
*
|
|
2150
2150
|
* ## Label retrieval
|
|
@@ -2177,7 +2177,7 @@ function escapeCmis(value) {
|
|
|
2177
2177
|
* display the object without an extra fetch.
|
|
2178
2178
|
*
|
|
2179
2179
|
* @example
|
|
2180
|
-
* <yuv-reference [multiselect]="true" [classifications]="['
|
|
2180
|
+
* <yuv-reference [multiselect]="true" [classifications]="['object:reference[appCasem:correctionDocument]']" />
|
|
2181
2181
|
*/
|
|
2182
2182
|
class ReferenceComponent extends AbstractMatFormField {
|
|
2183
2183
|
constructor() {
|
|
@@ -2202,7 +2202,7 @@ class ReferenceComponent extends AbstractMatFormField {
|
|
|
2202
2202
|
*/
|
|
2203
2203
|
this.multiselect = input(false, ...(ngDevMode ? [{ debugName: "multiselect" }] : /* istanbul ignore next */ []));
|
|
2204
2204
|
/**
|
|
2205
|
-
* Additional semantics for the form element. The `
|
|
2205
|
+
* Additional semantics for the form element. The `object:reference[...]` classification
|
|
2206
2206
|
* restricts the suggestions to the target types listed in the brackets.
|
|
2207
2207
|
*/
|
|
2208
2208
|
this.classifications = input(undefined, ...(ngDevMode ? [{ debugName: "classifications" }] : /* istanbul ignore next */ []));
|
|
@@ -2221,7 +2221,12 @@ class ReferenceComponent extends AbstractMatFormField {
|
|
|
2221
2221
|
/** Allowed target object/secondary object types parsed from the classification. */
|
|
2222
2222
|
this.#allowedTargetTypes = computed(() => {
|
|
2223
2223
|
const c = this.classifications();
|
|
2224
|
-
|
|
2224
|
+
if (!c?.length)
|
|
2225
|
+
return [];
|
|
2226
|
+
const parsed = this.#system.getClassifications(c);
|
|
2227
|
+
// The reference classification key was renamed `id:reference` → `object:reference`.
|
|
2228
|
+
// Prefer the current key and fall back to the deprecated one during the transition.
|
|
2229
|
+
return (parsed.get(Classification.STRING_OBJECT_REFERENCE) ?? parsed.get(Classification.STRING_REFERENCE))?.options ?? [];
|
|
2225
2230
|
}, ...(ngDevMode ? [{ debugName: "#allowedTargetTypes" }] : /* istanbul ignore next */ []));
|
|
2226
2231
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2227
2232
|
this.propagateChange = (_) => { };
|