Skip to content

Commit

Permalink
Merge branch 'main' into 4301_vote_weight
Browse files Browse the repository at this point in the history
  • Loading branch information
Elblinator authored Dec 2, 2024
2 parents 29d974f + c8ad9bc commit 397eee9
Show file tree
Hide file tree
Showing 179 changed files with 944 additions and 2,318 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ updates:
patterns:
- "cm-chess*"
open-pull-requests-limit: 42
ignore:
- dependency-name: "@angular*"
update-types: ["version-update:semver-major"]
- dependency-name: "@schematics/angular"
update-types: ["version-update:semver-major"]

- package-ecosystem: "docker"
directory: "/"
Expand Down
2 changes: 1 addition & 1 deletion client/cli/generate-settings-defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const DESTINATION = path.resolve(path.join(__dirname, '../src/app/domain/definit
const FILE_TEMPLATE = dedent`
// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT CHANGE IT MANUALLY.
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from "@ngx-translate/core";
import { Settings } from 'src/app/domain/models/meetings/meeting';
export const meetingSettingsDefaults: { [key in keyof Settings]: any } = {
Expand Down
776 changes: 377 additions & 399 deletions client/package-lock.json

Large diffs are not rendered by default.

55 changes: 27 additions & 28 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@
"get-available-languages": "npm run ts -- cli/get-available-languages.ts"
},
"dependencies": {
"@angular/animations": "^18.2.11",
"@angular/cdk": "^18.2.12",
"@angular/common": "^18.2.11",
"@angular/compiler": "^18.2.11",
"@angular/core": "^18.2.11",
"@angular/forms": "^18.2.11",
"@angular/material": "^18.2.12",
"@angular/material-date-fns-adapter": "^18.2.12",
"@angular/platform-browser": "^18.2.11",
"@angular/platform-browser-dynamic": "^18.2.11",
"@angular/router": "^18.2.11",
"@angular/service-worker": "^18.2.11",
"@angular/animations": "^18.2.12",
"@angular/cdk": "^18.2.14",
"@angular/common": "^18.2.12",
"@angular/compiler": "^18.2.12",
"@angular/core": "^18.2.12",
"@angular/forms": "^18.2.12",
"@angular/material": "^18.2.14",
"@angular/material-date-fns-adapter": "^18.2.14",
"@angular/platform-browser": "^18.2.12",
"@angular/platform-browser-dynamic": "^18.2.12",
"@angular/router": "^18.2.12",
"@angular/service-worker": "^18.2.12",
"@material/typography": "^14.0.0",
"@ngx-pwa/local-storage": "^18.0.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@ngx-translate/core": "^16.0.3",
"@ngx-translate/http-loader": "^16.0.0",
"@tiptap/core": "^2.9.1",
"@tiptap/extension-color": "^2.9.1",
"@tiptap/extension-highlight": "^2.9.1",
Expand All @@ -69,10 +69,10 @@
"@tiptap/pm": "^2.9.1",
"@tiptap/starter-kit": "^2.9.1",
"@tsparticles/angular": "^3.0.0",
"@tsparticles/engine": "^3.5.0",
"@tsparticles/plugin-emitters": "^3.5.0",
"@tsparticles/shape-text": "^3.5.0",
"@tsparticles/slim": "^3.5.0",
"@tsparticles/engine": "^3.6.0",
"@tsparticles/plugin-emitters": "^3.6.0",
"@tsparticles/shape-text": "^3.6.0",
"@tsparticles/slim": "^3.6.0",
"chart.js": "^4.4.6",
"cm-chess": "^3.5.1",
"cm-chessboard": "^8.7.4",
Expand Down Expand Up @@ -100,15 +100,14 @@
"zone.js": "^0.14.10"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.11",
"@angular-eslint/builder": "^18.4.0",
"@angular-eslint/eslint-plugin": "^18.4.0",
"@angular-eslint/eslint-plugin-template": "^18.4.0",
"@angular-eslint/schematics": "^18.4.0",
"@angular-eslint/template-parser": "^18.4.0",
"@angular/cli": "^18.2.11",
"@angular/compiler-cli": "^18.2.11",
"@colsen1991/ngx-translate-extract-marker": "^3.0.1",
"@angular-devkit/build-angular": "^18.2.12",
"@angular-eslint/builder": "^18.4.1",
"@angular-eslint/eslint-plugin": "^18.4.1",
"@angular-eslint/eslint-plugin-template": "^18.4.1",
"@angular-eslint/schematics": "^18.4.1",
"@angular-eslint/template-parser": "^18.4.1",
"@angular/cli": "^18.2.12",
"@angular/compiler-cli": "^18.2.12",
"@types/file-saver": "^2.0.7",
"@types/jasmine": "~5.1.4",
"@types/js-yaml": "^4.0.9",
Expand All @@ -119,7 +118,7 @@
"@types/video.js": "^7.3.58",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vendure/ngx-translate-extract": "^9.2.1",
"@vendure/ngx-translate-extract": "^9.3.1",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT CHANGE IT MANUALLY.

import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

export const meetingSettingsDefaults: { [key: string]: any } = {
name: `Meeting title`,
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/domain/definitions/permission.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

import { Permission } from './permission';

Expand Down
2 changes: 1 addition & 1 deletion client/src/app/domain/models/agenda/agenda-item.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

import { Fqid, Id } from '../../definitions/key-types';
import { HasMeetingId } from '../../interfaces/has-meeting-id';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

export const LogoDisplayNames = {
projector_main: _(`Projector logo`),
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/domain/models/poll/poll-constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

import { OptionDataKey, PollDataKey } from './generic-poll';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

export const PROJECTIONDEFAULT = {
agendaItemList: `agenda_item_list`,
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/domain/models/users/user.constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

import { User } from './user';

Expand Down
2 changes: 1 addition & 1 deletion client/src/app/domain/models/users/user.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

import { Id } from '../../definitions/key-types';
import { OMLMapping } from '../../definitions/organization-permission';
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/gateways/error-mapping/error-map-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

import { MeetingAction } from '../repositories/meetings';
import { MotionAction } from '../repositories/motions';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Injectable } from '@angular/core';
import { Id } from 'src/app/domain/definitions/key-types';

import { Presenter } from './presenter';
import { PresenterService } from './presenter.service';

interface GetUserEditablePresenterPayload {
user_ids: Id[];
fields: string[];
}

interface GetUserEditableIdentifiedScope {
[field: string]: [boolean, string?];
}

export interface GetUserEditablePresenterResult {
[user_id: Id]: GetUserEditableIdentifiedScope;
}

@Injectable({
providedIn: `root`
})
export class GetUserEditablePresenterService {
public constructor(private presenter: PresenterService) {}

public async call(payload: GetUserEditablePresenterPayload): Promise<GetUserEditablePresenterResult> {
return await this.presenter.call(Presenter.GET_USER_EDITABLE, payload);
}
}
1 change: 1 addition & 0 deletions client/src/app/gateways/presenter/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './get-active-users-amount-presenter.service';
export * from './get-forwarding-meetings-presenter.service';
export * from './get-user-editable-presenter.service';
export * from './get-user-related-models-presenter.service';
export * from './get-user-scope-presenter.service';
export * from './get-users-presenter.service';
Expand Down
1 change: 1 addition & 0 deletions client/src/app/gateways/presenter/presenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export enum Presenter {
SERVERTIME = `server_time`,
GET_USERS = `get_users`,
GET_ACTIVE_USER_AMOUNT = `get_active_users_amount`,
GET_USER_EDITABLE = `get_user_editable`,
GET_USER_RELATED_MODELS = `get_user_related_models`,
GET_USER_SCOPE = `get_user_scope`,
GET_FORWARDING_COMMITTEES = `get_forwarding_committees`,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';
import { PollCandidateList } from 'src/app/domain/models/poll-candidate-lists/poll-candidate-list';
import { ViewPollCandidateList } from 'src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate-list';
import { DEFAULT_FIELDSET, Fieldsets } from 'src/app/site/services/model-request-builder';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';
import { Id } from 'src/app/domain/definitions/key-types';

import { Identifiable } from '../../../domain/interfaces';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

/**
* Define custom error classes here
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/infrastructure/errors/process.error.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpErrorResponse } from '@angular/common/http';
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

interface ErrorMessageResponse {
message: string;
Expand Down
11 changes: 9 additions & 2 deletions client/src/app/infrastructure/utils/functions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,10 @@ describe(`utils: functions`, () => {
number: 1,
boolean: true
},
string: `string`
string: `string`,
empty_string: ``
};
const expected = `{\n "array": [\n "string1",\n "string2"\n ],\n "object": {\n "number": 1,\n "boolean": true\n },\n "string": "string"\n}`;
const expected = `{\n "array": [\n "string1",\n "string2"\n ],\n "object": {\n "number": 1,\n "boolean": true\n },\n "string": "string",\n "empty_string": ""\n}`;
it(`test with an object`, () => {
expect(objectToFormattedString(testObject)).toBe(expected);
});
Expand All @@ -533,6 +534,12 @@ describe(`utils: functions`, () => {
expect(objectToFormattedString(null)).toBe(undefined);
expect(objectToFormattedString(``)).toBe(undefined);
});

it(`test with object with empty string`, () => {
const obj1 = { string: `` };
const expected = `{\n "string": ""\n}`;
expect(objectToFormattedString(obj1)).toBe(expected);
});
});

describe(`isValidId function`, () => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/infrastructure/utils/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export function objectToFormattedString(jsonOrObject: string | object): string {
);

// Extract strings from JSON
const stringRegex = /\"([^\"]+)\"/g;
const stringRegex = /\"([^\"]*)\"/g;
const stringReplacement = `#`;
let strings: string[] = [...json.match(stringRegex)];
while (stringRegex.test(json)) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/infrastructure/utils/import/import-step.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';

export enum ImportStepPhase {
ENQUEUED,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';
import { _ } from '@ngx-translate/core';
import { TranslateService } from '@ngx-translate/core';
import { FileData } from 'src/app/ui/modules/file-upload/components/file-upload/file-upload.component';

Expand Down
Loading

0 comments on commit 397eee9

Please sign in to comment.