@processpuzzle/base-entity 0.9.0 → 0.9.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.
|
@@ -1074,6 +1074,7 @@ const BASE_ENTITY_FACADE_REGISTRY = new InjectionToken('BASE_ENTITY_FACADE_REGIS
|
|
|
1074
1074
|
class EntityRegistryComponent {
|
|
1075
1075
|
registry = inject(BASE_ENTITY_FACADE_REGISTRY);
|
|
1076
1076
|
injector = inject(Injector);
|
|
1077
|
+
entityRouteRegistry = inject(EntityRouteRegistry);
|
|
1077
1078
|
queryParams = toSignal(inject(ActivatedRoute).queryParamMap, { initialValue: null });
|
|
1078
1079
|
descriptors = signal(this.buildDescriptors(), /* @ts-ignore */
|
|
1079
1080
|
...(ngDevMode ? [{ debugName: "descriptors" }] : /* istanbul ignore next */ []));
|
|
@@ -1093,6 +1094,7 @@ class EntityRegistryComponent {
|
|
|
1093
1094
|
entityTitle,
|
|
1094
1095
|
isAbstract: descriptor.isAbstract,
|
|
1095
1096
|
parentEntityName: descriptor.parentEntity,
|
|
1097
|
+
route: this.entityRouteRegistry.basePath(descriptor.entityName),
|
|
1096
1098
|
attrDescriptors: attrDescriptors.map((attr) => this.serializeAttr(attr)),
|
|
1097
1099
|
};
|
|
1098
1100
|
});
|
|
@@ -2542,7 +2544,8 @@ class BaseEntityDescriptor {
|
|
|
2542
2544
|
extraFormActionsTemplate;
|
|
2543
2545
|
parentEntity;
|
|
2544
2546
|
isAbstract;
|
|
2545
|
-
|
|
2547
|
+
route;
|
|
2548
|
+
constructor({ store, attrDescriptors, entityName, entityTitle, extraFormActionsTemplate, isAbstract, parentEntity, route }) {
|
|
2546
2549
|
this.store = store;
|
|
2547
2550
|
this.attrDescriptors = attrDescriptors;
|
|
2548
2551
|
this.entityName = entityName;
|
|
@@ -2550,6 +2553,7 @@ class BaseEntityDescriptor {
|
|
|
2550
2553
|
this.extraFormActionsTemplate = extraFormActionsTemplate;
|
|
2551
2554
|
this.isAbstract = isAbstract ?? false;
|
|
2552
2555
|
this.parentEntity = parentEntity;
|
|
2556
|
+
this.route = route;
|
|
2553
2557
|
}
|
|
2554
2558
|
createTestId(suffix) {
|
|
2555
2559
|
return createTestId(this.entityName, suffix);
|