@yuuvis/client-core 2.1.32 → 2.1.34
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.
|
@@ -75,7 +75,8 @@ const SystemType = {
|
|
|
75
75
|
DOCUMENT: 'system:document',
|
|
76
76
|
FOLDER: 'system:folder',
|
|
77
77
|
AUDIT: 'system:audit',
|
|
78
|
-
|
|
78
|
+
RELATIONSHIP: 'system:relationship',
|
|
79
|
+
SOT: 'system:secondary'
|
|
79
80
|
};
|
|
80
81
|
const SystemResult = {
|
|
81
82
|
DELETE: 'system:deletionResult'
|
|
@@ -96,6 +97,10 @@ const RetentionField = {
|
|
|
96
97
|
RETENTION_START: 'system:rmStartOfRetention',
|
|
97
98
|
DESTRUCTION_DATE: 'system:rmDestructionDate'
|
|
98
99
|
};
|
|
100
|
+
const RelationshipTypeField = {
|
|
101
|
+
SOURCE_ID: 'system:sourceId',
|
|
102
|
+
TARGET_ID: 'system:targetId'
|
|
103
|
+
};
|
|
99
104
|
const BaseObjectTypeField = {
|
|
100
105
|
OBJECT_TYPE_ID: 'system:objectTypeId',
|
|
101
106
|
VERSION_NUMBER: 'system:versionNumber',
|
|
@@ -1343,6 +1348,13 @@ class SystemService {
|
|
|
1343
1348
|
}
|
|
1344
1349
|
return objectType;
|
|
1345
1350
|
}
|
|
1351
|
+
getRelationship(id, withLabel) {
|
|
1352
|
+
const relationship = this.system.relationships.find((r) => r.id === id);
|
|
1353
|
+
if (relationship && withLabel) {
|
|
1354
|
+
relationship.label = this.getLocalizedResource(`${relationship.id}_label`) || relationship.id;
|
|
1355
|
+
}
|
|
1356
|
+
return relationship;
|
|
1357
|
+
}
|
|
1346
1358
|
/**
|
|
1347
1359
|
* Get the base document type all documents belong to
|
|
1348
1360
|
* @param withLabel Whether or not to also add the types label
|
|
@@ -1485,9 +1497,11 @@ class SystemService {
|
|
|
1485
1497
|
}
|
|
1486
1498
|
else {
|
|
1487
1499
|
const iconUri = this.getObjectTypeIconUri(objectTypeId, fallback);
|
|
1488
|
-
return this.#backend
|
|
1500
|
+
return this.#backend
|
|
1501
|
+
.get(iconUri, ApiBase.none, {
|
|
1489
1502
|
responseType: 'text'
|
|
1490
|
-
})
|
|
1503
|
+
})
|
|
1504
|
+
.pipe(tap((icon) => (this.#iconCache[objectTypeId] = { uri: iconUri, icon })));
|
|
1491
1505
|
}
|
|
1492
1506
|
}
|
|
1493
1507
|
/**
|
|
@@ -1654,11 +1668,21 @@ class SystemService {
|
|
|
1654
1668
|
isFolder: false,
|
|
1655
1669
|
fields: this.#resolveObjectTypeFields(std, propertiesQA, objectTypesQA)
|
|
1656
1670
|
}));
|
|
1671
|
+
const relationships = (schemaResponse.typeRelationshipDefinition || []).map((std) => ({
|
|
1672
|
+
id: std.id,
|
|
1673
|
+
description: std.description,
|
|
1674
|
+
baseId: std.baseId,
|
|
1675
|
+
fields: this.#resolveObjectTypeFields(std, propertiesQA, objectTypesQA),
|
|
1676
|
+
// allowedSourceType
|
|
1677
|
+
allowedSourceTypes: std.allowedSourceType.map((t) => t.objectTypeReference),
|
|
1678
|
+
allowedTargetTypes: std.allowedTargetType.map((t) => t.objectTypeReference)
|
|
1679
|
+
}));
|
|
1657
1680
|
this.system = {
|
|
1658
1681
|
version: schemaResponse.version,
|
|
1659
1682
|
lastModificationDate: schemaResponse.lastModificationDate,
|
|
1660
1683
|
objectTypes,
|
|
1661
1684
|
secondaryObjectTypes,
|
|
1685
|
+
relationships,
|
|
1662
1686
|
i18n: localizedResource,
|
|
1663
1687
|
allFields: propertiesQA
|
|
1664
1688
|
};
|
|
@@ -5202,5 +5226,5 @@ const provideYuvClientCore = (options = { translations: [] }) => {
|
|
|
5202
5226
|
* Generated bundle index. Do not edit.
|
|
5203
5227
|
*/
|
|
5204
5228
|
|
|
5205
|
-
export { AFO_STATE, AdministrationRoles, ApiBase, AppCacheService, AuditField, AuditService, AuthService, BackendService, BaseObjectTypeField, BpmService, CORE_CONFIG, CUSTOM_CONFIG, CatalogService, Classification, ClassificationPrefix, ClientDefaultsObjectTypeField, ClipboardService, ColumnConfigSkipFields, ConfigService, ConnectionService, ContentStreamAllowed, ContentStreamField, CoreConfig, DeviceScreenOrientation, DeviceService, Direction, DmsObject, DmsService, EventService, FileSizePipe, IdmService, InternalFieldType, KeysPipe, LocaleCurrencyPipe, LocaleDatePipe, LocaleDecimalPipe, LocaleNumberPipe, LocalePercentPipe, Logger, LoginStateName, NativeNotificationService, NotificationService, ObjectConfigService, ObjectFormControl, ObjectFormControlWrapper, ObjectFormGroup, ObjectTag, ObjectTypeClassification, ObjectTypePropertyClassification, Operator, OperatorLabel, ParentField, PendingChangesGuard, PendingChangesService, PredictionService, ProcessAction, RetentionField, RetentionService, SafeHtmlPipe, SafeUrlPipe, SearchService, SearchUtils, SecondaryObjectTypeClassification, SessionStorageService, Situation, Sort, SystemResult, SystemSOT, SystemService, SystemType, TENANT_HEADER, ToastService, UploadService, UserRoles, UserService, UserStorageService, Utils, YUV_USER, YuvError, YuvEventType, YuvUser, init_moduleFnc, provideUser, provideYuvClientCore };
|
|
5229
|
+
export { AFO_STATE, AdministrationRoles, ApiBase, AppCacheService, AuditField, AuditService, AuthService, BackendService, BaseObjectTypeField, BpmService, CORE_CONFIG, CUSTOM_CONFIG, CatalogService, Classification, ClassificationPrefix, ClientDefaultsObjectTypeField, ClipboardService, ColumnConfigSkipFields, ConfigService, ConnectionService, ContentStreamAllowed, ContentStreamField, CoreConfig, DeviceScreenOrientation, DeviceService, Direction, DmsObject, DmsService, EventService, FileSizePipe, IdmService, InternalFieldType, KeysPipe, LocaleCurrencyPipe, LocaleDatePipe, LocaleDecimalPipe, LocaleNumberPipe, LocalePercentPipe, Logger, LoginStateName, NativeNotificationService, NotificationService, ObjectConfigService, ObjectFormControl, ObjectFormControlWrapper, ObjectFormGroup, ObjectTag, ObjectTypeClassification, ObjectTypePropertyClassification, Operator, OperatorLabel, ParentField, PendingChangesGuard, PendingChangesService, PredictionService, ProcessAction, RelationshipTypeField, RetentionField, RetentionService, SafeHtmlPipe, SafeUrlPipe, SearchService, SearchUtils, SecondaryObjectTypeClassification, SessionStorageService, Situation, Sort, SystemResult, SystemSOT, SystemService, SystemType, TENANT_HEADER, ToastService, UploadService, UserRoles, UserService, UserStorageService, Utils, YUV_USER, YuvError, YuvEventType, YuvUser, init_moduleFnc, provideUser, provideYuvClientCore };
|
|
5206
5230
|
//# sourceMappingURL=yuuvis-client-core.mjs.map
|