Skip to content

Commit 109b023

Browse files
authored
Release 3.38.1
2 parents 3b64625 + a7f43e5 commit 109b023

File tree

23 files changed

+357
-244
lines changed

23 files changed

+357
-244
lines changed

package-lock.json

Lines changed: 63 additions & 99 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@fortawesome/free-regular-svg-icons": "^6.5.2",
4343
"@fortawesome/free-solid-svg-icons": "^6.5.2",
4444
"@ngneat/until-destroy": "^10.0.0",
45-
"@sentry/browser": "^7.117.0",
45+
"@sentry/browser": "^8.13.0",
4646
"angulartics2": "^12.2.1",
4747
"assert": "^2.1.0",
4848
"crypto-es": "^2.1.0",

src/app/core/admin/admin-entity/admin-entity.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,16 @@ export class AdminEntityComponent implements OnInit {
9494

9595
this.configDetailsView = this.loadViewConfig(
9696
EntityConfigService.getDetailsViewId(this.entityConstructor),
97-
);
97+
) ?? { entityType: this.entityType, panels: [] };
9898
this.configListView = this.loadViewConfig(
9999
EntityConfigService.getListViewId(this.entityConstructor),
100-
);
100+
) ?? { entityType: this.entityType };
101101
this.configEntitySettings = this.entityConstructor;
102102
}
103103

104104
private loadViewConfig<C = EntityDetailsConfig | EntityListConfig>(
105105
viewId: string,
106-
): C {
106+
): C | undefined {
107107
const viewConfig: ViewConfig<C> = this.configService.getConfig(viewId);
108108

109109
// work on a deep copy as we are editing in place (for titles, sections, etc.)

src/app/core/admin/admin.routing.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const adminRoutes: Routes = [
2525
component: RoutedViewComponent,
2626
data: {
2727
component: "AdminEntityTypes",
28-
entity: "Config",
28+
entityType: "Config",
2929
requiredPermissionOperation: "update",
3030
},
3131
canActivate: [EntityPermissionGuard],
@@ -35,7 +35,7 @@ export const adminRoutes: Routes = [
3535
component: RoutedViewComponent,
3636
data: {
3737
component: "AdminEntity",
38-
entity: "Config",
38+
entityType: "Config",
3939
requiredPermissionOperation: "update",
4040
},
4141
canActivate: [EntityPermissionGuard],
@@ -47,7 +47,7 @@ export const adminRoutes: Routes = [
4747
data: {
4848
component: "EntityDetails",
4949
config: {
50-
entity: "SiteSettings",
50+
entityType: "SiteSettings",
5151
id: "global",
5252
panels: [
5353
{

src/app/core/basic-datatypes/configurable-enum/display-configurable-enum/display-configurable-enum.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ export class DisplayConfigurableEnumComponent
2323
iterableValue: ConfigurableEnumValue[] = [];
2424

2525
ngOnInit() {
26+
this.initValue();
27+
}
28+
29+
private initValue() {
30+
if (!this.value) {
31+
return;
32+
}
33+
2634
if (Array.isArray(this.value)) {
2735
this.iterableValue = this.value;
2836
} else if (this.value) {

src/app/core/basic-datatypes/configurable-enum/enum-dropdown/enum-dropdown.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class EnumDropdownComponent implements OnChanges {
4141

4242
enumEntity: ConfigurableEnum;
4343
invalidOptions: ConfigurableEnumValue[] = [];
44-
options: ConfigurableEnumValue[];
44+
options: ConfigurableEnumValue[] = [];
4545
canEdit = false;
4646
enumValueToString = (v: ConfigurableEnumValue) => v?.label;
4747
createNewOption: (input: string) => Promise<ConfigurableEnumValue>;
@@ -65,7 +65,7 @@ export class EnumDropdownComponent implements OnChanges {
6565
if (changes.hasOwnProperty("enumId") || changes.hasOwnProperty("form")) {
6666
this.invalidOptions = this.prepareInvalidOptions();
6767
}
68-
this.options = [...this.enumEntity?.values, ...this.invalidOptions];
68+
this.options = [...(this.enumEntity?.values ?? []), ...this.invalidOptions];
6969
}
7070

7171
private prepareInvalidOptions(): ConfigurableEnumValue[] {
@@ -114,6 +114,6 @@ export class EnumDropdownComponent implements OnChanges {
114114
this.form.setValue(undefined);
115115
}
116116

117-
this.options = [...this.enumEntity.values, ...this.invalidOptions];
117+
this.options = [...(this.enumEntity?.values ?? []), ...this.invalidOptions];
118118
}
119119
}

src/app/core/basic-datatypes/entity/entity-block/entity-block.component.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ describe("DisplayEntityComponent", () => {
8585
await component.ngOnInit();
8686

8787
expect(logSpy).toHaveBeenCalledWith(
88-
jasmine.stringContaining(child.getId()),
88+
jasmine.stringContaining("Could not find entity"),
89+
child.getId(),
90+
jasmine.anything(),
8991
);
9092
expect(component.entityToDisplay).toBeUndefined();
9193
});

src/app/core/basic-datatypes/entity/entity-block/entity-block.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export class EntityBlockComponent implements OnInit {
5757
} catch (e) {
5858
// this may be caused by restrictive permissions and therefore shouldn't be treated as a technical issue
5959
this.logger.debug(
60-
`[DISPLAY_ENTITY] Could not find entity with ID: ${this.entityId}: ${e}`,
60+
"[DISPLAY_ENTITY] Could not find entity.",
61+
this.entityId,
62+
e,
6163
);
6264
}
6365
}

src/app/core/common-components/entity-select/entity-select.component.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ describe("EntitySelectComponent", () => {
110110
fixture.detectChanges();
111111

112112
expect(warnSpy).toHaveBeenCalledWith(
113-
jasmine.stringContaining("missing_user"),
113+
jasmine.stringContaining("ENTITY_SELECT"),
114+
"missing_user",
115+
jasmine.anything(),
114116
);
115117
expect(component.form.value).toEqual([testUsers[0].getId()]);
116118
}));

src/app/core/common-components/entity-select/entity-select.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ export class EntitySelectComponent<
201201
.load<E>(type, selectedId)
202202
.catch((err: Error) => {
203203
this.logger.warn(
204-
`[ENTITY_SELECT] Error loading selected entity "${selectedId}": ${err.message}`,
204+
"[ENTITY_SELECT] Error loading selected entity.",
205+
selectedId,
206+
err.message,
205207
);
206208
return undefined;
207209
});

0 commit comments

Comments
 (0)